9router 0.4.80 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +5 -3
- package/app/.next-cli-build/build-manifest.json +6 -6
- package/app/.next-cli-build/react-loadable-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +14 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +30 -30
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +7 -7
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +19 -18
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +19 -18
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +8 -7
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +10 -10
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +3 -3
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -0
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -0
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +23 -22
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +8 -7
- 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 +4 -4
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +8 -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 +22 -21
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +22 -21
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +8 -7
- 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 +24 -23
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +8 -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 +22 -21
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +22 -21
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +8 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.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 +24 -23
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +8 -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 +21 -20
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +21 -20
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +8 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +8 -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 +24 -23
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +8 -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 +24 -23
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +8 -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 +24 -23
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +8 -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/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +22 -21
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +22 -21
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +8 -7
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +8 -7
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +8 -7
- package/app/.next-cli-build/server/app/dashboard/skills.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 +24 -23
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +8 -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 +24 -23
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +24 -23
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +8 -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 +22 -21
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +22 -21
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +8 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +18 -17
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +18 -17
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +8 -7
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +23 -22
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +8 -7
- 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 +4 -4
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +23 -22
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +23 -22
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +8 -7
- 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 +4 -4
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +2 -2
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +5 -3
- package/app/.next-cli-build/server/chunks/1220.js +3 -0
- package/app/.next-cli-build/server/chunks/1241.js +1 -0
- package/app/.next-cli-build/server/chunks/1260.js +1 -0
- package/app/.next-cli-build/server/chunks/1813.js +1 -0
- package/app/.next-cli-build/server/chunks/{9442.js → 1998.js} +1 -1
- package/app/.next-cli-build/server/chunks/2231.js +1 -0
- package/app/.next-cli-build/server/chunks/2391.js +1 -0
- package/app/.next-cli-build/server/chunks/{64.js → 241.js} +1 -1
- package/app/.next-cli-build/server/chunks/{4185.js → 2722.js} +25 -25
- package/app/.next-cli-build/server/chunks/28.js +1 -0
- package/app/.next-cli-build/server/chunks/318.js +170 -0
- package/app/.next-cli-build/server/chunks/3390.js +1 -0
- package/app/.next-cli-build/server/chunks/3535.js +1 -0
- package/app/.next-cli-build/server/chunks/3546.js +1 -0
- package/app/.next-cli-build/server/chunks/3586.js +73 -0
- package/app/.next-cli-build/server/chunks/3593.js +9 -0
- package/app/.next-cli-build/server/chunks/3913.js +64 -0
- package/app/.next-cli-build/server/chunks/4055.js +9 -0
- package/app/.next-cli-build/server/chunks/412.js +7 -0
- package/app/.next-cli-build/server/chunks/4161.js +1 -0
- package/app/.next-cli-build/server/chunks/4306.js +1 -0
- package/app/.next-cli-build/server/chunks/4632.js +1 -0
- package/app/.next-cli-build/server/chunks/{8495.js → 4739.js} +1 -1
- package/app/.next-cli-build/server/chunks/4741.js +18 -0
- package/app/.next-cli-build/server/chunks/4746.js +1 -0
- package/app/.next-cli-build/server/chunks/4780.js +9 -0
- package/app/.next-cli-build/server/chunks/4827.js +1 -0
- package/app/.next-cli-build/server/chunks/4852.js +1 -0
- package/app/.next-cli-build/server/chunks/4884.js +13 -0
- package/app/.next-cli-build/server/chunks/{593.js → 507.js} +2 -2
- package/app/.next-cli-build/server/chunks/5217.js +9 -0
- package/app/.next-cli-build/server/chunks/{3630.js → 5258.js} +1 -1
- package/app/.next-cli-build/server/chunks/5573.js +1 -0
- package/app/.next-cli-build/server/chunks/5615.js +43 -0
- package/app/.next-cli-build/server/chunks/5699.js +1 -0
- package/app/.next-cli-build/server/chunks/595.js +1 -0
- package/app/.next-cli-build/server/chunks/5961.js +1 -0
- package/app/.next-cli-build/server/chunks/6070.js +1 -0
- package/app/.next-cli-build/server/chunks/615.js +1 -0
- package/app/.next-cli-build/server/chunks/6182.js +63 -0
- package/app/.next-cli-build/server/chunks/63.js +45 -0
- package/app/.next-cli-build/server/chunks/6306.js +1 -0
- package/app/.next-cli-build/server/chunks/6445.js +10 -0
- package/app/.next-cli-build/server/chunks/6457.js +4 -0
- package/app/.next-cli-build/server/chunks/6482.js +11 -0
- package/app/.next-cli-build/server/chunks/6763.js +1 -0
- package/app/.next-cli-build/server/chunks/6777.js +1 -0
- package/app/.next-cli-build/server/chunks/{7243.js → 6844.js} +1 -1
- package/app/.next-cli-build/server/chunks/6935.js +1 -0
- package/app/.next-cli-build/server/chunks/6936.js +1 -0
- package/app/.next-cli-build/server/chunks/{1444.js → 698.js} +2 -2
- package/app/.next-cli-build/server/chunks/7774.js +120 -0
- package/app/.next-cli-build/server/chunks/7828.js +1 -0
- package/app/.next-cli-build/server/chunks/{7292.js → 7965.js} +1 -1
- package/app/.next-cli-build/server/chunks/8238.js +1 -0
- package/app/.next-cli-build/server/chunks/8255.js +1 -0
- package/app/.next-cli-build/server/chunks/8271.js +1 -0
- package/app/.next-cli-build/server/chunks/{14.js → 8473.js} +5 -5
- package/app/.next-cli-build/server/chunks/{499.js → 8520.js} +2 -2
- package/app/.next-cli-build/server/chunks/8895.js +56 -0
- package/app/.next-cli-build/server/chunks/8910.js +2 -0
- package/app/.next-cli-build/server/chunks/8920.js +1 -0
- package/app/.next-cli-build/server/chunks/8971.js +1 -0
- package/app/.next-cli-build/server/chunks/{2212.js → 9528.js} +3 -3
- package/app/.next-cli-build/server/chunks/9862.js +3 -0
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +14 -14
- 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/PIwundMcbVdr1upjlwfNo/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/1051-eb9b83e9f5c9533e.js +64 -0
- package/app/.next-cli-build/static/chunks/1321-733bd3a2b6be1050.js +1 -0
- package/app/.next-cli-build/static/chunks/1393-deaa3e3fe5da3c0c.js +3 -0
- package/app/.next-cli-build/static/chunks/1a258343-5938f676ed376386.js +1 -0
- package/app/.next-cli-build/static/chunks/3794-123fdf632563f469.js +32 -0
- package/app/.next-cli-build/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
- package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-ac9b18e2b3f003b0.js +7 -0
- package/app/.next-cli-build/static/chunks/5772-901f1092d831ec37.js +3 -0
- package/app/.next-cli-build/static/chunks/{3771-1805e451aa56e4f8.js → 6069-62b10374f45001c3.js} +26 -26
- package/app/.next-cli-build/static/chunks/705-979ff3eb195b9023.js +1 -0
- package/app/.next-cli-build/static/chunks/7055-e60e20f43bfbe5f8.js +1 -0
- package/app/.next-cli-build/static/chunks/{1310.277601b1f5c247fc.js → 8202.1ffc6ce531e066ce.js} +1 -1
- package/app/.next-cli-build/static/chunks/8982-2ded4564d1c237bf.js +11 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-8ee5e31272f7892c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d51be3d3bd57417a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-9ddb019b546bcbba.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-f172b328f6511b37.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-88cd993b836dec9c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-b2d5d55248dcd3d3.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-39f27df3486a01a2.js +59 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-2c067b98b7f56068.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-29ce6662637d64e4.js → page-2f8b58c042f39540.js} +2 -2
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-73fb8942bb7fa117.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-c9ccbe661325f70b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-bad276eb75372477.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-69a63c8c1b1f84e7.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c9314d6159658d8f.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-e1d9bab947553056.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-48377e2f21dbeb44.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-f9aa290f48f86415.js → page-ab3911903c69147a.js} +2 -2
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f72e66dd55d53998.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-0346bcad05ea40a4.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-38349afd23d063e2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-b32efa0400b90a7f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-db0c91ee7e56c647.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_not-found/page-3396db0e61e07183.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/callback/page-9e4704ee20743942.js +1 -0
- package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-6586c129a35d40ef.js +1 -0
- package/app/.next-cli-build/static/chunks/app/landing/page-89ca9e565739184f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/layout-81136c44a44956ea.js +1 -0
- package/app/.next-cli-build/static/chunks/app/login/page-b860537d58a9f64e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/framework-711ef29bc66f648c.js +1 -0
- package/app/.next-cli-build/static/chunks/main-app-8803a230dfc5c361.js +1 -0
- package/app/.next-cli-build/static/chunks/main-d645701bfd70a30d.js +5 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-f740e7b53cfd899a.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-39495f6c1c52b83a.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-ab7d9d893d55abd4.js → webpack-f482ccef6733ebcc.js} +1 -1
- package/app/.next-cli-build/static/css/8a6d6bcd720e1cab.css +1 -0
- package/app/.next-cli-build/static/css/8f9ac5a7bd3a79e5.css +1 -0
- package/app/.next-cli-build/static/media/material-symbols-outlined.ec1fa111.woff2 +0 -0
- package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.63-to-0.4.65-0.4.65-20260529-160138 → upgrade-0.4.80-to-0.5.2-0.5.2-20260617-115216}/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.65-to-0.4.66-0.4.66-20260529-174857 → upgrade-0.5.2-to-0.5.3-0.5.3-20260618-172402}/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
- package/app/custom-server.js +5 -0
- package/app/logs/translator/1_req_client.json +1112 -0
- package/app/logs/translator/2_req_source.json +1085 -0
- package/app/logs/translator/3_req_openai.json +1106 -0
- package/app/logs/translator/4_req_target.json +1094 -0
- package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
- package/app/node_modules/baseline-browser-mapping/package.json +2 -2
- package/app/package.json +4 -3
- package/cli.js +22 -2
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/1249.js +0 -1
- package/app/.next-cli-build/server/chunks/1435.js +0 -1
- package/app/.next-cli-build/server/chunks/1574.js +0 -3
- package/app/.next-cli-build/server/chunks/1679.js +0 -1
- package/app/.next-cli-build/server/chunks/1735.js +0 -1
- package/app/.next-cli-build/server/chunks/1909.js +0 -1
- package/app/.next-cli-build/server/chunks/21.js +0 -1
- package/app/.next-cli-build/server/chunks/2276.js +0 -1
- package/app/.next-cli-build/server/chunks/233.js +0 -1
- package/app/.next-cli-build/server/chunks/2701.js +0 -1
- package/app/.next-cli-build/server/chunks/287.js +0 -10
- package/app/.next-cli-build/server/chunks/3595.js +0 -1
- package/app/.next-cli-build/server/chunks/375.js +0 -45
- package/app/.next-cli-build/server/chunks/4116.js +0 -1
- package/app/.next-cli-build/server/chunks/4343.js +0 -1
- package/app/.next-cli-build/server/chunks/450.js +0 -7
- package/app/.next-cli-build/server/chunks/478.js +0 -1
- package/app/.next-cli-build/server/chunks/4839.js +0 -1
- package/app/.next-cli-build/server/chunks/4893.js +0 -1
- package/app/.next-cli-build/server/chunks/5046.js +0 -3
- package/app/.next-cli-build/server/chunks/5053.js +0 -64
- package/app/.next-cli-build/server/chunks/5079.js +0 -1
- package/app/.next-cli-build/server/chunks/5221.js +0 -1
- package/app/.next-cli-build/server/chunks/5445.js +0 -1
- package/app/.next-cli-build/server/chunks/586.js +0 -1
- package/app/.next-cli-build/server/chunks/6288.js +0 -120
- package/app/.next-cli-build/server/chunks/6379.js +0 -55
- package/app/.next-cli-build/server/chunks/6502.js +0 -9
- package/app/.next-cli-build/server/chunks/6560.js +0 -1
- package/app/.next-cli-build/server/chunks/6634.js +0 -1
- package/app/.next-cli-build/server/chunks/666.js +0 -4
- package/app/.next-cli-build/server/chunks/6799.js +0 -1
- package/app/.next-cli-build/server/chunks/7061.js +0 -9
- package/app/.next-cli-build/server/chunks/7171.js +0 -1
- package/app/.next-cli-build/server/chunks/7417.js +0 -1
- package/app/.next-cli-build/server/chunks/7686.js +0 -13
- package/app/.next-cli-build/server/chunks/7773.js +0 -18
- package/app/.next-cli-build/server/chunks/7810.js +0 -1
- package/app/.next-cli-build/server/chunks/7811.js +0 -67
- package/app/.next-cli-build/server/chunks/7958.js +0 -1
- package/app/.next-cli-build/server/chunks/800.js +0 -43
- package/app/.next-cli-build/server/chunks/8202.js +0 -186
- package/app/.next-cli-build/server/chunks/8367.js +0 -63
- package/app/.next-cli-build/server/chunks/8515.js +0 -1
- package/app/.next-cli-build/server/chunks/9060.js +0 -9
- package/app/.next-cli-build/server/chunks/9455.js +0 -1
- package/app/.next-cli-build/server/chunks/9552.js +0 -9
- package/app/.next-cli-build/server/chunks/9737.js +0 -1
- package/app/.next-cli-build/static/chunks/1273-62c3e49612c8936b.js +0 -1
- package/app/.next-cli-build/static/chunks/4156-bdb25cdd3acab2ec.js +0 -7
- package/app/.next-cli-build/static/chunks/505-5a47bf68e801c191.js +0 -1
- package/app/.next-cli-build/static/chunks/5158-4b48a3595c794bbc.js +0 -32
- package/app/.next-cli-build/static/chunks/6795-3ddcc1d55c65c001.js +0 -64
- package/app/.next-cli-build/static/chunks/8035-1cb6bd472ac855e6.js +0 -3
- package/app/.next-cli-build/static/chunks/8038-368cfbdf9080110b.js +0 -1
- package/app/.next-cli-build/static/chunks/8872-3d43cb238f9deea9.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-03929d42abde11dc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-cc517a5fd7a180a7.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-1fb39d8d504a37bd.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8b1faf2f24d2052c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-af58c67a4e409aad.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-79a243ddf837f243.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-88a892fe85ec49f1.js +0 -59
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-7a43c4f097f69c0b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-617c9cc320c9aced.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-516256427cf3d887.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-87aa0d715eec8054.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0415160db9429aa9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-31735db9cb65d987.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-510b667ad2defe52.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-7c28f5b764fe552a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-1e1d591d20897ed6.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-58f11e8a5a8f3810.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-f87aca0195ce41ad.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-6cc2d457a7fca89c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-c6ba0f397e71e7a9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_not-found/page-1ab122ef64d03506.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/callback/page-6ea4675be396cdb5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-77a73529baba955b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/landing/page-0084367666bd9046.js +0 -1
- package/app/.next-cli-build/static/chunks/app/layout-fcda570933db809f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/login/page-81774082b5692ac2.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/c6123951-b42288d628b452ba.js +0 -1
- package/app/.next-cli-build/static/chunks/c7879cf7-255d52e3eda24cb7.js +0 -1
- package/app/.next-cli-build/static/chunks/framework-ec2c38cd02cb5c98.js +0 -1
- package/app/.next-cli-build/static/chunks/main-app-2c8be355ba1c4e93.js +0 -1
- package/app/.next-cli-build/static/chunks/main-dc8d0a9e54eb27e6.js +0 -5
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-2e4f2b5b71d077f6.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ae349eedbd83bdc5.js +0 -1
- package/app/.next-cli-build/static/css/1aec3647fe5ea077.css +0 -1
- package/app/.next-cli-build/static/css/2e1b7d528c228ec3.css +0 -1
- package/app/.next-cli-build/static/jdgfjwGZqMZ52c3xFFzay/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/media/material-symbols-outlined.1060ac06.woff2 +0 -0
- /package/app/.next-cli-build/static/{jdgfjwGZqMZ52c3xFFzay → PIwundMcbVdr1upjlwfNo}/_ssgManifest.js +0 -0
- /package/app/node_modules/{next/node_modules/@next → @next}/env/dist/index.js +0 -0
- /package/app/node_modules/{next/node_modules/@next → @next}/env/package.json +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8035],{64795:(e,t,s)=>{"use strict";s.d(t,{default:()=>p});var a=s(73365),l=s(1521),n=s(86447),r=s.n(n),i=s(74156),o=s(96459),c=s(84502);let d=["zh-CN","zh-TW"],m=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}];async function u(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(5e3)})).ok}catch{return!1}}async function x(...e){let t=e.filter(Boolean).map(u);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}let h=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}];function p({machineId:e}){let[t,s]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[j,k]=(0,l.useState)(!1),[v,w]=(0,l.useState)(""),[N,C]=(0,l.useState)(null),[S,T]=(0,l.useState)(null),[E,P]=(0,l.useState)(!1),[_,$]=(0,l.useState)(!0),[A,O]=(0,l.useState)(!0),[U,D]=(0,l.useState)(!1),[I,F]=(0,l.useState)(!0),[R,L]=(0,l.useState)(!1),[W,q]=(0,l.useState)("full"),[K,z]=(0,l.useState)("en"),[J,M]=(0,l.useState)(!0),[H,B]=(0,l.useState)(!1),[Q,Z]=(0,l.useState)(!1),[V,G]=(0,l.useState)(""),[X,Y]=(0,l.useState)(""),[ee,et]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(""),[el,en]=(0,l.useState)(null),[er,ei]=(0,l.useState)(!1),[eo,ec]=(0,l.useState)(!1),[ed,em]=(0,l.useState)(!1),[eu,ex]=(0,l.useState)(!1),[eh,ep]=(0,l.useState)(""),[eb,ey]=(0,l.useState)(!1),[eg,ef]=(0,l.useState)(""),[ej,ek]=(0,l.useState)(null),[ev,ew]=(0,l.useState)(""),[eN,eC]=(0,l.useState)(""),[eS,eT]=(0,l.useState)(null),[eE,eP]=(0,l.useState)(!1),[e_,e$]=(0,l.useState)([]),[eA,eO]=(0,l.useState)(""),[eU,eD]=(0,l.useState)(!1),[eI,eF]=(0,l.useState)(!1),[eR,eL]=(0,l.useState)(!1),eW=(0,l.useRef)(null),eq=(0,l.useRef)(0),eK=(0,l.useRef)(0),ez=(0,l.useRef)(!1),eJ=(0,l.useRef)(!1),eM=(0,l.useRef)(!1),eH=(0,l.useRef)(!1),[eB,eQ]=(0,l.useState)(!1),[eZ,eV]=(0,l.useState)(!1),[eG,eX]=(0,l.useState)(new Set),[eY,e0]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e0(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]),(0,l.useEffect)(()=>(z((0,c.kk)()),(0,c.oQ)(()=>z((0,c.kk)()))),[]);let e1=d.includes(K),e5=e1?h:h.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=h.find(e=>e.id===W);e?.wenyan&&!e1&&(q("ultra"),ta({cavemanLevel:"ultra"}))},[e1,W]);let{copied:e2,copy:e4}=(0,o.C)(),e3=!_||!A,e8=_?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eW.current&&(eW.current.scrollTop=eW.current.scrollHeight)},[e_]),(0,l.useEffect)(()=>{tl(),e9()},[]),(0,l.useEffect)(()=>{if(!(H||ed))return;let e=!H||Q,t=!ed||eu,s=()=>{document.hidden||e7()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||e7()},5e3);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[H,ed,Q,eu]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(H&&(V||X)){let e=await x(X,V);ez.current=e,e?(eq.current=0,Z(!0),eM.current||(eM.current=!0,eQ(!0))):(eq.current+=1,eq.current>=5&&Z(!1))}else ez.current=!1;if(ed&&eh){let e=await u(eh);eJ.current=e,e?(eK.current=0,ex(!0),eH.current||(eH.current=!0,eV(!0))):(eK.current+=1,eK.current>=5&&ex(!1))}else eJ.current=!1}};if(!(H&&(V||X)||ed&&eh))return;e();let t=!ed||eu;if((!H||Q)&&t)return;let s=setInterval(e,1e4);return()=>clearInterval(s)},[H,V,X,ed,eh,Q,eu]);let e6=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=5&&a(!1))},[]),e7=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";G(a),Y(t.tunnel?.publicUrl||""),B(s),e6(null,ez,eq,Z,eM,eQ);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";ep(n),em(l),e6(null,eJ,eK,ex,eH,eV)}catch{}},e9=async()=>{M(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();P(t.requireApiKey||!1),$(!1!==t.requireLogin),O(t.hasPassword||!1),D(t.tunnelDashboardAccess||!1),F(!1!==t.rtkEnabled),L(!!t.cavemanEnabled),q(t.cavemanLevel||"full")}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";G(a),Y(e.tunnel?.publicUrl||""),B(s),e6(null,ez,eq,Z,eM,eQ);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";ep(n),em(l),e6(null,eJ,eK,ex,eH,eV)}}catch(e){console.log("Error loading settings:",e)}finally{M(!1)}},te=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&D(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},tt=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&P(e)}catch(e){console.log("Error updating requireApiKey:",e)}},ts=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&F(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},ta=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},tl=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},tn=async(...e)=>{et(!0),ea("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<3e5;){if(await new Promise(e=>setTimeout(e,2e3)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return B(!0),et(!1),ea(""),!0;if((Date.now()-s)%1e4<2e3)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return en({type:"error",message:"Tunnel process stopped unexpectedly."}),et(!1),ea(""),!1}}catch{}}return en({type:"error",message:"Tunnel created but not reachable. Please try again."}),et(!1),ea(""),!1},tr=async()=>{ei(!1),et(!0),en(null),ea("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?ea(`Downloading cloudflared... ${s.download.progress}%`):e&&ea("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void en({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void en({type:"error",message:"No tunnel URL returned"});G(a),Y(s.publicUrl||""),await tn(s.publicUrl,a)}catch(e){en({type:"error",message:e.message})}finally{e=!1,et(!1),ea("")}},ti=async()=>{et(!0),en(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(B(!1),G(""),ec(!1),en({type:"success",message:"Tunnel disabled"})):en({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){en({type:"error",message:e.message})}finally{et(!1)}},to=async()=>{eT(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eT(t.installed),t}}catch{}return eT(!1),{installed:!1}},tc=async()=>{eP(!0),ek(null),e$([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eA})});eO("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)e$(e=>[...e.slice(-50),a.message]);else if("done"===s){eT(!0),eP(!1),eF(!1),tx();return}else"error"===s&&ek({type:"error",message:a.error||"Install failed"})}}}catch(e){ek({type:"error",message:e.message})}finally{eP(!1)}},td=async e=>{ef("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<3e5;){await new Promise(e=>setTimeout(e,2e3));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},tm=(e,t)=>{ew(e),eC(t)},tu=()=>{ew(""),eC("")},tx=async()=>{eF(!1),eD(!0),ey(!0),ek(null),ef("Connecting..."),tu();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){ep(t.tunnelUrl||"");let e=await td(t.tunnelUrl);em(!0),ek(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){tm(t.authUrl,"Open Login Page"),ef('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tu(),ef("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){ep(t.tunnelUrl||"");let e=await td(t.tunnelUrl);em(!0),ek(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await th(t.enableUrl):ek({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}tu(),ek({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await th(t.enableUrl);ek({type:"error",message:t.error||"Failed to connect"})}catch(e){ek({type:"error",message:e.message})}finally{ey(!1),eD(!1),ef(""),tu()}},th=async e=>{tm(e,"Open Funnel Settings"),ef('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tu(),ep(t.tunnelUrl||"");let e=await td(t.tunnelUrl);em(!0),ek(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){tu(),ek({type:"error",message:t.error});return}}catch{}}tu(),ek({type:"error",message:"Timed out waiting for Funnel to be enabled."})},tp=async()=>{ey(!0),ek(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(em(!1),ep(""),eL(!1),ek({type:"success",message:"Tailscale disabled"})):ek({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){ek({type:"error",message:e.message})}finally{ey(!1)}},tb=async()=>{ek(null),e$([]);let e=await to();e?.installed&&e?.hasCachedPassword?tx():eF(!0)},ty=async()=>{if(v.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:v})}),t=await e.json();e.ok&&(C(t.key),await tl(),w(""),k(!1))}catch(e){console.log("Error creating key:",e)}},tg=async e=>{T({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{T(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),eX(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},tf=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[tj,tk]=(0,l.useState)("/v1");return((0,l.useEffect)(()=>{tk(`${window.location.origin}/v1`)},[]),n)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b,{label:"Local",url:tj,copyId:"local_url",copied:e2,onCopy:e4}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${H?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),H&&!ee&&Q?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${X||V}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>e4(`${X||V}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===e2?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>ec(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!H||ee||Q?ee?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),es||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{et(!1),ea("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):el?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),el.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>ei(!0),children:"Enable"})]}):J?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>M(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{e3?en({type:"error",message:`Security required: ${e8}`}):E?ei(!0):en({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eB?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>ec(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${ed?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),ed&&!eb&&eu?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${eh}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>e4(`${eh}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===e2?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eL(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!ed||eb||eu?eb||eU?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eg||"Connecting..."]}),ev&&(0,a.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(ev,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eN||"Open"}),(0,a.jsx)("button",{onClick:()=>{ey(!1),eD(!1),ef(""),tu()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ej?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ej.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:tb,children:"Enable"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{e3?ek({type:"error",message:`Security required: ${e8}`}):tb()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eZ?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>eL(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),e3&&!H&&!ed&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(f,{message:e8,action:{label:"Open settings",href:"/dashboard/profile"}})}),(H||ed)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!E&&(0,a.jsx)(f,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!_||!A)&&(0,a.jsx)(f,{message:_?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:_?"Change password":"Enable",href:"/dashboard/profile"}})]}),(H||ed)&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,a.jsx)(i.lM,{checked:U,onChange:()=>te(!U)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(g,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)(i.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(i.lM,{checked:I,onChange:()=>ts(!I)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[R&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:e5.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;q(t=e.id),ta({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${W===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:h.find(e=>e.id===W)?.desc})]}),(0,a.jsx)(i.lM,{checked:R,onChange:()=>{var e;L(e=!R),ta({cavemanEnabled:e})}})]})]})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>k(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(i.lM,{checked:E,onChange:()=>tt(!E)})]}),eY&&!E&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(f,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>k(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono",children:eG.has(e.id)?e.key:(t=e.key)?t.length>8?t.slice(0,8)+"...":t:""}),(0,a.jsx)("button",{onClick:()=>{var t;return t=e.id,void eX(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:eG.has(e.id)?"Hide key":"Show key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eG.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{onClick:()=>e4(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e2===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?T({title:"Pause API Key",message:`Pause API key "${e.name}"?
|
|
2
|
-
|
|
3
|
-
This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{T(null),tf(e.id,t)}}):tf(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>tg(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:j,title:"Create API Key",onClose:()=>{k(!1),w("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.pd,{label:"Key Name",value:v,onChange:e=>w(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:ty,fullWidth:!0,disabled:!v.trim(),children:"Create"}),(0,a.jsx)(i.$n,{onClick:()=>{k(!1),w("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!N,title:"API Key Created",onClose:()=>C(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:N||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===e2?"check":"content_copy",onClick:()=>e4(N,"created_key"),children:"created_key"===e2?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>C(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:er,title:"Enable Tunnel",onClose:()=>ei(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:m.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tr,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>ei(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eo,title:"Disable Tunnel",onClose:()=>!ee&&ec(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:ti,fullWidth:!0,disabled:ee,variant:"danger",children:ee?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>ec(!1),variant:"ghost",fullWidth:!0,disabled:ee,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eI,title:"Tailscale Funnel",onClose:()=>{eE||(eF(!1),eO(""),ek(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eS&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eS&&!eE&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tc,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>eF(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eE&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),e_.length>0&&(0,a.jsx)("div",{ref:eW,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:e_.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===eS&&!eE&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tx(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>eF(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ej&&(0,a.jsx)(y,{status:ej})]})}),(0,a.jsx)(i.aF,{isOpen:eR,title:"Disable Tailscale",onClose:()=>!eb&&eL(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tp,fullWidth:!0,disabled:eb,variant:"danger",children:eb?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>eL(!1),variant:"ghost",fullWidth:!0,disabled:eb,children:"Cancel"})]})]})}),(0,a.jsx)(i.uo,{isOpen:!!S,onClose:()=>T(null),onConfirm:S?.onConfirm,title:S?.title||"Confirm",message:S?.message,variant:"danger"})]})}function b({label:e,url:t,copyId:s,copied:l,onCopy:n,badge:r,actions:o}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===r||"TS"===r?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,a.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),o]})}function y({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function g({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function f({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}p.propTypes={machineId:r().string.isRequired}},78035:(e,t,s)=>{Promise.resolve().then(s.bind(s,64795))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8038],{4051:(e,t,r)=>{"use strict";var n=r(89651);r(67497);var s=r(1521),i=s&&"object"==typeof s&&"default"in s?s:{default:s},o=void 0!==n&&n.env&&!0,u=function(e){return"[object String]"===Object.prototype.toString.call(e)},a=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,s=t.optimizeForSpeed,i=void 0===s?o:s;c(u(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var a="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=a?a.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(c(u(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return o||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var n=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,n))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var r="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){o||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];c(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},r.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&c(u(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var s=document.head||document.getElementsByTagName("head")[0];return r?s.insertBefore(n,r):s.appendChild(n),n},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var l=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},h={};function d(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return h[n]||(h[n]="jsx-"+l(e+"-"+r)),h[n]}function p(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return h[r]||(h[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[r]}var f=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,s=t.optimizeForSpeed,i=void 0!==s&&s;this._sheet=n||new a({name:"styled-jsx",optimizeForSpeed:i}),this._sheet.inject(),n&&"boolean"==typeof i&&(this._sheet.setOptimizeForSpeed(i),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,s=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var i=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=i,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var s=d(n,r);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return p(s,e)}):[p(s,t)]}}return{styleId:d(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),_=s.createContext(null);_.displayName="StyleSheetContext";var m=i.default.useInsertionEffect||i.default.useLayoutEffect,y="u">typeof window?new f:void 0;function S(e){var t=y||s.useContext(_);return t&&("u"<typeof window?t.add(e):m(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}S.dynamic=function(e){return e.map(function(e){return d(e[0],e[1])}).join(" ")},t.style=S},23006:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},29717:(e,t,r)=>{"use strict";var n=r(21505);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}})},31121:(e,t,r)=>{"use strict";var n=r(23006);function s(){}function i(){}i.resetWarningCache=s,e.exports=function(){function e(e,t,r,s,i,o){if(o!==n){var u=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:s};return r.PropTypes=r,r}},67497:()=>{},86447:(e,t,r)=>{e.exports=r(31121)()},87608:(e,t,r)=>{"use strict";e.exports=r(4051).style}}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8872],{31958:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return n},imageConfigDefault:function(){return a}};for(var i in r)Object.defineProperty(t,i,{enumerable:!0,get:r[i]});let n=["default","imgix","cloudinary","akamai","custom"],a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},33507:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return i}});let i=r(12563)._(r(1521)).default.createContext(null)},33517:(e,t)=>{function r(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findClosestQuality",{enumerable:!0,get:function(){return r}})},38058:(e,t)=>{function r({widthInt:e,heightInt:t,blurWidth:i,blurHeight:n,blurDataURL:a,objectFit:o}){let l=i?40*i:e,s=n?40*n:t,u=l&&s?`viewBox='0 0 ${l} ${s}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${u?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},38137:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return _}});let i=r(12563),n=r(21512),a=r(73365),o=n._(r(1521)),l=i._(r(98196)),s=i._(r(98178)),u=r(53441),d=r(31958),c=r(92642);r(30208);let f=r(33507),p=i._(r(93635)),g=r(80160),m={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function h(e,t,r,i,n,a,o){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&n(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let i=!1,n=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>i,isPropagationStopped:()=>n,persist:()=>{},preventDefault:()=>{i=!0,t.preventDefault()},stopPropagation:()=>{n=!0,t.stopPropagation()}})}i?.current&&i.current(e)}}))}function b(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}let y=(0,o.forwardRef)(({src:e,srcSet:t,sizes:r,height:i,width:n,decoding:l,className:s,style:u,fetchPriority:d,placeholder:c,loading:f,unoptimized:p,fill:m,onLoadRef:y,onLoadingCompleteRef:v,setBlurComplete:_,setShowAltText:w,sizesInput:j,onLoad:P,onError:S,...O},x)=>{let C=(0,o.useCallback)(e=>{e&&(S&&(e.src=e.src),e.complete&&h(e,c,y,v,_,p,j))},[e,c,y,v,_,S,p,j]),E=(0,g.useMergedRef)(x,C);return(0,a.jsx)("img",{...O,...b(d),loading:f,width:n,height:i,decoding:l,"data-nimg":m?"fill":"1",className:s,style:u,sizes:r,srcSet:t,src:e,ref:E,onLoad:e=>{h(e.currentTarget,c,y,v,_,p,j)},onError:e=>{w(!0),"empty"!==c&&_(!0),S&&S(e)}})});function v({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...b(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,a.jsx)(s.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let _=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(f.RouterContext),i=(0,o.useContext)(c.ImageConfigContext),n=(0,o.useMemo)(()=>{let e=m||i||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),n=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:n,localPatterns:e.localPatterns}},[i]),{onLoad:l,onLoadingComplete:s}=e,g=(0,o.useRef)(l);(0,o.useEffect)(()=>{g.current=l},[l]);let h=(0,o.useRef)(s);(0,o.useEffect)(()=>{h.current=s},[s]);let[b,_]=(0,o.useState)(!1),[w,j]=(0,o.useState)(!1),{props:P,meta:S}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:n,blurComplete:b,showAltText:w});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{...P,unoptimized:S.unoptimized,placeholder:S.placeholder,fill:S.fill,onLoadRef:g,onLoadingCompleteRef:h,setBlurComplete:_,setShowAltText:j,sizesInput:e.sizes,ref:t}),S.preload?(0,a.jsx)(v,{isAppRouter:!r,imgAttributes:P}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},48495:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var i={default:function(){return d},getImageProps:function(){return u}};for(var n in i)Object.defineProperty(t,n,{enumerable:!0,get:i[n]});let a=r(12563),o=r(53441),l=r(38137),s=a._(r(93635));function u(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=l.Image},53441:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return u}}),r(30208);let i=r(68491),n=r(38058),a=r(31958),o=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function s(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function u({src:e,sizes:t,unoptimized:r=!1,priority:d=!1,preload:c=!1,loading:f,className:p,quality:g,width:m,height:h,fill:b=!1,style:y,overrideSrc:v,onLoad:_,onLoadingComplete:w,placeholder:j="empty",blurDataURL:P,fetchPriority:S,decoding:O="async",layout:x,objectFit:C,objectPosition:E,lazyBoundary:R,lazyRoot:z,...M},I){var $;let D,k,A,{imgConf:N,showAltText:L,blurComplete:U,defaultLoader:q}=I,T=N||a.imageConfigDefault;if("allSizes"in T)D=T;else{let e=[...T.deviceSizes,...T.imageSizes].sort((e,t)=>e-t),t=T.deviceSizes.sort((e,t)=>e-t),r=T.qualities?.sort((e,t)=>e-t);D={...T,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===q)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let F=M.loader||q;delete M.loader,delete M.srcSet;let W="__next_img_default"in F;if(W){if("custom"===D.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=F;F=t=>{let{config:r,...i}=t;return e(i)}}if(x){"fill"===x&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[x];e&&(y={...y,...e});let r={responsive:"100vw",fill:"100vw"}[x];r&&!t&&(t=r)}let B="",G=s(m),H=s(h);if(($=e)&&"object"==typeof $&&(l($)||void 0!==$.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(k=t.blurWidth,A=t.blurHeight,P=P||t.blurDataURL,B=t.src,!b)if(G||H){if(G&&!H){let e=G/t.width;H=Math.round(t.height*e)}else if(!G&&H){let e=H/t.height;G=Math.round(t.width*e)}}else G=t.width,H=t.height}let V=!d&&!c&&("lazy"===f||void 0===f);(!(e="string"==typeof e?e:B)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,V=!1),D.unoptimized&&(r=!0),W&&!D.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let X=s(g),J=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:E}:{},L?{}:{color:"transparent"},y),Q=U||"empty"===j?null:"blur"===j?`url("data:image/svg+xml;charset=utf-8,${(0,n.getImageBlurSvg)({widthInt:G,heightInt:H,blurWidth:k,blurHeight:A,blurDataURL:P||"",objectFit:J.objectFit})}")`:`url("${j}")`,Y=o.includes(J.objectFit)?"fill"===J.objectFit?"100% 100%":"cover":J.objectFit,K=Q?{backgroundSize:Y,backgroundPosition:J.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Q}:{},Z=function({config:e,src:t,unoptimized:r,width:n,quality:a,sizes:o,loader:l}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,i.getDeploymentId)();if(e){let r=t.indexOf("?");if(-1!==r){let i=new URLSearchParams(t.slice(r+1));i.get("dpl")||(i.append("dpl",e),t=t.slice(0,r)+"?"+i.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:s,kind:u}=function({deviceSizes:e,allSizes:t},r,i){if(i){let r=/(^|\s)(1?\d?\d)vw/g,n=[];for(let e;e=r.exec(i);)n.push(parseInt(e[2]));if(n.length){let r=.01*Math.min(...n);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,n,o),d=s.length-1;return{sizes:o||"w"!==u?o:"100vw",srcSet:s.map((r,i)=>`${l({config:e,src:t,quality:a,width:r})} ${"w"===u?r:i+1}${u}`).join(", "),src:l({config:e,src:t,quality:a,width:s[d]})}}({config:D,src:e,unoptimized:r,width:G,quality:X,sizes:t,loader:F}),ee=V?"lazy":f;return{props:{...M,loading:ee,fetchPriority:S,width:G,height:H,decoding:O,className:p,style:{...J,...K},sizes:Z.sizes,srcSet:Z.srcSet,src:v||Z.src},meta:{unoptimized:r,preload:c||d,placeholder:j,fill:b}}}},58872:(e,t,r)=>{r.d(t,{default:()=>n.a});var i=r(48495),n=r.n(i)},63775:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let i=r(1521),n=i.useLayoutEffect,a=i.useEffect;function o(e){let{headManager:t,reduceComponentsToState:r}=e;function o(){if(t&&t.mountedInstances){let e=i.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return n(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),n(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},92642:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let i=r(12563)._(r(1521)),n=r(31958),a=i.default.createContext(n.imageConfigDefault)},93635:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let i=r(33517),n=r(68491);function a({config:e,src:t,width:r,quality:o}){let l=(0,n.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),i=r.get("dpl");if(i){l=i,r.delete("dpl");let n=r.toString();t=t.slice(0,e)+(n?"?"+n:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
3
|
-
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let s=(0,i.findClosestQuality)(o,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${s}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}a.__next_img_default=!0;let o=a},98178:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var i={default:function(){return m},defaultHead:function(){return c}};for(var n in i)Object.defineProperty(t,n,{enumerable:!0,get:i[n]});let a=r(12563),o=r(21512),l=r(73365),s=o._(r(1521)),u=a._(r(63775)),d=r(12260);function c(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===s.default.Fragment?e.concat(s.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(30208);let p=["name","httpEquiv","charSet","itemProp"];function g(e){let t,r,i,n;return e.reduce(f,[]).reverse().concat(c().reverse()).filter((t=new Set,r=new Set,i=new Set,n={},e=>{let a=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?a=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?a=!1:r.add(e.type);break;case"meta":for(let t=0,r=p.length;t<r;t++){let r=p[t];if(e.props.hasOwnProperty(r))if("charSet"===r)i.has(r)?a=!1:i.add(r);else{let t=e.props[r],i=n[r]||new Set;("name"!==r||!o)&&i.has(t)?a=!1:(i.add(t),n[r]=i)}}}return a})).reverse().map((e,t)=>{let r=e.key||t;return s.default.cloneElement(e,{key:r})})}let m=function({children:e}){let t=(0,s.useContext)(d.HeadManagerContext);return(0,l.jsx)(u.default,{reduceComponentsToState:g,headManager:t,children:e})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{11710:(e,t,r)=>{Promise.resolve().then(r.bind(r,72600))},72600:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var s=r(73365),a=r(1521),i=r(74156),l=r(69633),n=r(82495);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function p(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(p).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function h(e=""){let t=p(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function x(e){return await new Promise((t,r)=>{let s=new FileReader;s.onload=()=>t(String(s.result||"")),s.onerror=()=>r(s.error||Error("Failed to read file")),s.readAsDataURL(e)})}function f(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,a.useState)([]),[r,g]=(0,a.useState)(!0),[w,v]=(0,a.useState)(""),[b,N]=(0,a.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[y,j]=(0,a.useState)(()=>globalThis.localStorage.getItem(d)||""),[S,I]=(0,a.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,a.useState)(""),[D,O]=(0,a.useState)(()=>globalThis.localStorage.getItem(m)||""),[$,C]=(0,a.useState)([]),[_,M]=(0,a.useState)(!1),[E,T]=(0,a.useState)(""),[U,R]=(0,a.useState)(""),[z,q]=(0,a.useState)(!1),[P,J]=(0,a.useState)(!1),[B,F]=(0,a.useState)(!1),K=(0,a.useRef)(null),L=(0,a.useRef)(null),W=(0,a.useRef)(!1),H=(0,a.useRef)(null),Y=(0,a.useRef)(null);(0,a.useEffect)(()=>{q(!0)},[]),(0,a.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),s=await r.json().catch(()=>({})),a=Array.isArray(s.connections)?s.connections.filter(e=>e?.isActive!==!1):[];if(0===a.length){e||(t([]),v("No providers connected yet."));return}let i=new Map;for(let e of a){let t=e.provider||e.id,r=f(e),s=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:s,connections:[],models:[]});let a=i.get(t);a.providerName=a.providerName||r,a.providerType=a.providerType||s,a.connections.push(e);let o=(0,l.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:f(e),source:"static"}:null).filter(Boolean);a.models.push(...o)}for(let e of(await Promise.all(a.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let s=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let s="string"==typeof e?e:e?.name||e?.displayName||r,a=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(a=`${t.provider}/${r}`),{id:a,requestModel:a,name:s,providerId:t.provider,providerName:f(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:s}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Providers connected but no models available."))}catch(r){e||(v(p(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,a.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,a.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,a.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(y){let e=b.find(e=>e.id===y);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,b,y]),X=(0,a.useMemo)(()=>b.find(e=>e.id===y)||null,[b,y]),Z=X?.messages||[],ee=(0,a.useMemo)(()=>[...b].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[b]),et=!_&&!!V&&(D.trim().length>0||$.length>0);(0,a.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(b)),globalThis.localStorage.setItem(d,y),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D)}catch{}},[z,b,y,S,D]),(0,a.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],s=A&&G.has(A)?G.get(A):t.models[0];if(b.length>0){let e=b.find(e=>e.id===y)||b[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):s;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||s.id);return}let a={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:s.id,modelName:s.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([a]),j(a.id),I(t.providerId),k(s.id)},[z,r,e,G,b,y,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},es=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,ea=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let s=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await x(e)})));C(e=>[...e,...s]),e.target.value=""},ei=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===$.length)return;let r=y,s=b.find(e=>e.id===r);if(!s){if(!(s=es(e)))return;r=s.id,N(e=>[s,...e]),j(r)}let a={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=u(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...s.messages||[],a,l];N(s=>s.map(s=>s.id===r?{...s,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===s.title?h(t):s.title}:s)),O(""),C([]),M(!0),T(i),R(""),L.current?.abort(),L.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=p(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let s=[];for(let e of(t&&s.push({type:"text",text:t}),r))e?.dataUrl&&s.push({type:"image_url",image_url:{url:e.dataUrl}});return s.length>0?s:t}(e):e.content}));try{var d;let s,a=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:L.current.signal});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(p(e.error||e.message||`Request failed (${a.status})`))}let l=a.body?.getReader();if(!l){let e=await a.json().catch(()=>({})),t=p(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let s=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=s.pop()||"",s)){let t=e.trim();if(!t.startsWith("data:"))continue;let s=t.slice(5).trim();if(s&&"[DONE]"!==s)try{let e=JSON.parse(s),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(p).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,s=h(t),er(d,e=>({...e,title:"New chat"===e.title?s:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=p(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{M(!1),T(""),R(""),L.current=null}},el=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,s.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,s.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,s.jsxs)("div",{ref:H,className:"relative",children:[(0,s.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,s.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),P?(0,s.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,s.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,s.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,s.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,s.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,s.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,s.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=b.find(e=>e.id===y);if(r&&r.messages.length>0){let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,s.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,s.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!y)return;let e=b.filter(e=>e.id!==y),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!y||0===b.length,children:"Clear"})]})]}),B?(0,s.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,s.jsx)("div",{className:"px-3 py-2",children:(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,s.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,s.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):ee.map(e=>{let t=e.id===y,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,s.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=b.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,s.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:p(r?.content)||"Empty chat"})]}),(0,s.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let s=Math.round(r/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,w?(0,s.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,s.jsx)("p",{className:"text-sm leading-6",children:w})]})}):null,(0,s.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,s.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,s.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,s.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,s.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,s.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,a=r&&e.id===E&&"streaming"===e.status,i=p(e.content)||(r?U:"");return(0,s.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,s.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,s.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,s.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,s.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,s.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,s.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,s.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&a&&!U?(0,s.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,s.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,s.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,s.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,s.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,s.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,s.jsx)("textarea",{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&ei())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!V||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,s.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ea}),(0,s.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,s.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,s.jsx)("button",{onClick:ei,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,s.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[7848,4335,6795,505,4156,2347,5158,7358],()=>e(e.s=11710)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{51897:(e,t,a)=>{Promise.resolve().then(a.bind(a,64501))},64501:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(73365),l=a(1521),r=a(99568),i=a.n(r),o=a(74156),n=a(97990),c=a(69633),d=a(7208);let u=a(89651).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=n.dM[e],[r,v]=(0,l.useState)([]),[m,h]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,y]=(0,l.useState)(""),[S,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),y(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),m?(0,s.jsx)(o.Qv,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=c.Xg[e.provider]||e.provider;(0,c.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&w?w:f&&u?u:window.location.origin,apiKeys:S,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(d.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(d.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(d.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(d.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(d.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(d.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(d.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(d.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(d.c9,{...o,activeProviders:C(),cloudEnabled:f});case"deepseek-tui":return(0,s.jsx)(d.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(d.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(d.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[7848,4335,6795,8872,505,4156,3771,2347,5158,7358],()=>e(e.s=51897)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{32913:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(73365),a=l(1521),r=l(74156),i=l(97990),c=l(7208),n=l(99568),o=l.n(n),d=l(58872);function x({toolId:e,tool:s,status:l}){let a=l?l.installed?l.has9Router?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[n,o]=(0,a.useState)({});if((0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),g=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:d.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:n[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:g.map(([e,s])=>(0,t.jsx)(c.gY,{tool:s},e))})]})]})}},71438:(e,s,l)=>{Promise.resolve().then(l.bind(l,32913))}},e=>{e.O(0,[7848,4335,6795,8872,505,4156,3771,2347,5158,7358],()=>e(e.s=71438)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8b1faf2f24d2052c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{37175:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var l=s(73365),a=s(1521),r=s(99327),o=s(7892),i=s(52756),n=s(28440),c=s(74156),d=s(96459);s(82495);let m=/^[a-zA-Z0-9_.\-]+$/;function x(){let[e,t]=(0,a.useState)([]),[s,r]=(0,a.useState)(!0),[o,i]=(0,a.useState)(!1),[n,m]=(0,a.useState)(null),[x,u]=(0,a.useState)([]),[b,f]=(0,a.useState)({}),[g,j]=(0,a.useState)(null),{copied:y,copy:v}=(0,d.C)();(0,a.useEffect)(()=>{w()},[]);let w=async()=>{try{let[e,s,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),a=await e.json(),r=await s.json(),o=l.ok?await l.json():{};e.ok&&t((a.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),s.ok&&u(r.connections||[]),f(o.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},N=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await w(),i(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},k=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await w(),m(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},C=async s=>{j({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{j(null);try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}}})},S=async(e,t)=>{try{let s={...b};t?s[e]={fallbackStrategy:"round-robin"}:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),f(s)}catch(e){console.log("Error updating combo strategy:",e)}};return s?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(c.Qv,{}),(0,l.jsx)(c.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold",children:"Combos"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Create model combos with fallback support"})]}),(0,l.jsx)(c.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]}),0===e.length?(0,l.jsx)(c.Zp,{children:(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,l.jsx)(c.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,l.jsx)(h,{combo:e,copied:y,onCopy:v,onEdit:()=>m(e),onDelete:()=>C(e.id),roundRobinEnabled:b[e.name]?.fallbackStrategy==="round-robin",onToggleRoundRobin:t=>S(e.name,t)},e.id))}),(0,l.jsx)(p,{isOpen:o,onClose:()=>i(!1),onSave:N,activeProviders:x},"create"),(0,l.jsx)(p,{isOpen:!!n,combo:n,onClose:()=>m(null),onSave:e=>k(n.id,e),activeProviders:x},n?.id||"new"),(0,l.jsx)(c.uo,{isOpen:!!g,onClose:()=>j(null),onConfirm:g?.onConfirm,title:g?.title||"Confirm",message:g?.message,variant:"danger"})]})}function h({combo:e,copied:t,onCopy:s,onEdit:a,onDelete:r,roundRobinEnabled:o,onToggleRoundRobin:i}){return(0,l.jsx)(c.Zp,{padding:"sm",className:"group",children:(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,t)=>(0,l.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1.5 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[220px]",children:e},t)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-1.5 rounded-lg bg-black/[0.02] px-2 py-1.5 dark:bg-white/[0.02] sm:justify-start sm:bg-transparent sm:px-0 sm:py-0 sm:dark:bg-transparent",children:[(0,l.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,l.jsx)(c.lM,{size:"sm",checked:o,onChange:i})]}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),s(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:t===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:a,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:r,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]})})}function u({id:e,index:t,model:s,isFirst:r,isLast:n,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:h,listeners:p,setNodeRef:b,transform:f,isDragging:g}=(0,o.gl)({id:e}),j={transform:i.Ks.Transform.toString(f),opacity:g?.4:1,zIndex:g?999:void 0},[y,v]=(0,a.useState)(!1),[w,N]=(0,a.useState)(s),k=()=>{let e=w.trim();e&&e!==s?c(e):N(s),v(!1)};return(0,l.jsxs)("div",{ref:b,style:j,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${g?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...h,...p,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),y?(0,l.jsx)("input",{autoFocus:!0,value:w,onChange:e=>N(e.target.value),onBlur:k,onKeyDown:e=>{"Enter"===e.key&&k(),"Escape"===e.key&&(N(s),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,l.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>v(!0),title:"Click to edit",children:s}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:d,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function p({isOpen:e,combo:t,onClose:s,onSave:i,activeProviders:d,kindFilter:x=null}){let[h,b]=(0,a.useState)(t?.name||""),[f,g]=(0,a.useState)(t?.models||[]),[j,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),[N,k]=(0,a.useState)(""),[C,S]=(0,a.useState)({}),E=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:o.JR})),O=f.map((e,t)=>({uid:`item-${t}`,model:e})),$=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,a.useEffect)(()=>{e&&$()},[e]);let _=e=>e.trim()?m.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and . allowed"),!1):(k("Name is required"),!1),D=async()=>{_(h)&&(w(!0),await i({name:h.trim(),models:f}),w(!1))},M=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.aF,{isOpen:e,onClose:s,title:M?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.pd,{label:"Combo Name",value:h,onChange:e=>{let t=e.target.value;b(t),t?_(t):k("")},placeholder:"my-combo",error:N}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===f.length?(0,l.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,l.jsx)(r.Mp,{sensors:E,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=O.findIndex(e=>e.uid===t.id),l=O.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&g(t=>(0,o.be)(t,e,l))}},modifiers:[n.FN,n.gj],children:(0,l.jsx)(o.gB,{items:O.map(e=>e.uid),strategy:o._G,children:(0,l.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:O.map(({uid:e,model:t},s)=>(0,l.jsx)(u,{id:e,index:s,model:t,isFirst:0===s,isLast:s===O.length-1,onEdit:e=>{let t=[...f];t[s]=e,g(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...f];[t[e-1],t[e]]=[t[e],t[e-1]],g(t)})(s),onMoveDown:()=>(e=>{if(e===f.length-1)return;let t=[...f];[t[e],t[e+1]]=[t[e+1],t[e]],g(t)})(s),onRemove:()=>{g(f.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>y(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(c.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(c.$n,{onClick:D,fullWidth:!0,size:"sm",disabled:!h.trim()||!!N||v,children:v?"Saving...":M?"Save":"Create"})]})]})}),(0,l.jsx)(c.rq,{isOpen:j,onClose:()=>y(!1),onSelect:e=>{f.includes(e.value)||g([...f,e.value])},onDeselect:e=>{g(f.filter(t=>t!==e.value))},activeProviders:d,modelAliases:C,title:"Add Model to Combo",kindFilter:x,addedModelValues:f,closeOnSelect:!1})]})}},73540:(e,t,s)=>{Promise.resolve().then(s.bind(s,37175))}},e=>{e.O(0,[7848,4335,6795,1273,505,4156,2347,5158,7358],()=>e(e.s=73540)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{25733:(e,t,l)=>{"use strict";l.d(t,{default:()=>o});var s=l(73365),n=l(1521),r=l(74156),a=l(43202);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,t]=(0,n.useState)([]),[l,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),u=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let l=JSON.parse(e.data);"init"===l.type?t(l.logs.slice(-a.UY.maxLines)):"line"===l.type?t(e=>{let t=[...e,l.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===l.type&&t([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,s.jsx)("div",{className:"",children:(0,s.jsxs)(r.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-end px-4 pt-3 pb-2",children:(0,s.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:u,children:"Clear"})}),(0,s.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,s.jsx)("div",{className:"space-y-0.5",children:e.map((e,t)=>{let l,n;return(0,s.jsx)("div",{children:(n=c[(l=e.match(/\[(\w+)\]/g))?l[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,s.jsx)("span",{className:n,children:e}))},t)})})})]})})}},88795:(e,t,l)=>{Promise.resolve().then(l.bind(l,25733))}},e=>{e.O(0,[7848,4335,6795,505,4156,2347,5158,7358],()=>e(e.s=88795)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[7848,4335,6795,505,4156,8035,2347,5158,7358],()=>_(_.s=78035)),_N_E=_.O()}]);
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{597:(e,t,s)=>{Promise.resolve().then(s.bind(s,38596))},38596:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var a=s(73365),r=s(29717),o=s(99568),l=s.n(o),n=s(1521),i=s(74156),d=s(68266),c=s(82495),m=s(69633),p=s(96459),u=s(86447),x=s.n(u);function h({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}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 b({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:u}){let[x,f]=(0,n.useState)(!1),[g,y]=(0,n.useState)(!1),[v,j]=(0,n.useState)(!1),w=(0,n.useRef)(null),N=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,S=k?N.get(k):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,$=!!k||C,_=S?`Pool: ${S.name}`:k?`Pool: ${k} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",P="",A=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(A)try{let e=new URL(A);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=A}let T=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",I=S?.isActive===!0?"success":k||C?"error":"default",E=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{j(!!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=E?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[E]),(0,n.useEffect)(()=>{if(!x)return;let e=e=>{w.current&&!w.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]);let R="unavailable"!==e.testStatus||v?e.testStatus:"active",O=s?e.name||e.email||e.displayName||"OAuth Account":e.name,M=async e=>{y(!0);try{await m("__none__"===e?null:e)}finally{y(!1),f(!1)}};return(0,a.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:l,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:o,className:`p-0.5 rounded ${o?"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 text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:O}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:!1===e.isActive?"default":"active"===R||"success"===R?"success":"error"===R||"expired"===R||"unavailable"===R?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":R||"Unknown"}),$&&(0,a.jsx)(i.Ex,{variant:I,size:"sm",children:"Proxy"}),v&&!1!==e.isActive&&(0,a.jsx)(h,{until:E}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),$&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:_,children:_}),P&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:P}),T&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:T,children:["no_proxy: ",T]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:w,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${$?"text-primary":"text-text-muted hover:text-primary"}`,disabled:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),x&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>M("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>M(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",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 px-2 py-1 rounded hover:bg-red-500/10 text-red-500",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)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function f({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,m]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[p,u]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[b,g]=(0,n.useState)(!1),y=async()=>{u(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{u(!1)}},v=async()=>{if(t&&c.apiKey){g(!0);try{let e=!1;try{u(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{u(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{g(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>m({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>m({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||p||b,variant:"secondary",children:p?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>m({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>m({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||b,children:b?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function g({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[m,p]=(0,n.useState)(!1),[u,x]=(0,n.useState)(!1),[h,y]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,S]=(0,n.useState)(null),C=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{C()},[C]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let l={...r};0===Object.keys(o).length?delete l[e]:l[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},_=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await C()}},P=async e=>{S({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{S(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},A=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},T=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},I=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await C(),p(!1))}catch(e){console.log("save apikey error:",e)}},E=async e=>{try{(await fetch(`/api/providers/${h.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await C(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(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)(i.lM,{checked:"round-robin"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(0,a.jsxs)("div",{className:"flex flex-wrap 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:w,onChange:e=>{N(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>p(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:s.map((e,r)=>(0,a.jsx)(b,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>_(r,r-1),onMoveDown:()=>_(r,r+1),onToggleActive:t=>A(e.id,t),onUpdateProxy:t=>T(e.id,t),onEdit:()=>{y(e),x(!0)},onDelete:()=>P(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>p(!0),children:"Add"})})]})]}),(0,a.jsx)(f,{isOpen:m,provider:e,proxyPools:o,onSave:I,onClose:()=>p(!1)}),(0,a.jsx)(i.wI,{isOpen:u,connection:h,proxyPools:o,onSave:E,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>S(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}function y({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let m="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:m?{color:m}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-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}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"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:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),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.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:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),l&&(0,a.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function v({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,n.useState)(""),l=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:l,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function j({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,p.C)(),[l,d]=(0,n.useState)({}),[u,x]=(0,n.useState)([]),[h,b]=(0,n.useState)({}),[f,g]=(0,n.useState)(null),[w,N]=(0,n.useState)(""),[k,S]=(0,n.useState)(!1),[C,$]=(0,n.useState)([]),_=s||(0,c.wG)(e),P=t||"llm",A=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),r=await t.json(),o=await s.json(),l=await a.json();t.ok&&d(r.aliases||{}),s.ok&&$((o.connections||[]).filter(t=>t.provider===e)),a.ok&&x(l.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{A()},[A]);let T=async(e,t)=>{let s=`${_}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await A()}catch(e){console.log("set alias error:",e)}},I=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await A()}catch(e){console.log("delete alias error:",e)}},E=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:_,id:e,type:P})})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},R=async e=>{try{let t=new URLSearchParams({providerAlias:_,id:e,type:P});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},O=async e=>{if(!f){g(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${_}/${e}`,kind:t})}),a=await s.json();b(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{b(t=>({...t,[e]:"error"})),N("Network error")}finally{g(null)}}},M=(0,m.KC)(e),K=t?M.filter(e=>e.kinds?e.kinds.includes(t):(e.type||"llm")===t):M,L=u.filter(e=>e.providerAlias===_&&(e.type||"llm")===P&&!K.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),w&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:w}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[K.map(e=>{let t=`${_}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(y,{model:e,fullModel:`${_}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>T(e.id,t),onDeleteAlias:()=>I(s),testStatus:h[e.id],onTest:C.length>0?()=>O(e.id):void 0,isTesting:f===e.id,isFree:e.isFree},e.id)}),L.map(e=>(0,a.jsx)(y,{model:{id:e.id,name:e.name},fullModel:`${_}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>R(e.id),testStatus:h[e.id],onTest:C.length>0?()=>O(e.id):void 0,isTesting:f===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>S(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(v,{isOpen:k,onSave:async e=>{await E(e),S(!1)},onClose:()=>S(!1)})]})}h.propTypes={until:x().string.isRequired},b.propTypes={connection:x().shape({id:x().string,name:x().string,email:x().string,displayName:x().string,testStatus:x().string,isActive:x().bool,lastError:x().string,priority:x().number}).isRequired,proxyPools:x().array,isOAuth:x().bool.isRequired,isFirst:x().bool.isRequired,isLast:x().bool.isRequired,onMoveUp:x().func.isRequired,onMoveDown:x().func.isRequired,onToggleActive:x().func.isRequired,onUpdateProxy:x().func,onEdit:x().func.isRequired,onDelete:x().func.isRequired},f.propTypes={isOpen:x().bool.isRequired,provider:x().string,providerName:x().string,proxyPools:x().array,onSave:x().func.isRequired,onClose:x().func.isRequired},g.propTypes={providerId:x().string.isRequired,isOAuth:x().bool},y.propTypes={model:x().shape({id:x().string.isRequired}).isRequired,fullModel:x().string.isRequired,copied:x().string,onCopy:x().func.isRequired,testStatus:x().oneOf(["ok","error"]),isCustom:x().bool,isFree:x().bool,onDeleteAlias:x().func,onTest:x().func,isTesting:x().bool},v.propTypes={isOpen:x().bool.isRequired,onSave:x().func.isRequired,onClose:x().func.isRequired},j.propTypes={providerId:x().string.isRequired,kindFilter:x().string,providerAliasOverride:x().string};let w={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0}};var N=s(24021),k=s(48605);function S({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}let C=`// Audio will appear here after running.
|
|
2
|
-
// Example JSON response (response_format=json):
|
|
3
|
-
{
|
|
4
|
-
"format": "mp3",
|
|
5
|
-
"audio": "//NExAANaAIIAUAAANNNNNNNN..." // base64 encoded MP3
|
|
6
|
-
}`,$=`{
|
|
7
|
-
"object": "list",
|
|
8
|
-
"data": [{
|
|
9
|
-
"object": "embedding",
|
|
10
|
-
"index": 0,
|
|
11
|
-
"embedding": [0.002301, -0.019212, 0.004815, -0.031249, ...]
|
|
12
|
-
}],
|
|
13
|
-
"model": "...",
|
|
14
|
-
"usage": { "prompt_tokens": 9, "total_tokens": 9 }
|
|
15
|
-
}`,_="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function P(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}let A={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
|
|
16
|
-
"results": [
|
|
17
|
-
{ "title": "...", "url": "...", "snippet": "..." }
|
|
18
|
-
]
|
|
19
|
-
}`,extraFields:[{key:"search_type",label:"Type",type:"select",default:"web",options:["web","news"]},{key:"max_results",label:"Max results",type:"number",default:5,min:1,max:100},{key:"country",label:"Country",type:"text",default:""},{key:"language",label:"Language",type:"text",default:""}]},webFetch:{inputLabel:"URL",inputPlaceholder:"https://example.com",defaultInput:"https://example.com",bodyKey:"url",defaultResponse:`{
|
|
20
|
-
"content": "...",
|
|
21
|
-
"title": "...",
|
|
22
|
-
"url": "..."
|
|
23
|
-
}`,extraFields:[{key:"format",label:"Format",type:"select",default:"markdown",options:["markdown","text","html"]},{key:"max_characters",label:"Max chars",type:"number",default:0,min:0}]},image:{inputLabel:"Prompt",inputPlaceholder:"A cute cat wearing a hat",defaultInput:"A cute cat wearing a hat",bodyKey:"prompt",defaultResponse:`{
|
|
24
|
-
"data": [
|
|
25
|
-
{ "url": "...", "b64_json": "..." }
|
|
26
|
-
]
|
|
27
|
-
}`,extraFields:[{key:"n",label:"n",type:"number",default:1,min:1,max:4},{key:"size",label:"Size",type:"select",default:"auto",options:["auto","1024x1024","1024x1536","1536x1024","1024x1792","1792x1024"]},{key:"quality",label:"Quality",type:"select",default:"auto",options:["auto","low","medium","high","standard","hd"]},{key:"background",label:"Background",type:"select",default:"auto",options:["auto","transparent","opaque"]},{key:"style",label:"Style",type:"select",default:"",options:["","vivid","natural"]},{key:"response_format",label:"Format",type:"select",default:"",options:["","url","b64_json"]},{key:"image_detail",label:"Image Detail",type:"select",default:"high",options:["auto","low","high","original"]},{key:"output_format",label:"Codec",type:"select",default:"png",options:["png","jpeg","webp"]}]},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.png",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
|
|
28
|
-
"text": "A cat sitting on a windowsill...",
|
|
29
|
-
"model": "..."
|
|
30
|
-
}`},video:{inputLabel:"Prompt",inputPlaceholder:"A serene lake at sunset",defaultInput:"A serene lake at sunset",bodyKey:"prompt",defaultResponse:`{
|
|
31
|
-
"data": [
|
|
32
|
-
{ "url": "..." }
|
|
33
|
-
]
|
|
34
|
-
}`},music:{inputLabel:"Prompt",inputPlaceholder:"A calm piano melody",defaultInput:"A calm piano melody",bodyKey:"prompt",defaultResponse:`{
|
|
35
|
-
"data": [
|
|
36
|
-
{ "url": "...", "format": "mp3" }
|
|
37
|
-
]
|
|
38
|
-
}`}};function T({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,m.KC)(e).filter(e=>"embedding"===e.type),[l,d]=(0,n.useState)(o[0]?.id??""),[u,x]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[h,b]=(0,n.useState)(""),[f,g]=(0,n.useState)(""),[y,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(""),[N,k]=(0,n.useState)(""),[C,_]=(0,n.useState)(null),[P,A]=(0,n.useState)(!1),[I,E]=(0,n.useState)(""),{copied:R,copy:O}=(0,p.C)(),{copied:M,copy:K}=(0,p.C)();(0,n.useEffect)(()=>{w(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{g((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&k(e.publicUrl)}).catch(()=>{})},[]);let L=y?N:j,B=l?`${r}/${l}`:"",U=()=>{let e={model:B,input:u.trim()},t=Number(h);return h&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},D=`curl -X POST ${L}/v1/embeddings \\
|
|
39
|
-
-H "Content-Type: application/json" \\
|
|
40
|
-
-H "Authorization: Bearer ${f||"YOUR_KEY"}" \\
|
|
41
|
-
-d '${JSON.stringify(U())}'`,F=async()=>{if(!u.trim()||!B)return;A(!0),E(""),_(null);let e=Date.now();try{let t={"Content-Type":"application/json"};f&&(t.Authorization=`Bearer ${f}`);let s=await fetch("/api/v1/embeddings",{method:"POST",headers:t,body:JSON.stringify(U())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void E(r?.error?.message||r?.error||`HTTP ${s.status}`);_({data:r,latencyMs:a})}catch(e){E(e.message||"Network error")}finally{A(!1)}},q=C?JSON.stringify(C.data,null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(S,{label:"Model",children:s?(0,a.jsx)("input",{value:l,onChange:e=>d(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}):(0,a.jsx)("select",{value:l,onChange:e=>d(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("input",{value:L,onChange:e=>y?k(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),N&&(0,a.jsxs)("button",{onClick:()=>v(e=>!e),title:y?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${y?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:f,onChange:e=>g(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(S,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:u,onChange:e=>x(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),u&&(0,a.jsx)("button",{type:"button",onClick:()=>x(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(S,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:h,onChange:e=>b(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>O(D),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:R?"check":"content_copy"}),R?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:F,disabled:P||!u.trim()||!B,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:P?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),P?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:D})]}),I&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:I}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",C&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",C.latencyMs,"ms"]})]}),C&&(0,a.jsxs)("button",{onClick:()=>K(q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:M?"check":"content_copy"}),M?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:(e=>{if(!e)return $;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(C?.data)})]})]})]})}function I({providerId:e}){let t,s=(0,c.wG)(e),r=w[e]||w["edge-tts"],[o,l]=(0,n.useState)(r.defaultVoiceId||""),[d,u]=(0,n.useState)(""),[x,h]=(0,n.useState)(r.defaultVoiceId||""),[b,f]=(0,n.useState)([]),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(r.hasModelSelector&&r.modelKey){let e=(0,m.KC)(r.modelKey);return e?.[0]?.id||""}return""}),[$,_]=(0,n.useState)("Hello, this is a text to speech test."),[P,A]=(0,n.useState)(""),[T,E]=(0,n.useState)(!1),[R,O]=(0,n.useState)(""),[M,K]=(0,n.useState)(""),[L,B]=(0,n.useState)("mp3"),[U,D]=(0,n.useState)(""),[F,q]=(0,n.useState)(null),[J,z]=(0,n.useState)(!1),[V,H]=(0,n.useState)(""),[W,G]=(0,n.useState)(null),{copied:Y,copy:Q}=(0,p.C)(),[Z,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)([]),[es,ea]=(0,n.useState)(!1),[er,eo]=(0,n.useState)(""),[el,en]=(0,n.useState)(""),[ei,ed]=(0,n.useState)({}),[ec,em]=(0,n.useState)("");(0,n.useEffect)(()=>{if(O(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{A((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&K(e.publicUrl)}).catch(()=>{}),"hardcoded"===r.voiceSource){let t=r.hasModelSelector&&r.modelKey&&(0,m.KC)(r.modelKey)?.[0]?.id||"",s=r.voicesPerModel&&t?(0,N.jY)(e,t)||[]:(0,m.KC)(r.voiceKey||e).filter(e=>"tts"===e.type);if(s.length)if(r.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];y(e.id),l(e.id),u(e.name),f([{id:e.id,name:e.name}])}else f(s),l(s[0].id),u(s[0].name||s[0].id)}},[e]),(0,n.useEffect)(()=>{if(!r.voicesPerModel||!v)return;let t=(0,N.jY)(e,v)||[];f(t),t.length&&(l(t[0].id),u(t[0].name||t[0].id))},[v]);let ep=async()=>{if(X(!0),eo(""),en(""),!ee.length){ea(!0);try{if("hardcoded"===r.voiceSource){let t=r.voiceKey||e,s=(0,m.KC)(t).filter(e=>"tts"===e.type),a={};for(let e of s)a[e.id]||(a[e.id]={code:e.id,name:e.name,voices:[{id:e.id,name:e.name}]});ed(a),et(Object.values(a).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=r.apiEndpoint?r.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===e?"local-device":"edge-tts"}`,s=await fetch(t),a=await s.json();if(a.error)return void en(a.error);et(a.languages||[]),ed(a.byLang||{})}}catch(e){en(e.message)}finally{ea(!1)}}},eu=er?ee.filter(e=>e.name.toLowerCase().includes(er.toLowerCase())||e.code.toLowerCase().includes(er.toLowerCase())):ee,ex=T?M:R,eh=r.hasVoiceIdInput&&x||o,eb=r.hasModelSelector&&v&&eh?`${s}/${v}/${eh}`:r.hasModelSelector&&v?`${s}/${v}`:eh?`${s}/${eh}`:"",ef=(t={model:eb,input:$},r.hasLanguageHint&&ec&&(t.language=ec),t),eg=`curl -X POST ${ex}/v1/audio/speech${"json"===L?"?response_format=json":""} \\
|
|
42
|
-
-H "Content-Type: application/json" \\
|
|
43
|
-
-H "Authorization: Bearer ${P||"YOUR_KEY"}" \\
|
|
44
|
-
-d '${JSON.stringify(ef)}' \\
|
|
45
|
-
${"json"===L?"":"--output speech.mp3"}`,ey=async()=>{if(!$.trim()||!eb)return;z(!0),H(""),D(""),q(null);let e=Date.now();try{let t={"Content-Type":"application/json"};P&&(t.Authorization=`Bearer ${P}`);let s=`/api/v1/audio/speech${"json"===L?"?response_format=json":""}`,a=await fetch(s,{method:"POST",headers:t,body:JSON.stringify({...ef,input:$.trim()})});if(G(Date.now()-e),!a.ok){let e=await a.json().catch(()=>({}));H(e?.error?.message||e?.error||`HTTP ${a.status}`);return}if("json"===L){let e=await a.json();q(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());D(URL.createObjectURL(t))}else{let e=await a.blob();D(URL.createObjectURL(e))}}catch(e){H(e.message||"Network error")}finally{z(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ex,"/v1/audio/speech"]}),M&&(0,a.jsxs)("button",{onClick:()=>E(e=>!e),title:T?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${T?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:P?`${P.slice(0,8)}${"•".repeat(Math.min(20,P.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),r.hasModelSelector&&(r.modelKey||c.Q2[e]?.ttsConfig?.models?.length)&&(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((c.Q2[e]?.ttsConfig?.models?.length?c.Q2[e].ttsConfig.models:(0,m.KC)(r.modelKey))||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),r.hasLanguageHint&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsxs)("select",{value:ec,onChange:e=>em(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto-detect"}),k.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),r.hasBrowseButton&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("button",{onClick:ep,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,a.jsx)("span",{className:"text-text-main",children:ee.find(e=>e.code===g)?.name||g}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:ep,className:"flex w-full items-center justify-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors sm:w-auto sm:shrink-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),b.length>0&&(0,a.jsx)(S,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.map(e=>(0,a.jsxs)("button",{onClick:()=>{l(e.id),u(e.name),r.hasVoiceIdInput&&h(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${o===e.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[e.name,e.gender?` \xb7 ${e.gender[0].toUpperCase()}`:"",!0===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},e.id))})}),r.hasVoiceIdInput&&(0,a.jsx)(S,{label:"Voice ID",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:x,onChange:e=>{h(e.target.value),l(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,a.jsx)("button",{type:"button",onClick:()=>{h(""),l("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),r.hasLanguageDropdown&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsx)("select",{value:o,onChange:t=>{let s=(0,m.KC)(e).filter(e=>"tts"===e.type).find(e=>e.id===t.target.value);l(t.target.value),u(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,m.KC)(e).filter(e=>"tts"===e.type).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(S,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:$,onChange:e=>_(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),$&&(0,a.jsx)("button",{type:"button",onClick:()=>_(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(S,{label:"Output Format",children:(0,a.jsxs)("select",{value:L,onChange:e=>B(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>Q(eg),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:Y?"check":"content_copy"}),Y?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:ey,disabled:J||!$.trim()||!eb,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:J?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),J?"Generating...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:eg})]}),V&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:V}),U?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",W&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",W,"ms"]})]}),(0,a.jsxs)("a",{href:U,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,a.jsx)("audio",{controls:!0,src:U,className:"w-full"}),F&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:F.format,audio:F.audio?`${F.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,a.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-50",children:C})]})]})]}),Z&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>X(!1),children:(0,a.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>X(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,a.jsx)("input",{autoFocus:!0,value:er,onChange:e=>eo(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[el&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:el}),es?(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[eu.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return X(!1),y(e.code),void(f(t=ei[e.code]?.voices||[]),t.length&&(l(t[0].id),u(t[0].name),r.hasVoiceIdInput&&h(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,a.jsx)("span",{className:"text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),g===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===eu.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function E({providerId:e,kind:t}){let s=(0,c.wG)(e),r=(0,c.rs)(s)===e?s:e,o=c.rj.find(e=>e.id===t),l=A[t],d=l||{},u=(0,m.KC)(e).filter(e=>e.type===t),x=new Set(["image","video","music","imageToText"]).has(t),h=x&&0===u.length,[b,f]=(0,n.useState)(u[0]?.id??""),g=u.find(e=>e.id===b),y=!!g?.capabilities?.includes("edit"),v=!!g?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[N,k]=(0,n.useState)(""),[C,$]=(0,n.useState)(""),[T,I]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[R,O]=(0,n.useState)(""),[M,K]=(0,n.useState)(!1),[L,B]=(0,n.useState)(""),[U,D]=(0,n.useState)(""),[F,q]=(0,n.useState)(null),[J,z]=(0,n.useState)(null),[V,H]=(0,n.useState)(null),[W,G]=(0,n.useState)("json"),[Y,Q]=(0,n.useState)(""),[Z,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(""),[es,ea]=(0,n.useState)([]),[er,eo]=(0,n.useState)(""),{copied:el,copy:en}=(0,p.C)(),{copied:ei,copy:ed}=(0,p.C)();if((0,n.useEffect)(()=>{B(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{O((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&D(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{ea((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let ec=M?U:L,em=o.endpoint.path,ep=x?b?`${r}/${b}`:h?"":r:r,eu="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===b?{image:_}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===b?{image:_,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ex=N.trim()||eu.image||"",eh=C.trim()||eu.mask_image||"",eb=P(ex),ef=P(eh),eg=Object.entries(T).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),ey={model:ep,[l.bodyKey]:j,...l.extraBody,...eg,...y&&ex?{image:ex}:{},...v&&eh?{mask_image:eh}:{}},ev="image"===t&&"binary"===W,ej="image"===t&&"codex"===e&&!ev,ew=`${em}${ev?"?response_format=binary":""}`,eN=`-H "Content-Type: application/json" \\
|
|
46
|
-
-H "Authorization: Bearer ${R||"YOUR_KEY"}"${er?` \\
|
|
47
|
-
-H "x-connection-id: ${er}"`:""}${ej?` \\
|
|
48
|
-
-H "Accept: text/event-stream"`:""}`,ek=`curl -X ${o.endpoint.method} ${ec}${ew} \\
|
|
49
|
-
${eN.replace(/\\\n /g,"\\\n ")} \\
|
|
50
|
-
-d '${JSON.stringify(ey)}'${ev?" \\\n --output image.png":""}`,eS=async()=>{if(!j.trim()||!ep)return;if(X(!0),et(""),q(null),z(null),H(null),Y){try{URL.revokeObjectURL(Y)}catch{}Q("")}let e=Date.now();try{let t={"Content-Type":"application/json"};R&&(t.Authorization=`Bearer ${R}`),er&&(t["x-connection-id"]=er),ej&&(t.Accept="text/event-stream");let s={...ey,model:ep},a=await fetch(`/api${ew}`,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));et(e?.error?.message||e?.error||`HTTP ${a.status}`);return}let r=a.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await a.blob(),s=URL.createObjectURL(t);Q(s),q({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&a.body){let t=a.body.getReader(),s=new TextDecoder,r="",o=null,l=null;for(;;){let e,{done:a,value:n}=await t.read();if(a)break;for(r+=s.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let s=null,a="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(a+=e.slice(5).trim());if(s)try{let e=a?JSON.parse(a):{};"progress"===s?z(e):"partial_image"===s?H(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void et(l);o&&q({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;q({data:t,latencyMs:s})}}catch(e){et(e.message||"Network error")}finally{X(!1)}},eC=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(eC);let t={};for(let[s,a]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof a&&a.length>100?`<${a.length} chars base64>`:eC(a);return t},e$=F?JSON.stringify(eC(F.data),null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[u.length>0?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:b,onChange:e=>f(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:u.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):h?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("input",{value:b,onChange:e=>f(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ec,em]}),U&&(0,a.jsxs)("button",{onClick:()=>K(e=>!e),title:M?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${M?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:R?`${R.slice(0,8)}${"•".repeat(Math.min(20,R.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),es.length>0&&(0,a.jsx)(S,{label:"Connection",children:(0,a.jsxs)("select",{value:er,onChange:e=>eo(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto (by priority)"}),es.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,a.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,a.jsx)(S,{label:l.inputLabel,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:l.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),j&&(0,a.jsx)("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),y&&(0,a.jsx)(S,{label:"Ref Image (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:eu.image||"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),N&&(0,a.jsx)("button",{type:"button",onClick:()=>k(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,a.jsx)("img",{src:eb,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),v&&(0,a.jsx)(S,{label:"Mask (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:C,onChange:e=>$(e.target.value),placeholder:eu.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,a.jsx)("button",{type:"button",onClick:()=>$(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ef&&(0,a.jsx)("img",{src:ef,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(l.extraFields||[]).filter(e=>0===u.length||Array.isArray(g?.params)&&g.params.includes(e.key)).map(e=>(0,a.jsx)(S,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:T[e.key]??"",onChange:t=>I(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(e.options||[]).map(e=>(0,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:T[e.key]??"",placeholder:e.placeholder,onChange:t=>I(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}):(0,a.jsx)("input",{type:"number",value:T[e.key]??"",min:e.min,max:e.max,onChange:t=>I(s=>({...s,[e.key]:""===t.target.value?"":Number(t.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},e.key)),"image"===t&&(0,a.jsx)(S,{label:"Output Format",children:(0,a.jsxs)("select",{value:W,onChange:e=>G(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,a.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>en(ek),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:el?"check":"content_copy"}),el?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eS,disabled:Z||!j.trim()||!ep,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:Z?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),Z?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:ek})]}),(Z||J)&&ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 px-3 py-2 rounded-lg bg-sidebar border border-border sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:Z?{animation:"spin 1s linear infinite"}:void 0,children:Z?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[J?.stage||"starting",!Z&&J?.bytesReceived?` \xb7 ${(J.bytesReceived/1024).toFixed(1)} KB`:""]})]}),V?.b64_json&&!F&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,a.jsx)("img",{src:`data:image/png;base64,${V.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),ee&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:ee}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",F&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",F.latencyMs,"ms"]})]}),F&&(0,a.jsxs)("button",{onClick:()=>ed(e$),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ei?"check":"content_copy"}),ei?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:F?e$:l.defaultResponse}),"image"===t&&(Y||F?.data?.data?.[0])&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function R({providerId:e}){let t=(0,c.wG)(e),s=(0,m.KC)(e).filter(e=>"stt"===e.type),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,u]=(0,n.useState)(s[0]?.id??""),x=l.find(e=>e.id===d),h=Array.isArray(x?.params)?x.params:[],[b,f]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,N]=(0,n.useState)("json"),[k,C]=(0,n.useState)(""),[$,_]=(0,n.useState)(""),[P,A]=(0,n.useState)(!1),[T,I]=(0,n.useState)(""),[E,O]=(0,n.useState)(""),[M,K]=(0,n.useState)(null),[L,B]=(0,n.useState)(null),[U,D]=(0,n.useState)(!1),[F,q]=(0,n.useState)(""),{copied:J,copy:z}=(0,p.C)(),{copied:V,copy:H}=(0,p.C)();(0,n.useEffect)(()=>{I(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{_((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&O(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===e.type&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let W=P?E:T,G=d?`${t}/${d}`:"",Y=`curl -X POST ${W}/v1/audio/transcriptions \\
|
|
51
|
-
-H "Authorization: Bearer ${$||"YOUR_KEY"}" \\
|
|
52
|
-
-F "file=@${b?.name||"audio.mp3"}" \\
|
|
53
|
-
-F "model=${G}"${h.includes("language")&&g?` \\
|
|
54
|
-
-F "language=${g}"`:""}${h.includes("response_format")?` \\
|
|
55
|
-
-F "response_format=${w}"`:""}${h.includes("temperature")&&k?` \\
|
|
56
|
-
-F "temperature=${k}"`:""}${h.includes("prompt")&&v?` \\
|
|
57
|
-
-F "prompt=${v}"`:""}`,Q=async()=>{if(!b||!G)return;D(!0),q(""),K(null);let e=Date.now();try{let t=new FormData;t.append("file",b),t.append("model",G),h.includes("language")&&g&&t.append("language",g),h.includes("response_format")&&t.append("response_format",w),h.includes("temperature")&&k&&t.append("temperature",k),h.includes("prompt")&&v&&t.append("prompt",v);let s={};$&&(s.Authorization=`Bearer ${$}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});B(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void q(r?.error?.message||r?.error||r||`HTTP ${a.status}`);K(r)}catch(e){q(e.message||"Network error")}finally{D(!1)}},Z="string"==typeof M?M:M?JSON.stringify(M,null,2):`{
|
|
58
|
-
"text": "Hello world..."
|
|
59
|
-
}`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>u(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,a.jsxs)("button",{onClick:()=>A(e=>!e),title:P?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${P?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(S,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),b&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[b.name," \xb7 ",(b.size/1024).toFixed(1)," KB"]})]})}),h.includes("language")&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsx)("input",{value:g,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),h.includes("prompt")&&(0,a.jsx)(S,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("temperature")&&(0,a.jsx)(S,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,onChange:e=>C(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("response_format")&&(0,a.jsx)(S,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,onChange:e=>N(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>z(Y),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:J?"check":"content_copy"}),J?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Q,disabled:U||!b||!G,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:Y})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",M&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),M&&(0,a.jsxs)("button",{onClick:()=>H(Z),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Z})]})]})]})}function O(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,p=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[u,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(m),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,m]),!o)return(0,r.notFound)();let v=c.Q2[t],w=m?u?{id:t,name:u.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!u)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:w.serviceKinds??["llm"];return m||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,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"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${w.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${w.id}.png`,alt:w.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:w.textIcon||w.id.slice(0,2).toUpperCase(),fallbackColor:w.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:w.name}),!m&&w.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:w.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",u?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:p,children:"Delete"})]})]})]}),!m&&w.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:w.kindNotice[e]})]}),!m&&w.notice?.text&&!w.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:w.notice.text}),w.notice.apiKeyUrl&&(0,a.jsx)("a",{href:w.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&w.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(g,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?u?.prefix:void 0}),!m&&(w.searchConfig||w.fetchConfig||w.ttsConfig||w.sttConfig||w.embeddingConfig||w.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?w.fetchConfig:"tts"===e?w.ttsConfig:"stt"===e?w.sttConfig:"embedding"===e?w.embeddingConfig:w.searchConfig||{mode:"chat-completions",defaultModel:w.searchViaChat?.defaultModel,pricingUrl:w.searchViaChat?.pricingUrl,freeTier:w.searchViaChat?.freeTier},provider:w,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(T,{providerId:t,customAlias:u?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(R,{providerId:t}),!m&&A[e]&&(0,a.jsx)(E,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:f,node:u,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}}},e=>{e.O(0,[7848,4335,6795,505,4156,2347,5158,7358],()=>e(e.s=597)),_N_E=e.O()}]);
|