@sifxprime/krouter 0.5.162 → 0.5.164
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/README.md +102 -84
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +11 -11
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +5 -5
- 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 +10 -8
- 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 +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_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 +4 -4
- 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 +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_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_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 +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -4
- 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/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -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 +2 -2
- 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 +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/combos/[id]/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/providers/[id]/models/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/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/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/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/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/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/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/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/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.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 +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/environment.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/environment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard/environment/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/environment.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/environment.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/presidio.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/presidio.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/!KGRhc2hib2FyZCk/dashboard/presidio/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- 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 +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- 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 +11 -11
- package/app/.next-cli-build/server/chunks/1450.js +1 -1
- package/app/.next-cli-build/server/chunks/1738.js +2 -2
- package/app/.next-cli-build/server/chunks/2365.js +1 -1
- package/app/.next-cli-build/server/chunks/2722.js +10 -8
- package/app/.next-cli-build/server/chunks/3120.js +31 -0
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4161.js +1 -1
- package/app/.next-cli-build/server/chunks/4404.js +1 -1
- package/app/.next-cli-build/server/chunks/4632.js +1 -1
- package/app/.next-cli-build/server/chunks/5030.js +1 -1
- package/app/.next-cli-build/server/chunks/5330.js +2 -10
- package/app/.next-cli-build/server/chunks/5470.js +1 -1
- package/app/.next-cli-build/server/chunks/5681.js +1 -1
- package/app/.next-cli-build/server/chunks/5718.js +1 -1
- package/app/.next-cli-build/server/chunks/6108.js +1 -1
- package/app/.next-cli-build/server/chunks/6200.js +1 -1
- package/app/.next-cli-build/server/chunks/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/7341.js +1 -1
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8319.js +1 -1
- package/app/.next-cli-build/server/chunks/8590.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +2 -2
- package/app/.next-cli-build/server/chunks/9376.js +51 -0
- 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/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/1321-0b5ea2e0d2a8833d.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-71ac1eaeaacd3abb.js +7 -0
- package/app/.next-cli-build/static/chunks/{6069-c4c9124d1c1cc018.js → 6069-cd255683a4a76ed3.js} +15 -13
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-9f11bff3b99c5885.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c88a929e34f9b002.js +11 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-86eed48d5fdb5988.js +1 -0
- package/app/.next-cli-build/static/chunks/app/{layout-a39bb90fce7728eb.js → layout-3909a5381d71cda6.js} +1 -1
- package/app/.next-cli-build/static/css/{f408a041a2395281.css → 64fc7ce1f4c9684d.css} +1 -1
- package/app/.next-cli-build/static/css/{96a7e44d8ae325d4.css → e8f53fd8cd2766ce.css} +1 -1
- package/app/cli/package.json +1 -1
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/4921.js +0 -1
- package/app/.next-cli-build/server/chunks/7153.js +0 -1
- package/app/.next-cli-build/server/chunks/8361.js +0 -23
- package/app/.next-cli-build/static/chunks/1321-1cd76f0c09008d25.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-8ce793eef3eb912e.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0598a87942bb3820.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1a405c510f10994f.js +0 -11
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-2b35b21c1542b9b8.js +0 -1
- /package/app/.next-cli-build/static/{-JYtyz8OZjeWIc1-TrSED → M98dvtgJ0h4WJXRRd3DBx}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{-JYtyz8OZjeWIc1-TrSED → M98dvtgJ0h4WJXRRd3DBx}/_ssgManifest.js +0 -0
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-9f11bff3b99c5885.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{5594:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(73321),l=s(35497),i=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),u=s(38202);function p(){let e=(0,o.useRouter)(),{theme:t,setTheme:s,isDark:p}=(0,d.D)(),[h,b]=(0,r.useState)("en"),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[v,N]=(0,r.useState)(!1),[w,k]=(0,r.useState)({fallbackStrategy:"fill-first"}),[C,S]=(0,r.useState)(!0),[P,I]=(0,r.useState)({current:"",new:"",confirm:""}),[O,R]=(0,r.useState)({type:"",message:""}),[L,D]=(0,r.useState)(!1),[M,F]=(0,r.useState)(!1),[T,E]=(0,r.useState)({type:"",message:""}),[U,A]=(0,r.useState)({open:!1,mode:"",password:""}),$=(0,r.useRef)(null),[q,J]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[_,Z]=(0,r.useState)(""),[H,K]=(0,r.useState)({type:"",message:""}),[W,z]=(0,r.useState)(!1),[B,Q]=(0,r.useState)(!1),[G,V]=(0,r.useState)({type:"",message:""}),[Y,X]=(0,r.useState)("/api/auth/oidc/callback"),[ee,et]=(0,r.useState)(!1),es=(0,r.useRef)(null),[ea,er]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[eo,el]=(0,r.useState)({type:"",message:""}),[ei,en]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)(!1),[em,ex]=(0,r.useState)(!0);(0,r.useEffect)(()=>{ex(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]),(0,r.useEffect)(()=>{b(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${x.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,x.QC)(t)}())},[g]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{k(e),J({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),Z(""),(e?.authMode==="oidc"||e?.authMode==="both")&&et(!0),er({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),S(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),S(!1)})},[]),(0,r.useEffect)(()=>{X(`${window.location.origin}/api/auth/oidc/callback`)},[]);let eu=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){en(!0),el({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:ea.outboundProxyUrl,outboundNoProxy:ea.outboundNoProxy})}),t=await e.json();e.ok?(k(e=>({...e,...t})),el({type:"success",message:"Proxy settings applied"})):el({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){el({type:"error",message:"An error occurred"})}finally{en(!1)}}},ep=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(ea.outboundProxyUrl||"").trim();if(!e)return void el({type:"error",message:"Please enter a Proxy URL to test"});ec(!0),el({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?el({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):el({type:"error",message:s?.error||"Proxy test failed"})}catch(e){el({type:"error",message:"An error occurred"})}finally{ec(!1)}},eh=async e=>{en(!0),el({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(k(e=>({...e,...s})),er(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),el({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):el({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){el({type:"error",message:"An error occurred"})}finally{en(!1)}},eb=async e=>{if(e.preventDefault(),P.new!==P.confirm)return void R({type:"error",message:"Passwords do not match"});D(!0),R({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.current,newPassword:P.new})}),t=await e.json();e.ok?(R({type:"success",message:"Password updated successfully"}),I({current:"",new:"",confirm:""})):R({type:"error",message:t.error||"Failed to update password"})}catch(e){R({type:"error",message:"An error occurred"})}finally{D(!1)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&k(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},ey=async(e,t)=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:t})})).ok&&k(s=>({...s,[e]:t}))}catch(t){console.error(`Failed to update ${e}:`,t)}},ef=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&k(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},ej=async e=>{let t=parseInt(e,10);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&k(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},ev=async e=>{let t=parseInt(e,10);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&k(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eN=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&k(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ew=(e,t)=>{J(s=>({...s,[e]:t}))},ek=async(e=q.authMode||"password")=>{let t=q.oidcIssuerUrl.trim(),s=q.oidcClientId.trim(),a=q.oidcScopes.trim(),r=q.oidcLoginLabel.trim(),o=_.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void K({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});z(!0),K({type:"",message:""}),V({type:"",message:""});try{let l={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(l.oidcClientSecret=o);let i=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),n=await i.json();i.ok?(k(e=>({...e,...n})),J({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),Z(""),K({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):K({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){K({type:"error",message:"An error occurred"})}finally{z(!1)}},eC=async()=>{let e=q.oidcIssuerUrl.trim(),t=q.oidcClientId.trim(),s=q.oidcScopes.trim(),a=_.trim();if(!e||!t)return void V({type:"error",message:"Issuer URL and client ID are required to test the connection."});Q(!0),K({type:"",message:""}),V({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:q.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:q.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void V({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let l=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),i=await l.json().catch(()=>({}));if(l.ok&&i?.ok){let e=i.clientSecretTested?!0===i.clientSecretValid?`Connection OK. Discovery loaded from ${i.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${i.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${i.issuerUrl}.`;V({type:"success",message:e})}else V({type:"error",message:i.error||"OIDC connection test failed"})}catch(e){V({type:"error",message:"An error occurred"})}finally{Q(!1)}},eS=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&k(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eP=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();k(t)}catch(e){console.error("Failed to reload settings:",e)}},eI=async e=>{F(!0),E({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),l=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");l.href=o,l.download=`krouter-backup-${i}.json`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o),E({type:"success",message:"Database backup downloaded"})}catch(e){E({type:"error",message:e.message||"Failed to export database"})}finally{F(!1)}},eO=async e=>{let t=$.current;if(t){F(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eP(),E({type:"success",message:"Database imported successfully"})}catch(e){E({type:"error",message:e.message||"Invalid backup file"})}finally{$.current=null,F(!1)}}},eR=async()=>{let{mode:e,password:t}=U;A({open:!1,mode:"",password:""}),"export"===e?await eI(t):"import"===e&&await eO(t)},eL=!0===w.enableObservability,eD=async()=>{N(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}N(!1),j(!1)},eM=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(e.push("/login"),e.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:em?"Remote Mode":"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:em?"Running on the host you connected to":"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,c.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.krouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"secondary",icon:"download",onClick:()=>A({open:!0,mode:"export",password:""}),loading:M,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(l.$n,{variant:"outline",icon:"upload",onClick:()=>es.current?.click(),disabled:M,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:es,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];es.current&&(es.current.value=""),t&&($.current=t,E({type:"",message:""}),A({open:!0,mode:"import",password:""}))}})]}),T.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===T.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:T.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>y(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:u.h[h]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(l.lM,{checked:!0===w.requireLogin,onChange:()=>eN(!w.requireLogin),disabled:C})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:eb,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter current password",value:P.current,onChange:e=>I({...P,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter new password",value:P.new,onChange:e=>I({...P,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Confirm new password",value:P.confirm,onChange:e=>I({...P,confirm:e.target.value}),required:!0})]})]}),O.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===O.type?"text-red-500":"text-green-500"}`,children:O.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:L,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>et(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:ee?"expand_less":"expand_more"})]}),ee&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=q.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ew("authMode",e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:C||W,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(l.pd,{placeholder:"https://auth.example.com/application/o/krouter/",value:q.oidcIssuerUrl,onChange:e=>ew("oidcIssuerUrl",e.target.value),disabled:C||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(l.pd,{placeholder:"krouter-dashboard",value:q.oidcClientId,onChange:e=>ew("oidcClientId",e.target.value),disabled:C||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:_,onChange:e=>Z(e.target.value),disabled:C||W}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(l.pd,{placeholder:"openid profile email",value:q.oidcScopes,onChange:e=>ew("oidcScopes",e.target.value),disabled:C||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(l.pd,{placeholder:"Sign in with OIDC",value:q.oidcLoginLabel,onChange:e=>ew("oidcLoginLabel",e.target.value),disabled:C||W})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Y})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(l.$n,{type:"button",variant:"primary",loading:W,onClick:()=>ek(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",loading:B,onClick:eC,className:"w-full sm:w-auto",children:"Test connection"})]}),G.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===G.type?"text-red-500":"text-green-500"}`,children:G.message}),H.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===H.type?"text-red-500":"text-green-500"}`,children:H.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Strategy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"How kRouter picks the next available account"})]}),(0,a.jsx)(l.l6,{value:w.fallbackStrategy||"fill-first",onChange:e=>eg(e.target.value),disabled:C,className:"w-44 sm:w-56 shrink-0",options:[{value:"fill-first",label:"Zenith (default)"},{value:"round-robin",label:"Round Robin"},{value:"p2c",label:"P2C (Power of 2 Choices)"},{value:"random",label:"Random"}]})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>ej(e.target.value),disabled:C,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Rotate which model a combo tries first"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>ef("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:C})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>ev(e.target.value),disabled:C,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Each account serves ${w.stickyRoundRobinLimit||3} call${1===(w.stickyRoundRobinLimit||3)?"":"s"} in a row, then the least recently used account takes over. Conversations are not pinned to one account.`:("p2c"===w.fallbackStrategy?"Picking the better Zenith score of 2 random accounts (good for load-balancing equal-tier accounts).":"random"===w.fallbackStrategy?"Picking a uniformly random account.":"Zenith scores each account on recent success rate, latency, tracked quota left and its place in the list, and picks the highest score.")+" A conversation keeps the account that answered it until 15 minutes idle, so the provider's prompt cache stays warm. Antigravity uses Round Robin by default whatever is picked here, as does any provider with its own Round Robin switch on.","round-robin"===w.comboStrategy?` Each combo model goes first for ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} in turn`:" Combos start with their first model",", unless another has more quota left or is needed for an attachment (image, PDF, audio, video)."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"psychology"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Task-Aware Routing"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Show intent suggestions in logs"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Classify every request as code / math / reasoning / creative / simple (9 languages) and log the suggested combo. Log-only; never overrides your chosen model."})]}),(0,a.jsx)(l.lM,{checked:!1!==w.routingIntelligenceEnabled,onChange:()=>ey("routingIntelligenceEnabled",!1===w.routingIntelligenceEnabled),disabled:C})]}),!1!==w.routingIntelligenceEnabled&&(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["Active — check the dev console for ",(0,a.jsx)("code",{children:"[ROUTING] intent=X complexity=Y score=N tier=Z"})," lines. Custom intent→combo overrides via ",(0,a.jsx)("code",{children:"taskAwareRouterMap"})," setting (JSON)."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-amber-500/10 text-amber-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"emergency"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Emergency Fallback"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Redirect on budget exhaustion"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:'When an upstream returns 402 or "insufficient funds", transparently re-route the request to a free model so the user still gets a response.'})]}),(0,a.jsx)(l.lM,{checked:!!w.emergencyFallbackEnabled,onChange:()=>ey("emergencyFallbackEnabled",!w.emergencyFallbackEnabled),disabled:C})]}),w.emergencyFallbackEnabled&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-3 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Fallback provider"}),(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-text-muted",children:["Provider ID used for the redirect (e.g. ",(0,a.jsx)("code",{children:"nvidia"}),", ",(0,a.jsx)("code",{children:"openrouter"}),", ",(0,a.jsx)("code",{children:"opencode"}),")"]})]}),(0,a.jsx)(l.pd,{type:"text",value:w.emergencyFallbackProvider||"nvidia",onChange:e=>ey("emergencyFallbackProvider",e.target.value.trim()),disabled:C,className:"w-32 sm:w-44 text-center shrink-0",placeholder:"nvidia"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-3 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Fallback model"}),(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-text-muted",children:["Model ID at that provider. Default ",(0,a.jsx)("code",{children:"openai/gpt-oss-120b"})," is free on NVIDIA NIM."]})]}),(0,a.jsx)(l.pd,{type:"text",value:w.emergencyFallbackModel||"openai/gpt-oss-120b",onChange:e=>ey("emergencyFallbackModel",e.target.value.trim()),disabled:C,className:"w-40 sm:w-56 text-center shrink-0",placeholder:"openai/gpt-oss-120b"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-3 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Skip for tool requests"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Don't redirect when the request has tools — the free model may not support tool calling."})]}),(0,a.jsx)(l.lM,{checked:!1!==w.emergencyFallbackSkipForTools,onChange:()=>ey("emergencyFallbackSkipForTools",!1===w.emergencyFallbackSkipForTools),disabled:C})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["Currently redirecting 402 / budget errors to"," ",(0,a.jsxs)("code",{children:[w.emergencyFallbackProvider||"nvidia","/",w.emergencyFallbackModel||"openai/gpt-oss-120b"]}),"."]})]}),!w.emergencyFallbackEnabled&&(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:"Disabled — 402 / budget errors are returned to the user as-is."})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-cyan-500/10 text-cyan-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"database"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Cache Control"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Mode"}),(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-text-muted",children:["Controls whether kRouter mutates ",(0,a.jsx)("code",{children:"cache_control"})," markers on Claude-shape requests. Anthropic's prompt cache is byte-keyed; any mutation busts the cache."]})]}),(0,a.jsxs)("select",{value:w.cacheControlMode||"auto",onChange:e=>ey("cacheControlMode",e.target.value),disabled:C,className:"w-32 sm:w-44 px-3 py-2 text-sm rounded border border-border bg-bg text-text-main shrink-0",children:[(0,a.jsx)("option",{value:"auto",children:"Auto (recommended)"}),(0,a.jsx)("option",{value:"always",children:"Always preserve"}),(0,a.jsx)("option",{value:"never",children:"Never preserve (legacy)"})]})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-3 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Quick toggle"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Got a fresh-turn 429 because your prompt is bigger than your tier's TPM? Click once to switch into legacy trimming, send your first turn, then click again to return to cache-preserve mode."})]}),(0,a.jsx)("button",{type:"button",onClick:()=>ey("cacheControlMode","never"===(w.cacheControlMode||"auto")?"auto":"never"),disabled:C,className:`w-32 sm:w-44 px-3 py-2 text-sm font-medium rounded shrink-0 transition-colors ${"never"===(w.cacheControlMode||"auto")?"bg-amber-500/15 text-amber-600 border border-amber-500/40 hover:bg-amber-500/25":"bg-cyan-500/15 text-cyan-600 border border-cyan-500/40 hover:bg-cyan-500/25"}`,children:"never"===(w.cacheControlMode||"auto")?"Restore cache preserve":"Emergency: trim prompt"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["auto"===(w.cacheControlMode||"auto")&&(0,a.jsxs)(a.Fragment,{children:["Currently ",(0,a.jsx)("strong",{children:"auto"}),": preserves ",(0,a.jsx)("code",{children:"cache_control"})," only on Claude Desktop / Claude Code passthrough (",(0,a.jsx)("code",{children:'clientTool==="claude"'})," & ",(0,a.jsx)("code",{children:'provider==="claude"'}),"). All other paths mutate as before."]}),"always"===w.cacheControlMode&&(0,a.jsxs)(a.Fragment,{children:["Currently ",(0,a.jsx)("strong",{children:"always"}),": preserves ",(0,a.jsx)("code",{children:"cache_control"})," on any Claude-shape target (including ",(0,a.jsx)("code",{children:"anthropic-compatible-*"})," resellers and translated requests). Paranoid mode."]}),"never"===w.cacheControlMode&&(0,a.jsxs)(a.Fragment,{children:["Currently ",(0,a.jsx)("strong",{children:"never"}),": legacy 0.5.31-and-earlier behaviour — always strip and rewrite ",(0,a.jsx)("code",{children:"cache_control"}),". Escape hatch only."]})]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(l.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>eh(!0!==w.outboundProxyEnabled),disabled:C||ei})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:eu,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(l.pd,{placeholder:"http://127.0.0.1:7897",value:ea.outboundProxyUrl,onChange:e=>er(t=>({...t,outboundProxyUrl:e.target.value})),disabled:C||ei}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(l.pd,{placeholder:"localhost,127.0.0.1",value:ea.outboundNoProxy,onChange:e=>er(t=>({...t,outboundNoProxy:e.target.value})),disabled:C||ei}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(l.$n,{type:"button",variant:"secondary",loading:ed,disabled:C||ei,onClick:ep,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:ei,className:"w-full sm:w-auto",children:"Apply"})]})]}),eo.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===eo.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:eo.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(l.lM,{checked:eL,onChange:eS,disabled:C})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>j(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eM,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[m.vQ.name," v",m.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:em?"Remote Mode":"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(n.default,{hideTrigger:!0,isOpen:g,onClose:e=>{y(!1),b(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:eD,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:v}),(0,a.jsxs)(i.default,{isOpen:U.open,onClose:()=>A({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{variant:"ghost",onClick:()=>A({open:!1,mode:"",password:""}),disabled:M,children:"Cancel"}),(0,a.jsx)(l.$n,{variant:"primary",onClick:eR,loading:M,disabled:!U.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===U.mode?"export":"import"," the database."]}),(0,a.jsx)(l.pd,{type:"password",value:U.password,onChange:e=>A(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&U.password&&eR()},placeholder:"Current password",autoFocus:!0})]})]})}}},e=>{e.O(0,[7504,1321,5497,8441,3794,7358],()=>e(e.s=5594)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{69449:(e,t,s)=>{Promise.resolve().then(s.bind(s,77241))},77241:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),c=s(35497),d=s(52679),m=s(28777),p=s(72107),x=s(11059),u=s(73006);let h=new Map;async function f(e){if(!e?.url||!e?.type)return[];let t=h.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return h.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var g=s(14051),b=s.n(g);let y={chat:"Chat Completions",messages:"Messages",responses:"Responses"};function v({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:c,onTest:d,isTesting:m,onDisable:p,protocol:x,defaultProtocol:u,onProtocolChange:h,isSavingProtocol:f}){let g="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:g?{color:g}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted",children:e.name}),h&&(0,a.jsxs)("label",{className:"flex items-center gap-1.5 pl-1 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Protocol",f?" (saving…)":""]}),(0,a.jsxs)("select",{value:x||"auto",onChange:e=>h(e.target.value),"aria-busy":f||void 0,"aria-label":`Protocol for ${t}`,title:"Which OpenCode endpoint this model is sent to. Auto follows kRouter's model table.",className:"rounded border border-border bg-surface px-1.5 py-0.5 text-[10px] text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-60",children:[(0,a.jsxs)("option",{value:"auto",children:["Auto (",y[u]||y.chat,")"]}),(0,a.jsx)("option",{value:"chat",children:y.chat}),(0,a.jsx)("option",{value:"messages",children:y.messages}),(0,a.jsx)("option",{value:"responses",children:y.responses})]})]})]}),d&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:c,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):p?(0,a.jsx)("button",{onClick:p,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function j({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let c="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:c?{color:c}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function N({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:d,isAnthropic:m}){let[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[b,y]=(0,i.useState)(null),[v,w]=(0,i.useState)({}),k=async t=>{if(!b){y(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();w(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{w(e=>({...e,[t]:"error"}))}finally{y(null)}}},C=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),S=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},A=async()=>{if(!p.trim()||u)return;let t=p.trim(),s=S(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},$=async()=>{if(f)return;let t=d.find(e=>!1!==e.isActive);if(t){g(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=S(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},T=d.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",m?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:p,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:m?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:A,disabled:!p.trim()||u,children:u?"Adding...":"Add"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!T||f,children:f?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(j,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:d.length>0?()=>k(e):void 0,testStatus:v[e],isTesting:b===e},s))})]})}function w({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function k({connection:e,proxyPools:t,health:s=null,isOAuth:l,isFirst:r,isLast:n,onMoveUp:o,onMoveDown:d,onToggleActive:m,onUpdateProxy:p,onEdit:x,onDelete:u,oneByOneStatus:h=null,autoPing:f=null}){let g,b,y,v,j,[N,C]=(0,i.useState)(!1),[S,A]=(0,i.useState)(!1),$=(0,i.useRef)(null),T=new Map((t||[]).map(e=>[e.id,e])),P=e.providerSpecificData?.proxyPoolId||null,I=P?T.get(P):null,O=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,E=!!P||O,R=I?`Pool: ${I.name}`:P?`Pool: ${P} (inactive/missing)`:O?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",D="";if(I?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=I?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);D=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{D=t}}let _=I?.noProxy||e.providerSpecificData?.connectionNoProxy||"",z="default";I?.isActive===!0?z="success":(P||O)&&(z="error"),(0,i.useEffect)(()=>{if(!N)return;let e=e=>{$.current&&!$.current.contains(e.target)&&C(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[N]);let U=async e=>{A(!0);try{await p("__none__"===e?null:e)}finally{A(!1),C(!1)}},M=e.authType||(l?"oauth":"apikey"),q="oauth"===M,K="cookie"===M,L=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),F=q?L(e.email)?e.email:L(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[J,B]=(0,i.useState)(!1),W=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{B(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=W?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[W]);let H="unavailable"!==e.testStatus||J?e.testStatus:"active",V=()=>h?"queued"===h.state?"queued":"testing"===h.state?"testing":"success"===h.state?"success":"failed"===h.state?h.error?`failed: ${h.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:K?"cookie":q?"lock":"key"}),s&&(b=(g=Math.round(s.score??500))>=750?"bg-green-500/10 text-green-700 dark:text-green-400 border-green-500/30":g>=400?"bg-amber-500/10 text-amber-700 dark:text-amber-400 border-amber-500/30":"bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/30",y=null!=s.successRate?`${s.successRate}%`:"n/a",v=`${s.ewmaLatencyMs}ms`,j=`Zenith health ${g}
|
|
2
|
+
success ${y} \xb7 latency ${v} \xb7 n=${s.observed}`,(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 font-mono text-[10px] leading-none ${b}`,title:j,"aria-label":j,children:["Z:",g]})),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:F}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(c.Ex,{variant:!1===e.isActive?"default":"active"===H||"success"===H?"success":"error"===H||"expired"===H||"unavailable"===H?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":H||"Unknown"}),e.chronicallyBanned&&!1!==e.isActive&&(0,a.jsxs)(c.Ex,{variant:"error",size:"sm",title:`Banned ${e.banCount||3}\xd7 in a row. Verify manually.`,children:["chronic ban \xd7",e.banCount||3]}),(0,a.jsx)(c.Ex,{variant:"default",size:"sm",children:q?"OAuth":K?"Cookie":"API Key"}),E&&(0,a.jsx)(c.Ex,{variant:z,size:"sm",children:"Proxy"}),J&&!1!==e.isActive&&(0,a.jsx)(w,{until:W}),e.lastError&&!1!==e.isActive&&"active"!==H&&"success"!==H&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),V()&&(0,a.jsx)(c.Ex,{variant:h?"success"===h.state?"success":"failed"===h.state?"error":"testing"===h.state?"primary":"default":"default",size:"sm",children:V()})]}),E&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:R,children:R}),D&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:D}),_&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:_,children:["no_proxy: ",_]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:$,children:[(0,a.jsxs)("button",{onClick:()=>C(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${E?"text-primary":"text-text-muted hover:text-primary"}`,disabled:S,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:S?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),N&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>U("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!P?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>U(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${P===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),f&&(0,a.jsx)(c.m_,{text:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",children:(0,a.jsxs)("button",{onClick:()=>f.onToggle(!f.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${f.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:m,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}v.propTypes={model:b().shape({id:b().string.isRequired}).isRequired,fullModel:b().string.isRequired,alias:b().string,copied:b().string,onCopy:b().func.isRequired,testStatus:b().oneOf(["ok","error"]),isCustom:b().bool,isFree:b().bool,onDeleteAlias:b().func,onTest:b().func,isTesting:b().bool,onDisable:b().func,protocol:b().oneOf(["chat","messages","responses"]),defaultProtocol:b().oneOf(["chat","messages","responses"]),onProtocolChange:b().func,isSavingProtocol:b().bool},b().string.isRequired,b().string.isRequired,b().string,b().func.isRequired,b().func.isRequired,b().func,b().oneOf(["ok","error"]),b().bool,b().string.isRequired,b().object.isRequired,b().string,b().func.isRequired,b().func.isRequired,b().func.isRequired,N.propTypes={providerStorageAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,modelAliases:b().object.isRequired,copied:b().string,onCopy:b().func.isRequired,onSetAlias:b().func.isRequired,onDeleteAlias:b().func.isRequired,connections:b().arrayOf(b().shape({id:b().string,isActive:b().bool})).isRequired,isAnthropic:b().bool},w.propTypes={until:b().string.isRequired},k.propTypes={connection:b().shape({id:b().string,name:b().string,email:b().string,displayName:b().string,modelLockUntil:b().string,testStatus:b().string,isActive:b().bool,lastError:b().string,banCount:b().number,chronicallyBanned:b().bool,priority:b().number,globalPriority:b().number}).isRequired,health:b().shape({score:b().number,ewmaLatencyMs:b().number,successRate:b().number,observed:b().number,lastUpdate:b().number}),proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string,proxyUrl:b().string,noProxy:b().string,isActive:b().bool})),isOAuth:b().bool.isRequired,isFirst:b().bool.isRequired,isLast:b().bool.isRequired,onMoveUp:b().func.isRequired,onMoveDown:b().func.isRequired,onToggleActive:b().func.isRequired,onUpdateProxy:b().func,onEdit:b().func.isRequired,onDelete:b().func.isRequired,oneByOneStatus:b().shape({state:b().string,error:b().string}),autoPing:b().shape({on:b().bool,onToggle:b().func})};let C=`name1|sk-key1
|
|
3
|
+
name2|sk-key2
|
|
4
|
+
sk-key-only-auto-named`;function S({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,existingNames:u,onSave:h,onBulkDone:f,onClose:g}){let b="__none__",y="ollama-local"===t,v="cookie"===n,j="xai"===t&&!v,N=v?"Cookie Value":"API Key",w=v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"",k="azure"===t,A="cloudflare-ai"===t,$=d.Q2?.[t]?.regions||null,T=d.Q2?.[t]?.defaultRegion||$?.[0]?.id||"",[P,I]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,ollamaHostUrl:""}),[O,E]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[R,D]=(0,i.useState)({accountId:""}),[_,z]=(0,i.useState)(T),[U,M]=(0,i.useState)(!1),[q,K]=(0,i.useState)(null),[L,F]=(0,i.useState)(!1),[J,B]=(0,i.useState)({status:"idle"}),W=(0,i.useRef)(null),[H,V]=(0,i.useState)("single"),[G,Q]=(0,i.useState)(""),[Z,Y]=(0,i.useState)(null),X=()=>y&&P.ollamaHostUrl.trim()?{baseUrl:P.ollamaHostUrl.trim()}:k?{azureEndpoint:O.azureEndpoint,apiVersion:O.apiVersion,deployment:O.deployment,organization:O.organization}:A?{accountId:R.accountId}:$&&_?{region:_}:void 0;(0,i.useEffect)(()=>{W.current&&clearTimeout(W.current);let e=P.apiKey?.trim();return!e||e.length<6||v||y?void B({status:"idle"}):(B({status:"loading"}),W.current=setTimeout(async()=>{try{let s=await fetch("/api/models/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerId:t,apiKey:e})}),a=await s.json();"no_fetcher"===a.code?B({status:"unsupported"}):a.success?B({status:"ok",count:a.count,cached:!!a.cached}):B({status:"error",error:a.error||"Fetch failed"})}catch{B({status:"error",error:"Network error"})}},600),()=>{W.current&&clearTimeout(W.current)})},[P.apiKey,t,v,y]);let ee=async()=>{M(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:P.apiKey,providerSpecificData:X()})}),s=await e.json();K(s.valid?"success":"failed")}catch{K("failed")}finally{M(!1)}},et=async()=>{if(t&&(y||P.apiKey)&&(y||P.name)&&(!l||P.defaultModel.trim())){F(!0);try{let e=!1;try{M(!0),K(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:P.apiKey,providerSpecificData:X()})});e=!!(await s.json()).valid,K(e?"success":"failed")}catch{K("failed")}finally{M(!1)}await h({name:P.name||(y?"Ollama Local":""),apiKey:P.apiKey,defaultModel:l?P.defaultModel.trim():void 0,priority:P.priority,proxyPoolId:P.proxyPoolId===b?null:P.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:X()})}finally{F(!1)}}},es=async()=>{let e=function(e,t,s={}){let{isCloudflareAi:a=!1}=s,i=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,s="string"==typeof t?t.trim():"";if(!s)continue;let r=function(e,t={}){let{isCloudflareAi:s=!1}=t,a=e.split("|");if(s&&a.length>=3){let e=a[0].trim();return{baseName:e||"Key",apiKey:a.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:a[a.length-1].trim()}}}return a.length>=2?{baseName:a[0].trim()||"Key",apiKey:a.slice(1).join("|").trim()}:{baseName:"Key",apiKey:a[0].trim()}}(s,{isCloudflareAi:a});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,i.has(e.toLowerCase());)o+=1;i.add(e.toLowerCase());let c={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(c.providerSpecificData=r.providerSpecificData),l.push(c)}return l}(G.split("\n"),u,{isCloudflareAi:A});if(!e.length)return;F(!0),Y(null);let s=0,a=0;for(let i of e)try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:i.apiKey,name:i.name,priority:1,testStatus:"unknown",...i.providerSpecificData?{providerSpecificData:i.providerSpecificData}:{}})})).ok?s++:a++}catch{a++}F(!1),Y({success:s,failed:a}),s>0&&f&&f()};return t?(0,a.jsx)(c.aF,{isOpen:e,title:`Add ${s||t} ${N}`,onClose:g,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{size:"sm",variant:"single"===H?"primary":"ghost",onClick:()=>{V("single"),Y(null)},children:"Single"}),(0,a.jsx)(c.$n,{size:"sm",variant:"bulk"===H?"primary":"ghost",onClick:()=>{V("bulk"),Y(null)},children:"Bulk Add"})]}),"bulk"===H&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:C,value:G,onChange:e=>Q(e.target.value)}),Z&&(0,a.jsxs)("div",{className:`text-sm font-medium ${Z.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",Z.success," added",Z.failed>0?`, ✗ ${Z.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:es,fullWidth:!0,disabled:L||!G.trim(),children:L?"Adding...":"Add All Keys"}),(0,a.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===H&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.pd,{label:"Name",value:P.name,onChange:e=>I({...P,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:"Ollama Host URL",value:P.ollamaHostUrl,onChange:e=>I({...P,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:ee,disabled:U||L,variant:"secondary",children:U?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:N,type:v?"text":"password",value:P.apiKey,onChange:e=>I({...P,apiKey:e.target.value}),placeholder:w,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:ee,disabled:!P.apiKey||U||L,variant:"secondary",children:U?"Checking...":"Check"})})]}),"idle"!==J.status&&!v&&!y&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:["loading"===J.status&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking key + fetching catalog…"]}),"ok"===J.status&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-green-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),"Fetched ",J.count," model",1===J.count?"":"s"," from ",s||t,J.cached&&(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7 cached"})]}),"error"===J.status&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),J.error]}),"unsupported"===J.status&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"info"}),"No live catalog for this provider — you can still save the key."]})]}),j&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),v&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),$&&(0,a.jsx)(c.l6,{label:"Region",value:_,onChange:e=>z(e.target.value),options:$.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(c.pd,{label:"Default Model",value:P.defaultModel,onChange:e=>I({...P,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),q&&(0,a.jsx)(c.Ex,{variant:"success"===q?"success":"error",children:"success"===q?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),A&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(c.pd,{label:"Account ID",value:R.accountId,onChange:e=>D({...R,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(c.pd,{label:"Azure Endpoint",value:O.azureEndpoint,onChange:e=>E({...O,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(c.pd,{label:"Deployment Name",value:O.deployment,onChange:e=>E({...O,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(c.pd,{label:"API Version",value:O.apiVersion,onChange:e=>E({...O,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(c.pd,{label:"Organization",value:O.organization,onChange:e=>E({...O,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(c.pd,{label:"Priority",type:"number",value:P.priority,onChange:e=>I({...P,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(c.l6,{label:"Proxy Pool",value:P.proxyPoolId,onChange:e=>I({...P,proxyPoolId:e.target.value}),options:[{value:b,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:et,fullWidth:!0,disabled:L||!y&&(!P.name||!P.apiKey)||l&&!P.defaultModel.trim()||k&&(!O.azureEndpoint||!O.deployment||!O.organization)||A&&!R.accountId,children:L?"Saving...":"Save"}),(0,a.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function A({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,m]=(0,i.useState)(!1),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[b,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{g(!1)}};return t?(0,a.jsx)(c.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(c.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(c.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(c.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(c.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:j,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(c.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,a.jsx)(c.Ex,{variant:"success"===b?"success":"error",children:"success"===b?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,a.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function $({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[d,m]=(0,i.useState)(null),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){m("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();m(a.ok?"ok":"error"),x(a.error||"")}catch(e){m("error"),x(e.message)}}},b=async()=>{let e=f(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(c.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===d,onClick:g,disabled:!n.trim()||"testing"===d,children:"testing"===d?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===d&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:p||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(c.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(c.$n,{onClick:b,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}S.propTypes={isOpen:b().bool.isRequired,provider:b().string,providerName:b().string,isCompatible:b().bool,isAnthropic:b().bool,authType:b().string,authHint:b().string,website:b().string,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string})),error:b().string,existingNames:b().arrayOf(b().string),onSave:b().func.isRequired,onBulkDone:b().func,onClose:b().func.isRequired},A.propTypes={isOpen:b().bool.isRequired,node:b().shape({id:b().string,name:b().string,prefix:b().string,apiType:b().string,baseUrl:b().string}),onSave:b().func.isRequired,onClose:b().func.isRequired,isAnthropic:b().bool},$.propTypes={isOpen:b().bool.isRequired,providerAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,onSave:b().func.isRequired,onClose:b().func.isRequired};let T=`[
|
|
5
|
+
{
|
|
6
|
+
"accessToken": "eyJhbGc...",
|
|
7
|
+
"refreshToken": "rt_...",
|
|
8
|
+
"idToken": "eyJhbGc...",
|
|
9
|
+
"email": "user@example.com"
|
|
10
|
+
}
|
|
11
|
+
]`;function P({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(!1),[d,m]=(0,i.useState)(""),[p,x]=(0,i.useState)(null),h=()=>{n||(r(""),m(""),x(null),t())},f=async()=>{var e;let t;m(""),x(null);let a=l.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,u.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void m((0,u.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,u.Tl)("Request failed"))}finally{o(!1)}},g=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(c.aF,{isOpen:e,title:(0,u.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,u.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:T,value:l,onChange:e=>r(e.target.value),disabled:n}),d&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,u.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,u.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:f,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,u.Tl)("Importing..."):(0,u.Tl)("Import All")}),(0,a.jsx)(c.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:n,children:(0,u.Tl)("Close")})]})]})})}P.propTypes={isOpen:b().bool.isRequired,onClose:b().func.isRequired,onSuccess:b().func};let I={free:{label:"Free",variant:"success",accent:"green"},freetier:{label:"Free tier",variant:"success",accent:"emerald"},oauth:{label:"OAuth",variant:"primary",accent:"primary"},paid:{label:"API key",variant:"default",accent:"neutral"},webcookie:{label:"Cookie",variant:"warning",accent:"amber"}};function O({capabilities:e,connectionCount:t=0,headerIconPath:s}){let[l,r]=(0,i.useState)(!1);if(!e)return null;let d=I[e.tier]||I.paid,m=e.color?`${e.color}10`:"rgba(148,163,184,0.08)",p=e.color?`${e.color}30`:"rgba(148,163,184,0.20)",x=[];return e.links.apiKey&&x.push({href:e.links.apiKey,icon:"key",label:"Get API key"}),e.links.signup&&!e.links.apiKey&&x.push({href:e.links.signup,icon:"person_add",label:"Sign up"}),e.links.homepage&&x.push({href:e.links.homepage,icon:"language",label:"Homepage"}),e.links.docs&&x.push({href:e.links.docs,icon:"menu_book",label:"Docs"}),e.links.pricing&&x.push({href:e.links.pricing,icon:"sell",label:"Pricing"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-2xl border p-5 sm:p-7",style:{borderColor:p,background:`linear-gradient(140deg, ${m} 0%, transparent 55%)`},children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-5 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-4",children:[(0,a.jsx)("div",{className:"flex size-14 shrink-0 items-center justify-center rounded-xl shadow-sm",style:{backgroundColor:e.color?`${e.color}20`:"rgba(148,163,184,0.15)"},children:l||!s?(0,a.jsx)("span",{className:"text-base font-bold",style:{color:e.color||"inherit"},children:e.textIcon||e.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:s,alt:e.name,width:56,height:56,className:"max-h-14 max-w-14 rounded-xl object-contain",sizes:"56px",onError:()=>r(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e.name}),(0,a.jsx)(c.Ex,{variant:d.variant,size:"sm",children:d.label}),e.deprecated&&(0,a.jsx)(c.Ex,{variant:"warning",size:"sm",children:"deprecated"})]}),(0,a.jsxs)("p",{className:"mt-1 text-sm text-text-muted",children:[t," connection",1===t?"":"s",e.serviceKinds.length>1&&(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",e.serviceKinds.join(" \xb7 ")]})]})]})]}),x.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 sm:justify-end",children:x.map(e=>(0,a.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded-full border border-border bg-bg/60 px-2.5 py-1 text-xs text-text-main hover:border-primary hover:text-primary transition-colors backdrop-blur",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:e.icon}),e.label]},e.label))})]}),e.notices.body&&!e.deprecated&&(0,a.jsx)("p",{className:"mt-4 max-w-3xl text-sm leading-relaxed text-text-muted",children:e.notices.body})]}),e.deprecated&&e.notices.warning&&(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-3 py-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-yellow-500",children:"warning"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-red-600 dark:text-yellow-400",children:e.notices.warning})]})]})}O.propTypes={capabilities:b().object,connectionCount:b().number,headerIconPath:b().string};let E={oauth:{icon:"lock",label:"Sign in with OAuth",tabLabel:"OAuth"},apikey:{icon:"key",label:"Add API key",tabLabel:"API key"},free:{icon:"bolt",label:"Connect for free",tabLabel:"Free"},cookie:{icon:"cookie",label:"Paste session cookie",tabLabel:"Cookie"},compatible:{icon:"developer_board",label:"Configure endpoint",tabLabel:"Compatible"}};function R({children:e,accentColor:t}){return(0,a.jsx)("div",{className:"rounded-xl border p-5 sm:p-6",style:{borderColor:t?`${t}25`:void 0,background:t?`linear-gradient(160deg, ${t}08, transparent 70%)`:void 0},children:e})}let D={oauth:function({capabilities:e,onOAuth:t,onBulkImport:s}){return(0,a.jsx)(R,{accentColor:e.color,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("h3",{className:"text-base font-semibold",children:["Sign in with ",e.name]}),(0,a.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:"One click. We handle the OAuth callback and store your session locally. You can add multiple accounts."})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 sm:flex-nowrap",children:[e.features.bulkImport&&s&&(0,a.jsx)(c.$n,{size:"md",icon:"playlist_add",variant:"secondary",onClick:s,children:"Bulk import"}),(0,a.jsxs)(c.$n,{size:"md",icon:"lock",onClick:t,children:["Sign in with ",e.name]})]})]})})},apikey:function({capabilities:e,onApiKey:t}){return(0,a.jsx)(R,{accentColor:e.color,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("h3",{className:"text-base font-semibold",children:["Paste your ",e.name," API key"]}),(0,a.jsxs)("p",{className:"mt-0.5 text-sm text-text-muted",children:[e.links.apiKey?(0,a.jsxs)(a.Fragment,{children:["Grab a key from"," ",(0,a.jsx)("a",{href:e.links.apiKey,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline decoration-primary/40 underline-offset-4 hover:decoration-primary",children:new URL(e.links.apiKey).hostname})," ","and paste it in."]}):(0,a.jsx)(a.Fragment,{children:"Paste your API key to connect."})," ","Stored locally, never sent anywhere except ",e.name,"."]})]}),(0,a.jsx)(c.$n,{size:"md",icon:"key",onClick:t,children:"Add API key"})]})})},free:function({capabilities:e,onFree:t}){return(0,a.jsx)(R,{accentColor:e.color||"#10B981",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-green-500",children:"bolt"}),(0,a.jsxs)("h3",{className:"text-base font-semibold",children:[e.name," is free — one click to connect"]})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No key, no signup, no card. Just click connect and start using it."})]}),(0,a.jsx)(c.$n,{size:"md",icon:"add",onClick:t,children:"Connect"})]})})},cookie:function({capabilities:e,onCookie:t}){let[s,l]=(0,i.useState)(!1);return(0,a.jsx)(R,{accentColor:e.color||"#F59E0B",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold",children:"Advanced: connect with session cookie"}),(0,a.jsxs)("p",{className:"mt-0.5 text-sm text-text-muted",children:["For power users. Extract the ",e.name," cookie from your browser and paste it here."]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>!e),className:"text-xs text-text-muted hover:text-primary",children:s?"hide":"show"})]}),s&&(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg/70 p-3",children:[(0,a.jsxs)("ol",{className:"mb-3 list-decimal space-y-1 pl-4 text-xs text-text-muted",children:[(0,a.jsxs)("li",{children:["Open ",e.name," in your browser and sign in."]}),(0,a.jsx)("li",{children:"Open DevTools → Application → Cookies."}),(0,a.jsx)("li",{children:"Copy the session cookie value."}),(0,a.jsx)("li",{children:"Paste it in the modal."})]}),(0,a.jsx)(c.$n,{size:"sm",icon:"cookie",onClick:t,children:"Paste cookie"})]})]})})},compatible:function({capabilities:e,onCompatible:t}){return(0,a.jsx)(R,{accentColor:e.color,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold",children:"Use as OpenAI-compatible endpoint"}),(0,a.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:"Point at any OpenAI-shaped base URL (self-hosted, LiteLLM, custom proxy). Fetches the live model list after you connect."})]}),(0,a.jsx)(c.$n,{size:"md",icon:"developer_board",onClick:t,children:"Configure endpoint"})]})})}};function _({capabilities:e,onOAuth:t,onApiKey:s,onFree:l,onCookie:r,onCompatible:n,onBulkImport:o}){let c=e?.authModes||[],[d,m]=(0,i.useState)(c[0]||"apikey");if(!e||0===c.length)return null;let p=D[d]||D.apikey,x=c.length>1;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[x&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1 rounded-lg border border-border bg-sidebar/40 p-1",children:c.map(e=>{let t=E[e]||{icon:"add",tabLabel:e},s=e===d;return(0,a.jsxs)("button",{type:"button",onClick:()=>m(e),className:`inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${s?"bg-bg text-text-main shadow-sm":"text-text-muted hover:text-text-main"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:t.icon}),t.tabLabel]},e)})}),(0,a.jsx)(p,{capabilities:e,onOAuth:t,onApiKey:s,onFree:l,onCookie:r,onCompatible:n,onBulkImport:o})]})}function z({providerId:e,models:t=[]}){let[s,l]=(0,i.useState)(""),[r,n]=(0,i.useState)({status:"idle"}),o=(0,i.useCallback)(async()=>{if(e){n(e=>({...e,status:"ok"===e.status?"refreshing":"loading"}));try{let t=new URLSearchParams({providerId:e});s&&t.set("model",s);let a=await fetch(`/api/providers/zenith?${t.toString()}`,{cache:"no-store"}),i=await a.json();i.success?n({status:"ok",winner:i.winner,count:i.count,leaderboard:i.leaderboard}):n({status:"error",error:i.error||"Zenith read failed"})}catch(e){n({status:"error",error:e?.message||"Network error"})}}},[e,s]);if((0,i.useEffect)(()=>{o();let e=setInterval(o,1e4);return()=>clearInterval(e)},[o]),"idle"===r.status||"loading"===r.status||"error"===r.status||!r.winner||(r.count??0)<2)return null;let c=r.winner;return(0,a.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-2 rounded-lg border border-primary/20 bg-primary/[0.04] px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-primary font-medium",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"route"}),"Next request →"]}),(0,a.jsx)("span",{className:"font-medium text-text-main",children:c.name}),(0,a.jsxs)("span",{className:"rounded-md border border-primary/30 bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:["Z:",c.finalScore]}),(0,a.jsxs)("span",{className:"text-text-muted",children:["health ",c.healthScore," \xb7 quota \xd7",c.quotaFactor," \xb7 priority +",c.priorityBonus]}),t.length>0&&(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Model:"}),(0,a.jsxs)("select",{value:s,onChange:e=>l(e.target.value),className:"rounded-md border border-border bg-bg px-1.5 py-0.5 text-[11px] focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"(any)"}),t.map(e=>(0,a.jsx)("option",{value:e.id,children:e.id},e.id))]})]})]})}function U({providerId:e}){let[t,s]=(0,i.useState)(!1),[l,r]=(0,i.useState)([]),[n,o]=(0,i.useState)(!1),c=(0,i.useCallback)(async()=>{if(e){o(!0);try{let t=await fetch(`/api/providers/zenith/log?providerId=${e}&limit=50`,{cache:"no-store"}),s=await t.json();s.success&&r(s.entries||[])}catch{}finally{o(!1)}}},[e]);return(0,i.useEffect)(()=>{if(!t)return;c();let e=setInterval(c,5e3);return()=>clearInterval(e)},[t,c]),(0,a.jsxs)("div",{className:"mt-4 rounded-lg border border-border",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>s(e=>!e),className:"flex w-full items-center justify-between px-3 py-2 text-xs text-text-muted hover:text-text-main",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"history"}),"Routing decisions",l.length>0&&(0,a.jsxs)("span",{className:"text-text-muted",children:["(",l.length,")"]})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:t?"expand_less":"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"max-h-64 overflow-y-auto border-t border-border/50 px-3 py-2",children:[n&&0===l.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Loading…"}),!n&&0===l.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No decisions recorded yet. Fire a request through kRouter to populate."}),(0,a.jsx)("ul",{className:"space-y-1",children:l.map((e,t)=>(0,a.jsxs)("li",{className:"flex flex-wrap items-center gap-2 border-b border-border/30 py-1 text-[11px] font-mono last:border-0",children:[(0,a.jsx)("span",{className:"text-text-muted",children:function(e){let t=Math.floor((Date.now()-e)/1e3);if(t<5)return"just now";if(t<60)return`${t}s ago`;let s=Math.floor(t/60);return s<60?`${s}m ago`:`${Math.floor(s/60)}h ago`}(e.at)}),e.model&&(0,a.jsx)("span",{className:"text-text-main",children:e.model}),(0,a.jsx)("span",{className:"text-text-muted",children:"→"}),(0,a.jsx)("span",{className:"text-text-main",children:e.connectionId.slice(0,8)}),null!=e.score&&(0,a.jsxs)("span",{className:"text-primary",children:["Z:",e.score]}),null!=e.latencyMs&&(0,a.jsxs)("span",{className:"text-text-muted",children:[e.latencyMs,"ms"]}),(0,a.jsx)("span",{className:e.success?"text-green-500":"text-red-500",children:e.success?"✓":"✗"})]},`${e.at}-${t}`))})]})]})}function M(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[h,g]=(0,i.useState)([]),[b,y]=(0,i.useState)(!0),[j,w]=(0,i.useState)(null),[C,T]=(0,i.useState)([]),[I,E]=(0,i.useState)(!1),[R,D]=(0,i.useState)(!1),[M,q]=(0,i.useState)(!1),[K,L]=(0,i.useState)(""),[F,J]=(0,i.useState)(!1),[B,W]=(0,i.useState)(!1),[H,V]=(0,i.useState)(!1),[G,Q]=(0,i.useState)(!1),[Z,Y]=(0,i.useState)(null),[X,ee]=(0,i.useState)({}),[et,es]=(0,i.useState)(!1),[ea,ei]=(0,i.useState)({}),[el,er]=(0,i.useState)(""),[en,eo]=(0,i.useState)(new Set),[ec,ed]=(0,i.useState)(!1),[em,ep]=(0,i.useState)(!1),[ex,eu]=(0,i.useState)([]),[eh,ef]=(0,i.useState)("__none__"),[eg,eb]=(0,i.useState)(!1),[ey,ev]=(0,i.useState)(null),[ej,eN]=(0,i.useState)(""),[ew,ek]=(0,i.useState)("auto"),[eC,eS]=(0,i.useState)({enabled:!1,connections:{}}),[eA,e$]=(0,i.useState)([]),[eT,eP]=(0,i.useState)([]),[eI,eO]=(0,i.useState)(!1),[eE,eR]=(0,i.useState)(""),[eD,e_]=(0,i.useState)(new Set),[ez,eU]=(0,i.useState)([]),[eM,eq]=(0,i.useState)([]),[eK,eL]=(0,i.useState)(null),[eF,eJ]=(0,i.useState)(!1),[eB,eW]=(0,i.useState)(!1),[eH,eV]=(0,i.useState)(!1),[eG,eQ]=(0,i.useState)(null),[eZ,eY]=(0,i.useState)({}),[eX,e0]=(0,i.useState)(null),e1=(0,i.useRef)(!1),[e5,e2]=(0,i.useState)(!1),{copied:e4,copy:e3}=(0,x.C)(),e6="ag_risk_confirmed",e7=()=>{E(!0)},e8=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(e6)?eJ(!0):tr?e7():(L(""),q(!0))},e9=()=>{L(""),q(!0)},te=()=>{tr?e8():e9()},tt=j?{id:j.id,name:j.name||("anthropic-compatible"===j.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===j.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===j.type?"AC":"OC",apiType:j.apiType,baseUrl:j.baseUrl,type:j.type}:d.zN[r]||d.fg[r]||d.IS[r]||d.nJ[r]||d.br[r],ts=j?null:function(e){let t=d.zN[e]?d.zN:d.fg[e]?d.fg:d.IS[e]?d.IS:d.nJ[e]?d.nJ:d.br[e]?d.br:null;if(!t)return null;let s=t[e],a=t===d.IS&&s?.noAuth?"free":t===d.IS||t===d.zN?"oauth":t===d.br?"cookie":t===d.fg&&s?.noAuth?"free":(t===d.fg||d.nJ,"apikey"),i=Array.isArray(s.authModes)?s.authModes.filter(e=>e!==a):[],l=[a,...i],r=(0,d.mq)(e)||(0,d.gb)(e);r&&!l.includes("compatible")&&l.push("compatible");let n=s.notice||{};return{id:e,name:s.name||e,icon:s.icon,image:s.image,textIcon:s.textIcon,color:s.color,tier:t===d.IS?"free":t===d.nJ?"freetier":t===d.zN?"oauth":t===d.br?"webcookie":s?.noAuth?"free":"paid",authModes:l,links:{homepage:s.website,apiKey:n.apiKeyUrl,signup:n.signupUrl,pricing:s.searchViaChat?.pricingUrl,docs:s.docsUrl},features:{autoPing:"claude"===e&&"oauth"===a,bulkImport:"codex"===e,compatibleModels:r,customModels:!s.passthroughModels,passthroughModels:!!s.passthroughModels,hasRegions:Array.isArray(s.regions)&&s.regions.length>0,hasProviderSpecificData:!!s.hasProviderSpecificData},serviceKinds:s.serviceKinds||["llm"],thinking:s.thinkingConfig||null,notices:{body:n.text,warning:s.deprecationNotice},deprecated:!!s.deprecated,regions:s.regions,defaultRegion:s.defaultRegion,noAuth:!!s.noAuth,_raw:s}}(r),ta="codex"===r?"codexAutoPing":"claudeAutoPing",ti="claude"===r||"codex"===r,tl=tt?.authModes||[],tr=!!d.zN[r]||!!d.IS[r]||tl.includes("oauth"),tn=!!d.fg[r]||tl.includes("apikey"),to=!!d.IS[r]?.noAuth,tc=(0,m.KC)(r),td=(0,d.wG)(r),tm=(0,d.mq)(r),tp=(0,d.gb)(r),tx=tm||tp,tu=!tx&&tr&&tn,th="xai"===r?"Grok Build OAuth":"OAuth",tf="xai"===r?"xAI API Key":"API Key";d.Q2[r]?.thinkingConfig||d.s9.extended;let tg=tx?r:td,tb=tx?j?.prefix||r:td,ty=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tg)}`,{cache:"no-store"}),t=await e.json();e.ok&&eq(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tg]),tv=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tg,ids:[e]})})).ok&&await ty()}catch(e){console.log("Error disabling model:",e)}},tj=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tg)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ty()}catch(e){console.log("Error enabling model:",e)}},tN="opencode-go"===r,[tw,tk]=(0,i.useState)({}),[tC,tS]=(0,i.useState)(new Set),tA=async(e,t)=>{let s=s=>Object.fromEntries(Object.entries({...s,[e]:t}).filter(([,e])=>e&&"auto"!==e));tk(e=>s(e)),tS(t=>new Set([...t,e]));try{let e=await fetch("/api/settings",{cache:"no-store"});if(!e.ok)throw Error(`HTTP ${e.status}`);let t=(await e.json()).providerModelTransports||{},a={...t,[r]:s(t[r]||{})},i=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerModelTransports:a})});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e.error||`HTTP ${i.status}`)}let l=await i.json().catch(()=>null);tk(l?.providerModelTransports?.[r]||a[r])}catch(e){tk(tw),alert((0,u.Tl)("Failed to save protocol")+": "+e.message)}finally{tS(t=>new Set([...t].filter(t=>t!==e)))}},t$=e=>tN&&h.length>0?{protocol:tw[e],defaultProtocol:(0,p.vV)(r,e),onProtocolChange:t=>tA(e,t),isSavingProtocol:tC.has(e)}:{},tT=async e=>{e.length&&eL({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eL(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tg,ids:e})})).ok&&await ty()}catch(e){console.log("Error disabling all models:",e)}}})},tP=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tg)}`,{method:"DELETE"})).ok&&await ty()}catch(e){console.log("Error enabling all models:",e)}},tI=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ee(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eU(e.models)}).catch(()=>{})},[r]);let tO=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),n=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);g(e)}s.ok&&T(n.proxyPools||[]);let c=(o.providerStrategies||{})[r]||{};ev(c.fallbackStrategy||null),eN(null!=c.stickyRoundRobinLimit?String(c.stickyRoundRobinLimit):"1"),tk((o.providerModelTransports||{})[r]||{});let d=(o.providerThinking||{})[r]||{};ek(d.mode||"auto");let m=o[ta]||{};if(eS({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&tx)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}w(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,tx]),tE=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(w(s.node),await tO(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tR=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tD=async(e,t)=>{eS({...eC,connections:{...eC.connections,[e]:t}});try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{})[ta]||{},i={...a,connections:{...a.connections||{},[e]:t}};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[ta]:i})}),eS({enabled:!0===i.enabled,connections:i.connections})}catch(e){console.log("Error saving auto-ping config:",e),eS(eC)}};(0,i.useEffect)(()=>{tO(),tI(),ty()},[tO,tI,ty]);let[t_,tz]=(0,i.useState)({});(0,i.useEffect)(()=>{let e=!1,t=async()=>{try{let t=await fetch("/api/providers/health",{cache:"no-store"});if(!t.ok)return;let s=await t.json();!e&&s?.success&&s.snapshot&&tz(s.snapshot)}catch{}};t();let s=setInterval(t,1e4);return()=>{e=!0,clearInterval(s)}},[]),(0,i.useEffect)(()=>{let e=(d.zN[r]||d.fg[r]||d.IS[r]||d.nJ[r])?.modelsFetcher;e&&f(e).then(e$)},[r]);let tU=(0,i.useCallback)(async()=>{if(0===h.length)return;let e=h.find(e=>!1!==e.isActive)||h[0];if(e){eO(!0);try{let t=null;try{let s=await fetch(`/api/models/live-by-connection?connectionId=${e.id}`),a=s.ok?await s.json():null;a?.success&&a?.models?.length?t={models:a.models}:a?.code==="no_fetcher"&&(t=null)}catch{}if(!t){let s=await fetch(`/api/providers/${e.id}/models`);t=s.ok?await s.json():null}t?.models?.length&&(eP(t.models),e_(e=>{if(e.size>0)return e;let s=t.models[0]?.id||"",a=s.includes("/")?s.split("/")[0]:"other";return new Set([a])}))}catch{}finally{eO(!1)}}},[r,h]);(0,i.useEffect)(()=>{tU()},[tU]);let tM=async(e,t,s=td)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tI();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tq=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tI()}catch(e){console.log("Error deleting alias:",e)}},tK=async()=>{if(e5)return;let e=h.find(e=>!1!==e.isActive);if(!e)return void alert((0,u.Tl)("Please add an active Qoder connection first"));e2(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,u.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,u.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,""),a=`${tg}/${s}`;!Object.values(X).includes(a)&&(X[s]||(await tM(s,s,tg),i+=1))}0===i?alert((0,u.Tl)("All models already exist, no new models added")):alert((0,u.Tl)("Successfully added")+` ${i} `+(0,u.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,u.Tl)("Error fetching models")+": "+e.message)}finally{e2(!1)}},tL=async()=>{if(eB||0===h.length)return;let e=Object.fromEntries(h.map(e=>[e.id,{state:"queued",error:null}]));e1.current=!1,eW(!0),eV(!1),eQ(null),eY(e),e0({total:h.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<h.length;e+=1){if(e1.current){e0({total:h.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=h[e];eQ(a.id),eY(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eY(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eY(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}e0({total:h.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<h.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eQ(null),eW(!1),eV(!1),e1.current=!1}},tF=async e=>{eL({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eL(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&g(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tJ=()=>{tO(),E(!1)},tB=async e=>{L("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tO(),q(!1);return}L(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),L("Failed to save connection")}},tW=async e=>{try{(await fetch(`/api/providers/${Z.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tO(),W(!1))}catch(e){console.log("Error updating connection:",e)}},tH=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&g(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tV=async(e,t)=>{let s=[...h];[s[e],s[t]]=[s[t],s[e]],g(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tO()}},tG=h.filter(e=>ex.includes(e.id));h.length>0&&(ex.length,h.length),(0,i.useEffect)(()=>{eu(e=>e.filter(e=>h.some(t=>t.id===e)))},[h]),(()=>{if(0===tG.length)return;let e=new Set(tG.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=C.find(e=>e.id===t);return s?.name}})();let tQ=()=>{eg||Q(!1)},tZ=async e=>{eb(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tO(),Q(!1)}finally{eb(!1)}},tY=e=>tZ(h.map(t=>({connectionId:t.id,proxyPoolId:e}))),tX=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:h.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(k,{connection:e,proxyPools:C,health:t_[e.id],isOAuth:tr,isFirst:0===t,isLast:t===h.length-1,onMoveUp:()=>tV(t,t-1),onMoveDown:()=>tV(t,t+1),onToggleActive:t=>tH(e.id,t),autoPing:ti&&"oauth"===e.authType?{on:!0===eC.connections[e.id],onToggle:t=>tD(e.id,t)}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&g(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{Y(e),W(!0)},onDelete:()=>tF(e.id),oneByOneStatus:eZ[e.id]||null})})},e.id))}),t0=C.filter(e=>!0===e.isActive),t1=(0,a.jsx)(c.aF,{isOpen:G,onClose:tQ,title:`Apply Proxy (${h.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=C.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tZ(h.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eg||0===t0.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tY(null),disabled:eg,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),C.map(e=>(0,a.jsxs)("button",{onClick:()=>tY(e.id),disabled:eg||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eg&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(c.$n,{onClick:tQ,variant:"ghost",fullWidth:!0,disabled:eg,children:"Cancel"})]})}),t5=async e=>{if(!en.has(e)){eo(t=>new Set([...t,e]));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tg}/${e}`})}),s=await t.json();ei(t=>({...t,[e]:s.ok?"ok":"error"})),s.ok||er(s.error||"Model not reachable")}catch{ei(t=>({...t,[e]:"error"}))}finally{eo(t=>{let s=new Set(t);return s.delete(e),s})}}},t2=async e=>{if(ec)return;ed(!0);let t=[];try{for(let s=0;s<e.length;s+=5){let a=e.slice(s,s+5);await Promise.all(a.map(async e=>{eo(t=>new Set([...t,e.id]));try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tg}/${e.id}`})}),a=await s.json(),i=a.ok?"ok":"error";ei(t=>({...t,[e.id]:i})),a.ok&&t.push(e)}catch{ei(t=>({...t,[e.id]:"error"}))}finally{eo(t=>{let s=new Set(t);return s.delete(e.id),s})}}))}for(let e of t)await tM(e.id,e.id,tg);t.length>0&&document.getElementById("available-models-section")?.scrollIntoView({behavior:"smooth"})}finally{ed(!1)}};if(b)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(c.Qv,{}),(0,a.jsx)(c.Qv,{})]});if(!tt)return(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let t4=()=>tm&&tt.apiType?"responses"===tt.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tp?"/providers/anthropic-m.png":`/providers/${tt.id}.png`;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[ts?(0,a.jsx)(O,{capabilities:ts,connectionCount:h.length,headerIconPath:et?null:t4()}):(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tt.color}15`},children:et?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:tt.color},children:tt.textIcon||tt.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:t4(),alt:tt.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>es(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tt.name}),(0,a.jsxs)("p",{className:"text-text-muted",children:[h.length," connection",1===h.length?"":"s"]})]})]})]}),tx&&j&&(0,a.jsx)(c.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tp?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tp?"Messages API":"responses"===j.apiType?"Responses API":"Chat Completions"," \xb7 ",(j.baseUrl||"").replace(/\/$/,""),"/",tp?"messages":"responses"===j.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{L(""),q(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eL({title:"Delete Compatible Node",message:`Delete this ${tp?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eL(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),to?(0,a.jsx)(c.gw,{providerId:r}):(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[h.length>0&&C.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>Q(!0),children:"Apply Proxy"}),ex.length>0&&(0,a.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ex.length;0!==e&&eL({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eL(null);let e=0,t=[...ex],s=[];for(let a of t)try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok?s.push(a):e+=1}catch(t){console.log("Error deleting connection:",t),e+=1}g(e=>e.filter(e=>!s.includes(e.id))),eu(t.filter(e=>!s.includes(e))),e>0&&alert(`Deleted ${s.length} connection(s), ${e} failed and are still selected.`)}})},children:["Delete Selected (",ex.length,")"]}),h.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tL,disabled:eB,children:eB?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eB&&(0,a.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eB&&(e1.current=!0,eV(!0))},disabled:eH,children:eH?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(c.lM,{checked:"round-robin"===ey,onChange:e=>{let t=e?"round-robin":null,s=e?ej||"1":ej;e&&!ej&&eN("1"),ev(t),tR(t,s)}}),"round-robin"===ey&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:ej,onChange:e=>{var t;eN(t=e.target.value),tR("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===h.length?ts?(0,a.jsx)(_,{capabilities:ts,onOAuth:e8,onApiKey:e9,onFree:te,onCookie:()=>D(!0),onCompatible:e9,onBulkImport:()=>J(!0)}):(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"key"})}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"})]}),(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:te,children:"Add API Key"})]}):(0,a.jsxs)(a.Fragment,{children:[eX&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eX.total]}),(0,a.jsxs)("span",{children:["Completed: ",eX.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eX.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eX.failed]}),eX.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eB&&eG&&(0,a.jsxs)("span",{children:["Running: ",h.find(e=>e.id===eG)?.name||eG]})]})}),!tx&&ts&&(0,a.jsx)(z,{providerId:r,models:eT}),tX,!tx&&ts&&(0,a.jsx)(U,{providerId:r}),!tx&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>D(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),title:(0,u.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,u.Tl)("Bulk Add")}),tu?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e8,className:"w-full sm:w-auto",children:th}),(0,a.jsx)(c.$n,{size:"sm",icon:"key",onClick:e9,className:"w-full sm:w-auto",children:tf})]}):(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:te,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(c.Zp,{id:"available-models-section",children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!tx&&(e=[...tc,...ez.filter(e=>!tc.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eM.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eM.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tP,children:"Active All"}),e.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tT(e),children:"Disable All"})]}))]}),!!el&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:el}),(()=>{if(tx)return(0,a.jsx)(N,{providerStorageAlias:tg,providerDisplayAlias:tb,modelAliases:X,copied:e4,onCopy:e3,onSetAlias:tM,onDeleteAlias:tq,connections:h,isAnthropic:tp});let e=[...tc,...ez.filter(e=>!tc.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),t=new Set(eM),s=e.filter(e=>!t.has(e.id)),i=e.filter(e=>t.has(e.id)),l=Object.entries(X).filter(([e,t])=>{let s=`${tg}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return tt.passthroughModels?!tc.some(e=>e.id===a):!tc.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${tg}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[l.map(e=>(0,a.jsx)(v,{model:{id:e.id},fullModel:`${tb}/${e.id}`,alias:e.alias,copied:e4,onCopy:e3,onSetAlias:()=>{},onDeleteAlias:()=>tq(e.alias),testStatus:ea[e.id],onTest:h.length>0||to?()=>t5(e.id):void 0,isTesting:en.has(e.id),isCustom:!0,isFree:!1,...t$(e.id)},e.id)),s.map(e=>{let t=`${tg}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(X).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${tb}/${e.id}`,alias:i,copied:e4,onCopy:e3,onSetAlias:t=>tM(e.id,t,tg),onDeleteAlias:()=>tq(i),testStatus:ea[e.id],onTest:h.length>0||to?()=>t5(e.id):void 0,isTesting:en.has(e.id),isFree:e.isFree,onDisable:()=>tv(e.id),...t$(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>ep(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&h.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tK,disabled:e5,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:e5?{animation:"spin 1s linear infinite"}:void 0,children:e5?"progress_activity":"download"}),e5?(0,u.Tl)("Fetching..."):(0,u.Tl)("Fetch Qoder Models")]}),(()=>{let e=new Set([...s.map(e=>e.id),...l.map(e=>e.id)]),t=eT.length>0?eT:eA,r=eT.length>0,n=t.filter(t=>t.id&&!e.has(t.id)),o=new Set(eT.map(e=>e.id).filter(Boolean)),c=i.filter(e=>e.id&&!o.has(e.id)).map(e=>({...e,dropped:!0})),d=new Set(c.map(e=>e.id)),m=[...n.filter(e=>!d.has(e.id)),...c];if(!eI&&0===m.length&&0===t.length)return null;let p=eE.trim().toLowerCase(),x=p?m.filter(e=>e.id.toLowerCase().includes(p)||e.name&&e.name.toLowerCase().includes(p)):m,u={};x.forEach(e=>{if(!e.id)return;let t=e.id.includes("/")?e.id.split("/")[0]:"models";u[t]||(u[t]=[]),u[t].push(e)});let h=Object.entries(u).sort((e,t)=>t[1].length-e[1].length),f=x.filter(e=>!e.dropped).slice(0,50);return(0,a.jsxs)("div",{className:"w-full mt-4 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted shrink-0",children:eI?"Loading...":`${r?"From API":"Suggested"} (${n.length})${c.length>0?` \xb7 ${c.length} dropped`:""}`}),(0,a.jsxs)("div",{className:"relative flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-[13px] text-text-muted pointer-events-none select-none",children:"search"}),(0,a.jsx)("input",{type:"text",value:eE,onChange:e=>eR(e.target.value),placeholder:"Search models...",className:"w-full h-7 pl-7 pr-7 text-xs rounded-lg bg-bg border border-border-subtle text-text-main placeholder:text-text-muted focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 transition-colors"}),eE&&(0,a.jsx)("button",{onClick:()=>eR(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-muted transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),(0,a.jsx)("button",{onClick:tU,disabled:eI,title:"Refresh",className:"shrink-0 h-7 w-7 flex items-center justify-center rounded-lg border border-border-subtle text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors disabled:opacity-40",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${eI?"animate-spin":""}`,children:"refresh"})}),!eI&&f.length>0&&(0,a.jsxs)("button",{onClick:()=>t2(f),disabled:ec,title:`Test up to ${f.length} models and auto-add passing ones`,className:"shrink-0 h-7 flex items-center gap-1 px-2.5 rounded-lg border border-border-subtle text-xs text-text-muted hover:text-green-600 hover:border-green-500/40 hover:bg-green-500/5 transition-colors disabled:opacity-40",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[13px] ${ec?"animate-spin":""}`,children:ec?"progress_activity":"play_circle"}),ec?"Testing...":"Test All"]})]}),p&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[x.length," result",1!==x.length?"s":""]}),eI?(0,a.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] animate-spin",children:"progress_activity"}),"Fetching models from provider API..."]}):0===h.length?p?(0,a.jsxs)("p",{className:"text-xs text-text-muted py-2",children:['No models match "',eE,'"']}):null:(0,a.jsx)("div",{className:"space-y-1",children:h.map(([e,t])=>{let s=eD.has(e),i=t.filter(e=>!e.dropped&&"ok"===ea[e.id]).length,l=t.filter(e=>!e.dropped&&"error"===ea[e.id]).length,r=t.filter(e=>e.dropped).length;return(0,a.jsxs)("div",{className:"rounded-xl border border-border-subtle overflow-hidden",children:[(0,a.jsxs)("button",{onClick:()=>e_(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),className:"w-full flex items-center gap-2 px-3 py-2 text-xs bg-bg hover:bg-surface-2/60 transition-colors text-left",children:[(0,a.jsx)("span",{className:"font-semibold text-text-main flex-1",children:e}),i>0&&(0,a.jsxs)("span",{className:"text-green-600 dark:text-green-400 font-medium",children:[i," ✓"]}),l>0&&(0,a.jsxs)("span",{className:"text-red-500 font-medium",children:[l," ✗"]}),r>0&&(0,a.jsxs)("span",{className:"px-1.5 py-0.5 rounded-md bg-amber-500/10 text-amber-600 dark:text-amber-400 text-[10px] font-medium",children:[r," dropped"]}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded-md bg-black/[0.06] dark:bg-white/[0.06] text-text-muted tabular-nums font-medium",children:t.length}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] text-text-muted",children:s?"expand_less":"expand_more"})]}),s&&(0,a.jsx)("div",{className:"px-3 pt-2 pb-3 flex flex-wrap gap-1.5 border-t border-border-subtle bg-surface/50",children:t.map(e=>{let t=e.id.includes("/")?e.id.split("/").slice(1).join("/"):e.id,s=ea[e.id],i=en.has(e.id);return e.dropped?(0,a.jsxs)("button",{onClick:async()=>{await tj(e.id),document.getElementById("available-models-section")?.scrollIntoView({behavior:"smooth"})},title:`Recently Dropped — click to restore: ${e.id}`,className:"group flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-amber-400/40 bg-amber-500/5 text-amber-700 dark:text-amber-400 text-xs hover:bg-amber-500/10 hover:border-amber-400/60 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"history"}),(0,a.jsx)("span",{children:t}),e.contextLength>0&&(0,a.jsxs)("span",{className:"opacity-50 text-[10px] ml-0.5",children:[(e.contextLength/1e3).toFixed(0),"k"]})]},e.id):(0,a.jsxs)("button",{onClick:async()=>{await tM(e.id,e.id,tg),document.getElementById("available-models-section")?.scrollIntoView({behavior:"smooth"})},title:`Add: ${e.name||e.id}`,className:["group flex items-center gap-1 px-2.5 py-1.5 rounded-lg border text-xs transition-colors","ok"===s?"border-green-500/30 bg-green-500/5 text-green-700 dark:text-green-400 hover:bg-green-500/10":"error"===s?"border-red-400/30 bg-red-500/5 text-red-600 dark:text-red-400 hover:bg-red-500/10":"border-border-subtle text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5"].join(" "),children:[i?(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] animate-spin",children:"progress_activity"}):"ok"===s?(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"check"}):"error"===s?(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"}):(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-50 group-hover:opacity-100",children:"add"}),(0,a.jsx)("span",{children:t}),e.contextLength>0&&(0,a.jsxs)("span",{className:"opacity-40 text-[10px] ml-0.5",children:[(e.contextLength/1e3).toFixed(0),"k"]})]},e.id)})})]},e)})})]})})()]})})()]}),t1,"kiro"===r?(0,a.jsx)(c.Mh,{isOpen:I,providerInfo:tt,onSuccess:tJ,onClose:()=>E(!1)}):"cursor"===r?(0,a.jsx)(c.G9,{isOpen:I,onSuccess:tJ,onClose:()=>E(!1)}):"gitlab"===r?(0,a.jsx)(c.vj,{isOpen:I,providerInfo:tt,onSuccess:tJ,onClose:()=>E(!1)}):(0,a.jsx)(c.LF,{isOpen:I,provider:r,providerInfo:tt,onSuccess:tJ,onClose:()=>E(!1)}),"iflow"===r&&(0,a.jsx)(c.vE,{isOpen:R,onSuccess:()=>{tO(),D(!1)},onClose:()=>D(!1)}),(0,a.jsx)(S,{isOpen:M,provider:r,providerName:tt.name,isCompatible:tx,isAnthropic:tp,authType:tt?.authType,authHint:tt?.authHint,website:tt?.website,proxyPools:C,error:K,existingNames:h.map(e=>e.name).filter(Boolean),onSave:tB,onBulkDone:tO,onClose:()=>{L(""),q(!1)}}),(0,a.jsx)(c.wI,{isOpen:B,connection:Z,proxyPools:C,onSave:tW,onClose:()=>W(!1)}),tx&&(0,a.jsx)(A,{isOpen:H,node:j,onSave:tE,onClose:()=>V(!1),isAnthropic:tp}),!tx&&(0,a.jsx)($,{isOpen:em,providerAlias:tg,providerDisplayAlias:tb,onSave:async e=>{let t=tt?.passthroughModels?e.split("/").pop():e;await tM(e,t,tg),ep(!1)},onClose:()=>ep(!1)}),"codex"===r&&(0,a.jsx)(P,{isOpen:F,onClose:()=>J(!1),onSuccess:tO}),(0,a.jsx)(c.uo,{isOpen:eF,onClose:()=>eJ(!1),onConfirm:()=>{(window.localStorage.setItem(e6,"true"),eJ(!1),tr)?e7():e9()},title:"Risk Notice",message:tt?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(c.uo,{isOpen:!!eK,onClose:()=>eL(null),onConfirm:eK?.onConfirm,title:eK?.title||"Confirm",message:eK?.message,variant:"danger"})]})}_.propTypes={capabilities:b().object,onOAuth:b().func,onApiKey:b().func,onFree:b().func,onCookie:b().func,onCompatible:b().func,onBulkImport:b().func},z.propTypes={providerId:b().string.isRequired,models:b().array},U.propTypes={providerId:b().string.isRequired}}},e=>{e.O(0,[7504,5772,1321,5497,8441,3794,7358],()=>e(e.s=69449)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-86eed48d5fdb5988.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{36943:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var r=i(95155),s=i(35497),n=i(11059);let a="sifxprime/krouter",o="main",c="skills",d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${c}`,l=`https://github.com/${a}/blob/${o}/${c}`,m=[{id:"krouter",name:"kRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"krouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"krouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"krouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"krouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"krouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"krouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"krouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function x(e){return`${d}/${e}/SKILL.md`}let p=l.replace("/blob/","/tree/");function h({value:e,label:t="Copy link"}){let{copied:i,copy:s}=(0,n.C)(2e3);return(0,r.jsxs)("button",{onClick:()=>s(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=x(e.id);return(0,r.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,r.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,r.jsx)(s.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,r.jsx)(s.Ex,{variant:"default",size:"sm",children:(0,r.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,r.jsxs)("a",{href:(t=e.id,`${l}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,r.jsx)(h,{value:i})]})}function b(){return(0,r.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,r.jsxs)(s.Zp,{padding:"md",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,r.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",x("krouter")]})]}),(0,r.jsx)("div",{className:"space-y-2",children:m.map(e=>(0,r.jsx)(u,{skill:e},e.id))}),(0,r.jsx)(s.Zp,{padding:"md",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,r.jsxs)("a",{href:p,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[7504,1321,5497,8441,3794,7358],()=>e(e.s=36943)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1934:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(12115);let a=e=>{let t,r=new Set,n=(e,n)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=n?n:"object"!=typeof a||null===a)?a:Object.assign({},t,a),r.forEach(r=>r(t,e))}},a=()=>t,o={setState:n,getState:a,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.delete(e))},i=t=e(n,a,o);return o},o=e=>{let t=e?a(e):a,r=e=>(function(e,t=e=>e){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},i=e=>e?o(e):o},5887:()=>{},31692:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>a});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},a=(e,t)=>(r,a,o)=>{let i,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,l=0,c=new Set,m=new Set,f=s.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},a,o);let d=()=>{let e=s.partialize({...a()});return f.setItem(s.name,{state:e,version:s.version})},v=o.setState;o.setState=(e,t)=>(v(e,t),d());let h=e((...e)=>(r(...e),d()),a,o);o.getInitialState=()=>h;let b=()=>{var e,t;if(!f)return;let o=++l;u=!1,c.forEach(e=>{var t;return e(null!=(t=a())?t:h)});let v=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=a())?e:h))||void 0;return n(f.getItem.bind(f))(s.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];else{if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(o!==l)return;let[n,u]=e;if(r(i=s.merge(u,null!=(t=a())?t:h),!0),n)return d()}).then(()=>{o===l&&(null==v||v(a(),void 0),i=a(),u=!0,m.forEach(e=>e(i)))}).catch(e=>{o===l&&(null==v||v(void 0,e))})};return o.persist={setOptions:e=>{s={...s,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>b(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(m.add(e),()=>{m.delete(e)})},s.skipHydration||b(),i||h}},35154:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1934:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(12115);let a=e=>{let t,r=new Set,n=(e,n)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=n?n:"object"!=typeof a||null===a)?a:Object.assign({},t,a),r.forEach(r=>r(t,e))}},a=()=>t,o={setState:n,getState:a,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.delete(e))},i=t=e(n,a,o);return o},o=e=>{let t=e?a(e):a,r=e=>(function(e,t=e=>e){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},i=e=>e?o(e):o},5887:()=>{},31692:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>a});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},a=(e,t)=>(r,a,o)=>{let i,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,l=0,c=new Set,m=new Set,f=s.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},a,o);let d=()=>{let e=s.partialize({...a()});return f.setItem(s.name,{state:e,version:s.version})},v=o.setState;o.setState=(e,t)=>(v(e,t),d());let h=e((...e)=>(r(...e),d()),a,o);o.getInitialState=()=>h;let b=()=>{var e,t;if(!f)return;let o=++l;u=!1,c.forEach(e=>{var t;return e(null!=(t=a())?t:h)});let v=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=a())?e:h))||void 0;return n(f.getItem.bind(f))(s.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];else{if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(o!==l)return;let[n,u]=e;if(r(i=s.merge(u,null!=(t=a())?t:h),!0),n)return d()}).then(()=>{o===l&&(null==v||v(a(),void 0),i=a(),u=!0,m.forEach(e=>e(i)))}).catch(e=>{o===l&&(null==v||v(void 0,e))})};return o.persist={setOptions:e=>{s={...s,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>b(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(m.add(e),()=>{m.delete(e)})},s.skipHydration||b(),i||h}},35154:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_d8ebd1",variable:"__variable_d8ebd1"}},38569:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,35154,23)),Promise.resolve().then(r.t.bind(r,93968,23)),Promise.resolve().then(r.t.bind(r,5887,23)),Promise.resolve().then(r.t.bind(r,51743,23)),Promise.resolve().then(r.bind(r,94635)),Promise.resolve().then(r.bind(r,21110))},51743:()=>{},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},73321:(e,t,r)=>{"use strict";var n=r(74645);r.o(n,"notFound")&&r.d(t,{notFound:function(){return n.notFound}}),r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},93968:e=>{e.exports={style:{fontFamily:"'Space Grotesk', 'Space Grotesk Fallback'",fontStyle:"normal"},className:"__className_5e81af",variable:"__variable_5e81af"}},94635:(e,t,r)=>{"use strict";r.d(t,{RuntimeI18nProvider:()=>s});var n=r(95155),a=r(12115),o=r(73321),i=r(73006);function s({children:e}){let t=(0,o.usePathname)();return(0,a.useEffect)(()=>{(0,i.FE)()},[]),(0,a.useEffect)(()=>{t&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{(0,i.wn)()})})},[t]),(0,n.jsx)(n.Fragment,{children:e})}}},e=>{e.O(0,[3950,3334,1321,8441,3794,7358],()=>e(e.s=38569)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/ba9851c3c22cd980-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/21350d82a1f187e9-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/df0a9ae256c0569c-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/8e9860b6e62d6359-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-
|
|
1
|
+
@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/ba9851c3c22cd980-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/21350d82a1f187e9-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/df0a9ae256c0569c-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/8e9860b6e62d6359-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c4,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Inter Fallback;src:local("Arial");ascent-override:90.44%;descent-override:22.52%;line-gap-override:0.00%;size-adjust:107.12%}.__className_d8ebd1{font-family:Inter,Inter Fallback;font-style:normal}.__variable_d8ebd1{--font-inter:"Inter","Inter Fallback"}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/e1aab0933260df4d-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/b7387a63dd068245-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c4,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/36966cca54120369-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:600;font-display:swap;src:url(/_next/static/media/e1aab0933260df4d-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:600;font-display:swap;src:url(/_next/static/media/b7387a63dd068245-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c4,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:600;font-display:swap;src:url(/_next/static/media/36966cca54120369-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/e1aab0933260df4d-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/b7387a63dd068245-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c4,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/36966cca54120369-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Space Grotesk Fallback;src:local("Arial");ascent-override:89.71%;descent-override:26.62%;line-gap-override:0.00%;size-adjust:109.69%}.__className_5e81af{font-family:Space Grotesk,Space Grotesk Fallback;font-style:normal}.__variable_5e81af{--font-space-grotesk:"Space Grotesk","Space Grotesk Fallback"}@font-face{font-family:Material Symbols Outlined;font-style:normal;font-weight:100 700;font-display:block;src:url(/_next/static/media/material-symbols-outlined.ec1fa111.woff2) format("woff2")}.material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}
|