@stacksjs/stx 0.2.264 → 0.2.265
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/{chunk-s5pd0ec9.js → chunk-4s2p4hry.js} +1 -1
- package/dist/{chunk-7a7jy8yr.js → chunk-4xr8099h.js} +1 -1
- package/dist/{chunk-p8ppbq1a.js → chunk-9v8be077.js} +1 -1
- package/dist/{chunk-xhq2a50x.js → chunk-ecyac25w.js} +1 -1
- package/dist/{chunk-gyf9fky4.js → chunk-jftmdf4j.js} +1 -1
- package/dist/{chunk-0bm5enna.js → chunk-pfm1325e.js} +1 -1
- package/dist/{chunk-5qngxbmv.js → chunk-qqfsm20p.js} +1 -1
- package/dist/{chunk-ksm4b1cx.js → chunk-rkrnb0ec.js} +1 -1
- package/dist/{chunk-s44edj8s.js → chunk-w5b2bwxp.js} +3 -3
- package/dist/cli.js +3 -3
- package/dist/ssg.js +3 -3
- package/package.json +5 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Mf as a}from"./chunk-
|
|
2
|
+
import{Mf as a}from"./chunk-rkrnb0ec.js";import"./chunk-4zkv1vqh.js";import"./chunk-qqfsm20p.js";import"./chunk-ph5f8eev.js";import"./chunk-w95sp0k9.js";import"./chunk-58f0mthg.js";import"./chunk-r7dd7c7y.js";import"./chunk-25de1sj7.js";import"./chunk-38ykv2gd.js";import"./chunk-4qq5wj04.js";import"./chunk-g8tce9rr.js";import"./chunk-ptcpaeem.js";import"./chunk-a8mnhryz.js";import"./chunk-dnhckx52.js";import"./chunk-jt8as8j8.js";import"./chunk-x84g0m0p.js";import"./chunk-5h5ydexj.js";import"./chunk-aw651z2y.js";import"./chunk-wj2trgsn.js";import"./chunk-0y6f4037.js";export{a as buildForProduction};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$ as ml,$a as dn,$b as wo,$c as wp,$d as wq,A as Yj,Aa as om,Ab as Qn,Ac as Xo,Ad as Xp,Ae as br,B as Zj,Ba as pm,Bb as Rn,Bc as Yo,Bd as Yp,Be as cr,C as _j,Ca as Cm,Cb as Sn,Cc as Zo,Cd as Zp,Ce as dr,D as $j,Da as Dm,Db as Tn,Dc as _o,Dd as _p,De as er,E as Rk,Ea as Em,Eb as Un,Ec as $o,Ed as $p,Ee as fr,F as Sk,Fa as Fm,Fb as Vn,Fc as ap,Fd as aq,Fe as gr,G as Tk,Ga as Gm,Gb as Wn,Gc as bp,Gd as bq,Ge as hr,H as Uk,Ha as Hm,Hb as Xn,Hc as cp,Hd as cq,He as ir,I as Vk,Ia as Lm,Ib as Yn,Ic as dp,Id as dq,Ie as jr,J as Wk,Ja as Mm,Jb as Zn,Jc as ep,Jd as eq,Je as kr,K as Xk,Ka as Nm,Kb as _n,Kc as fp,Kd as fq,Ke as lr,L as Yk,La as Om,Lb as $n,Lc as gp,Ld as gq,Le as mr,M as Zk,Ma as Pm,Mb as ao,Mc as hp,Md as hq,Me as nr,N as _k,Na as Qm,Nb as bo,Nc as ip,Nd as iq,Ne as or,O as $k,Oa as Rm,Ob as jo,Oc as jp,Od as jq,Oe as pr,P as al,Pa as Sm,Pb as ko,Pc as kp,Pd as kq,Pe as qr,Q as bl,Qa as Tm,Qb as lo,Qc as lp,Qd as lq,Qe as rr,R as cl,Ra as Um,Rb as mo,Rc as mp,Rd as mq,Re as sr,S as dl,Sa as Vm,Sb as no,Sc as np,Sd as nq,Se as tr,T as el,Ta as Wm,Tb as oo,Tc as op,Td as oq,Te as ur,U as fl,Ua as Xm,Ub as po,Uc as pp,Ud as pq,Ue as vr,V as gl,Va as Ym,Vb as qo,Vc as qp,Vd as qq,Ve as wr,W as hl,Wa as Zm,Wb as ro,Wc as rp,Wd as rq,We as xr,X as il,Xa as _m,Xb as so,Xc as sp,Xd as sq,Xe as yr,Y as jl,Ya as an,Yb as to,Yc as tp,Yd as tq,Ye as zr,Z as kl,Za as bn,Zb as uo,Zc as up,Zd as uq,_ as ll,_a as cn,_b as vo,_c as vp,_d as vq,aa as nl,ab as en,ac as xo,ad as xp,ae as xq,ba as ol,bb as fn,bc as yo,bd as yp,be as yq,ca as pl,cb as gn,cc as zo,cd as zp,ce as zq,da as ql,db as hn,dc as Ao,dd as Ap,de as Aq,ea as rl,eb as jn,ec as Bo,ed as Bp,ee as Bq,fa as sl,fb as kn,fc as Co,fd as Cp,fe as Cq,ga as tl,gb as ln,gc as Do,gd as Dp,ge as Dq,ha as ul,hb as mn,hc as Eo,hd as Ep,he as Eq,ia as vl,ib as nn,ic as Fo,id as Fp,ie as Fq,ja as wl,jb as on,jc as Go,jd as Gp,je as Gq,ka as xl,kb as pn,kc as Ho,kd as Hp,ke as Hq,la as yl,lb as qn,lc as Io,ld as Ip,le as Iq,ma as zl,mb as rn,mc as Jo,md as Jp,me as Jq,na as Al,nb as sn,nc as Ko,nd as Kp,ne as Kq,o as a,oa as Bl,ob as tn,oc as Lo,od as Lp,oe as Lq,p as Jj,pa as dm,pb as wn,pc as Mo,pd as Mp,pe as Sq,q as Kj,qa as em,qb as xn,qc as No,qd as Np,qe as Tq,r as Lj,ra as fm,rb as yn,rc as Oo,rd as Op,re as Uq,s as Mj,sa as gm,sb as zn,sc as Po,sd as Pp,se as Vq,t as Nj,ta as hm,tb as Fn,tc as Qo,td as Qp,te as Wq,u as Oj,ua as im,ub as Gn,uc as Ro,ud as Rp,ue as Xq,v as Pj,va as jm,vb as Hn,vc as So,vd as Sp,ve as Yq,w as Qj,wa as km,wb as In,wc as To,wd as Tp,we as Zq,x as Rj,xa as lm,xb as Nn,xc as Uo,xd as Up,xe as _q,y as Wj,ya as mm,yb as On,yc as Vo,yd as Vp,ye as $q,z as Xj,za as nm,zb as Pn,zc as Wo,zd as Wp,ze as ar}from"./chunk-s44edj8s.js";import{$e as ck,Ze as ak,_e as bk,af as dk,bf as ek,cf as fk,df as gk,ef as hk,ff as ik,gf as jk,hf as kk,if as lk,jf as mk,kf as nk,lf as ok}from"./chunk-ym3r8ktq.js";import{mf as Fk,nf as Gk,of as Hk,pf as Ik,qf as Jk,rf as Kk,sf as Lk,tf as Mk,uf as Nk,vf as Ok,wf as Pk,xf as Qk}from"./chunk-bjj27mf3.js";import{Af as fo,Bf as go,Cf as ho,Df as io,yf as co,zf as eo}from"./chunk-nqy2v6vh.js";import{Ef as un,Ff as vn}from"./chunk-pbsfbgx7.js";import{Gf as An}from"./chunk-1n16xphq.js";import{Hf as Tl,If as Ul,Jf as Vl,Kf as Wl,Lf as Zl,Mf as bm}from"./chunk-ksm4b1cx.js";import{Nf as Xl,Qf as Yl}from"./chunk-4zkv1vqh.js";import{$f as tm,Yf as qm,Zf as rm,_f as sm,ag as um,bg as vm,cg as wm,dg as xm,eg as ym,fg as zm,gg as Am,hg as Bm}from"./chunk-0j9hrzjj.js";import{ig as Dk,jg as Ek}from"./chunk-j59pkkzn.js";import{kg as cm}from"./chunk-0bm5enna.js";import{lg as Im,mg as Jm,ng as Km,og as $m,pg as Bn,qg as Cn,rg as Dn,sg as En,tg as Jn,ug as Kn,vg as Ln,wg as Mn}from"./chunk-xhq2a50x.js";import{Ag as Fl,Bg as Gl,Cg as Hl,Dg as Il,Eg as Jl,Fg as Kl,Gg as Ll,Hg as Ml,Ig as Nl,Jg as Ol,Kg as _l,Lg as $l,Mg as am,xg as Cl,yg as Dl,zg as El}from"./chunk-5qngxbmv.js";import{Ng as Yi,Og as Zi,Pg as _i,Qg as $i,Rg as aj,Sg as bj,Tg as cj,Ug as dj,Vg as ej,Wg as fj,Xg as gj}from"./chunk-8pvymy12.js";import{Yg as yj,_g as zj}from"./chunk-f5v2qf95.js";import{eh as pk,fh as qk,gh as rk,hh as sk,ih as tk,jh as uk,kh as vk,mh as wk,nh as xk,oh as yk,ph as zk,qh as Ak,rh as Bk,uh as Ck}from"./chunk-k6st4606.js";import{vh as ih,wh as jh,xh as kh,yh as lh}from"./chunk-49kk0s96.js";import{Dh as mh}from"./chunk-w3ycm4na.js";import{Eh as th,Fh as uh,Gh as vh,Hh as wh,Ih as xh,Jh as yh}from"./chunk-7exqxjx5.js";import{Kh as Ni,Lh as Oi,Mh as Pi,Qh as Qi,Rh as Ri,Sh as Si}from"./chunk-zr4emtxf.js";import{$h as Ki,Th as Di,Uh as Ei,Vh as Fi,Wh as Gi,Xh as Hi,Zh as Ii,_h as Ji,ai as Li,bi as Mi}from"./chunk-74cv4ta1.js";import{ci as tg,di as ug,ei as vg,fi as wg,gi as xg,hi as yg}from"./chunk-wcm80anz.js";import{ii as zg,ji as Ag,ki as Bg,li as Cg,mi as Dg}from"./chunk-y7m2dpd3.js";import{ni as Eg,oi as Fg,pi as Gg,qi as Hg,ri as Ig}from"./chunk-9y0g8kzt.js";import{si as Jg,ti as Kg,ui as Lg,vi as Mg,wi as Ng,xi as Og,yi as Pg}from"./chunk-t6nseeb9.js";import{Ai as Rg,Bi as Sg,Ci as Tg,Di as Ug,Ei as Vg,zi as Qg}from"./chunk-xttsqmkm.js";import{Gi as Wg,Hi as Xg,Ii as Yg,Ji as Zg,Ki as _g,Li as $g,Mi as ah,Ni as bh,Oi as ch,Pi as dh,Qi as eh,Ri as fh,Si as gh,Ti as hh}from"./chunk-54st8g2j.js";import{Vi as ng,Wi as og}from"./chunk-b3zes539.js";import{Zi as pg}from"./chunk-new80es4.js";import"./chunk-9n0gvfrg.js";import{bj as qg}from"./chunk-7q9mwh4v.js";import{cj as rg,dj as sg}from"./chunk-refwkt87.js";import{ej as ge,fj as he,gj as ie,hj as je,ij as ke,jj as le,kj as me,lj as ne,mj as oe,nj as pe,oj as qe,pj as re,qj as se,rj as te}from"./chunk-sne7938g.js";import{sj as Qe,tj as Re}from"./chunk-ph5f8eev.js";import{Aj as Ce,Bj as De,Cj as Ee,Dj as Fe,Ej as Ge,Fj as He,Gj as Ie,Hj as Je,Ij as Ke,Jj as Le,Kj as Me,Lj as Ne,Mj as Oe,Nj as Pe}from"./chunk-w95sp0k9.js";import{Oj as Se,Pj as Te,Qj as Ue,Rj as Ve,Sj as We,Tj as Xe,Uj as Ye,Vj as Ze,Wj as _e,Xj as $e,Yj as af}from"./chunk-k6wnmjhf.js";import{qk as Mq,rk as Nq,sk as Oq,tk as Pq,uk as Qq,vk as Rq}from"./chunk-qpsj28s2.js";import{Ak as Pl,Bk as Ql,Ck as Rl,Dk as Sl,wk as Sj,xk as Tj,yk as Uj,zk as Vj}from"./chunk-sr49fd8p.js";import"./chunk-58f0mthg.js";import"./chunk-0ha9e1wt.js";import{$l as Wa,$m as Ub,$n as Uc,$p as Hf,$q as Nh,$r as vj,Al as I,Am as pb,An as tc,Ao as Jd,Ap as ff,Aq as gg,Ar as vi,Bl as J,Bm as qb,Bn as uc,Bo as Kd,Bp as gf,Bq as hg,Br as wi,Cl as da,Cm as rb,Cn as vc,Co as Ld,Cp as hf,Cq as ig,Cr as xi,Dl as ea,Dn as wc,Do as Md,Dp as jf,Dq as jg,Dr as yi,El as fa,Em as yb,En as xc,Eo as Nd,Ep as kf,Eq as kg,Er as zi,Fl as ga,Fm as zb,Fn as yc,Fo as Od,Fp as lf,Fq as lg,Fr as Ai,Gl as ha,Gm as Ab,Gn as zc,Go as Pd,Gp as mf,Gq as mg,Gr as Bi,Hl as ia,Hm as Bb,Hn as Ac,Ho as Qd,Hp as nf,Hq as nh,Hr as Ci,Im as Cb,In as Bc,Io as Rd,Ip as of,Iq as oh,Ir as Ti,Jm as Db,Jn as Cc,Jo as Sd,Jp as pf,Jq as ph,Jr as Ui,Kl as za,Km as Eb,Kn as Dc,Ko as Td,Kp as qf,Kq as qh,Kr as Vi,Ll as Aa,Ln as Ec,Lo as Ud,Lp as rf,Lq as rh,Lr as Wi,Ml as Ba,Mm as Fb,Mn as Fc,Mo as Vd,Mp as sf,Mq as sh,Mr as Xi,Nl as Ca,Nm as Gb,Nn as Gc,No as Wd,Np as tf,Nq as zh,Nr as hj,Ol as Da,Om as Hb,On as Hc,Oo as Xd,Op as uf,Oq as Ah,Or as ij,Pm as Ib,Pn as Ic,Po as Yd,Pp as vf,Pq as Bh,Pr as jj,Qm as Jb,Qn as Jc,Qo as Zd,Qp as wf,Qq as Ch,Qr as kj,Rl as Ga,Rm as Kb,Rn as Kc,Ro as _d,Rp as xf,Rq as Dh,Rr as lj,Sl as Ha,Sm as Lb,Sn as Lc,So as $d,Sp as yf,Sq as Eh,Sr as mj,Tl as Ia,Tm as Mb,Tn as Mc,To as ae,Tp as zf,Tq as Fh,Tr as nj,Ul as Pa,Um as Nb,Un as Nc,Uo as be,Up as Af,Uq as Gh,Ur as oj,Vl as Qa,Vm as Ob,Vn as Oc,Vo as ce,Vp as Bf,Vq as Hh,Vr as pj,Wl as Ra,Wm as Pb,Wn as Pc,Wo as de,Wp as Cf,Wq as Ih,Wr as qj,Xl as Sa,Xm as Qb,Xn as Qc,Xo as ee,Xp as Df,Xq as Jh,Xr as rj,Yl as Ta,Ym as Rb,Yn as Rc,Yo as fe,Yp as Ef,Yq as Kh,Yr as sj,Zl as Ua,Zm as Sb,Zn as Sc,Zp as Ff,Zq as Lh,Zr as tj,_l as Va,_m as Tb,_n as Tc,_o as ze,_p as Gf,_q as Mh,_r as uj,am as Xa,an as Vb,ao as Vc,aq as If,ar as Oh,as as wj,bm as Ya,bn as Wb,bo as Wc,bp as Ae,bq as Jf,br as Ph,bs as xj,cn as Xb,co as Xc,cp as Be,cq as Kf,cr as Zh,cs as Aj,dn as Yb,do as Yc,dq as Lf,dr as _h,ds as Bj,en as Zb,eo as Zc,ep as bf,eq as Mf,er as $h,es as Cj,fn as _b,fo as _c,fq as Nf,fr as ai,fs as Dj,gm as Za,gn as $b,go as $c,gq as Of,gr as bi,gs as Ej,hm as _a,hn as ac,ho as ad,hq as Pf,hr as ci,hs as Fj,im as $a,in as bc,io as bd,iq as Qf,ir as di,is as Gj,jm as ab,jn as cc,jo as cd,jq as Rf,jr as ei,js as Hj,kl as s,km as bb,kn as dc,ko as dd,kq as Sf,kr as fi,ks as Ij,ll as t,lm as cb,ln as ec,lo as ed,lq as Tf,lr as gi,ml as u,mn as fc,mo as fd,mq as Uf,mr as hi,nl as v,nn as gc,no as gd,nq as Vf,nr as ii,ol as w,om as db,on as hc,oo as hd,oq as Wf,or as ji,pl as x,pm as eb,pn as ic,po as id,pq as Xf,pr as ki,ql as y,qm as fb,qn as jc,qo as jd,qq as Yf,qr as li,rl as z,rm as gb,rn as kc,ro as Ad,rq as Zf,rr as mi,sl as A,sm as hb,sn as lc,so as Bd,sq as _f,sr as ni,tl as B,tm as ib,tn as mc,to as Cd,tq as $f,tr as oi,ul as C,um as jb,un as nc,uo as Dd,uq as ag,ur as pi,vl as D,vm as kb,vn as oc,vo as Ed,vp as cf,vq as bg,vr as qi,wl as E,wm as lb,wn as pc,wo as Fd,wq as cg,wr as ri,xl as F,xm as mb,xn as qc,xo as Gd,xp as df,xq as dg,xr as si,yl as G,ym as nb,yn as rc,yo as Hd,yq as eg,yr as ti,zl as H,zm as ob,zn as sc,zo as Id,zp as ef,zq as fg,zr as ui}from"./chunk-r7dd7c7y.js";import{ls as d,ms as e,ns as f,os as g,ps as h,qs as i,rs as j,ss as k,ts as l,us as m,vs as n,ws as o,xs as p,ys as q,zs as r}from"./chunk-25de1sj7.js";import{As as Qh,Bs as Rh,Cs as Sh,Ds as Th,Es as Uh,Fs as Vh,Gs as Wh,Hs as Xh,Is as Yh}from"./chunk-38ykv2gd.js";import{Js as b,Ks as c}from"./chunk-4qq5wj04.js";import{Ls as Ea,Ms as Fa}from"./chunk-g8tce9rr.js";import{$s as wb,Ns as sb,Os as tb,Qs as ub,_s as vb,at as xb}from"./chunk-ptcpaeem.js";import{bt as ue,ct as ve,dt as we,et as xe,ht as ye}from"./chunk-a8mnhryz.js";import{it as Ja,jt as Ka,kt as La,lt as Ma,mt as Na,nt as Oa}from"./chunk-dnhckx52.js";import{At as wd,Bt as xd,Ct as yd,Dt as zd,ot as kd,pt as ld,qt as md,rt as nd,st as od,tt as pd,ut as qd,vt as rd,wt as sd,xt as td,yt as ud,zt as vd}from"./chunk-jt8as8j8.js";import"./chunk-x84g0m0p.js";import{Ht as ja,It as ka,Jt as la,Kt as ma,Lt as na,Mt as oa,Nt as pa,Ot as qa,Pt as ra,Qt as sa,Rt as ta,St as ua,Tt as va,Ut as wa,Vt as xa,Wt as ya}from"./chunk-5h5ydexj.js";import{$t as L,Au as $,Bu as aa,Cu as ba,Eu as ca,_t as K,cu as M,hu as N,iu as O,ou as P,pu as Q,qu as R,ru as S,su as T,tu as U,uu as V,vu as W,wu as X,xu as Y,yu as Z,zu as _}from"./chunk-aw651z2y.js";import"./chunk-wj2trgsn.js";import"./chunk-0y6f4037.js";export{kk as writeNetlifyConfig,$l as writeManifest,Pk as writeImageManifest,so as wrapComponentForHMR,mr as withDefaults,xj as webComponentDirectiveHandler,hp as watermark,jq as watchViews,Zk as watchMultiple,_k as watchEffect,Yk as watch,ye as warmImagePlaceholders,ll as waitForStore,Zd as waitForLocale,eo as virtualPathFor,kj as videoDirective,uc as validators,qr as validated,Ld as validateValueEnhanced,oh as validateTemplate,mp as validateParams,Md as validateFormEnhanced,_p as validateFile,Hd as validateFields,Gd as validateField,qh as validateDirective,ed as validateCspDirectives,Fj as validateConfig,em as validateComponentScripts,Cm as validateComponentProps,mg as validateClientScript,lh as v,kb as usesSignalsInScript,pa as usesReactiveRuntime,Dh as userComponentFileExists,Tg as useVirtualList,sd as useTitle,kl as useStoreOrThrow,Ko as useStore,Wj as useStorage,uq as useSlots,Yj as useSessionStorage,pd as useSeoMeta,ml as useRouteParams,ol as useRouteParamOrThrow,nl as useRouteParam,sd as usePageTitle,Pe as useOptimistic,ql as useMiddlewareValue,pl as useMiddlewareState,Xj as useLocalStorage,lo as useLoadingIndicator,nd as useHead,ih as useForm,wq as useAttrs,aq as uploadFiles,$p as uploadFile,hl as updateInstance,Ne as untrack,Th as unregisterDirective,il as unmountInstance,rb as unescapeHtml,ho as typecheckStxFiles,Ch as transpileTypeScript,$q as translate,w as transitionDirective,Ta as transformAutoImports,wm as toUsers,vm as toUser,So as thumbnail,Tp as thumbHashToRGBA,Up as thumbHashToDataURL,ra as templateNeedsRuntime,qa as templateHasReactiveContext,Se as templateCache,Nb as syncRecordedResponse,po as stxClientHelpers,xf as structuredDataDirective,cr as stripLocalePrefix,Ml as stripDocumentWrapper,Fa as stripCommentsAndLiterals,kn as stringToStream,Uc as strictCspPreset,oe as streamingSuspenseDirective,se as streamToResponse,me as streamTemplateSimple,ge as streamTemplate,Rj as stopHmrServer,sm as stopBroadcasting,Ma as stateDirName,Na as stateDir,Ce as state,gg as startsDocument,Mn as startProductionServer,An as startInteractive,rm as startBroadcasting,er as stampLocaleLayoutGroup,D as staggerDirective,kp as srcsetUrls,E as springDirective,Dc as splitByPipe,Il as spaNavVaryHeaders,fo as sourcePathFor,rp as smartBatchSign,Fh as slotContentHasExpressions,pp as signUrl,Ah as shouldTranspileTypeScript,Oj as shouldReloadOnChange,up as shouldRefreshSignature,Pj as shouldIgnoreFile,Lg as shouldCacheComponent,Wo as sharpen,tr as shape,La as setStateDir,ul as setRouteParams,vl as setMiddlewareState,xe as setImagePlaceholder,oq as setGlobalProvide,Rb as setErrorLocale,Rk as setCurrentInstance,_i as setCachedVideoResult,Pi as setCachedImageResult,Ji as setCached,wr as serveStxFile,yr as serveMultipleStxFiles,Jj as serveMarkdownFile,Wn as serveFile,zr as serveApp,Vn as serve,vo as serializeState,$m as serializeSetCookie,Yo as sepia,qd as seoMetaToHeadConfig,x as scrollAnimateDirective,q as screenReaderDirective,oj as scopeHTML,nj as scopeCSS,Af as scanForSitemapEntries,k as scanA11yTargets,l as scanA11yIssues,ap as saturation,np as sanitizeParams,wc as sanitizeFilePath,xc as sanitizeExpression,yc as sanitizeDirectiveParams,vc as sanitizeDirectiveParam,zc as sanitizeComponentProps,pc as safeExecuteAsync,oc as safeExecute,xa as runtimeHandledXAttrsLiteral,qf as runPreProcessingMiddleware,rf as runPostProcessingMiddleware,Dn as runPageAction,Ie as runMountCallbacks,ba as runMiddleware,fl as runHooks,Uq as runDoctor,Je as runDestroyCallbacks,Ff as runComposers,bp as rotate,mh as rewriteImagesWithSiblings,Ob as responseBindings,Jh as resolveTemplatePath,c as resolveStxTargets,Bj as resolveStxDirectories,_q as resolveI18n,Qo as resize,Za as resetPlaceholders,md as resetHead,uo as resetHMRHandler,cc as resetErrorConfig,or as required,bb as replacePlaceholders,hq as renderView,hj as renderVideoComponent,Qa as renderVendorStyleTags,Dq as renderToString,Eq as renderToStream,Fq as renderToDOM,Sp as renderThumbhashToCanvas,Rq as renderTemplateString,Pq as renderTemplate,Qq as renderString,je as renderStreamingPage,vh as renderSlot,Bg as renderSSRSuspense,Cp as renderProtectedVideo,Bp as renderProtectedImg,op as renderMediaUpload,Oq as renderMarkdownView,Rl as renderLayoutTypes,Ti as renderImgComponent,Fk as renderImageComponent,ud as renderHtmlAttrs,td as renderHead,kq as renderEmail,Hh as renderComponentWithSlot,vd as renderBodyAttrs,Fo as render,Wc as relaxedCspPreset,Fd as registerValidationRule,qe as registerStreamingDirectives,Mo as registerStoresClient,sl as registerStore,yf as registerSeoDirectives,V as registerMiddleware,fb as registerFilters,eb as registerFilter,Tb as registerErrorMessages,Kd as registerEnhancedValidationRule,Qh as registerDirective,dd as registerCspDirectives,Fm as registerComponentDirectives,J as registerAnimationDirectives,r as registerA11yDirectives,Vk as ref,sn as redirect,Jb as recordResponseStatus,Kb as recordResponseHeader,Oa as rebaseOntoStateDir,Lb as readResponseStatus,Mb as readResponseHeaders,Hj as readMarkdownFile,Te as readFileCached,Wk as reactive,fp as quality,zp as pruneSignatureCache,Mi as pruneCache,mq as provide,Nq as protectCodeBlocks,nr as prop,Jf as processVueTemplate,Rg as processVirtualListDirectives,Vg as processVirtualGridDirectives,gj as processVideo,Id as processValidateDirective,ee as processTranslateDirective,vg as processTransitionDirectives,yg as processTransitionAttributes,yd as processTitleDirective,Bb as processTemplateBindings,rg as processTeleportDirectives,zg as processSuspenseDirectives,tf as processStructuredData,ke as processStreamDirectives,Pb as processStatusDirective,gh as processStaticDirectives,of as processStackReplacements,nf as processStackPushDirectives,wh as processSlots,Kl as processShell,Hf as processServerBindings,uf as processSeoDirective,re as processSectionDirectives,Mf as processScopedStyles,zb as processReactiveBindings,Dp as processProtectedMedia,$g as processPartialHydrationDirectives,lg as processOnceDirective,pf as processMiddleware,sf as processMetaDirectives,zd as processMetaDirective,Ij as processMarkdownFileDirectives,Oh as processMarkdownDirectives,hf as processLoops,Jg as processKeepAliveDirectives,kg as processJsonDirective,Ug as processInfiniteListDirectives,mf as processIncludes,Vi as processImgComponents,Hk as processImageComponents,uk as processImage,xd as processHeadDirective,Bd as processForms,Dd as processFormInputDirectives,ob as processExpressions,Ca as processEventDirectives,Ed as processErrorDirective,Kf as processDynamicComponents,nh as processDirectives,Yh as processDirectiveAttributes,qg as processDeferDirectives,id as processCustomDirectives,ad as processCspDirectives,ur as processComponentProps,Ya as processClientScript,Cd as processBasicFormDirectives,Eg as processAsyncDirectives,jd as processAppearanceBootstrapDirective,A as processAnimationDirectives,f as processA11yDirectives,Vd as preloadTranslationsBackground,Ud as preloadTranslations,ko as preloadIslandHandlers,ze as preloadIconCollection,nm as poolStrings,zj as pluginManager,ve as placeholdersWarmed,ug as performLeave,tg as performEnter,Ke as pendingLifecycleCounts,Oe as peek,jf as partialsCache,ij as parseVideoDirectiveOptions,Oo as parseUrl,Vp as parseThumbhashString,Jc as parseSwitchBlock,th as parseSlots,uh as parseSlotElement,Oc as parseScriptDeclarations,vj as parseSFCComponent,Ep as parseProtectedArgs,gf as parseLoopBinding,Ui as parseImgComponent,ki as parseImageUrl,Gk as parseImageComponent,Bn as parseFormBody,Lc as parseExpressionWithFilters,Gm as parseDefaults,pn as parseCookies,Lm as parseContainerSelector,Gc as parseConditionalBlock,Mc as parseArguments,H as parseAnimationShorthand,pr as optional,om as optimizeTemplate,Mk as optimizeImage,Nk as optimizeDirectory,rr as oneOf,kf as onceStore,cl as onUpdated,yb as onUpdate,el as onUnmounted,zl as onServer,al as onMounted,Ge as onMount,fh as onHydrated,sq as onErrorCaptured,He as onDestroy,Pg as onDeactivated,yl as onClient,bl as onBeforeUpdate,dl as onBeforeUnmount,$k as onBeforeMount,Og as onActivated,Op as observeElement,tn as notFound,Rf as normalizeCriticalHeadOrder,rq as nextTick,Jm as negotiateEncoding,P as navigateTo,gl as mountInstance,z as motionDirective,Vc as moderateCspPreset,mm as minifyHtml,wf as metaDirective,$f as metaDedupKey,Po as mergeParams,bg as mergeHtmlAttrs,od as mergeHeadConfigs,Zc as mergeCspDirectives,tb as mergeCrosswindConfig,M as matchRoute,Ph as markdownDirectiveHandler,Gj as markdownCache,b as looksLikeGlob,br as localizePath,Wd as loadTranslationLazy,ae as loadTranslation,Cj as loadStxConfig,_ as loadMiddlewareFromDirectory,am as loadManifest,Kp as loadElement,tm as loadChannels,ir as lintStxStrict,Mp as lazyLoadAll,Lp as lazyLoad,C as keyframeDirective,Bq as jsxs,Cq as jsxDEV,Aq as jsx,rn as jsonResponse,pe as islandDirective,$b as isTest,Nl as isSpaNavigation,Gl as isSpaNavRequest,sp as isSignatureValid,Le as isSignal,sk as isSharpAvailable,cn as isServerEnvironment,wl as isServer,ta as isRuntimeOwnedColonAttr,Zb as isProduction,d as isPresentationalRole,Hp as isNativeLazySupported,Mq as isMarkdownPath,Sd as isLoading,Td as isLoaded,zh as isJavaScriptScript,Ip as isIntersectionObserverSupported,Ak as isImageFile,tk as isImageBackendAvailable,ce as isICUFormat,eh as isHydrated,Eh as isHydrateTrigger,Hb as isHttpStatus,bn as isEdgeEnvironment,jr as isDirectiveKind,_b as isDevelopment,Me as isDerived,Nj as isCssOnlyChange,Im as isCompressible,xl as isClient,Gg as isAsyncComponent,Cn as isActionableMethod,Zo as invert,Ve as invalidateFileCacheByDir,Ue as invalidateFileCache,nb as interpolateScriptsInTemplate,lb as interpolateScriptExpressions,mb as interpolateScriptAttributes,lc as inlineError,Zq as injectThemeBootstrap,vf as injectSeoTags,Wq as injectSeo,bf as injectRouterScript,Mj as injectHotReload,fa as injectHeatmap,_c as injectCspMetaTag,xb as injectCrosswindCSS,ig as injectConfigHeadTags,Qf as injectColorModeBootScript,dg as injectCloakStyle,Xf as injectBuildId,Sa as injectBrowserCoreAutoImports,Db as injectAnalytics,nq as inject,rl as initStoreRegistry,nk as initNetlify,mo as initLoadingIndicator,Jp as initLazyLoading,zn as initFile,Rp as initBlurUp,Xp as initAllBlurUp,Xi as imgDirective,Kk as imageDirective,Kn as hydrateTemplateStream,Jn as hydrateTemplate,jo as hydrateIslands,bh as hydrateIsland,Ln as hydrateFragment,ch as hydrateByStrategy,dh as hydrateAll,Co as hydrate,Un as htmlResponse,eg as hoistLeadingHeadTags,Sf as hoistColorModeBootScript,ga as heatmapDirective,Fi as hashString,af as hashFilePath,Di as hashFile,Ei as hashBuffer,If as hasVueTemplateSyntax,ff as hasVariables,Ho as hasStore,cb as hasPlaceholders,lk as hasNetlifyConfig,X as hasMiddleware,Da as hasEventDirectives,hg as hasDocumentShell,rh as hasDirectives,h as hasDOMSupport,Dk as handleImageRequest,tq as handleError,Jq as h,zk as groupVariantsByFormat,Xo as grayscale,Nn as gitHash,gm as getUnusedDirectives,Xd as getTranslationSync,Qd as getTranslationCacheStats,Yd as getTranslationAsync,de as getTranslation,gk as getTotalSize,tp as getTimeUntilExpiry,ng as getStoreScript,Io as getStoreNames,Go as getStore,$j as getStorageSize,_j as getStorageKeys,Kh as getSourceLineInfo,Bh as getSharedTranspiler,g as getScreenReaderOnlyStyle,pj as getScopeAttribute,Be as getRouteParams,Ha as getPublicEnvDefine,Ia as getPublicEnv,ph as getPositionInfo,$a as getPlaceholderRegistry,Ci as getPlaceholderCacheStats,ld as getPageMeta,Qc as getNonce,Bk as getMimeType,Z as getMiddlewareNames,W as getMiddleware,Rd as getLoadingState,_d as getLoadingLocales,ue as getImagePlaceholder,vk as getImageMetadata,Bo as getHydrationRuntime,tl as getHydratedStoreState,Qj as getHmrServer,kd as getHead,to as getHMRHandler,oi as getFormatExtension,Hi as getFileMtime,yk as getFallbackVariant,Vb as getErrorMessage,Sb as getErrorLocale,bc as getErrorConfig,Yb as getErrorCodeName,Sh as getDirectives,Rh as getDirective,Sk as getCurrentInstance,Yc as getCspPreset,fd as getCspHeaderName,ub as getCrosswindServeAsset,Nh as getComponentCacheStats,Zi as getCachedVideoResult,xp as getCachedSignature,Xe as getCachedSignalsRuntime,Ye as getCachedRouterScript,Ai as getCachedPlaceholder,Oi as getCachedImageResult,Ii as getCached,Li as getCacheStats,Vf as getBuildId,qm as getBroadcastServer,ni as getBestVariant,gb as getAllFilters,bi as generateWidthSrcset,Sg as generateVirtualListCSS,cq as generateVideoPreview,Nd as generateValidationScript,dq as generateUploadRuntime,hm as generateTreeShakenBundle,xg as generateTransitionRuntime,wg as generateTransitionCSS,bj as generateThumbnails,ti as generateThumbhashPlaceholder,Um as generateTemplatesDocs,Dg as generateSuspenseRuntime,Cg as generateSuspenseCSS,wo as generateStateScript,li as generateSrcsetData,Si as generateSrcset,wk as generateSrcSet,cj as generateSpriteSheet,lq as generateSpaShell,mi as generateSourceTags,hi as generateSizesFromBreakpoints,gi as generateSizesAttribute,xk as generateSizes,zf as generateSitemapIndex,Xq as generateSitemap,Gp as generateSimpleMediaPicker,Ap as generateSignatureRuntime,Re as generateSignalsRuntimeDev,Qe as generateSignalsRuntime,Xa as generateServerDataBridge,mj as generateScopeId,wj as generateSFCWebComponent,Aa as generateRuntimeScript,K as generateRouteTypes,L as generateRouteManifest,Bf as generateRobotsTxt,Yq as generateRobots,Ri as generateResponsiveVariants,sj as generateReactiveWebComponentTS,rj as generateReactiveWebComponent,uj as generateReactiveRuntime,tj as generateReactiveMixin,aj as generatePoster,zi as generatePlaceholderStyle,yi as generatePlaceholderCSS,si as generatePlaceholder,ah as generatePartialHydrationCSS,Pc as generateNonce,hk as generateNetlifyToml,fq as generateMinifiedMediaRuntime,eq as generateMediaRuntime,Fp as generateMediaManagerEmbed,_l as generateManifest,oo as generateLoadingIndicatorHtml,Qp as generateLazyLoadRuntime,Sl as generateLayoutTypes,vi as generateLQIP,Ng as generateKeepAliveRuntime,Mg as generateKeepAliveCSS,hh as generateIslandManifest,bq as generateImagePreview,Ok as generateImageManifest,Ao as generateHydrationScript,te as generateHydrationRuntime,Do as generateHydrationCSS,Wg as generateHydrationBootstrap,Lj as generateHotReloadScript,ea as generateHeatmapScript,ro as generateHMRClientScript,dj as generateHLSManifest,xo as generateEventBindings,fi as generateDprSrcsetWithVariableQuality,ei as generateDprSrcset,fg as generateDocumentShell,Zm as generateDocs,Vm as generateDirectivesDocs,Xh as generateDirectiveRuntime,Cf as generateDefaultRobotsTxt,ej as generateDASHManifest,Tc as generateCspMetaTag,Sc as generateCspHeader,wb as generateCrosswindCSS,yq as generateCompositionRuntime,Tm as generateComponentsDocs,Xg as generateComponentManifest,Rm as generateComponentDoc,xi as generateColorPlaceholder,Pf as generateColorModeBootScript,jl as generateClientRuntime,Gi as generateCacheKey,Va as generateBrowserAutoImportDestructuring,Yp as generateBlurUpRuntime,Zp as generateBlurUpCSS,Ab as generateBindingsRuntime,ci as generateAutoWidthSrcset,Ua as generateAutoImportDestructuring,Ig as generateAsyncComponentRuntime,Hg as generateAsyncComponentCSS,I as generateAnimationRuntime,G as generateAnimationCSS,Cb as generateAnalyticsScript,io as formatTypecheckDiagnostics,bo as formatTypeErrors,wn as formatStxContent,fk as formatSize,O as formatRoutes,xn as formatMarkdownContent,Wb as formatLocalizedError,be as formatICU,dc as formatFilePath,kc as formatError,Vq as formatDoctorReport,Wm as formatDocsAsMarkdown,Ym as formatDocsAsJson,Xm as formatDocsAsHtml,ep as format,lm as foldConstants,dp as flipVertical,cp as flipHorizontal,Tl as fingerprint,go as findRuntimeTypeDeclarations,Tq as findPantryPackage,Fc as findMatchingEndTag,Bc as findMatchingDelimiter,Ea as findInterpolationEnd,Hc as findIfBlocks,Kc as findExpressions,N as findErrorPage,Ic as findDirectiveBlocks,im as findDeadCode,im as findDeadBranches,Mm as findContainerRegion,Sm as findComponentFiles,xr as findCommonDir,ek as filterRequiredFiles,Ih as fileExists,cf as extractVariables,Yl as extractTemplateExpressions,le as extractStreamBoundaries,yo as extractState,xh as extractSlotContent,ef as extractScriptFromTemplate,Xl as extractScriptBlocks,ab as extractPlaceholders,Ec as extractParenthesizedExpression,Ib as extractPageResponseStatus,ca as extractLayoutMetadata,wi as extractDominantColor,Nc as extractDirectiveParams,sh as extractDirectiveNames,Ol as extractContainerContent,Pm as extractComponentProps,Yg as extractComponentName,Qm as extractComponentDescription,vb as extractClassNames,Wa as extractBridgeData,Zg as extractBoundProps,Cc as extractBalancedExpression,Pa as extractAndStripCssImports,qj as extractAndScopeStyles,Ba as extractAndProcessEvents,Uj as externalizeSharedAssets,Vj as externalizeRepeatedAssets,Tj as externalizeHtml,qb as evaluateExpression,km as evaluateConstant,Qb as evaluateAuthExpression,jb as escapeHtmlValue,ib as escapeHtml,qc as errorRecovery,sc as errorLogger,sg as ensureTeleportTargets,jg as ensureDocumentShell,Jd as enhancedValidationRules,Nm as enableDevTools,jm as eliminateDeadCode,Ee as effect,lp as dprUrls,_m as docsCommand,Ql as discoverLayoutNames,Pp as disconnectObserver,Om as disableDevTools,tc as devHelpers,Jl as detectShell,an as detectRuntime,ik as detectProjectConfig,pi as detectFormat,dm as detectBuildMode,De as derived,mk as deploy,Ej as defineStxConfig,Lo as defineStore,vq as defineSlots,hr as defineSiteConfig,lr as definePropsWithValidation,kr as defineProps,yj as definePlugin,rd as definePageMeta,R as defineMiddleware,jh as defineForm,qq as defineExpose,pq as defineEmits,Uh as defineDirective,Lq as defineCustomElement,In as defineConfig,Vh as defineClientDirective,Fg as defineAsyncComponent,gq as defaultMediaConfig,Qk as defaultImageConfig,Od as defaultI18nConfig,da as defaultHeatmapConfig,Ad as defaultFormClasses,db as defaultFilters,hd as defaultCspConfig,Aj as defaultConfig,vr as default,sb as deepMergeThemes,Lf as dedupeScopedStyles,ui as decodeThumbhash,cd as cspNonceDirective,bd as cspDirective,Wp as crossfadeTransition,Ro as crop,Qg as createVirtualList,jj as createVideoDirective,nn as createVercelHandler,_n as createTypeChecker,fe as createTranslateFilter,jn as createTextEncoderStream,Kq as createStxApp,hn as createStreamingResponse,ne as createStreamRenderer,Jo as createStore,U as createStorageManager,S as createServerCookieManager,Uk as createScope,Ag as createSSRSuspense,Ae as createRouter,$ as createRouteLocation,Yn as createRoute,Vk as createRef,Wk as createReactive,xq as createProvideContext,Pn as createProject,Hn as createProductionBuild,_a as createPlaceholder,pm as createOptimizedBuild,on as createNetlifyHandler,ak as createNetlifyClient,aa as createMiddlewareContext,Xn as createMiddleware,Np as createLazyObserver,Kg as createKeepAliveCache,en as createKVNamespace,_g as createIslandRegistry,Wi as createImgDirective,Lk as createImagePlugin,Ek as createImageHandler,Jk as createImageDirective,ia as createHeatmapAggregator,dk as createFileManifest,dn as createEnvAccessor,nc as createEnhancedError,gn as createEdgeHandler,fn as createEdgeCache,Lh as createDetailedErrorMessage,mn as createDenoHandler,jk as createDefaultNetlifyConfig,gd as createCspHeaders,qn as createCookie,Xk as createComputed,Tk as createComponentInstance,ln as createCloudflareHandler,T as createClientCookieManager,Wh as createBuiltinDirectives,Kq as createApp,F as createAnimationTimeline,Uo as cover,df as convertToCommonJS,$o as contrast,To as contain,mc as consoleError,ac as configureErrorHandling,Dj as config,Xk as computed,Km as compressResponse,Ef as composerPattern,Df as composer,Ll as composeShellWithPage,Em as componentDirective,Gh as componentClientSignalNames,Zl as compileTemplate,a as collectRepeatedFlag,ck as collectDeployFiles,$i as clearVideoCache,Pd as clearTranslationCache,og as clearStoreCache,Zj as clearStorage,yp as clearSignatureCache,Bi as clearPlaceholderCache,lf as clearOnceStore,Rc as clearNonce,Y as clearMiddleware,we as clearImagePlaceholders,Ik as clearImageCache,Ub as clearErrorMessages,Ze as clearDevCaches,hb as clearCustomFilters,Gf as clearComposers,pg as clearComposableCache,Mh as clearComponentCache,Ki as clearCache,no as cleanupLoadingIndicator,Cl as classifyScript,Dl as classifyAllScripts,$n as checkTemplateFile,ao as checkTemplate,_e as checkCache,vp as checkAuthAccess,i as checkA11yWithRegex,j as checkA11y,zm as channel,vn as captureScreenshots,un as captureScreenshot,$d as cancelPendingLoads,bk as calculateSha1,di as calculateOptimalWidths,$e as cacheTemplate,lj as buildWebComponents,co as buildVirtualSource,iq as buildViews,No as buildUrl,he as buildSuspenseResolveScript,gr as buildStaticSite,la as buildRuntimeGlobalsDestructure,Ul as buildRuntimeAsset,Vl as buildRouterAsset,fr as buildLangPickerScript,ji as buildImageUrl,ag as buildHtmlAttrs,bm as buildForProduction,Hm as buildComponentLibrary,wp as buildAuthParams,cm as buildApp,dr as buildAlternateLinks,Gn as build,xm as broadcastPrivate,ym as broadcastPresence,um as broadcast,_o as brightness,Vo as blur,ya as blankInertHtmlRegions,qp as batchSignUrls,Fe as batch,n as autoFixA11yFile,o as autoFixA11yDirectory,m as autoFixA11y,gp as auto,e as attributeValue,Wl as assetTags,za as asInvocableStatement,sr as arrayOf,ar as applyTranslations,Qi as applyTransformations,yh as applySlots,Dm as applyPropDefaults,jp as applyPreset,cg as applyHtmlAttrs,wd as applyHead,pb as applyFilters,Hl as appendVary,Xc as apiCspPreset,y as animationGroupDirective,fj as analyzeVideo,fm as analyzeUsage,Al as analyzeTemplate,Bl as analyzeProject,fm as analyzeDirectiveUsage,Eb as analyticsDirective,Sn as addStore,Rn as addPage,$c as addNonceToInlineContent,Tn as addLayout,Qn as addComponent,En as actionRedirectResponse,Q as abortNavigation,p as a11yDirective,We as __setSignalsGeneratorsForTest,Wf as __setBuildIdForTest,Yi as VideoProcessorCache,kh as Validator,s as TransitionType,u as TransitionEase,t as TransitionDirection,Ac as Tokenizer,Zn as TemplateTypeChecker,yn as TEMPLATE_PRESETS,jc as StxValidationError,fc as StxSyntaxError,hc as StxSecurityError,gc as StxRuntimeError,ic as StxFileError,ec as StxError,Gq as Show,ie as SUSPENSE_RESOLVER_RUNTIME,ja as STX_RUNTIME_GLOBALS,Ra as STX_AUTO_IMPORTS,Ka as STATE_DIR_ENV_VAR,B as SPRING_PRESETS,El as SPA_NAV_HEADER,sa as RUNTIME_OWNED_COLON_ATTRS,ua as RUNTIME_HANDLED_X_ATTRS,Fb as RESPONSE_STATUS_KEY,Gb as RESPONSE_HEADERS_KEY,oa as REACTIVE_RUNTIME_GLOBALS,Fn as ProductionBuild,Iq as Portal,On as PROJECT_TEMPLATES,ip as PRESETS,na as NON_CLIENT_PRIMITIVES,Eo as MemorySessionStore,ai as MIME_TYPES,Zh as MEDIA_DEFAULT_WIDTHS,$h as MEDIA_DEFAULT_FORMATS,Pl as LAYOUT_TYPES_FILE,Ni as ImageProcessorCache,Ck as ImageProcessingError,zo as HydrationRuntime,Kj as HotReloadServer,ha as HeatmapAggregator,_f as HTML_CLASS_MARKER,Zf as HTML_ATTRS_MARKER,zq as Fragment,Hq as For,Fl as FRAGMENT_CACHE_CONTROL,rc as ErrorLogger,Xb as ErrorCodes,Sj as EXTERNALIZED_ASSET_DIR,ok as DeployError,pk as DEFAULT_WIDTHS,v as DEFAULT_TRANSITION_OPTIONS,Ja as DEFAULT_STATE_DIR,rk as DEFAULT_QUALITY,qi as DEFAULT_PLACEHOLDER_OPTIONS,qk as DEFAULT_FORMATS,_h as DEFAULT_DPR_VALUES,qo as ComponentHMRHandler,ka as COMPONENT_SCOPE_LOCAL_GLOBALS,wa as COMPONENT_PASSTHROUGH_X_ATTRS,ma as COMPILE_TIME_ONLY_GLOBALS,ii as COMMON_SIZES,Nf as COLOR_MODE_BOOT_MARKER,Of as COLOR_MODE_BOOT_GLOBAL,Yf as CLOAK_STYLE,Bm as BroadcastServer,Am as Broadcast,Tf as BUILD_ID_META,Uf as BUILD_ID_HEADER,Ga as BROWSER_CORE_IMPORTS,ri as BLUR_UP_CSS,va as ALPINE_BRIDGE_X_ATTRS,Sq as $path};
|
|
2
|
+
import{$ as ml,$a as dn,$b as wo,$c as wp,$d as wq,A as Yj,Aa as om,Ab as Qn,Ac as Xo,Ad as Xp,Ae as br,B as Zj,Ba as pm,Bb as Rn,Bc as Yo,Bd as Yp,Be as cr,C as _j,Ca as Cm,Cb as Sn,Cc as Zo,Cd as Zp,Ce as dr,D as $j,Da as Dm,Db as Tn,Dc as _o,Dd as _p,De as er,E as Rk,Ea as Em,Eb as Un,Ec as $o,Ed as $p,Ee as fr,F as Sk,Fa as Fm,Fb as Vn,Fc as ap,Fd as aq,Fe as gr,G as Tk,Ga as Gm,Gb as Wn,Gc as bp,Gd as bq,Ge as hr,H as Uk,Ha as Hm,Hb as Xn,Hc as cp,Hd as cq,He as ir,I as Vk,Ia as Lm,Ib as Yn,Ic as dp,Id as dq,Ie as jr,J as Wk,Ja as Mm,Jb as Zn,Jc as ep,Jd as eq,Je as kr,K as Xk,Ka as Nm,Kb as _n,Kc as fp,Kd as fq,Ke as lr,L as Yk,La as Om,Lb as $n,Lc as gp,Ld as gq,Le as mr,M as Zk,Ma as Pm,Mb as ao,Mc as hp,Md as hq,Me as nr,N as _k,Na as Qm,Nb as bo,Nc as ip,Nd as iq,Ne as or,O as $k,Oa as Rm,Ob as jo,Oc as jp,Od as jq,Oe as pr,P as al,Pa as Sm,Pb as ko,Pc as kp,Pd as kq,Pe as qr,Q as bl,Qa as Tm,Qb as lo,Qc as lp,Qd as lq,Qe as rr,R as cl,Ra as Um,Rb as mo,Rc as mp,Rd as mq,Re as sr,S as dl,Sa as Vm,Sb as no,Sc as np,Sd as nq,Se as tr,T as el,Ta as Wm,Tb as oo,Tc as op,Td as oq,Te as ur,U as fl,Ua as Xm,Ub as po,Uc as pp,Ud as pq,Ue as vr,V as gl,Va as Ym,Vb as qo,Vc as qp,Vd as qq,Ve as wr,W as hl,Wa as Zm,Wb as ro,Wc as rp,Wd as rq,We as xr,X as il,Xa as _m,Xb as so,Xc as sp,Xd as sq,Xe as yr,Y as jl,Ya as an,Yb as to,Yc as tp,Yd as tq,Ye as zr,Z as kl,Za as bn,Zb as uo,Zc as up,Zd as uq,_ as ll,_a as cn,_b as vo,_c as vp,_d as vq,aa as nl,ab as en,ac as xo,ad as xp,ae as xq,ba as ol,bb as fn,bc as yo,bd as yp,be as yq,ca as pl,cb as gn,cc as zo,cd as zp,ce as zq,da as ql,db as hn,dc as Ao,dd as Ap,de as Aq,ea as rl,eb as jn,ec as Bo,ed as Bp,ee as Bq,fa as sl,fb as kn,fc as Co,fd as Cp,fe as Cq,ga as tl,gb as ln,gc as Do,gd as Dp,ge as Dq,ha as ul,hb as mn,hc as Eo,hd as Ep,he as Eq,ia as vl,ib as nn,ic as Fo,id as Fp,ie as Fq,ja as wl,jb as on,jc as Go,jd as Gp,je as Gq,ka as xl,kb as pn,kc as Ho,kd as Hp,ke as Hq,la as yl,lb as qn,lc as Io,ld as Ip,le as Iq,ma as zl,mb as rn,mc as Jo,md as Jp,me as Jq,na as Al,nb as sn,nc as Ko,nd as Kp,ne as Kq,o as a,oa as Bl,ob as tn,oc as Lo,od as Lp,oe as Lq,p as Jj,pa as dm,pb as wn,pc as Mo,pd as Mp,pe as Sq,q as Kj,qa as em,qb as xn,qc as No,qd as Np,qe as Tq,r as Lj,ra as fm,rb as yn,rc as Oo,rd as Op,re as Uq,s as Mj,sa as gm,sb as zn,sc as Po,sd as Pp,se as Vq,t as Nj,ta as hm,tb as Fn,tc as Qo,td as Qp,te as Wq,u as Oj,ua as im,ub as Gn,uc as Ro,ud as Rp,ue as Xq,v as Pj,va as jm,vb as Hn,vc as So,vd as Sp,ve as Yq,w as Qj,wa as km,wb as In,wc as To,wd as Tp,we as Zq,x as Rj,xa as lm,xb as Nn,xc as Uo,xd as Up,xe as _q,y as Wj,ya as mm,yb as On,yc as Vo,yd as Vp,ye as $q,z as Xj,za as nm,zb as Pn,zc as Wo,zd as Wp,ze as ar}from"./chunk-w5b2bwxp.js";import{$e as ck,Ze as ak,_e as bk,af as dk,bf as ek,cf as fk,df as gk,ef as hk,ff as ik,gf as jk,hf as kk,if as lk,jf as mk,kf as nk,lf as ok}from"./chunk-ym3r8ktq.js";import{mf as Fk,nf as Gk,of as Hk,pf as Ik,qf as Jk,rf as Kk,sf as Lk,tf as Mk,uf as Nk,vf as Ok,wf as Pk,xf as Qk}from"./chunk-bjj27mf3.js";import{Af as fo,Bf as go,Cf as ho,Df as io,yf as co,zf as eo}from"./chunk-nqy2v6vh.js";import{Ef as un,Ff as vn}from"./chunk-pbsfbgx7.js";import{Gf as An}from"./chunk-1n16xphq.js";import{Hf as Tl,If as Ul,Jf as Vl,Kf as Wl,Lf as Zl,Mf as bm}from"./chunk-rkrnb0ec.js";import{Nf as Xl,Qf as Yl}from"./chunk-4zkv1vqh.js";import{$f as tm,Yf as qm,Zf as rm,_f as sm,ag as um,bg as vm,cg as wm,dg as xm,eg as ym,fg as zm,gg as Am,hg as Bm}from"./chunk-0j9hrzjj.js";import{ig as Dk,jg as Ek}from"./chunk-j59pkkzn.js";import{kg as cm}from"./chunk-pfm1325e.js";import{lg as Im,mg as Jm,ng as Km,og as $m,pg as Bn,qg as Cn,rg as Dn,sg as En,tg as Jn,ug as Kn,vg as Ln,wg as Mn}from"./chunk-ecyac25w.js";import{Ag as Fl,Bg as Gl,Cg as Hl,Dg as Il,Eg as Jl,Fg as Kl,Gg as Ll,Hg as Ml,Ig as Nl,Jg as Ol,Kg as _l,Lg as $l,Mg as am,xg as Cl,yg as Dl,zg as El}from"./chunk-qqfsm20p.js";import{Ng as Yi,Og as Zi,Pg as _i,Qg as $i,Rg as aj,Sg as bj,Tg as cj,Ug as dj,Vg as ej,Wg as fj,Xg as gj}from"./chunk-8pvymy12.js";import{Yg as yj,_g as zj}from"./chunk-f5v2qf95.js";import{eh as pk,fh as qk,gh as rk,hh as sk,ih as tk,jh as uk,kh as vk,mh as wk,nh as xk,oh as yk,ph as zk,qh as Ak,rh as Bk,uh as Ck}from"./chunk-k6st4606.js";import{vh as ih,wh as jh,xh as kh,yh as lh}from"./chunk-49kk0s96.js";import{Dh as mh}from"./chunk-w3ycm4na.js";import{Eh as th,Fh as uh,Gh as vh,Hh as wh,Ih as xh,Jh as yh}from"./chunk-7exqxjx5.js";import{Kh as Ni,Lh as Oi,Mh as Pi,Qh as Qi,Rh as Ri,Sh as Si}from"./chunk-zr4emtxf.js";import{$h as Ki,Th as Di,Uh as Ei,Vh as Fi,Wh as Gi,Xh as Hi,Zh as Ii,_h as Ji,ai as Li,bi as Mi}from"./chunk-74cv4ta1.js";import{ci as tg,di as ug,ei as vg,fi as wg,gi as xg,hi as yg}from"./chunk-wcm80anz.js";import{ii as zg,ji as Ag,ki as Bg,li as Cg,mi as Dg}from"./chunk-y7m2dpd3.js";import{ni as Eg,oi as Fg,pi as Gg,qi as Hg,ri as Ig}from"./chunk-9y0g8kzt.js";import{si as Jg,ti as Kg,ui as Lg,vi as Mg,wi as Ng,xi as Og,yi as Pg}from"./chunk-t6nseeb9.js";import{Ai as Rg,Bi as Sg,Ci as Tg,Di as Ug,Ei as Vg,zi as Qg}from"./chunk-xttsqmkm.js";import{Gi as Wg,Hi as Xg,Ii as Yg,Ji as Zg,Ki as _g,Li as $g,Mi as ah,Ni as bh,Oi as ch,Pi as dh,Qi as eh,Ri as fh,Si as gh,Ti as hh}from"./chunk-54st8g2j.js";import{Vi as ng,Wi as og}from"./chunk-b3zes539.js";import{Zi as pg}from"./chunk-new80es4.js";import"./chunk-9n0gvfrg.js";import{bj as qg}from"./chunk-7q9mwh4v.js";import{cj as rg,dj as sg}from"./chunk-refwkt87.js";import{ej as ge,fj as he,gj as ie,hj as je,ij as ke,jj as le,kj as me,lj as ne,mj as oe,nj as pe,oj as qe,pj as re,qj as se,rj as te}from"./chunk-sne7938g.js";import{sj as Qe,tj as Re}from"./chunk-ph5f8eev.js";import{Aj as Ce,Bj as De,Cj as Ee,Dj as Fe,Ej as Ge,Fj as He,Gj as Ie,Hj as Je,Ij as Ke,Jj as Le,Kj as Me,Lj as Ne,Mj as Oe,Nj as Pe}from"./chunk-w95sp0k9.js";import{Oj as Se,Pj as Te,Qj as Ue,Rj as Ve,Sj as We,Tj as Xe,Uj as Ye,Vj as Ze,Wj as _e,Xj as $e,Yj as af}from"./chunk-k6wnmjhf.js";import{qk as Mq,rk as Nq,sk as Oq,tk as Pq,uk as Qq,vk as Rq}from"./chunk-qpsj28s2.js";import{Ak as Pl,Bk as Ql,Ck as Rl,Dk as Sl,wk as Sj,xk as Tj,yk as Uj,zk as Vj}from"./chunk-sr49fd8p.js";import"./chunk-58f0mthg.js";import"./chunk-0ha9e1wt.js";import{$l as Wa,$m as Ub,$n as Uc,$p as Hf,$q as Nh,$r as vj,Al as I,Am as pb,An as tc,Ao as Jd,Ap as ff,Aq as gg,Ar as vi,Bl as J,Bm as qb,Bn as uc,Bo as Kd,Bp as gf,Bq as hg,Br as wi,Cl as da,Cm as rb,Cn as vc,Co as Ld,Cp as hf,Cq as ig,Cr as xi,Dl as ea,Dn as wc,Do as Md,Dp as jf,Dq as jg,Dr as yi,El as fa,Em as yb,En as xc,Eo as Nd,Ep as kf,Eq as kg,Er as zi,Fl as ga,Fm as zb,Fn as yc,Fo as Od,Fp as lf,Fq as lg,Fr as Ai,Gl as ha,Gm as Ab,Gn as zc,Go as Pd,Gp as mf,Gq as mg,Gr as Bi,Hl as ia,Hm as Bb,Hn as Ac,Ho as Qd,Hp as nf,Hq as nh,Hr as Ci,Im as Cb,In as Bc,Io as Rd,Ip as of,Iq as oh,Ir as Ti,Jm as Db,Jn as Cc,Jo as Sd,Jp as pf,Jq as ph,Jr as Ui,Kl as za,Km as Eb,Kn as Dc,Ko as Td,Kp as qf,Kq as qh,Kr as Vi,Ll as Aa,Ln as Ec,Lo as Ud,Lp as rf,Lq as rh,Lr as Wi,Ml as Ba,Mm as Fb,Mn as Fc,Mo as Vd,Mp as sf,Mq as sh,Mr as Xi,Nl as Ca,Nm as Gb,Nn as Gc,No as Wd,Np as tf,Nq as zh,Nr as hj,Ol as Da,Om as Hb,On as Hc,Oo as Xd,Op as uf,Oq as Ah,Or as ij,Pm as Ib,Pn as Ic,Po as Yd,Pp as vf,Pq as Bh,Pr as jj,Qm as Jb,Qn as Jc,Qo as Zd,Qp as wf,Qq as Ch,Qr as kj,Rl as Ga,Rm as Kb,Rn as Kc,Ro as _d,Rp as xf,Rq as Dh,Rr as lj,Sl as Ha,Sm as Lb,Sn as Lc,So as $d,Sp as yf,Sq as Eh,Sr as mj,Tl as Ia,Tm as Mb,Tn as Mc,To as ae,Tp as zf,Tq as Fh,Tr as nj,Ul as Pa,Um as Nb,Un as Nc,Uo as be,Up as Af,Uq as Gh,Ur as oj,Vl as Qa,Vm as Ob,Vn as Oc,Vo as ce,Vp as Bf,Vq as Hh,Vr as pj,Wl as Ra,Wm as Pb,Wn as Pc,Wo as de,Wp as Cf,Wq as Ih,Wr as qj,Xl as Sa,Xm as Qb,Xn as Qc,Xo as ee,Xp as Df,Xq as Jh,Xr as rj,Yl as Ta,Ym as Rb,Yn as Rc,Yo as fe,Yp as Ef,Yq as Kh,Yr as sj,Zl as Ua,Zm as Sb,Zn as Sc,Zp as Ff,Zq as Lh,Zr as tj,_l as Va,_m as Tb,_n as Tc,_o as ze,_p as Gf,_q as Mh,_r as uj,am as Xa,an as Vb,ao as Vc,aq as If,ar as Oh,as as wj,bm as Ya,bn as Wb,bo as Wc,bp as Ae,bq as Jf,br as Ph,bs as xj,cn as Xb,co as Xc,cp as Be,cq as Kf,cr as Zh,cs as Aj,dn as Yb,do as Yc,dq as Lf,dr as _h,ds as Bj,en as Zb,eo as Zc,ep as bf,eq as Mf,er as $h,es as Cj,fn as _b,fo as _c,fq as Nf,fr as ai,fs as Dj,gm as Za,gn as $b,go as $c,gq as Of,gr as bi,gs as Ej,hm as _a,hn as ac,ho as ad,hq as Pf,hr as ci,hs as Fj,im as $a,in as bc,io as bd,iq as Qf,ir as di,is as Gj,jm as ab,jn as cc,jo as cd,jq as Rf,jr as ei,js as Hj,kl as s,km as bb,kn as dc,ko as dd,kq as Sf,kr as fi,ks as Ij,ll as t,lm as cb,ln as ec,lo as ed,lq as Tf,lr as gi,ml as u,mn as fc,mo as fd,mq as Uf,mr as hi,nl as v,nn as gc,no as gd,nq as Vf,nr as ii,ol as w,om as db,on as hc,oo as hd,oq as Wf,or as ji,pl as x,pm as eb,pn as ic,po as id,pq as Xf,pr as ki,ql as y,qm as fb,qn as jc,qo as jd,qq as Yf,qr as li,rl as z,rm as gb,rn as kc,ro as Ad,rq as Zf,rr as mi,sl as A,sm as hb,sn as lc,so as Bd,sq as _f,sr as ni,tl as B,tm as ib,tn as mc,to as Cd,tq as $f,tr as oi,ul as C,um as jb,un as nc,uo as Dd,uq as ag,ur as pi,vl as D,vm as kb,vn as oc,vo as Ed,vp as cf,vq as bg,vr as qi,wl as E,wm as lb,wn as pc,wo as Fd,wq as cg,wr as ri,xl as F,xm as mb,xn as qc,xo as Gd,xp as df,xq as dg,xr as si,yl as G,ym as nb,yn as rc,yo as Hd,yq as eg,yr as ti,zl as H,zm as ob,zn as sc,zo as Id,zp as ef,zq as fg,zr as ui}from"./chunk-r7dd7c7y.js";import{ls as d,ms as e,ns as f,os as g,ps as h,qs as i,rs as j,ss as k,ts as l,us as m,vs as n,ws as o,xs as p,ys as q,zs as r}from"./chunk-25de1sj7.js";import{As as Qh,Bs as Rh,Cs as Sh,Ds as Th,Es as Uh,Fs as Vh,Gs as Wh,Hs as Xh,Is as Yh}from"./chunk-38ykv2gd.js";import{Js as b,Ks as c}from"./chunk-4qq5wj04.js";import{Ls as Ea,Ms as Fa}from"./chunk-g8tce9rr.js";import{$s as wb,Ns as sb,Os as tb,Qs as ub,_s as vb,at as xb}from"./chunk-ptcpaeem.js";import{bt as ue,ct as ve,dt as we,et as xe,ht as ye}from"./chunk-a8mnhryz.js";import{it as Ja,jt as Ka,kt as La,lt as Ma,mt as Na,nt as Oa}from"./chunk-dnhckx52.js";import{At as wd,Bt as xd,Ct as yd,Dt as zd,ot as kd,pt as ld,qt as md,rt as nd,st as od,tt as pd,ut as qd,vt as rd,wt as sd,xt as td,yt as ud,zt as vd}from"./chunk-jt8as8j8.js";import"./chunk-x84g0m0p.js";import{Ht as ja,It as ka,Jt as la,Kt as ma,Lt as na,Mt as oa,Nt as pa,Ot as qa,Pt as ra,Qt as sa,Rt as ta,St as ua,Tt as va,Ut as wa,Vt as xa,Wt as ya}from"./chunk-5h5ydexj.js";import{$t as L,Au as $,Bu as aa,Cu as ba,Eu as ca,_t as K,cu as M,hu as N,iu as O,ou as P,pu as Q,qu as R,ru as S,su as T,tu as U,uu as V,vu as W,wu as X,xu as Y,yu as Z,zu as _}from"./chunk-aw651z2y.js";import"./chunk-wj2trgsn.js";import"./chunk-0y6f4037.js";export{kk as writeNetlifyConfig,$l as writeManifest,Pk as writeImageManifest,so as wrapComponentForHMR,mr as withDefaults,xj as webComponentDirectiveHandler,hp as watermark,jq as watchViews,Zk as watchMultiple,_k as watchEffect,Yk as watch,ye as warmImagePlaceholders,ll as waitForStore,Zd as waitForLocale,eo as virtualPathFor,kj as videoDirective,uc as validators,qr as validated,Ld as validateValueEnhanced,oh as validateTemplate,mp as validateParams,Md as validateFormEnhanced,_p as validateFile,Hd as validateFields,Gd as validateField,qh as validateDirective,ed as validateCspDirectives,Fj as validateConfig,em as validateComponentScripts,Cm as validateComponentProps,mg as validateClientScript,lh as v,kb as usesSignalsInScript,pa as usesReactiveRuntime,Dh as userComponentFileExists,Tg as useVirtualList,sd as useTitle,kl as useStoreOrThrow,Ko as useStore,Wj as useStorage,uq as useSlots,Yj as useSessionStorage,pd as useSeoMeta,ml as useRouteParams,ol as useRouteParamOrThrow,nl as useRouteParam,sd as usePageTitle,Pe as useOptimistic,ql as useMiddlewareValue,pl as useMiddlewareState,Xj as useLocalStorage,lo as useLoadingIndicator,nd as useHead,ih as useForm,wq as useAttrs,aq as uploadFiles,$p as uploadFile,hl as updateInstance,Ne as untrack,Th as unregisterDirective,il as unmountInstance,rb as unescapeHtml,ho as typecheckStxFiles,Ch as transpileTypeScript,$q as translate,w as transitionDirective,Ta as transformAutoImports,wm as toUsers,vm as toUser,So as thumbnail,Tp as thumbHashToRGBA,Up as thumbHashToDataURL,ra as templateNeedsRuntime,qa as templateHasReactiveContext,Se as templateCache,Nb as syncRecordedResponse,po as stxClientHelpers,xf as structuredDataDirective,cr as stripLocalePrefix,Ml as stripDocumentWrapper,Fa as stripCommentsAndLiterals,kn as stringToStream,Uc as strictCspPreset,oe as streamingSuspenseDirective,se as streamToResponse,me as streamTemplateSimple,ge as streamTemplate,Rj as stopHmrServer,sm as stopBroadcasting,Ma as stateDirName,Na as stateDir,Ce as state,gg as startsDocument,Mn as startProductionServer,An as startInteractive,rm as startBroadcasting,er as stampLocaleLayoutGroup,D as staggerDirective,kp as srcsetUrls,E as springDirective,Dc as splitByPipe,Il as spaNavVaryHeaders,fo as sourcePathFor,rp as smartBatchSign,Fh as slotContentHasExpressions,pp as signUrl,Ah as shouldTranspileTypeScript,Oj as shouldReloadOnChange,up as shouldRefreshSignature,Pj as shouldIgnoreFile,Lg as shouldCacheComponent,Wo as sharpen,tr as shape,La as setStateDir,ul as setRouteParams,vl as setMiddlewareState,xe as setImagePlaceholder,oq as setGlobalProvide,Rb as setErrorLocale,Rk as setCurrentInstance,_i as setCachedVideoResult,Pi as setCachedImageResult,Ji as setCached,wr as serveStxFile,yr as serveMultipleStxFiles,Jj as serveMarkdownFile,Wn as serveFile,zr as serveApp,Vn as serve,vo as serializeState,$m as serializeSetCookie,Yo as sepia,qd as seoMetaToHeadConfig,x as scrollAnimateDirective,q as screenReaderDirective,oj as scopeHTML,nj as scopeCSS,Af as scanForSitemapEntries,k as scanA11yTargets,l as scanA11yIssues,ap as saturation,np as sanitizeParams,wc as sanitizeFilePath,xc as sanitizeExpression,yc as sanitizeDirectiveParams,vc as sanitizeDirectiveParam,zc as sanitizeComponentProps,pc as safeExecuteAsync,oc as safeExecute,xa as runtimeHandledXAttrsLiteral,qf as runPreProcessingMiddleware,rf as runPostProcessingMiddleware,Dn as runPageAction,Ie as runMountCallbacks,ba as runMiddleware,fl as runHooks,Uq as runDoctor,Je as runDestroyCallbacks,Ff as runComposers,bp as rotate,mh as rewriteImagesWithSiblings,Ob as responseBindings,Jh as resolveTemplatePath,c as resolveStxTargets,Bj as resolveStxDirectories,_q as resolveI18n,Qo as resize,Za as resetPlaceholders,md as resetHead,uo as resetHMRHandler,cc as resetErrorConfig,or as required,bb as replacePlaceholders,hq as renderView,hj as renderVideoComponent,Qa as renderVendorStyleTags,Dq as renderToString,Eq as renderToStream,Fq as renderToDOM,Sp as renderThumbhashToCanvas,Rq as renderTemplateString,Pq as renderTemplate,Qq as renderString,je as renderStreamingPage,vh as renderSlot,Bg as renderSSRSuspense,Cp as renderProtectedVideo,Bp as renderProtectedImg,op as renderMediaUpload,Oq as renderMarkdownView,Rl as renderLayoutTypes,Ti as renderImgComponent,Fk as renderImageComponent,ud as renderHtmlAttrs,td as renderHead,kq as renderEmail,Hh as renderComponentWithSlot,vd as renderBodyAttrs,Fo as render,Wc as relaxedCspPreset,Fd as registerValidationRule,qe as registerStreamingDirectives,Mo as registerStoresClient,sl as registerStore,yf as registerSeoDirectives,V as registerMiddleware,fb as registerFilters,eb as registerFilter,Tb as registerErrorMessages,Kd as registerEnhancedValidationRule,Qh as registerDirective,dd as registerCspDirectives,Fm as registerComponentDirectives,J as registerAnimationDirectives,r as registerA11yDirectives,Vk as ref,sn as redirect,Jb as recordResponseStatus,Kb as recordResponseHeader,Oa as rebaseOntoStateDir,Lb as readResponseStatus,Mb as readResponseHeaders,Hj as readMarkdownFile,Te as readFileCached,Wk as reactive,fp as quality,zp as pruneSignatureCache,Mi as pruneCache,mq as provide,Nq as protectCodeBlocks,nr as prop,Jf as processVueTemplate,Rg as processVirtualListDirectives,Vg as processVirtualGridDirectives,gj as processVideo,Id as processValidateDirective,ee as processTranslateDirective,vg as processTransitionDirectives,yg as processTransitionAttributes,yd as processTitleDirective,Bb as processTemplateBindings,rg as processTeleportDirectives,zg as processSuspenseDirectives,tf as processStructuredData,ke as processStreamDirectives,Pb as processStatusDirective,gh as processStaticDirectives,of as processStackReplacements,nf as processStackPushDirectives,wh as processSlots,Kl as processShell,Hf as processServerBindings,uf as processSeoDirective,re as processSectionDirectives,Mf as processScopedStyles,zb as processReactiveBindings,Dp as processProtectedMedia,$g as processPartialHydrationDirectives,lg as processOnceDirective,pf as processMiddleware,sf as processMetaDirectives,zd as processMetaDirective,Ij as processMarkdownFileDirectives,Oh as processMarkdownDirectives,hf as processLoops,Jg as processKeepAliveDirectives,kg as processJsonDirective,Ug as processInfiniteListDirectives,mf as processIncludes,Vi as processImgComponents,Hk as processImageComponents,uk as processImage,xd as processHeadDirective,Bd as processForms,Dd as processFormInputDirectives,ob as processExpressions,Ca as processEventDirectives,Ed as processErrorDirective,Kf as processDynamicComponents,nh as processDirectives,Yh as processDirectiveAttributes,qg as processDeferDirectives,id as processCustomDirectives,ad as processCspDirectives,ur as processComponentProps,Ya as processClientScript,Cd as processBasicFormDirectives,Eg as processAsyncDirectives,jd as processAppearanceBootstrapDirective,A as processAnimationDirectives,f as processA11yDirectives,Vd as preloadTranslationsBackground,Ud as preloadTranslations,ko as preloadIslandHandlers,ze as preloadIconCollection,nm as poolStrings,zj as pluginManager,ve as placeholdersWarmed,ug as performLeave,tg as performEnter,Ke as pendingLifecycleCounts,Oe as peek,jf as partialsCache,ij as parseVideoDirectiveOptions,Oo as parseUrl,Vp as parseThumbhashString,Jc as parseSwitchBlock,th as parseSlots,uh as parseSlotElement,Oc as parseScriptDeclarations,vj as parseSFCComponent,Ep as parseProtectedArgs,gf as parseLoopBinding,Ui as parseImgComponent,ki as parseImageUrl,Gk as parseImageComponent,Bn as parseFormBody,Lc as parseExpressionWithFilters,Gm as parseDefaults,pn as parseCookies,Lm as parseContainerSelector,Gc as parseConditionalBlock,Mc as parseArguments,H as parseAnimationShorthand,pr as optional,om as optimizeTemplate,Mk as optimizeImage,Nk as optimizeDirectory,rr as oneOf,kf as onceStore,cl as onUpdated,yb as onUpdate,el as onUnmounted,zl as onServer,al as onMounted,Ge as onMount,fh as onHydrated,sq as onErrorCaptured,He as onDestroy,Pg as onDeactivated,yl as onClient,bl as onBeforeUpdate,dl as onBeforeUnmount,$k as onBeforeMount,Og as onActivated,Op as observeElement,tn as notFound,Rf as normalizeCriticalHeadOrder,rq as nextTick,Jm as negotiateEncoding,P as navigateTo,gl as mountInstance,z as motionDirective,Vc as moderateCspPreset,mm as minifyHtml,wf as metaDirective,$f as metaDedupKey,Po as mergeParams,bg as mergeHtmlAttrs,od as mergeHeadConfigs,Zc as mergeCspDirectives,tb as mergeCrosswindConfig,M as matchRoute,Ph as markdownDirectiveHandler,Gj as markdownCache,b as looksLikeGlob,br as localizePath,Wd as loadTranslationLazy,ae as loadTranslation,Cj as loadStxConfig,_ as loadMiddlewareFromDirectory,am as loadManifest,Kp as loadElement,tm as loadChannels,ir as lintStxStrict,Mp as lazyLoadAll,Lp as lazyLoad,C as keyframeDirective,Bq as jsxs,Cq as jsxDEV,Aq as jsx,rn as jsonResponse,pe as islandDirective,$b as isTest,Nl as isSpaNavigation,Gl as isSpaNavRequest,sp as isSignatureValid,Le as isSignal,sk as isSharpAvailable,cn as isServerEnvironment,wl as isServer,ta as isRuntimeOwnedColonAttr,Zb as isProduction,d as isPresentationalRole,Hp as isNativeLazySupported,Mq as isMarkdownPath,Sd as isLoading,Td as isLoaded,zh as isJavaScriptScript,Ip as isIntersectionObserverSupported,Ak as isImageFile,tk as isImageBackendAvailable,ce as isICUFormat,eh as isHydrated,Eh as isHydrateTrigger,Hb as isHttpStatus,bn as isEdgeEnvironment,jr as isDirectiveKind,_b as isDevelopment,Me as isDerived,Nj as isCssOnlyChange,Im as isCompressible,xl as isClient,Gg as isAsyncComponent,Cn as isActionableMethod,Zo as invert,Ve as invalidateFileCacheByDir,Ue as invalidateFileCache,nb as interpolateScriptsInTemplate,lb as interpolateScriptExpressions,mb as interpolateScriptAttributes,lc as inlineError,Zq as injectThemeBootstrap,vf as injectSeoTags,Wq as injectSeo,bf as injectRouterScript,Mj as injectHotReload,fa as injectHeatmap,_c as injectCspMetaTag,xb as injectCrosswindCSS,ig as injectConfigHeadTags,Qf as injectColorModeBootScript,dg as injectCloakStyle,Xf as injectBuildId,Sa as injectBrowserCoreAutoImports,Db as injectAnalytics,nq as inject,rl as initStoreRegistry,nk as initNetlify,mo as initLoadingIndicator,Jp as initLazyLoading,zn as initFile,Rp as initBlurUp,Xp as initAllBlurUp,Xi as imgDirective,Kk as imageDirective,Kn as hydrateTemplateStream,Jn as hydrateTemplate,jo as hydrateIslands,bh as hydrateIsland,Ln as hydrateFragment,ch as hydrateByStrategy,dh as hydrateAll,Co as hydrate,Un as htmlResponse,eg as hoistLeadingHeadTags,Sf as hoistColorModeBootScript,ga as heatmapDirective,Fi as hashString,af as hashFilePath,Di as hashFile,Ei as hashBuffer,If as hasVueTemplateSyntax,ff as hasVariables,Ho as hasStore,cb as hasPlaceholders,lk as hasNetlifyConfig,X as hasMiddleware,Da as hasEventDirectives,hg as hasDocumentShell,rh as hasDirectives,h as hasDOMSupport,Dk as handleImageRequest,tq as handleError,Jq as h,zk as groupVariantsByFormat,Xo as grayscale,Nn as gitHash,gm as getUnusedDirectives,Xd as getTranslationSync,Qd as getTranslationCacheStats,Yd as getTranslationAsync,de as getTranslation,gk as getTotalSize,tp as getTimeUntilExpiry,ng as getStoreScript,Io as getStoreNames,Go as getStore,$j as getStorageSize,_j as getStorageKeys,Kh as getSourceLineInfo,Bh as getSharedTranspiler,g as getScreenReaderOnlyStyle,pj as getScopeAttribute,Be as getRouteParams,Ha as getPublicEnvDefine,Ia as getPublicEnv,ph as getPositionInfo,$a as getPlaceholderRegistry,Ci as getPlaceholderCacheStats,ld as getPageMeta,Qc as getNonce,Bk as getMimeType,Z as getMiddlewareNames,W as getMiddleware,Rd as getLoadingState,_d as getLoadingLocales,ue as getImagePlaceholder,vk as getImageMetadata,Bo as getHydrationRuntime,tl as getHydratedStoreState,Qj as getHmrServer,kd as getHead,to as getHMRHandler,oi as getFormatExtension,Hi as getFileMtime,yk as getFallbackVariant,Vb as getErrorMessage,Sb as getErrorLocale,bc as getErrorConfig,Yb as getErrorCodeName,Sh as getDirectives,Rh as getDirective,Sk as getCurrentInstance,Yc as getCspPreset,fd as getCspHeaderName,ub as getCrosswindServeAsset,Nh as getComponentCacheStats,Zi as getCachedVideoResult,xp as getCachedSignature,Xe as getCachedSignalsRuntime,Ye as getCachedRouterScript,Ai as getCachedPlaceholder,Oi as getCachedImageResult,Ii as getCached,Li as getCacheStats,Vf as getBuildId,qm as getBroadcastServer,ni as getBestVariant,gb as getAllFilters,bi as generateWidthSrcset,Sg as generateVirtualListCSS,cq as generateVideoPreview,Nd as generateValidationScript,dq as generateUploadRuntime,hm as generateTreeShakenBundle,xg as generateTransitionRuntime,wg as generateTransitionCSS,bj as generateThumbnails,ti as generateThumbhashPlaceholder,Um as generateTemplatesDocs,Dg as generateSuspenseRuntime,Cg as generateSuspenseCSS,wo as generateStateScript,li as generateSrcsetData,Si as generateSrcset,wk as generateSrcSet,cj as generateSpriteSheet,lq as generateSpaShell,mi as generateSourceTags,hi as generateSizesFromBreakpoints,gi as generateSizesAttribute,xk as generateSizes,zf as generateSitemapIndex,Xq as generateSitemap,Gp as generateSimpleMediaPicker,Ap as generateSignatureRuntime,Re as generateSignalsRuntimeDev,Qe as generateSignalsRuntime,Xa as generateServerDataBridge,mj as generateScopeId,wj as generateSFCWebComponent,Aa as generateRuntimeScript,K as generateRouteTypes,L as generateRouteManifest,Bf as generateRobotsTxt,Yq as generateRobots,Ri as generateResponsiveVariants,sj as generateReactiveWebComponentTS,rj as generateReactiveWebComponent,uj as generateReactiveRuntime,tj as generateReactiveMixin,aj as generatePoster,zi as generatePlaceholderStyle,yi as generatePlaceholderCSS,si as generatePlaceholder,ah as generatePartialHydrationCSS,Pc as generateNonce,hk as generateNetlifyToml,fq as generateMinifiedMediaRuntime,eq as generateMediaRuntime,Fp as generateMediaManagerEmbed,_l as generateManifest,oo as generateLoadingIndicatorHtml,Qp as generateLazyLoadRuntime,Sl as generateLayoutTypes,vi as generateLQIP,Ng as generateKeepAliveRuntime,Mg as generateKeepAliveCSS,hh as generateIslandManifest,bq as generateImagePreview,Ok as generateImageManifest,Ao as generateHydrationScript,te as generateHydrationRuntime,Do as generateHydrationCSS,Wg as generateHydrationBootstrap,Lj as generateHotReloadScript,ea as generateHeatmapScript,ro as generateHMRClientScript,dj as generateHLSManifest,xo as generateEventBindings,fi as generateDprSrcsetWithVariableQuality,ei as generateDprSrcset,fg as generateDocumentShell,Zm as generateDocs,Vm as generateDirectivesDocs,Xh as generateDirectiveRuntime,Cf as generateDefaultRobotsTxt,ej as generateDASHManifest,Tc as generateCspMetaTag,Sc as generateCspHeader,wb as generateCrosswindCSS,yq as generateCompositionRuntime,Tm as generateComponentsDocs,Xg as generateComponentManifest,Rm as generateComponentDoc,xi as generateColorPlaceholder,Pf as generateColorModeBootScript,jl as generateClientRuntime,Gi as generateCacheKey,Va as generateBrowserAutoImportDestructuring,Yp as generateBlurUpRuntime,Zp as generateBlurUpCSS,Ab as generateBindingsRuntime,ci as generateAutoWidthSrcset,Ua as generateAutoImportDestructuring,Ig as generateAsyncComponentRuntime,Hg as generateAsyncComponentCSS,I as generateAnimationRuntime,G as generateAnimationCSS,Cb as generateAnalyticsScript,io as formatTypecheckDiagnostics,bo as formatTypeErrors,wn as formatStxContent,fk as formatSize,O as formatRoutes,xn as formatMarkdownContent,Wb as formatLocalizedError,be as formatICU,dc as formatFilePath,kc as formatError,Vq as formatDoctorReport,Wm as formatDocsAsMarkdown,Ym as formatDocsAsJson,Xm as formatDocsAsHtml,ep as format,lm as foldConstants,dp as flipVertical,cp as flipHorizontal,Tl as fingerprint,go as findRuntimeTypeDeclarations,Tq as findPantryPackage,Fc as findMatchingEndTag,Bc as findMatchingDelimiter,Ea as findInterpolationEnd,Hc as findIfBlocks,Kc as findExpressions,N as findErrorPage,Ic as findDirectiveBlocks,im as findDeadCode,im as findDeadBranches,Mm as findContainerRegion,Sm as findComponentFiles,xr as findCommonDir,ek as filterRequiredFiles,Ih as fileExists,cf as extractVariables,Yl as extractTemplateExpressions,le as extractStreamBoundaries,yo as extractState,xh as extractSlotContent,ef as extractScriptFromTemplate,Xl as extractScriptBlocks,ab as extractPlaceholders,Ec as extractParenthesizedExpression,Ib as extractPageResponseStatus,ca as extractLayoutMetadata,wi as extractDominantColor,Nc as extractDirectiveParams,sh as extractDirectiveNames,Ol as extractContainerContent,Pm as extractComponentProps,Yg as extractComponentName,Qm as extractComponentDescription,vb as extractClassNames,Wa as extractBridgeData,Zg as extractBoundProps,Cc as extractBalancedExpression,Pa as extractAndStripCssImports,qj as extractAndScopeStyles,Ba as extractAndProcessEvents,Uj as externalizeSharedAssets,Vj as externalizeRepeatedAssets,Tj as externalizeHtml,qb as evaluateExpression,km as evaluateConstant,Qb as evaluateAuthExpression,jb as escapeHtmlValue,ib as escapeHtml,qc as errorRecovery,sc as errorLogger,sg as ensureTeleportTargets,jg as ensureDocumentShell,Jd as enhancedValidationRules,Nm as enableDevTools,jm as eliminateDeadCode,Ee as effect,lp as dprUrls,_m as docsCommand,Ql as discoverLayoutNames,Pp as disconnectObserver,Om as disableDevTools,tc as devHelpers,Jl as detectShell,an as detectRuntime,ik as detectProjectConfig,pi as detectFormat,dm as detectBuildMode,De as derived,mk as deploy,Ej as defineStxConfig,Lo as defineStore,vq as defineSlots,hr as defineSiteConfig,lr as definePropsWithValidation,kr as defineProps,yj as definePlugin,rd as definePageMeta,R as defineMiddleware,jh as defineForm,qq as defineExpose,pq as defineEmits,Uh as defineDirective,Lq as defineCustomElement,In as defineConfig,Vh as defineClientDirective,Fg as defineAsyncComponent,gq as defaultMediaConfig,Qk as defaultImageConfig,Od as defaultI18nConfig,da as defaultHeatmapConfig,Ad as defaultFormClasses,db as defaultFilters,hd as defaultCspConfig,Aj as defaultConfig,vr as default,sb as deepMergeThemes,Lf as dedupeScopedStyles,ui as decodeThumbhash,cd as cspNonceDirective,bd as cspDirective,Wp as crossfadeTransition,Ro as crop,Qg as createVirtualList,jj as createVideoDirective,nn as createVercelHandler,_n as createTypeChecker,fe as createTranslateFilter,jn as createTextEncoderStream,Kq as createStxApp,hn as createStreamingResponse,ne as createStreamRenderer,Jo as createStore,U as createStorageManager,S as createServerCookieManager,Uk as createScope,Ag as createSSRSuspense,Ae as createRouter,$ as createRouteLocation,Yn as createRoute,Vk as createRef,Wk as createReactive,xq as createProvideContext,Pn as createProject,Hn as createProductionBuild,_a as createPlaceholder,pm as createOptimizedBuild,on as createNetlifyHandler,ak as createNetlifyClient,aa as createMiddlewareContext,Xn as createMiddleware,Np as createLazyObserver,Kg as createKeepAliveCache,en as createKVNamespace,_g as createIslandRegistry,Wi as createImgDirective,Lk as createImagePlugin,Ek as createImageHandler,Jk as createImageDirective,ia as createHeatmapAggregator,dk as createFileManifest,dn as createEnvAccessor,nc as createEnhancedError,gn as createEdgeHandler,fn as createEdgeCache,Lh as createDetailedErrorMessage,mn as createDenoHandler,jk as createDefaultNetlifyConfig,gd as createCspHeaders,qn as createCookie,Xk as createComputed,Tk as createComponentInstance,ln as createCloudflareHandler,T as createClientCookieManager,Wh as createBuiltinDirectives,Kq as createApp,F as createAnimationTimeline,Uo as cover,df as convertToCommonJS,$o as contrast,To as contain,mc as consoleError,ac as configureErrorHandling,Dj as config,Xk as computed,Km as compressResponse,Ef as composerPattern,Df as composer,Ll as composeShellWithPage,Em as componentDirective,Gh as componentClientSignalNames,Zl as compileTemplate,a as collectRepeatedFlag,ck as collectDeployFiles,$i as clearVideoCache,Pd as clearTranslationCache,og as clearStoreCache,Zj as clearStorage,yp as clearSignatureCache,Bi as clearPlaceholderCache,lf as clearOnceStore,Rc as clearNonce,Y as clearMiddleware,we as clearImagePlaceholders,Ik as clearImageCache,Ub as clearErrorMessages,Ze as clearDevCaches,hb as clearCustomFilters,Gf as clearComposers,pg as clearComposableCache,Mh as clearComponentCache,Ki as clearCache,no as cleanupLoadingIndicator,Cl as classifyScript,Dl as classifyAllScripts,$n as checkTemplateFile,ao as checkTemplate,_e as checkCache,vp as checkAuthAccess,i as checkA11yWithRegex,j as checkA11y,zm as channel,vn as captureScreenshots,un as captureScreenshot,$d as cancelPendingLoads,bk as calculateSha1,di as calculateOptimalWidths,$e as cacheTemplate,lj as buildWebComponents,co as buildVirtualSource,iq as buildViews,No as buildUrl,he as buildSuspenseResolveScript,gr as buildStaticSite,la as buildRuntimeGlobalsDestructure,Ul as buildRuntimeAsset,Vl as buildRouterAsset,fr as buildLangPickerScript,ji as buildImageUrl,ag as buildHtmlAttrs,bm as buildForProduction,Hm as buildComponentLibrary,wp as buildAuthParams,cm as buildApp,dr as buildAlternateLinks,Gn as build,xm as broadcastPrivate,ym as broadcastPresence,um as broadcast,_o as brightness,Vo as blur,ya as blankInertHtmlRegions,qp as batchSignUrls,Fe as batch,n as autoFixA11yFile,o as autoFixA11yDirectory,m as autoFixA11y,gp as auto,e as attributeValue,Wl as assetTags,za as asInvocableStatement,sr as arrayOf,ar as applyTranslations,Qi as applyTransformations,yh as applySlots,Dm as applyPropDefaults,jp as applyPreset,cg as applyHtmlAttrs,wd as applyHead,pb as applyFilters,Hl as appendVary,Xc as apiCspPreset,y as animationGroupDirective,fj as analyzeVideo,fm as analyzeUsage,Al as analyzeTemplate,Bl as analyzeProject,fm as analyzeDirectiveUsage,Eb as analyticsDirective,Sn as addStore,Rn as addPage,$c as addNonceToInlineContent,Tn as addLayout,Qn as addComponent,En as actionRedirectResponse,Q as abortNavigation,p as a11yDirective,We as __setSignalsGeneratorsForTest,Wf as __setBuildIdForTest,Yi as VideoProcessorCache,kh as Validator,s as TransitionType,u as TransitionEase,t as TransitionDirection,Ac as Tokenizer,Zn as TemplateTypeChecker,yn as TEMPLATE_PRESETS,jc as StxValidationError,fc as StxSyntaxError,hc as StxSecurityError,gc as StxRuntimeError,ic as StxFileError,ec as StxError,Gq as Show,ie as SUSPENSE_RESOLVER_RUNTIME,ja as STX_RUNTIME_GLOBALS,Ra as STX_AUTO_IMPORTS,Ka as STATE_DIR_ENV_VAR,B as SPRING_PRESETS,El as SPA_NAV_HEADER,sa as RUNTIME_OWNED_COLON_ATTRS,ua as RUNTIME_HANDLED_X_ATTRS,Fb as RESPONSE_STATUS_KEY,Gb as RESPONSE_HEADERS_KEY,oa as REACTIVE_RUNTIME_GLOBALS,Fn as ProductionBuild,Iq as Portal,On as PROJECT_TEMPLATES,ip as PRESETS,na as NON_CLIENT_PRIMITIVES,Eo as MemorySessionStore,ai as MIME_TYPES,Zh as MEDIA_DEFAULT_WIDTHS,$h as MEDIA_DEFAULT_FORMATS,Pl as LAYOUT_TYPES_FILE,Ni as ImageProcessorCache,Ck as ImageProcessingError,zo as HydrationRuntime,Kj as HotReloadServer,ha as HeatmapAggregator,_f as HTML_CLASS_MARKER,Zf as HTML_ATTRS_MARKER,zq as Fragment,Hq as For,Fl as FRAGMENT_CACHE_CONTROL,rc as ErrorLogger,Xb as ErrorCodes,Sj as EXTERNALIZED_ASSET_DIR,ok as DeployError,pk as DEFAULT_WIDTHS,v as DEFAULT_TRANSITION_OPTIONS,Ja as DEFAULT_STATE_DIR,rk as DEFAULT_QUALITY,qi as DEFAULT_PLACEHOLDER_OPTIONS,qk as DEFAULT_FORMATS,_h as DEFAULT_DPR_VALUES,qo as ComponentHMRHandler,ka as COMPONENT_SCOPE_LOCAL_GLOBALS,wa as COMPONENT_PASSTHROUGH_X_ATTRS,ma as COMPILE_TIME_ONLY_GLOBALS,ii as COMMON_SIZES,Nf as COLOR_MODE_BOOT_MARKER,Of as COLOR_MODE_BOOT_GLOBAL,Yf as CLOAK_STYLE,Bm as BroadcastServer,Am as Broadcast,Tf as BUILD_ID_META,Uf as BUILD_ID_HEADER,Ga as BROWSER_CORE_IMPORTS,ri as BLUR_UP_CSS,va as ALPINE_BRIDGE_X_ATTRS,Sq as $path};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{wg as a}from"./chunk-
|
|
2
|
+
import{wg as a}from"./chunk-ecyac25w.js";import"./chunk-qqfsm20p.js";import"./chunk-r7dd7c7y.js";import"./chunk-25de1sj7.js";import"./chunk-38ykv2gd.js";import"./chunk-4qq5wj04.js";import"./chunk-g8tce9rr.js";import"./chunk-ptcpaeem.js";import"./chunk-a8mnhryz.js";import"./chunk-dnhckx52.js";import"./chunk-jt8as8j8.js";import"./chunk-x84g0m0p.js";import"./chunk-5h5ydexj.js";import"./chunk-aw651z2y.js";import"./chunk-wj2trgsn.js";import"./chunk-0y6f4037.js";export{a as startProductionServer};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ag as t,Bg as e,Dg as b,Mg as JJ}from"./chunk-5qngxbmv.js";import{Bm as v,Sm as u,Tm as l,dp as o,km as y,lm as P,um as x,vp as g}from"./chunk-r7dd7c7y.js";import{Eu as s,Iu as OJ,bu as a}from"./chunk-aw651z2y.js";import{Su as R}from"./chunk-0y6f4037.js";import r from"fs";import B from"path";var{serve:IJ}=globalThis.Bun;function q(J,K,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(K)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function KJ(J){let K=J.headers.get("content-type")||"",Q={},X=(Z,$)=>{let G=Q[Z];if(G===void 0)Q[Z]=$;else if(Array.isArray(G))G.push($);else Q[Z]=[G,$]};if(K.includes("multipart/form-data")){let Z=await J.formData();for(let[$,G]of Z.entries())if(typeof G==="string")X($,G);return Q}if(K.includes("application/x-www-form-urlencoded")){for(let[Z,$]of new URLSearchParams(await J.text()).entries())X(Z,$);return Q}return Q}function f(J){if(!J)return!1;let K=J.toUpperCase();return K!=="GET"&&K!=="HEAD"}async function h(J,K={}){let Q=K.request,X=K.method??Q?.method;if(!Q||!f(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let Z={};try{Z=await KJ(Q)}catch{}let $=await J.action({request:Q,form:Z,params:K.params??{},query:J.query??{},cookies:K.cookies??{}});if($&&typeof $==="object"){let G=$,W=QJ(G.cookies),I=G.redirect;if(typeof I==="string"&&I)return{redirect:I,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:_,redirect:N,...U}=G;if(Object.assign(J,U),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function QJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let K=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){K.push(q(Q,X));continue}if(X&&typeof X==="object"){let Z=X;if(typeof Z.value!=="string")continue;K.push(q(Q,Z.value,Z))}}return K}function m(J,K=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let Z of K)X.append("Set-Cookie",Z);for(let[Z,$]of Object.entries(Q??{}))if(Z.toLowerCase()!=="location")X.set(Z,$);return new Response(null,{status:303,headers:X})}async function wJ(J,K={}){return(await c(J,K)).html}async function d(J,K={}){let{html:Q,context:X,redirect:Z,cookies:$}=await c(J,K),G=u(X),W=l(X);if(Z)return{html:Q,redirect:Z,cookies:$,status:G,headers:W};let{extractStreamBoundaries:I}=await import("./chunk-2pavh1yg.js"),_=I(X),N=J.streamTemplates;if(N&&Object.keys(N).length>0){let{processDirectives:U}=await import("./chunk-7qgnd7z8.js"),{defaultConfig:z}=await import("./chunk-m116b3d9.js"),O=X.streamBoundaries||{},w={...z,autoShell:!1},D=Object.keys(N).map((V)=>({id:V,render:async()=>{let F=typeof O[V]==="function"?await O[V]():void 0;return U(N[V],{...X,$boundary:F},J.sourceFile,w,new Set)}})),E=new Set(D.map((V)=>V.id));_=[...(_||[]).filter((V)=>!E.has(V.id)),...D]}return{html:Q,boundaries:_&&_.length>0?_:void 0,cookies:$,status:G,headers:W}}async function c(J,K){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};if(!J.hasServerScripts&&!P(J.html))return{html:J.html,context:Q};for(let $ of J.serverScriptContent)try{await g($,Q,J.sourceFile)}catch(G){console.warn(`[stx] Server script error in ${J.sourceFile}:`,G)}let X=await h(Q,{request:K.request,method:K.method,params:K.params??{},cookies:K.cookies??{}});if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!P(J.html))return{html:J.html,context:Q,cookies:X.cookies};let Z=new Map;for(let[$,G]of Object.entries(J.placeholders))if(G.expression)try{let W=v(G.expression,Q);if(G.type==="raw")Z.set($,W!==void 0&&W!==null?String(W):"");else Z.set($,W!==void 0&&W!==null?x(String(W)):"")}catch{Z.set($,"")}return{html:y(J.html,Z),context:Q,cookies:X.cookies}}async function AJ(J,K={}){if(!J.hasServerScripts&&!P(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};for(let Z of J.serverScriptContent)try{await g(Z,Q,J.sourceFile)}catch($){console.warn(`[stx] Server script error in ${J.sourceFile}:`,$)}if(!P(J.fragment))return J.fragment;let X=new Map;for(let[Z,$]of Object.entries(J.placeholders))if($.expression)try{let G=v($.expression,Q);if($.type==="raw")X.set(Z,G!==void 0&&G!==null?String(G):"");else X.set(Z,G!==void 0&&G!==null?x(String(G)):"")}catch{X.set(Z,"")}return y(J.fragment,X)}OJ();import C from"zlib";import{promisify as n}from"util";var XJ=n(C.brotliCompress),ZJ=n(C.gzip),$J=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],GJ=["text/event-stream","multipart/x-mixed-replace"],UJ=1024;function WJ(J){if(!J)return!1;let K=J.toLowerCase();if(GJ.some((Q)=>K.startsWith(Q)))return!1;return $J.some((Q)=>K.startsWith(Q))}function jJ(J){let K=new Map;for(let Q of J.split(",")){let[X,...Z]=Q.trim().split(";"),$=X.trim().toLowerCase();if(!$)continue;let G=1;for(let W of Z){let I=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(W);if(!I)continue;let _=Number.parseFloat(I[1]);if(Number.isFinite(_))G=_}K.set($,G)}return K}function YJ(J){if(!J)return null;let K=jJ(J),Q=K.get("*"),X=(Z)=>K.get(Z)??Q??0;if(X("br")>0)return"br";if(X("gzip")>0)return"gzip";return null}async function i(J,K,Q={}){if(K.headers.get("content-encoding"))return K;if(K.status===204||K.status===304||!K.body)return K;if(!WJ(K.headers.get("content-type")))return K;let X=YJ(J.headers.get("accept-encoding"));if(!X)return K;let Z;try{Z=new Uint8Array(await K.arrayBuffer())}catch{return K}let $=()=>new Response(Z,{status:K.status,statusText:K.statusText,headers:p(K.headers)});if(Z.length<(Q.threshold??UJ))return $();try{let G=X==="br"?await XJ(Z,{params:{[C.constants.BROTLI_PARAM_QUALITY]:Q.quality??5,[C.constants.BROTLI_PARAM_SIZE_HINT]:Z.length}}):await ZJ(Z);if(G.length>=Z.length)return $();let W=p(K.headers);return W.set("Content-Encoding",X),W.set("Content-Length",String(G.length)),new Response(G,{status:K.status,statusText:K.statusText,headers:W})}catch{return $()}}function p(J){let K=new Headers(J),Q=K.get("Vary");if(!Q)return K.set("Vary","Accept-Encoding"),K;if(!Q.split(",").some((Z)=>Z.trim().toLowerCase()==="accept-encoding"))K.set("Vary",`${Q}, Accept-Encoding`);return K}var _J={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function mJ(J={}){let K=B.resolve(J.outputDir||".output"),Q=J.port||3000,X=JJ(K);if(!X)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${X.routes.length} routes...`);let Z=new Map,$=new Map,G=new Map,W=new Map;for(let U of X.routes)try{let z=B.join(K,U.compiledPath),O=JSON.parse(await Bun.file(z).text());Z.set(U.pattern,O),G.set(U.pattern,s(O.html)),W.set(U.pattern,o(O.html));let w=B.join(K,U.fragmentPath);if(await Bun.file(w).exists())$.set(U.pattern,await Bun.file(w).text())}catch(z){console.warn(`[stx] Failed to load route ${U.pattern}:`,z)}let I=new Map,_=[];for(let U of X.routes)if(U.hasParams){let{regex:z,params:O}=a(U.pattern);_.push({regex:z,route:U,paramNames:O})}else I.set(U.pattern,U);let N=IJ({port:Q,async fetch(U){return i(U,await(async()=>{let O=new URL(U.url).pathname;if(J.onRequest){let j=await J.onRequest(U);if(j)return j}if(J.apiRoutes?.[O])return J.apiRoutes[O](U);if((U.method==="GET"||U.method==="HEAD")&&O!=="/"){let j=B.resolve(K,"public"),Y;try{Y=decodeURIComponent(O)}catch{Y=O}if(!Y.includes("\x00")){let L=B.resolve(j,`.${Y}`);if(L===j||L.startsWith(`${j}${B.sep}`))try{if(r.existsSync(L)&&r.statSync(L).isFile()){let M=B.extname(L).toLowerCase(),S=_J[M]||"application/octet-stream",H=O.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(O);return new Response(Bun.file(L),{headers:{"Content-Type":S,"Cache-Control":H?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let w=e(U),D=null,E={};if(D=I.get(O)||null,!D)for(let{regex:j,route:Y,paramNames:L}of _){let A=O.match(j);if(A){D=Y,L.forEach((M,S)=>{E[M]=A[S+1]});break}}if(!D){let j=I.get("/404")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}if(w){let j=$.get(D.pattern);if(j){let Y=G.get(D.pattern);return new Response(j,{headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...W.has(D.pattern)?{"X-STX-Runtime":W.get(D.pattern)?"true":"false"}:{},...Y?{"X-STX-Layout":Y.layout,"X-STX-Layout-Group":Y.group}:{},...b(),"Cache-Control":t}})}}let V=f(U.method),F=Z.get(D.pattern);if(!F){let j=I.get("/500")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(!V&&!F.hasServerScripts&&Object.keys(F.placeholders).length===0)return new Response(F.html,{status:F.status??200,headers:{"Content-Type":"text/html",...b(),"Cache-Control":"public, max-age=60"}});try{let{html:j,boundaries:Y,redirect:L,cookies:A,status:M,headers:S}=await d(F,{params:E,request:U,method:U.method});if(L)return m(L,A,S);if(Y&&Y.length>0){let{renderStreamingPage:T,streamToResponse:k}=await import("./chunk-2pavh1yg.js");return k(T(j,Y,{timeoutMs:30000}),{status:M??F.status??200,headers:{"Cache-Control":"no-cache",...S}})}let H=new Headers({"Content-Type":"text/html",...b(),"Cache-Control":"no-cache"});for(let T of A??[])H.append("Set-Cookie",T);for(let[T,k]of Object.entries(S??{}))H.set(T,k);return new Response(j,{status:M??F.status??200,headers:H})}catch(j){return console.error(`[stx] Hydration error for ${O}:`,j),new Response(F.html,{headers:{"Content-Type":"text/html"}})}})())}});return console.log(`[stx] Production server running at http://localhost:${Q}`),console.log(`[stx] Serving ${X.routes.length} routes (${Z.size} pre-loaded)`),{port:Q,stop:()=>N.stop()}}
|
|
2
|
+
import{Ag as t,Bg as e,Dg as b,Mg as JJ}from"./chunk-qqfsm20p.js";import{Bm as v,Sm as u,Tm as l,dp as o,km as y,lm as P,um as x,vp as g}from"./chunk-r7dd7c7y.js";import{Eu as s,Iu as OJ,bu as a}from"./chunk-aw651z2y.js";import{Su as R}from"./chunk-0y6f4037.js";import r from"fs";import B from"path";var{serve:IJ}=globalThis.Bun;function q(J,K,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(K)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function KJ(J){let K=J.headers.get("content-type")||"",Q={},X=(Z,$)=>{let G=Q[Z];if(G===void 0)Q[Z]=$;else if(Array.isArray(G))G.push($);else Q[Z]=[G,$]};if(K.includes("multipart/form-data")){let Z=await J.formData();for(let[$,G]of Z.entries())if(typeof G==="string")X($,G);return Q}if(K.includes("application/x-www-form-urlencoded")){for(let[Z,$]of new URLSearchParams(await J.text()).entries())X(Z,$);return Q}return Q}function f(J){if(!J)return!1;let K=J.toUpperCase();return K!=="GET"&&K!=="HEAD"}async function h(J,K={}){let Q=K.request,X=K.method??Q?.method;if(!Q||!f(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let Z={};try{Z=await KJ(Q)}catch{}let $=await J.action({request:Q,form:Z,params:K.params??{},query:J.query??{},cookies:K.cookies??{}});if($&&typeof $==="object"){let G=$,W=QJ(G.cookies),I=G.redirect;if(typeof I==="string"&&I)return{redirect:I,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:_,redirect:N,...U}=G;if(Object.assign(J,U),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function QJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let K=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){K.push(q(Q,X));continue}if(X&&typeof X==="object"){let Z=X;if(typeof Z.value!=="string")continue;K.push(q(Q,Z.value,Z))}}return K}function m(J,K=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let Z of K)X.append("Set-Cookie",Z);for(let[Z,$]of Object.entries(Q??{}))if(Z.toLowerCase()!=="location")X.set(Z,$);return new Response(null,{status:303,headers:X})}async function wJ(J,K={}){return(await c(J,K)).html}async function d(J,K={}){let{html:Q,context:X,redirect:Z,cookies:$}=await c(J,K),G=u(X),W=l(X);if(Z)return{html:Q,redirect:Z,cookies:$,status:G,headers:W};let{extractStreamBoundaries:I}=await import("./chunk-2pavh1yg.js"),_=I(X),N=J.streamTemplates;if(N&&Object.keys(N).length>0){let{processDirectives:U}=await import("./chunk-7qgnd7z8.js"),{defaultConfig:z}=await import("./chunk-m116b3d9.js"),O=X.streamBoundaries||{},w={...z,autoShell:!1},D=Object.keys(N).map((V)=>({id:V,render:async()=>{let F=typeof O[V]==="function"?await O[V]():void 0;return U(N[V],{...X,$boundary:F},J.sourceFile,w,new Set)}})),E=new Set(D.map((V)=>V.id));_=[...(_||[]).filter((V)=>!E.has(V.id)),...D]}return{html:Q,boundaries:_&&_.length>0?_:void 0,cookies:$,status:G,headers:W}}async function c(J,K){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};if(!J.hasServerScripts&&!P(J.html))return{html:J.html,context:Q};for(let $ of J.serverScriptContent)try{await g($,Q,J.sourceFile)}catch(G){console.warn(`[stx] Server script error in ${J.sourceFile}:`,G)}let X=await h(Q,{request:K.request,method:K.method,params:K.params??{},cookies:K.cookies??{}});if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!P(J.html))return{html:J.html,context:Q,cookies:X.cookies};let Z=new Map;for(let[$,G]of Object.entries(J.placeholders))if(G.expression)try{let W=v(G.expression,Q);if(G.type==="raw")Z.set($,W!==void 0&&W!==null?String(W):"");else Z.set($,W!==void 0&&W!==null?x(String(W)):"")}catch{Z.set($,"")}return{html:y(J.html,Z),context:Q,cookies:X.cookies}}async function AJ(J,K={}){if(!J.hasServerScripts&&!P(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};for(let Z of J.serverScriptContent)try{await g(Z,Q,J.sourceFile)}catch($){console.warn(`[stx] Server script error in ${J.sourceFile}:`,$)}if(!P(J.fragment))return J.fragment;let X=new Map;for(let[Z,$]of Object.entries(J.placeholders))if($.expression)try{let G=v($.expression,Q);if($.type==="raw")X.set(Z,G!==void 0&&G!==null?String(G):"");else X.set(Z,G!==void 0&&G!==null?x(String(G)):"")}catch{X.set(Z,"")}return y(J.fragment,X)}OJ();import C from"zlib";import{promisify as n}from"util";var XJ=n(C.brotliCompress),ZJ=n(C.gzip),$J=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],GJ=["text/event-stream","multipart/x-mixed-replace"],UJ=1024;function WJ(J){if(!J)return!1;let K=J.toLowerCase();if(GJ.some((Q)=>K.startsWith(Q)))return!1;return $J.some((Q)=>K.startsWith(Q))}function jJ(J){let K=new Map;for(let Q of J.split(",")){let[X,...Z]=Q.trim().split(";"),$=X.trim().toLowerCase();if(!$)continue;let G=1;for(let W of Z){let I=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(W);if(!I)continue;let _=Number.parseFloat(I[1]);if(Number.isFinite(_))G=_}K.set($,G)}return K}function YJ(J){if(!J)return null;let K=jJ(J),Q=K.get("*"),X=(Z)=>K.get(Z)??Q??0;if(X("br")>0)return"br";if(X("gzip")>0)return"gzip";return null}async function i(J,K,Q={}){if(K.headers.get("content-encoding"))return K;if(K.status===204||K.status===304||!K.body)return K;if(!WJ(K.headers.get("content-type")))return K;let X=YJ(J.headers.get("accept-encoding"));if(!X)return K;let Z;try{Z=new Uint8Array(await K.arrayBuffer())}catch{return K}let $=()=>new Response(Z,{status:K.status,statusText:K.statusText,headers:p(K.headers)});if(Z.length<(Q.threshold??UJ))return $();try{let G=X==="br"?await XJ(Z,{params:{[C.constants.BROTLI_PARAM_QUALITY]:Q.quality??5,[C.constants.BROTLI_PARAM_SIZE_HINT]:Z.length}}):await ZJ(Z);if(G.length>=Z.length)return $();let W=p(K.headers);return W.set("Content-Encoding",X),W.set("Content-Length",String(G.length)),new Response(G,{status:K.status,statusText:K.statusText,headers:W})}catch{return $()}}function p(J){let K=new Headers(J),Q=K.get("Vary");if(!Q)return K.set("Vary","Accept-Encoding"),K;if(!Q.split(",").some((Z)=>Z.trim().toLowerCase()==="accept-encoding"))K.set("Vary",`${Q}, Accept-Encoding`);return K}var _J={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function mJ(J={}){let K=B.resolve(J.outputDir||".output"),Q=J.port||3000,X=JJ(K);if(!X)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${X.routes.length} routes...`);let Z=new Map,$=new Map,G=new Map,W=new Map;for(let U of X.routes)try{let z=B.join(K,U.compiledPath),O=JSON.parse(await Bun.file(z).text());Z.set(U.pattern,O),G.set(U.pattern,s(O.html)),W.set(U.pattern,o(O.html));let w=B.join(K,U.fragmentPath);if(await Bun.file(w).exists())$.set(U.pattern,await Bun.file(w).text())}catch(z){console.warn(`[stx] Failed to load route ${U.pattern}:`,z)}let I=new Map,_=[];for(let U of X.routes)if(U.hasParams){let{regex:z,params:O}=a(U.pattern);_.push({regex:z,route:U,paramNames:O})}else I.set(U.pattern,U);let N=IJ({port:Q,async fetch(U){return i(U,await(async()=>{let O=new URL(U.url).pathname;if(J.onRequest){let j=await J.onRequest(U);if(j)return j}if(J.apiRoutes?.[O])return J.apiRoutes[O](U);if((U.method==="GET"||U.method==="HEAD")&&O!=="/"){let j=B.resolve(K,"public"),Y;try{Y=decodeURIComponent(O)}catch{Y=O}if(!Y.includes("\x00")){let L=B.resolve(j,`.${Y}`);if(L===j||L.startsWith(`${j}${B.sep}`))try{if(r.existsSync(L)&&r.statSync(L).isFile()){let M=B.extname(L).toLowerCase(),S=_J[M]||"application/octet-stream",H=O.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(O);return new Response(Bun.file(L),{headers:{"Content-Type":S,"Cache-Control":H?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let w=e(U),D=null,E={};if(D=I.get(O)||null,!D)for(let{regex:j,route:Y,paramNames:L}of _){let A=O.match(j);if(A){D=Y,L.forEach((M,S)=>{E[M]=A[S+1]});break}}if(!D){let j=I.get("/404")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}if(w){let j=$.get(D.pattern);if(j){let Y=G.get(D.pattern);return new Response(j,{headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...W.has(D.pattern)?{"X-STX-Runtime":W.get(D.pattern)?"true":"false"}:{},...Y?{"X-STX-Layout":Y.layout,"X-STX-Layout-Group":Y.group}:{},...b(),"Cache-Control":t}})}}let V=f(U.method),F=Z.get(D.pattern);if(!F){let j=I.get("/500")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(!V&&!F.hasServerScripts&&Object.keys(F.placeholders).length===0)return new Response(F.html,{status:F.status??200,headers:{"Content-Type":"text/html",...b(),"Cache-Control":"public, max-age=60"}});try{let{html:j,boundaries:Y,redirect:L,cookies:A,status:M,headers:S}=await d(F,{params:E,request:U,method:U.method});if(L)return m(L,A,S);if(Y&&Y.length>0){let{renderStreamingPage:T,streamToResponse:k}=await import("./chunk-2pavh1yg.js");return k(T(j,Y,{timeoutMs:30000}),{status:M??F.status??200,headers:{"Cache-Control":"no-cache",...S}})}let H=new Headers({"Content-Type":"text/html",...b(),"Cache-Control":"no-cache"});for(let T of A??[])H.append("Set-Cookie",T);for(let[T,k]of Object.entries(S??{}))H.set(T,k);return new Response(j,{status:M??F.status??200,headers:H})}catch(j){return console.error(`[stx] Hydration error for ${O}:`,j),new Response(F.html,{headers:{"Content-Type":"text/html"}})}})())}});return console.log(`[stx] Production server running at http://localhost:${Q}`),console.log(`[stx] Serving ${X.routes.length} routes (${Z.size} pre-loaded)`),{port:Q,stop:()=>N.stop()}}
|
|
3
3
|
export{WJ as lg,YJ as mg,i as ng,q as og,KJ as pg,f as qg,h as rg,m as sg,wJ as tg,d as ug,AJ as vg,mJ as wg};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{kg as a}from"./chunk-
|
|
2
|
+
import{kg as a}from"./chunk-pfm1325e.js";import"./chunk-r7dd7c7y.js";import"./chunk-25de1sj7.js";import"./chunk-38ykv2gd.js";import"./chunk-4qq5wj04.js";import"./chunk-g8tce9rr.js";import"./chunk-ptcpaeem.js";import"./chunk-a8mnhryz.js";import"./chunk-dnhckx52.js";import"./chunk-jt8as8j8.js";import"./chunk-x84g0m0p.js";import"./chunk-5h5ydexj.js";import"./chunk-aw651z2y.js";import"./chunk-wj2trgsn.js";import"./chunk-0y6f4037.js";export{a as buildApp};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{es as E}from"./chunk-r7dd7c7y.js";import{Su as D}from"./chunk-0y6f4037.js";import I from"path";async function M(k={}){let G=performance.now(),J=k.root||process.cwd(),j=await E(),q=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${q.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(q==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");A=await z({pagesDir:I.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,router:j.router,...k.ssg})}else{let{buildForProduction:z}=await import("./chunk-
|
|
2
|
+
import{es as E}from"./chunk-r7dd7c7y.js";import{Su as D}from"./chunk-0y6f4037.js";import I from"path";async function M(k={}){let G=performance.now(),J=k.root||process.cwd(),j=await E(),q=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${q.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(q==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");A=await z({pagesDir:I.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,router:j.router,...k.ssg})}else{let{buildForProduction:z}=await import("./chunk-4s2p4hry.js");B=await z({outputDir:".output",debug:k.debug,...k.ssr})}let H=Math.round(performance.now()-G);return{mode:q,ssg:A,ssr:B,duration:H}}
|
|
3
3
|
export{M as kg};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Aq as T,mm as E,nm as M}from"./chunk-r7dd7c7y.js";import{Fu as d,Hu as c,Iu as i}from"./chunk-aw651z2y.js";import{Pu as m,Su as p}from"./chunk-0y6f4037.js";var y=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function f(z,Q,F){let J={fullTag:F,content:Q,attrs:z};if(/\bserver\b/.test(z))return{...J,type:"server"};if(/\bdata-stx-scoped\b/.test(z))return{...J,type:"client"};if(y.test(Q))return{...J,type:"signals"};if(/\bclient\b/.test(z)||/\btype\s*=\s*["']module["']/.test(z)||/\bsrc\s*=/.test(z))return{...J,type:"client"};return{...J,type:"server"}}var g=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function P(z){let Q=[],F=[],J=[],$=0;while($<z.length){let Y=z.indexOf("<",$);if(Y===-1)break;let K=M(z,Y);if(K>Y){$=K;continue}let Z=E(z,Y);if(Z>Y){let B=z.slice(Y,Z),U=g.exec(B);if(U){let X=f(U[1],U[2],B);switch(X.type){case"signals":Q.push(X);break;case"client":F.push(X);break;case"server":J.push(X);break}}$=Z;continue}$=Y+(z.startsWith("<!--",Y)?4:1)}return{signals:Q,client:F,server:J}}var s="X-STX-Router",a="private, no-store";function R(z){return z.headers.get("X-STX-Router")==="true"}function u(z,Q){if(!z)return Q;return z.split(",").some((J)=>J.trim().toLowerCase()===Q.toLowerCase())?z:`${z}, ${Q}`}function t(z){return{Vary:u(z,"X-STX-Router")}}import L from"path";d();var h="stx-page-head:",o=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,I=null;function r(){if(I!==null)return I;try{let{getRouterScript:z}=(i(),m(c));I=`<script>${z()}</script>`}catch{I=""}return I}async function Yz(z,Q){if(Q===!1)return null;if(Q&&typeof Q==="string"){let J=L.resolve(z,Q);if(await Bun.file(J).exists())return J;return null}let F=L.join(z,"app.stx");if(await Bun.file(F).exists())return F;return null}async function Zz(z,Q){try{let F=await Bun.file(z).text(),J=F,$=F.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)J=$[1].trim();let Y=P(F),K=[...Y.client.map((j)=>j.fullTag),...Y.signals.map((j)=>j.fullTag)],Z=[],B=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,U;while((U=B.exec(F))!==null)Z.push(U[0]);let X=J;for(let j of Y.server)X=X.replace(j.fullTag,"");for(let j of Y.client)X=X.replace(j.fullTag,"");X=X.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let W="<!--__STX_PAGE_SLOT__-->";if(X=X.replace(/<slot\s*\/>/gi,W).replace(/<slot\s*>\s*<\/slot>/gi,W),!X.includes(W))return console.warn(`[stx] Shell ${z} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:q,extractVariables:k,defaultConfig:v,loadStxConfig:H}=await import("./chunk-
|
|
2
|
+
import{Aq as T,mm as E,nm as M}from"./chunk-r7dd7c7y.js";import{Fu as d,Hu as c,Iu as i}from"./chunk-aw651z2y.js";import{Pu as m,Su as p}from"./chunk-0y6f4037.js";var y=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function f(z,Q,F){let J={fullTag:F,content:Q,attrs:z};if(/\bserver\b/.test(z))return{...J,type:"server"};if(/\bdata-stx-scoped\b/.test(z))return{...J,type:"client"};if(y.test(Q))return{...J,type:"signals"};if(/\bclient\b/.test(z)||/\btype\s*=\s*["']module["']/.test(z)||/\bsrc\s*=/.test(z))return{...J,type:"client"};return{...J,type:"server"}}var g=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function P(z){let Q=[],F=[],J=[],$=0;while($<z.length){let Y=z.indexOf("<",$);if(Y===-1)break;let K=M(z,Y);if(K>Y){$=K;continue}let Z=E(z,Y);if(Z>Y){let B=z.slice(Y,Z),U=g.exec(B);if(U){let X=f(U[1],U[2],B);switch(X.type){case"signals":Q.push(X);break;case"client":F.push(X);break;case"server":J.push(X);break}}$=Z;continue}$=Y+(z.startsWith("<!--",Y)?4:1)}return{signals:Q,client:F,server:J}}var s="X-STX-Router",a="private, no-store";function R(z){return z.headers.get("X-STX-Router")==="true"}function u(z,Q){if(!z)return Q;return z.split(",").some((J)=>J.trim().toLowerCase()===Q.toLowerCase())?z:`${z}, ${Q}`}function t(z){return{Vary:u(z,"X-STX-Router")}}import L from"path";d();var h="stx-page-head:",o=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,I=null;function r(){if(I!==null)return I;try{let{getRouterScript:z}=(i(),m(c));I=`<script>${z()}</script>`}catch{I=""}return I}async function Yz(z,Q){if(Q===!1)return null;if(Q&&typeof Q==="string"){let J=L.resolve(z,Q);if(await Bun.file(J).exists())return J;return null}let F=L.join(z,"app.stx");if(await Bun.file(F).exists())return F;return null}async function Zz(z,Q){try{let F=await Bun.file(z).text(),J=F,$=F.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)J=$[1].trim();let Y=P(F),K=[...Y.client.map((j)=>j.fullTag),...Y.signals.map((j)=>j.fullTag)],Z=[],B=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,U;while((U=B.exec(F))!==null)Z.push(U[0]);let X=J;for(let j of Y.server)X=X.replace(j.fullTag,"");for(let j of Y.client)X=X.replace(j.fullTag,"");X=X.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let W="<!--__STX_PAGE_SLOT__-->";if(X=X.replace(/<slot\s*\/>/gi,W).replace(/<slot\s*>\s*<\/slot>/gi,W),!X.includes(W))return console.warn(`[stx] Shell ${z} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:q,extractVariables:k,defaultConfig:v,loadStxConfig:H}=await import("./chunk-4xr8099h.js"),w=await H(),A={__filename:z,__dirname:L.dirname(z)};for(let j of K){let N=j.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(N&&!j.includes("client")&&!j.includes('type="module"'))await k(N[1],A,z)}let V=await q(X,A,z,{...v,...w,...Q},new Set),G=V.indexOf(W);if(G===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:V.substring(0,G),afterSlot:V.substring(G+W.length),filePath:z,shellScripts:K,shellStyles:Z}}catch(F){return console.error(`[stx] Error processing shell ${z}:`,F),null}}function $z(z,Q,F){let J,$="",Y=Q.match(o);if(Y){Q=Q.replace(Y[0],"");try{let X=Buffer.from(Y[1],"base64").toString("utf8"),W=X.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(W)J=W[1].trim();$=X.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let K=F||J||"stx App",Z=r(),B="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Rf as p}from"./chunk-4zkv1vqh.js";import{Hg as a,Jg as JF,Kg as ZF,Lg as qF}from"./chunk-
|
|
2
|
+
import{Rf as p}from"./chunk-4zkv1vqh.js";import{Hg as a,Jg as JF,Kg as ZF,Lg as qF}from"./chunk-qqfsm20p.js";import{sj as C,tj as D}from"./chunk-ph5f8eev.js";import{Ek as QF,Fk as XF,Gk as YF}from"./chunk-58f0mthg.js";import{Dq as FF,Hq as c,Pm as u,bp as o,cs as n,es as N,gm as l,im as d,iq as e,wq as t}from"./chunk-r7dd7c7y.js";import{at as r}from"./chunk-ptcpaeem.js";import{Gu as S,Iu as WF}from"./chunk-aw651z2y.js";import G from"fs";import Z from"path";import{createHash as $F}from"crypto";WF();function g(J){return $F("sha256").update(J).digest("hex").slice(0,8)}function f(J=!1){let q=J?D():C(),z=g(q);return{content:q,filename:`runtime.${z}.js`,hash:z}}function m(){let J=S(),q=g(J);return{content:J,filename:`router.${q}.js`,hash:q}}function UF(J){return{runtimeTag:J.runtime?`<script src="/__stx/${J.runtime.filename}"></script>`:"",routerTag:J.router?`<script src="/__stx/${J.router.filename}"></script>`:"",cssTag:J.css?`<link rel="stylesheet" href="/__stx/${J.css.filename}">`:""}}import h from"path";import{createHash as GF}from"crypto";function VF(J={}){let q=new Set;return{context:new Proxy(J,{get(Q,X){if(X in Q)return Q[X];if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return},has(Q,X){if(X in Q)return!0;if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return!1}}),accessedKeys:q}}async function i(J,q,z={}){let Q=h.resolve(J),X=await Bun.file(Q).text(),I=GF("sha256").update(X).digest("hex").slice(0,16);l();let K={};try{K=await N()}catch{}let B=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(X))!==null){let $=k[1];if(/\bserver\b/.test($))B.push(k[2])}let W=new Set(B.flatMap(($)=>p($))),{context:E}=VF({__filename:Q,__dirname:h.dirname(Q),__stx_serverDeclared:W}),L=new Set,_={...n,...K,...z,buildMode:"compile",strict:!1},w=await c(X,E,Q,_,L),U=a(w),H=d();return{route:q,sourceFile:J,html:w,fragment:U,placeholders:H,hasServerScripts:B.length>0,serverScriptContent:B,dependencies:Array.from(L),contentHash:I,status:u(X),streamTemplates:E.__streamTemplates}}var kF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function s(J,q){let z=0,Q=0;if(!G.existsSync(J))return{copied:z,bytes:Q};G.mkdirSync(q,{recursive:!0});function X(I,K){let B=G.readdirSync(I,{withFileTypes:!0});for(let V of B){if(kF.has(V.name))continue;let k=Z.join(I,V.name),W=Z.join(K,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),X(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),z++,Q+=G.statSync(W).size}}}return X(J,q),{copied:z,bytes:Q}}async function lF(J={}){let q=Date.now(),z=Z.resolve(J.root||process.cwd()),Q=Z.resolve(z,J.outputDir||".output");console.log("[stx build] Starting production build...");let X={};try{X=await N()}catch{}let I=J.componentsDir??X.componentsDir??"components",K=J.partialsDir??X.partialsDir??"partials",B=J.layoutsDir??X.layoutsDir??"layouts",V=J.publicDir??X.publicDir??"public",k=X.app?.head||{},W=X.app?.colorMode,E=X.router?.container||"main";if(G.existsSync(Q))G.rmSync(Q,{recursive:!0});let L=[Z.join(Q,"public","__stx"),Z.join(Q,"public","assets"),Z.join(Q,"server","pages"),Z.join(Q,"server","fragments")];for(let Y of L)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let _=o(z),w=["components","layouts","partials"],U=_.filter((Y)=>{return!w.some((F)=>Y.pattern.startsWith(`/${F}/`)||Y.pattern===`/${F}`)});console.log(`[stx build] Found ${U.length} page routes (${_.length-U.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let H=f(J.debug),$=m();await Bun.write(Z.join(Q,"public","__stx",H.filename),H.content),await Bun.write(Z.join(Q,"public","__stx",$.filename),$.content),console.log(`[stx build] Runtime: ${H.filename} (${(H.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${$.filename} (${($.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let O=[],j=[];for(let Y of U)try{let F=await i(Y.filePath,Y.pattern,{componentsDir:I,partialsDir:K,layoutsDir:B,debug:J.debug});if(O.push(F),F.html=F.html.replace(/runtime\.__STX_HASH__\.js/g,H.filename).replace(/router\.__STX_HASH__\.js/g,$.filename),F.html=FF(F.html,k,{bodyScripts:[`<script src="/__stx/${$.filename}"></script>`],...W&&{colorMode:W}}),W)F.html=e(F.html,W);if(k.htmlAttrs)F.html=t(F.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(F.html)){let T=F.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(T&&T[1]){let P=T[1];F.html=F.html.replace(" "+P,""),F.html=F.html.replace(/<body([^>]*)>/,`<body$1 ${P}>`)}}F.html=F.html.replace(/<style data-crosswind="generated">[\s\S]*?<\/style>\s*/g,""),F.html=await r(F.html),F.fragment=JF(F.html,E);let y=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),b=Z.join("server","pages",`${y}.compiled.json`),A=Z.join("server","fragments",`${y}.html`);await Bun.write(Z.join(Q,b),JSON.stringify(F,null,2)),await Bun.write(Z.join(Q,A),F.fragment),j.push({pattern:Y.pattern,compiledPath:b,fragmentPath:A,isDynamic:F.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("[")}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(F){console.error(`[stx build] \u2717 ${Y.pattern}:`,F instanceof Error?F.message:F)}let M=Z.resolve(z,V);if(G.existsSync(M)){let{copied:Y,bytes:F}=s(M,Z.join(Q,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${V}/`)}let v=YF(z);if(v){let{copied:Y,bytes:F}=s(v,Z.join(Q,"public",XF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${QF}/`)}let R={runtime:H.filename,router:$.filename},zF=ZF(j,R,Q);qF(zF,Q);let x=Date.now()-q;return console.log(`
|
|
3
3
|
[stx build] Done in ${x}ms \u2014 ${O.length} pages compiled`),{pageCount:O.length,assets:R,outputDir:Q,duration:x}}
|
|
4
4
|
export{g as Hf,f as If,m as Jf,UF as Kf,i as Lf,lF as Mf};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ng as _$,og as K5}from"./chunk-
|
|
2
|
+
import{ng as _$,og as K5}from"./chunk-ecyac25w.js";import{Ag as U$,Bg as q6,Dg as Z1,Eg as y6,Fg as Q5,Gg as B$,Hg as L$,Ig as v6,Jg as g6,yg as y7}from"./chunk-qqfsm20p.js";import{Aj as p5,Cj as c5,vj as u1,wj as O1,xj as H1,yj as m$,zj as p$}from"./chunk-w95sp0k9.js";import{Wj as Y$,Xj as J$}from"./chunk-k6wnmjhf.js";import{yk as g5,zk as f5}from"./chunk-sr49fd8p.js";import{Fk as l7,Gk as i7}from"./chunk-58f0mthg.js";import{jl as Q1}from"./chunk-0ha9e1wt.js";import{An as F6,Dm as s$,Dp as m0,Hq as O0,Lm as x6,Pm as Z5,Rr as G$,Sm as N1,Tm as M1,Vq as Q6,Wq as E1,Zo as Z$,_q as p0,bm as b7,bp as X5,cn as c1,cs as E$,dm as X6,dp as S6,ep as z6,es as d0,fn as L6,fq as g7,fs as M0,js as V0,mq as P6,nn as n$,nq as b6,pn as o$,sn as l1,tm as u0,vp as j0,wn as t$,zn as Q$}from"./chunk-r7dd7c7y.js";import{Ps as B,Xs as W$,Ys as K$,at as o}from"./chunk-ptcpaeem.js";import{mt as S0}from"./chunk-dnhckx52.js";import{Au as w6,Bu as T6,Cu as C6,Eu as k6,Iu as A6,cu as $5,du as H6,hu as V6,iu as E6,xu as I6,yu as R6,zu as D6}from"./chunk-aw651z2y.js";import{Su as p}from"./chunk-0y6f4037.js";var l5={read:($)=>{try{return JSON.parse($)}catch{return $}},write:($)=>{return JSON.stringify($)}};function e7($,X,Q={}){let{storage:Z="local",serializer:Y=l5,mergeDefaults:J=!1,listenToStorageChanges:G=!0}=Q,W=new Set,K=typeof window<"u",_=()=>{if(!K)return null;return Z==="session"?sessionStorage:localStorage},U=()=>{let L=_();if(!L)return X;try{let H=L.getItem($);if(H===null)return X;let q=Y.read(H);if(J&&typeof X==="object"&&X!==null)return{...X,...q};return q}catch{return X}},F=(L)=>{let H=_();if(!H)return;try{if(L===null||L===void 0)H.removeItem($);else H.setItem($,Y.write(L))}catch(q){console.warn(`[useStorage] Failed to write key "${$}":`,q)}},z=U(),j=(L,H)=>{for(let q of W)try{q(L,H)}catch(A){console.error("[useStorage] Subscriber error:",A)}};if(K&&G){let L=(q)=>{if(q.key===$&&q.storageArea===_()){let A=z;try{z=q.newValue?Y.read(q.newValue):X}catch(N){console.warn(`[useStorage] Failed to read key "${$}" from a cross-tab update:`,N);return}j(z,A)}};window.addEventListener("storage",L);let H=globalThis.onDestroy;if(typeof H==="function")H(()=>window.removeEventListener("storage",L))}let O={get value(){return z},set value(L){let H=z;z=L,F(L),j(L,H)},get:()=>z,set:(L)=>{O.value=L},remove:()=>{let L=_();if(L){L.removeItem($);let H=z;z=X,j(X,H)}},subscribe:(L)=>{return W.add(L),L(z,void 0),()=>W.delete(L)}};return O}function i5($,X,Q,Z,Y={}){let{serializer:J=l5,mergeDefaults:G=!1,listenToStorageChanges:W=!0}=Y,K=typeof window<"u",_=()=>{if(!K)return null;return $==="session"?sessionStorage:localStorage},U=(j)=>{if(j===null||j===void 0)return Z;try{let O=J.read(j);if(G&&typeof Z==="object"&&Z!==null)return{...Z,...O};return O}catch(O){return console.warn(`[${X}] Failed to read key "${Q}":`,O),Z}},z=p5((()=>{let j=_();if(!j)return Z;try{return U(j.getItem(Q))}catch(O){return console.warn(`[${X}] Cannot read "${Q}":`,O),Z}})());if(c5(()=>{let j=z(),O=_();if(!O)return;try{if(j===null||j===void 0)O.removeItem(Q);else O.setItem(Q,J.write(j))}catch(L){console.warn(`[${X}] Cannot persist "${Q}":`,L)}}),K&&W){let j=(L)=>{if(L.key!==Q)return;if(L.storageArea&&L.storageArea!==_())return;z.set(U(L.newValue))};window.addEventListener("storage",j);let O=globalThis.onDestroy;if(typeof O==="function")O(()=>window.removeEventListener("storage",j))}return z}function $3($,X,Q){return i5("local","useLocalStorage",$,X,Q)}function X3($,X,Q){return i5("session","useSessionStorage",$,X,Q)}function Q3($="local"){if(typeof window>"u")return;($==="session"?sessionStorage:localStorage).clear()}function Z3($="local"){if(typeof window>"u")return[];let X=$==="session"?sessionStorage:localStorage;return Object.keys(X)}function Y3($="local"){if(typeof window>"u")return 0;let X=$==="session"?sessionStorage:localStorage,Q=0;for(let Z in X)if(Object.prototype.hasOwnProperty.call(X,Z))Q+=(Z.length+(X.getItem(Z)?.length||0))*2;return Q}var l=null;function d1($,X,Q=new WeakSet){if(Object.is($,X))return!0;if(typeof $!=="object"||typeof X!=="object"||$===null||X===null)return!1;if(Q.has($))return!0;if(Q.add($),$ instanceof Date&&X instanceof Date)return $.getTime()===X.getTime();if($ instanceof RegExp&&X instanceof RegExp)return $.source===X.source&&$.flags===X.flags;if(Array.isArray($)){if(!Array.isArray(X)||$.length!==X.length)return!1;for(let J=0;J<$.length;J++)if(!d1($[J],X[J],Q))return!1;return!0}if(Array.isArray(X))return!1;if($ instanceof Map){if(!(X instanceof Map)||$.size!==X.size)return!1;for(let[J,G]of $)if(!X.has(J)||!d1(G,X.get(J),Q))return!1;return!0}if(X instanceof Map)return!1;if($ instanceof Set){if(!(X instanceof Set)||$.size!==X.size)return!1;for(let J of $)if(!X.has(J))return!1;return!0}if(X instanceof Set)return!1;let Z=Object.keys($),Y=Object.keys(X);if(Z.length!==Y.length)return!1;for(let J of Z){if(!Object.prototype.hasOwnProperty.call(X,J))return!1;if(!d1($[J],X[J],Q))return!1}return!0}function BJ($){l=$}function LJ(){return l}function FJ(){return{isMounted:!1,isUnmounted:!1,hooks:{beforeMount:[],mounted:[],beforeUpdate:[],updated:[],beforeUnmount:[],unmounted:[]},effects:[],scope:J3()}}function J3(){return{refs:new Map,effects:new Set,cleanups:[]}}function zJ($){let X=new Set,Q=new Set,Z=$,Y=Symbol("ref"),J={get value(){let G=u1();if(G)Q.add(G);return Z},set value(G){if(!Object.is(G,Z)){let W=Z;Z=G;for(let K of X)K(G,W);for(let K of Q)if(m$())p$(K);else K()}},subscribe(G){return X.add(G),()=>{X.delete(G)}}};if(l)l.scope.refs.set(Y,J);return J}var a5=new WeakMap;function G3($){let X=a5.get($);if(X)return X;let Q=new Map,Z=(G)=>{let W=Q.get(G);if(!W)return;for(let K of[...W])if(m$())p$(K);else K()},Y=(G,W)=>{if(!Q.has(G))Q.set(G,new Set);return Q.get(G).add(W),()=>{Q.get(G)?.delete(W)}},J=new Proxy($,{get(G,W,K){let _=Reflect.get(G,W,K),U=u1();if(U)Y(W,U);if(_!==null&&typeof _==="object"&&!Array.isArray(_)){let F=Object.getPrototypeOf(_);if(F===Object.prototype||F===null)return G3(_)}return _},set(G,W,K,_){let U=Reflect.get(G,W,_),F=Reflect.set(G,W,K,_);if(!Object.is(K,U))Z(W);return F},deleteProperty(G,W){let K=Reflect.deleteProperty(G,W);return Z(W),K}});return a5.set($,J),J}function jJ($){let X,Q=!0,Z=new Set,Y=new Set,J=()=>{Q=!0,G()},G=()=>{if(Q){let K=X,_=O1(J);if(X=$(),H1(_),Q=!1,!Object.is(X,K)){for(let U of Z)U(X,K);for(let U of Y)U()}}},W=O1(J);return X=$(),Q=!1,H1(W),{get value(){let K=u1();if(K)Y.add(K);return G(),X},set value(K){console.warn("[stx] Computed properties are readonly")},subscribe(K){return Z.add(K),()=>{Z.delete(K)}}}}function W3($){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(()=>{requestAnimationFrame($)});return}setTimeout($,0)}function OJ($,X,Q={}){let{immediate:Z=!1,deep:Y=!1,flush:J="post"}=Q,G,W,K=!1,_=()=>{if(K)return;let O=j();if((Y?!d1(O,G):!Object.is(O,G))||Z)if(X(O,G),Y&&O!==null&&typeof O==="object")try{G=structuredClone(O)}catch{G=O}else G=O},U=(O)=>{if(J==="sync")O();else if(J==="pre")Promise.resolve().then(O);else W3(O)},F=!1,z=()=>{if(K||F)return;F=!0,U(()=>{F=!1,_()})},j=()=>{if(typeof $==="function"){let O=O1(z);try{return $()}finally{H1(O)}}return $.value};if(typeof $!=="function"){let O=$.subscribe(()=>{U(_)});W=()=>{K=!0,O()}}else W=()=>{K=!0};if(G=j(),Z)U(_);if(l)l.scope.cleanups.push(()=>W?.());return()=>W?.()}function HJ($,X,Q={}){let Z=[],Y=$.map((J)=>J.value);for(let J of $){let G=J.subscribe(()=>{let W=$.map((K)=>K.value);X(W,Y),Y=[...W]});Z.push(G)}if(Q.immediate){let J=$.map((G)=>G.value);X(J,Y)}return()=>{for(let J of Z)J()}}function AJ($){let X,Q=!1,Z=()=>{if(Q)return;if(X)X();let Y=O1(Z);X=$(),H1(Y)};if(Z(),l)l.scope.cleanups.push(()=>{if(Q=!0,X)X()});return()=>{if(Q=!0,X)X()}}function qJ($){if(l)l.hooks.beforeMount.push($);else console.warn("[stx] onBeforeMount called outside of component setup")}function NJ($){if(l)l.hooks.mounted.push($);else console.warn("[stx] onMounted called outside of component setup")}function MJ($){if(l)l.hooks.beforeUpdate.push($);else console.warn("[stx] onBeforeUpdate called outside of component setup")}function VJ($){if(l)l.hooks.updated.push($);else console.warn("[stx] onUpdated called outside of component setup")}function EJ($){if(l)l.hooks.beforeUnmount.push($);else console.warn("[stx] onBeforeUnmount called outside of component setup")}function IJ($){if(l)l.hooks.unmounted.push($);else console.warn("[stx] onUnmounted called outside of component setup")}async function n0($,X){let Q=$.hooks[X];for(let Z of Q)await Z()}async function RJ($){await n0($,"beforeMount"),$.isMounted=!0,await n0($,"mounted")}async function DJ($){if(!$.isMounted||$.isUnmounted)return;await n0($,"beforeUpdate"),await n0($,"updated")}async function wJ($){if($.isUnmounted)return;await n0($,"beforeUnmount");for(let X of $.scope.cleanups)X();$.isUnmounted=!0,await n0($,"unmounted")}function TJ(){return`
|
|
3
3
|
<script data-stx-client-runtime>
|
|
4
4
|
(function() {
|
|
5
5
|
'use strict';
|
|
@@ -1120,7 +1120,7 @@ ${H}`}if(O=await z6(O),W.forEach((L)=>Z.add(L)),Q.cache&&Q.cachePath){if(await J
|
|
|
1120
1120
|
<h1>Something went wrong</h1>
|
|
1121
1121
|
<p>An internal error occurred. Please try again later.</p>
|
|
1122
1122
|
</body>
|
|
1123
|
-
</html>`,loader:"html"}}})}};async function H4($,X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=Y0.resolve($);if(!H0.existsSync(W))return console.error(`${B.red}Error: File not found: ${B.bright}${W}${B.reset}`),!1;if(W.endsWith(".md"))return r$(W,X);else if(!W.endsWith(".stx"))return console.error(`${B.red}Error: Unsupported file type: ${B.bright}${W}${B.reset}. Only .stx and .md files are supported.`),!1;let K=S0(process.cwd(),"output");H0.mkdirSync(K,{recursive:!0}),console.log(`${B.blue}Building ${B.bright}${$}${B.reset}...`);let _=null,U=async()=>{try{let A={name:"public-assets",setup(I){I.onResolve({filter:/^\/(images|fonts|assets|public)\//},(w)=>{return{path:w.path,external:!0}})}},N=await Bun.build({entrypoints:[W],outdir:K,plugins:[A,X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!N.success)return console.error(`${B.red}Build failed:${B.reset}`,N.logs),!1;let V=N.outputs.find((I)=>I.path.endsWith(".html"));if(!V)return console.error(`${B.red}No HTML output found${B.reset}`),!1;return _=await Bun.file(V.path).text(),!0}catch(A){return console.error(`${B.red}Error building stx file:${B.reset}`,A),!1}};if(!await U())return!1;let z=Y0.dirname(W);await W$(z);let j=Q;try{if(j=await k0(Q),j!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${j} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let A=X.hmrPort||j+1;J=X$({wsPort:A,verbose:!1}),G=J.start(A)}let O={},L=null;try{let{loadStxConfig:A}=await import("./chunk-
|
|
1123
|
+
</html>`,loader:"html"}}})}};async function H4($,X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=Y0.resolve($);if(!H0.existsSync(W))return console.error(`${B.red}Error: File not found: ${B.bright}${W}${B.reset}`),!1;if(W.endsWith(".md"))return r$(W,X);else if(!W.endsWith(".stx"))return console.error(`${B.red}Error: Unsupported file type: ${B.bright}${W}${B.reset}. Only .stx and .md files are supported.`),!1;let K=S0(process.cwd(),"output");H0.mkdirSync(K,{recursive:!0}),console.log(`${B.blue}Building ${B.bright}${$}${B.reset}...`);let _=null,U=async()=>{try{let A={name:"public-assets",setup(I){I.onResolve({filter:/^\/(images|fonts|assets|public)\//},(w)=>{return{path:w.path,external:!0}})}},N=await Bun.build({entrypoints:[W],outdir:K,plugins:[A,X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!N.success)return console.error(`${B.red}Build failed:${B.reset}`,N.logs),!1;let V=N.outputs.find((I)=>I.path.endsWith(".html"));if(!V)return console.error(`${B.red}No HTML output found${B.reset}`),!1;return _=await Bun.file(V.path).text(),!0}catch(A){return console.error(`${B.red}Error building stx file:${B.reset}`,A),!1}};if(!await U())return!1;let z=Y0.dirname(W);await W$(z);let j=Q;try{if(j=await k0(Q),j!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${j} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let A=X.hmrPort||j+1;J=X$({wsPort:A,verbose:!1}),G=J.start(A)}let O={},L=null;try{let{loadStxConfig:A}=await import("./chunk-4xr8099h.js"),N=await A();if(N?.apiRouter)L=N?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(N?.apiRoutes){O=N.apiRoutes;let V=Object.keys(O).length;if(V>0)console.log(`${B.blue}Loaded ${B.bright}${V} API route${V>1?"s":""}${B.reset}`)}if(N?.broadcasting?.enabled)try{let{startBroadcasting:V,loadChannels:M}=await import("./chunk-3txrk37v.js"),I=N.broadcasting;await V(I);let w=I.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${w}/ws${B.reset}`);let C=Y0.join(process.cwd(),"channels.ts");if(H0.existsSync(C))try{let R=await M(C);console.log(`${B.blue}Loaded ${B.bright}${R} broadcast channel${R!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(R){console.warn(`${B.yellow}Failed to load channels.ts: ${R.message}${B.reset}`)}}catch(V){console.warn(`${B.yellow}Broadcasting failed to start: ${V.message}${B.reset}`)}}catch{}if(console.log(`${B.blue}Starting server on ${B.cyan}http://localhost:${j}/${B.reset}...`),Y)console.log(`${B.magenta}Hot reload enabled on ws://localhost:${G}${B.reset}`);let H=O4({port:j,async fetch(A){return _$(A,await(async()=>{let N=new URL(A.url);if(L)try{let C=await L.handleRequest(A);if(C.status!==404)return C}catch{}if(O[N.pathname])try{return await O[N.pathname](A)}catch(C){return new Response(JSON.stringify({error:C.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(N.pathname==="/")return(async()=>{let R=await o(_||"");if(Y)R=D0(R,G);if(X.native)if(R.includes("<head>"))R=R.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else if(R.includes("<html"))R=R.replace(/(<html[^>]*>)/,"$1<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>");else R="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+R;if(X.titlebarHidden)if(R.includes("<head>"))R=R.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else if(R.includes("<html"))R=R.replace(/(<html[^>]*>)/,"$1<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>");else R=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${R}`;return R})().then((R)=>new Response(R,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}}));let V=Y0.join(K,N.pathname);if(H0.existsSync(V)&&H0.statSync(V).isFile()){let C=Bun.file(V),R=Y0.extname(V).toLowerCase(),E="text/plain";if(R===".ts"||R===".tsx"){let h=new Bun.Transpiler({loader:R===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(R){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}let M=Y0.dirname(W),I=Y0.join(M,N.pathname);if(H0.existsSync(I)&&H0.statSync(I).isFile()){let C=Bun.file(I),R=Y0.extname(I).toLowerCase(),E="text/plain";if(R===".ts"||R===".tsx"){let h=new Bun.Transpiler({loader:R===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(R){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".svg":E="image/svg+xml";break;case".ico":E="image/x-icon";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}let w=Y0.join(process.cwd(),"public",N.pathname);if(H0.existsSync(w)&&H0.statSync(w).isFile()){let C=Bun.file(w),R=Y0.extname(w).toLowerCase(),E="application/octet-stream";if(R===".ts"||R===".tsx"){let h=new Bun.Transpiler({loader:R===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(R){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".svg":E="image/svg+xml";break;case".ico":E="image/x-icon";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}return new Response("Not Found",{status:404})})())},error(A){return new Response(`<pre>${A}
|
|
1124
1124
|
${A.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});console.clear(),console.log(`
|
|
1125
1125
|
${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
|
|
1126
1126
|
${B.bright}\u2192 ${B.cyan}http://localhost:${j}/${B.reset}`),console.log(`
|
|
@@ -1607,7 +1607,7 @@ ${O.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});console.clear(),con
|
|
|
1607
1607
|
${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
|
|
1608
1608
|
${B.bright}\u2192 ${B.cyan}http://localhost:${U}/${B.reset}`),console.log(`
|
|
1609
1609
|
${B.yellow}Routes:${B.reset}`);let z=new Set(W.map((O)=>O.routeTemplate)),j=Object.entries(G).filter(([O])=>!z.has(O)).sort(([O],[L])=>O.localeCompare(L)).map(([O,L])=>({route:O==="/"?"/":O,filePath:Q0.relative(process.cwd(),L.filePath),fileType:L.fileType}));for(let O of W){let L=O.routeTemplate.replace(/\[([^\]]+)\]/g,":$1");j.push({route:L,filePath:Q0.relative(process.cwd(),O.filePath),fileType:"stx"})}if(j.sort((O,L)=>O.route.localeCompare(L.route)),j.forEach((O,L)=>{let q=L===j.length-1?"\u2514\u2500 ":"\u251C\u2500 ",A=O.fileType==="md"?`${B.magenta}(markdown)${B.reset}`:"";console.log(` ${B.green}${q}${O.route}${B.reset} \u2192 ${B.bright}${O.filePath}${B.reset} ${A}`)}),console.log(`
|
|
1610
|
-
Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),x0(F.url.toString(),()=>{if(Z)P0.watch(J,{recursive:!0}).close();F.stop()}),Z){console.log(`${B.blue}Watching for changes...${B.reset}`);let O=P0.watch(J,{recursive:!0},async(L,H)=>{if(!H)return;if(H.endsWith(".stx")||H.endsWith(".js")||H.endsWith(".ts")||H.endsWith(".md"))console.log(`${B.yellow}File ${B.bright}${H}${B.yellow} changed, rebuilding...${B.reset}`),m0.clear(),p0(),await K()});process.on("SIGINT",()=>{O.close(),F.stop(),process.exit(0)})}return!0}function O6($){return String($??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var{serve:N4}=globalThis.Bun;import J0 from"fs";import g from"path";async function M6($){try{return Z5(await Bun.file($).text())}catch{return}}function e$($){let X=Bun.file($),Q=g.extname($).toLowerCase(),Z={".html":"text/html",".css":"text/css",".js":"text/javascript",".json":"application/json",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"},J=[".js",".css",".json"].includes(Q)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(X,{headers:{"Content-Type":Z[Q]||"application/octet-stream",...J}})}async function M4($=".",X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=g.resolve($),{loadStxConfig:K}=await import("./chunk-7a7jy8yr.js"),_=await K(W),U=_.root&&_.root!=="."?g.join(W,_.root):W,F=X.pagesDir||_.pagesDir||"pages",z=g.join(U,F);if(!J0.existsSync(z))return console.error(`${B.red}Error: No '${F}' directory found${B.reset}`),console.log(`${B.dim}Looked in: ${B.bright}${z}${B.reset}`),console.log(`${B.dim}Run stx dev from the app directory, pass it as an argument (stx dev <dir>),${B.reset}`),console.log(`${B.dim}point at another directory with --pages <dir>, or set pagesDir in stx.config.ts.${B.reset}`),console.log(`${B.dim}Starting fresh? Create ${F}/index.stx for the homepage.${B.reset}`),!1;let j=X5(U,{pagesDir:F});if(j.length===0)return console.error(`${B.red}Error: No page files found in ${B.bright}${z}${B.reset}`),!1;console.log(`${B.blue}Found ${B.bright}${j.length}${B.blue} routes${B.reset}`);let O=_?._pluginPageDirs||[],L=[];for(let{dir:D,prefix:T}of O)if(J0.existsSync(D)){let x=X5(g.dirname(D),{pagesDir:g.basename(D)});for(let S of x){let b=T==="/"?S.pattern:`${T}${S.pattern==="/"?"":S.pattern}`;L.push({route:{...S,pattern:b},prefix:T})}if(x.length>0)console.log(`${B.blue}Plugin pages: ${B.bright}${x.length}${B.blue} routes at ${B.cyan}${T}${B.reset}`)}let H=new Map,q=null,A=null;if(X.stxOptions?.shell!==!1){if(A=await y6(W,X.stxOptions?.shell),A){if(q=await Q5(A,X.stxOptions||{}),q)console.log(`${B.blue}Using app shell: ${B.bright}${g.relative(W,A)}${B.reset} ${B.dim}(deprecated: use layouts/default.stx instead)${B.reset}`)}}I6(),await D6(W);let N=R6();if(N.length>0)console.log(`${B.blue}Loaded ${B.bright}${N.length}${B.blue} middleware: ${B.dim}${N.join(", ")}${B.reset}`);let V={},M=null;try{let{loadStxConfig:D}=await import("./chunk-7a7jy8yr.js"),T=await D(W);if(T?.apiRouter)M=T?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(T?.apiRoutes){V=T.apiRoutes;let x=Object.keys(V).length;if(x>0)console.log(`${B.blue}Loaded ${B.bright}${x} API route${x>1?"s":""}${B.reset}`)}if(T?.broadcasting?.enabled)try{let{startBroadcasting:x,loadChannels:S}=await import("./chunk-3txrk37v.js"),b=T.broadcasting;await x(b);let _0=b.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${_0}/ws${B.reset}`);let K0=g.join(process.cwd(),"channels.ts");if(J0.existsSync(K0))try{let C0=await S(K0);console.log(`${B.blue}Loaded ${B.bright}${C0} broadcast channel${C0!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(C0){console.warn(`${B.yellow}Failed to load channels.ts: ${C0.message}${B.reset}`)}}catch(x){console.warn(`${B.yellow}Broadcasting failed to start: ${x.message}${B.reset}`)}}catch{}let I=S0(W,"output");J0.mkdirSync(I,{recursive:!0});let w=new Map,C=new Set,R=async(D)=>{let T=V6(z,D);if(!T)return null;try{let x=await Bun.build({entrypoints:[T],outdir:I,plugins:[X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!x.success)return null;let S=x.outputs.find((b)=>b.path.endsWith(".html"));if(!S)return null;return await Bun.file(S.path).text()}catch{return null}},E=new Map,h=async(D,T)=>{try{let{processDirectives:x,extractVariables:S,defaultConfig:b,loadStxConfig:_0,injectRouterScript:K0}=await import("./chunk-7a7jy8yr.js"),{checkCache:C0,cacheTemplate:u$,readFileCached:r,templateCache:f1}=await import("./chunk-xezfdh27.js"),h1=await _0(W),k=(d)=>{if(!d)return d;if(g.isAbsolute(d))return d;return g.resolve(W,d)},y={...b,...h1,...X.stxOptions,autoShell:!0};if(X.debugDirectives)y.debug=!0;y.partialsDir=k(y.partialsDir),y.componentsDir=k(y.componentsDir),y.layoutsDir=k(y.layoutsDir),y.storesDir=k(y.storesDir||"stores"),y.cachePath=k(y.cachePath)??S0(W,"cache");let m=!T&&!X.profile,c=y.cache!==!1;if(c&&m){let d=f1.get(D.filePath);if(d)try{if((await J0.promises.stat(D.filePath)).mtime.getTime()<=d.mtime){let z0=!0;for(let $0 of d.dependencies){if(!J0.existsSync($0)){z0=!1;break}if((await J0.promises.stat($0)).mtime.getTime()>d.mtime){z0=!1;break}}if(z0){let $0=d.output;if(q)$0=L$($0,{preserveHead:!0});let j1=E.get(D.filePath);return{route:D,content:$0,status:j1?.status??await M6(D.filePath),headers:j1?.headers}}}}catch{}let L0=await C0(D.filePath,y);if(L0){let F0=L0;if(q)F0=L$(F0,{preserveHead:!0});let z0=E.get(D.filePath);return{route:D,content:F0,status:z0?.status??await M6(D.filePath),headers:z0?.headers}}}let s=c?await r(D.filePath):await Bun.file(D.filePath).text(),v=Z5(s),{classifyAllScripts:U0}=await import("./chunk-7a7jy8yr.js"),B0=U0(s),a=B0.server.map((d)=>d.content),e=s;for(let d of B0.server)e=e.replace(d.fullTag,"");let n={__filename:D.filePath,__dirname:g.dirname(D.filePath),params:T??{},__stx_runtime_head:{}};for(let d of a)try{await S(d,n,D.filePath)}catch(L0){if(X.stxOptions?.debug)console.error("[stx] variable extraction error",D.filePath,L0?.message||L0)}let r0=new Set,N0;if(X.profile){let d=performance.now();N0=await x(e,n,D.filePath,y,r0);let L0=performance.now()-d,F0=g.relative(W,D.filePath)||D.filePath;console.log(`[stx:profile] ${F0} \u2192 ${L0.toFixed(2)}ms`)}else N0=await x(e,n,D.filePath,y,r0);if(!q)N0=await K0(N0,{router:y.router});{let{interpolateScriptExpressions:d}=await import("./chunk-0x022m9m.js");N0=N0.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(L0,F0,z0)=>{if(!/function\s+__stx_setup_/.test(z0))return L0;return`<script${F0}>${d(z0,n)}</script>`})}if(q)N0=L$(N0,{preserveHead:!0});if(c&&m)await u$(D.filePath,N0,r0,y);let{extractStreamBoundaries:t7}=await import("./chunk-2pavh1yg.js"),s0=t7(n),z1=n.__streamTemplates;if(z1&&typeof z1==="object"&&Object.keys(z1).length>0){let d=n.streamBoundaries||{},L0={...y,autoShell:!1},F0=Object.keys(z1).map(($0)=>({id:$0,render:async()=>{let j1=typeof d[$0]==="function"?await d[$0]():void 0;return x(z1[$0],{...n,$boundary:j1},D.filePath,L0,new Set)}})),z0=new Set(F0.map(($0)=>$0.id));s0=[...(s0||[]).filter(($0)=>!z0.has($0.id)),...F0]}if(s0&&s0.length>0)C.add(D.pattern);else s0=void 0;let u5=N1(n),m5=M1(n);if(m)E.set(D.filePath,{status:u5,headers:m5});return{route:D,content:N0,status:u5??v,headers:m5,boundaries:s0}}catch(x){return console.error(`${B.red}Error building ${B.bright}${D.pattern}${B.reset}:`,x),null}},u=8,t=async()=>{w.clear(),H.clear();for(let D=0;D<j.length;D+=u){let T=j.slice(D,D+u),x=await Promise.all(T.map((S)=>h(S)));for(let S of x)if(S)w.set(S.route.pattern,S)}for(let D=0;D<L.length;D+=u){let T=L.slice(D,D+u),x=await Promise.all(T.map(({route:S})=>h(S)));for(let S of x)if(S)H.set(S.route.pattern,S)}return w.size>0};if(console.log(`${B.blue}Building pages...${B.reset}`),!await t())return console.error(`${B.red}No pages were successfully built${B.reset}`),!1;await W$(W);let W0=Q;try{if(W0=await k0(Q),W0!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${W0} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let D=X.hmrPort||W0+1;J=X$({wsPort:D,verbose:!1}),G=J.start(D)}let v1=(D,T)=>{let S=`<script data-stx-route-params>(function(){var p=${JSON.stringify(T).replace(/</g,"\\u003C").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")};window.__stx_rp=p;if(window.stx){window.stx._rp=p;if(window.stx.setRouteParams)window.stx.setRouteParams(p)}})()</script>`;if(D.includes("</head>"))return D.replace("</head>",`${S}</head>`);if(D.includes("<body"))return D.replace(/<body([^>]*)>/,`<body$1>${S}`);return S+D};console.log(`${B.blue}Starting server...${B.reset}`);let g1=N4({port:W0,async fetch(D){let T=new URL(D.url),x=_?.publicDir||"public",S=g.join(W,x,T.pathname),b=g.join(W,T.pathname),_0=g.join(I,T.pathname),[K0,C0,u$]=await Promise.all([J0.promises.stat(S).catch(()=>null),J0.promises.stat(b).catch(()=>null),J0.promises.stat(_0).catch(()=>null)]);if(K0?.isFile())return e$(S);if(C0?.isFile())return e$(b);if(u$?.isFile())return e$(_0);if(T.pathname.startsWith("/_stx/component/")){let k=decodeURIComponent(T.pathname.slice(16));if(k)try{let y=`<${k} />`,m={...buildConfig,autoShell:!1},c=await processDirectives(y,{},g.join(W,"components",`${k}.stx`),m,new Set);return new Response(c,{headers:{"Content-Type":"text/html"}})}catch(y){return new Response(`<div class="stx-async-error">${y.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(T.pathname==="/_stx/img"){let{handleImageRequest:k}=await import("./chunk-c2mvr9z1.js"),y=await k(D,{publicDir:g.join(W,x),cacheDir:S0(W,"cache","img")});if(y)return y}if(M)try{let k=await M.handleRequest(D);if(k.status!==404)return k}catch{}if(V[T.pathname])try{return await V[T.pathname](D)}catch(k){return new Response(JSON.stringify({error:k.message}),{status:500,headers:{"Content-Type":"application/json"}})}let r=$5(T.pathname,j);if(r){let k=w.get(r.route.pattern),y=C.has(r.route.pattern);if(r.route.isDynamic&&Object.keys(r.params).length>0||y){let m=await h(r.route,r.params);if(m)k=m}if(k){let m=k.status??200,c=k.headers??{},s=(r.route.filePath?x6(await Bun.file(r.route.filePath).text().catch(()=>"")):null)??{};if(s.validate){if(!await s.validate({params:r.params})){let B0=await R(404);if(B0){let a=B0;if(a=await o(a,W),Y)a=D0(a,G);return new Response(a,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(s.middleware){let U0=w6(T.pathname,r.params,s,T.search),B0=T6(U0,null,D,{isServer:!0}),a=await C6(s.middleware,B0);if(a.redirect){let e=a.redirect.path,n=a.redirect.options.redirectCode||302,r0=new Headers(a.responseHeaders);return r0.set("Location",e),new Response(null,{status:n,headers:r0})}if(a.abort){let{statusCode:e,message:n}=a.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${e}</title></head><body><h1>Error ${e}</h1><p>${n}</p></body></html>`,{status:e,headers:{"Content-Type":"text/html"}})}if(Object.keys(a.state).length>0){let e=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(a.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;k.content=k.content.replace("</head>",`${e}</head>`)}}let v=k.content;if(q&&v6(D)){let U0=k6(v),B0=S6(v),a=v.match(/<title[^>]*>([\s\S]*?)<\/title>/i),e=a?a[1].trim():"";if(Object.keys(r.params).length>0)v=v1(v,r.params);v=await o(v,W);let n=_?.router?.container||"main";return v=g6(v,n),new Response(v,{status:m,headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":U0.layout,"X-STX-Layout-Group":U0.group,"X-STX-Runtime":B0?"true":"false",...e&&{"X-STX-Title":encodeURIComponent(e)},[P6]:b6(),...Z1(),"Cache-Control":U$}})}if(q)v=B$(q,v);if(Object.keys(r.params).length>0)v=v1(v,r.params);if(v=await o(v,W),Y)v=D0(v,G);if(X.native)if(v.includes("<head>"))v=v.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else v="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+v;if(X.titlebarHidden)if(v.includes("<head>"))v=v.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else v=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${v}`;if(k.boundaries&&k.boundaries.length>0){let{renderStreamingPage:U0,streamToResponse:B0}=await import("./chunk-2pavh1yg.js");return B0(U0(v,k.boundaries,{timeoutMs:30000}),{status:m,headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(v,{status:m,headers:{"Content-Type":"text/html",...Z1(),"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0",...c}})}}if(L.length>0){let k=L.map((m)=>m.route),y=$5(T.pathname,k);if(y){let m=H.get(y.route.pattern);if(m){let c=m.content;if(q)c=B$(q,c);if(Object.keys(y.params).length>0)c=v1(c,y.params);if(c=await o(c,W),Y)c=D0(c,G);return new Response(c,{status:m.status??200,headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:m}of O)if(m!=="/"&&T.pathname.startsWith(m)){let c=H.get(m)||H.get(m+"/");if(c){let s=c.content;if(q)s=B$(q,s);if(s=await o(s,W),Y)s=D0(s,G);return new Response(s,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let f1=w.get("/");if(f1){let k=f1.content;if(k=await o(k,W),Y)k=D0(k,G);if(X.native)if(k.includes("<head>"))k=k.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else k="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+k;return new Response(k,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let h1=await R(404);if(h1){let k=h1;if(k=await o(k,W),Y)k=D0(k,G);return new Response(k,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(D){let T=await R(500);if(T)return new Response(T,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${D}
|
|
1610
|
+
Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),x0(F.url.toString(),()=>{if(Z)P0.watch(J,{recursive:!0}).close();F.stop()}),Z){console.log(`${B.blue}Watching for changes...${B.reset}`);let O=P0.watch(J,{recursive:!0},async(L,H)=>{if(!H)return;if(H.endsWith(".stx")||H.endsWith(".js")||H.endsWith(".ts")||H.endsWith(".md"))console.log(`${B.yellow}File ${B.bright}${H}${B.yellow} changed, rebuilding...${B.reset}`),m0.clear(),p0(),await K()});process.on("SIGINT",()=>{O.close(),F.stop(),process.exit(0)})}return!0}function O6($){return String($??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var{serve:N4}=globalThis.Bun;import J0 from"fs";import g from"path";async function M6($){try{return Z5(await Bun.file($).text())}catch{return}}function e$($){let X=Bun.file($),Q=g.extname($).toLowerCase(),Z={".html":"text/html",".css":"text/css",".js":"text/javascript",".json":"application/json",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"},J=[".js",".css",".json"].includes(Q)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(X,{headers:{"Content-Type":Z[Q]||"application/octet-stream",...J}})}async function M4($=".",X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=g.resolve($),{loadStxConfig:K}=await import("./chunk-4xr8099h.js"),_=await K(W),U=_.root&&_.root!=="."?g.join(W,_.root):W,F=X.pagesDir||_.pagesDir||"pages",z=g.join(U,F);if(!J0.existsSync(z))return console.error(`${B.red}Error: No '${F}' directory found${B.reset}`),console.log(`${B.dim}Looked in: ${B.bright}${z}${B.reset}`),console.log(`${B.dim}Run stx dev from the app directory, pass it as an argument (stx dev <dir>),${B.reset}`),console.log(`${B.dim}point at another directory with --pages <dir>, or set pagesDir in stx.config.ts.${B.reset}`),console.log(`${B.dim}Starting fresh? Create ${F}/index.stx for the homepage.${B.reset}`),!1;let j=X5(U,{pagesDir:F});if(j.length===0)return console.error(`${B.red}Error: No page files found in ${B.bright}${z}${B.reset}`),!1;console.log(`${B.blue}Found ${B.bright}${j.length}${B.blue} routes${B.reset}`);let O=_?._pluginPageDirs||[],L=[];for(let{dir:D,prefix:T}of O)if(J0.existsSync(D)){let x=X5(g.dirname(D),{pagesDir:g.basename(D)});for(let S of x){let b=T==="/"?S.pattern:`${T}${S.pattern==="/"?"":S.pattern}`;L.push({route:{...S,pattern:b},prefix:T})}if(x.length>0)console.log(`${B.blue}Plugin pages: ${B.bright}${x.length}${B.blue} routes at ${B.cyan}${T}${B.reset}`)}let H=new Map,q=null,A=null;if(X.stxOptions?.shell!==!1){if(A=await y6(W,X.stxOptions?.shell),A){if(q=await Q5(A,X.stxOptions||{}),q)console.log(`${B.blue}Using app shell: ${B.bright}${g.relative(W,A)}${B.reset} ${B.dim}(deprecated: use layouts/default.stx instead)${B.reset}`)}}I6(),await D6(W);let N=R6();if(N.length>0)console.log(`${B.blue}Loaded ${B.bright}${N.length}${B.blue} middleware: ${B.dim}${N.join(", ")}${B.reset}`);let V={},M=null;try{let{loadStxConfig:D}=await import("./chunk-4xr8099h.js"),T=await D(W);if(T?.apiRouter)M=T?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(T?.apiRoutes){V=T.apiRoutes;let x=Object.keys(V).length;if(x>0)console.log(`${B.blue}Loaded ${B.bright}${x} API route${x>1?"s":""}${B.reset}`)}if(T?.broadcasting?.enabled)try{let{startBroadcasting:x,loadChannels:S}=await import("./chunk-3txrk37v.js"),b=T.broadcasting;await x(b);let _0=b.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${_0}/ws${B.reset}`);let K0=g.join(process.cwd(),"channels.ts");if(J0.existsSync(K0))try{let C0=await S(K0);console.log(`${B.blue}Loaded ${B.bright}${C0} broadcast channel${C0!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(C0){console.warn(`${B.yellow}Failed to load channels.ts: ${C0.message}${B.reset}`)}}catch(x){console.warn(`${B.yellow}Broadcasting failed to start: ${x.message}${B.reset}`)}}catch{}let I=S0(W,"output");J0.mkdirSync(I,{recursive:!0});let w=new Map,C=new Set,R=async(D)=>{let T=V6(z,D);if(!T)return null;try{let x=await Bun.build({entrypoints:[T],outdir:I,plugins:[X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!x.success)return null;let S=x.outputs.find((b)=>b.path.endsWith(".html"));if(!S)return null;return await Bun.file(S.path).text()}catch{return null}},E=new Map,h=async(D,T)=>{try{let{processDirectives:x,extractVariables:S,defaultConfig:b,loadStxConfig:_0,injectRouterScript:K0}=await import("./chunk-4xr8099h.js"),{checkCache:C0,cacheTemplate:u$,readFileCached:r,templateCache:f1}=await import("./chunk-xezfdh27.js"),h1=await _0(W),k=(d)=>{if(!d)return d;if(g.isAbsolute(d))return d;return g.resolve(W,d)},y={...b,...h1,...X.stxOptions,autoShell:!0};if(X.debugDirectives)y.debug=!0;y.partialsDir=k(y.partialsDir),y.componentsDir=k(y.componentsDir),y.layoutsDir=k(y.layoutsDir),y.storesDir=k(y.storesDir||"stores"),y.cachePath=k(y.cachePath)??S0(W,"cache");let m=!T&&!X.profile,c=y.cache!==!1;if(c&&m){let d=f1.get(D.filePath);if(d)try{if((await J0.promises.stat(D.filePath)).mtime.getTime()<=d.mtime){let z0=!0;for(let $0 of d.dependencies){if(!J0.existsSync($0)){z0=!1;break}if((await J0.promises.stat($0)).mtime.getTime()>d.mtime){z0=!1;break}}if(z0){let $0=d.output;if(q)$0=L$($0,{preserveHead:!0});let j1=E.get(D.filePath);return{route:D,content:$0,status:j1?.status??await M6(D.filePath),headers:j1?.headers}}}}catch{}let L0=await C0(D.filePath,y);if(L0){let F0=L0;if(q)F0=L$(F0,{preserveHead:!0});let z0=E.get(D.filePath);return{route:D,content:F0,status:z0?.status??await M6(D.filePath),headers:z0?.headers}}}let s=c?await r(D.filePath):await Bun.file(D.filePath).text(),v=Z5(s),{classifyAllScripts:U0}=await import("./chunk-4xr8099h.js"),B0=U0(s),a=B0.server.map((d)=>d.content),e=s;for(let d of B0.server)e=e.replace(d.fullTag,"");let n={__filename:D.filePath,__dirname:g.dirname(D.filePath),params:T??{},__stx_runtime_head:{}};for(let d of a)try{await S(d,n,D.filePath)}catch(L0){if(X.stxOptions?.debug)console.error("[stx] variable extraction error",D.filePath,L0?.message||L0)}let r0=new Set,N0;if(X.profile){let d=performance.now();N0=await x(e,n,D.filePath,y,r0);let L0=performance.now()-d,F0=g.relative(W,D.filePath)||D.filePath;console.log(`[stx:profile] ${F0} \u2192 ${L0.toFixed(2)}ms`)}else N0=await x(e,n,D.filePath,y,r0);if(!q)N0=await K0(N0,{router:y.router});{let{interpolateScriptExpressions:d}=await import("./chunk-0x022m9m.js");N0=N0.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(L0,F0,z0)=>{if(!/function\s+__stx_setup_/.test(z0))return L0;return`<script${F0}>${d(z0,n)}</script>`})}if(q)N0=L$(N0,{preserveHead:!0});if(c&&m)await u$(D.filePath,N0,r0,y);let{extractStreamBoundaries:t7}=await import("./chunk-2pavh1yg.js"),s0=t7(n),z1=n.__streamTemplates;if(z1&&typeof z1==="object"&&Object.keys(z1).length>0){let d=n.streamBoundaries||{},L0={...y,autoShell:!1},F0=Object.keys(z1).map(($0)=>({id:$0,render:async()=>{let j1=typeof d[$0]==="function"?await d[$0]():void 0;return x(z1[$0],{...n,$boundary:j1},D.filePath,L0,new Set)}})),z0=new Set(F0.map(($0)=>$0.id));s0=[...(s0||[]).filter(($0)=>!z0.has($0.id)),...F0]}if(s0&&s0.length>0)C.add(D.pattern);else s0=void 0;let u5=N1(n),m5=M1(n);if(m)E.set(D.filePath,{status:u5,headers:m5});return{route:D,content:N0,status:u5??v,headers:m5,boundaries:s0}}catch(x){return console.error(`${B.red}Error building ${B.bright}${D.pattern}${B.reset}:`,x),null}},u=8,t=async()=>{w.clear(),H.clear();for(let D=0;D<j.length;D+=u){let T=j.slice(D,D+u),x=await Promise.all(T.map((S)=>h(S)));for(let S of x)if(S)w.set(S.route.pattern,S)}for(let D=0;D<L.length;D+=u){let T=L.slice(D,D+u),x=await Promise.all(T.map(({route:S})=>h(S)));for(let S of x)if(S)H.set(S.route.pattern,S)}return w.size>0};if(console.log(`${B.blue}Building pages...${B.reset}`),!await t())return console.error(`${B.red}No pages were successfully built${B.reset}`),!1;await W$(W);let W0=Q;try{if(W0=await k0(Q),W0!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${W0} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let D=X.hmrPort||W0+1;J=X$({wsPort:D,verbose:!1}),G=J.start(D)}let v1=(D,T)=>{let S=`<script data-stx-route-params>(function(){var p=${JSON.stringify(T).replace(/</g,"\\u003C").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")};window.__stx_rp=p;if(window.stx){window.stx._rp=p;if(window.stx.setRouteParams)window.stx.setRouteParams(p)}})()</script>`;if(D.includes("</head>"))return D.replace("</head>",`${S}</head>`);if(D.includes("<body"))return D.replace(/<body([^>]*)>/,`<body$1>${S}`);return S+D};console.log(`${B.blue}Starting server...${B.reset}`);let g1=N4({port:W0,async fetch(D){let T=new URL(D.url),x=_?.publicDir||"public",S=g.join(W,x,T.pathname),b=g.join(W,T.pathname),_0=g.join(I,T.pathname),[K0,C0,u$]=await Promise.all([J0.promises.stat(S).catch(()=>null),J0.promises.stat(b).catch(()=>null),J0.promises.stat(_0).catch(()=>null)]);if(K0?.isFile())return e$(S);if(C0?.isFile())return e$(b);if(u$?.isFile())return e$(_0);if(T.pathname.startsWith("/_stx/component/")){let k=decodeURIComponent(T.pathname.slice(16));if(k)try{let y=`<${k} />`,m={...buildConfig,autoShell:!1},c=await processDirectives(y,{},g.join(W,"components",`${k}.stx`),m,new Set);return new Response(c,{headers:{"Content-Type":"text/html"}})}catch(y){return new Response(`<div class="stx-async-error">${y.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(T.pathname==="/_stx/img"){let{handleImageRequest:k}=await import("./chunk-c2mvr9z1.js"),y=await k(D,{publicDir:g.join(W,x),cacheDir:S0(W,"cache","img")});if(y)return y}if(M)try{let k=await M.handleRequest(D);if(k.status!==404)return k}catch{}if(V[T.pathname])try{return await V[T.pathname](D)}catch(k){return new Response(JSON.stringify({error:k.message}),{status:500,headers:{"Content-Type":"application/json"}})}let r=$5(T.pathname,j);if(r){let k=w.get(r.route.pattern),y=C.has(r.route.pattern);if(r.route.isDynamic&&Object.keys(r.params).length>0||y){let m=await h(r.route,r.params);if(m)k=m}if(k){let m=k.status??200,c=k.headers??{},s=(r.route.filePath?x6(await Bun.file(r.route.filePath).text().catch(()=>"")):null)??{};if(s.validate){if(!await s.validate({params:r.params})){let B0=await R(404);if(B0){let a=B0;if(a=await o(a,W),Y)a=D0(a,G);return new Response(a,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(s.middleware){let U0=w6(T.pathname,r.params,s,T.search),B0=T6(U0,null,D,{isServer:!0}),a=await C6(s.middleware,B0);if(a.redirect){let e=a.redirect.path,n=a.redirect.options.redirectCode||302,r0=new Headers(a.responseHeaders);return r0.set("Location",e),new Response(null,{status:n,headers:r0})}if(a.abort){let{statusCode:e,message:n}=a.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${e}</title></head><body><h1>Error ${e}</h1><p>${n}</p></body></html>`,{status:e,headers:{"Content-Type":"text/html"}})}if(Object.keys(a.state).length>0){let e=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(a.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;k.content=k.content.replace("</head>",`${e}</head>`)}}let v=k.content;if(q&&v6(D)){let U0=k6(v),B0=S6(v),a=v.match(/<title[^>]*>([\s\S]*?)<\/title>/i),e=a?a[1].trim():"";if(Object.keys(r.params).length>0)v=v1(v,r.params);v=await o(v,W);let n=_?.router?.container||"main";return v=g6(v,n),new Response(v,{status:m,headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":U0.layout,"X-STX-Layout-Group":U0.group,"X-STX-Runtime":B0?"true":"false",...e&&{"X-STX-Title":encodeURIComponent(e)},[P6]:b6(),...Z1(),"Cache-Control":U$}})}if(q)v=B$(q,v);if(Object.keys(r.params).length>0)v=v1(v,r.params);if(v=await o(v,W),Y)v=D0(v,G);if(X.native)if(v.includes("<head>"))v=v.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else v="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+v;if(X.titlebarHidden)if(v.includes("<head>"))v=v.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else v=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${v}`;if(k.boundaries&&k.boundaries.length>0){let{renderStreamingPage:U0,streamToResponse:B0}=await import("./chunk-2pavh1yg.js");return B0(U0(v,k.boundaries,{timeoutMs:30000}),{status:m,headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(v,{status:m,headers:{"Content-Type":"text/html",...Z1(),"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0",...c}})}}if(L.length>0){let k=L.map((m)=>m.route),y=$5(T.pathname,k);if(y){let m=H.get(y.route.pattern);if(m){let c=m.content;if(q)c=B$(q,c);if(Object.keys(y.params).length>0)c=v1(c,y.params);if(c=await o(c,W),Y)c=D0(c,G);return new Response(c,{status:m.status??200,headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:m}of O)if(m!=="/"&&T.pathname.startsWith(m)){let c=H.get(m)||H.get(m+"/");if(c){let s=c.content;if(q)s=B$(q,s);if(s=await o(s,W),Y)s=D0(s,G);return new Response(s,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let f1=w.get("/");if(f1){let k=f1.content;if(k=await o(k,W),Y)k=D0(k,G);if(X.native)if(k.includes("<head>"))k=k.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else k="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+k;return new Response(k,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let h1=await R(404);if(h1){let k=h1;if(k=await o(k,W),Y)k=D0(k,G);return new Response(k,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(D){let T=await R(500);if(T)return new Response(T,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${D}
|
|
1611
1611
|
${D.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});if(console.clear(),console.log(`
|
|
1612
1612
|
${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
|
|
1613
1613
|
${B.bright}\u2192 ${B.cyan}http://localhost:${W0}/${B.reset}`),Y)console.log(`${B.dim} HMR: ws://localhost:${G}${B.reset}`);console.log(`
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
import{Ha as a,Ve as F,Xa as r,Xe as v,Ye as P,o as m,oa as l,pb as n,qb as p,re as s,sb as i,se as t,xb as e}from"./chunk-
|
|
3
|
+
import{Ha as a,Ve as F,Xa as r,Xe as v,Ye as P,o as m,oa as l,pb as n,qb as p,re as s,sb as i,se as t,xb as e}from"./chunk-w5b2bwxp.js";import"./chunk-ym3r8ktq.js";import"./chunk-bjj27mf3.js";import"./chunk-nqy2v6vh.js";import"./chunk-pbsfbgx7.js";import"./chunk-1n16xphq.js";import"./chunk-rkrnb0ec.js";import"./chunk-4zkv1vqh.js";import"./chunk-0j9hrzjj.js";import"./chunk-j59pkkzn.js";import"./chunk-pfm1325e.js";import"./chunk-ecyac25w.js";import"./chunk-qqfsm20p.js";import"./chunk-8pvymy12.js";import"./chunk-f5v2qf95.js";import"./chunk-k6st4606.js";import"./chunk-49kk0s96.js";import"./chunk-w3ycm4na.js";import"./chunk-7exqxjx5.js";import"./chunk-zr4emtxf.js";import"./chunk-74cv4ta1.js";import"./chunk-wcm80anz.js";import"./chunk-y7m2dpd3.js";import"./chunk-9y0g8kzt.js";import"./chunk-t6nseeb9.js";import"./chunk-xttsqmkm.js";import"./chunk-54st8g2j.js";import"./chunk-b3zes539.js";import"./chunk-new80es4.js";import"./chunk-9n0gvfrg.js";import"./chunk-7q9mwh4v.js";import"./chunk-refwkt87.js";import"./chunk-sne7938g.js";import"./chunk-ph5f8eev.js";import"./chunk-w95sp0k9.js";import"./chunk-k6wnmjhf.js";import"./chunk-qpsj28s2.js";import"./chunk-sr49fd8p.js";import"./chunk-58f0mthg.js";import{bl as u,cl as c}from"./chunk-tn2kwwy4.js";import"./chunk-0ha9e1wt.js";import{Dm as A}from"./chunk-r7dd7c7y.js";import{ss as f}from"./chunk-25de1sj7.js";import"./chunk-38ykv2gd.js";import"./chunk-4qq5wj04.js";import"./chunk-g8tce9rr.js";import"./chunk-ptcpaeem.js";import"./chunk-a8mnhryz.js";import"./chunk-dnhckx52.js";import"./chunk-jt8as8j8.js";import"./chunk-x84g0m0p.js";import"./chunk-5h5ydexj.js";import"./chunk-aw651z2y.js";import"./chunk-wj2trgsn.js";import{Su as B}from"./chunk-0y6f4037.js";import{spawn as o}from"child_process";import L from"fs";import zb from"os";import $ from"path";import w from"process";import{CLI as wb}from"@stacksjs/clapp";var N="0.2.265";var __dirname="/home/runner/work/stx/stx/packages/stx/bin",E=new wb("stx");function h(J){let Z=typeof J==="string"?Number.parseInt(J,10):J;if(Number.isNaN(Z))return{isValid:!1,error:"Port must be a valid number",suggestion:"Try using a number between 1024 and 65535"};if(Z<1024||Z>65535)return{isValid:!1,error:"Port must be between 1024 and 65535",suggestion:"Try using a port between 1024 and 65535"};return{isValid:!0}}function d(J){try{if(!L.existsSync(J)){let K=$.dirname(J),x=$.basename(J);if(L.existsSync(K)){let z=L.readdirSync(K).filter((j)=>j.toLowerCase().includes(x.toLowerCase().substring(0,3))||j.endsWith(".stx")||j.endsWith(".md")),k=z.length>0?`File not found. Similar files in ${K}: ${z.slice(0,3).join(", ")}`:`File not found. Directory ${K} exists but doesn't contain the specified file.`;return{isValid:!1,error:`File does not exist: ${J}`,suggestion:k}}return{isValid:!1,error:`File does not exist: ${J}`,suggestion:"Check the file path and try again"}}if(L.statSync(J).isDirectory())return{isValid:!1,error:`Expected file but got directory: ${J}`,suggestion:"Specify a .stx or .md file path"};return{isValid:!0}}catch(Z){return{isValid:!1,error:`Cannot access file: ${J}`,suggestion:"Check file permissions and path"}}}function y(J){let Z=typeof J==="string"?Number.parseInt(J,10):J;if(Number.isNaN(Z))return{isValid:!1,error:"Timeout must be a valid number",suggestion:"Specify timeout in milliseconds (e.g., 5000 for 5 seconds)"};if(Z<100)return{isValid:!1,error:"Timeout too short (minimum 100ms)",suggestion:"Use a timeout of at least 100ms"};if(Z>300000)return{isValid:!1,error:"Timeout too long (maximum 5 minutes)",suggestion:"Use a timeout of less than 300000ms (5 minutes)"};return{isValid:!0}}var V=(J)=>J.includes("*")||J.includes("?")||J.includes("{")||J.includes("["),jb=(J)=>J.endsWith(".stx")||J.endsWith(".md");function S(J,Z=1){if(console.error(`\u274C ${J.error}`),J.suggestion)console.error(`\uD83D\uDCA1 suggestion: ${J.suggestion}`);w.exit(Z)}function kb(J){if(!J)return;let Z;try{Z=JSON.parse(J)}catch(K){console.error(`\u274C --info-plist is not valid JSON: ${K.message}`),w.exit(1)}if(typeof Z!=="object"||Z===null||Array.isArray(Z))console.error(`\u274C --info-plist must be a JSON object, e.g. '{"NSFocusStatusUsageDescription":"\u2026"}'`),w.exit(1);for(let[K,x]of Object.entries(Z))if(typeof x!=="string"&&typeof x!=="number"&&typeof x!=="boolean")console.error(`\u274C --info-plist value for "${K}" must be a string, number or boolean`),w.exit(1);return Z}async function Hb(J,Z){try{let K=["test"],x=[];if(J&&J.length>0)for(let W of J)if(V(W))try{let H=await Array.fromAsync(new Bun.Glob(W).scan({onlyFiles:!0,absolute:!0}));if(H.length===0)console.warn(`Warning: No files found matching pattern: ${W}`);else if(x.push(...H),Z.verbose)console.log(`Found ${H.length} file(s) matching pattern: ${W}`)}catch(H){return console.error(`Error expanding glob pattern ${W}:`,H),!1}else x.push(W);if(x.length===0)return console.error("Error: No test files found matching the provided patterns."),!1;if(K.push(...x),Z.filter)K.push("--pattern",Z.filter);if(Z.timeout)K.push("--timeout",Z.timeout.toString());if(Z.reporter&&Z.reporter!=="default")if(Z.reporter==="junit"){let W=$.join(zb.tmpdir(),`stx-test-report-${Date.now()}.xml`);K.push("--reporter",Z.reporter),K.push("--reporter-outfile",W)}else console.warn(`Warning: Reporter '${Z.reporter}' is not supported. Using default reporter.`);if(Z.coverage)K.push("--coverage");if(Z.watch)K.push("--watch");K.push("--preload",$.join(__dirname,"../../../test-utils/happy-dom.ts"));let b={...w.env,STX_TEST_MODE:"true",STX_TEST_UI:Z.ui?"true":"false",STX_TEST_VERBOSE:Z.verbose?"true":"false"},z="bun";if(Z.verbose)console.log(`Running: ${z} ${K.join(" ")}`);let k=performance.now(),j=o(z,K,{stdio:"inherit",shell:!1,env:b});return new Promise((W)=>{j.on("close",(H)=>{let Y=((performance.now()-k)/1000).toFixed(2);if(H===0)W(!0);else W(!1)}),w.on("SIGINT",()=>{console.log(`
|
|
4
4
|
Test run interrupted`),j.kill("SIGINT"),w.exit(1)})})}catch(K){return console.error("Error running tests:",K instanceof Error?K.message:String(K)),!1}}var Qb=w.argv.length>=3&&(jb(w.argv[2])&&L.existsSync(w.argv[2])||V(w.argv[2]));if(Qb){let J=w.argv[2],Z={port:3000,watch:!0,cache:!0,markdown:{syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0}}};for(let K=3;K<w.argv.length;K++){let x=w.argv[K];if(x==="--port"&&K+1<w.argv.length){let b=h(w.argv[++K]);if(!b.isValid)S(b);Z.port=Number.parseInt(w.argv[K],10)}else if(x==="--no-watch")Z.watch=!1;else if(x==="--highlight-theme"&&K+1<w.argv.length){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.defaultTheme=w.argv[++K]}else if(x==="--no-highlight"){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.enabled=!1}else if(x==="--no-highlight-unknown"){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.highlightUnknownLanguages=!1}else if(x==="--no-cache")Z.cache=!1;else if(x==="--native")Z.native=!0}if(V(J))try{let K=await Array.fromAsync(new Bun.Glob(J).scan({onlyFiles:!0,absolute:!0})),x=J.endsWith(".stx")?K.filter((j)=>j.endsWith(".stx")):J.endsWith(".md")?K.filter((j)=>j.endsWith(".md")):K.filter((j)=>j.endsWith(".stx")||j.endsWith(".md")),b=J.split("*")[0].replace(/\/$/,"")||".",z=$.resolve(b);try{let j=new Bun.Glob("**/*.stx"),H=(await Array.fromAsync(j.scan({cwd:z,onlyFiles:!0,absolute:!0}))).filter((U)=>/\[.+\]/.test($.basename(U)));for(let U of H)if(!x.includes(U))x.push(U)}catch{}if(x.length===0)console.error(`Error: No STX or Markdown files found matching pattern: ${J}`),w.exit(1);if(!await v(x,Z))w.exit(1)}catch(K){console.error("Failed to process files:",K),w.exit(1)}else F(J,Z).catch((K)=>{console.error("Failed to start dev server:",K),w.exit(1)})}else{let J=function(x,b){let z=[];for(let k=0;k<=b.length;k++)z[k]=[k];for(let k=0;k<=x.length;k++)z[0][k]=k;for(let k=1;k<=b.length;k++)for(let j=1;j<=x.length;j++)if(b.charAt(k-1)===x.charAt(j-1))z[k][j]=z[k-1][j-1];else z[k][j]=Math.min(z[k-1][j-1]+1,z[k][j-1]+1,z[k-1][j]+1);return z[b.length][x.length]};E.command("docs","Generate documentation for components, templates, and directives").option("--output <dir>","Output directory for documentation",{default:"docs"}).option("--format <format>","Documentation format (markdown, html, json)",{default:"markdown"}).option("--components-dir <dir>","Components directory",{default:"components"}).option("--templates-dir <dir>","Templates directory",{default:"."}).option("--no-components","Disable components documentation").option("--no-templates","Disable templates documentation").option("--no-directives","Disable directives documentation").option("--extra-content <content>","Extra content to include in documentation").example("stx docs --output docs --format html").action(async(x)=>{try{if(await r(x))console.log("Documentation generated successfully."),w.exit(0);else console.error("Documentation generation failed."),w.exit(1)}catch(b){console.error("Error generating documentation:",b),w.exit(1)}}),E.command("iconify <command>","Generate Iconify icon packages").option("--output <dir>","Output directory for generated packages",{default:"packages"}).option("--icons <icons>","Comma-separated list of specific icons to generate").example("stx iconify list").example("stx iconify generate mdi").example("stx iconify generate lucide --icons home,settings,user").action(async(x,b)=>{try{let{fetchCollections:z,generatePackage:k}=await import("./chunk-va2wwrpf.js");if(x==="list"){console.log(`
|
|
5
5
|
\uD83D\uDCDA Fetching available icon collections...
|
|
6
6
|
`);let j=await z(),W=Object.entries(j).sort((H,U)=>U[1].total-H[1].total);console.log(`Available collections:
|
|
@@ -69,7 +69,7 @@ Total: ${H} issues in ${W} files`),b.output){let U=`
|
|
|
69
69
|
File not found: ${x}`),w.exit(1);if(!x.endsWith(".stx"))console.error(`
|
|
70
70
|
File must have .stx extension: ${x}`),w.exit(1)}let k=$.resolve(b.pages),j=$.resolve(b.out);if(!x&&!L.existsSync(k))console.error(`
|
|
71
71
|
Pages directory not found: ${k}`),console.log(`
|
|
72
|
-
Create a 'pages' directory with .stx files, or use --pages to specify a different directory.`),w.exit(1);let{buildApp:W}=await import("./chunk-
|
|
72
|
+
Create a 'pages' directory with .stx files, or use --pages to specify a different directory.`),w.exit(1);let{buildApp:W}=await import("./chunk-jftmdf4j.js");c();let H=await W({root:x?$.dirname(x):void 0,debug:b.verbose,ssg:{pagesDir:b.pages,outputDir:b.out,domain:b.domain,baseUrl:b.base,sitemap:b.sitemap,rss:b.rss,minify:b.minify,cache:b.cache!==!1,cleanOutput:b.clean,concurrency:Number.parseInt(b.concurrency,10)||10,publicDir:b.public,trailingSlash:b.trailingSlash,generate404:!0,hooks:b.verbose?{onPageStart:(Y)=>console.log(` Generating: ${Y}`),onPageEnd:(Y,Q)=>console.log(` Generated: ${Y} (${Q.length} bytes)`),onError:(Y,Q)=>console.error(` Error in ${Q}: ${Y.message}`)}:void 0},ssr:{outputDir:b.out==="dist"?".output":b.out,debug:b.verbose}}),U=((performance.now()-z)/1000).toFixed(2);if(H.mode==="ssr"&&H.ssr)console.log(`
|
|
73
73
|
Build complete! (SSR)
|
|
74
74
|
`),console.log(` Pages compiled: ${H.ssr.pageCount}`),console.log(` Output: ${H.ssr.outputDir}`),console.log(` Duration: ${U}s
|
|
75
75
|
`);else if(H.ssg){if(console.log(`
|
|
@@ -84,7 +84,7 @@ Total: ${H} issues in ${W} files`),b.output){let U=`
|
|
|
84
84
|
Build completed with ${H.ssg.failedCount} error(s). Fix the issues above and try again.
|
|
85
85
|
`),w.exit(1);console.log(" To preview locally:"),console.log(` cd ${b.out||"dist"} && npx serve
|
|
86
86
|
`)}}catch(z){console.error(`
|
|
87
|
-
Build failed:`,z instanceof Error?z.message:String(z)),w.exit(1)}}),E.command("start","Start the production server (serves pre-built .output/)").option("--port <number>","Server port",{default:"3000"}).option("--output <dir>","Output directory from stx build",{default:".output"}).example("stx start").example("stx start --port 8080").action(async(x)=>{try{let b=$.resolve(x.output);if(!L.existsSync($.join(b,"manifest.json")))console.error("\n No production build found. Run `stx build --out .output` first.\n"),w.exit(1);let{startProductionServer:z}=await import("./chunk-
|
|
87
|
+
Build failed:`,z instanceof Error?z.message:String(z)),w.exit(1)}}),E.command("start","Start the production server (serves pre-built .output/)").option("--port <number>","Server port",{default:"3000"}).option("--output <dir>","Output directory from stx build",{default:".output"}).example("stx start").example("stx start --port 8080").action(async(x)=>{try{let b=$.resolve(x.output);if(!L.existsSync($.join(b,"manifest.json")))console.error("\n No production build found. Run `stx build --out .output` first.\n"),w.exit(1);let{startProductionServer:z}=await import("./chunk-9v8be077.js");await z({outputDir:b,port:Number.parseInt(x.port,10)||3000})}catch(b){console.error(`
|
|
88
88
|
Failed to start production server:`,b instanceof Error?b.message:String(b)),w.exit(1)}}),E.command("deploy [directory]","Deploy built site to Netlify").option("--site-id <id>","Netlify site ID (or set NETLIFY_SITE_ID env var)").option("--token <token>","Auth token (or set NETLIFY_AUTH_TOKEN env var)").option("--production","Deploy to production (default: draft preview)").option("--message <msg>","Deploy message/title").option("--no-build","Skip build step before deploy").option("--open","Open deployed URL in browser").option("--dry-run","Preview deployment without uploading").option("--init","Initialize Netlify configuration for this project").example("stx deploy").example("stx deploy --production").example("stx deploy dist --site-id my-site-abc123").example("stx deploy --init").example("stx deploy --dry-run").action(async(x,b)=>{try{let{deploy:z,initNetlify:k,DeployError:j}=await import("./chunk-a90d3xne.js");if(console.log(`\x1B[1mstx deploy\x1B[0m \x1B[2mv${N}\x1B[0m`),b.init){console.log(`
|
|
89
89
|
\uD83D\uDCDD Initializing Netlify configuration...
|
|
90
90
|
`);let H=await k({directory:x||w.cwd(),siteId:b.siteId});if(console.log(`\u2713 Created ${H.configPath}`),H.siteId)console.log("\u2713 Saved site ID to .env.local");console.log(`
|
package/dist/ssg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Dk as Dq,yk as Bq,zk as Uq}from"./chunk-sr49fd8p.js";import{Ek as Iq,Fk as Eq,Gk as Tq}from"./chunk-58f0mthg.js";import{_k as Nq,bl as _q,cl as zq}from"./chunk-tn2kwwy4.js";import"./chunk-0ha9e1wt.js";import{Hq as P,Lm as Xq,Vp as Hq,bp as c,ep as Oq,es as l}from"./chunk-r7dd7c7y.js";import"./chunk-25de1sj7.js";import"./chunk-38ykv2gd.js";import"./chunk-4qq5wj04.js";import"./chunk-g8tce9rr.js";import{at as Aq}from"./chunk-ptcpaeem.js";import"./chunk-a8mnhryz.js";import{mt as m}from"./chunk-dnhckx52.js";import"./chunk-jt8as8j8.js";import"./chunk-x84g0m0p.js";import"./chunk-5h5ydexj.js";import{Au as jq,Bu as Gq,Cu as Lq,xu as Wq,yu as Yq,zu as Vq}from"./chunk-aw651z2y.js";import"./chunk-wj2trgsn.js";import{Su as w}from"./chunk-0y6f4037.js";import H from"fs";import j from"path";import{createHash as Sq}from"crypto";function vq(q){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(q).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return q}}var
|
|
2
|
+
import{Dk as Dq,yk as Bq,zk as Uq}from"./chunk-sr49fd8p.js";import{Ek as Iq,Fk as Eq,Gk as Tq}from"./chunk-58f0mthg.js";import{_k as Nq,bl as _q,cl as zq}from"./chunk-tn2kwwy4.js";import"./chunk-0ha9e1wt.js";import{Hq as P,Lm as Xq,Vp as Hq,bp as c,ep as Oq,es as l}from"./chunk-r7dd7c7y.js";import"./chunk-25de1sj7.js";import"./chunk-38ykv2gd.js";import"./chunk-4qq5wj04.js";import"./chunk-g8tce9rr.js";import{at as Aq}from"./chunk-ptcpaeem.js";import"./chunk-a8mnhryz.js";import{mt as m}from"./chunk-dnhckx52.js";import"./chunk-jt8as8j8.js";import"./chunk-x84g0m0p.js";import"./chunk-5h5ydexj.js";import{Au as jq,Bu as Gq,Cu as Lq,xu as Wq,yu as Yq,zu as Vq}from"./chunk-aw651z2y.js";import"./chunk-wj2trgsn.js";import{Su as w}from"./chunk-0y6f4037.js";import H from"fs";import j from"path";import{createHash as Sq}from"crypto";function vq(q){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(q).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return q}}var yq=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function xq(q){return Bun.hash(q).toString(16)}function Jq(q,Z={}){if(!q.includes('type="stx/island"'))return{html:q,chunks:[]};let $=new Map,Q=q.replace(yq,(J,W,z,X)=>{let N=X.trim();if(!N)return J;if(/\bdata-stx-src=/.test(z))return J;if(Z.minify)N=vq(N);let O=xq(N);if(!$.has(O))$.set(O,N);let B=Z.integrity?` data-stx-integrity="sha384-${Sq("sha384").update(N).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${W}" data-stx-src="/_stx/islands/${O}.js"${B}${z}></script>`}),K=Array.from($,([J,W])=>({hash:J,code:W}));return{html:Q,chunks:K}}var Pq=new Set(["visible","idle"]);function Qq(q){if(!q.includes("data-stx-src="))return q;let Z=new Map,$=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,Q;while((Q=$.exec(q))!==null)Z.set(Q[1],Q[2]);let K=new Set,J=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,W;while((W=J.exec(q))!==null)if(Pq.has(Z.get(W[1])||""))K.add(W[2]);let z=q.lastIndexOf("</head>");if(K.size===0||z===-1)return q;let X=Array.from(K).filter((N)=>!q.includes(`rel="prefetch" href="${N}"`)).map((N)=>`<link rel="prefetch" href="${N}" as="script">`).join("");if(!X)return q;return q.slice(0,z)+X+q.slice(z)}var Cq=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function u(q){let Z=q.trim();if(!Z)return null;let $=/^https?:\/\//i.test(Z)?Z:`https://${Z}`;try{return new URL($).origin+new URL($).pathname.replace(/\/$/,"")}catch{return null}}function gq(q){for(let Z of Cq){let $=q[Z];if(!$)continue;let Q=u($);if(Q)return{url:Q,source:"env",via:Z}}return null}function Zq(q){if(!q||typeof q!=="object")return null;let Z=q,$=Z.site?.url??Z.url??Z.app?.url;return typeof $==="string"?u($):null}async function fq(q){let{existsSync:Z}=await import("fs"),$=await import("path");for(let Q of["site.config.ts","site.config.js",".config/site.config.ts"]){let K=$.resolve(q,Q);if(!Z(K))continue;try{let J=await import(K),W=Zq(J.default??J);if(W)return W}catch{}}return null}async function $q(q={}){let Z=q.cwd??process.cwd(),$=q.env??process.env;if(q.explicit){let W=u(q.explicit);if(W)return{url:W,source:"option"}}let Q=Zq(q.stxConfig);if(Q)return{url:Q,source:"stx.config",via:"site.url"};let K=await fq(Z);if(K)return{url:K,source:"site.config",via:"url"};let J=gq($);if(J)return J;return{url:"http://localhost",source:"fallback"}}function Kq(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
|
|
3
3
|
`)}class Fq{cacheDir;cache=new Map;loaded=!1;salt;constructor(q,Z=""){this.cacheDir=q,this.salt=Z}async load(){if(this.loaded)return;let q=j.join(this.cacheDir,"build-cache.json");if(await Bun.file(q).exists())try{let Z=JSON.parse(await Bun.file(q).text());for(let[$,Q]of Object.entries(Z))this.cache.set($,Q)}catch{}this.loaded=!0}async save(){await H.promises.mkdir(this.cacheDir,{recursive:!0});let q=j.join(this.cacheDir,"build-cache.json"),Z={};for(let[$,Q]of this.cache)Z[$]=Q;await Bun.write(q,JSON.stringify(Z))}getHash(q,Z){let $=H.statSync(q),Q=`${this.salt}|${q}:${$.mtimeMs}`;for(let J of Z)if(H.existsSync(J)){let W=H.statSync(J);Q+=`:${J}:${W.mtimeMs}`}let K=0;for(let J=0;J<Q.length;J++){let W=Q.charCodeAt(J);K=(K<<5)-K+W,K=K&K}return Math.abs(K).toString(36)}get(q,Z){let $=this.cache.get(q);if(!$)return null;let Q=this.getHash(Z,$.dependencies??[]);if($.hash!==Q)return this.cache.delete(q),null;return $.html}set(q,Z,$,Q){let K=this.getHash(Z,$);this.cache.set(q,{hash:K,html:Q,generatedAt:Date.now(),dependencies:$})}}class Rq{cacheDir;constructor(q){this.cacheDir=q}getFilePath(q){let Z=q.replace(/[^a-zA-Z0-9]/g,"_")+".json";return j.join(this.cacheDir,"isr",Z)}async get(q){let Z=this.getFilePath(q);if(!await Bun.file(Z).exists())return null;try{return JSON.parse(await Bun.file(Z).text())}catch{return null}}async set(q,Z){let $=this.getFilePath(q);await H.promises.mkdir(j.dirname($),{recursive:!0}),await Bun.write($,JSON.stringify(Z))}async invalidate(q){let Z=this.getFilePath(q);if(await Bun.file(Z).exists())await H.promises.unlink(Z)}async invalidatePattern(q){let Z=j.join(this.cacheDir,"isr");if(!H.existsSync(Z))return;let $=await H.promises.readdir(Z);for(let Q of $){let K=Q.replace(/_/g,"/").replace(".json","");if(q.test(K))await H.promises.unlink(j.join(Z,Q))}}async needsRevalidation(q){let Z=await this.get(q);if(!Z)return!0;return Date.now()>Z.revalidateAfter}}async function mq(q){try{let $=(await Bun.file(q).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!$)return null;let Q=$[1];if(!Q.includes("getStaticPaths"))return null;let K=Q.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!K)return null;return await Function(`
|
|
4
4
|
return (async function getStaticPaths() {
|
|
5
5
|
${K[1]}
|
|
@@ -41,13 +41,13 @@ ${q.map((Q)=>{let K=new URL(Q.loc,Z).href,J=` <url>
|
|
|
41
41
|
${$.join(`
|
|
42
42
|
`)}
|
|
43
43
|
</channel>
|
|
44
|
-
</rss>`}async function oq(q={}){let Z=Date.now();zq();let $=await l(process.cwd()),Q=$.build||{},K=await $q({explicit:q.domain||Q.domain,stxConfig:$});if(K.source==="fallback"&&(q.sitemap??Q.sitemap??!0))console.warn(Kq());let J={pagesDir:q.pagesDir||Q.pagesDir||"pages",outputDir:q.outputDir||Q.outputDir||"dist",baseUrl:q.baseUrl||Q.baseUrl||"/",domain:K.url,revalidate:q.revalidate??Q.revalidate??!1,sitemap:q.sitemap??Q.sitemap??!0,sitemapExclude:q.sitemapExclude||Q.sitemapExclude||[],robots:q.robots??Q.robots??!0,rss:q.rss??Q.rss??!1,concurrency:q.concurrency||Q.concurrency||10,cache:q.cache??Q.cache??!0,cacheDir:q.cacheDir||Q.cacheDir||m(process.cwd(),"ssg-cache"),contentLoaders:q.contentLoaders||[],hooks:q.hooks||{},minify:q.minify??Q.minify??!0,generate404:q.generate404??Q.generate404??!0,publicDir:q.publicDir||Q.publicDir||"public",trailingSlash:q.trailingSlash??Q.trailingSlash??!1,cleanOutput:q.cleanOutput??Q.cleanOutput??!0,cacheSalt:q.cacheSalt??"",partialsDir:q.partialsDir||$?.partialsDir||"",componentsDir:q.componentsDir||$?.componentsDir||"",failOnIncludeError:q.failOnIncludeError??!0,chunkIslands:q.chunkIslands===!0,prefetchIslands:q.prefetchIslands===!0,integrityIslands:q.integrityIslands===!0},W={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},z=new Set,X=0,N={},O={};await J.hooks.onBuildStart?.();try{if(J.cleanOutput&&H.existsSync(J.outputDir))await H.promises.rm(J.outputDir,{recursive:!0});await H.promises.mkdir(J.outputDir,{recursive:!0});let _=J.cacheSalt;if(!_){let{resolveUserCrosswindConfig:Y,fingerprintConfig:L}=await import("./chunk-4w3gg4g7.js");try{_=L(await Y(process.cwd()))}catch{}}let G=new Fq(J.cacheDir,_);if(J.cache)await G.load();try{let{generateCrosswindCSS:Y}=await import("./chunk-4w3gg4g7.js");await Y('<div class="bg-black"></div>')}catch{}Wq();let b=$?.routeMiddleware?.dir||"middleware";await Vq(process.cwd(),b);let p=Yq();if(p.length>0)console.log(`Loaded ${p.length} middleware: ${p.join(", ")}`);let kq=$?.routeMiddleware?.global||[];Dq($?.layoutsDir,m(process.cwd()));let n=c(".",{pagesDir:J.pagesDir});console.log(`Found ${n.length} routes`);let C=[];for(let Y of n){let L=await pq(Y);for(let A of L)C.push({route:Y,url:A.url,params:A.params,props:A.props,revalidate:A.revalidate??J.revalidate})}W.totalPages=C.length;try{let{warmImagePlaceholders:Y}=await import("./chunk-yjk7vyd8.js"),{stateDir:L}=await import("./chunk-2qbde7w2.js"),A=await Y(J.publicDir,{cachePath:L(process.cwd(),"image-placeholders.json")});if(A>0)console.log(`Derived ${A} image placeholder(s)`)}catch{}console.log(`Generating ${W.totalPages} pages...`);let S=[],i=[];for(let Y=0;Y<C.length;Y+=J.concurrency)i.push(C.slice(Y,Y+J.concurrency));for(let Y of i)await Promise.all(Y.map(async(L)=>{let{route:A,url:V,params:v,props:wq,revalidate:a}=L;try{await J.hooks.onPageStart?.(V);let F=await Bun.file(A.filePath).text(),R=eq(F),bq=R?.middleware?Array.isArray(R.middleware)?R.middleware:[R.middleware]:[],r=[...kq,...bq];if(r.length>0){let D=jq(V,v,R||{}),M=Gq(D,null,void 0,{isServer:!0}),E=await Lq(r,M);if(E.redirect){let U=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,
|
|
44
|
+
</rss>`}async function oq(q={}){let Z=Date.now();zq();let $=await l(process.cwd()),Q=$.build||{},K=await $q({explicit:q.domain||Q.domain,stxConfig:$});if(K.source==="fallback"&&(q.sitemap??Q.sitemap??!0))console.warn(Kq());let J={router:q.router??$?.router??{},pagesDir:q.pagesDir||Q.pagesDir||"pages",outputDir:q.outputDir||Q.outputDir||"dist",baseUrl:q.baseUrl||Q.baseUrl||"/",domain:K.url,revalidate:q.revalidate??Q.revalidate??!1,sitemap:q.sitemap??Q.sitemap??!0,sitemapExclude:q.sitemapExclude||Q.sitemapExclude||[],robots:q.robots??Q.robots??!0,rss:q.rss??Q.rss??!1,concurrency:q.concurrency||Q.concurrency||10,cache:q.cache??Q.cache??!0,cacheDir:q.cacheDir||Q.cacheDir||m(process.cwd(),"ssg-cache"),contentLoaders:q.contentLoaders||[],hooks:q.hooks||{},minify:q.minify??Q.minify??!0,generate404:q.generate404??Q.generate404??!0,publicDir:q.publicDir||Q.publicDir||"public",trailingSlash:q.trailingSlash??Q.trailingSlash??!1,cleanOutput:q.cleanOutput??Q.cleanOutput??!0,cacheSalt:q.cacheSalt??"",partialsDir:q.partialsDir||$?.partialsDir||"",componentsDir:q.componentsDir||$?.componentsDir||"",failOnIncludeError:q.failOnIncludeError??!0,chunkIslands:q.chunkIslands===!0,prefetchIslands:q.prefetchIslands===!0,integrityIslands:q.integrityIslands===!0},W={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},z=new Set,X=0,N={},O={};await J.hooks.onBuildStart?.();try{if(J.cleanOutput&&H.existsSync(J.outputDir))await H.promises.rm(J.outputDir,{recursive:!0});await H.promises.mkdir(J.outputDir,{recursive:!0});let _=J.cacheSalt;if(!_){let{resolveUserCrosswindConfig:Y,fingerprintConfig:L}=await import("./chunk-4w3gg4g7.js");try{_=L(await Y(process.cwd()))}catch{}}let G=new Fq(J.cacheDir,_);if(J.cache)await G.load();try{let{generateCrosswindCSS:Y}=await import("./chunk-4w3gg4g7.js");await Y('<div class="bg-black"></div>')}catch{}Wq();let b=$?.routeMiddleware?.dir||"middleware";await Vq(process.cwd(),b);let p=Yq();if(p.length>0)console.log(`Loaded ${p.length} middleware: ${p.join(", ")}`);let kq=$?.routeMiddleware?.global||[];Dq($?.layoutsDir,m(process.cwd()));let n=c(".",{pagesDir:J.pagesDir});console.log(`Found ${n.length} routes`);let C=[];for(let Y of n){let L=await pq(Y);for(let A of L)C.push({route:Y,url:A.url,params:A.params,props:A.props,revalidate:A.revalidate??J.revalidate})}W.totalPages=C.length;try{let{warmImagePlaceholders:Y}=await import("./chunk-yjk7vyd8.js"),{stateDir:L}=await import("./chunk-2qbde7w2.js"),A=await Y(J.publicDir,{cachePath:L(process.cwd(),"image-placeholders.json")});if(A>0)console.log(`Derived ${A} image placeholder(s)`)}catch{}console.log(`Generating ${W.totalPages} pages...`);let S=[],i=[];for(let Y=0;Y<C.length;Y+=J.concurrency)i.push(C.slice(Y,Y+J.concurrency));for(let Y of i)await Promise.all(Y.map(async(L)=>{let{route:A,url:V,params:v,props:wq,revalidate:a}=L;try{await J.hooks.onPageStart?.(V);let F=await Bun.file(A.filePath).text(),R=eq(F),bq=R?.middleware?Array.isArray(R.middleware)?R.middleware:[R.middleware]:[],r=[...kq,...bq];if(r.length>0){let D=jq(V,v,R||{}),M=Gq(D,null,void 0,{isServer:!0}),E=await Lq(r,M);if(E.redirect){let U=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,x=qJ(String(U),V),k=JJ(V,J);await H.promises.mkdir(j.dirname(k),{recursive:!0}),await Bun.write(k,x),W.successCount++,W.pages.push({route:V,outputPath:k,size:Buffer.byteLength(x),cached:!1}),S.push({loc:V,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${V} \u2192 redirect to ${U}`);return}if(E.abort){let U=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${V} \u2014 middleware aborted: ${U}`);return}}let t=F.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(t)try{if(!await Function("route",`
|
|
45
45
|
const validate = ${t[1]};
|
|
46
46
|
return validate(route);
|
|
47
47
|
`)({params:v})){console.warn(`Validation failed for ${V}, skipping...`);return}}catch{}let I=null,e=!1;if(J.cache){if(I=G.get(V,A.filePath),I)e=!0,W.cachedCount++}if(!I){let D=await Mq(A,v,wq,J,$);if(I=D.html,J.failOnIncludeError&&D.includeFailures.length>0)throw Error(`${D.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
48
48
|
${D.includeFailures.join(`
|
|
49
49
|
`)}
|
|
50
|
-
Set ssg.failOnIncludeError to false to build anyway.`);if(J.cache)G.set(V,A.filePath,D.dependencies,I)}let
|
|
50
|
+
Set ssg.failOnIncludeError to false to build anyway.`);if(J.cache)G.set(V,A.filePath,D.dependencies,I)}let y;if(J.trailingSlash)y=j.join(J.outputDir,V,"index.html");else y=V==="/"?j.join(J.outputDir,"index.html"):j.join(J.outputDir,`${V}.html`);if(J.chunkIslands){let{html:D,chunks:M}=Jq(I,{integrity:J.integrityIslands,minify:J.minify});if(M.length>0){let E=j.join(J.outputDir,"_stx","islands");await H.promises.mkdir(E,{recursive:!0});for(let U of M){let x=j.join(E,`${U.hash}.js`);if(!await Bun.file(x).exists())await Bun.write(x,U.code);if(!z.has(U.hash)){z.add(U.hash);let k=Buffer.byteLength(U.code,"utf8");X+=k,N[U.hash]={bytes:k,file:`/_stx/islands/${U.hash}.js`}}}if(O[V]=M.map((U)=>U.hash),I=D,J.prefetchIslands)I=Qq(I)}}if(await H.promises.mkdir(j.dirname(y),{recursive:!0}),await Bun.write(y,I),!nq(V,I,R,J.sitemapExclude))S.push({loc:V,lastmod:new Date().toISOString().split("T")[0],priority:V==="/"?1:0.8});let qq={route:V,outputPath:y,size:Buffer.byteLength(I,"utf8"),cached:e};if(a!==!1)qq.revalidateAt=Date.now()+a*1000;W.pages.push(qq),W.successCount++,await J.hooks.onPageEnd?.(V,I)}catch(F){W.failedCount++,W.errors.push({route:V,error:F}),await J.hooks.onError?.(F,V),console.error(`Error generating ${V}:`,F)}}));let s=_q();if(s.length>0){let Y=s.map((L)=>`${L.filePath}: ${L.message}`).join(`
|
|
51
51
|
`);throw Error(`Client script bundling failed:
|
|
52
52
|
${Y}`)}if(J.cache)await G.save();if(J.generate404){let Y=j.join(J.pagesDir,"404.stx");if(await Bun.file(Y).exists()){let L=new Set,A={...$,debug:!1,cache:!1},V=await P(await Bun.file(Y).text(),{},Y,A,L);await Bun.write(j.join(J.outputDir,"404.html"),V)}else await Bun.write(j.join(J.outputDir,"404.html"),`<!DOCTYPE html>
|
|
53
53
|
<html lang="en">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.265",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"dependencies": {
|
|
118
118
|
"@cwcss/crosswind": "^0.2.19",
|
|
119
119
|
"@stacksjs/clapp": "^0.2.14",
|
|
120
|
-
"@stacksjs/desktop": "0.2.
|
|
121
|
-
"@stacksjs/sanitizer": "0.2.
|
|
120
|
+
"@stacksjs/desktop": "0.2.265",
|
|
121
|
+
"@stacksjs/sanitizer": "0.2.265",
|
|
122
122
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
123
|
-
"bun-plugin-stx": "0.2.
|
|
123
|
+
"bun-plugin-stx": "0.2.265",
|
|
124
124
|
"bunfig": "^0.15.17",
|
|
125
|
-
"stx-router": "0.2.
|
|
125
|
+
"stx-router": "0.2.265",
|
|
126
126
|
"ts-broadcasting": "^0.0.9",
|
|
127
127
|
"ts-images": "^0.2.11",
|
|
128
128
|
"ts-syntax-highlighter": "^0.2.1"
|