omniroute 3.4.5 → 3.4.6
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/BUILD_ID +1 -1
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cache/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cache/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/memory/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/search-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +3 -3
- package/app/.next/server/app/api/provider-models/route.js +2 -2
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +2 -2
- package/app/.next/server/app/api/provider-nodes/route.js +3 -3
- package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/sync-models/route.js +3 -3
- package/app/.next/server/app/api/providers/[id]/sync-models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +6 -6
- package/app/.next/server/app/api/providers/route.js +4 -4
- package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +5 -5
- package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/system/version/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +2 -2
- package/app/.next/server/app/api/usage/provider-limits/route.js +5 -5
- package/app/.next/server/app/api/usage/provider-limits/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route.js +4 -4
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/route.js +4 -4
- package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0.7zz6j._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0.lz97q._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0.m9_5-._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__00-bzx_._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__00hsd7k._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__00i_ryi._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__01fudn9._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__024slax._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__030_-af._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__03gl9dh._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__03x69ll._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__047np0t._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__04lc9.m._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__05u48b-._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__06dr~pl._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__06hr_sx._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__06r5eje._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__07.ui7z._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__075j.5s._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__07ju0wx._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__07wj.c4._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__08-9vz.._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0908q-_._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__09blmoy._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__09c50mp._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0a.3c_r._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0bkx9sd._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0c4v_hg._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0c5t729._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0cem6i6._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0d-qyrk._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0d-rd-n._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0djfz6n._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0dmb7bd._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0e7dp.z._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0el_v65._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0enebbv._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0enecpa._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0eps0zu._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0fbv0zh._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0fmf-tk._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0fw0v5q._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0g0b9au._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0gukblk._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0h-q5l0._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0h1fgwr._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0h86b7i._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0h~a5f1._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0irqapk._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0j0ez8_._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0jacr87._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0jnihz9._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0jp3yj4._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0llqbda._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0m-356c._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0mj7x5~._.js +8 -8
- package/app/.next/server/chunks/[root-of-the-server]__0mpnloa._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0n-~kvf._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0n.gjo8._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0n0nara._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0ncz8xj._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0oph175._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0p3a7_l._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0pl_899._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0prott7._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0pwiejj._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0pxqo8v._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0q04t~4._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0q9h_5u._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0qaruz-._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0qka2s7._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0rnvi83._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0rpwwig._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0rs2ec_._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0s1dq3.._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0s1ya.l._.js +5 -5
- package/app/.next/server/chunks/[root-of-the-server]__0svm~lc._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0t83olx._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0tsl88m._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0uctzvq._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0vkqjj1._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0vwq47l._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0vx1juw._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0vzvfbd._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0w39cdo._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0wc__c~._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0y2h760._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0y_c7uk._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0~8fltv._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0~dj8ev._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__10.x-iq._.js +4 -4
- package/app/.next/server/chunks/[root-of-the-server]__10e1a_z._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__10o_k-p._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__10smy7g._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__11wa4b~._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__11xpr8u._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__122-jdl._.js +8 -8
- package/app/.next/server/chunks/[root-of-the-server]__12e9-l1._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__12gh.g1._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__136nal9._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__13_i443._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__13c-d_4._.js +2 -2
- package/app/.next/server/chunks/_0-jnvci._.js +1 -1
- package/app/.next/server/chunks/_0-~thzo._.js +1 -1
- package/app/.next/server/chunks/_00.pgsp._.js +1 -1
- package/app/.next/server/chunks/_013gowh._.js +1 -1
- package/app/.next/server/chunks/{_03c-j3o._.js → _02~yzex._.js} +2 -2
- package/app/.next/server/chunks/_036lxbr._.js +1 -1
- package/app/.next/server/chunks/_05reh6o._.js +1 -1
- package/app/.next/server/chunks/_0a3.3sc._.js +1 -1
- package/app/.next/server/chunks/_0c.abwr._.js +1 -1
- package/app/.next/server/chunks/_0due8oe._.js +2 -2
- package/app/.next/server/chunks/_0h-j8c2._.js +1 -1
- package/app/.next/server/chunks/_0k43pd6._.js +3 -3
- package/app/.next/server/chunks/_0vx-r0i._.js +2 -2
- package/app/.next/server/chunks/_10.rw9f._.js +1 -1
- package/app/.next/server/chunks/_13mo7j5._.js +1 -1
- package/app/.next/server/chunks/src_0f_le~m._.js +1 -1
- package/app/.next/server/chunks/ssr/_008ht2n._.js +2 -2
- package/app/.next/server/chunks/ssr/_0oo1f90._.js +2 -2
- package/app/.next/server/chunks/ssr/_0~laquj._.js +1 -1
- package/app/.next/server/chunks/ssr/src_04gjot1._.js +1 -1
- package/app/.next/server/chunks/ssr/src_app_(dashboard)_dashboard_cache_04_vca6._.js +1 -1
- package/app/.next/server/chunks/ssr/{src_app_(dashboard)_dashboard_settings_0ni3aus._.js → src_app_(dashboard)_dashboard_settings_09gq48u._.js} +2 -2
- package/app/.next/server/chunks/ssr/src_i18n_messages_en_json_[json]_cjs_13rg.m2._.js +1 -1
- package/app/.next/server/chunks/ssr/src_i18n_messages_pt-BR_json_[json]_cjs_01n5fvn._.js +1 -1
- package/app/.next/server/chunks/ssr/src_i18n_messages_pt_json_[json]_cjs_0fwb8p.._.js +1 -1
- package/app/.next/server/chunks/ssr/src_shared_0jy4djq._.js +3 -0
- package/app/.next/server/chunks/ssr/src_shared_components_0v5o286._.js +3 -0
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{03~_6b5~n101_.js → 0.ap2gsi3d-1e.js} +1 -1
- package/app/.next/static/chunks/08iujr48xci8k.js +1 -0
- package/app/.next/static/chunks/{0up_y.7qkqwxz.js → 08n6n76lz~vt6.js} +1 -1
- package/app/.next/static/chunks/{060zmf~qn1q6y.js → 0f611s~575pn8.js} +1 -1
- package/app/.next/static/chunks/0y5kx9rgeb6~_.js +1 -0
- package/app/.next/static/chunks/13xz-222deqiy.js +1 -0
- package/app/CHANGELOG.md +18 -0
- package/app/docs/openapi.yaml +1 -1
- package/app/llm.txt +2 -2
- package/app/open-sse/handlers/chatCore.ts +2 -2
- package/app/open-sse/package.json +1 -1
- package/app/open-sse/translator/request/claude-to-gemini.ts +17 -0
- package/app/open-sse/translator/request/openai-to-gemini.ts +14 -3
- package/app/open-sse/utils/stream.ts +2 -2
- package/app/package-lock.json +3 -3
- package/app/package.json +1 -1
- package/app/src/app/(dashboard)/dashboard/cache/components/CacheTrends.tsx +19 -12
- package/app/src/app/(dashboard)/dashboard/cache/page.tsx +0 -3
- package/app/src/app/(dashboard)/dashboard/memory/page.tsx +20 -20
- package/app/src/i18n/messages/en.json +55 -1
- package/app/src/i18n/messages/pt-BR.json +53 -0
- package/app/src/i18n/messages/pt.json +54 -1
- package/app/src/shared/constants/providers.ts +40 -0
- package/app/src/shared/constants/sidebarVisibility.ts +6 -0
- package/app/src/shared/utils/circuitBreaker.ts +14 -4
- package/package.json +1 -1
- package/app/.next/server/chunks/ssr/src_05ekey-._.js +0 -3
- package/app/.next/server/chunks/ssr/src_100xxow._.js +0 -3
- package/app/.next/static/chunks/05tcrkqknq.20.js +0 -1
- package/app/.next/static/chunks/0eng4c9gz1s4..js +0 -1
- package/app/.next/static/chunks/0go~kwn1zgxnd.js +0 -1
- /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_buildManifest.js +0 -0
- /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},442315,(e,t,r)=>{"use strict";t.exports=e.r(918622)},347540,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].React},819481,(e,t,r)=>{"use strict";var n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i={},l={RequestCookies:()=>h,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>m,stringifyCookie:()=>c};for(var u in l)n(i,u,{get:l[u],enumerable:!0});function c(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,s]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=s?s:"true"))}catch{}}return t}function m(e){if(!e)return;let[[t,r],...n]=d(e),{domain:s,expires:a,httponly:o,maxage:i,path:l,samesite:u,secure:c,partitioned:m,priority:h}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,y,_={name:t,value:decodeURIComponent(r),domain:s,...a&&{expires:new Date(a)},...o&&{httpOnly:!0},..."string"==typeof i&&{maxAge:Number(i)},path:l,...u&&{sameSite:p.includes(g=(g=u).toLowerCase())?g:void 0},...c&&{secure:!0},...h&&{priority:f.includes(y=(y=h).toLowerCase())?y:void 0},...m&&{partitioned:!0}};let e={};for(let t in _)_[t]&&(e[t]=_[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of a(t))o.call(e,i)||void 0===i||n(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e})(n({},"__esModule",{value:!0}),i);var p=["strict","lax","none"],f=["low","medium","high"],h=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>c(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>c(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;const s=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(const e of Array.isArray(s)?s:function(e){if(!e)return[];var t,r,n,s,a,o=[],i=0;function l(){for(;i<e.length&&/\s/.test(e.charAt(i));)i+=1;return i<e.length}for(;i<e.length;){for(t=i,a=!1;l();)if(","===(r=e.charAt(i))){for(n=i,i+=1,l(),s=i;i<e.length&&"="!==(r=e.charAt(i))&&";"!==r&&","!==r;)i+=1;i<e.length&&"="===e.charAt(i)?(a=!0,i=s,o.push(e.substring(t,n)),t=i):i=n+1}else i+=1;(!a||i>=e.length)&&o.push(e.substring(t,e.length))}return o}(s)){const t=m(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,s=this._parsed;return s.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=c(r);t.append("set-cookie",e)}}(s,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join("; ")}}},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},256770,e=>{"use strict";var t=e.i(814747),r=e.i(446786);let n="omniroute";function s(){try{return r.default.homedir()}catch{return process.cwd()}}function a(e){if("string"!=typeof e)return null;let r=e.trim();return r?t.default.resolve(r):null}function o(){return t.default.join(s(),`.${n}`)}e.s(["getLegacyDotDataDir",0,o,"isSamePath",0,function(e,r){return!!e&&!!r&&t.default.resolve(e)===t.default.resolve(r)},"resolveDataDir",0,function({isCloud:e=!1}={}){let r;if(e)return"/tmp";let i=a(process.env.DATA_DIR);return i?i:(s(),(r=a(process.env.XDG_CONFIG_HOME))?t.default.join(r,n):o())}])},97793,e=>{"use strict";let t=new Set(["host","connection","content-length","keep-alive","proxy-connection","transfer-encoding","te","trailer","upgrade"].map(e=>e.toLowerCase()));e.s(["isForbiddenUpstreamHeaderName",0,function(e){return t.has(String(e).trim().toLowerCase())}])},677850,e=>e.a(async(t,r)=>{try{let t=await e.y("zod");e.n(t),r()}catch(e){r(e)}},!0),200392,e=>e.a(async(t,r)=>{try{var n=e.i(677850),s=t([n]);[n]=s.then?(await s)():s,n.z.object({password:n.z.string().min(1,"Password is required").max(200)}),e.s(["isValidationFailure",0,function(e){return!1===e.success},"validateBody",0,function(e,t){let r=e.safeParse(t);if(r.success)return{success:!0,data:r.data};let n=Array.isArray(r.error?.issues)?r.error.issues:[];return{success:!1,error:{message:"Invalid request",details:n.map(e=>({field:e.path.join("."),message:e.message}))}}}]),r()}catch(e){r(e)}},!1),41244,e=>{"use strict";e.s(["HIDEABLE_SIDEBAR_ITEM_IDS",0,["home","endpoints","api-manager","providers","combos","auto-combo","costs","analytics","limits","cache","cli-tools","agents","translator","playground","media","search-tools","health","logs","audit","settings","docs","issues"]])},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},997953,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].ReactServerDOMTurbopackServer},745015,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"registerServerReference",{enumerable:!0,get:function(){return n.registerServerReference}});let n=e.r(997953)},195975,(e,t,r)=>{"use strict";function n(e){for(let t=0;t<e.length;t++){let r=e[t];if("function"!=typeof r)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof r}.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ensureServerEntryExports",{enumerable:!0,get:function(){return n}})},266240,e=>{"use strict";let t,r,n,s,a,o,i,l,u;var c=e.i(924868),d=e.i(522734),m=e.i(446786),p=e.i(814747),f=e.i(233405);let h=new Set(["auto","host","container"]),g=new Set(["0","false","no","off"]),y={claude:{defaultCommand:"claude",envBinKey:"CLI_CLAUDE_BIN",requiresBinary:!0,healthcheckTimeoutMs:4e3,paths:{settings:".claude/settings.json"}},codex:{defaultCommand:"codex",envBinKey:"CLI_CODEX_BIN",requiresBinary:!0,healthcheckTimeoutMs:4e3,paths:{config:".codex/config.toml",auth:".codex/auth.json"}},droid:{defaultCommand:"droid",envBinKey:"CLI_DROID_BIN",requiresBinary:!0,healthcheckTimeoutMs:8e3,paths:{settings:".factory/settings.json"}},openclaw:{defaultCommand:"openclaw",envBinKey:"CLI_OPENCLAW_BIN",requiresBinary:!0,healthcheckTimeoutMs:15e3,paths:{settings:".openclaw/openclaw.json"}},cursor:{defaultCommands:["agent","cursor"],envBinKey:"CLI_CURSOR_BIN",requiresBinary:!0,healthcheckTimeoutMs:15e3,paths:{config:".cursor/cli-config.json",auth:".config/cursor/auth.json",state:".cursor/agent-cli-state.json"}},windsurf:{defaultCommand:null,envBinKey:"CLI_WINDSURF_BIN",requiresBinary:!1,healthcheckTimeoutMs:4e3,paths:{}},cline:{defaultCommand:"cline",envBinKey:"CLI_CLINE_BIN",requiresBinary:!0,healthcheckTimeoutMs:12e3,paths:{globalState:".cline/data/globalState.json",secrets:".cline/data/secrets.json"}},kilo:{defaultCommand:"kilocode",envBinKey:"CLI_KILO_BIN",requiresBinary:!0,healthcheckTimeoutMs:15e3,paths:{auth:".local/share/kilo/auth.json"}},continue:{defaultCommand:null,envBinKey:"CLI_CONTINUE_BIN",requiresBinary:!1,healthcheckTimeoutMs:15e3,paths:{settings:".continue/config.json"}},opencode:{defaultCommand:"opencode",envBinKey:"CLI_OPENCODE_BIN",requiresBinary:!0,healthcheckTimeoutMs:15e3,paths:{config:".config/opencode/opencode.json"}},qoder:{defaultCommand:"qodercli",envBinKey:"CLI_QODER_BIN",requiresBinary:!0,healthcheckTimeoutMs:12e3,paths:{config:".qoder/settings.json",auth:".qoder/auth.json"}}},_=(e,t,{env:r,timeoutMs:n=3e3}={})=>new Promise(s=>{let a="",o="",i=!1,l=!1,u=(0,f.spawn)(e,t,{env:r,stdio:["ignore","pipe","pipe"],..."win32"===process.platform?"TURBOPACK unreachable":{}}),c=setTimeout(()=>{i=!0,u.kill("SIGKILL")},n),d=e=>{l||(l=!0,clearTimeout(c),s(e))};u.stdout.on("data",e=>{a+=e.toString()}),u.stderr.on("data",e=>{o+=e.toString()}),u.on("error",e=>{d({ok:!1,code:null,stdout:a.trim(),stderr:o.trim(),timedOut:i,error:e?.message||"spawn_error"})}),u.on("close",e=>{d({ok:!i&&0===e,code:e,stdout:a.trim(),stderr:o.trim(),timedOut:i,error:i?"timeout":null})})}),v=["&","|",";","<",">","(",")","`","$","^","%","!"],x=(e,t)=>{let r=e=>p.default.normalize(e).toLowerCase().replace(/\\/g,"/"),n=r(e),s=r(t);if(n===s)return!0;let a=s.endsWith("/")?s:s+"/";return n.startsWith(a)},C=e=>!(!e||!p.default.isAbsolute(e)||v.some(t=>e.includes(t))),b=(e,t)=>{if(!e)return"";let r=e.trim();if(!p.default.isAbsolute(r)||v.some(e=>r.includes(e)))return"";let n=p.default.normalize(r);return n.includes("..")||t.length>0&&!t.some(e=>x(n,e))?"":n},P=()=>{if(void 0!==t)return t;let e=String(process.env.npm_config_prefix||"").trim();if(e&&p.default.isAbsolute(e))return t=e;try{let e=(0,f.execFileSync)("npm",["config","get","prefix"],{timeout:5e3,encoding:"utf8",stdio:["ignore","pipe","ignore"],..."win32"===process.platform?"TURBOPACK unreachable":{}}).trim();if(e&&p.default.isAbsolute(e)&&!v.some(t=>e.includes(t)))return t=e}catch{}return t=""},j=(r=m.default.homedir(),n=process.env.USERPROFILE||r,s=b(process.env.APPDATA,[r,n]),a=b(process.env.LOCALAPPDATA,[p.default.join(r,"AppData","Local"),p.default.join(n,"AppData","Local"),n]),o=b(process.env.ProgramFiles,["C:\\Program Files","C:\\Program Files (x86)"]),i=b(process.env["ProgramFiles(x86)"],["C:\\Program Files","C:\\Program Files (x86)"]),l=P(),u=[p.default.join(r,"bin"),p.default.join(r,".local","bin")],[r,...u,n,s,a,o,i,l].filter(Boolean)),A=async e=>{if(!C(e))return{installed:!1,commandPath:null,reason:"unsafe_path"};try{await c.default.access(e,c.default.constants.F_OK)}catch{return{installed:!1,commandPath:null,reason:"not_found"}}try{return await c.default.access(e,c.default.constants.X_OK),{installed:!0,commandPath:e,reason:null}}catch{return{installed:!0,commandPath:e,reason:"not_executable"}}},w=async(e,t)=>{if(!e)return{installed:!1,commandPath:null,reason:"missing_command"};if(e.includes("/")||e.includes("\\"))return A(e);process.platform;let r=await _("sh",["-c",'command -v -- "$1"',"sh",e],{env:t,timeoutMs:3e3});return r.ok&&r.stdout?{installed:!0,commandPath:e,reason:null}:{installed:!1,commandPath:null,reason:"not_found"}},O=async e=>{if(!p.default.isAbsolute(e))return{installed:!1,commandPath:null,reason:"not_absolute"};if(!C(e))return{installed:!1,commandPath:null,reason:"unsafe_path"};try{let t=await c.default.realpath(e);if(!j.some(e=>x(t,e)))return{installed:!1,commandPath:null,reason:"symlink_escape"};let r=await c.default.stat(t);if(!r.isFile())return{installed:!1,commandPath:null,reason:"not_file"};if(r.size<30||r.size>0x15e00000)return{installed:!1,commandPath:null,reason:"suspicious_size"}}catch(t){let e=t.code;if("ENOENT"===e)return{installed:!1,commandPath:null,reason:"not_found"};if("EINVAL"===e)return{installed:!1,commandPath:null,reason:"invalid_path"};return{installed:!1,commandPath:null,reason:"access_error"}}try{return await c.default.access(e,c.default.constants.X_OK),{installed:!0,commandPath:e,reason:null}}catch{return{installed:!0,commandPath:e,reason:"not_executable"}}},S=async(e,t,r)=>{if(!Array.isArray(e)||0===e.length)return{command:null,installed:!1,commandPath:null,reason:"missing_command"};if(r)for(let t of(e=>{let t=m.default.homedir(),r=[],n=P();if(process.execPath.toLowerCase().includes("nvm")&&p.default.dirname(process.execPath),"win32"===process.platform);else for(let[,s]of({claude:[["claude.cmd","claude"],["claude.exe","claude"]],codex:[["codex.cmd","codex"]],droid:[["droid.cmd","droid"],["droid.exe","droid"]],openclaw:[["openclaw.cmd","openclaw"]],cursor:[["agent.cmd","agent"],["cursor.cmd","cursor"]],cline:[["cline.cmd","cline"]],kilo:[["kilocode.cmd","kilocode"]],opencode:[["opencode.cmd","opencode"]],qoder:[["qodercli.exe","qodercli"]]})[e]||[]){let a=p.default.dirname(process.execPath);r.push(p.default.join(a,s)),n&&r.push(p.default.join(n,"bin",s)),r.push(p.default.join(t,".local","bin",s)),d.default.existsSync("/usr/local/bin")&&r.push(p.default.join("/usr","local","bin",s)),d.default.existsSync("/usr/bin")&&r.push(p.default.join("/usr","bin",s)),"opencode"===e&&r.push(p.default.join(t,".opencode","bin",s)),"claude"===e&&r.push(p.default.join(t,".claude","bin",s))}return r})(r)){let r=await O(t);if(r.installed&&null===r.reason)return{command:e[0],installed:!0,commandPath:r.commandPath,reason:null}}for(let r of e){let e=await w(r,t);if(e.installed||"not_found"!==e.reason)return{command:r,...e}}return{command:e[0],installed:!1,commandPath:null,reason:"not_found"}},I=async(e,t,r=4e3)=>{let n={PATH:t.PATH,HOME:t.HOME||t.USERPROFILE,SystemRoot:t.SystemRoot,PATHEXT:t.PATHEXT};for(let t of[["--version"],["-v"]]){let s=await _(e,t,{env:n,timeoutMs:r});if(s.ok&&s.stdout.length>0&&s.stdout.length<4096)return{runnable:!0,reason:null,version:s.stdout.trim()}}return{runnable:!1,reason:"healthcheck_failed"}},k=()=>((e=process.platform,t=process.env,r=m.default.homedir())=>p.default.join(((e=process.platform,t=process.env,r=m.default.homedir())=>"win32"===e?String(t.APPDATA||"").trim()||p.default.join(r,"AppData","Roaming"):String(t.XDG_CONFIG_HOME||"").trim()||p.default.join(r,".config"))(e,t,r),"opencode","opencode.json"))(),B=e=>{let t=y[e];if(!t)return null;if("opencode"===e)return{config:k()};let r=(()=>{let e=String(process.env.CLI_CONFIG_HOME||"").trim();if(!e||!p.default.isAbsolute(e)||v.some(t=>e.includes(t))||p.default.normalize(e).includes(".."))return m.default.homedir();let t=m.default.homedir(),r=p.default.normalize(e);return x(r,t)?r:t})();return Object.fromEntries(Object.entries(t.paths).map(([e,t])=>[e,p.default.join(r,t)]))},L=async e=>{let t,r,n,s=y[e],a=(t=String(process.env.CLI_MODE||"auto").trim().toLowerCase(),h.has(t)?t:"auto");if(!s)return{installed:!1,runnable:!1,command:null,commandPath:null,reason:"unknown_tool",runtimeMode:a,requiresBinary:!1};let o=(r={...process.env},(n=String(process.env.CLI_EXTRA_PATHS||"").split(p.default.delimiter).map(e=>e.trim()).filter(Boolean).filter(e=>!(!p.default.isAbsolute(e)||v.some(t=>e.includes(t))||p.default.normalize(e).includes("..")))).length>0&&(r.PATH=[...n,r.PATH||""].filter(Boolean).join(p.default.delimiter)),r),i=(e=>{let t=y[e];if(!t)return[];let r=String(process.env[t.envBinKey]||"").trim();return r?[r]:Array.isArray(t.defaultCommands)&&t.defaultCommands.length>0?t.defaultCommands.filter(Boolean):t.defaultCommand?[t.defaultCommand]:[]})(e),l=!1!==s.requiresBinary;if(!l&&0===i.length)return{installed:!0,runnable:!0,command:null,commandPath:null,reason:"not_required",runtimeMode:a,requiresBinary:l};let u=String(process.env[s.envBinKey]||"").trim(),c=await S(i,o,u?void 0:e),d=c.command;if(!c.installed)return{installed:!1,runnable:!1,command:d,commandPath:null,reason:c.reason||"not_found",runtimeMode:a,requiresBinary:l};if("not_executable"===c.reason)return{installed:!0,runnable:!1,command:d,commandPath:c.commandPath,reason:"not_executable",runtimeMode:a,requiresBinary:l};let m=await I(c.commandPath,o,Number(s.healthcheckTimeoutMs||4e3));return{installed:!0,runnable:m.runnable,command:d,commandPath:c.commandPath,reason:m.reason,runtimeMode:a,requiresBinary:l}},E=Object.keys(y);e.s(["CLI_TOOL_IDS",0,E,"ensureCliConfigWriteAllowed",0,()=>((e,t=!0)=>null==e||""===e?t:!g.has(String(e).trim().toLowerCase()))(process.env.CLI_ALLOW_CONFIG_WRITES,!0)?null:"CLI config writes are disabled (CLI_ALLOW_CONFIG_WRITES=false)","getCliConfigPaths",0,B,"getCliPrimaryConfigPath",0,e=>{let t=B(e);if(!t)return null;let r=Object.keys(t)[0];return r?t[r]:null},"getCliRuntimeStatus",0,L,"getOpenCodeConfigPath",0,k])},452484,e=>{e.v(t=>Promise.all(["server/chunks/src_shared_services_backupService_ts_0ctvkoe._.js"].map(t=>e.l(t))).then(()=>t(841788)))}];
|
|
1
|
+
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},442315,(e,t,r)=>{"use strict";t.exports=e.r(918622)},347540,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].React},819481,(e,t,r)=>{"use strict";var n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i={},l={RequestCookies:()=>h,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>m,stringifyCookie:()=>c};for(var u in l)n(i,u,{get:l[u],enumerable:!0});function c(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,s]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=s?s:"true"))}catch{}}return t}function m(e){if(!e)return;let[[t,r],...n]=d(e),{domain:s,expires:a,httponly:o,maxage:i,path:l,samesite:u,secure:c,partitioned:m,priority:h}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,y,_={name:t,value:decodeURIComponent(r),domain:s,...a&&{expires:new Date(a)},...o&&{httpOnly:!0},..."string"==typeof i&&{maxAge:Number(i)},path:l,...u&&{sameSite:p.includes(g=(g=u).toLowerCase())?g:void 0},...c&&{secure:!0},...h&&{priority:f.includes(y=(y=h).toLowerCase())?y:void 0},...m&&{partitioned:!0}};let e={};for(let t in _)_[t]&&(e[t]=_[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of a(t))o.call(e,i)||void 0===i||n(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e})(n({},"__esModule",{value:!0}),i);var p=["strict","lax","none"],f=["low","medium","high"],h=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>c(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>c(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;const s=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(const e of Array.isArray(s)?s:function(e){if(!e)return[];var t,r,n,s,a,o=[],i=0;function l(){for(;i<e.length&&/\s/.test(e.charAt(i));)i+=1;return i<e.length}for(;i<e.length;){for(t=i,a=!1;l();)if(","===(r=e.charAt(i))){for(n=i,i+=1,l(),s=i;i<e.length&&"="!==(r=e.charAt(i))&&";"!==r&&","!==r;)i+=1;i<e.length&&"="===e.charAt(i)?(a=!0,i=s,o.push(e.substring(t,n)),t=i):i=n+1}else i+=1;(!a||i>=e.length)&&o.push(e.substring(t,e.length))}return o}(s)){const t=m(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,s=this._parsed;return s.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=c(r);t.append("set-cookie",e)}}(s,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join("; ")}}},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},256770,e=>{"use strict";var t=e.i(814747),r=e.i(446786);let n="omniroute";function s(){try{return r.default.homedir()}catch{return process.cwd()}}function a(e){if("string"!=typeof e)return null;let r=e.trim();return r?t.default.resolve(r):null}function o(){return t.default.join(s(),`.${n}`)}e.s(["getLegacyDotDataDir",0,o,"isSamePath",0,function(e,r){return!!e&&!!r&&t.default.resolve(e)===t.default.resolve(r)},"resolveDataDir",0,function({isCloud:e=!1}={}){let r;if(e)return"/tmp";let i=a(process.env.DATA_DIR);return i?i:(s(),(r=a(process.env.XDG_CONFIG_HOME))?t.default.join(r,n):o())}])},97793,e=>{"use strict";let t=new Set(["host","connection","content-length","keep-alive","proxy-connection","transfer-encoding","te","trailer","upgrade"].map(e=>e.toLowerCase()));e.s(["isForbiddenUpstreamHeaderName",0,function(e){return t.has(String(e).trim().toLowerCase())}])},677850,e=>e.a(async(t,r)=>{try{let t=await e.y("zod");e.n(t),r()}catch(e){r(e)}},!0),200392,e=>e.a(async(t,r)=>{try{var n=e.i(677850),s=t([n]);[n]=s.then?(await s)():s,n.z.object({password:n.z.string().min(1,"Password is required").max(200)}),e.s(["isValidationFailure",0,function(e){return!1===e.success},"validateBody",0,function(e,t){let r=e.safeParse(t);if(r.success)return{success:!0,data:r.data};let n=Array.isArray(r.error?.issues)?r.error.issues:[];return{success:!1,error:{message:"Invalid request",details:n.map(e=>({field:e.path.join("."),message:e.message}))}}}]),r()}catch(e){r(e)}},!1),41244,e=>{"use strict";e.s(["HIDEABLE_SIDEBAR_ITEM_IDS",0,["home","endpoints","api-manager","providers","combos","auto-combo","costs","analytics","limits","cache","cli-tools","agents","memory","skills","translator","playground","media","search-tools","health","logs","audit","settings","docs","issues"]])},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},997953,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].ReactServerDOMTurbopackServer},745015,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"registerServerReference",{enumerable:!0,get:function(){return n.registerServerReference}});let n=e.r(997953)},195975,(e,t,r)=>{"use strict";function n(e){for(let t=0;t<e.length;t++){let r=e[t];if("function"!=typeof r)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof r}.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ensureServerEntryExports",{enumerable:!0,get:function(){return n}})},266240,e=>{"use strict";let t,r,n,s,a,o,i,l,u;var c=e.i(924868),d=e.i(522734),m=e.i(446786),p=e.i(814747),f=e.i(233405);let h=new Set(["auto","host","container"]),g=new Set(["0","false","no","off"]),y={claude:{defaultCommand:"claude",envBinKey:"CLI_CLAUDE_BIN",requiresBinary:!0,healthcheckTimeoutMs:4e3,paths:{settings:".claude/settings.json"}},codex:{defaultCommand:"codex",envBinKey:"CLI_CODEX_BIN",requiresBinary:!0,healthcheckTimeoutMs:4e3,paths:{config:".codex/config.toml",auth:".codex/auth.json"}},droid:{defaultCommand:"droid",envBinKey:"CLI_DROID_BIN",requiresBinary:!0,healthcheckTimeoutMs:8e3,paths:{settings:".factory/settings.json"}},openclaw:{defaultCommand:"openclaw",envBinKey:"CLI_OPENCLAW_BIN",requiresBinary:!0,healthcheckTimeoutMs:15e3,paths:{settings:".openclaw/openclaw.json"}},cursor:{defaultCommands:["agent","cursor"],envBinKey:"CLI_CURSOR_BIN",requiresBinary:!0,healthcheckTimeoutMs:15e3,paths:{config:".cursor/cli-config.json",auth:".config/cursor/auth.json",state:".cursor/agent-cli-state.json"}},windsurf:{defaultCommand:null,envBinKey:"CLI_WINDSURF_BIN",requiresBinary:!1,healthcheckTimeoutMs:4e3,paths:{}},cline:{defaultCommand:"cline",envBinKey:"CLI_CLINE_BIN",requiresBinary:!0,healthcheckTimeoutMs:12e3,paths:{globalState:".cline/data/globalState.json",secrets:".cline/data/secrets.json"}},kilo:{defaultCommand:"kilocode",envBinKey:"CLI_KILO_BIN",requiresBinary:!0,healthcheckTimeoutMs:15e3,paths:{auth:".local/share/kilo/auth.json"}},continue:{defaultCommand:null,envBinKey:"CLI_CONTINUE_BIN",requiresBinary:!1,healthcheckTimeoutMs:15e3,paths:{settings:".continue/config.json"}},opencode:{defaultCommand:"opencode",envBinKey:"CLI_OPENCODE_BIN",requiresBinary:!0,healthcheckTimeoutMs:15e3,paths:{config:".config/opencode/opencode.json"}},qoder:{defaultCommand:"qodercli",envBinKey:"CLI_QODER_BIN",requiresBinary:!0,healthcheckTimeoutMs:12e3,paths:{config:".qoder/settings.json",auth:".qoder/auth.json"}}},_=(e,t,{env:r,timeoutMs:n=3e3}={})=>new Promise(s=>{let a="",o="",i=!1,l=!1,u=(0,f.spawn)(e,t,{env:r,stdio:["ignore","pipe","pipe"],..."win32"===process.platform?"TURBOPACK unreachable":{}}),c=setTimeout(()=>{i=!0,u.kill("SIGKILL")},n),d=e=>{l||(l=!0,clearTimeout(c),s(e))};u.stdout.on("data",e=>{a+=e.toString()}),u.stderr.on("data",e=>{o+=e.toString()}),u.on("error",e=>{d({ok:!1,code:null,stdout:a.trim(),stderr:o.trim(),timedOut:i,error:e?.message||"spawn_error"})}),u.on("close",e=>{d({ok:!i&&0===e,code:e,stdout:a.trim(),stderr:o.trim(),timedOut:i,error:i?"timeout":null})})}),v=["&","|",";","<",">","(",")","`","$","^","%","!"],x=(e,t)=>{let r=e=>p.default.normalize(e).toLowerCase().replace(/\\/g,"/"),n=r(e),s=r(t);if(n===s)return!0;let a=s.endsWith("/")?s:s+"/";return n.startsWith(a)},C=e=>!(!e||!p.default.isAbsolute(e)||v.some(t=>e.includes(t))),b=(e,t)=>{if(!e)return"";let r=e.trim();if(!p.default.isAbsolute(r)||v.some(e=>r.includes(e)))return"";let n=p.default.normalize(r);return n.includes("..")||t.length>0&&!t.some(e=>x(n,e))?"":n},P=()=>{if(void 0!==t)return t;let e=String(process.env.npm_config_prefix||"").trim();if(e&&p.default.isAbsolute(e))return t=e;try{let e=(0,f.execFileSync)("npm",["config","get","prefix"],{timeout:5e3,encoding:"utf8",stdio:["ignore","pipe","ignore"],..."win32"===process.platform?"TURBOPACK unreachable":{}}).trim();if(e&&p.default.isAbsolute(e)&&!v.some(t=>e.includes(t)))return t=e}catch{}return t=""},j=(r=m.default.homedir(),n=process.env.USERPROFILE||r,s=b(process.env.APPDATA,[r,n]),a=b(process.env.LOCALAPPDATA,[p.default.join(r,"AppData","Local"),p.default.join(n,"AppData","Local"),n]),o=b(process.env.ProgramFiles,["C:\\Program Files","C:\\Program Files (x86)"]),i=b(process.env["ProgramFiles(x86)"],["C:\\Program Files","C:\\Program Files (x86)"]),l=P(),u=[p.default.join(r,"bin"),p.default.join(r,".local","bin")],[r,...u,n,s,a,o,i,l].filter(Boolean)),A=async e=>{if(!C(e))return{installed:!1,commandPath:null,reason:"unsafe_path"};try{await c.default.access(e,c.default.constants.F_OK)}catch{return{installed:!1,commandPath:null,reason:"not_found"}}try{return await c.default.access(e,c.default.constants.X_OK),{installed:!0,commandPath:e,reason:null}}catch{return{installed:!0,commandPath:e,reason:"not_executable"}}},w=async(e,t)=>{if(!e)return{installed:!1,commandPath:null,reason:"missing_command"};if(e.includes("/")||e.includes("\\"))return A(e);process.platform;let r=await _("sh",["-c",'command -v -- "$1"',"sh",e],{env:t,timeoutMs:3e3});return r.ok&&r.stdout?{installed:!0,commandPath:e,reason:null}:{installed:!1,commandPath:null,reason:"not_found"}},O=async e=>{if(!p.default.isAbsolute(e))return{installed:!1,commandPath:null,reason:"not_absolute"};if(!C(e))return{installed:!1,commandPath:null,reason:"unsafe_path"};try{let t=await c.default.realpath(e);if(!j.some(e=>x(t,e)))return{installed:!1,commandPath:null,reason:"symlink_escape"};let r=await c.default.stat(t);if(!r.isFile())return{installed:!1,commandPath:null,reason:"not_file"};if(r.size<30||r.size>0x15e00000)return{installed:!1,commandPath:null,reason:"suspicious_size"}}catch(t){let e=t.code;if("ENOENT"===e)return{installed:!1,commandPath:null,reason:"not_found"};if("EINVAL"===e)return{installed:!1,commandPath:null,reason:"invalid_path"};return{installed:!1,commandPath:null,reason:"access_error"}}try{return await c.default.access(e,c.default.constants.X_OK),{installed:!0,commandPath:e,reason:null}}catch{return{installed:!0,commandPath:e,reason:"not_executable"}}},S=async(e,t,r)=>{if(!Array.isArray(e)||0===e.length)return{command:null,installed:!1,commandPath:null,reason:"missing_command"};if(r)for(let t of(e=>{let t=m.default.homedir(),r=[],n=P();if(process.execPath.toLowerCase().includes("nvm")&&p.default.dirname(process.execPath),"win32"===process.platform);else for(let[,s]of({claude:[["claude.cmd","claude"],["claude.exe","claude"]],codex:[["codex.cmd","codex"]],droid:[["droid.cmd","droid"],["droid.exe","droid"]],openclaw:[["openclaw.cmd","openclaw"]],cursor:[["agent.cmd","agent"],["cursor.cmd","cursor"]],cline:[["cline.cmd","cline"]],kilo:[["kilocode.cmd","kilocode"]],opencode:[["opencode.cmd","opencode"]],qoder:[["qodercli.exe","qodercli"]]})[e]||[]){let a=p.default.dirname(process.execPath);r.push(p.default.join(a,s)),n&&r.push(p.default.join(n,"bin",s)),r.push(p.default.join(t,".local","bin",s)),d.default.existsSync("/usr/local/bin")&&r.push(p.default.join("/usr","local","bin",s)),d.default.existsSync("/usr/bin")&&r.push(p.default.join("/usr","bin",s)),"opencode"===e&&r.push(p.default.join(t,".opencode","bin",s)),"claude"===e&&r.push(p.default.join(t,".claude","bin",s))}return r})(r)){let r=await O(t);if(r.installed&&null===r.reason)return{command:e[0],installed:!0,commandPath:r.commandPath,reason:null}}for(let r of e){let e=await w(r,t);if(e.installed||"not_found"!==e.reason)return{command:r,...e}}return{command:e[0],installed:!1,commandPath:null,reason:"not_found"}},k=async(e,t,r=4e3)=>{let n={PATH:t.PATH,HOME:t.HOME||t.USERPROFILE,SystemRoot:t.SystemRoot,PATHEXT:t.PATHEXT};for(let t of[["--version"],["-v"]]){let s=await _(e,t,{env:n,timeoutMs:r});if(s.ok&&s.stdout.length>0&&s.stdout.length<4096)return{runnable:!0,reason:null,version:s.stdout.trim()}}return{runnable:!1,reason:"healthcheck_failed"}},I=()=>((e=process.platform,t=process.env,r=m.default.homedir())=>p.default.join(((e=process.platform,t=process.env,r=m.default.homedir())=>"win32"===e?String(t.APPDATA||"").trim()||p.default.join(r,"AppData","Roaming"):String(t.XDG_CONFIG_HOME||"").trim()||p.default.join(r,".config"))(e,t,r),"opencode","opencode.json"))(),B=e=>{let t=y[e];if(!t)return null;if("opencode"===e)return{config:I()};let r=(()=>{let e=String(process.env.CLI_CONFIG_HOME||"").trim();if(!e||!p.default.isAbsolute(e)||v.some(t=>e.includes(t))||p.default.normalize(e).includes(".."))return m.default.homedir();let t=m.default.homedir(),r=p.default.normalize(e);return x(r,t)?r:t})();return Object.fromEntries(Object.entries(t.paths).map(([e,t])=>[e,p.default.join(r,t)]))},L=async e=>{let t,r,n,s=y[e],a=(t=String(process.env.CLI_MODE||"auto").trim().toLowerCase(),h.has(t)?t:"auto");if(!s)return{installed:!1,runnable:!1,command:null,commandPath:null,reason:"unknown_tool",runtimeMode:a,requiresBinary:!1};let o=(r={...process.env},(n=String(process.env.CLI_EXTRA_PATHS||"").split(p.default.delimiter).map(e=>e.trim()).filter(Boolean).filter(e=>!(!p.default.isAbsolute(e)||v.some(t=>e.includes(t))||p.default.normalize(e).includes("..")))).length>0&&(r.PATH=[...n,r.PATH||""].filter(Boolean).join(p.default.delimiter)),r),i=(e=>{let t=y[e];if(!t)return[];let r=String(process.env[t.envBinKey]||"").trim();return r?[r]:Array.isArray(t.defaultCommands)&&t.defaultCommands.length>0?t.defaultCommands.filter(Boolean):t.defaultCommand?[t.defaultCommand]:[]})(e),l=!1!==s.requiresBinary;if(!l&&0===i.length)return{installed:!0,runnable:!0,command:null,commandPath:null,reason:"not_required",runtimeMode:a,requiresBinary:l};let u=String(process.env[s.envBinKey]||"").trim(),c=await S(i,o,u?void 0:e),d=c.command;if(!c.installed)return{installed:!1,runnable:!1,command:d,commandPath:null,reason:c.reason||"not_found",runtimeMode:a,requiresBinary:l};if("not_executable"===c.reason)return{installed:!0,runnable:!1,command:d,commandPath:c.commandPath,reason:"not_executable",runtimeMode:a,requiresBinary:l};let m=await k(c.commandPath,o,Number(s.healthcheckTimeoutMs||4e3));return{installed:!0,runnable:m.runnable,command:d,commandPath:c.commandPath,reason:m.reason,runtimeMode:a,requiresBinary:l}},E=Object.keys(y);e.s(["CLI_TOOL_IDS",0,E,"ensureCliConfigWriteAllowed",0,()=>((e,t=!0)=>null==e||""===e?t:!g.has(String(e).trim().toLowerCase()))(process.env.CLI_ALLOW_CONFIG_WRITES,!0)?null:"CLI config writes are disabled (CLI_ALLOW_CONFIG_WRITES=false)","getCliConfigPaths",0,B,"getCliPrimaryConfigPath",0,e=>{let t=B(e);if(!t)return null;let r=Object.keys(t)[0];return r?t[r]:null},"getCliRuntimeStatus",0,L,"getOpenCodeConfigPath",0,I])},452484,e=>{e.v(t=>Promise.all(["server/chunks/src_shared_services_backupService_ts_0ctvkoe._.js"].map(t=>e.l(t))).then(()=>t(841788)))}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0~dj8ev._.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},442315,(e,t,r)=>{"use strict";t.exports=e.r(918622)},347540,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].React},819481,(e,t,r)=>{"use strict";var o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,s={},c={RequestCookies:()=>y,ResponseCookies:()=>g,parseCookie:()=>p,parseSetCookie:()=>u,stringifyCookie:()=>d};for(var l in c)o(s,l,{get:c[l],enumerable:!0});function d(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),o=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?o:`${o}; ${r.join("; ")}`}function p(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[o,i]=[r.slice(0,e),r.slice(e+1)];try{t.set(o,decodeURIComponent(null!=i?i:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,r],...o]=p(e),{domain:i,expires:a,httponly:n,maxage:s,path:c,samesite:l,secure:d,partitioned:u,priority:y}=Object.fromEntries(o.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,f,b={name:t,value:decodeURIComponent(r),domain:i,...a&&{expires:new Date(a)},...n&&{httpOnly:!0},..."string"==typeof s&&{maxAge:Number(s)},path:c,...l&&{sameSite:m.includes(g=(g=l).toLowerCase())?g:void 0},...d&&{secure:!0},...y&&{priority:h.includes(f=(f=y).toLowerCase())?f:void 0},...u&&{partitioned:!0}};let e={};for(let t in b)b[t]&&(e[t]=b[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))n.call(e,s)||void 0===s||o(e,s,{get:()=>t[s],enumerable:!(r=i(t,s))||r.enumerable});return e})(o({},"__esModule",{value:!0}),s);var m=["strict","lax","none"],h=["low","medium","high"],y=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of p(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let o="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===o).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,o=this._parsed;return o.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(o).map(([e,t])=>d(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>d(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,o;this._parsed=new Map,this._headers=e;const i=null!=(o=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?o:[];for(const e of Array.isArray(i)?i:function(e){if(!e)return[];var t,r,o,i,a,n=[],s=0;function c(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}for(;s<e.length;){for(t=s,a=!1;c();)if(","===(r=e.charAt(s))){for(o=s,s+=1,c(),i=s;s<e.length&&"="!==(r=e.charAt(s))&&";"!==r&&","!==r;)s+=1;s<e.length&&"="===e.charAt(s)?(a=!0,s=i,n.push(e.substring(t,o)),t=s):s=o+1}else s+=1;(!a||s>=e.length)&&n.push(e.substring(t,e.length))}return n}(i)){const t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let o="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===o)}has(e){return this._parsed.has(e)}set(...e){let[t,r,o]=1===e.length?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...o})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=d(r);t.append("set-cookie",e)}}(i,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(d).join("; ")}}},677850,e=>e.a(async(t,r)=>{try{let t=await e.y("zod");e.n(t),r()}catch(e){r(e)}},!0),224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},663370,632802,477468,e=>{"use strict";let t=new TextEncoder,r=new TextDecoder;function o(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=[];for(let r=0;r<e.length;r+=32768)t.push(String.fromCharCode.apply(null,e.subarray(r,r+32768)));return btoa(t.join(""))}function i(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}e.s(["concat",0,function(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let o of e)t.set(o,r),r+=o.length;return t},"decoder",0,r,"encode",0,function(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o>127)throw TypeError("non-ASCII string encountered in encode()");t[r]=o}return t},"encoder",0,t],632802),e.s(["decodeBase64",0,i,"encodeBase64",0,o],477468),e.s(["decode",0,function(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:r.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=r.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return i(t)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}},"encode",0,function(e){let r=e;return("string"==typeof r&&(r=t.encode(r)),Uint8Array.prototype.toBase64)?r.toBase64({alphabet:"base64url",omitPadding:!0}):o(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}],663370)},865466,e=>{"use strict";class t extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class r extends t{[Symbol.asyncIterator];static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t)}}e.s(["JOSEAlgNotAllowed",0,class extends t{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"},"JOSENotSupported",0,class extends t{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"},"JWSInvalid",0,class extends t{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"},"JWSSignatureVerificationFailed",0,class extends t{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(e="signature verification failed",t){super(e,t)}},"JWTClaimValidationFailed",0,class extends t{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(e,t,r="unspecified",o="unspecified"){super(e,{cause:{claim:r,reason:o,payload:t}}),this.claim=r,this.reason=o,this.payload=t}},"JWTExpired",0,class extends t{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(e,t,r="unspecified",o="unspecified"){super(e,{cause:{claim:r,reason:o,payload:t}}),this.claim=r,this.reason=o,this.payload=t}},"JWTInvalid",0,class extends t{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}])},177278,e=>{"use strict";function t(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}e.s(["isDisjoint",0,function(...e){let t,r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0},"isJWK",0,e=>t(e)&&"string"==typeof e.kty,"isObject",0,t,"isPrivateJWK",0,e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d),"isPublicJWK",0,e=>"oct"!==e.kty&&void 0===e.d&&void 0===e.priv,"isSecretJWK",0,e=>"oct"===e.kty&&"string"==typeof e.k])},709939,e=>{"use strict";var t=e.i(663370),r=e.i(293233),o=e.i(865466),i=e.i(632802),a=e.i(913658),n=e.i(177278),s=e.i(48215),c=e.i(252665),l=e.i(18083);async function d(e,d,p){if(!(0,n.isObject)(e))throw new o.JWSInvalid("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new o.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new o.JWSInvalid("JWS Protected Header incorrect type");if(void 0===e.payload)throw new o.JWSInvalid("JWS Payload missing");if("string"!=typeof e.signature)throw new o.JWSInvalid("JWS Signature missing or incorrect type");if(void 0!==e.header&&!(0,n.isObject)(e.header))throw new o.JWSInvalid("JWS Unprotected Header incorrect type");let u={};if(e.protected)try{let r=(0,t.decode)(e.protected);u=JSON.parse(i.decoder.decode(r))}catch{throw new o.JWSInvalid("JWS Protected Header is invalid")}if(!(0,n.isDisjoint)(u,e.header))throw new o.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let m={...u,...e.header},h=(0,c.validateCrit)(o.JWSInvalid,new Map([["b64",!0]]),p?.crit,u,m),y=!0;if(h.has("b64")&&"boolean"!=typeof(y=u.b64))throw new o.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:g}=m;if("string"!=typeof g||!g)throw new o.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');let f=p&&function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}("algorithms",p.algorithms);if(f&&!f.has(g))throw new o.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');if(y){if("string"!=typeof e.payload)throw new o.JWSInvalid("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new o.JWSInvalid("JWS Payload must be a string or an Uint8Array instance");let b=!1;"function"==typeof d&&(d=await d(u,e),b=!0),(0,s.checkKeyType)(g,d,"verify");let I=(0,i.concat)(void 0!==e.protected?(0,i.encode)(e.protected):new Uint8Array,(0,i.encode)("."),"string"==typeof e.payload?y?(0,i.encode)(e.payload):i.encoder.encode(e.payload):e.payload),_=(0,a.decodeBase64url)(e.signature,"signature",o.JWSInvalid),A=await (0,l.normalizeKey)(d,g);if(!await (0,r.verify)(g,A,_,I))throw new o.JWSSignatureVerificationFailed;let v={payload:y?(0,a.decodeBase64url)(e.payload,"payload",o.JWSInvalid):"string"==typeof e.payload?i.encoder.encode(e.payload):e.payload};return(void 0!==e.protected&&(v.protectedHeader=u),void 0!==e.header&&(v.unprotectedHeader=e.header),b)?{...v,key:A}:v}async function p(e,t,r){if(e instanceof Uint8Array&&(e=i.decoder.decode(e)),"string"!=typeof e)throw new o.JWSInvalid("Compact JWS must be a string or Uint8Array");let{0:a,1:n,2:s,length:c}=e.split(".");if(3!==c)throw new o.JWSInvalid("Invalid Compact JWS");let l=await d({payload:n,protected:a,signature:s},t,r),p={payload:l.payload,protectedHeader:l.protectedHeader};return"function"==typeof t?{...p,key:l.key}:p}var u=e.i(224472);async function m(e,t,r){let i=await p(e,t,r);if(i.protectedHeader.crit?.includes("b64")&&!1===i.protectedHeader.b64)throw new o.JWTInvalid("JWTs MUST NOT use unencoded payload");let a={payload:(0,u.validateClaimsSet)(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return"function"==typeof t?{...a,key:i.key}:a}e.s(["jwtVerify",0,m],709939)},235328,e=>{"use strict";var t=e.i(709939),r=e.i(493458);e.i(245272);var o=e.i(548941);async function i(o){if(!await a())return!0;let i=o.headers.get("authorization");if(i?.startsWith("Bearer ")){let t=i.slice(7);try{let{validateApiKey:r}=await e.A(734680);if(await r(t))return!0}catch{}}if(process.env.JWT_SECRET)try{let e=await (0,r.cookies)(),o=e.get("auth_token")?.value;if(o){let e=new TextEncoder().encode(process.env.JWT_SECRET);return await (0,t.jwtVerify)(o,e),!0}}catch{}return!1}async function a(){try{let e=await (0,o.getSettings)();if(!1===e.requireLogin||!e.password&&!process.env.INITIAL_PASSWORD)return!1;return!0}catch(e){return console.error("[API_AUTH_GUARD] isAuthRequired failed, defaulting to true:",e?.message||e),!0}}e.s(["isAuthRequired",0,a,"isAuthenticated",0,i])},688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},172160,e=>{"use strict";let t=[{name:"email",regex:/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,replacement:"[EMAIL_REDACTED]",severity:"medium"},{name:"ssn",regex:/\b\d{3}-\d{2}-\d{4}\b/g,replacement:"[SSN_REDACTED]",severity:"high"},{name:"credit_card",regex:/\b(?:\d{4}[-\s]?){3}\d{4}\b/g,replacement:"[CC_REDACTED]",severity:"high"},{name:"phone_us",regex:/\b(?:\+?1[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}\b/g,replacement:"[PHONE_REDACTED]",severity:"medium"},{name:"phone_br",regex:/\b(?:\+?55[-.\s]?)?\(?\d{2}\)?[-.\s]?\d{4,5}[-.\s]?\d{4}\b/g,replacement:"[PHONE_REDACTED]",severity:"medium"},{name:"cpf",regex:/\b\d{3}\.\d{3}\.\d{3}-\d{2}\b/g,replacement:"[CPF_REDACTED]",severity:"high"},{name:"cnpj",regex:/\b\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}\b/g,replacement:"[CNPJ_REDACTED]",severity:"high"},{name:"ip_address",regex:/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,replacement:"[IP_REDACTED]",severity:"low"},{name:"aws_key",regex:/\bAKIA[0-9A-Z]{16}\b/g,replacement:"[AWS_KEY_REDACTED]",severity:"high"},{name:"api_key_generic",regex:/\b(?:sk|pk|api|key|token)[_-][a-zA-Z0-9]{20,}\b/gi,replacement:"[API_KEY_REDACTED]",severity:"high"}];e.s(["sanitizePII",0,function(e){if("true"!==process.env.PII_RESPONSE_SANITIZATION||!e||"string"!=typeof e)return{text:e,detections:[],redacted:!1};let r=process.env.PII_RESPONSE_SANITIZATION_MODE||"redact",o=[],i=e;for(let a of t){a.regex.lastIndex=0;let t=e.match(a.regex);t&&t.length>0&&(o.push({pattern:a.name,count:t.length,severity:a.severity}),"redact"===r&&(a.regex.lastIndex=0,i=i.replace(a.regex,a.replacement)))}return o.length>0&&"warn"===r&&console.warn(`[PII] Detected PII in response: ${o.map(e=>`${e.pattern}(${e.count})`).join(", ")}`),{text:"redact"===r?i:e,detections:o,redacted:"redact"===r&&o.length>0}}])},764162,e=>{"use strict";var t=e.i(172160);let r=new Set(["api_key","apiKey","api-key","authorization","Authorization","x-api-key","X-Api-Key","access_token","accessToken","refresh_token","refreshToken","password","secret","token"]);function o(e){if("string"!=typeof e)return e;let t=e.trim();if(!t)return"";try{return JSON.parse(t)}catch{return{_rawText:e}}}e.s(["cloneLogPayload",0,function(e){return null==e?e:"function"==typeof globalThis.structuredClone?globalThis.structuredClone(e):JSON.parse(JSON.stringify(e))},"normalizePayloadForLog",0,o,"parseStoredPayload",0,function(e){if("string"!=typeof e||0===e.trim().length)return null;try{return JSON.parse(e)}catch{return{_rawText:e}}},"protectPayloadForLog",0,function(e){return null==e?null:function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let o={};for(let[i,a]of Object.entries(t))r.has(i)?o[i]="[REDACTED]":"string"==typeof a&&a.startsWith("Bearer ")?o[i]="Bearer [REDACTED]":"object"==typeof a&&null!==a?o[i]=e(a):o[i]=a;return o}(function e(r){if("string"==typeof r)return(0,t.sanitizePII)(r).text;if(Array.isArray(r))return r.map(e);if(!r||"object"!=typeof r)return r;let o={};for(let[t,i]of Object.entries(r))o[t]=e(i);return o}(o(e)))},"serializePayloadForStorage",0,function(e,t=65536){if(null==e)return null;let r=JSON.stringify(e);return r.length<=t?r:JSON.stringify({_truncated:!0,_originalSize:r.length,_preview:r.slice(0,t)})}])},406461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},575770,e=>{"use strict";var t=e.i(157763),r=e.i(548941);e.i(439951);var o=e.i(764162);async function i(){try{let e=(await (0,r.getSettings)()).call_log_pipeline_enabled;return!0===e||"1"===e||"true"===e}catch{return!1}}function a(e){return{id:"string"==typeof e.id?e.id:void 0,call_log_id:"string"==typeof e.call_log_id?e.call_log_id:null,timestamp:"string"==typeof e.timestamp?e.timestamp:void 0,client_request:(0,o.parseStoredPayload)(e.client_request),translated_request:(0,o.parseStoredPayload)(e.translated_request),provider_response:(0,o.parseStoredPayload)(e.provider_response),client_response:(0,o.parseStoredPayload)(e.client_response),provider:"string"==typeof e.provider?e.provider:null,model:"string"==typeof e.model?e.model:null,source_format:"string"==typeof e.source_format?e.source_format:null,target_format:"string"==typeof e.target_format?e.target_format:null,duration_ms:"number"==typeof e.duration_ms?e.duration_ms:0}}e.s(["getRequestDetailLogByCallLogId",0,function(e){let r=(0,t.getDbInstance)().prepare(`
|
|
1
|
+
module.exports=[918622,(e,t,o)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,o)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,o)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,o)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,o)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,o)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},442315,(e,t,o)=>{"use strict";t.exports=e.r(918622)},347540,(e,t,o)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].React},819481,(e,t,o)=>{"use strict";var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,s={},c={RequestCookies:()=>g,ResponseCookies:()=>y,parseCookie:()=>p,parseSetCookie:()=>u,stringifyCookie:()=>d};for(var l in c)i(s,l,{get:c[l],enumerable:!0});function d(e){var t;let o=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),i=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===o.length?i:`${i}; ${o.join("; ")}`}function p(e){let t=new Map;for(let o of e.split(/; */)){if(!o)continue;let e=o.indexOf("=");if(-1===e){t.set(o,"true");continue}let[i,r]=[o.slice(0,e),o.slice(e+1)];try{t.set(i,decodeURIComponent(null!=r?r:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,o],...i]=p(e),{domain:r,expires:a,httponly:n,maxage:s,path:c,samesite:l,secure:d,partitioned:u,priority:g}=Object.fromEntries(i.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var y,f,b={name:t,value:decodeURIComponent(o),domain:r,...a&&{expires:new Date(a)},...n&&{httpOnly:!0},..."string"==typeof s&&{maxAge:Number(s)},path:c,...l&&{sameSite:m.includes(y=(y=l).toLowerCase())?y:void 0},...d&&{secure:!0},...g&&{priority:h.includes(f=(f=g).toLowerCase())?f:void 0},...u&&{partitioned:!0}};let e={};for(let t in b)b[t]&&(e[t]=b[t]);return e}}t.exports=((e,t,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))n.call(e,s)||void 0===s||i(e,s,{get:()=>t[s],enumerable:!(o=r(t,s))||o.enumerable});return e})(i({},"__esModule",{value:!0}),s);var m=["strict","lax","none"],h=["low","medium","high"],g=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,o]of p(t))this._parsed.set(e,{name:e,value:o})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let o=Array.from(this._parsed);if(!e.length)return o.map(([e,t])=>t);let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return o.filter(([e])=>e===i).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,o]=1===e.length?[e[0].name,e[0].value]:e,i=this._parsed;return i.set(t,{name:t,value:o}),this._headers.set("cookie",Array.from(i).map(([e,t])=>d(t)).join("; ")),this}delete(e){let t=this._parsed,o=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>d(t)).join("; ")),o}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},y=class{constructor(e){var t,o,i;this._parsed=new Map,this._headers=e;const r=null!=(i=null!=(o=null==(t=e.getSetCookie)?void 0:t.call(e))?o:e.get("set-cookie"))?i:[];for(const e of Array.isArray(r)?r:function(e){if(!e)return[];var t,o,i,r,a,n=[],s=0;function c(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}for(;s<e.length;){for(t=s,a=!1;c();)if(","===(o=e.charAt(s))){for(i=s,s+=1,c(),r=s;s<e.length&&"="!==(o=e.charAt(s))&&";"!==o&&","!==o;)s+=1;s<e.length&&"="===e.charAt(s)?(a=!0,s=r,n.push(e.substring(t,i)),t=s):s=i+1}else s+=1;(!a||s>=e.length)&&n.push(e.substring(t,e.length))}return n}(r)){const t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let o=Array.from(this._parsed.values());if(!e.length)return o;let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return o.filter(e=>e.name===i)}has(e){return this._parsed.has(e)}set(...e){let[t,o,i]=1===e.length?[e[0].name,e[0].value,e[0]]:e,r=this._parsed;return r.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:o,...i})),function(e,t){for(let[,o]of(t.delete("set-cookie"),e)){let e=d(o);t.append("set-cookie",e)}}(r,this._headers),this}delete(...e){let[t,o]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...o,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(d).join("; ")}}},677850,e=>e.a(async(t,o)=>{try{let t=await e.y("zod");e.n(t),o()}catch(e){o(e)}},!0),224361,(e,t,o)=>{t.exports=e.x("util",()=>require("util"))},663370,632802,477468,e=>{"use strict";let t=new TextEncoder,o=new TextDecoder;function i(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=[];for(let o=0;o<e.length;o+=32768)t.push(String.fromCharCode.apply(null,e.subarray(o,o+32768)));return btoa(t.join(""))}function r(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);let t=atob(e),o=new Uint8Array(t.length);for(let e=0;e<t.length;e++)o[e]=t.charCodeAt(e);return o}e.s(["concat",0,function(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),o=0;for(let i of e)t.set(i,o),o+=i.length;return t},"decoder",0,o,"encode",0,function(e){let t=new Uint8Array(e.length);for(let o=0;o<e.length;o++){let i=e.charCodeAt(o);if(i>127)throw TypeError("non-ASCII string encountered in encode()");t[o]=i}return t},"encoder",0,t],632802),e.s(["decodeBase64",0,r,"encodeBase64",0,i],477468),e.s(["decode",0,function(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:o.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=o.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return r(t)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}},"encode",0,function(e){let o=e;return("string"==typeof o&&(o=t.encode(o)),Uint8Array.prototype.toBase64)?o.toBase64({alphabet:"base64url",omitPadding:!0}):i(o).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}],663370)},865466,e=>{"use strict";class t extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class o extends t{[Symbol.asyncIterator];static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t)}}e.s(["JOSEAlgNotAllowed",0,class extends t{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"},"JOSENotSupported",0,class extends t{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"},"JWSInvalid",0,class extends t{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"},"JWSSignatureVerificationFailed",0,class extends t{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(e="signature verification failed",t){super(e,t)}},"JWTClaimValidationFailed",0,class extends t{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(e,t,o="unspecified",i="unspecified"){super(e,{cause:{claim:o,reason:i,payload:t}}),this.claim=o,this.reason=i,this.payload=t}},"JWTExpired",0,class extends t{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(e,t,o="unspecified",i="unspecified"){super(e,{cause:{claim:o,reason:i,payload:t}}),this.claim=o,this.reason=i,this.payload=t}},"JWTInvalid",0,class extends t{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}])},177278,e=>{"use strict";function t(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}e.s(["isDisjoint",0,function(...e){let t,o=e.filter(Boolean);if(0===o.length||1===o.length)return!0;for(let e of o){let o=Object.keys(e);if(!t||0===t.size){t=new Set(o);continue}for(let e of o){if(t.has(e))return!1;t.add(e)}}return!0},"isJWK",0,e=>t(e)&&"string"==typeof e.kty,"isObject",0,t,"isPrivateJWK",0,e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d),"isPublicJWK",0,e=>"oct"!==e.kty&&void 0===e.d&&void 0===e.priv,"isSecretJWK",0,e=>"oct"===e.kty&&"string"==typeof e.k])},709939,e=>{"use strict";var t=e.i(663370),o=e.i(293233),i=e.i(865466),r=e.i(632802),a=e.i(913658),n=e.i(177278),s=e.i(48215),c=e.i(252665),l=e.i(18083);async function d(e,d,p){if(!(0,n.isObject)(e))throw new i.JWSInvalid("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new i.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new i.JWSInvalid("JWS Protected Header incorrect type");if(void 0===e.payload)throw new i.JWSInvalid("JWS Payload missing");if("string"!=typeof e.signature)throw new i.JWSInvalid("JWS Signature missing or incorrect type");if(void 0!==e.header&&!(0,n.isObject)(e.header))throw new i.JWSInvalid("JWS Unprotected Header incorrect type");let u={};if(e.protected)try{let o=(0,t.decode)(e.protected);u=JSON.parse(r.decoder.decode(o))}catch{throw new i.JWSInvalid("JWS Protected Header is invalid")}if(!(0,n.isDisjoint)(u,e.header))throw new i.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let m={...u,...e.header},h=(0,c.validateCrit)(i.JWSInvalid,new Map([["b64",!0]]),p?.crit,u,m),g=!0;if(h.has("b64")&&"boolean"!=typeof(g=u.b64))throw new i.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:y}=m;if("string"!=typeof y||!y)throw new i.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');let f=p&&function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}("algorithms",p.algorithms);if(f&&!f.has(y))throw new i.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');if(g){if("string"!=typeof e.payload)throw new i.JWSInvalid("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new i.JWSInvalid("JWS Payload must be a string or an Uint8Array instance");let b=!1;"function"==typeof d&&(d=await d(u,e),b=!0),(0,s.checkKeyType)(y,d,"verify");let I=(0,r.concat)(void 0!==e.protected?(0,r.encode)(e.protected):new Uint8Array,(0,r.encode)("."),"string"==typeof e.payload?g?(0,r.encode)(e.payload):r.encoder.encode(e.payload):e.payload),_=(0,a.decodeBase64url)(e.signature,"signature",i.JWSInvalid),A=await (0,l.normalizeKey)(d,y);if(!await (0,o.verify)(y,A,_,I))throw new i.JWSSignatureVerificationFailed;let v={payload:g?(0,a.decodeBase64url)(e.payload,"payload",i.JWSInvalid):"string"==typeof e.payload?r.encoder.encode(e.payload):e.payload};return(void 0!==e.protected&&(v.protectedHeader=u),void 0!==e.header&&(v.unprotectedHeader=e.header),b)?{...v,key:A}:v}async function p(e,t,o){if(e instanceof Uint8Array&&(e=r.decoder.decode(e)),"string"!=typeof e)throw new i.JWSInvalid("Compact JWS must be a string or Uint8Array");let{0:a,1:n,2:s,length:c}=e.split(".");if(3!==c)throw new i.JWSInvalid("Invalid Compact JWS");let l=await d({payload:n,protected:a,signature:s},t,o),p={payload:l.payload,protectedHeader:l.protectedHeader};return"function"==typeof t?{...p,key:l.key}:p}var u=e.i(224472);async function m(e,t,o){let r=await p(e,t,o);if(r.protectedHeader.crit?.includes("b64")&&!1===r.protectedHeader.b64)throw new i.JWTInvalid("JWTs MUST NOT use unencoded payload");let a={payload:(0,u.validateClaimsSet)(r.protectedHeader,r.payload,o),protectedHeader:r.protectedHeader};return"function"==typeof t?{...a,key:r.key}:a}e.s(["jwtVerify",0,m],709939)},235328,e=>{"use strict";var t=e.i(709939),o=e.i(493458);e.i(245272);var i=e.i(548941);async function r(i){if(!await a())return!0;let r=i.headers.get("authorization");if(r?.startsWith("Bearer ")){let t=r.slice(7);try{let{validateApiKey:o}=await e.A(734680);if(await o(t))return!0}catch{}}if(process.env.JWT_SECRET)try{let e=await (0,o.cookies)(),i=e.get("auth_token")?.value;if(i){let e=new TextEncoder().encode(process.env.JWT_SECRET);return await (0,t.jwtVerify)(i,e),!0}}catch{}return!1}async function a(){try{let e=await (0,i.getSettings)();if(!1===e.requireLogin||!e.password&&!process.env.INITIAL_PASSWORD)return!1;return!0}catch(e){return console.error("[API_AUTH_GUARD] isAuthRequired failed, defaulting to true:",e?.message||e),!0}}e.s(["isAuthRequired",0,a,"isAuthenticated",0,r])},688947,(e,t,o)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,o)=>{t.exports=e.x("events",()=>require("events"))},172160,e=>{"use strict";let t=[{name:"email",regex:/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,replacement:"[EMAIL_REDACTED]",severity:"medium"},{name:"ssn",regex:/\b\d{3}-\d{2}-\d{4}\b/g,replacement:"[SSN_REDACTED]",severity:"high"},{name:"credit_card",regex:/\b(?:\d{4}[-\s]?){3}\d{4}\b/g,replacement:"[CC_REDACTED]",severity:"high"},{name:"phone_us",regex:/\b(?:\+?1[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}\b/g,replacement:"[PHONE_REDACTED]",severity:"medium"},{name:"phone_br",regex:/\b(?:\+?55[-.\s]?)?\(?\d{2}\)?[-.\s]?\d{4,5}[-.\s]?\d{4}\b/g,replacement:"[PHONE_REDACTED]",severity:"medium"},{name:"cpf",regex:/\b\d{3}\.\d{3}\.\d{3}-\d{2}\b/g,replacement:"[CPF_REDACTED]",severity:"high"},{name:"cnpj",regex:/\b\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}\b/g,replacement:"[CNPJ_REDACTED]",severity:"high"},{name:"ip_address",regex:/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,replacement:"[IP_REDACTED]",severity:"low"},{name:"aws_key",regex:/\bAKIA[0-9A-Z]{16}\b/g,replacement:"[AWS_KEY_REDACTED]",severity:"high"},{name:"api_key_generic",regex:/\b(?:sk|pk|api|key|token)[_-][a-zA-Z0-9]{20,}\b/gi,replacement:"[API_KEY_REDACTED]",severity:"high"}];e.s(["sanitizePII",0,function(e){if("true"!==process.env.PII_RESPONSE_SANITIZATION||!e||"string"!=typeof e)return{text:e,detections:[],redacted:!1};let o=process.env.PII_RESPONSE_SANITIZATION_MODE||"redact",i=[],r=e;for(let a of t){a.regex.lastIndex=0;let t=e.match(a.regex);t&&t.length>0&&(i.push({pattern:a.name,count:t.length,severity:a.severity}),"redact"===o&&(a.regex.lastIndex=0,r=r.replace(a.regex,a.replacement)))}return i.length>0&&"warn"===o&&console.warn(`[PII] Detected PII in response: ${i.map(e=>`${e.pattern}(${e.count})`).join(", ")}`),{text:"redact"===o?r:e,detections:i,redacted:"redact"===o&&i.length>0}}])},764162,e=>{"use strict";var t=e.i(172160);let o=new Set(["api_key","apiKey","api-key","authorization","Authorization","x-api-key","X-Api-Key","access_token","accessToken","refresh_token","refreshToken","password","secret","token"]);function i(e){if("string"!=typeof e)return e;let t=e.trim();if(!t)return"";try{return JSON.parse(t)}catch{return{_rawText:e}}}e.s(["cloneLogPayload",0,function(e){return null==e?e:"function"==typeof globalThis.structuredClone?globalThis.structuredClone(e):JSON.parse(JSON.stringify(e))},"normalizePayloadForLog",0,i,"parseStoredPayload",0,function(e){if("string"!=typeof e||0===e.trim().length)return null;try{return JSON.parse(e)}catch{return{_rawText:e}}},"protectPayloadForLog",0,function(e){return null==e?null:function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let i={};for(let[r,a]of Object.entries(t))o.has(r)?i[r]="[REDACTED]":"string"==typeof a&&a.startsWith("Bearer ")?i[r]="Bearer [REDACTED]":"object"==typeof a&&null!==a?i[r]=e(a):i[r]=a;return i}(function e(o){if("string"==typeof o)return(0,t.sanitizePII)(o).text;if(Array.isArray(o))return o.map(e);if(!o||"object"!=typeof o)return o;let i={};for(let[t,r]of Object.entries(o))i[t]=e(r);return i}(i(e)))},"serializePayloadForStorage",0,function(e,t=65536){if(null==e)return null;let o=JSON.stringify(e);return o.length<=t?o:JSON.stringify({_truncated:!0,_originalSize:o.length,_preview:o.slice(0,t)})}])},406461,(e,t,o)=>{t.exports=e.x("zlib",()=>require("zlib"))},575770,e=>{"use strict";var t=e.i(157763),o=e.i(548941);e.i(439951);var i=e.i(764162);async function r(){try{let e=(await (0,o.getSettings)()).call_log_pipeline_enabled;return!0===e||"1"===e||"true"===e}catch{return!1}}function a(e){return{id:"string"==typeof e.id?e.id:void 0,call_log_id:"string"==typeof e.call_log_id?e.call_log_id:null,timestamp:"string"==typeof e.timestamp?e.timestamp:void 0,client_request:(0,i.parseStoredPayload)(e.client_request),translated_request:(0,i.parseStoredPayload)(e.translated_request),provider_response:(0,i.parseStoredPayload)(e.provider_response),client_response:(0,i.parseStoredPayload)(e.client_response),provider:"string"==typeof e.provider?e.provider:null,model:"string"==typeof e.model?e.model:null,source_format:"string"==typeof e.source_format?e.source_format:null,target_format:"string"==typeof e.target_format?e.target_format:null,duration_ms:"number"==typeof e.duration_ms?e.duration_ms:0}}e.s(["getRequestDetailLogByCallLogId",0,function(e){let o=(0,t.getDbInstance)().prepare(`
|
|
2
2
|
SELECT * FROM request_detail_logs
|
|
3
3
|
WHERE call_log_id = ?
|
|
4
4
|
ORDER BY timestamp DESC
|
|
5
5
|
LIMIT 1
|
|
6
|
-
`).get(e);return
|
|
6
|
+
`).get(e);return o?a(o):null},"getRequestDetailLogCount",0,function(){let e=(0,t.getDbInstance)().prepare("SELECT COUNT(*) as cnt FROM request_detail_logs").get();return e?.cnt??0},"getRequestDetailLogs",0,function(e=50,o=0){return(0,t.getDbInstance)().prepare(`
|
|
7
7
|
SELECT * FROM request_detail_logs
|
|
8
8
|
ORDER BY timestamp DESC
|
|
9
9
|
LIMIT ? OFFSET ?
|
|
10
|
-
`).all(e,
|
|
11
|
-
${e}`),Error(`Provider validation failed for ${t}`)}}]),r()}catch(e){r(e)}},!1),963219,e=>e.a(async(t,r)=>{try{var o=e.i(102835),i=t([o]);[o]=i.then?(await i)():i;let a={qoder:{id:"qoder",alias:"if",name:"Qoder AI",icon:"water_drop",color:"#6366F1"},qwen:{id:"qwen",alias:"qw",name:"Qwen Code",icon:"psychology",color:"#10B981"},"gemini-cli":{id:"gemini-cli",alias:"gemini-cli",name:"Gemini CLI",icon:"terminal",color:"#4285F4",deprecated:!0,deprecationReason:"Google restricts third-party OAuth usage for Gemini CLI (Mar 2026). Pro models require paid plans. Use 'gemini' (API key) provider instead."},kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"}},n={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757"},antigravity:{id:"antigravity",alias:void 0,name:"Antigravity",icon:"rocket_launch",color:"#F59E0B"},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6"},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"},"kimi-coding":{id:"kimi-coding",alias:"kmc",name:"Kimi Coding",icon:"psychology",color:"#1E40AF",textIcon:"KC"},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC"},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL"}},s={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",passthroughModels:!0,website:"https://openrouter.ai"},glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn"},"bailian-coding-plan":{id:"bailian-coding-plan",alias:"bcp",name:"Alibaba Coding Plan",icon:"code",color:"#FF6A00",textIcon:"BCP",website:"https://www.alibabacloud.com/help/en/model-studio/coding-plan"},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn"},"kimi-coding-apikey":{id:"kimi-coding-apikey",alias:"kmca",name:"Kimi Coding (API Key)",icon:"psychology",color:"#1E40AF",textIcon:"KC",website:"https://kimi.com"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com"},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://bailian.console.aliyun.com"},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://modelstudio.console.alibabacloud.com"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com"},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com"},gemini:{id:"gemini",alias:"gemini",name:"Gemini (Google AI Studio)",icon:"diamond",color:"#4285F4",textIcon:"GE",website:"https://ai.google.dev",hasFree:!0,freeNote:"Free forever: 1,500 req/day for Gemini 2.5 Flash — no credit card, get key at aistudio.google.com"},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com"},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com",hasFree:!0,freeNote:"Free tier: 30 RPM / 14.4K RPD — no credit card"},blackbox:{id:"blackbox",alias:"bb",name:"Blackbox AI",icon:"view_in_ar",color:"#1A1A2E",textIcon:"BB",website:"https://blackbox.ai"},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai"},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai"},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai"},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai",hasFree:!0,freeNote:"$25 signup credits + 3 permanently free models: Llama 3.3 70B, Vision, DeepSeek-R1 distill"},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai"},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://inference.cerebras.ai",hasFree:!0,freeNote:"Free: 1M tokens/day, 60K TPM — world's fastest inference"},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com"},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://build.nvidia.com",hasFree:!0,freeNote:"Free dev access: ~40 RPM, 70+ models (Kimi K2.5, GLM 4.7, DeepSeek V3.2...)"},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com"},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com"},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz"},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com"},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com"},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai"},"ollama-cloud":{id:"ollama-cloud",alias:"ollamacloud",name:"Ollama Cloud",icon:"cloud",color:"#58A6FF",textIcon:"OC",website:"https://ollama.com/settings/api-keys"},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io"},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai"},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht"},inworld:{id:"inworld",alias:"inworld",name:"Inworld",icon:"voice_chat",color:"#7B2EF2",textIcon:"IW",website:"https://inworld.ai"},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui"},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI"},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",hasFree:!0,freeNote:"Free Inference API for thousands of models (Whisper, VITS, SDXL…)"},synthetic:{id:"synthetic",alias:"synthetic",name:"Synthetic",icon:"verified_user",color:"#6366F1",textIcon:"SY",website:"https://synthetic.new",passthroughModels:!0},"kilo-gateway":{id:"kilo-gateway",alias:"kg",name:"Kilo Gateway",icon:"hub",color:"#617A91",textIcon:"KG",website:"https://kilo.ai",passthroughModels:!0},vertex:{id:"vertex",alias:"vertex",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VA",website:"https://cloud.google.com/vertex-ai",authHint:"Provide Service Account JSON or OAuth access_token"},zai:{id:"zai",alias:"zai",name:"Z.AI",icon:"psychology",color:"#2563EB",textIcon:"ZA",website:"https://open.bigmodel.cn",apiHint:"API key from https://open.bigmodel.cn/usercenter/apikeys"},"perplexity-search":{id:"perplexity-search",alias:"pplx-search",name:"Perplexity Search",icon:"search",color:"#20808D",textIcon:"PS",website:"https://docs.perplexity.ai/guides/search-quickstart",authHint:"Same API key as Perplexity (pplx-...)"},"serper-search":{id:"serper-search",alias:"serper-search",name:"Serper Search",icon:"search",color:"#4285F4",textIcon:"SP",website:"https://serper.dev",authHint:"API key from serper.dev dashboard"},"brave-search":{id:"brave-search",alias:"brave-search",name:"Brave Search",icon:"travel_explore",color:"#FB542B",textIcon:"BR",website:"https://brave.com/search/api",authHint:"Subscription token from Brave Search API dashboard"},"exa-search":{id:"exa-search",alias:"exa-search",name:"Exa Search",icon:"neurology",color:"#1E40AF",textIcon:"EX",website:"https://exa.ai",authHint:"API key from dashboard.exa.ai"},"tavily-search":{id:"tavily-search",alias:"tavily-search",name:"Tavily Search",icon:"manage_search",color:"#5B4FDB",textIcon:"TV",website:"https://tavily.com",authHint:"API key from app.tavily.com (format: tvly-...)"},"opencode-zen":{id:"opencode-zen",alias:"opencode-zen",name:"OpenCode Zen",icon:"opencode",color:"#6366f1",website:"https://opencode.ai/zen"},"opencode-go":{id:"opencode-go",alias:"opencode-go",name:"OpenCode Go",icon:"opencode",color:"#6366f1",website:"https://opencode.ai/zen/go"},alibaba:{id:"alibaba",alias:"ali",name:"Alibaba Cloud (DashScope)",icon:"cloud_queue",color:"#FF6600",textIcon:"AL",website:"https://dashscope-intl.aliyuncs.com",hasFree:!1},longcat:{id:"longcat",alias:"lc",name:"LongCat AI",icon:"auto_awesome",color:"#FF6B9D",textIcon:"LC",website:"https://longcat.chat",hasFree:!0,freeNote:"50M tokens/day (Flash-Lite) + 500K/day (Chat/Thinking) — 100% free while public beta"},pollinations:{id:"pollinations",alias:"pol",name:"Pollinations AI",icon:"local_florist",color:"#4CAF50",textIcon:"PO",website:"https://pollinations.ai",hasFree:!0,freeNote:"No API key needed — access GPT-5, Claude, Gemini, DeepSeek V3, Llama 4 free (1 req/15s)"},puter:{id:"puter",alias:"pu",name:"Puter AI",icon:"cloud_circle",color:"#6366F1",textIcon:"PU",website:"https://puter.com",hasFree:!0,freeNote:"500+ models (GPT-5, Claude Opus 4, Gemini 3 Pro, Grok 4, DeepSeek V3...) — Users pay via free Puter account",passthroughModels:!0,authHint:"Get token at puter.com/dashboard → Copy Auth Token"},"cloudflare-ai":{id:"cloudflare-ai",alias:"cf",name:"Cloudflare Workers AI",icon:"cloud",color:"#F48120",textIcon:"CF",website:"https://developers.cloudflare.com/workers-ai/",hasFree:!0,freeNote:"Free 10K Neurons/day: ~150 LLM responses or 500s Whisper audio — edge inference globally",authHint:"Requires API Token AND Account ID (found at dash.cloudflare.com)"},scaleway:{id:"scaleway",alias:"scw",name:"Scaleway AI",icon:"cloud",color:"#4F0599",textIcon:"SCW",website:"https://www.scaleway.com/en/ai/generative-apis/",hasFree:!0,freeNote:"1M free tokens for new accounts — EU/GDPR compliant (Paris), Qwen3 235B & Llama 70B"},aimlapi:{id:"aimlapi",alias:"aiml",name:"AI/ML API",icon:"hub",color:"#6366F1",textIcon:"AI",website:"https://aimlapi.com",hasFree:!0,freeNote:"$0.025/day free credits — 200+ models (GPT-4o, Claude, Gemini, Llama) via single endpoint",passthroughModels:!0}},c="openai-compatible-",l="anthropic-compatible-",d="anthropic-compatible-cc-",p={...a,...n,...s,cliproxyapi:{id:"cliproxyapi",alias:"cpa",name:"CLIProxyAPI",icon:"proxy",color:"#6366F1",textIcon:"CPA",website:"https://github.com/router-for-me/CLIProxyAPI",defaultPort:8317,healthEndpoint:"/v1/models",managementPrefix:"/v0/management",configDir:"~/.cli-proxy-api",binaryName:"cli-proxy-api",githubRepo:"router-for-me/CLIProxyAPI"}},u=Object.values(p).reduce((e,t)=>(t.alias&&(e[t.alias]=t.id),e),{});Object.values(p).reduce((e,t)=>(e[t.id]=t.alias||t.id,e),{}),(0,o.validateProviders)(a,"FREE_PROVIDERS"),(0,o.validateProviders)(n,"OAUTH_PROVIDERS"),(0,o.validateProviders)(s,"APIKEY_PROVIDERS"),e.s(["AI_PROVIDERS",0,p,"ALIAS_TO_ID",0,u,"ANTHROPIC_COMPATIBLE_PREFIX",0,l,"APIKEY_PROVIDERS",0,s,"CLAUDE_CODE_COMPATIBLE_PREFIX",0,d,"FREE_PROVIDERS",0,a,"OAUTH_PROVIDERS",0,n,"OPENAI_COMPATIBLE_PREFIX",0,c,"USAGE_SUPPORTED_PROVIDERS",0,["antigravity","gemini-cli","kiro","github","codex","claude","kimi-coding","glm"],"getProviderAlias",0,function(e){let t=p[e];return t?.alias||e},"isAnthropicCompatibleProvider",0,function(e){return"string"==typeof e&&e.startsWith(l)},"isClaudeCodeCompatibleProvider",0,function(e){return"string"==typeof e&&e.startsWith(d)},"isOpenAICompatibleProvider",0,function(e){return"string"==typeof e&&e.startsWith(c)}]),r()}catch(e){r(e)}},!1),617325,e=>e.a(async(t,r)=>{try{var o=e.i(878947),i=e.i(963219),a=t([i]);[i]=a.then?(await a)():a,Object.entries(i.AI_PROVIDERS).filter(([,e])=>e.passthroughModels).map(([e])=>e);let n=Object.entries(o.PROVIDER_MODELS).flatMap(([e,t])=>t.map(t=>({provider:e,model:t.id,name:t.name})));e.s(["AI_MODELS",0,n]),r()}catch(e){r(e)}},!1),90100,e=>{"use strict";function t(e,t){if(!e)return t;let r=Number.parseInt(String(e),10);return!Number.isFinite(r)||r<1||r>65535?t:r}e.s(["getRuntimePorts",0,function(){let e=t(process.env.OMNIROUTE_PORT||process.env.PORT,20128),r=!!process.env.API_PORT,o=!!process.env.DASHBOARD_PORT;return{port:e,apiPort:t(process.env.API_PORT,e),dashboardPort:t(process.env.DASHBOARD_PORT,e),apiPortExplicit:r,dashboardPortExplicit:o}}])},620415,e=>{"use strict";var t=e.i(666680);e.i(245272);var r=e.i(548941),o=e.i(90100);let i="x-model-sync-internal-auth",{dashboardPort:a}=(0,o.getRuntimePorts)(),n=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||process.env.NEXT_PUBLIC_APP_URL||`http://localhost:${a}`,s=globalThis,c=null,l=!1,d=null;function p(){return{[i]:(d||(d=s.__omnirouteModelSyncInternalAuthToken||(0,t.randomUUID)(),s.__omnirouteModelSyncInternalAuthToken=d),d)}}async function u(){try{let{getProviderConnections:t}=await e.A(605589);return(await t()).filter(e=>{if(!e.isActive&&void 0!==e.isActive)return!1;let t=e.providerSpecificData&&"object"==typeof e.providerSpecificData?e.providerSpecificData:{};return!0===t.autoSync})}catch(e){return console.warn("[ModelSync] Failed to load connections:",e.message),[]}}async function m(e,t,r){try{let o=await fetch(`${r}/api/providers/${e}/sync-models`,{method:"POST",headers:{"Content-Type":"application/json",...p()}});if(!o.ok)return console.warn(`[ModelSync] ${t} (${e.slice(0,8)}): sync returned ${o.status}`),!1;let i=await o.json();return console.log(`[ModelSync] ${t} (${e.slice(0,8)}): ✓ ${i.syncedModels||0} models`),!0}catch(r){return console.warn(`[ModelSync] ${t} (${e.slice(0,8)}): fetch failed —`,r.message),!1}}async function h(e){if(l)return void console.log("[ModelSync] Skipping cycle — previous run still in progress");l=!0;let t=Date.now();try{let o=await u();if(0===o.length)return void console.log("[ModelSync] No connections with autoSync enabled — skipping cycle");console.log(`[ModelSync] Starting model sync cycle — ${o.length} connection(s)`);let i=(await Promise.allSettled(o.map(t=>m(t.id,t.name||t.provider,e)))).filter(e=>"fulfilled"===e.status&&!0===e.value).length;console.log(`[ModelSync] Cycle complete: ${i}/${o.length} synced in ${Date.now()-t}ms`);try{await (0,r.updateSettings)({model_sync_last_run:new Date().toISOString()})}catch{}}finally{l=!1}}e.s(["buildModelSyncInternalHeaders",0,p,"isModelSyncInternalRequest",0,function(e){!d&&s.__omnirouteModelSyncInternalAuthToken&&(d=s.__omnirouteModelSyncInternalAuthToken);let t=e.headers.get(i);return!!(t&&d&&t===d)},"startModelSyncScheduler",0,function(e=n,t=864e5){if(c)return void console.log("[ModelSync] Scheduler already running — skipping start");let r=parseInt(process.env.MODEL_SYNC_INTERVAL_HOURS??"",10),o=!isNaN(r)&&r>0?60*r*6e4:t;console.log(`[ModelSync] Scheduler started — interval: ${o/36e5}h`);let i=setTimeout(()=>h(e),5e3);i.unref?.(),c=setInterval(()=>h(e),o),c.unref?.()}])},606102,e=>{e.v(e=>Promise.resolve().then(()=>e(548941)))},789543,e=>{e.v(e=>Promise.resolve().then(()=>e(385498)))},579042,e=>{e.v(t=>Promise.all(["server/chunks/src_shared_utils_apiKey_ts_12~h.oz._.js"].map(t=>e.l(t))).then(()=>t(65448)))},49794,e=>{e.v(t=>Promise.all(["server/chunks/src_shared_constants_pricing_ts_0hk12it._.js"].map(t=>e.l(t))).then(()=>t(404503)))},386305,e=>{e.v(e=>Promise.resolve().then(()=>e(878947)))},605589,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_localDb_ts_0ml5l_h._.js"].map(t=>e.l(t))).then(()=>t(969738)))},734680,e=>{e.v(e=>Promise.resolve().then(()=>e(125852)))}];
|
|
10
|
+
`).all(e,o).map(a)},"isDetailedLoggingEnabled",0,r])},180725,e=>{"use strict";e.i(245272),e.s([])},102835,e=>e.a(async(t,o)=>{try{var i=e.i(677850),r=t([i]);[i]=r.then?(await r)():r;let a=i.z.object({id:i.z.string().min(1),alias:i.z.string().min(1).optional(),name:i.z.string().min(1),icon:i.z.string().min(1),color:i.z.string().regex(/^#[0-9A-Fa-f]{6}$/,"Must be a valid hex color (#RRGGBB)"),textIcon:i.z.string().optional(),website:i.z.string().url().optional(),passthroughModels:i.z.boolean().optional(),deprecated:i.z.boolean().optional(),deprecationReason:i.z.string().optional(),hasFree:i.z.boolean().optional(),freeNote:i.z.string().optional(),authHint:i.z.string().optional(),apiHint:i.z.string().optional()}),n=i.z.record(i.z.string(),a);e.s(["validateProviders",0,function(e,t){let o=n.safeParse(e);if(!o.success){let e=o.error.issues.map(e=>` ${e.path.join(".")}: ${e.message}`).join("\n");throw console.error(`[PROVIDER VALIDATION] ${t} has invalid entries:
|
|
11
|
+
${e}`),Error(`Provider validation failed for ${t}`)}}]),o()}catch(e){o(e)}},!1),963219,e=>e.a(async(t,o)=>{try{var i=e.i(102835),r=t([i]);[i]=r.then?(await r)():r;let a={qoder:{id:"qoder",alias:"if",name:"Qoder AI",icon:"water_drop",color:"#6366F1"},qwen:{id:"qwen",alias:"qw",name:"Qwen Code",icon:"psychology",color:"#10B981"},"gemini-cli":{id:"gemini-cli",alias:"gemini-cli",name:"Gemini CLI",icon:"terminal",color:"#4285F4",deprecated:!0,deprecationReason:"Google restricts third-party OAuth usage for Gemini CLI (Mar 2026). Pro models require paid plans. Use 'gemini' (API key) provider instead."},kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"}},n={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757"},antigravity:{id:"antigravity",alias:void 0,name:"Antigravity",icon:"rocket_launch",color:"#F59E0B"},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6"},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"},"kimi-coding":{id:"kimi-coding",alias:"kmc",name:"Kimi Coding",icon:"psychology",color:"#1E40AF",textIcon:"KC"},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC"},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL"}},s={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",passthroughModels:!0,website:"https://openrouter.ai"},glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn"},"bailian-coding-plan":{id:"bailian-coding-plan",alias:"bcp",name:"Alibaba Coding Plan",icon:"code",color:"#FF6A00",textIcon:"BCP",website:"https://www.alibabacloud.com/help/en/model-studio/coding-plan"},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn"},"kimi-coding-apikey":{id:"kimi-coding-apikey",alias:"kmca",name:"Kimi Coding (API Key)",icon:"psychology",color:"#1E40AF",textIcon:"KC",website:"https://kimi.com"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com"},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://bailian.console.aliyun.com"},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://modelstudio.console.alibabacloud.com"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com"},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com"},gemini:{id:"gemini",alias:"gemini",name:"Gemini (Google AI Studio)",icon:"diamond",color:"#4285F4",textIcon:"GE",website:"https://ai.google.dev",hasFree:!0,freeNote:"Free forever: 1,500 req/day for Gemini 2.5 Flash — no credit card, get key at aistudio.google.com"},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com"},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com",hasFree:!0,freeNote:"Free tier: 30 RPM / 14.4K RPD — no credit card"},blackbox:{id:"blackbox",alias:"bb",name:"Blackbox AI",icon:"view_in_ar",color:"#1A1A2E",textIcon:"BB",website:"https://blackbox.ai"},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai"},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai"},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai"},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai",hasFree:!0,freeNote:"$25 signup credits + 3 permanently free models: Llama 3.3 70B, Vision, DeepSeek-R1 distill"},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai"},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://inference.cerebras.ai",hasFree:!0,freeNote:"Free: 1M tokens/day, 60K TPM — world's fastest inference"},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com"},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://build.nvidia.com",hasFree:!0,freeNote:"Free dev access: ~40 RPM, 70+ models (Kimi K2.5, GLM 4.7, DeepSeek V3.2...)"},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com"},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com"},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz"},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com"},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com"},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai"},"ollama-cloud":{id:"ollama-cloud",alias:"ollamacloud",name:"Ollama Cloud",icon:"cloud",color:"#58A6FF",textIcon:"OC",website:"https://ollama.com/settings/api-keys"},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io"},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai"},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht"},inworld:{id:"inworld",alias:"inworld",name:"Inworld",icon:"voice_chat",color:"#7B2EF2",textIcon:"IW",website:"https://inworld.ai"},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui"},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI"},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",hasFree:!0,freeNote:"Free Inference API for thousands of models (Whisper, VITS, SDXL…)"},synthetic:{id:"synthetic",alias:"synthetic",name:"Synthetic",icon:"verified_user",color:"#6366F1",textIcon:"SY",website:"https://synthetic.new",passthroughModels:!0},"kilo-gateway":{id:"kilo-gateway",alias:"kg",name:"Kilo Gateway",icon:"hub",color:"#617A91",textIcon:"KG",website:"https://kilo.ai",passthroughModels:!0},vertex:{id:"vertex",alias:"vertex",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VA",website:"https://cloud.google.com/vertex-ai",authHint:"Provide Service Account JSON or OAuth access_token"},zai:{id:"zai",alias:"zai",name:"Z.AI",icon:"psychology",color:"#2563EB",textIcon:"ZA",website:"https://open.bigmodel.cn",apiHint:"API key from https://open.bigmodel.cn/usercenter/apikeys"},"perplexity-search":{id:"perplexity-search",alias:"pplx-search",name:"Perplexity Search",icon:"search",color:"#20808D",textIcon:"PS",website:"https://docs.perplexity.ai/guides/search-quickstart",authHint:"Same API key as Perplexity (pplx-...)"},"serper-search":{id:"serper-search",alias:"serper-search",name:"Serper Search",icon:"search",color:"#4285F4",textIcon:"SP",website:"https://serper.dev",authHint:"API key from serper.dev dashboard"},"brave-search":{id:"brave-search",alias:"brave-search",name:"Brave Search",icon:"travel_explore",color:"#FB542B",textIcon:"BR",website:"https://brave.com/search/api",authHint:"Subscription token from Brave Search API dashboard"},"exa-search":{id:"exa-search",alias:"exa-search",name:"Exa Search",icon:"neurology",color:"#1E40AF",textIcon:"EX",website:"https://exa.ai",authHint:"API key from dashboard.exa.ai"},"tavily-search":{id:"tavily-search",alias:"tavily-search",name:"Tavily Search",icon:"manage_search",color:"#5B4FDB",textIcon:"TV",website:"https://tavily.com",authHint:"API key from app.tavily.com (format: tvly-...)"},"opencode-zen":{id:"opencode-zen",alias:"opencode-zen",name:"OpenCode Zen",icon:"opencode",color:"#6366f1",website:"https://opencode.ai/zen"},"opencode-go":{id:"opencode-go",alias:"opencode-go",name:"OpenCode Go",icon:"opencode",color:"#6366f1",website:"https://opencode.ai/zen/go"},alibaba:{id:"alibaba",alias:"ali",name:"Alibaba Cloud (DashScope)",icon:"cloud_queue",color:"#FF6600",textIcon:"AL",website:"https://dashscope-intl.aliyuncs.com",hasFree:!1},longcat:{id:"longcat",alias:"lc",name:"LongCat AI",icon:"auto_awesome",color:"#FF6B9D",textIcon:"LC",website:"https://longcat.chat",hasFree:!0,freeNote:"50M tokens/day (Flash-Lite) + 500K/day (Chat/Thinking) — 100% free while public beta"},pollinations:{id:"pollinations",alias:"pol",name:"Pollinations AI",icon:"local_florist",color:"#4CAF50",textIcon:"PO",website:"https://pollinations.ai",hasFree:!0,freeNote:"No API key needed — access GPT-5, Claude, Gemini, DeepSeek V3, Llama 4 free (1 req/15s)"},puter:{id:"puter",alias:"pu",name:"Puter AI",icon:"cloud_circle",color:"#6366F1",textIcon:"PU",website:"https://puter.com",hasFree:!0,freeNote:"500+ models (GPT-5, Claude Opus 4, Gemini 3 Pro, Grok 4, DeepSeek V3...) — Users pay via free Puter account",passthroughModels:!0,authHint:"Get token at puter.com/dashboard → Copy Auth Token"},"cloudflare-ai":{id:"cloudflare-ai",alias:"cf",name:"Cloudflare Workers AI",icon:"cloud",color:"#F48120",textIcon:"CF",website:"https://developers.cloudflare.com/workers-ai/",hasFree:!0,freeNote:"Free 10K Neurons/day: ~150 LLM responses or 500s Whisper audio — edge inference globally",authHint:"Requires API Token AND Account ID (found at dash.cloudflare.com)"},scaleway:{id:"scaleway",alias:"scw",name:"Scaleway AI",icon:"cloud",color:"#4F0599",textIcon:"SCW",website:"https://www.scaleway.com/en/ai/generative-apis/",hasFree:!0,freeNote:"1M free tokens for new accounts — EU/GDPR compliant (Paris), Qwen3 235B & Llama 70B"},aimlapi:{id:"aimlapi",alias:"aiml",name:"AI/ML API",icon:"hub",color:"#6366F1",textIcon:"AI",website:"https://aimlapi.com",hasFree:!0,freeNote:"$0.025/day free credits — 200+ models (GPT-4o, Claude, Gemini, Llama) via single endpoint",passthroughModels:!0},novita:{id:"novita",alias:"novita",name:"Novita AI",icon:"auto_awesome",color:"#FF4081",textIcon:"NV",website:"https://novita.ai",passthroughModels:!0},piapi:{id:"piapi",alias:"pi",name:"PiAPI",icon:"api",color:"#7C4DFF",textIcon:"PI",website:"https://piapi.ai",passthroughModels:!0},getgoapi:{id:"getgoapi",alias:"ggo",name:"GoAPI",icon:"rocket_launch",color:"#FF6D00",textIcon:"GO",website:"https://api.getgoapi.com",passthroughModels:!0},laozhang:{id:"laozhang",alias:"lz",name:"LaoZhang AI",icon:"hub",color:"#FF1744",textIcon:"LZ",website:"https://api.laozhang.ai",passthroughModels:!0}},c="openai-compatible-",l="anthropic-compatible-",d="anthropic-compatible-cc-",p={...a,...n,...s,cliproxyapi:{id:"cliproxyapi",alias:"cpa",name:"CLIProxyAPI",icon:"proxy",color:"#6366F1",textIcon:"CPA",website:"https://github.com/router-for-me/CLIProxyAPI",defaultPort:8317,healthEndpoint:"/v1/models",managementPrefix:"/v0/management",configDir:"~/.cli-proxy-api",binaryName:"cli-proxy-api",githubRepo:"router-for-me/CLIProxyAPI"}},u=Object.values(p).reduce((e,t)=>(t.alias&&(e[t.alias]=t.id),e),{});Object.values(p).reduce((e,t)=>(e[t.id]=t.alias||t.id,e),{}),(0,i.validateProviders)(a,"FREE_PROVIDERS"),(0,i.validateProviders)(n,"OAUTH_PROVIDERS"),(0,i.validateProviders)(s,"APIKEY_PROVIDERS"),e.s(["AI_PROVIDERS",0,p,"ALIAS_TO_ID",0,u,"ANTHROPIC_COMPATIBLE_PREFIX",0,l,"APIKEY_PROVIDERS",0,s,"CLAUDE_CODE_COMPATIBLE_PREFIX",0,d,"FREE_PROVIDERS",0,a,"OAUTH_PROVIDERS",0,n,"OPENAI_COMPATIBLE_PREFIX",0,c,"USAGE_SUPPORTED_PROVIDERS",0,["antigravity","gemini-cli","kiro","github","codex","claude","kimi-coding","glm"],"getProviderAlias",0,function(e){let t=p[e];return t?.alias||e},"isAnthropicCompatibleProvider",0,function(e){return"string"==typeof e&&e.startsWith(l)},"isClaudeCodeCompatibleProvider",0,function(e){return"string"==typeof e&&e.startsWith(d)},"isOpenAICompatibleProvider",0,function(e){return"string"==typeof e&&e.startsWith(c)}]),o()}catch(e){o(e)}},!1),617325,e=>e.a(async(t,o)=>{try{var i=e.i(878947),r=e.i(963219),a=t([r]);[r]=a.then?(await a)():a,Object.entries(r.AI_PROVIDERS).filter(([,e])=>e.passthroughModels).map(([e])=>e);let n=Object.entries(i.PROVIDER_MODELS).flatMap(([e,t])=>t.map(t=>({provider:e,model:t.id,name:t.name})));e.s(["AI_MODELS",0,n]),o()}catch(e){o(e)}},!1),90100,e=>{"use strict";function t(e,t){if(!e)return t;let o=Number.parseInt(String(e),10);return!Number.isFinite(o)||o<1||o>65535?t:o}e.s(["getRuntimePorts",0,function(){let e=t(process.env.OMNIROUTE_PORT||process.env.PORT,20128),o=!!process.env.API_PORT,i=!!process.env.DASHBOARD_PORT;return{port:e,apiPort:t(process.env.API_PORT,e),dashboardPort:t(process.env.DASHBOARD_PORT,e),apiPortExplicit:o,dashboardPortExplicit:i}}])},620415,e=>{"use strict";var t=e.i(666680);e.i(245272);var o=e.i(548941),i=e.i(90100);let r="x-model-sync-internal-auth",{dashboardPort:a}=(0,i.getRuntimePorts)(),n=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||process.env.NEXT_PUBLIC_APP_URL||`http://localhost:${a}`,s=globalThis,c=null,l=!1,d=null;function p(){return{[r]:(d||(d=s.__omnirouteModelSyncInternalAuthToken||(0,t.randomUUID)(),s.__omnirouteModelSyncInternalAuthToken=d),d)}}async function u(){try{let{getProviderConnections:t}=await e.A(605589);return(await t()).filter(e=>{if(!e.isActive&&void 0!==e.isActive)return!1;let t=e.providerSpecificData&&"object"==typeof e.providerSpecificData?e.providerSpecificData:{};return!0===t.autoSync})}catch(e){return console.warn("[ModelSync] Failed to load connections:",e.message),[]}}async function m(e,t,o){try{let i=await fetch(`${o}/api/providers/${e}/sync-models`,{method:"POST",headers:{"Content-Type":"application/json",...p()}});if(!i.ok)return console.warn(`[ModelSync] ${t} (${e.slice(0,8)}): sync returned ${i.status}`),!1;let r=await i.json();return console.log(`[ModelSync] ${t} (${e.slice(0,8)}): ✓ ${r.syncedModels||0} models`),!0}catch(o){return console.warn(`[ModelSync] ${t} (${e.slice(0,8)}): fetch failed —`,o.message),!1}}async function h(e){if(l)return void console.log("[ModelSync] Skipping cycle — previous run still in progress");l=!0;let t=Date.now();try{let i=await u();if(0===i.length)return void console.log("[ModelSync] No connections with autoSync enabled — skipping cycle");console.log(`[ModelSync] Starting model sync cycle — ${i.length} connection(s)`);let r=(await Promise.allSettled(i.map(t=>m(t.id,t.name||t.provider,e)))).filter(e=>"fulfilled"===e.status&&!0===e.value).length;console.log(`[ModelSync] Cycle complete: ${r}/${i.length} synced in ${Date.now()-t}ms`);try{await (0,o.updateSettings)({model_sync_last_run:new Date().toISOString()})}catch{}}finally{l=!1}}e.s(["buildModelSyncInternalHeaders",0,p,"isModelSyncInternalRequest",0,function(e){!d&&s.__omnirouteModelSyncInternalAuthToken&&(d=s.__omnirouteModelSyncInternalAuthToken);let t=e.headers.get(r);return!!(t&&d&&t===d)},"startModelSyncScheduler",0,function(e=n,t=864e5){if(c)return void console.log("[ModelSync] Scheduler already running — skipping start");let o=parseInt(process.env.MODEL_SYNC_INTERVAL_HOURS??"",10),i=!isNaN(o)&&o>0?60*o*6e4:t;console.log(`[ModelSync] Scheduler started — interval: ${i/36e5}h`);let r=setTimeout(()=>h(e),5e3);r.unref?.(),c=setInterval(()=>h(e),i),c.unref?.()}])},606102,e=>{e.v(e=>Promise.resolve().then(()=>e(548941)))},789543,e=>{e.v(e=>Promise.resolve().then(()=>e(385498)))},579042,e=>{e.v(t=>Promise.all(["server/chunks/src_shared_utils_apiKey_ts_12~h.oz._.js"].map(t=>e.l(t))).then(()=>t(65448)))},49794,e=>{e.v(t=>Promise.all(["server/chunks/src_shared_constants_pricing_ts_0hk12it._.js"].map(t=>e.l(t))).then(()=>t(404503)))},386305,e=>{e.v(e=>Promise.resolve().then(()=>e(878947)))},605589,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_localDb_ts_0ml5l_h._.js"].map(t=>e.l(t))).then(()=>t(969738)))},734680,e=>{e.v(e=>Promise.resolve().then(()=>e(125852)))}];
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=%5Broot-of-the-server%5D__10.x-iq._.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},442315,(e,t,r)=>{"use strict";t.exports=e.r(918622)},347540,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].React},819481,(e,t,r)=>{"use strict";var i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>m,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>p,stringifyCookie:()=>c};for(var u in l)i(o,u,{get:l[u],enumerable:!0});function c(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),i=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?i:`${i}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[i,s]=[r.slice(0,e),r.slice(e+1)];try{t.set(i,decodeURIComponent(null!=s?s:"true"))}catch{}}return t}function p(e){if(!e)return;let[[t,r],...i]=d(e),{domain:s,expires:a,httponly:n,maxage:o,path:l,samesite:u,secure:c,partitioned:p,priority:m}=Object.fromEntries(i.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,y,_={name:t,value:decodeURIComponent(r),domain:s,...a&&{expires:new Date(a)},...n&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...u&&{sameSite:h.includes(g=(g=u).toLowerCase())?g:void 0},...c&&{secure:!0},...m&&{priority:f.includes(y=(y=m).toLowerCase())?y:void 0},...p&&{partitioned:!0}};let e={};for(let t in _)_[t]&&(e[t]=_[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of a(t))n.call(e,o)||void 0===o||i(e,o,{get:()=>t[o],enumerable:!(r=s(t,o))||r.enumerable});return e})(i({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],f=["low","medium","high"],m=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===i).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,i=this._parsed;return i.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(i).map(([e,t])=>c(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>c(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,i;this._parsed=new Map,this._headers=e;const s=null!=(i=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?i:[];for(const e of Array.isArray(s)?s:function(e){if(!e)return[];var t,r,i,s,a,n=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,a=!1;l();)if(","===(r=e.charAt(o))){for(i=o,o+=1,l(),s=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(a=!0,o=s,n.push(e.substring(t,i)),t=o):o=i+1}else o+=1;(!a||o>=e.length)&&n.push(e.substring(t,e.length))}return n}(s)){const t=p(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===i)}has(e){return this._parsed.has(e)}set(...e){let[t,r,i]=1===e.length?[e[0].name,e[0].value,e[0]]:e,s=this._parsed;return s.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...i})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=c(r);t.append("set-cookie",e)}}(s,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join("; ")}}},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},785148,(e,t,r)=>{t.exports=e.x("better-sqlite3",()=>require("better-sqlite3"))},792509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},256770,e=>{"use strict";var t=e.i(814747),r=e.i(446786);let i="omniroute";function s(){try{return r.default.homedir()}catch{return process.cwd()}}function a(e){if("string"!=typeof e)return null;let r=e.trim();return r?t.default.resolve(r):null}function n(){return t.default.join(s(),`.${i}`)}e.s(["getLegacyDotDataDir",0,n,"isSamePath",0,function(e,r){return!!e&&!!r&&t.default.resolve(e)===t.default.resolve(r)},"resolveDataDir",0,function({isCloud:e=!1}={}){let r;if(e)return"/tmp";let o=a(process.env.DATA_DIR);return o?o:(s(),(r=a(process.env.XDG_CONFIG_HOME))?t.default.join(r,i):n())}])},97793,e=>{"use strict";let t=new Set(["host","connection","content-length","keep-alive","proxy-connection","transfer-encoding","te","trailer","upgrade"].map(e=>e.toLowerCase()));e.s(["isForbiddenUpstreamHeaderName",0,function(e){return t.has(String(e).trim().toLowerCase())}])},677850,e=>e.a(async(t,r)=>{try{let t=await e.y("zod");e.n(t),r()}catch(e){r(e)}},!0),200392,e=>e.a(async(t,r)=>{try{var i=e.i(677850),s=t([i]);[i]=s.then?(await s)():s,i.z.object({password:i.z.string().min(1,"Password is required").max(200)}),e.s(["isValidationFailure",0,function(e){return!1===e.success},"validateBody",0,function(e,t){let r=e.safeParse(t);if(r.success)return{success:!0,data:r.data};let i=Array.isArray(r.error?.issues)?r.error.issues:[];return{success:!1,error:{message:"Invalid request",details:i.map(e=>({field:e.path.join("."),message:e.message}))}}}]),r()}catch(e){r(e)}},!1),41244,e=>{"use strict";e.s(["HIDEABLE_SIDEBAR_ITEM_IDS",0,["home","endpoints","api-manager","providers","combos","auto-combo","costs","analytics","limits","cache","cli-tools","agents","translator","playground","media","search-tools","health","logs","audit","settings","docs","issues"]])},253395,e=>{"use strict";var t=e.i(157763);function r(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}function i(e,t=0){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&e.trim().length>0){let r=Number(e);return Number.isFinite(r)?r:t}return t}e.s(["deleteAllCircuitBreakerStates",0,function(){(0,t.getDbInstance)().prepare("DELETE FROM domain_circuit_breakers").run()},"deleteFallbackChain",0,function(e){return(0,t.getDbInstance)().prepare("DELETE FROM domain_fallback_chains WHERE model = ?").run(e).changes>0},"deleteLockoutState",0,function(e){(0,t.getDbInstance)().prepare("DELETE FROM domain_lockout_state WHERE identifier = ?").run(e)},"loadAllCircuitBreakerStates",0,function(){return(0,t.getDbInstance)().prepare("SELECT name, state, failure_count, last_failure_time FROM domain_circuit_breakers").all().map(e=>{let t=r(e);return{name:"string"==typeof t.name?t.name:"",state:"string"==typeof t.state?t.state:"CLOSED",failureCount:i(t.failure_count),lastFailureTime:i(t.last_failure_time,0)||null}}).filter(e=>e.name.length>0)},"loadAllFallbackChains",0,function(){let e=(0,t.getDbInstance)().prepare("SELECT model, chain FROM domain_fallback_chains").all(),i={};for(let t of e){let e=r(t),s="string"==typeof e.model?e.model:null,a="string"==typeof e.chain?e.chain:null;s&&a&&(i[s]=JSON.parse(a))}return i},"loadAllLockedIdentifiers",0,function(){let e=(0,t.getDbInstance)(),s=Date.now();return e.prepare("SELECT identifier, locked_until FROM domain_lockout_state WHERE locked_until IS NOT NULL AND locked_until > ?").all(s).map(e=>{let t=r(e);return{identifier:"string"==typeof t.identifier?t.identifier:"",lockedUntil:i(t.locked_until)}}).filter(e=>e.identifier.length>0)},"loadBudget",0,function(e){let s=(0,t.getDbInstance)().prepare("SELECT * FROM domain_budgets WHERE api_key_id = ?").get(e),a=r(s);return s?{dailyLimitUsd:i(a.daily_limit_usd),monthlyLimitUsd:i(a.monthly_limit_usd),warningThreshold:i(a.warning_threshold,.8)}:null},"loadCircuitBreakerState",0,function(e){let s=(0,t.getDbInstance)().prepare("SELECT * FROM domain_circuit_breakers WHERE name = ?").get(e);if(!s)return null;let a=r(s),n="string"==typeof a.options?JSON.parse(a.options):null;return{state:"string"==typeof a.state?a.state:"CLOSED",failureCount:i(a.failure_count),lastFailureTime:i(a.last_failure_time,0)||null,options:n}},"loadCostEntries",0,function(e,r){return(0,t.getDbInstance)().prepare("SELECT cost, timestamp FROM domain_cost_history WHERE api_key_id = ? AND timestamp >= ? ORDER BY timestamp").all(e,r)},"saveBudget",0,function(e,r){(0,t.getDbInstance)().prepare(`INSERT OR REPLACE INTO domain_budgets (api_key_id, daily_limit_usd, monthly_limit_usd, warning_threshold)
|
|
1
|
+
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},442315,(e,t,r)=>{"use strict";t.exports=e.r(918622)},347540,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].React},819481,(e,t,r)=>{"use strict";var i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>m,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>p,stringifyCookie:()=>c};for(var u in l)i(o,u,{get:l[u],enumerable:!0});function c(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),i=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?i:`${i}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[i,s]=[r.slice(0,e),r.slice(e+1)];try{t.set(i,decodeURIComponent(null!=s?s:"true"))}catch{}}return t}function p(e){if(!e)return;let[[t,r],...i]=d(e),{domain:s,expires:a,httponly:n,maxage:o,path:l,samesite:u,secure:c,partitioned:p,priority:m}=Object.fromEntries(i.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,y,_={name:t,value:decodeURIComponent(r),domain:s,...a&&{expires:new Date(a)},...n&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...u&&{sameSite:h.includes(g=(g=u).toLowerCase())?g:void 0},...c&&{secure:!0},...m&&{priority:f.includes(y=(y=m).toLowerCase())?y:void 0},...p&&{partitioned:!0}};let e={};for(let t in _)_[t]&&(e[t]=_[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of a(t))n.call(e,o)||void 0===o||i(e,o,{get:()=>t[o],enumerable:!(r=s(t,o))||r.enumerable});return e})(i({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],f=["low","medium","high"],m=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===i).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,i=this._parsed;return i.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(i).map(([e,t])=>c(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>c(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,i;this._parsed=new Map,this._headers=e;const s=null!=(i=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?i:[];for(const e of Array.isArray(s)?s:function(e){if(!e)return[];var t,r,i,s,a,n=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,a=!1;l();)if(","===(r=e.charAt(o))){for(i=o,o+=1,l(),s=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(a=!0,o=s,n.push(e.substring(t,i)),t=o):o=i+1}else o+=1;(!a||o>=e.length)&&n.push(e.substring(t,e.length))}return n}(s)){const t=p(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===i)}has(e){return this._parsed.has(e)}set(...e){let[t,r,i]=1===e.length?[e[0].name,e[0].value,e[0]]:e,s=this._parsed;return s.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...i})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=c(r);t.append("set-cookie",e)}}(s,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join("; ")}}},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},785148,(e,t,r)=>{t.exports=e.x("better-sqlite3",()=>require("better-sqlite3"))},792509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},256770,e=>{"use strict";var t=e.i(814747),r=e.i(446786);let i="omniroute";function s(){try{return r.default.homedir()}catch{return process.cwd()}}function a(e){if("string"!=typeof e)return null;let r=e.trim();return r?t.default.resolve(r):null}function n(){return t.default.join(s(),`.${i}`)}e.s(["getLegacyDotDataDir",0,n,"isSamePath",0,function(e,r){return!!e&&!!r&&t.default.resolve(e)===t.default.resolve(r)},"resolveDataDir",0,function({isCloud:e=!1}={}){let r;if(e)return"/tmp";let o=a(process.env.DATA_DIR);return o?o:(s(),(r=a(process.env.XDG_CONFIG_HOME))?t.default.join(r,i):n())}])},97793,e=>{"use strict";let t=new Set(["host","connection","content-length","keep-alive","proxy-connection","transfer-encoding","te","trailer","upgrade"].map(e=>e.toLowerCase()));e.s(["isForbiddenUpstreamHeaderName",0,function(e){return t.has(String(e).trim().toLowerCase())}])},677850,e=>e.a(async(t,r)=>{try{let t=await e.y("zod");e.n(t),r()}catch(e){r(e)}},!0),200392,e=>e.a(async(t,r)=>{try{var i=e.i(677850),s=t([i]);[i]=s.then?(await s)():s,i.z.object({password:i.z.string().min(1,"Password is required").max(200)}),e.s(["isValidationFailure",0,function(e){return!1===e.success},"validateBody",0,function(e,t){let r=e.safeParse(t);if(r.success)return{success:!0,data:r.data};let i=Array.isArray(r.error?.issues)?r.error.issues:[];return{success:!1,error:{message:"Invalid request",details:i.map(e=>({field:e.path.join("."),message:e.message}))}}}]),r()}catch(e){r(e)}},!1),41244,e=>{"use strict";e.s(["HIDEABLE_SIDEBAR_ITEM_IDS",0,["home","endpoints","api-manager","providers","combos","auto-combo","costs","analytics","limits","cache","cli-tools","agents","memory","skills","translator","playground","media","search-tools","health","logs","audit","settings","docs","issues"]])},253395,e=>{"use strict";var t=e.i(157763);function r(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}function i(e,t=0){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&e.trim().length>0){let r=Number(e);return Number.isFinite(r)?r:t}return t}e.s(["deleteAllCircuitBreakerStates",0,function(){(0,t.getDbInstance)().prepare("DELETE FROM domain_circuit_breakers").run()},"deleteFallbackChain",0,function(e){return(0,t.getDbInstance)().prepare("DELETE FROM domain_fallback_chains WHERE model = ?").run(e).changes>0},"deleteLockoutState",0,function(e){(0,t.getDbInstance)().prepare("DELETE FROM domain_lockout_state WHERE identifier = ?").run(e)},"loadAllCircuitBreakerStates",0,function(){return(0,t.getDbInstance)().prepare("SELECT name, state, failure_count, last_failure_time FROM domain_circuit_breakers").all().map(e=>{let t=r(e);return{name:"string"==typeof t.name?t.name:"",state:"string"==typeof t.state?t.state:"CLOSED",failureCount:i(t.failure_count),lastFailureTime:i(t.last_failure_time,0)||null}}).filter(e=>e.name.length>0)},"loadAllFallbackChains",0,function(){let e=(0,t.getDbInstance)().prepare("SELECT model, chain FROM domain_fallback_chains").all(),i={};for(let t of e){let e=r(t),s="string"==typeof e.model?e.model:null,a="string"==typeof e.chain?e.chain:null;s&&a&&(i[s]=JSON.parse(a))}return i},"loadAllLockedIdentifiers",0,function(){let e=(0,t.getDbInstance)(),s=Date.now();return e.prepare("SELECT identifier, locked_until FROM domain_lockout_state WHERE locked_until IS NOT NULL AND locked_until > ?").all(s).map(e=>{let t=r(e);return{identifier:"string"==typeof t.identifier?t.identifier:"",lockedUntil:i(t.locked_until)}}).filter(e=>e.identifier.length>0)},"loadBudget",0,function(e){let s=(0,t.getDbInstance)().prepare("SELECT * FROM domain_budgets WHERE api_key_id = ?").get(e),a=r(s);return s?{dailyLimitUsd:i(a.daily_limit_usd),monthlyLimitUsd:i(a.monthly_limit_usd),warningThreshold:i(a.warning_threshold,.8)}:null},"loadCircuitBreakerState",0,function(e){let s=(0,t.getDbInstance)().prepare("SELECT * FROM domain_circuit_breakers WHERE name = ?").get(e);if(!s)return null;let a=r(s),n="string"==typeof a.options?JSON.parse(a.options):null;return{state:"string"==typeof a.state?a.state:"CLOSED",failureCount:i(a.failure_count),lastFailureTime:i(a.last_failure_time,0)||null,options:n}},"loadCostEntries",0,function(e,r){return(0,t.getDbInstance)().prepare("SELECT cost, timestamp FROM domain_cost_history WHERE api_key_id = ? AND timestamp >= ? ORDER BY timestamp").all(e,r)},"saveBudget",0,function(e,r){(0,t.getDbInstance)().prepare(`INSERT OR REPLACE INTO domain_budgets (api_key_id, daily_limit_usd, monthly_limit_usd, warning_threshold)
|
|
2
2
|
VALUES (?, ?, ?, ?)`).run(e,r.dailyLimitUsd,r.monthlyLimitUsd||0,r.warningThreshold??.8)},"saveCircuitBreakerState",0,function(e,r){(0,t.getDbInstance)().prepare(`INSERT OR REPLACE INTO domain_circuit_breakers (name, state, failure_count, last_failure_time, options)
|
|
3
|
-
VALUES (?, ?, ?, ?, ?)`).run(e,r.state,r.failureCount,r.lastFailureTime,r.options?JSON.stringify(r.options):null)},"saveCostEntry",0,function(e,r,i=Date.now()){(0,t.getDbInstance)().prepare("INSERT INTO domain_cost_history (api_key_id, cost, timestamp) VALUES (?, ?, ?)").run(e,r,i)},"saveFallbackChain",0,function(e,r){(0,t.getDbInstance)().prepare("INSERT OR REPLACE INTO domain_fallback_chains (model, chain) VALUES (?, ?)").run(e,JSON.stringify(r))}])},260222,e=>{"use strict";var t=e.i(253395);let r="CLOSED",i="OPEN",s="HALF_OPEN";class a{name;failureThreshold;resetTimeout;halfOpenRequests;onStateChange;isFailure;state;failureCount;successCount;lastFailureTime;halfOpenAllowed;constructor(e,t={}){this.name=e,this.failureThreshold=t.failureThreshold??5,this.resetTimeout=t.resetTimeout??3e4,this.halfOpenRequests=t.halfOpenRequests??1,this.onStateChange=t.onStateChange||null,this.isFailure=t.isFailure||(()=>!0),this.state=r,this.failureCount=0,this.successCount=0,this.lastFailureTime=null,this.halfOpenAllowed=0,this._restoreFromDb()}_restoreFromDb(){try{let e=(0,t.loadCircuitBreakerState)(this.name);e&&((e.state===r||e.state===i||e.state===s)&&(this.state=e.state),this.failureCount=e.failureCount,this.lastFailureTime=e.lastFailureTime,this.state===s&&(this.halfOpenAllowed=this.halfOpenRequests))}catch{}}_persistToDb(){try{(0,t.saveCircuitBreakerState)(this.name,{state:this.state,failureCount:this.failureCount,lastFailureTime:this.lastFailureTime,options:{failureThreshold:this.failureThreshold,resetTimeout:this.resetTimeout,halfOpenRequests:this.halfOpenRequests}})}catch{}}async execute(e){if(this.state===i)if(this._shouldAttemptReset())this._transition(s);else throw new n(`Circuit breaker "${this.name}" is OPEN. Try again later.`,this.name,this._timeUntilReset());if(this.state===s&&this.halfOpenAllowed<=0)throw new n(`Circuit breaker "${this.name}" is HALF_OPEN, no more probe requests allowed.`,this.name,this._timeUntilReset());this.state===s&&this.halfOpenAllowed--;try{let t=await e();return this._onSuccess(),t}catch(e){throw this.isFailure(e)&&this._onFailure(),e}}canExecute(){return this.state===r||(this.state===i?this._shouldAttemptReset():this.state===s&&this.halfOpenAllowed>0)}getStatus(){return{name:this.name,state:this.state,failureCount:this.failureCount,lastFailureTime:this.lastFailureTime}}reset(){this._transition(r),this.failureCount=0,this.successCount=0,this.lastFailureTime=null,this._persistToDb()}_onSuccess(){this.state===s&&(this.successCount++,this._transition(r),this.failureCount=0),this.failureCount=0,this._persistToDb()}_onFailure(){this.failureCount++,this.lastFailureTime=Date.now(),this.state===s?this._transition(i):this.failureCount>=this.failureThreshold&&this._transition(i),this._persistToDb()}_shouldAttemptReset(){return!this.lastFailureTime||Date.now()-this.lastFailureTime>=this.resetTimeout}_timeUntilReset(){return this.lastFailureTime?Math.max(0,this.resetTimeout-(Date.now()-this.lastFailureTime)):0}_transition(e){let t=this.state;this.state=e,e===s&&(this.halfOpenAllowed=this.halfOpenRequests),this.onStateChange&&t!==e&&this.onStateChange(this.name,t,e)}}class n extends Error{circuitName;retryAfterMs;constructor(e,t,r){super(e),this.name="CircuitBreakerOpenError",this.circuitName=t,this.retryAfterMs=r}}let o=new Map;function l(e,t){return o.has(e)||o.set(e,new a(e,t)),o.get(e)}e.s(["CircuitBreakerOpenError",0,n,"getAllCircuitBreakerStatuses",0,function(){try{for(let e of(0,t.loadAllCircuitBreakerStates)())o.has(e.name)||l(e.name)}catch{}return Array.from(o.values()).map(e=>e.getStatus())},"getCircuitBreaker",0,l,"resetAllCircuitBreakers",0,function(){for(let e of o.values())e.reset();o.clear();try{(0,t.deleteAllCircuitBreakerStates)()}catch{}}])},82419,e=>{"use strict";var t=e.i(253395);let r=new Map;e.s(["forceUnlock",0,function(e){r.delete(e);try{(0,t.deleteLockoutState)(e)}catch{}},"getLockedIdentifiers",0,function(){let e=Date.now();try{for(let e of(0,t.loadAllLockedIdentifiers)())r.has(e.identifier)||r.set(e.identifier,{attempts:[],lockedUntil:e.lockedUntil})}catch{}let i=[];for(let[t,s]of r.entries())s.lockedUntil&&s.lockedUntil>e&&i.push({identifier:t,lockedUntil:s.lockedUntil,remainingMs:s.lockedUntil-e});return i}])},736219,e=>e.a(async(t,r)=>{try{var i=e.i(89171),s=e.i(260222),a=e.i(82419),n=e.i(676088),o=e.i(200392),l=t([n,o]);async function u(){try{let e=(0,s.getAllCircuitBreakerStatuses)(),t=(0,a.getLockedIdentifiers)();return i.NextResponse.json({circuitBreakers:e,lockedIdentifiers:t})}catch(e){return console.error("Error loading policies:",e),i.NextResponse.json({error:"Failed to load policies"},{status:500})}}async function c(e){let t;try{t=await e.json()}catch{return i.NextResponse.json({error:{message:"Invalid request",details:[{field:"body",message:"Invalid JSON body"}]}},{status:400})}try{let e=(0,o.validateBody)(n.policyActionSchema,t);if((0,o.isValidationFailure)(e))return i.NextResponse.json({error:e.error},{status:400});let{action:r,identifier:s}=e.data;if("unlock"===r&&s)return(0,a.forceUnlock)(s),i.NextResponse.json({success:!0,action:"unlocked",identifier:s});return i.NextResponse.json({error:"Unknown action. Supported: unlock"},{status:400})}catch(e){return console.error("Error updating policies:",e),i.NextResponse.json({error:"Failed to update policies"},{status:500})}}[n,o]=l.then?(await l)():l,e.s(["GET",0,u,"POST",0,c]),r()}catch(e){r(e)}},!1),575394,e=>e.a(async(t,r)=>{try{var i=e.i(747909),s=e.i(174017),a=e.i(996250),n=e.i(759756),o=e.i(561916),l=e.i(174677),u=e.i(869741),c=e.i(316795),d=e.i(487718),p=e.i(995169),h=e.i(47587),f=e.i(666012),m=e.i(570101),g=e.i(626937),y=e.i(10372),_=e.i(193695);e.i(820232);var R=e.i(600220),C=e.i(736219),E=t([C]);[C]=E.then?(await E)():E;let v=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/policies/route",pathname:"/api/policies",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/policies/route.ts",nextConfigOutput:"standalone",userland:C,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:w,serverHooks:A}=v;async function x(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),v.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let i="/api/policies/route";i=i.replace(/\/index$/,"")||"/";let a=await v.prepare(e,t,{srcPage:i,multiZoneDraftMode:!1});if(!a)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:C,params:E,nextConfig:x,parsedUrl:b,isDraftMode:w,prerenderManifest:A,routerServerContext:k,isOnDemandRevalidate:S,revalidateOnlyGenerated:O,resolvedPathname:T,clientReferenceManifest:D,serverActionsManifest:N}=a,F=(0,u.normalizeAppPath)(i),I=!!(A.dynamicRoutes[F]||A.routes[T]),L=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,b,!1):t.end("This page could not be found"),null);if(I&&!w){let e=!!A.routes[T],t=A.dynamicRoutes[F];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await L();throw new _.NoFallbackError}}let U=null;!I||v.isDev||w||(U=T,U="/index"===U?"/":U);let q=!0===v.isDev||!I,j=I&&!q;N&&D&&(0,l.setManifestsSingleton)({page:i,clientReferenceManifest:D,serverActionsManifest:N});let P=e.method||"GET",M=(0,o.getTracer)(),H=M.getActiveScopeSpan(),B=!!(null==k?void 0:k.isWrappedByNextServer),$=!!(0,n.getRequestMeta)(e,"minimalMode"),V=(0,n.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,x,A,$);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:E,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:q,incrementalCache:V,cacheLifeProfiles:x.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,i,s)=>v.onRequestError(e,t,i,s,k)},sharedContext:{buildId:C}},K=new c.NodeNextRequest(e),J=new c.NodeNextResponse(t),z=d.NextRequestAdapter.fromNodeNextRequest(K,(0,d.signalFromNodeResponse)(t));try{let a,n=async e=>v.handle(z,W).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${P} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",s),a.updateName(t))}else e.updateName(`${P} ${i}`)}),l=async a=>{var o,l;let u=async({previousCacheEntry:s})=>{try{if(!$&&S&&O&&!s)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await n(a);e.fetchMetrics=W.renderOpts.fetchMetrics;let o=W.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=W.renderOpts.collectedTags;if(!I)return await (0,f.sendResponse)(K,J,i,W.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[y.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=y.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,s=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=y.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==s?void 0:s.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:i,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:S})},!1,k),t}},c=await v.handleResponse({req:e,nextConfig:x,cacheKey:U,routeKind:s.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:O,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:$});if(!I)return null;if((null==c||null==(o=c.value)?void 0:o.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(l=c.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});$||t.setHeader("x-nextjs-cache",S?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),w&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,m.fromNodeOutgoingHttpHeaders)(c.value.headers);return $&&I||d.delete(y.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,g.getCacheControlHeader)(c.cacheControl)),await (0,f.sendResponse)(K,J,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&H?await l(H):(a=M.getActiveScopeSpan(),await M.withPropagatedContext(e.headers,()=>M.trace(p.BaseServerSpan.handleRequest,{spanName:`${P} ${i}`,kind:o.SpanKind.SERVER,attributes:{"http.method":P,"http.target":e.url}},l),void 0,!B))}catch(t){if(t instanceof _.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:F,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:S})},!1,k),I)throw t;return await (0,f.sendResponse)(K,J,new Response(null,{status:500})),null}}e.s(["handler",0,x,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:w})},"routeModule",0,v,"serverHooks",0,A,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,w]),r()}catch(e){r(e)}},!1)];
|
|
3
|
+
VALUES (?, ?, ?, ?, ?)`).run(e,r.state,r.failureCount,r.lastFailureTime,r.options?JSON.stringify(r.options):null)},"saveCostEntry",0,function(e,r,i=Date.now()){(0,t.getDbInstance)().prepare("INSERT INTO domain_cost_history (api_key_id, cost, timestamp) VALUES (?, ?, ?)").run(e,r,i)},"saveFallbackChain",0,function(e,r){(0,t.getDbInstance)().prepare("INSERT OR REPLACE INTO domain_fallback_chains (model, chain) VALUES (?, ?)").run(e,JSON.stringify(r))}])},260222,e=>{"use strict";var t=e.i(253395);let r="CLOSED",i="OPEN",s="HALF_OPEN";class a{name;failureThreshold;resetTimeout;halfOpenRequests;onStateChange;isFailure;state;failureCount;successCount;lastFailureTime;halfOpenAllowed;constructor(e,t={}){this.name=e,this.failureThreshold=t.failureThreshold??5,this.resetTimeout=t.resetTimeout??3e4,this.halfOpenRequests=t.halfOpenRequests??1,this.onStateChange=t.onStateChange||null,this.isFailure=t.isFailure||(()=>!0),this.state=r,this.failureCount=0,this.successCount=0,this.lastFailureTime=null,this.halfOpenAllowed=0,this._restoreFromDb()}_restoreFromDb(){try{let e=(0,t.loadCircuitBreakerState)(this.name);e&&((e.state===r||e.state===i||e.state===s)&&(this.state=e.state),this.failureCount=e.failureCount,this.lastFailureTime=e.lastFailureTime,this.state===s&&(this.halfOpenAllowed=this.halfOpenRequests))}catch{}}_persistToDb(){try{(0,t.saveCircuitBreakerState)(this.name,{state:this.state,failureCount:this.failureCount,lastFailureTime:this.lastFailureTime,options:{failureThreshold:this.failureThreshold,resetTimeout:this.resetTimeout,halfOpenRequests:this.halfOpenRequests}})}catch{}}async execute(e){if(this.state===i)if(this._shouldAttemptReset())this._transition(s);else throw new n(`Circuit breaker "${this.name}" is OPEN. Try again later.`,this.name,this._timeUntilReset());if(this.state===s&&this.halfOpenAllowed<=0)throw new n(`Circuit breaker "${this.name}" is HALF_OPEN, no more probe requests allowed.`,this.name,this._timeUntilReset());this.state===s&&this.halfOpenAllowed--;try{let t=await e();return this._onSuccess(),t}catch(e){throw this.isFailure(e)&&this._onFailure(),e}}canExecute(){return this.state===r||(this.state===i?this._shouldAttemptReset():this.state===s&&this.halfOpenAllowed>0)}getStatus(){return{name:this.name,state:this.state,failureCount:this.failureCount,lastFailureTime:this.lastFailureTime}}reset(){this._transition(r),this.failureCount=0,this.successCount=0,this.lastFailureTime=null,this._persistToDb()}_onSuccess(){this.state===i?(this._transition(r),this.failureCount=0,this.successCount=0,this.lastFailureTime=null):(this.state===s&&(this.successCount++,this._transition(r)),this.failureCount=0),this._persistToDb()}_onFailure(){this.failureCount++,this.lastFailureTime=Date.now(),this.state===i||(this.state===s?this._transition(i):this.failureCount>=this.failureThreshold&&this._transition(i)),this._persistToDb()}_shouldAttemptReset(){return!this.lastFailureTime||Date.now()-this.lastFailureTime>=this.resetTimeout}_timeUntilReset(){return this.lastFailureTime?Math.max(0,this.resetTimeout-(Date.now()-this.lastFailureTime)):0}_transition(e){let t=this.state;this.state=e,e===s&&(this.halfOpenAllowed=this.halfOpenRequests),this.onStateChange&&t!==e&&this.onStateChange(this.name,t,e)}}class n extends Error{circuitName;retryAfterMs;constructor(e,t,r){super(e),this.name="CircuitBreakerOpenError",this.circuitName=t,this.retryAfterMs=r}}let o=new Map;function l(e,t){return o.has(e)||o.set(e,new a(e,t)),o.get(e)}e.s(["CircuitBreakerOpenError",0,n,"getAllCircuitBreakerStatuses",0,function(){try{for(let e of(0,t.loadAllCircuitBreakerStates)())o.has(e.name)||l(e.name)}catch{}return Array.from(o.values()).map(e=>e.getStatus())},"getCircuitBreaker",0,l,"resetAllCircuitBreakers",0,function(){for(let e of o.values())e.reset();o.clear();try{(0,t.deleteAllCircuitBreakerStates)()}catch{}}])},82419,e=>{"use strict";var t=e.i(253395);let r=new Map;e.s(["forceUnlock",0,function(e){r.delete(e);try{(0,t.deleteLockoutState)(e)}catch{}},"getLockedIdentifiers",0,function(){let e=Date.now();try{for(let e of(0,t.loadAllLockedIdentifiers)())r.has(e.identifier)||r.set(e.identifier,{attempts:[],lockedUntil:e.lockedUntil})}catch{}let i=[];for(let[t,s]of r.entries())s.lockedUntil&&s.lockedUntil>e&&i.push({identifier:t,lockedUntil:s.lockedUntil,remainingMs:s.lockedUntil-e});return i}])},736219,e=>e.a(async(t,r)=>{try{var i=e.i(89171),s=e.i(260222),a=e.i(82419),n=e.i(676088),o=e.i(200392),l=t([n,o]);async function u(){try{let e=(0,s.getAllCircuitBreakerStatuses)(),t=(0,a.getLockedIdentifiers)();return i.NextResponse.json({circuitBreakers:e,lockedIdentifiers:t})}catch(e){return console.error("Error loading policies:",e),i.NextResponse.json({error:"Failed to load policies"},{status:500})}}async function c(e){let t;try{t=await e.json()}catch{return i.NextResponse.json({error:{message:"Invalid request",details:[{field:"body",message:"Invalid JSON body"}]}},{status:400})}try{let e=(0,o.validateBody)(n.policyActionSchema,t);if((0,o.isValidationFailure)(e))return i.NextResponse.json({error:e.error},{status:400});let{action:r,identifier:s}=e.data;if("unlock"===r&&s)return(0,a.forceUnlock)(s),i.NextResponse.json({success:!0,action:"unlocked",identifier:s});return i.NextResponse.json({error:"Unknown action. Supported: unlock"},{status:400})}catch(e){return console.error("Error updating policies:",e),i.NextResponse.json({error:"Failed to update policies"},{status:500})}}[n,o]=l.then?(await l)():l,e.s(["GET",0,u,"POST",0,c]),r()}catch(e){r(e)}},!1),575394,e=>e.a(async(t,r)=>{try{var i=e.i(747909),s=e.i(174017),a=e.i(996250),n=e.i(759756),o=e.i(561916),l=e.i(174677),u=e.i(869741),c=e.i(316795),d=e.i(487718),p=e.i(995169),h=e.i(47587),f=e.i(666012),m=e.i(570101),g=e.i(626937),y=e.i(10372),_=e.i(193695);e.i(820232);var R=e.i(600220),C=e.i(736219),E=t([C]);[C]=E.then?(await E)():E;let v=new i.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/policies/route",pathname:"/api/policies",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/policies/route.ts",nextConfigOutput:"standalone",userland:C,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:w,serverHooks:A}=v;async function x(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),v.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let i="/api/policies/route";i=i.replace(/\/index$/,"")||"/";let a=await v.prepare(e,t,{srcPage:i,multiZoneDraftMode:!1});if(!a)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:C,params:E,nextConfig:x,parsedUrl:b,isDraftMode:w,prerenderManifest:A,routerServerContext:k,isOnDemandRevalidate:S,revalidateOnlyGenerated:O,resolvedPathname:T,clientReferenceManifest:D,serverActionsManifest:N}=a,F=(0,u.normalizeAppPath)(i),I=!!(A.dynamicRoutes[F]||A.routes[T]),L=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,b,!1):t.end("This page could not be found"),null);if(I&&!w){let e=!!A.routes[T],t=A.dynamicRoutes[F];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await L();throw new _.NoFallbackError}}let U=null;!I||v.isDev||w||(U=T,U="/index"===U?"/":U);let q=!0===v.isDev||!I,j=I&&!q;N&&D&&(0,l.setManifestsSingleton)({page:i,clientReferenceManifest:D,serverActionsManifest:N});let P=e.method||"GET",M=(0,o.getTracer)(),H=M.getActiveScopeSpan(),B=!!(null==k?void 0:k.isWrappedByNextServer),$=!!(0,n.getRequestMeta)(e,"minimalMode"),V=(0,n.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,x,A,$);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:E,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:q,incrementalCache:V,cacheLifeProfiles:x.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,i,s)=>v.onRequestError(e,t,i,s,k)},sharedContext:{buildId:C}},K=new c.NodeNextRequest(e),J=new c.NodeNextResponse(t),z=d.NextRequestAdapter.fromNodeNextRequest(K,(0,d.signalFromNodeResponse)(t));try{let a,n=async e=>v.handle(z,W).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${P} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",s),a.updateName(t))}else e.updateName(`${P} ${i}`)}),l=async a=>{var o,l;let u=async({previousCacheEntry:s})=>{try{if(!$&&S&&O&&!s)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await n(a);e.fetchMetrics=W.renderOpts.fetchMetrics;let o=W.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=W.renderOpts.collectedTags;if(!I)return await (0,f.sendResponse)(K,J,i,W.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[y.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=y.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,s=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=y.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==s?void 0:s.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:i,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:S})},!1,k),t}},c=await v.handleResponse({req:e,nextConfig:x,cacheKey:U,routeKind:s.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:O,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:$});if(!I)return null;if((null==c||null==(o=c.value)?void 0:o.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(l=c.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});$||t.setHeader("x-nextjs-cache",S?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),w&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,m.fromNodeOutgoingHttpHeaders)(c.value.headers);return $&&I||d.delete(y.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,g.getCacheControlHeader)(c.cacheControl)),await (0,f.sendResponse)(K,J,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&H?await l(H):(a=M.getActiveScopeSpan(),await M.withPropagatedContext(e.headers,()=>M.trace(p.BaseServerSpan.handleRequest,{spanName:`${P} ${i}`,kind:o.SpanKind.SERVER,attributes:{"http.method":P,"http.target":e.url}},l),void 0,!B))}catch(t){if(t instanceof _.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:F,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:S})},!1,k),I)throw t;return await (0,f.sendResponse)(K,J,new Response(null,{status:500})),null}}e.s(["handler",0,x,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:w})},"routeModule",0,v,"serverHooks",0,A,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,w]),r()}catch(e){r(e)}},!1)];
|
|
4
4
|
|
|
5
5
|
//# sourceMappingURL=%5Broot-of-the-server%5D__10e1a_z._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},442315,(e,t,r)=>{"use strict";t.exports=e.r(918622)},347540,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].React},819481,(e,t,r)=>{"use strict";var s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ensureServerEntryExports",{enumerable:!0,get:function(){return s}})},621389,e=>e.a(async(t,r)=>{try{var s=e.i(745015),a=e.i(89171),n=e.i(64634),i=e.i(676088),o=e.i(200392),l=e.i(724999),u=e.i(195975),p=t([i,o]);async function c(e){let t,r=await (0,l.requireManagementAuth)(e);if(r)return r;try{t=await e.json()}catch{return a.NextResponse.json({error:"Invalid JSON body"},{status:400})}let s=(0,o.validateBody)(i.versionManagerInstallSchema,t);if((0,o.isValidationFailure)(s))return a.NextResponse.json({error:s.error},{status:400});try{let{tool:e,version:t}=s.data,r=await (0,n.installTool)(e,t||void 0);return a.NextResponse.json({success:!0,...r})}catch(t){let e=t instanceof Error?t.message:"Installation failed";return console.error("[version-manager] install error:",e),a.NextResponse.json({error:e},{status:500})}}[i,o]=p.then?(await p)():p,(0,u.ensureServerEntryExports)([c]),(0,s.registerServerReference)(c,"
|
|
1
|
+
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},442315,(e,t,r)=>{"use strict";t.exports=e.r(918622)},347540,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].React},819481,(e,t,r)=>{"use strict";var s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>f,ResponseCookies:()=>v,parseCookie:()=>c,parseSetCookie:()=>d,stringifyCookie:()=>p};for(var u in l)s(o,u,{get:l[u],enumerable:!0});function p(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),s=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?s:`${s}; ${r.join("; ")}`}function c(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[s,a]=[r.slice(0,e),r.slice(e+1)];try{t.set(s,decodeURIComponent(null!=a?a:"true"))}catch{}}return t}function d(e){if(!e)return;let[[t,r],...s]=c(e),{domain:a,expires:n,httponly:i,maxage:o,path:l,samesite:u,secure:p,partitioned:d,priority:f}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var v,g,y={name:t,value:decodeURIComponent(r),domain:a,...n&&{expires:new Date(n)},...i&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...u&&{sameSite:h.includes(v=(v=u).toLowerCase())?v:void 0},...p&&{secure:!0},...f&&{priority:m.includes(g=(g=f).toLowerCase())?g:void 0},...d&&{partitioned:!0}};let e={};for(let t in y)y[t]&&(e[t]=y[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of n(t))i.call(e,o)||void 0===o||s(e,o,{get:()=>t[o],enumerable:!(r=a(t,o))||r.enumerable});return e})(s({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],m=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of c(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(s).map(([e,t])=>p(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>p(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},v=class{constructor(e){var t,r,s;this._parsed=new Map,this._headers=e;const a=null!=(s=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?s:[];for(const e of Array.isArray(a)?a:function(e){if(!e)return[];var t,r,s,a,n,i=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,n=!1;l();)if(","===(r=e.charAt(o))){for(s=o,o+=1,l(),a=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(n=!0,o=a,i.push(e.substring(t,s)),t=o):o=s+1}else o+=1;(!n||o>=e.length)&&i.push(e.substring(t,e.length))}return i}(a)){const t=d(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,r,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,a=this._parsed;return a.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...s})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=p(r);t.append("set-cookie",e)}}(a,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(p).join("; ")}}},677850,e=>e.a(async(t,r)=>{try{let t=await e.y("zod");e.n(t),r()}catch(e){r(e)}},!0),200392,e=>e.a(async(t,r)=>{try{var s=e.i(677850),a=t([s]);[s]=a.then?(await a)():a,s.z.object({password:s.z.string().min(1,"Password is required").max(200)}),e.s(["isValidationFailure",0,function(e){return!1===e.success},"validateBody",0,function(e,t){let r=e.safeParse(t);if(r.success)return{success:!0,data:r.data};let s=Array.isArray(r.error?.issues)?r.error.issues:[];return{success:!1,error:{message:"Invalid request",details:s.map(e=>({field:e.path.join("."),message:e.message}))}}}]),r()}catch(e){r(e)}},!1),41244,e=>{"use strict";e.s(["HIDEABLE_SIDEBAR_ITEM_IDS",0,["home","endpoints","api-manager","providers","combos","auto-combo","costs","analytics","limits","cache","cli-tools","agents","memory","skills","translator","playground","media","search-tools","health","logs","audit","settings","docs","issues"]])},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},997953,(e,t,r)=>{"use strict";t.exports=e.r(442315).vendored["react-rsc"].ReactServerDOMTurbopackServer},745015,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"registerServerReference",{enumerable:!0,get:function(){return s.registerServerReference}});let s=e.r(997953)},195975,(e,t,r)=>{"use strict";function s(e){for(let t=0;t<e.length;t++){let r=e[t];if("function"!=typeof r)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof r}.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ensureServerEntryExports",{enumerable:!0,get:function(){return s}})},621389,e=>e.a(async(t,r)=>{try{var s=e.i(745015),a=e.i(89171),n=e.i(64634),i=e.i(676088),o=e.i(200392),l=e.i(724999),u=e.i(195975),p=t([i,o]);async function c(e){let t,r=await (0,l.requireManagementAuth)(e);if(r)return r;try{t=await e.json()}catch{return a.NextResponse.json({error:"Invalid JSON body"},{status:400})}let s=(0,o.validateBody)(i.versionManagerInstallSchema,t);if((0,o.isValidationFailure)(s))return a.NextResponse.json({error:s.error},{status:400});try{let{tool:e,version:t}=s.data,r=await (0,n.installTool)(e,t||void 0);return a.NextResponse.json({success:!0,...r})}catch(t){let e=t instanceof Error?t.message:"Installation failed";return console.error("[version-manager] install error:",e),a.NextResponse.json({error:e},{status:500})}}[i,o]=p.then?(await p)():p,(0,u.ensureServerEntryExports)([c]),(0,s.registerServerReference)(c,"409ddab0a2eda123f78822de25fbf7e685a50b3501",null),e.s(["POST",0,c]),r()}catch(e){r(e)}},!1),185707,e=>e.a(async(t,r)=>{try{var s=e.i(747909),a=e.i(174017),n=e.i(996250),i=e.i(759756),o=e.i(561916),l=e.i(174677),u=e.i(869741),p=e.i(316795),c=e.i(487718),d=e.i(995169),h=e.i(47587),m=e.i(666012),f=e.i(570101),v=e.i(626937),g=e.i(10372),y=e.i(193695);e.i(820232);var x=e.i(600220),R=e.i(621389),_=t([R]);[R]=_.then?(await _)():_;let w=new s.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/version-manager/install/route",pathname:"/api/version-manager/install",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/version-manager/install/route.ts",nextConfigOutput:"standalone",userland:R,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:E,serverHooks:C}=w;async function b(e,t,r){r.requestMeta&&(0,i.setRequestMeta)(e,r.requestMeta),w.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let s="/api/version-manager/install/route";s=s.replace(/\/index$/,"")||"/";let n=await w.prepare(e,t,{srcPage:s,multiZoneDraftMode:!1});if(!n)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:R,params:_,nextConfig:b,parsedUrl:A,isDraftMode:E,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:O,revalidateOnlyGenerated:j,resolvedPathname:P,clientReferenceManifest:k,serverActionsManifest:N}=n,q=(0,u.normalizeAppPath)(s),T=!!(C.dynamicRoutes[q]||C.routes[P]),I=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,A,!1):t.end("This page could not be found"),null);if(T&&!E){let e=!!C.routes[P],t=C.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await I();throw new y.NoFallbackError}}let D=null;!T||w.isDev||E||(D=P,D="/index"===D?"/":D);let M=!0===w.isDev||!T,$=T&&!M;N&&k&&(0,l.setManifestsSingleton)({page:s,clientReferenceManifest:k,serverActionsManifest:N});let U=e.method||"GET",H=(0,o.getTracer)(),B=H.getActiveScopeSpan(),F=!!(null==S?void 0:S.isWrappedByNextServer),K=!!(0,i.getRequestMeta)(e,"minimalMode"),L=(0,i.getRequestMeta)(e,"incrementalCache")||await w.getIncrementalCache(e,b,C,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let z={params:_,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:M,incrementalCache:L,cacheLifeProfiles:b.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,a)=>w.onRequestError(e,t,s,a,S)},sharedContext:{buildId:R}},V=new p.NodeNextRequest(e),X=new p.NodeNextResponse(t),G=c.NextRequestAdapter.fromNodeNextRequest(V,(0,c.signalFromNodeResponse)(t));try{let n,i=async e=>w.handle(G,z).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${U} ${s}`)}),l=async n=>{var o,l;let u=async({previousCacheEntry:a})=>{try{if(!K&&O&&j&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=z.renderOpts.fetchMetrics;let o=z.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=z.renderOpts.collectedTags;if(!T)return await (0,m.sendResponse)(V,X,s,z.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,a=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:z.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==a?void 0:a.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:s,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:O})},!1,S),t}},p=await w.handleResponse({req:e,nextConfig:b,cacheKey:D,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:j,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:K});if(!T)return null;if((null==p||null==(o=p.value)?void 0:o.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",O?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,f.fromNodeOutgoingHttpHeaders)(p.value.headers);return K&&T||c.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,v.getCacheControlHeader)(p.cacheControl)),await (0,m.sendResponse)(V,X,new Response(p.value.body,{headers:c,status:p.value.status||200})),null};F&&B?await l(B):(n=H.getActiveScopeSpan(),await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${U} ${s}`,kind:o.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},l),void 0,!F))}catch(t){if(t instanceof y.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:O})},!1,S),T)throw t;return await (0,m.sendResponse)(V,X,new Response(null,{status:500})),null}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:E})},"routeModule",0,w,"serverHooks",0,C,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,E]),r()}catch(e){r(e)}},!1),606102,e=>{e.v(e=>Promise.resolve().then(()=>e(548941)))},789543,e=>{e.v(e=>Promise.resolve().then(()=>e(385498)))},579042,e=>{e.v(t=>Promise.all(["server/chunks/src_shared_utils_apiKey_ts_12~h.oz._.js"].map(t=>e.l(t))).then(()=>t(65448)))},49794,e=>{e.v(t=>Promise.all(["server/chunks/src_shared_constants_pricing_ts_0hk12it._.js"].map(t=>e.l(t))).then(()=>t(404503)))},386305,e=>{e.v(e=>Promise.resolve().then(()=>e(878947)))},734680,e=>{e.v(e=>Promise.resolve().then(()=>e(125852)))}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=%5Broot-of-the-server%5D__10o_k-p._.js.map
|