@kyro-cms/core 0.12.58 → 0.12.60
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/dist/api-handler-graphql.cjs +1 -1
- package/dist/api-handler-graphql.js +1 -1
- package/dist/api-handler-trpc.cjs +1 -1
- package/dist/api-handler-trpc.js +1 -1
- package/dist/api-handler.cjs +1 -1
- package/dist/api-handler.js +1 -1
- package/dist/bootstrap-JF6Q4L6P.cjs +1 -0
- package/dist/{bootstrap-IGHJFNYG.js → bootstrap-VUWX45QN.js} +1 -1
- package/dist/{chunk-YZNFCSCE.js → chunk-33E4YN62.js} +1 -1
- package/dist/{chunk-BAXBE4JD.js → chunk-7N6TW4JB.js} +1 -1
- package/dist/{chunk-X4RTM5AQ.js → chunk-AO2IXWV4.js} +1 -1
- package/dist/{chunk-XP56DE7A.js → chunk-KWGB3YNI.js} +90 -78
- package/dist/{chunk-ECFZEY5B.cjs → chunk-M56F4LQ5.cjs} +1 -1
- package/dist/{chunk-KBJ4XZWF.cjs → chunk-NTKIONEC.cjs} +1 -1
- package/dist/{chunk-Z2XEW5RL.cjs → chunk-OUMUIICN.cjs} +3 -3
- package/dist/{chunk-KFEJPRC4.js → chunk-T4TSELDS.js} +2 -2
- package/dist/{chunk-QLUMJS5W.cjs → chunk-WQCLLM4S.cjs} +3 -3
- package/dist/{chunk-VKXWJOWI.cjs → chunk-XTTGHN3D.cjs} +90 -78
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +6 -8
- package/dist/index.d.ts +6 -8
- package/dist/index.js +1 -1
- package/dist/rest/index.cjs +1 -1
- package/dist/rest/index.js +1 -1
- package/package.json +2 -2
- package/dist/bootstrap-FTVBJ47D.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkNTKIONEC_cjs=require('./chunk-NTKIONEC.cjs');require('./chunk-WQCLLM4S.cjs'),require('./chunk-M56F4LQ5.cjs'),require('./chunk-7GGZA5YU.cjs'),require('./chunk-5LPNEYK5.cjs'),require('./chunk-MP5VC5ER.cjs'),require('./chunk-VOQUO2EZ.cjs'),require('./chunk-OUMUIICN.cjs'),require('./chunk-XTTGHN3D.cjs'),require('./chunk-HPYH7GTS.cjs'),require('./chunk-BHR7OAU4.cjs'),require('./chunk-O4YE57OS.cjs'),require('./chunk-MCIZG4A3.cjs'),require('./chunk-35PGCW3S.cjs'),require('./chunk-UNYXWPLZ.cjs'),require('./chunk-PITMDQYN.cjs'),require('./chunk-GIS6X43A.cjs'),require('./chunk-LEBM6ZSZ.cjs'),require('./chunk-GNEVCEJU.cjs'),require('./chunk-ZO3YB5DK.cjs'),require('./chunk-3VXEK5ZW.cjs'),require('./chunk-EZIDQBXI.cjs'),require('./chunk-LQ3YZTPU.cjs'),require('./chunk-MVX2PYJJ.cjs'),require('./chunk-AK754S3T.cjs'),require('./chunk-DUO523BH.cjs'),require('./chunk-WCFHS7EZ.cjs'),require('./chunk-73D2PNHD.cjs'),require('./chunk-AMGJ5AFH.cjs'),require('./chunk-TDGSIF5H.cjs'),require('./chunk-XBQ6HV3T.cjs'),require('./chunk-7JWQ2PZP.cjs'),require('./chunk-NGNJSUGL.cjs'),require('./chunk-KCHPADCH.cjs'),require('./chunk-BAVN7VDR.cjs'),require('./chunk-LY7N3UHH.cjs'),require('./chunk-7ACHOBWY.cjs'),require('./chunk-GNOSG3PK.cjs'),require('./chunk-BCEE4NBZ.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-6KERPHAL.cjs'),require('./chunk-7DUKWHRN.cjs'),require('./chunk-VQ53TFYA.cjs'),require('./chunk-F4ITQ6XQ.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-ZOVH6QT5.cjs'),require('./chunk-7WMMKGEO.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs');chunkBUNLC3II_cjs.h();function n(e){return new Response(e.body,e)}var i={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function o(){return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}async function c(){try{return (await chunkNTKIONEC_cjs.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.graphqlEnabled??i.graphqlEnabled}catch{return true}}var d=async e=>{if(await chunkNTKIONEC_cjs.b(e),!await c())return o();let s=await chunkNTKIONEC_cjs.a.getGraphQL().fetch(e.request,e.locals);return n(s)},f=async e=>{if(await chunkNTKIONEC_cjs.b(e),!await c())return o();let s=await chunkNTKIONEC_cjs.a.getGraphQL().fetch(e.request,e.locals);return n(s)};exports.GET=f;exports.POST=d;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,a}from'./chunk-
|
|
1
|
+
import {b,a}from'./chunk-AO2IXWV4.js';import'./chunk-33E4YN62.js';import'./chunk-7N6TW4JB.js';import'./chunk-LWM4WABU.js';import'./chunk-SQBTIMWF.js';import'./chunk-PA4ZZREG.js';import'./chunk-ZMG7Z3KF.js';import'./chunk-T4TSELDS.js';import'./chunk-KWGB3YNI.js';import'./chunk-OLRCZ6E3.js';import'./chunk-R25WLKX4.js';import'./chunk-6TPICJ2L.js';import'./chunk-YENNL5HG.js';import'./chunk-W45TLOOT.js';import'./chunk-IKGVPXMK.js';import'./chunk-YUUXFD73.js';import'./chunk-LVBHOZZF.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-CIVA6SKW.js';import'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';import'./chunk-L2QXP26Q.js';import'./chunk-YZEMLLD2.js';import'./chunk-RTHJ6SS5.js';import'./chunk-5M3FKE2V.js';import'./chunk-7MNDQU6K.js';import'./chunk-QDBGBDCT.js';import'./chunk-KNOFTUQV.js';import'./chunk-ZWDBPEXL.js';import'./chunk-47CXBWMA.js';import'./chunk-EML5FDUU.js';import'./chunk-OXGJOYEO.js';import'./chunk-FLMUMPDE.js';import'./chunk-2HA6EKXX.js';import'./chunk-JV4HJBXW.js';import'./chunk-N5POANYV.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';import'./chunk-LVHWORV4.js';import'./chunk-5ZEYOFAK.js';import'./chunk-SLMIYECU.js';import'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-VVVCCB6R.js';import'./chunk-TBHNE4VV.js';import {g}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
2
2
|
g();function n(e){return new Response(e.body,e)}var i={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function o(){return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}async function c(){try{return (await a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.graphqlEnabled??i.graphqlEnabled}catch{return true}}var f=async e=>{if(await b(e),!await c())return o();let s=await a.getGraphQL().fetch(e.request,e.locals);return n(s)},h=async e=>{if(await b(e),!await c())return o();let s=await a.getGraphQL().fetch(e.request,e.locals);return n(s)};export{h as GET,f as POST};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkNTKIONEC_cjs=require('./chunk-NTKIONEC.cjs');require('./chunk-WQCLLM4S.cjs'),require('./chunk-M56F4LQ5.cjs'),require('./chunk-7GGZA5YU.cjs'),require('./chunk-5LPNEYK5.cjs'),require('./chunk-MP5VC5ER.cjs'),require('./chunk-VOQUO2EZ.cjs'),require('./chunk-OUMUIICN.cjs'),require('./chunk-XTTGHN3D.cjs'),require('./chunk-HPYH7GTS.cjs'),require('./chunk-BHR7OAU4.cjs'),require('./chunk-O4YE57OS.cjs'),require('./chunk-MCIZG4A3.cjs'),require('./chunk-35PGCW3S.cjs'),require('./chunk-UNYXWPLZ.cjs'),require('./chunk-PITMDQYN.cjs'),require('./chunk-GIS6X43A.cjs'),require('./chunk-LEBM6ZSZ.cjs'),require('./chunk-GNEVCEJU.cjs'),require('./chunk-ZO3YB5DK.cjs'),require('./chunk-3VXEK5ZW.cjs'),require('./chunk-EZIDQBXI.cjs'),require('./chunk-LQ3YZTPU.cjs'),require('./chunk-MVX2PYJJ.cjs'),require('./chunk-AK754S3T.cjs'),require('./chunk-DUO523BH.cjs'),require('./chunk-WCFHS7EZ.cjs'),require('./chunk-73D2PNHD.cjs'),require('./chunk-AMGJ5AFH.cjs'),require('./chunk-TDGSIF5H.cjs'),require('./chunk-XBQ6HV3T.cjs'),require('./chunk-7JWQ2PZP.cjs'),require('./chunk-NGNJSUGL.cjs'),require('./chunk-KCHPADCH.cjs'),require('./chunk-BAVN7VDR.cjs'),require('./chunk-LY7N3UHH.cjs'),require('./chunk-7ACHOBWY.cjs'),require('./chunk-GNOSG3PK.cjs'),require('./chunk-BCEE4NBZ.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-6KERPHAL.cjs'),require('./chunk-7DUKWHRN.cjs'),require('./chunk-VQ53TFYA.cjs'),require('./chunk-F4ITQ6XQ.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-ZOVH6QT5.cjs'),require('./chunk-7WMMKGEO.cjs');var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs');chunkBUNLC3II_cjs.h();function n(){return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}var s={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function o(){try{return (await chunkNTKIONEC_cjs.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.trpcEnabled??s.trpcEnabled}catch{return true}}var p=async e=>(await chunkNTKIONEC_cjs.b(e),await o()?chunkNTKIONEC_cjs.a.getTRPC().fetch(e.request,e.locals):n());exports.ALL=p;
|
package/dist/api-handler-trpc.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,a}from'./chunk-
|
|
1
|
+
import {b,a}from'./chunk-AO2IXWV4.js';import'./chunk-33E4YN62.js';import'./chunk-7N6TW4JB.js';import'./chunk-LWM4WABU.js';import'./chunk-SQBTIMWF.js';import'./chunk-PA4ZZREG.js';import'./chunk-ZMG7Z3KF.js';import'./chunk-T4TSELDS.js';import'./chunk-KWGB3YNI.js';import'./chunk-OLRCZ6E3.js';import'./chunk-R25WLKX4.js';import'./chunk-6TPICJ2L.js';import'./chunk-YENNL5HG.js';import'./chunk-W45TLOOT.js';import'./chunk-IKGVPXMK.js';import'./chunk-YUUXFD73.js';import'./chunk-LVBHOZZF.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-CIVA6SKW.js';import'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';import'./chunk-L2QXP26Q.js';import'./chunk-YZEMLLD2.js';import'./chunk-RTHJ6SS5.js';import'./chunk-5M3FKE2V.js';import'./chunk-7MNDQU6K.js';import'./chunk-QDBGBDCT.js';import'./chunk-KNOFTUQV.js';import'./chunk-ZWDBPEXL.js';import'./chunk-47CXBWMA.js';import'./chunk-EML5FDUU.js';import'./chunk-OXGJOYEO.js';import'./chunk-FLMUMPDE.js';import'./chunk-2HA6EKXX.js';import'./chunk-JV4HJBXW.js';import'./chunk-N5POANYV.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';import'./chunk-LVHWORV4.js';import'./chunk-5ZEYOFAK.js';import'./chunk-SLMIYECU.js';import'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-VVVCCB6R.js';import'./chunk-TBHNE4VV.js';import {g}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
2
2
|
g();function n(){return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}var s={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function o(){try{return (await a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.trpcEnabled??s.trpcEnabled}catch{return true}}var d=async e=>(await b(e),await o()?a.getTRPC().fetch(e.request,e.locals):n());export{d as ALL};
|
package/dist/api-handler.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkNTKIONEC_cjs=require('./chunk-NTKIONEC.cjs');require('./chunk-WQCLLM4S.cjs'),require('./chunk-M56F4LQ5.cjs'),require('./chunk-7GGZA5YU.cjs'),require('./chunk-5LPNEYK5.cjs'),require('./chunk-MP5VC5ER.cjs'),require('./chunk-VOQUO2EZ.cjs'),require('./chunk-OUMUIICN.cjs'),require('./chunk-XTTGHN3D.cjs'),require('./chunk-HPYH7GTS.cjs'),require('./chunk-BHR7OAU4.cjs'),require('./chunk-O4YE57OS.cjs'),require('./chunk-MCIZG4A3.cjs'),require('./chunk-35PGCW3S.cjs'),require('./chunk-UNYXWPLZ.cjs'),require('./chunk-PITMDQYN.cjs'),require('./chunk-GIS6X43A.cjs'),require('./chunk-LEBM6ZSZ.cjs'),require('./chunk-GNEVCEJU.cjs'),require('./chunk-ZO3YB5DK.cjs'),require('./chunk-3VXEK5ZW.cjs'),require('./chunk-EZIDQBXI.cjs'),require('./chunk-LQ3YZTPU.cjs'),require('./chunk-MVX2PYJJ.cjs'),require('./chunk-AK754S3T.cjs'),require('./chunk-DUO523BH.cjs'),require('./chunk-WCFHS7EZ.cjs'),require('./chunk-73D2PNHD.cjs'),require('./chunk-AMGJ5AFH.cjs'),require('./chunk-TDGSIF5H.cjs'),require('./chunk-XBQ6HV3T.cjs'),require('./chunk-7JWQ2PZP.cjs'),require('./chunk-NGNJSUGL.cjs'),require('./chunk-KCHPADCH.cjs'),require('./chunk-BAVN7VDR.cjs'),require('./chunk-LY7N3UHH.cjs'),require('./chunk-7ACHOBWY.cjs'),require('./chunk-GNOSG3PK.cjs'),require('./chunk-BCEE4NBZ.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-6KERPHAL.cjs'),require('./chunk-7DUKWHRN.cjs'),require('./chunk-VQ53TFYA.cjs'),require('./chunk-F4ITQ6XQ.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-ZOVH6QT5.cjs'),require('./chunk-7WMMKGEO.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"ALL",{enumerable:true,get:function(){return chunkNTKIONEC_cjs.c}});Object.defineProperty(exports,"createKyroHandler",{enumerable:true,get:function(){return chunkNTKIONEC_cjs.d}});Object.defineProperty(exports,"kyroInstance",{enumerable:true,get:function(){return chunkNTKIONEC_cjs.a}});Object.defineProperty(exports,"warmKyroInstance",{enumerable:true,get:function(){return chunkNTKIONEC_cjs.b}});
|
package/dist/api-handler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as ALL,d as createKyroHandler,a as kyroInstance,b as warmKyroInstance}from'./chunk-
|
|
1
|
+
export{c as ALL,d as createKyroHandler,a as kyroInstance,b as warmKyroInstance}from'./chunk-AO2IXWV4.js';import'./chunk-33E4YN62.js';import'./chunk-7N6TW4JB.js';import'./chunk-LWM4WABU.js';import'./chunk-SQBTIMWF.js';import'./chunk-PA4ZZREG.js';import'./chunk-ZMG7Z3KF.js';import'./chunk-T4TSELDS.js';import'./chunk-KWGB3YNI.js';import'./chunk-OLRCZ6E3.js';import'./chunk-R25WLKX4.js';import'./chunk-6TPICJ2L.js';import'./chunk-YENNL5HG.js';import'./chunk-W45TLOOT.js';import'./chunk-IKGVPXMK.js';import'./chunk-YUUXFD73.js';import'./chunk-LVBHOZZF.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-CIVA6SKW.js';import'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';import'./chunk-L2QXP26Q.js';import'./chunk-YZEMLLD2.js';import'./chunk-RTHJ6SS5.js';import'./chunk-5M3FKE2V.js';import'./chunk-7MNDQU6K.js';import'./chunk-QDBGBDCT.js';import'./chunk-KNOFTUQV.js';import'./chunk-ZWDBPEXL.js';import'./chunk-47CXBWMA.js';import'./chunk-EML5FDUU.js';import'./chunk-OXGJOYEO.js';import'./chunk-FLMUMPDE.js';import'./chunk-2HA6EKXX.js';import'./chunk-JV4HJBXW.js';import'./chunk-N5POANYV.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';import'./chunk-LVHWORV4.js';import'./chunk-5ZEYOFAK.js';import'./chunk-SLMIYECU.js';import'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-VVVCCB6R.js';import'./chunk-TBHNE4VV.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkM56F4LQ5_cjs=require('./chunk-M56F4LQ5.cjs');require('./chunk-XTTGHN3D.cjs'),require('./chunk-HPYH7GTS.cjs'),require('./chunk-BHR7OAU4.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"autoBootstrap",{enumerable:true,get:function(){return chunkM56F4LQ5_cjs.e}});Object.defineProperty(exports,"bootstrapAdmin",{enumerable:true,get:function(){return chunkM56F4LQ5_cjs.a}});Object.defineProperty(exports,"bootstrapWithRetry",{enumerable:true,get:function(){return chunkM56F4LQ5_cjs.f}});Object.defineProperty(exports,"buildBootstrapConfig",{enumerable:true,get:function(){return chunkM56F4LQ5_cjs.c}});Object.defineProperty(exports,"checkBootstrapRequired",{enumerable:true,get:function(){return chunkM56F4LQ5_cjs.b}});Object.defineProperty(exports,"getBootstrapFromEnv",{enumerable:true,get:function(){return chunkM56F4LQ5_cjs.d}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as autoBootstrap,a as bootstrapAdmin,f as bootstrapWithRetry,c as buildBootstrapConfig,b as checkBootstrapRequired,d as getBootstrapFromEnv}from'./chunk-
|
|
1
|
+
export{e as autoBootstrap,a as bootstrapAdmin,f as bootstrapWithRetry,c as buildBootstrapConfig,b as checkBootstrapRequired,d as getBootstrapFromEnv}from'./chunk-7N6TW4JB.js';import'./chunk-KWGB3YNI.js';import'./chunk-OLRCZ6E3.js';import'./chunk-R25WLKX4.js';import'./chunk-3NSZZCOJ.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-LWM4WABU.js';import {a as a$2}from'./chunk-SQBTIMWF.js';import {a as a$4,i as i$1}from'./chunk-PA4ZZREG.js';import {r as r$1,p as p$1,n as n$1,c as c$2,q as q$1,o as o$1,J as J$1,b as b$3,a as a$5,F as F$2,D as D$1,C as C$2,e as e$3,H as H$2,x as x$1,d as d$4,y as y$2,k as k$1,f as f$4,A as A$1,j as j$1,z as z$2,u as u$1,v as v$1,w as w$1,g as g$5,E as E$1,B as B$1,t as t$1,s as s$1,m as m$1,i as i$2,l as l$1,h as h$1}from'./chunk-ZMG7Z3KF.js';import {wa as wa$1,a as a$1,ua as ua$1,Aa as Aa$1,ra as ra$1,Da as Da$1,Na as Na$1,qa as qa$1,ka as ka$1,za as za$1,i,Ga as Ga$1,Ea as Ea$1,f as f$1,Ma as Ma$1,Qa as Qa$1,Ra,Sa as Sa$1,Oa as Oa$1,Ta as Ta$1,Ua as Ua$1,b as b$1,ya as ya$1,la as la$1,Pa as Pa$1,sa as sa$1,va as va$1,La as La$1,ma as ma$1,Fa as Fa$1,k,Ja as Ja$1,Ia as Ia$1,ha as ha$1,t,s,u,r,Ca as Ca$1,ja as ja$1,d as d$1,j,Ha as Ha$1,Ka as Ka$1,Ba as Ba$1,h,w,pa as pa$1,ga as ga$1,Va as Va$1,oa as oa$1,na as na$1,xa as xa$1,ta as ta$1,m,I,G as G$1,L,D,v,O,Y,C as C$1,x,R,P,fa as fa$1,X,ea as ea$1,c as c$1,Z,K,y as y$1,_,E,H as H$1,W,ba as ba$1,Q as Q$1,U,T,e,N as N$1,S,ia as ia$1,g as g$1,V,M as M$1,$,B,aa as aa$1,da as da$1,A,z as z$1,J,F as F$1,n,q,Wa as Wa$1,o,l,p,ca as ca$1,Xa as Xa$1,Ya as Ya$1,$a as $a$1,ib}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-LWM4WABU.js';import {a as a$2}from'./chunk-SQBTIMWF.js';import {a as a$4,i as i$1}from'./chunk-PA4ZZREG.js';import {r as r$1,p as p$1,n as n$1,c as c$2,q as q$1,o as o$1,J as J$1,b as b$3,a as a$5,F as F$2,D as D$1,C as C$2,e as e$3,H as H$2,x as x$1,d as d$4,y as y$2,k as k$1,f as f$4,A as A$1,j as j$1,z as z$2,u as u$1,v as v$1,w as w$1,g as g$5,E as E$1,B as B$1,t as t$1,s as s$1,m as m$1,i as i$2,l as l$1,h as h$1}from'./chunk-ZMG7Z3KF.js';import {wa as wa$1,a as a$1,ua as ua$1,Aa as Aa$1,ra as ra$1,Da as Da$1,Na as Na$1,qa as qa$1,ka as ka$1,za as za$1,i,Ga as Ga$1,Ea as Ea$1,f as f$1,Ma as Ma$1,Qa as Qa$1,Ra,Sa as Sa$1,Oa as Oa$1,Ta as Ta$1,Ua as Ua$1,b as b$1,ya as ya$1,la as la$1,Pa as Pa$1,sa as sa$1,va as va$1,La as La$1,ma as ma$1,Fa as Fa$1,k,Ja as Ja$1,Ia as Ia$1,ha as ha$1,t,s,u,r,Ca as Ca$1,ja as ja$1,d as d$1,j,Ha as Ha$1,Ka as Ka$1,Ba as Ba$1,h,w,pa as pa$1,ga as ga$1,Va as Va$1,oa as oa$1,na as na$1,xa as xa$1,ta as ta$1,m,I,G as G$1,L,D,v,O,Y,C as C$1,x,R,P,fa as fa$1,X,ea as ea$1,c as c$1,Z,K,y as y$1,_,E,H as H$1,W,ba as ba$1,Q as Q$1,U,T,e,N as N$1,S,ia as ia$1,g as g$1,V,M as M$1,$,B,aa as aa$1,da as da$1,A,z as z$1,J,F as F$1,n,q,Wa as Wa$1,o,l,p,ca as ca$1,Xa as Xa$1,Ya as Ya$1,$a as $a$1,ib}from'./chunk-T4TSELDS.js';import {o as o$2,f as f$2,g as g$3}from'./chunk-YZEMLLD2.js';import {d as d$2,e as e$2,f as f$3,g as g$4}from'./chunk-RTHJ6SS5.js';import {b as b$2,d as d$3}from'./chunk-5M3FKE2V.js';import {c as c$3}from'./chunk-KNOFTUQV.js';import {g as g$2}from'./chunk-47CXBWMA.js';import {c,g,b,d,a,f,e as e$1}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
2
2
|
var ms=c((hw,Ra)=>{g();function Rp(){return Object.keys(globalThis).some(t=>t.startsWith("__NEXT"))}Ra.exports=function(){return !!(globalThis.Deno||globalThis.Bun||Rp())};});function Aa(t,e){return (e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function _s(t,e=false){let r=[],n=0;for(;n<t.length;){let s=t[n],i=F(function(o){if(!e)throw new TypeError(o);r.push({type:"INVALID_CHAR",index:n,value:t[n++]});},"ErrorOrInvalid");if(s==="*"){r.push({type:"ASTERISK",index:n,value:t[n++]});continue}if(s==="+"||s==="?"){r.push({type:"OTHER_MODIFIER",index:n,value:t[n++]});continue}if(s==="\\"){r.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});continue}if(s==="{"){r.push({type:"OPEN",index:n,value:t[n++]});continue}if(s==="}"){r.push({type:"CLOSE",index:n,value:t[n++]});continue}if(s===":"){let o="",a=n+1;for(;a<t.length;){let c=t.substr(a,1);if(a===n+1&&Lp.test(c)||a!==n+1&&Op.test(c)){o+=t[a++];continue}break}if(!o){i(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:o}),n=a;continue}if(s==="("){let o=1,a="",c=n+1,l=false;if(t[c]==="?"){i(`Pattern cannot start with "?" at ${c}`);continue}for(;c<t.length;){if(!Aa(t[c],false)){i(`Invalid character '${t[c]}' at ${c}.`),l=true;break}if(t[c]==="\\"){a+=t[c++]+t[c++];continue}if(t[c]===")"){if(o--,o===0){c++;break}}else if(t[c]==="("&&(o++,t[c+1]!=="?")){i(`Capturing groups are not allowed at ${c}`),l=true;break}a+=t[c++];}if(l)continue;if(o){i(`Unbalanced pattern at ${n}`);continue}if(!a){i(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:a}),n=c;continue}r.push({type:"CHAR",index:n,value:t[n++]});}return r.push({type:"END",index:n,value:""}),r}function ws(t,e={}){let r=_s(t);e.delimiter??="/#?",e.prefixes??="./";let n=`[^${me(e.delimiter)}]+?`,s=[],i=0,o=0,c=new Set,l=F(P=>{if(o<r.length&&r[o].type===P)return r[o++].value},"tryConsume"),u=F(()=>l("OTHER_MODIFIER")??l("ASTERISK"),"tryConsumeModifier"),h=F(P=>{let k=l(P);if(k!==void 0)return k;let{type:S,index:v}=r[o];throw new TypeError(`Unexpected ${S} at ${v}, expected ${P}`)},"mustConsume"),d=F(()=>{let P="",k;for(;k=l("CHAR")??l("ESCAPED_CHAR");)P+=k;return P},"consumeText"),p=F(P=>P,"DefaultEncodePart"),_=e.encodePart||p,E="",A=F(P=>{E+=P;},"appendToPendingFixedValue"),R=F(()=>{E.length&&(s.push(new wt(3,"","",_(E),"",3)),E="");},"maybeAddPartFromPendingFixedValue"),j=F((P,k,S,v,O)=>{let g=3;switch(O){case "?":g=1;break;case "*":g=0;break;case "+":g=2;break}if(!k&&!S&&g===3){A(P);return}if(R(),!k&&!S){if(!P)return;s.push(new wt(3,"","",_(P),"",g));return}let x;S?S==="*"?x=ys:x=S:x=n;let w=2;x===n?(w=1,x=""):x===ys&&(w=0,x="");let T;if(k?T=k:S&&(T=i++),c.has(T))throw new TypeError(`Duplicate name '${T}'.`);c.add(T),s.push(new wt(w,T,_(P),x,_(v),g));},"addPart");for(;o<r.length;){let P=l("CHAR"),k=l("NAME"),S=l("REGEX");if(!k&&!S&&(S=l("ASTERISK")),k||S){let O=P??"";e.prefixes.indexOf(O)===-1&&(A(O),O=""),R();let g=u();j(O,k,S,"",g);continue}let v=P??l("ESCAPED_CHAR");if(v){A(v);continue}if(l("OPEN")){let O=d(),g=l("NAME"),x=l("REGEX");!g&&!x&&(x=l("ASTERISK"));let w=d();h("CLOSE");let T=u();j(O,g,x,w,T);continue}R(),h("END");}return s}function me(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function gs(t){return t&&t.ignoreCase?"ui":"u"}function La(t,e,r){return Ss(ws(t,r),e,r)}function tt(t){switch(t){case 0:return "*";case 1:return "?";case 2:return "+";case 3:return ""}}function Ss(t,e,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=false,r.strict??=false,r.end??=true,r.start??=true,r.endsWith="";let n=r.start?"^":"";for(let a of t){if(a.type===3){a.modifier===3?n+=me(a.value):n+=`(?:${me(a.value)})${tt(a.modifier)}`;continue}e&&e.push(a.name);let c=`[^${me(r.delimiter)}]+?`,l=a.value;if(a.type===1?l=c:a.type===0&&(l=ys),!a.prefix.length&&!a.suffix.length){a.modifier===3||a.modifier===1?n+=`(${l})${tt(a.modifier)}`:n+=`((?:${l})${tt(a.modifier)})`;continue}if(a.modifier===3||a.modifier===1){n+=`(?:${me(a.prefix)}(${l})${me(a.suffix)})`,n+=tt(a.modifier);continue}n+=`(?:${me(a.prefix)}`,n+=`((?:${l})(?:`,n+=me(a.suffix),n+=me(a.prefix),n+=`(?:${l}))*)${me(a.suffix)})`,a.modifier===0&&(n+="?");}let s=`[${me(r.endsWith)}]|$`,i=`[${me(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${i}?`),r.endsWith.length?n+=`(?=${s})`:n+="$",new RegExp(n,gs(r));r.strict||(n+=`(?:${i}(?=${s}))?`);let o=false;if(t.length){let a=t[t.length-1];a.type===3&&a.modifier===3&&(o=r.delimiter.indexOf(a)>-1);}return o||(n+=`(?=${i}|${s})`),new RegExp(n,gs(r))}function Oa(t,e){return t.length?t[0]==="/"?true:!e||t.length<2?false:(t[0]=="\\"||t[0]=="{")&&t[1]=="/":false}function Es(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function Fa(t,e){return t.endsWith(e)?t.substr(0,t.length-e.length):t}function Ps(t){return !t||t.length<2?false:t[0]==="["||(t[0]==="\\"||t[0]==="{")&&t[1]==="["}function vs(t){if(!t)return true;for(let e of Ia)if(t.test(e))return true;return false}function Da(t,e){if(t=Es(t,"#"),e||t==="")return t;let r=new URL("https://example.com");return r.hash=t,r.hash?r.hash.substring(1,r.hash.length):""}function ja(t,e){if(t=Es(t,"?"),e||t==="")return t;let r=new URL("https://example.com");return r.search=t,r.search?r.search.substring(1,r.search.length):""}function qa(t,e){return e||t===""?t:Ps(t)?Cs(t):ks(t)}function Ua(t,e){if(e||t==="")return t;let r=new URL("https://example.com");return r.password=t,r.password}function Ma(t,e){if(e||t==="")return t;let r=new URL("https://example.com");return r.username=t,r.username}function Ba(t,e,r){if(r||t==="")return t;if(e&&!Ia.includes(e))return new URL(`${e}:${t}`).pathname;let n=t[0]=="/";return t=new URL(n?t:"/-"+t,"https://example.com").pathname,n||(t=t.substring(2,t.length)),t}function $a(t,e,r){return Ts(e)===t&&(t=""),r||t===""?t:Rs(t)}function Na(t,e){return t=Fa(t,":"),e||t===""?t:Ar(t)}function Ts(t){switch(t){case "ws":case "http":return "80";case "wws":case "https":return "443";case "ftp":return "21";default:return ""}}function Ar(t){if(t==="")return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function Ga(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username}function Ha(t){if(t==="")return t;let e=new URL("https://example.com");return e.password=t,e.password}function ks(t){if(t==="")return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);let e=new URL("https://example.com");return e.hostname=t,e.hostname}function Cs(t){if(t==="")return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function Rs(t){if(t===""||/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function za(t){if(t==="")return t;let e=new URL("https://example.com");return e.pathname=t[0]!=="/"?"/-"+t:t,t[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname}function Va(t){return t===""?t:new URL(`data:${t}`).pathname}function Wa(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function Ka(t){if(t==="")return t;let e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}function xs(t,e){if(typeof t!="string")throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(t,e);return {protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:r.search!==""?r.search.substring(1,r.search.length):void 0,hash:r.hash!==""?r.hash.substring(1,r.hash.length):void 0}}function Te(t,e){return e?_t(t):t}function xt(t,e,r){let n;if(typeof e.baseURL=="string")try{n=new URL(e.baseURL),e.protocol===void 0&&(t.protocol=Te(n.protocol.substring(0,n.protocol.length-1),r)),!r&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&(t.username=Te(n.username,r)),!r&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&e.password===void 0&&(t.password=Te(n.password,r)),e.protocol===void 0&&e.hostname===void 0&&(t.hostname=Te(n.hostname,r)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&(t.port=Te(n.port,r)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&(t.pathname=Te(n.pathname,r)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&(t.search=Te(n.search.substring(1,n.search.length),r)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&e.hash===void 0&&(t.hash=Te(n.hash.substring(1,n.hash.length),r));}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if(typeof e.protocol=="string"&&(t.protocol=Na(e.protocol,r)),typeof e.username=="string"&&(t.username=Ma(e.username,r)),typeof e.password=="string"&&(t.password=Ua(e.password,r)),typeof e.hostname=="string"&&(t.hostname=qa(e.hostname,r)),typeof e.port=="string"&&(t.port=$a(e.port,t.protocol,r)),typeof e.pathname=="string"){if(t.pathname=e.pathname,n&&!Oa(t.pathname,r)){let s=n.pathname.lastIndexOf("/");s>=0&&(t.pathname=Te(n.pathname.substring(0,s+1),r)+t.pathname);}t.pathname=Ba(t.pathname,t.protocol,r);}return typeof e.search=="string"&&(t.search=ja(e.search,r)),typeof e.hash=="string"&&(t.hash=Da(e.hash,r)),t}function _t(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function Za(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function Ja(t,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=false,e.strict??=false,e.end??=true,e.start??=true,e.endsWith="";let r=".*",n=`[^${Za(e.delimiter)}]+?`,s=/[$_\u200C\u200D\p{ID_Continue}]/u,i="";for(let o=0;o<t.length;++o){let a=t[o];if(a.type===3){if(a.modifier===3){i+=_t(a.value);continue}i+=`{${_t(a.value)}}${tt(a.modifier)}`;continue}let c=a.hasCustomName(),l=!!a.suffix.length||!!a.prefix.length&&(a.prefix.length!==1||!e.prefixes.includes(a.prefix)),u=o>0?t[o-1]:null,h=o<t.length-1?t[o+1]:null;if(!l&&c&&a.type===1&&a.modifier===3&&h&&!h.prefix.length&&!h.suffix.length)if(h.type===3){let d=h.value.length>0?h.value[0]:"";l=s.test(d);}else l=!h.hasCustomName();if(!l&&!a.prefix.length&&u&&u.type===3){let d=u.value[u.value.length-1];l=e.prefixes.includes(d);}l&&(i+="{"),i+=_t(a.prefix),c&&(i+=`:${a.name}`),a.type===2?i+=`(${a.value})`:a.type===1?c||(i+=`(${n})`):a.type===0&&(!c&&(!u||u.type===3||u.modifier!==3||l||a.prefix!=="")?i+="*":i+=`(${r})`),a.type===1&&c&&a.suffix.length&&s.test(a.suffix[0])&&(i+="\\"),i+=_t(a.suffix),l&&(i+="}"),a.modifier!==3&&(i+=tt(a.modifier));}return i}var Ap,F,wt,Lp,Op,ys,He,Fp,Ip,Ia,Qa,bs,Ge,Lr,Ya=b(()=>{g();Ap=Object.defineProperty,F=(t,e)=>Ap(t,"name",{value:e,configurable:true}),wt=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,e,r,n,s,i){this.type=t,this.name=e,this.prefix=r,this.value=n,this.suffix=s,this.modifier=i;}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};F(wt,"Part");Lp=/[$_\p{ID_Start}]/u,Op=/[$_\u200C\u200D\p{ID_Continue}]/u,ys=".*";F(Aa,"isASCII");F(_s,"lexer");F(ws,"parse");F(me,"escapeString");F(gs,"flags");F(La,"stringToRegexp");F(tt,"modifierToString");F(Ss,"partsToRegexp");He={delimiter:"",prefixes:"",sensitive:true,strict:true},Fp={delimiter:".",prefixes:"",sensitive:true,strict:true},Ip={delimiter:"/",prefixes:"/",sensitive:true,strict:true};F(Oa,"isAbsolutePathname");F(Es,"maybeStripPrefix");F(Fa,"maybeStripSuffix");F(Ps,"treatAsIPv6Hostname");Ia=["ftp","file","http","https","ws","wss"];F(vs,"isSpecialScheme");F(Da,"canonicalizeHash");F(ja,"canonicalizeSearch");F(qa,"canonicalizeHostname");F(Ua,"canonicalizePassword");F(Ma,"canonicalizeUsername");F(Ba,"canonicalizePathname");F($a,"canonicalizePort");F(Na,"canonicalizeProtocol");F(Ts,"defaultPortForProtocol");F(Ar,"protocolEncodeCallback");F(Ga,"usernameEncodeCallback");F(Ha,"passwordEncodeCallback");F(ks,"hostnameEncodeCallback");F(Cs,"ipv6HostnameEncodeCallback");F(Rs,"portEncodeCallback");F(za,"standardURLPathnameEncodeCallback");F(Va,"pathURLPathnameEncodeCallback");F(Wa,"searchEncodeCallback");F(Ka,"hashEncodeCallback");Qa=class{#o;#r=[];#n={};#t=0;#p=1;#w=0;#s=0;#y=0;#l=0;#i=false;constructor(t){this.#o=t;}get result(){return this.#n}parse(){for(this.#r=_s(this.#o,true);this.#t<this.#r.length;this.#t+=this.#p){if(this.#p=1,this.#r[this.#t].type==="END"){if(this.#s===0){this.#b(),this.#T()?this.#e(9,1):this.#d()?this.#e(8,1):this.#e(7,0);continue}else if(this.#s===2){this.#f(5);continue}this.#e(10,0);break}if(this.#y>0)if(this.#k())this.#y-=1;else continue;if(this.#L()){this.#y+=1;continue}switch(this.#s){case 0:this.#h()&&this.#f(1);break;case 1:if(this.#h()){this.#O();let t=7,e=1;this.#E()?(t=2,e=3):this.#i&&(t=2),this.#e(t,e);}break;case 2:this.#g()?this.#f(3):(this.#v()||this.#d()||this.#T())&&this.#f(5);break;case 3:this.#x()?this.#e(4,1):this.#g()&&this.#e(5,1);break;case 4:this.#g()&&this.#e(5,1);break;case 5:this.#F()?this.#l+=1:this.#_()&&(this.#l-=1),this.#P()&&!this.#l?this.#e(6,1):this.#v()?this.#e(7,0):this.#d()?this.#e(8,1):this.#T()&&this.#e(9,1);break;case 6:this.#v()?this.#e(7,0):this.#d()?this.#e(8,1):this.#T()&&this.#e(9,1);break;case 7:this.#d()?this.#e(8,1):this.#T()&&this.#e(9,1);break;case 8:this.#T()&&this.#e(9,1);break;}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port="");}#e(t,e){switch(this.#s){case 0:break;case 1:this.#n.protocol=this.#S();break;case 2:break;case 3:this.#n.username=this.#S();break;case 4:this.#n.password=this.#S();break;case 5:this.#n.hostname=this.#S();break;case 6:this.#n.port=this.#S();break;case 7:this.#n.pathname=this.#S();break;case 8:this.#n.search=this.#S();break;case 9:this.#n.hash=this.#S();break;}this.#s!==0&&t!==10&&([1,2,3,4].includes(this.#s)&&[6,7,8,9].includes(t)&&(this.#n.hostname??=""),[1,2,3,4,5,6].includes(this.#s)&&[8,9].includes(t)&&(this.#n.pathname??=this.#i?"/":""),[1,2,3,4,5,6,7].includes(this.#s)&&t===9&&(this.#n.search??="")),this.#m(t,e);}#m(t,e){this.#s=t,this.#w=this.#t+e,this.#t+=e,this.#p=0;}#b(){this.#t=this.#w,this.#p=0;}#f(t){this.#b(),this.#s=t;}#u(t){return t<0&&(t=this.#r.length-t),t<this.#r.length?this.#r[t]:this.#r[this.#r.length-1]}#c(t,e){let r=this.#u(t);return r.value===e&&(r.type==="CHAR"||r.type==="ESCAPED_CHAR"||r.type==="INVALID_CHAR")}#h(){return this.#c(this.#t,":")}#E(){return this.#c(this.#t+1,"/")&&this.#c(this.#t+2,"/")}#g(){return this.#c(this.#t,"@")}#x(){return this.#c(this.#t,":")}#P(){return this.#c(this.#t,":")}#v(){return this.#c(this.#t,"/")}#d(){if(this.#c(this.#t,"?"))return true;if(this.#r[this.#t].value!=="?")return false;let t=this.#u(this.#t-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}#T(){return this.#c(this.#t,"#")}#L(){return this.#r[this.#t].type=="OPEN"}#k(){return this.#r[this.#t].type=="CLOSE"}#F(){return this.#c(this.#t,"[")}#_(){return this.#c(this.#t,"]")}#S(){let t=this.#r[this.#t],e=this.#u(this.#w).index;return this.#o.substring(e,t.index)}#O(){let t={};Object.assign(t,He),t.encodePart=Ar;let e=La(this.#S(),void 0,t);this.#i=vs(e);}};F(Qa,"Parser");bs=["protocol","username","password","hostname","port","pathname","search","hash"],Ge="*";F(xs,"extractValues");F(Te,"processBaseURLString");F(xt,"applyInit");F(_t,"escapePatternString");F(Za,"escapeRegexpString");F(Ja,"partsToPattern");Lr=class{#o;#r={};#n={};#t={};#p={};#w=false;constructor(t={},e,r){try{let n;if(typeof e=="string"?n=e:r=e,typeof t=="string"){let a=new Qa(t);if(a.parse(),t=a.result,n===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=n;}else {if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(n)throw new TypeError("parameter 1 is not of type 'string'.")}typeof r>"u"&&(r={ignoreCase:!1});let s={ignoreCase:r.ignoreCase===!0},i={pathname:Ge,protocol:Ge,username:Ge,password:Ge,hostname:Ge,port:Ge,search:Ge,hash:Ge};this.#o=xt(i,t,!0),Ts(this.#o.protocol)===this.#o.port&&(this.#o.port="");let o;for(o of bs){if(!(o in this.#o))continue;let a={},c=this.#o[o];switch(this.#n[o]=[],o){case "protocol":Object.assign(a,He),a.encodePart=Ar;break;case "username":Object.assign(a,He),a.encodePart=Ga;break;case "password":Object.assign(a,He),a.encodePart=Ha;break;case "hostname":Object.assign(a,Fp),Ps(c)?a.encodePart=Cs:a.encodePart=ks;break;case "port":Object.assign(a,He),a.encodePart=Rs;break;case "pathname":vs(this.#r.protocol)?(Object.assign(a,Ip,s),a.encodePart=za):(Object.assign(a,He,s),a.encodePart=Va);break;case "search":Object.assign(a,He,s),a.encodePart=Wa;break;case "hash":Object.assign(a,He,s),a.encodePart=Ka;break}try{this.#p[o]=ws(c,a),this.#r[o]=Ss(this.#p[o],this.#n[o],a),this.#t[o]=Ja(this.#p[o],a),this.#w=this.#w||this.#p[o].some(l=>l.type===2);}catch{throw new TypeError(`invalid ${o} pattern '${this.#o[o]}'.`)}}}catch(n){throw new TypeError(`Failed to construct 'URLPattern': ${n.message}`)}}get[Symbol.toStringTag](){return "URLPattern"}test(t={},e){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return false;try{typeof t=="object"?r=xt(r,t,!1):r=xt(r,xs(t,e),!1);}catch{return false}let n;for(n of bs)if(!this.#r[n].exec(r[n]))return false;return true}exec(t={},e){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?r=xt(r,t,!1):r=xt(r,xs(t,e),!1);}catch{return null}let n={};e?n.inputs=[t,e]:n.inputs=[t];let s;for(s of bs){let i=this.#r[s].exec(r[s]);if(!i)return null;let o={};for(let[a,c]of this.#n[s].entries())if(typeof c=="string"||typeof c=="number"){let l=i[a+1];o[c]=l;}n[s]={input:r[s]??"",groups:o};}return n}static compareComponent(t,e,r){let n=F((a,c)=>{for(let l of ["type","modifier","prefix","value","suffix"]){if(a[l]<c[l])return -1;if(a[l]!==c[l])return 1}return 0},"comparePart"),s=new wt(3,"","","","",3),i=new wt(0,"","","","",3),o=F((a,c)=>{let l=0;for(;l<Math.min(a.length,c.length);++l){let u=n(a[l],c[l]);if(u)return u}return a.length===c.length?0:n(a[l]??s,c[l]??s)},"comparePartList");return !e.#t[t]&&!r.#t[t]?0:e.#t[t]&&!r.#t[t]?o(e.#p[t],[i]):!e.#t[t]&&r.#t[t]?o([i],r.#p[t]):o(e.#p[t],r.#p[t])}get protocol(){return this.#t.protocol}get username(){return this.#t.username}get password(){return this.#t.password}get hostname(){return this.#t.hostname}get port(){return this.#t.port}get pathname(){return this.#t.pathname}get search(){return this.#t.search}get hash(){return this.#t.hash}get hasRegExpGroups(){return this.#w}};F(Lr,"URLPattern");});var Xa={};d(Xa,{URLPattern:()=>Lr});var el=b(()=>{g();Ya();globalThis.URLPattern||(globalThis.URLPattern=Lr);});var Ve=c(de=>{g();Object.defineProperty(de,"__esModule",{value:true});de.isPromise=Or;de.isActualPromise=rl;de.handleMaybePromise=ze;de.fakePromise=ke;de.createDeferredPromise=Dp;de.iterateAsync=nl;de.iterateAsyncVoid=nl;de.fakeRejectPromise=rt;de.mapMaybePromise=jp;de.mapAsyncIterator=qp;de.promiseLikeFinally=sl;de.unfakePromise=il;var Fr=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function Or(t){return t?.then!=null}function rl(t){let e=t;return e&&e.then&&e.catch&&e.finally}function ze(t,e,r,n){let s=ke().then(t).then(e,r);return n&&(s=s.finally(n)),il(s)}function ke(t){return t&&rl(t)?t:Or(t)?{then:(e,r)=>ke(t.then(e,r)),catch:e=>ke(t.then(r=>r,e)),finally:e=>ke(e?sl(t,e):t),[Symbol.toStringTag]:"Promise"}:{then(e){if(e)try{return ke(e(t))}catch(r){return rt(r)}return this},catch(){return this},finally(e){if(e)try{return ke(e()).then(()=>t,()=>t)}catch(r){return rt(r)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:t,[Fr]:"resolved"}}function Dp(){if(Promise.withResolvers)return Promise.withResolvers();let t,e;return {promise:new Promise(function(s,i){t=s,e=i;}),get resolve(){return t},get reject(){return e}}}function nl(t,e,r){if(t?.length===0)return;let n=t[Symbol.iterator](),s=0;function i(){let{done:o,value:a}=n.next();if(o)return;let c=false;function l(){c=true;}return ze(function(){return e(a,l,s++)},function(h){if(h&&r?.push(h),!c)return i()})}return i()}function rt(t){return {then(e,r){if(r)try{return ke(r(t))}catch(n){return rt(n)}return this},catch(e){if(e)try{return ke(e(t))}catch(r){return rt(r)}return this},finally(e){if(e)try{e();}catch(r){return rt(r)}return this},__fakeRejectError:t,[Symbol.toStringTag]:"Promise",[Fr]:"rejected"}}function jp(t,e,r){return ze(()=>t,e,r)}function qp(t,e,r,n){Symbol.asyncIterator in t&&(t=t[Symbol.asyncIterator]());let s,i,o;if(n){let l;o=u=>(l||=ze(n,()=>u,()=>u),l);}typeof t.return=="function"&&(s=t.return,i=l=>{let u=()=>{throw l};return s.call(t).then(u,u)});function a(l){return l.done?o?o(l):l:ze(()=>l.value,u=>ze(()=>e(u),tl,i))}let c;if(r){let l,u=r;c=h=>(l||=ze(()=>h,d=>ze(()=>u(d),tl,i)),l);}return {next(){return t.next().then(a,c)},return(){let l=s?s.call(t).then(a,c):ke({value:void 0,done:true});return o?l.then(o):l},throw(l){return typeof t.throw=="function"?t.throw(l).then(a,c):i?i(l):rt(l)},[Symbol.asyncIterator](){return this}}}function tl(t){return {value:t,done:false}}function Up(t){return t?.[Fr]==="resolved"}function Mp(t){return t?.[Fr]==="rejected"}function sl(t,e){return "finally"in t?t.finally(e):t.then(r=>{let n=e();return Or(n)?n.then(()=>r):r},r=>{let n=e();if(Or(n))return n.then(()=>{throw r});throw r})}function il(t){if(Up(t))return t.__fakePromiseValue;if(Mp(t))throw t.__fakeRejectError;return t}});var As=c((Ew,ol)=>{g();var{EventEmitter:Bp}=a("events"),{inherits:$p}=a("util");function nt(t){if(typeof t=="string"&&(t=Buffer.from(t)),!Buffer.isBuffer(t))throw new TypeError("The needle has to be a String or a Buffer.");let e=t.length,r=e-1;if(e===0)throw new Error("The needle cannot be an empty String/Buffer.");if(e>256)throw new Error("The needle cannot have a length bigger than 256.");this.maxMatches=1/0,this.matches=0,this._occ=new Uint8Array(256).fill(e),this._lookbehind_size=0,this._needle=t,this._bufpos=0,this._lookbehind=Buffer.alloc(r);for(var n=0;n<r;++n)this._occ[t[n]]=r-n;}$p(nt,Bp);nt.prototype.reset=function(){this._lookbehind_size=0,this.matches=0,this._bufpos=0;};nt.prototype.push=function(t,e){Buffer.isBuffer(t)||(t=Buffer.from(t,"binary"));let r=t.length;this._bufpos=e||0;let n;for(;n!==r&&this.matches<this.maxMatches;)n=this._sbmh_feed(t);return n};nt.prototype._sbmh_feed=function(t){let e=t.length,r=this._needle,n=r.length,s=n-1,i=r[s],o=-this._lookbehind_size,a;if(o<0){for(;o<0&&o<=e-n;){if(a=t[o+s],a===i&&this._sbmh_memcmp(t,o,s))return this._lookbehind_size=0,++this.matches,this.emit("info",true),this._bufpos=o+n;o+=this._occ[a];}for(;o<0&&!this._sbmh_memcmp(t,o,e-o);)++o;if(o>=0)this.emit("info",false,this._lookbehind,0,this._lookbehind_size),this._lookbehind_size=0;else {let c=this._lookbehind_size+o;return c>0&&this.emit("info",false,this._lookbehind,0,c),this._lookbehind_size-=c,this._lookbehind.copy(this._lookbehind,0,c,this._lookbehind_size),t.copy(this._lookbehind,this._lookbehind_size),this._lookbehind_size+=e,this._bufpos=e,e}}if(o=t.indexOf(r,o+this._bufpos),o!==-1)return ++this.matches,o===0?this.emit("info",true):this.emit("info",true,t,this._bufpos,o),this._bufpos=o+n;for(o=e-s,o<0&&(o=0);o!==e&&(t[o]!==r[0]||Buffer.compare(t.subarray(o+1,e),r.subarray(1,e-o))!==0);)++o;return o!==e&&(t.copy(this._lookbehind,0,o,e),this._lookbehind_size=e-o),o!==0&&this.emit("info",false,t,this._bufpos,o),this._bufpos=e,e};nt.prototype._sbmh_lookup_char=function(t,e){return e<0?this._lookbehind[this._lookbehind_size+e]:t[e]};nt.prototype._sbmh_memcmp=function(t,e,r){for(var n=0;n<r;++n)if(this._sbmh_lookup_char(t,e+n)!==this._needle[n])return false;return true};ol.exports=nt;});var cl=c((vw,ll)=>{g();var Np=a("util").inherits,al=a("stream").Readable;function Ls(t){al.call(this,t);}Np(Ls,al);Ls.prototype._read=function(t){};ll.exports=Ls;});var Ir=c((kw,ul)=>{g();ul.exports=function(e,r,n){if(!e||e[r]===void 0||e[r]===null)return n;if(typeof e[r]!="number"||isNaN(e[r]))throw new TypeError("Limit "+r+" is not a valid number");return e[r]};});var pl=c((Rw,dl)=>{g();var hl=a("events").EventEmitter,Gp=a("util").inherits,fl=Ir(),Hp=As(),zp=Buffer.from(`\r
|
|
3
3
|
\r
|
|
4
4
|
`),Vp=/\r\n/g,Wp=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function St(t){hl.call(this),t=t||{};let e=this;this.nread=0,this.maxed=false,this.npairs=0,this.maxHeaderPairs=fl(t,"maxHeaderPairs",2e3),this.maxHeaderSize=fl(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=false,this.ss=new Hp(zp),this.ss.on("info",function(r,n,s,i){n&&!e.maxed&&(e.nread+i-s>=e.maxHeaderSize?(i=e.maxHeaderSize-e.nread+s,e.nread=e.maxHeaderSize,e.maxed=true):e.nread+=i-s,e.buffer+=n.toString("binary",s,i)),r&&e._finish();});}Gp(St,hl);St.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};St.prototype.reset=function(){this.finished=false,this.buffer="",this.header={},this.ss.reset();};St.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=true,this.nread=this.npairs=0,this.maxed=false,this.emit("header",t);};St.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(Vp),e=t.length,r,n;for(var s=0;s<e;++s){if(t[s].length===0)continue;if((t[s][0]===" "||t[s][0]===" ")&&n){this.header[n][this.header[n].length-1]+=t[s];continue}let i=t[s].indexOf(":");if(i===-1||i===0)return;if(r=Wp.exec(t[s]),n=r[1].toLowerCase(),this.header[n]=this.header[n]||[],this.header[n].push(r[2]||""),++this.npairs===this.maxHeaderPairs)break}};dl.exports=St;});var Fs=c((Lw,bl)=>{g();var Os=a("stream").Writable,Kp=a("util").inherits,Qp=As(),ml=cl(),Zp=pl(),Jp=45,Yp=Buffer.from("-"),Xp=Buffer.from(`\r
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {r,q}from'./chunk-
|
|
1
|
+
import {r,q}from'./chunk-KWGB3YNI.js';import {a}from'./chunk-R25WLKX4.js';import {g as g$1}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
2
2
|
g$1();async function g(t){let{adminEmail:e,adminPassword:r$1,adminRole:a$1="super_admin",tenantId:n,emailConfig:o,sendWelcomeEmail:c=false}=t,s=t.authAdapter||new a({path:t.authDbPath||"./data/auth.db"});try{await s.connect?.();}catch{return {success:false,error:"Failed to connect to auth storage"}}let u=new r().validate(r$1);if(!u.valid)return await s.disconnect?.(),{success:false,error:`Invalid password: ${u.errors.join(", ")}`};if(await s.findUserByEmail(e))return await s.disconnect?.(),{success:false,error:"Admin user already exists"};try{let i=await s.createUser({name:"Super Admin",email:e,password:r$1,role:a$1||"admin",tenantId:n});if(await s.updateUser?.(i.id,{emailVerified:!0}),c&&o){let l=new q(o),A=l.getTemplates().welcome(e.split("@")[0]);await l.send({to:e,...A});}return await s.disconnect?.(),{success:!0,user:i}}catch(i){return await s.disconnect?.(),{success:false,error:i instanceof Error?i.message:"Failed to create admin user"}}}async function M(t,e){return !await t.findUserByEmail(e)}function w(t){let e=t.KYRO_ADMIN_EMAIL,r=t.KYRO_ADMIN_PASSWORD;return !e||!r?null:{authDbPath:t.KYRO_AUTH_DB_PATH||"./data/auth.db",adminEmail:e,adminPassword:r,adminRole:t.KYRO_ADMIN_ROLE||"super_admin",tenantId:t.KYRO_ADMIN_TENANT_ID,emailConfig:t.SMTP_HOST?{provider:"smtp",smtp:{host:t.SMTP_HOST,port:parseInt(t.SMTP_PORT||"587",10),secure:t.SMTP_SECURE==="true",auth:{user:t.SMTP_USER||"",pass:t.SMTP_PASS||""}},from:t.SMTP_FROM||"noreply@example.com",fromName:t.SMTP_FROM_NAME}:void 0,sendWelcomeEmail:t.KYRO_ADMIN_SEND_WELCOME==="true"}}function h(){return w(process.env)}async function E(){try{let{env:t}=await import('cloudflare:workers');if(t){let e=w(t);if(e)return e}}catch{}return null}async function x(t){let e=h()||await E();if(!e)return null;t&&(e.authAdapter=t);try{if(await e.authAdapter?.connect?.(),await e.authAdapter?.findUserByEmail(e.adminEmail))return await e.authAdapter?.disconnect?.(),{success:!1,error:"Admin user already exists"}}catch{}let r=await g(e);return r.success||console.error(`Bootstrap failed: ${r.error}`),r}async function C(t,e=3,r=2e3){let a="";for(let n=0;n<e;n++){let o=await g(t);if(o.success||(a=o.error||"Unknown error",a.includes("already exists")))return o;n<e-1&&await new Promise(c=>setTimeout(c,r));}return {success:false,error:`Failed after ${e} retries: ${a}`}}export{g as a,M as b,w as c,h as d,x as e,C as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {D,A}from'./chunk-
|
|
1
|
+
import {D,A}from'./chunk-33E4YN62.js';import {e}from'./chunk-7N6TW4JB.js';import {fb}from'./chunk-T4TSELDS.js';import {a as a$1}from'./chunk-R25WLKX4.js';import {c}from'./chunk-KNOFTUQV.js';import {a}from'./chunk-ZWDBPEXL.js';import {a as a$2}from'./chunk-5ZEYOFAK.js';import {g}from'./chunk-Y2YAKDEQ.js';import w from'kyro:config';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
2
2
|
g();var r=null,l=null;async function b(){if(!r){if(globalThis.__KYRO_INSTANCE__)try{await globalThis.__KYRO_INSTANCE__.shutdown();}catch{}try{let e$1=w.default||w,t=e$1.adapter,o=t&&!t.dialect&&typeof t.connect=="function";if(globalThis.DB&&(!t||o)){let s=globalThis.DB;e$1.adapter=new c({type:"sqlite",client:s}),D.info("Hot-swapped to D1 DrizzleAdapter");}r=A(e$1),await r.init();let a$3=e$1.adapter,p=a$3&&a$3.dialect&&(a$3.dialect==="postgres"||a$3.dialect==="sqlite"),c$1=a$3&&a$3.dialect==="mongodb",n;if(p)a$3.dialect==="postgres"?n=new a({db:a$3.client}):a$3.dialect==="sqlite"&&(n=new fb({db:a$3.rawClient||a$3.client}));else if(o&&!globalThis.DB){let s=process.env.KYRO_AUTH_DB_PATH||"./data/auth.db";n=new a$1({path:s});}else c$1&&(n=new a$2({adapter:a$3}));if(n?.connect)try{await n.connect();}catch(s){D.warn("Auth connect warning:",s);}try{await r.loadSettings();}catch(s){D.warn("loadSettings warning:",s);}try{await e(n);}catch(s){D.warn("autoBootstrap warning:",s);}globalThis.__KYRO_INSTANCE__=r;}catch(e){throw r=null,l=null,D.error("Init failed, will retry:",e),e}}}async function E(e){let t=globalThis.DB?globalThis:null;try{let{env:o}=await import('cloudflare:workers');o&&(t=o);}catch{}if(e)try{t=e.locals?.cfContext?.env||e?.env||t;}catch{}if(!t)try{t=process.env;}catch{}t?.DB&&(globalThis.DB=t.DB),t?.STORAGE_BUCKET&&(globalThis.STORAGE_BUCKET=t.STORAGE_BUCKET),l||(l=b()),await l;}var _={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function T(e){return r?r.settings?.access?.apiAccess?.[e]??_[e]??true:_[e]??true}var R=async e=>{if(!r)try{await Promise.race([E(e),new Promise((t,o)=>setTimeout(()=>o(new Error("Initialization timeout")),3e4))]);}catch(t){return console.error("[Kyro API] Warm error:",t?.stack||t?.message||t),new Response(JSON.stringify({error:"Service Unavailable",message:"Kyro CMS is still starting up. Please try again in a moment."}),{status:503,headers:{"Content-Type":"application/json","Retry-After":"5"}})}try{let o=new URL(e.request.url).pathname,a=__KYRO_API_PATH__;if(o===`${a}/graphql`&&typeof r.getGraphQL=="function"){if(!T("graphqlEnabled"))return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}});let n=await r.getGraphQL().fetch(e.request,e.locals);return new Response(n.body,n)}if(o.startsWith(`${a}/trpc/`)&&typeof r.getTRPC=="function"){if(!T("trpcEnabled"))return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}});let n=await r.getTRPC().fetch(e.request,e.locals);return new Response(n.body,n)}return await(await r.getREST()).fetch(e.request,e.locals)}catch(t){return console.error("[Kyro API Execution Error]:",t?.stack||t?.message||t),new Response(JSON.stringify({error:"Internal Server Error",message:t?.message||String(t),stack:t?.stack}),{status:500,headers:{"Content-Type":"application/json"}})}},N=R;export{r as a,E as b,R as c,N as d};
|