@stacksjs/stx 0.2.231 → 0.2.232
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-0h46e2ng.js +2 -0
- package/dist/{chunk-0h08j951.js → chunk-17kxd17m.js} +1 -1
- package/dist/{chunk-z6ev72qj.js → chunk-1gdzz04h.js} +1 -1
- package/dist/{chunk-pw21r03f.js → chunk-1h0twjzw.js} +2 -2
- package/dist/{chunk-nstqd54d.js → chunk-1kg9sz9a.js} +1 -1
- package/dist/{chunk-zpvva2dh.js → chunk-1nztpv0g.js} +2 -2
- package/dist/chunk-1x91733n.js +2 -0
- package/dist/{chunk-pq6rgbbw.js → chunk-264rn67f.js} +2 -2
- package/dist/chunk-27m136s4.js +2 -0
- package/dist/{chunk-njc6sven.js → chunk-2fspj91j.js} +1 -1
- package/dist/{chunk-ge69r310.js → chunk-2tew0h6f.js} +1 -1
- package/dist/{chunk-f0yhv8yr.js → chunk-2v320r60.js} +2 -2
- package/dist/{chunk-m38wyaes.js → chunk-2w64hysh.js} +2 -2
- package/dist/chunk-33zg81y6.js +2 -0
- package/dist/{chunk-ep2agtrk.js → chunk-35ezbs7m.js} +1 -1
- package/dist/chunk-3j404s9z.js +2 -0
- package/dist/{chunk-vr04z80c.js → chunk-3sy1cf6v.js} +1 -1
- package/dist/{chunk-n58aem37.js → chunk-3zdkcdvf.js} +2 -2
- package/dist/{chunk-by2p4by1.js → chunk-4awxsp8f.js} +2 -2
- package/dist/{chunk-mjv4ar2y.js → chunk-5cjnfn8d.js} +1 -1
- package/dist/chunk-5k5qczgz.js +2 -0
- package/dist/{chunk-h2fq4ksg.js → chunk-5v3dv3xv.js} +2 -2
- package/dist/{chunk-dn8x6vf7.js → chunk-6ea3th9j.js} +155 -155
- package/dist/chunk-6k94kwfr.js +2 -0
- package/dist/{chunk-c9v94scd.js → chunk-6qhezn34.js} +1 -1
- package/dist/{chunk-kqjxwz6c.js → chunk-74r77tz1.js} +2 -2
- package/dist/chunk-7dznwvcy.js +2 -0
- package/dist/{chunk-bqdbf8k2.js → chunk-7kpfk426.js} +2 -2
- package/dist/chunk-7t4yc43k.js +2 -0
- package/dist/{chunk-vs7843yp.js → chunk-81zcv66r.js} +1 -1
- package/dist/{chunk-8hdb7abn.js → chunk-87rj95tw.js} +3 -3
- package/dist/{chunk-5mrs8cs2.js → chunk-8m7fhky6.js} +1 -1
- package/dist/{chunk-snktca7b.js → chunk-94fee5jw.js} +1 -1
- package/dist/{chunk-8tth46zf.js → chunk-9agksxkk.js} +2 -2
- package/dist/chunk-aeyrfcn5.js +2 -0
- package/dist/{chunk-w6h9c3f6.js → chunk-akm700yc.js} +1 -1
- package/dist/chunk-anc397f7.js +2 -0
- package/dist/chunk-b1rj6fk4.js +2 -0
- package/dist/{chunk-kf2w2xxb.js → chunk-b34x0v3f.js} +2 -2
- package/dist/{chunk-cq6fsp6j.js → chunk-b6jhznkh.js} +1 -1
- package/dist/{chunk-zdrpkrgc.js → chunk-bjs711qv.js} +1 -1
- package/dist/chunk-bnwpg6fg.js +2 -0
- package/dist/{chunk-z6e0b8wv.js → chunk-c5411vve.js} +2 -2
- package/dist/{chunk-m54yzzn8.js → chunk-cs1dc1n7.js} +1 -1
- package/dist/chunk-cv0z0qpy.js +2 -0
- package/dist/{chunk-e6tvnnnz.js → chunk-d19bydks.js} +1 -1
- package/dist/{chunk-4xzmg2xk.js → chunk-d2x4ma3m.js} +2 -2
- package/dist/chunk-ddqzxbkr.js +2 -0
- package/dist/chunk-dkt2rq3s.js +2 -0
- package/dist/{chunk-74pjj8d0.js → chunk-dq88kv1p.js} +1 -1
- package/dist/{chunk-e63m9jhd.js → chunk-dtfgxjy9.js} +4 -4
- package/dist/{chunk-d729yxzx.js → chunk-dvb8vgfe.js} +2 -2
- package/dist/chunk-dxepdtt2.js +2 -0
- package/dist/{chunk-d550gf3h.js → chunk-eb9caxff.js} +1 -1
- package/dist/chunk-ege2zbez.js +2 -0
- package/dist/{chunk-39hy7f4g.js → chunk-eqbr4jnw.js} +2 -2
- package/dist/{chunk-70v7vvry.js → chunk-evv58hf5.js} +1 -1
- package/dist/{chunk-v4rgwxs1.js → chunk-exaa3t0c.js} +2 -2
- package/dist/chunk-f3r3x3bh.js +2 -0
- package/dist/{chunk-82qd7jw1.js → chunk-f48gnx24.js} +1 -1
- package/dist/{chunk-6pzgmp1h.js → chunk-fexeqbkk.js} +2 -2
- package/dist/{chunk-8hnyynhv.js → chunk-fgfb9fs0.js} +1 -1
- package/dist/{chunk-c0n802j1.js → chunk-frp9fc7j.js} +1 -1
- package/dist/{chunk-swy03mg9.js → chunk-fvjh7rx0.js} +1 -1
- package/dist/{chunk-dxd830pt.js → chunk-fzxjrdnv.js} +1 -1
- package/dist/chunk-g5bhgv8m.js +2 -0
- package/dist/{chunk-vwwn4h5j.js → chunk-geztp3y3.js} +1 -1
- package/dist/{chunk-6345zcg6.js → chunk-gjapb8k6.js} +1 -1
- package/dist/{chunk-0yw0x5qz.js → chunk-gtek2yzx.js} +1 -1
- package/dist/{chunk-jewcmcaf.js → chunk-gzf1dg38.js} +2 -2
- package/dist/{chunk-xcac3tkq.js → chunk-hh6yxbyv.js} +1 -1
- package/dist/{chunk-rhkwswq0.js → chunk-hjdqejae.js} +1 -1
- package/dist/{chunk-a2ppgamd.js → chunk-hk8j3eps.js} +1 -1
- package/dist/{chunk-efr3ejqt.js → chunk-ht51fz7w.js} +1 -1
- package/dist/{chunk-jw1besrt.js → chunk-j93x5fzs.js} +1 -1
- package/dist/{chunk-z87q7ee7.js → chunk-jd90twtr.js} +1 -1
- package/dist/chunk-js0r6bc9.js +2 -0
- package/dist/{chunk-jcped0kt.js → chunk-jy6madxa.js} +1 -1
- package/dist/{chunk-wvc7t11n.js → chunk-kaet6r9w.js} +1 -1
- package/dist/chunk-mgexc8xe.js +2 -0
- package/dist/{chunk-dmzc008f.js → chunk-mxva4zmq.js} +1 -1
- package/dist/chunk-nebfw3pc.js +2 -0
- package/dist/{chunk-k6b7gpk2.js → chunk-nhmq45hh.js} +1 -1
- package/dist/{chunk-572ttrsj.js → chunk-ntnv2f7a.js} +1 -1
- package/dist/chunk-pe06ke3f.js +2 -0
- package/dist/{chunk-s88yt309.js → chunk-pv9at6r1.js} +1 -1
- package/dist/{chunk-nf4tx374.js → chunk-pwfqgvyf.js} +2 -2
- package/dist/chunk-q253eftn.js +2 -0
- package/dist/chunk-q9p451rb.js +2 -0
- package/dist/chunk-qh9bw4w4.js +2 -0
- package/dist/chunk-qj0jaw5s.js +2 -0
- package/dist/{chunk-exr6hs21.js → chunk-qpt60465.js} +1 -1
- package/dist/chunk-qq5xar6q.js +2 -0
- package/dist/{chunk-5ys0zfgp.js → chunk-qsdv9c1c.js} +2 -2
- package/dist/{chunk-m0sgdvnk.js → chunk-r23ycexh.js} +1 -1
- package/dist/{chunk-ncvd7673.js → chunk-r84h7wxw.js} +1 -1
- package/dist/{chunk-9edt3qh6.js → chunk-rbke5wqk.js} +1 -1
- package/dist/{chunk-7qx5ebq7.js → chunk-rmrxs0qz.js} +2 -2
- package/dist/chunk-s9669ak6.js +2 -0
- package/dist/{chunk-72w4hhbq.js → chunk-ssfhndm6.js} +1 -1
- package/dist/chunk-t68jcajf.js +2 -0
- package/dist/{chunk-6rjc6687.js → chunk-tbr46jye.js} +2 -2
- package/dist/chunk-tdj3gqaa.js +2 -0
- package/dist/{chunk-dn4gw490.js → chunk-ts9swsgf.js} +1 -1
- package/dist/chunk-ttmtwp1x.js +2 -0
- package/dist/{chunk-a6nnbnmb.js → chunk-tv4n71jy.js} +2 -2
- package/dist/{chunk-x7v6xqz9.js → chunk-v2qx1jrb.js} +1 -1
- package/dist/{chunk-z44ra321.js → chunk-v80629x2.js} +1 -1
- package/dist/{chunk-0vzvd62b.js → chunk-vgf3zdpb.js} +1 -1
- package/dist/{chunk-b72rxkbf.js → chunk-vw7h103c.js} +2 -2
- package/dist/{chunk-5d4csjhx.js → chunk-vzskgbqj.js} +1 -1
- package/dist/{chunk-58at6vf3.js → chunk-ww9sz124.js} +1 -1
- package/dist/{chunk-myh6j9ab.js → chunk-xaqjtned.js} +1 -1
- package/dist/{chunk-t0jzk81v.js → chunk-xgtcq9bj.js} +1 -1
- package/dist/{chunk-6t89bck2.js → chunk-xkeyq622.js} +1 -1
- package/dist/{chunk-ty6pj7b5.js → chunk-xvmvbkwy.js} +187 -185
- package/dist/{chunk-tgcbjer0.js → chunk-y7z44vr9.js} +2 -2
- package/dist/chunk-ymnt0ze7.js +2 -0
- package/dist/{chunk-6k9e6vfx.js → chunk-ypajs9wd.js} +1 -1
- package/dist/chunk-yqtc8ax6.js +2 -0
- package/dist/{chunk-q891e1vj.js → chunk-yx8vftp0.js} +1 -1
- package/dist/{chunk-d62d38ss.js → chunk-z9tj6jq7.js} +1 -1
- package/dist/{chunk-tdt7b8kg.js → chunk-znjrab9a.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/includes.js +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/pwa.js +2 -2
- package/dist/signal-processing.d.ts +17 -0
- package/dist/signal-processing.js +5 -1
- package/dist/site-builder/build.js +3 -1
- package/dist/site-builder/i18n.d.ts +18 -0
- package/dist/site-builder/i18n.js +10 -0
- package/dist/site-builder/index.d.ts +1 -0
- package/dist/site-builder/index.js +1 -0
- package/dist/ssg.js +4 -4
- package/dist/utils.js +2 -2
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-18e804vq.js +0 -2
- package/dist/chunk-38dwv9n5.js +0 -2
- package/dist/chunk-3h7exkbb.js +0 -2
- package/dist/chunk-47v621t0.js +0 -2
- package/dist/chunk-4j0fwfej.js +0 -2
- package/dist/chunk-5n44cxqv.js +0 -2
- package/dist/chunk-72ywcwe8.js +0 -2
- package/dist/chunk-7hdjf2d8.js +0 -2
- package/dist/chunk-7vj34efv.js +0 -2
- package/dist/chunk-800m4ehs.js +0 -2
- package/dist/chunk-8n8ae329.js +0 -2
- package/dist/chunk-8tekg302.js +0 -2
- package/dist/chunk-8ybja3e1.js +0 -2
- package/dist/chunk-ayv6vby2.js +0 -2
- package/dist/chunk-ccam7wfn.js +0 -2
- package/dist/chunk-d8efym0s.js +0 -2
- package/dist/chunk-fk4waw6p.js +0 -2
- package/dist/chunk-h23wts30.js +0 -2
- package/dist/chunk-h9z3rfk8.js +0 -2
- package/dist/chunk-hrdps19s.js +0 -2
- package/dist/chunk-ht4wqwr6.js +0 -2
- package/dist/chunk-hwvzkhbe.js +0 -2
- package/dist/chunk-k4ejba6b.js +0 -2
- package/dist/chunk-m29rat2r.js +0 -2
- package/dist/chunk-q9v240z7.js +0 -2
- package/dist/chunk-qn2hsdy5.js +0 -2
- package/dist/chunk-r1ym4dxv.js +0 -2
- package/dist/chunk-sc3bz0z7.js +0 -2
- package/dist/chunk-smr28g8g.js +0 -2
- package/dist/chunk-t13jx2p3.js +0 -2
- package/dist/chunk-t7had6e0.js +0 -2
- package/dist/chunk-vmx4f37f.js +0 -2
- package/dist/chunk-wkmd8pfh.js +0 -2
- package/dist/chunk-z4msg4y0.js +0 -2
- package/dist/chunk-zs9j4xyx.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ah as g,Bh as h,uh as a,vh as b,wh as c,xh as d,yh as e,zh as f}from"./chunk-tv4n71jy.js";import"./chunk-nhmq45hh.js";import"./chunk-yx8vftp0.js";export{d as v,a as useForm,g as processHasErrorsDirective,h as processFormValidationDirectives,f as processErrorsDirective,e as processErrorDirective,b as defineForm,c as Validator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$e as
|
|
2
|
+
import{$e as d,Ye as a,Ze as b,_e as c,af as e,bf as f,cf as g,df as h,ef as i,ff as j,gf as k,hf as l,if as m,jf as n,kf as o}from"./chunk-jy6madxa.js";import"./chunk-yx8vftp0.js";export{k as writeNetlifyConfig,n as initNetlify,l as hasNetlifyConfig,g as getTotalSize,h as generateNetlifyToml,f as formatSize,e as filterRequiredFiles,i as detectProjectConfig,m as deploy,a as createNetlifyClient,d as createFileManifest,j as createDefaultNetlifyConfig,c as collectDeployFiles,b as calculateSha1,o as DeployError};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{x as
|
|
2
|
+
import{Gu as E}from"./chunk-yx8vftp0.js";import G from"fs";import S from"path";var N=new Set([".jpg",".jpeg",".png",".webp",".avif"]),W=new Map,B=!1;function x(j){if(!j)return;let k=j.split("?")[0].split("#")[0];return W.get(k)}function n(){return B}function w(){W.clear(),B=!1}function y(j,k){W.set(j,k),B=!0}function I(j){let k=0,F=0,J=0,z=0;for(let q=0;q<j.length;q+=4)k+=j[q],F+=j[q+1],J+=j[q+2],z++;if(z===0)return"#e5e7eb";let H=(q)=>Math.round(q/z).toString(16).padStart(2,"0");return`#${H(k)}${H(F)}${H(J)}`}function U(j,k,F,J=4,z=3){let H=[];for(let q=0;q<z;q++)for(let Q=0;Q<J;Q++){let M=Math.floor(Q*k/J),Y=Math.max(M+1,Math.floor((Q+1)*k/J)),O=Math.floor(q*F/z),K=Math.max(O+1,Math.floor((q+1)*F/z)),T=0,L=0,V=0,X=0;for(let Z=O;Z<K;Z++)for(let _=M;_<Y;_++){let A=(Z*k+_)*4;T+=j[A],L+=j[A+1],V+=j[A+2],X++}let $=(Z)=>Math.round(Z/X).toString(16).padStart(2,"0");H.push(`<rect x="${Q}" y="${q}" width="1" height="1" fill="#${$(T)}${$(L)}${$(V)}"/>`)}return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${J} ${z}" preserveAspectRatio="none"><filter id="b"><feGaussianBlur stdDeviation=".6"/></filter><g filter="url(#b)">${H.join("")}</g></svg>`}function C(j){return`data:image/svg+xml;base64,${Buffer.from(j,"utf8").toString("base64")}`}function D(j){try{return JSON.parse(G.readFileSync(j,"utf8"))}catch{return{}}}function v(j,k){try{G.mkdirSync(S.dirname(j),{recursive:!0}),G.writeFileSync(j,JSON.stringify(k))}catch{}}function R(j,k,F=[]){let J;try{J=G.readdirSync(j,{withFileTypes:!0})}catch{return F}for(let z of J){let H=S.join(j,z.name);if(z.isDirectory()){R(H,`${k}/${z.name}`,F);continue}if(!N.has(S.extname(z.name).toLowerCase()))continue;F.push([`${k}/${z.name}`,H])}return F}async function P(j,k={}){let{cachePath:F,maxBytes:J=33554432,limit:z=2000}=k;if(!j||!G.existsSync(j))return B=!0,W.size;let H;try{H=await import("ts-images")}catch{return B=!0,W.size}let q=F?D(F):{},Q=!1,M=R(j,"").slice(0,z),Y=8,O=async([K,T])=>{let L;try{L=G.statSync(T)}catch{return}if(L.size>J)return;let V=q[K];if(V&&V.mtimeMs===L.mtimeMs&&V.size===L.size){W.set(K,{dataUrl:V.dataUrl,color:V.color});return}try{let{hash:X}=await H.generateThumbHash(T);if(!X)return;let{rgba:$,w:Z,h:_}=H.thumbHashToRGBA(X),A={dataUrl:C(U($,Z,_)),color:I($)};W.set(K,A),q[K]={mtimeMs:L.mtimeMs,size:L.size,...A},Q=!0}catch{}};for(let K=0;K<M.length;K+=Y)await Promise.all(M.slice(K,K+Y).map(O));if(F&&Q)v(F,q);return B=!0,W.size}
|
|
3
|
+
export{x as Zs,n as _s,w as $s,y as at,U as bt,C as ct,P as dt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Aq as b,Bq as c,Cq as d,Dq as e,ap as a}from"./chunk-6ea3th9j.js";import"./chunk-4awxsp8f.js";import"./chunk-hk8j3eps.js";import"./chunk-mxva4zmq.js";import"./chunk-1kg9sz9a.js";import"./chunk-87rj95tw.js";import"./chunk-74r77tz1.js";import"./chunk-xgtcq9bj.js";import"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-xaqjtned.js";import"./chunk-7kpfk426.js";import"./chunk-2tew0h6f.js";import"./chunk-yx8vftp0.js";export{d as validateClientScript,c as processOnceDirective,b as processJsonDirective,e as processDirectives,a as injectRouterScript};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Eu as Ae,Fu as u}from"./chunk-yx8vftp0.js";function _(e){return e.split(/[\\/]/).filter(Boolean).slice(0,-1).some((a)=>m.includes(a))}function g(e){return _(e.replace(/^\//,""))}var m;var b=u(()=>{m=["components","layouts","partials","emails"]});import d from"fs";import y from"path";function x(e,t){let a=e.filter((o)=>!g(o.pattern)),r=["// Auto-generated by STX - do not edit"];if(a.length===0)r.push("// No page routes found \u2014 route paths stay typed as string.","export {}","");else{r.push("declare module '@stacksjs/stx' {"," interface KnownRoutes {");for(let o of a){let s=[];for(let c of o.params){let f=o.pattern.includes(`:${c}?`)?"?":"";s.push(`${c}${f}: string`)}let l=s.join("; ");r.push(` '${o.pattern}': { ${l} }`)}r.push(" }","}","","export {}","")}let n=r.join(`
|
|
3
3
|
`),i=y.join(t,"route-types.d.ts");try{if(d.existsSync(i)&&d.readFileSync(i,"utf8")===n)return;d.mkdirSync(t,{recursive:!0}),d.writeFileSync(i,n)}catch{}}function S(e,t,a){let r=process.cwd(),n=y.relative(r,a),i=e.filter((s)=>!g(s.pattern)),o=["// Auto-generated by stx \u2014 do not edit",`// Source: ${n||"pages"}/`,"","export const routes = ["];for(let s of i){let l=y.relative(r,s.filePath).replace(/\\/g,"/"),c=JSON.stringify(s.params),f=s.layout?`, layout: '${y.relative(r,s.layout).replace(/\\/g,"/")}'`:"";o.push(` { pattern: '${s.pattern}', filePath: '${l}', isDynamic: ${s.isDynamic}, params: ${c}${f} },`)}o.push("] as const",""),o.push("export type RouteName = typeof routes[number]['pattern']",""),d.mkdirSync(t,{recursive:!0}),d.writeFileSync(y.join(t,"routes.ts"),o.join(`
|
|
4
4
|
`))}var F=u(()=>{b()});import V from"path";function k(e,t){let r=V.relative(t,e).replace(/\.(stx|md)$/,"");if(r=r.split(V.sep).join("/"),r==="index")return"/";if(r.endsWith("/index"))r=r.slice(0,-6);return r=r.replace(/\[\[([^\]]+)\]\]/g,":$1?"),r=r.replace(/\[([^\]]+)\]/g,":$1"),r=r.replace(/:\.\.\.([^/]+)/g,":$1*"),`/${r}`}function v(e){let t=[],a="",r=0;while(r<e.length){let n=e.slice(r),i=/^\/:([^/?*]+)\?/.exec(n);if(i){t.push(i[1]),a+="(?:/([^/]+))?",r+=i[0].length;continue}let o=/^:([^/?*]+)\*/.exec(n);if(o){t.push(o[1]),a+="(.+)",r+=o[0].length;continue}let s=/^:([^/?*]+)/.exec(n);if(s){t.push(s[1]),a+="([^/]+)",r+=s[0].length;continue}a+=e[r].replace(/[.+^${}()|[\]\\*?]/g,"\\$&"),r+=1}return{regex:new RegExp(`^${a}$`),params:t}}function W(e,t){let a=e===""?"/":e;for(let r of t){let n=a.match(r.regex);if(n){let i={};return r.params.forEach((o,s)=>{i[o]=n[s+1]}),{route:r,params:i}}}return null}function D(e){let t=e.replace(/\[\[([^\]]+)\]\]/g,":$1?").replace(/\[([^\]]+)\]/g,":$1").replace(/:\.\.\.([^/]+)/g,":$1*");return v(t)}var I=()=>{};import xe from"fs";import M from"path";function A(e,t){let a=[],r=M.dirname(e);while(r.startsWith(t)||r===t){let n=M.join(r,"_layout.stx");if(xe.existsSync(n))a.unshift(n);if(r===t)break;r=M.dirname(r)}return a}var N=()=>{};import P from"fs";import h from"path";function K(e,t){let a=[];if(!P.existsSync(e))return a;let r=P.readdirSync(e,{withFileTypes:!0});for(let n of r){let i=h.join(e,n.name);if(n.isDirectory()){if(n.name.startsWith("."))continue;if(m.includes(n.name))continue;a.push(...K(i,t))}else if(n.isFile()){let o=h.extname(n.name);if(t.includes(o)){if(n.name.startsWith("_")&&n.name!=="_layout.stx")continue;if(n.name==="_layout.stx")continue;a.push(i)}}}return a}class C{routes;pagesDir;pagesDirs;config;constructor(e,t={}){this.config=t;let a=t.pagesDirs&&t.pagesDirs.length>0?t.pagesDirs:[t.pagesDir||"pages"];this.pagesDirs=a.map((o)=>h.resolve(e,o)),this.pagesDir=this.pagesDirs[0];let r=t.extensions||[".stx"],n=new Set;this.routes=[];for(let o of this.pagesDirs){let s=K(o,r);for(let l of s){let c=k(l,o);if(n.has(c))continue;n.add(c);let{regex:f,params:H}=v(c),O=t.layouts!==!1?A(l,o):[];this.routes.push({pattern:c,regex:f,params:H,filePath:l,isDynamic:H.length>0,layout:O.length>0?O[O.length-1]:void 0})}}this.routes.sort((o,s)=>{if(!o.isDynamic&&s.isDynamic)return-1;if(o.isDynamic&&!s.isDynamic)return 1;let l=o.pattern.split("/").length,c=s.pattern.split("/").length;if(l!==c)return c-l;return o.pattern.localeCompare(s.pattern)});let i=h.resolve(e,t.stateDir||process.env.STX_DIR?.trim()||".stx");x(this.routes,i),S(this.routes,i,this.pagesDir)}match(e){let t=e===""?"/":e;for(let a of this.routes){let r=t.match(a.regex);if(r){let n={};return a.params.forEach((i,o)=>{n[i]=r[o+1]}),{route:a,params:n}}}return null}resolve(e,t){let a=this.routes.find((n)=>n.pattern===e||n.filePath.includes(e));if(!a)return"#not-found";let r=a.pattern;if(t)for(let[n,i]of Object.entries(t))r=r.replace(`:${n}`,encodeURIComponent(i));return r}addRoute(e){this.routes.push(e),this.routes.sort((t,a)=>{if(!t.isDynamic&&a.isDynamic)return-1;if(t.isDynamic&&!a.isDynamic)return 1;return t.pattern.localeCompare(a.pattern)})}getLayout(e){return e.layout??null}}function z(e,t){return new C(e,t)}function $(e,t){let a=[`${t}.stx`,"error.stx"];for(let r of a){let n=h.join(e,r);if(P.existsSync(n))return n}return null}function Y(e,t){return e.map((a)=>{let r=h.relative(t,a.filePath),n=a.isDynamic?" (dynamic)":"";return`${a.pattern} \u2192 ${r}${n}`})}var J=u(()=>{F();I();N();b()});function Z(e){T=e.replace(/\/$/,"")}function Q(e,t,a={}){p[e]={path:t,name:e,params:a}}function ee(e){for(let[t,a]of Object.entries(e))if(typeof a==="string")p[t]={path:a,name:t};else p[t]={...a,name:t}}function te(e,t={},a=!1){let r=p[e];if(!r)return console.warn(`Route [${e}] not defined.`),"#undefined-route";let n={...r.params,...t},i=r.path;i=i.replace(/:(\w+)/g,(s,l)=>{let c=n[l];if(c===void 0)return console.warn(`Missing parameter [${l}] for route [${e}].`),`:${l}`;return delete n[l],encodeURIComponent(String(c))});let o=Object.entries(n);if(o.length>0){let s=o.map(([l,c])=>`${encodeURIComponent(l)}=${encodeURIComponent(String(c))}`).join("&");i+=(i.includes("?")?"&":"?")+s}return a&&T?`${T}${i}`:i}function re(){for(let e of Object.keys(p))delete p[e];T=""}var p,T="";var ae=u(()=>{p={}});import ne from"fs";import oe from"path";function ie(e,t={}){return{type:"redirect",path:e,options:{replace:t.replace??!1,external:t.external??!1,redirectCode:t.redirectCode??302}}}function se(e){return{type:"abort",error:typeof e==="string"?{statusCode:500,message:e}:e}}function le(e,t={}){return{handler:e,mode:t.mode??"universal"}}function G(e){let t={};if(!e)return t;let a=e.split(";");for(let r of a){let[n,...i]=r.split("=");if(n){let o=n.trim(),s=i.join("=").trim();if(o)t[o]=decodeURIComponent(s)}}return t}function E(e,t,a={}){let r=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(a.expires){let n=typeof a.expires==="number"?new Date(Date.now()+a.expires*1000):a.expires;r+=`; Expires=${n.toUTCString()}`}if(a.path)r+=`; Path=${a.path}`;if(a.domain)r+=`; Domain=${a.domain}`;if(a.secure)r+="; Secure";if(a.httpOnly)r+="; HttpOnly";if(a.sameSite)r+=`; SameSite=${a.sameSite}`;return r}function B(e,t){let a=e.headers.get("cookie")||"",r=G(a);return{get(n){return r[n]},set(n,i,o={}){r[n]=i,t.append("Set-Cookie",E(n,i,o))},delete(n){delete r[n],t.append("Set-Cookie",E(n,"",{expires:new Date(0),path:"/"}))},getAll(){return{...r}}}}function X(){return{get(e){if(typeof document>"u")return;return G(document.cookie)[e]},set(e,t,a={}){if(typeof document>"u")return;document.cookie=E(e,t,a)},delete(e){if(typeof document>"u")return;document.cookie=E(e,"",{expires:new Date(0),path:"/"})},getAll(){if(typeof document>"u")return{};return G(document.cookie)}}}function U(){let e=typeof window<"u"&&typeof window.localStorage<"u";return{get(t){if(!e)return null;try{return window.localStorage.getItem(t)}catch{return null}},set(t,a){if(!e)return;try{window.localStorage.setItem(t,a)}catch{}},remove(t){if(!e)return;try{window.localStorage.removeItem(t)}catch{}},isAvailable(){return e}}}function R(e,t){w.set(e,t)}function j(e){return w.get(e)}function ce(e){return w.has(e)}function ue(){w.clear()}function de(){return Array.from(w.keys())}async function he(e,t="middleware"){let a=oe.resolve(e,t);if(!ne.existsSync(a))return;let r=ne.readdirSync(a);for(let n of r){if(!n.endsWith(".ts")&&!n.endsWith(".js"))continue;if(n.includes(".test.")||n.includes(".spec."))continue;let i=n.replace(/\.(ts|js)$/,""),o=oe.join(a,n);try{let l=(await import(o)).default;if(l&&typeof l.handler==="function")R(i,l);else if(typeof l==="function")R(i,{handler:l,mode:"universal"})}catch(s){console.warn(`Failed to load middleware '${i}' from ${o}:`,s)}}}function Se(e){let t={};if(!e)return t;let a=new URLSearchParams(e);for(let[r,n]of a)t[r]=n;return t}function pe(e,t,a,r=""){return{path:e,params:t,query:Se(r),fullPath:r?`${e}?${r}`:e,meta:a}}function fe(e,t,a,r){let n=r?.isServer??typeof window>"u",i=!n,o=new Headers;return{to:e,from:t,isClient:i,isServer:n,cookies:n&&a?B(a,o):X(),storage:U(),state:{},request:a,responseHeaders:o}}async function me(e,t){let a=Array.isArray(e)?e:[e],r=t.isServer;for(let n of a){let i=j(n);if(!i)return console.error(`Route middleware '${n}' is not registered \u2014 failing the guard closed.`),{passed:!1,abort:{type:"abort",error:{statusCode:500,message:`Route middleware '${n}' is not registered`}},state:t.state,responseHeaders:t.responseHeaders};if(i.mode==="server"&&!r)continue;try{let o=await i.handler(t);if(o){if(o.type==="redirect")return{passed:!1,redirect:o,state:t.state,responseHeaders:t.responseHeaders};if(o.type==="abort")return{passed:!1,abort:o,state:t.state,responseHeaders:t.responseHeaders}}}catch(o){return console.error(`Error in middleware '${n}':`,o),{passed:!1,abort:{type:"abort",error:{statusCode:500,message:o instanceof Error?o.message:"Middleware error"}},state:t.state,responseHeaders:t.responseHeaders}}}return{passed:!0,state:t.state,responseHeaders:t.responseHeaders}}var w;var ge=u(()=>{w=new Map});function q(e){let a=e.replace(/\\/g,"/").split("/").filter(Boolean),r=a.lastIndexOf("layouts"),n=r>=0?a[r+1]:a.at(-1);if(!n)return"app";return n.replace(/\.stx$/i,"")||"app"}function ye(e){let t=e.match(/<meta\b[^>]*name=["']stx-layout["'][^>]*content=["']([^"']+)["'][^>]*>/i),a=e.match(/<meta\b[^>]*name=["']stx-layout-group["'][^>]*content=["']([^"']+)["'][^>]*>/i),r=e.match(/<!--\s*stx-layout:\s*([^ ]+)\s*-->/i),n=t?.[1]||r?.[1]||"";return{layout:n,group:a?.[1]||q(n)}}var ve=()=>{};function ke(e){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(e).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return e}}function we(){if(L)return L;return L=ke(`
|
|
5
5
|
;(function(){
|
|
@@ -1671,4 +1671,4 @@ else {
|
|
|
1671
1671
|
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();
|
|
1672
1672
|
})();
|
|
1673
1673
|
`),L}var L;var be=()=>{};var Ce={};Ae(Ce,{setAppUrl:()=>Z,runMiddleware:()=>me,route:()=>te,resolveLayoutChain:()=>A,resetRoutes:()=>re,registerMiddleware:()=>R,patternToRegex:()=>v,navigateTo:()=>ie,matchRoute:()=>W,loadMiddlewareFromDirectory:()=>he,isNonPageRoutePattern:()=>g,isNonPageRoutePath:()=>_,hasMiddleware:()=>ce,getRouterScript:()=>we,getMiddlewareNames:()=>de,getMiddleware:()=>j,generateRouteTypes:()=>x,generateRouteManifest:()=>S,formatRoutes:()=>Y,findErrorPage:()=>$,filePathToPattern:()=>k,extractLayoutMetadata:()=>ye,deriveLayoutGroup:()=>q,defineRoutes:()=>ee,defineRoute:()=>Q,defineMiddleware:()=>le,createStorageManager:()=>U,createServerCookieManager:()=>B,createRouter:()=>z,createRouteLocation:()=>pe,createMiddlewareContext:()=>fe,createClientCookieManager:()=>X,clearMiddleware:()=>ue,bracketPathToRegex:()=>D,abortNavigation:()=>se,Router:()=>C,NON_PAGE_DIRS:()=>m});var Te=u(()=>{J();I();ae();ge();N();ve();F();b();be()});
|
|
1674
|
-
export{m as
|
|
1674
|
+
export{m as Lt,_ as Mt,g as Nt,x as Ot,S as Pt,k as Qt,v as Rt,W as St,D as Tt,A as Ut,C as Vt,z as Wt,$ as Xt,Y as Yt,Z as Zt,Q as _t,ee as $t,te as au,re as bu,ie as cu,se as du,le as eu,B as fu,X as gu,U as hu,R as iu,j as ju,ce as ku,ue as lu,de as mu,he as nu,pe as ou,fe as pu,me as qu,q as ru,ye as su,ve as tu,we as uu,Ce as vu,Te as wu};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ri as a,si as b,ti as c,ui as d,vi as e,wi as f,xi as g}from"./chunk-94fee5jw.js";import"./chunk-yx8vftp0.js";export{c as shouldCacheComponent,a as processKeepAliveDirectives,g as onDeactivated,f as onActivated,e as generateKeepAliveRuntime,d as generateKeepAliveCSS,b as createKeepAliveCache};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
`)}function s(G){return typeof G==="object"&&G!==null&&!Array.isArray(G)}function g(G,q){let Q={...G};for(let[J,Y]of Object.entries(q))Q[J]=s(Y)&&s(Q[J])?g(Q[J],Y):Y;return Q}function e(G={},q={}){let Q=G.theme||{},J=q.theme||{},{extend:Y,...Z}=J,{extend:U,...z}=Q,X=z.colors||{};z.colors={...X,...o(X)};let A=g(z,Z),L=g(U||{},Y||{});if(Object.keys(L).length>0)A.extend=L;let H=[...G.safelist||[],...q.safelist||[]],E={...G.shortcuts||{},...q.shortcuts||{}},P=[...G.preflights||[],...q.preflights||[]];return{config:{...G,...q,theme:A,safelist:H,shortcuts:E,...P.length>0?{preflights:P}:{},content:[],output:""},safelist:H,shortcuts:E,includePreflight:q.preflight!==!1,minify:q.minify===!0,tokenCSS:t(X)}}var W={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};var F=null,C=!1,_=null,b="",K=!1,Qq=256,V=new Map,O=new Map,j=null,d=null;function S(G){return Bun.hash(G).toString(16).padStart(16,"0").slice(0,16)}function u(G,q){if(V.has(G))V.delete(G);else if(V.size>=Qq)V.delete(V.keys().next().value);V.set(G,q)}function Wq(G){let q=S(G);if(O.has(q))O.delete(q);else if(O.size>=Qq)O.delete(O.keys().next().value);return O.set(q,G),q}function Dq(G){let q=O.get(G);if(q===void 0)return;return O.delete(G),O.set(G,q),q}async function Xq(G){if(!j)return null;try{let q=Bun.file($.join(j,`cw-${S(G)}.css`));if(!await q.exists())return null;return await q.text()}catch{return null}}async function zq(G,q){if(!j)return;try{if(!fs.existsSync(j))fs.mkdirSync(j,{recursive:!0});await Bun.write($.join(j,`cw-${S(G)}.css`),q)}catch{}}async function qq(G){try{let q=await import(G);if(q&&q.CSSGenerator)return{CSSGenerator:q.CSSGenerator,config:q.config,build:q.build,defaultConfig:q.defaultConfig,extractClasses:q.extractClasses}}catch{}return null}function Iq(){let G=[],q=process.cwd();while(q!==$.dirname(q))G.push($.join(q,"node_modules","@cwcss","crosswind","dist","index.js")),G.push($.join(q,"node_modules","@cwcss","crosswind","src","index.ts")),G.push($.join(q,"pantry","@cwcss","crosswind","dist","index.js")),G.push($.join(q,"pantry","@cwcss","crosswind","src","index.ts")),G.push($.join(q,"node_modules","@stacksjs","crosswind","dist","index.js")),G.push($.join(q,"pantry","@stacksjs","crosswind","dist","index.js")),q=$.dirname(q);return G}function Oq(){let G=[],q=process.env.HOME||process.env.USERPROFILE||"";if(q){let Q=[$.join(q,"Code","Tools","crosswind","packages","crosswind","dist","index.js"),$.join(q,"Code","Tools","crosswind","packages","crosswind","src","index.ts"),$.join(q,"repos","stacks-org","crosswind","packages","crosswind","dist","index.js"),$.join(q,"repos","stacks-org","crosswind","packages","crosswind","src","index.ts"),$.join(q,"Code","Tools","stx","packages","stx","node_modules","@cwcss","crosswind","dist","index.js"),$.join(q,"Code","Tools","stx","packages","stx","node_modules","@stacksjs","crosswind","dist","index.js")];G.push(...Q)}return G.push($.join(process.cwd(),"..","crosswind","packages","crosswind","dist","index.js")),G.push($.join(process.cwd(),"..","crosswind","packages","crosswind","src","index.ts")),G}async function Yq(){if(C)return F;C=!0;try{let G=async(Y)=>{for(let Z of Y){if(!await Bun.file(Z).exists())continue;let U=await qq(Z);if(U){if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} CSS engine loaded from ${$.dirname($.dirname(Z))}`);return U}}return null};if(process.env.CROSSWIND_SRC){let Y=$.resolve(process.env.CROSSWIND_SRC),Z=await G([Y]);if(!Z)throw Error(`CROSSWIND_SRC did not resolve to a Crosswind module: ${Y}`);return F=Z,F}let q=await G(Iq());if(q)return F=q,F;let Q=["@cwcss/crosswind","@cwcss/crosswind/dist/index.js","@stacksjs/crosswind","@stacksjs/crosswind/dist/index.js"];for(let Y of Q){let Z=await qq(Y);if(Z){if(F=Z,!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} CSS engine loaded`);return F}}let J=await G(Oq());if(J)return F=J,F;throw Error("Crosswind CSSGenerator not found in any location")}catch{return console.warn(`${W.yellow}[Crosswind] CSS engine not available, Tailwind styles will not be generated${W.reset}`),console.warn(`${W.yellow}Run 'bun add @stacksjs/crosswind' to enable CSS generation${W.reset}`),null}}function Sq(){V.clear(),O.clear()}function xq(){F=null,C=!1,_=null,b="",V.clear(),O.clear(),d=null}async function Zq(G){try{if(!Uq({name:"crosswind",cwd:G}))return null;let{loadConfigWithResult:q}=await import("bunfig"),Q=await q({name:"crosswind",cwd:G,defaultConfig:{},checkEnv:!1,verbose:!1});if(!Q?.path||!Q.config||Object.keys(Q.config).length===0)return null;let J=$.relative(G,Q.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} Loaded config from ${J||Q.path}`);return Q.config}catch(q){if(q instanceof Error&&q.name==="ConfigNotFoundError")return null;return console.warn(`${W.yellow}[Crosswind]${W.reset} Failed to load crosswind config:`,q instanceof Error?q.message:q),null}}async function _q(G){let q=null;try{let{loadStxConfig:Q}=await import("./chunk-
|
|
2
|
+
import{it as Jq}from"./chunk-xgtcq9bj.js";import{Gu as Gq}from"./chunk-yx8vftp0.js";import $ from"path";import{hasLocalConfig as Uq}from"bunfig";var a={fg:{light:"gray-900",dark:"gray-100",description:"Primary text"},"fg-strong":{light:"gray-700",dark:"gray-300",description:"Labels, secondary headings"},"fg-muted":{light:"gray-600",dark:"gray-400",description:"Supporting text"},"fg-soft":{light:"gray-500",dark:"gray-400",description:"De-emphasised text"},"fg-subtle":{light:"gray-400",dark:"gray-500",description:"Placeholders, disabled text"},surface:{light:"gray-50",dark:"gray-800",description:"Page and panel background"},"surface-raised":{light:"gray-100",dark:"gray-700",description:"Cards, popovers"},"surface-sunken":{light:"gray-200",dark:"gray-700",description:"Wells, track backgrounds"},line:{light:"gray-200",dark:"gray-700",description:"Default border, divider"},"line-strong":{light:"gray-300",dark:"gray-600",description:"Input border, focus ring track"},accent:{light:"indigo-600",dark:"indigo-400",description:"Primary action, selected state"},info:{light:"blue-600",dark:"blue-400",description:"Informational emphasis, links"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-500",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"indigo-600",dark:"indigo-500",description:"Primary button fill"},"info-solid":{light:"blue-600",dark:"blue-500",description:"Informational fill"},"danger-solid":{light:"red-600",dark:"red-500",description:"Destructive button fill"},"success-solid":{light:"green-600",dark:"green-500",description:"Confirmation fill"}};function m(G){return`--stx-${G}`}function p(G,q){let Q=q.lastIndexOf("-");if(Q===-1)return typeof G[q]==="string"?G[q]:void 0;let J=G[q.slice(0,Q)];if(!J||typeof J!=="object")return;let Y=J[q.slice(Q+1)];return typeof Y==="string"?Y:void 0}function o(G){let q={};for(let[Q,J]of Object.entries(a)){let Y=p(G,J.light);if(Y===void 0)continue;q[Q]=`var(${m(Q)}, ${Y})`}return q}function t(G){let q=[],Q=[];for(let[J,Y]of Object.entries(a)){let Z=p(G,Y.light),U=p(G,Y.dark);if(Z===void 0)continue;if(q.push(` ${m(J)}: ${Z};`),U!==void 0)Q.push(` ${m(J)}: ${U};`)}if(q.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...q,"}",".dark {",...Q,"}",""].join(`
|
|
3
|
+
`)}function s(G){return typeof G==="object"&&G!==null&&!Array.isArray(G)}function g(G,q){let Q={...G};for(let[J,Y]of Object.entries(q))Q[J]=s(Y)&&s(Q[J])?g(Q[J],Y):Y;return Q}function e(G={},q={}){let Q=G.theme||{},J=q.theme||{},{extend:Y,...Z}=J,{extend:U,...z}=Q,X=z.colors||{};z.colors={...X,...o(X)};let A=g(z,Z),L=g(U||{},Y||{});if(Object.keys(L).length>0)A.extend=L;let H=[...G.safelist||[],...q.safelist||[]],E={...G.shortcuts||{},...q.shortcuts||{}},P=[...G.preflights||[],...q.preflights||[]];return{config:{...G,...q,theme:A,safelist:H,shortcuts:E,...P.length>0?{preflights:P}:{},content:[],output:""},safelist:H,shortcuts:E,includePreflight:q.preflight!==!1,minify:q.minify===!0,tokenCSS:t(X)}}var W={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};var F=null,C=!1,_=null,b="",K=!1,Qq=256,V=new Map,O=new Map,j=null,d=null;function S(G){return Bun.hash(G).toString(16).padStart(16,"0").slice(0,16)}function u(G,q){if(V.has(G))V.delete(G);else if(V.size>=Qq)V.delete(V.keys().next().value);V.set(G,q)}function Wq(G){let q=S(G);if(O.has(q))O.delete(q);else if(O.size>=Qq)O.delete(O.keys().next().value);return O.set(q,G),q}function Dq(G){let q=O.get(G);if(q===void 0)return;return O.delete(G),O.set(G,q),q}async function Xq(G){if(!j)return null;try{let q=Bun.file($.join(j,`cw-${S(G)}.css`));if(!await q.exists())return null;return await q.text()}catch{return null}}async function zq(G,q){if(!j)return;try{if(!fs.existsSync(j))fs.mkdirSync(j,{recursive:!0});await Bun.write($.join(j,`cw-${S(G)}.css`),q)}catch{}}async function qq(G){try{let q=await import(G);if(q&&q.CSSGenerator)return{CSSGenerator:q.CSSGenerator,config:q.config,build:q.build,defaultConfig:q.defaultConfig,extractClasses:q.extractClasses}}catch{}return null}function Iq(){let G=[],q=process.cwd();while(q!==$.dirname(q))G.push($.join(q,"node_modules","@cwcss","crosswind","dist","index.js")),G.push($.join(q,"node_modules","@cwcss","crosswind","src","index.ts")),G.push($.join(q,"pantry","@cwcss","crosswind","dist","index.js")),G.push($.join(q,"pantry","@cwcss","crosswind","src","index.ts")),G.push($.join(q,"node_modules","@stacksjs","crosswind","dist","index.js")),G.push($.join(q,"pantry","@stacksjs","crosswind","dist","index.js")),q=$.dirname(q);return G}function Oq(){let G=[],q=process.env.HOME||process.env.USERPROFILE||"";if(q){let Q=[$.join(q,"Code","Tools","crosswind","packages","crosswind","dist","index.js"),$.join(q,"Code","Tools","crosswind","packages","crosswind","src","index.ts"),$.join(q,"repos","stacks-org","crosswind","packages","crosswind","dist","index.js"),$.join(q,"repos","stacks-org","crosswind","packages","crosswind","src","index.ts"),$.join(q,"Code","Tools","stx","packages","stx","node_modules","@cwcss","crosswind","dist","index.js"),$.join(q,"Code","Tools","stx","packages","stx","node_modules","@stacksjs","crosswind","dist","index.js")];G.push(...Q)}return G.push($.join(process.cwd(),"..","crosswind","packages","crosswind","dist","index.js")),G.push($.join(process.cwd(),"..","crosswind","packages","crosswind","src","index.ts")),G}async function Yq(){if(C)return F;C=!0;try{let G=async(Y)=>{for(let Z of Y){if(!await Bun.file(Z).exists())continue;let U=await qq(Z);if(U){if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} CSS engine loaded from ${$.dirname($.dirname(Z))}`);return U}}return null};if(process.env.CROSSWIND_SRC){let Y=$.resolve(process.env.CROSSWIND_SRC),Z=await G([Y]);if(!Z)throw Error(`CROSSWIND_SRC did not resolve to a Crosswind module: ${Y}`);return F=Z,F}let q=await G(Iq());if(q)return F=q,F;let Q=["@cwcss/crosswind","@cwcss/crosswind/dist/index.js","@stacksjs/crosswind","@stacksjs/crosswind/dist/index.js"];for(let Y of Q){let Z=await qq(Y);if(Z){if(F=Z,!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} CSS engine loaded`);return F}}let J=await G(Oq());if(J)return F=J,F;throw Error("Crosswind CSSGenerator not found in any location")}catch{return console.warn(`${W.yellow}[Crosswind] CSS engine not available, Tailwind styles will not be generated${W.reset}`),console.warn(`${W.yellow}Run 'bun add @stacksjs/crosswind' to enable CSS generation${W.reset}`),null}}function Sq(){V.clear(),O.clear()}function xq(){F=null,C=!1,_=null,b="",V.clear(),O.clear(),d=null}async function Zq(G){try{if(!Uq({name:"crosswind",cwd:G}))return null;let{loadConfigWithResult:q}=await import("bunfig"),Q=await q({name:"crosswind",cwd:G,defaultConfig:{},checkEnv:!1,verbose:!1});if(!Q?.path||!Q.config||Object.keys(Q.config).length===0)return null;let J=$.relative(G,Q.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} Loaded config from ${J||Q.path}`);return Q.config}catch(q){if(q instanceof Error&&q.name==="ConfigNotFoundError")return null;return console.warn(`${W.yellow}[Crosswind]${W.reset} Failed to load crosswind config:`,q instanceof Error?q.message:q),null}}async function _q(G){let q=null;try{let{loadStxConfig:Q}=await import("./chunk-anc397f7.js"),J=await Q(G);if(J.css)if(typeof J.css==="string"){let Y=$.isAbsolute(J.css)?J.css:$.resolve(G,J.css);if(await Bun.file(Y).exists()){let Z=await import(Y);q=Z.default||Z,console.log(`${W.green}[Crosswind]${W.reset} Loaded config from stx.config.ts \u2192 ${J.css}`)}}else{if(q={...J.css,content:J.css.content||[],preflight:J.css.preflight??!0,minify:J.css.minify??!1},J.css.config){let Y=$.isAbsolute(J.css.config)?J.css.config:$.resolve(G,J.css.config);if(await Bun.file(Y).exists()){let Z=await import(Y);q={...Z.default||Z,...q}}}console.log(`${W.green}[Crosswind]${W.reset} Using inline CSS config from stx.config.ts`)}}catch{}return q||await Zq(G)}function Fq(G){try{let q=new WeakSet;return S(JSON.stringify(G??{},(Q,J)=>{if(typeof J==="function")return`[fn]${String(J)}`;if(typeof J==="object"&&J!==null){if(q.has(J))return"[circular]";q.add(J)}return J})??"")}catch{return"unhashable"}}async function Nq(G){if(K)return b;K=!0;try{let q=await Yq();if(!q||!q.build)return K=!1,"";if(!_)_=await Zq(G);if(!_)return K=!1,"";let Q=q.defaultConfig?.theme||{},J=_.theme||{},Y={...q.defaultConfig,..._,theme:{...Q,...J,extend:{...Q.extend||{},...J.extend||{}}}},Z=performance.now(),U=await q.build(Y),z=performance.now()-Z;if(b=U.css,console.log(`${W.cyan}[Crosswind]${W.reset} Built ${U.classes.size} classes in ${z.toFixed(1)}ms`),Y.output){let X=$.isAbsolute(Y.output)?Y.output:$.join(G,Y.output),A=$.dirname(X);if(!fs.existsSync(A))fs.mkdirSync(A,{recursive:!0});await Bun.write(X,U.css)}return K=!1,U.css}catch(q){return console.error(`${W.red}[Crosswind]${W.reset} Build error:`,q),K=!1,b}}async function kq(G){_=null,await Nq(G)}function wq(){return b}function Vq(G){let q=new Set,Q=/class\s*=\s*["']([^"']+)["']/gi,J=Q.exec(G);while(J!==null){for(let U of J[1].split(/\s+/))if(U.trim())q.add(U.trim());J=Q.exec(G)}let Y=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,Z=Y.exec(G);while(Z!==null){let U=Z[1].match(/'([^']+)'/g);if(U){for(let z of U)for(let X of z.slice(1,-1).split(/\s+/))if(X.trim())q.add(X.trim())}Z=Y.exec(G)}return q}async function jq(G,q){try{let Q=await Yq();if(!Q)return"";let J=typeof Q.extractClasses==="function"?Q.extractClasses(G):Vq(G);if(J.size===0)return"";let Y=q?$.resolve(q):process.cwd();if(!j)j=Jq(Y,"cache");let Z=[...J].sort().join(" "),U=`${d||"default"}::${Z}`,z=V.get(U);if(z!==void 0)return u(U,z),z;let X=await Xq(U);if(X!==null)return u(U,X),X;if(!_)_=await _q(Y),d=Fq(_);let A=Q.defaultConfig||Q.config,L=_||{},H=e(A,L),{safelist:E,includePreflight:P,minify:x,tokenCSS:$q}=H,h=H.config,R=new Q.CSSGenerator(h);for(let I of E)R.generate(I);for(let I of J)R.generate(I);let N=R.toCSS(P,x),i=h.shortcuts||L.shortcuts||{};for(let[I,k]of Object.entries(i)){if(!J.has(I)&&!E.includes(I))continue;let w=k.split(/\s+/).filter(Boolean);for(let T of w)R.generate(T)}N=R.toCSS(P,x);let B=N.split(`
|
|
4
4
|
`);for(let[I,k]of Object.entries(i)){if(!J.has(I)&&!E.includes(I))continue;let w=k.split(/\s+/).filter(Boolean),T=[],y=[];for(let v of w){let c=v.startsWith("dark:"),n=`.${(c?v.slice(5):v).replace(/\//g,"\\/").replace(/:/g,"\\:").replace(/\./g,"\\.").replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/%/g,"\\%")}`;for(let M=0;M<B.length;M++){let l=B[M].trim();if(l===`${n} {`||l.startsWith(`${n} {`)){let D=M,r="";while(D<B.length){if(r+=B[D],B[D].includes("}"))break;D++}let f=r.match(/\{([^}]+)\}/);if(f)if(c)y.push(f[1].trim());else T.push(f[1].trim());break}}}if(T.length)N+=`
|
|
5
5
|
.${I} { ${T.join(" ")} }`;if(y.length)N+=`
|
|
6
6
|
@media (prefers-color-scheme: dark) { .dark .${I} { ${y.join(" ")} } }`}return N=$q+N,u(U,N),zq(U,N),N}catch(Q){return console.warn("Failed to generate Crosswind CSS:",Q),""}}async function yq(G,q,Q=!1){let J=await jq(G,q);if(!J)return G;let Y=Q?`<link data-crosswind="generated" rel="stylesheet" href="/_stx/crosswind.${Wq(J)}.css">`:`<style data-crosswind="generated">
|
|
@@ -8,4 +8,4 @@ ${J}
|
|
|
8
8
|
</style>`,Z=/(?:<style\b[^>]*\bdata-crosswind=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-crosswind=(?:"generated"|'generated')[^>]*>)/g;if(Z.test(G)){let U=!1;return G.replace(Z,()=>{if(U)return"";return U=!0,Y})}if(G.includes("</head>"))return G.replace("</head>",`${Y}
|
|
9
9
|
</head>`);if(G.includes("<body"))return G.replace(/<body([^>]*)>/,`<body$1>
|
|
10
10
|
${Y}`);return Y+G}
|
|
11
|
-
export{g as
|
|
11
|
+
export{g as Js,e as Ks,W as Ls,Dq as Ms,Yq as Ns,Sq as Os,xq as Ps,Zq as Qs,_q as Rs,Fq as Ss,Nq as Ts,kq as Us,wq as Vs,Vq as Ws,jq as Xs,yq as Ys};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$f as
|
|
2
|
+
import{$f as e,Xf as a,Yf as b,Zf as c,_f as d,ag as f,bg as g,cg as h,dg as i,eg as j,fg as k,gg as l}from"./chunk-d19bydks.js";import"./chunk-yx8vftp0.js";export{g as toUsers,f as toUser,c as stopBroadcasting,b as startBroadcasting,d as loadChannels,a as getBroadcastServer,j as channel,h as broadcastPrivate,i as broadcastPresence,e as broadcast,l as BroadcastServer,k as Broadcast};
|
|
@@ -348,4 +348,4 @@ else {
|
|
|
348
348
|
console.log('[stx] Keep-alive runtime initialized');
|
|
349
349
|
})();
|
|
350
350
|
`}function Z(f){if(typeof document<"u")document.addEventListener("stx:activated",(j)=>{f(j.detail)})}function _(f){if(typeof document<"u")document.addEventListener("stx:deactivated",(j)=>{f(j.detail)})}
|
|
351
|
-
export{Q as
|
|
351
|
+
export{Q as ri,T as si,W as ti,X as ui,Y as vi,Z as wi,_ as xi};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{$i as Z,Zi as j,_i as E}from"./chunk-ht51fz7w.js";import{Lq as L,Nl as R,Ol as U,Pl as X,as as M}from"./chunk-6ea3th9j.js";import{Ct as P}from"./chunk-xaqjtned.js";import $ from"path";var V=new Map;function w(Q,z){for(let J of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(J[1])z.add(J[1]);for(let J of Q.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let H of(J[1]??"").split(",")){let Y=((H.includes(":")?H.split(":").pop():H)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(Y))z.add(Y)}for(let J of Q.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let H of(J[1]??"").split(",")){let K=H.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(K))z.add(K)}}async function u(Q){let z;if(Q)z=$.resolve(Q);else{let q=await M();z=$.resolve(q.root||process.cwd(),q.storesDir||"stores")}let J=new Bun.Glob("*.ts"),H=[];try{for await(let q of J.scan({cwd:z,absolute:!0})){let y=$.basename(q,".ts");if(["index","types"].includes(y))continue;if(q.includes(".d.ts"))continue;H.push(q)}}catch{return Z(V,z,"",""),null}let K=j(H),Y=E(V,z,K);if(Y!==void 0)return Y||null;if(H.length===0)return Z(V,z,K,""),null;let x=[];for(let q of H){let y=await Bun.file(q).text();x.push({file:q,hasUseStore:/useStore\s*\(/.test(y)})}x.sort((q,y)=>{if(q.hasUseStore===y.hasUseStore)return 0;return q.hasUseStore?1:-1});let I=x.map((q)=>q.file),A=[],B=new Set,T=L({loader:"ts",target:"browser",define:X()});for(let q of I)try{let y=await Bun.file(q).text(),W=$.basename(q,".ts");w(y,B),y=R(y),y=U(y),y=y.replace(/^export\s+(default\s+)?/gm,""),y=T.transformSync(y),A.push(`// Store: ${W}
|
|
3
3
|
${y.trim()}`)}catch(y){console.warn(`[stx] Failed to load store ${q}:`,y)}if(A.length===0)return Z(V,z,K,""),null;let G=A.join(`
|
|
4
4
|
|
|
5
5
|
`),O=`;(function(){
|
|
@@ -8,4 +8,4 @@ ${P.filter((q)=>!B.has(q)&&new RegExp(`\\b${q}\\b`).test(G)).map((q)=>`var ${q}
|
|
|
8
8
|
`)}
|
|
9
9
|
${G}
|
|
10
10
|
})();`;return Z(V,z,K,O),O}function g(){V.clear()}
|
|
11
|
-
export{u as
|
|
11
|
+
export{u as Ui,g as Vi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Wi as a,Xi as b,Yi as c}from"./chunk-5v3dv3xv.js";import"./chunk-ht51fz7w.js";import"./chunk-6ea3th9j.js";import"./chunk-4awxsp8f.js";import"./chunk-hk8j3eps.js";import"./chunk-mxva4zmq.js";import"./chunk-1kg9sz9a.js";import"./chunk-87rj95tw.js";import"./chunk-74r77tz1.js";import"./chunk-xgtcq9bj.js";import"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-xaqjtned.js";import"./chunk-7kpfk426.js";import"./chunk-2tew0h6f.js";import"./chunk-yx8vftp0.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Gu as Y}from"./chunk-yx8vftp0.js";import{mkdir as O,writeFile as q}from"fs/promises";import{join as X}from"path";var T="https://api.iconify.design";async function k(){let E=await fetch(`${T}/collections`);if(!E.ok)throw Error(`Failed to fetch collections: ${E.statusText}`);return await E.json()}async function P(E,z){try{let U=Y.resolve("@iconify/json"),S=`${`${U.substring(0,U.lastIndexOf("/node_modules/@iconify/json/"))}/node_modules/@iconify/json`}/json/${E}.json`,M=Bun.file(S);if(await M.exists()){let V=await M.json();if(z&&z.length>0){let Z={};for(let L of z)if(V.icons[L])Z[L]=V.icons[L];return{...V,icons:Z}}return V}}catch{}let K=z&&z.length>0?`${T}/${E}.json?icons=${z.join(",")}`:`${T}/${E}.json`,Q=await fetch(K);if(!Q.ok)throw Error(`Failed to fetch icons for ${E}: ${Q.statusText}`);return await Q.json()}function j(E,z=24,K=24){return{body:E.body,width:E.width||z,height:E.height||K,viewBox:`0 0 ${E.width||z} ${E.height||K}`}}function F(E,z){let K=B(E);return`import type { IconData } from '@stacksjs/iconify-core'
|
|
3
3
|
|
|
4
4
|
export const ${K}: IconData = ${JSON.stringify(z,null,2)}
|
|
5
5
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$r as b,_r as a,as as c,bs as d,cs as e,ds as f}from"./chunk-6ea3th9j.js";import"./chunk-4awxsp8f.js";import"./chunk-hk8j3eps.js";import"./chunk-mxva4zmq.js";import"./chunk-1kg9sz9a.js";import"./chunk-87rj95tw.js";import"./chunk-74r77tz1.js";import"./chunk-xgtcq9bj.js";import"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-xaqjtned.js";import"./chunk-7kpfk426.js";import"./chunk-2tew0h6f.js";import"./chunk-yx8vftp0.js";export{f as validateConfig,b as resolveStxDirectories,c as loadStxConfig,e as defineStxConfig,a as defaultConfig,d as config};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{hk as a,ik as b,jk as c,kk as d}from"./chunk-vw7h103c.js";import"./chunk-dtfgxjy9.js";import"./chunk-6ea3th9j.js";import"./chunk-4awxsp8f.js";import"./chunk-hk8j3eps.js";import"./chunk-mxva4zmq.js";import"./chunk-1kg9sz9a.js";import"./chunk-87rj95tw.js";import"./chunk-74r77tz1.js";import"./chunk-xgtcq9bj.js";import"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-xaqjtned.js";import"./chunk-7kpfk426.js";import"./chunk-2tew0h6f.js";import"./chunk-yx8vftp0.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Dq as H,Vq as x,_r as g,pm as O,rp as R}from"./chunk-6ea3th9j.js";import b from"path";var v={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},M=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var T=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function f(q){let B=[],Q=0,G;T.lastIndex=0;while((G=T.exec(q))!==null){if(G.index>Q){let X=q.slice(Q,G.index);if(X.trim())B.push({type:B.length===0?"shell":"content",content:X})}let J=G[1],K=G[2];B.push({type:"suspense",name:J,content:K}),Q=G.index+G[0].length}if(Q<q.length){let J=q.slice(Q);if(J.trim())B.push({type:B.length===0?"shell":"content",content:J})}if(B.length===0)B.push({type:"shell",content:q});return B}async function r(q,B={},Q={}){let G={...g,...Q,streaming:{...v,...Q.streaming}},J=G.streaming?.bufferSize||16384;return new ReadableStream({async start(K){try{let X=await Bun.file(q).text(),z=X.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),L=z?z[1]:"",Y=X.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j={...B,__filename:q,__dirname:b.dirname(q)};if(L.trim())await R(L,j,q);let D=f(Y),$=new Set;if(!D.some((w)=>w.type==="suspense")){let w=G.streaming?.strategy||"auto",U=new RegExp(M.source,"g");if(!(w!=="manual"&&U.test(Y))){let F=await H(Y,j,q,G,$);for(let V=0;V<F.length;V+=J)K.enqueue(F.slice(V,V+J)),await new Promise((W)=>setTimeout(W,0))}else{let F=[],V=new RegExp(M.source,"g"),W;while((W=V.exec(Y))!==null)F.push({name:W[1],content:W[2],start:W.index,end:W.index+W[0].length});let y=0;for(let A of F){if(A.start>y){let k=Y.slice(y,A.start);if(k.trim()){let E=await H(k,j,q,G,$);K.enqueue(E),await new Promise((S)=>setTimeout(S,0))}}let I=await H(A.content,j,q,G,$);K.enqueue(I),await new Promise((k)=>setTimeout(k,0)),y=A.end}if(y<Y.length){let A=Y.slice(y);if(A.trim()){let I=await H(A,j,q,G,$);K.enqueue(I)}}}}else{let w=new Map;for(let Z of D)if(Z.type==="shell"||Z.type==="content"){let F=await H(Z.content,j,q,G,$);K.enqueue(F)}else if(Z.type==="suspense"&&Z.name){let F=`stx-suspense-${Z.name}`;K.enqueue(`<div id="${F}" data-suspense="${Z.name}" style="display:contents;">
|
|
3
3
|
<template data-suspense-fallback>Loading...</template>
|
|
4
4
|
</div>`),w.set(Z.name,H(Z.content,j,q,G,$))}K.enqueue(`
|
|
5
5
|
<script>
|
|
@@ -191,4 +191,4 @@ else {
|
|
|
191
191
|
stx.hydrate();
|
|
192
192
|
}
|
|
193
193
|
})();`}
|
|
194
|
-
export{r as
|
|
194
|
+
export{r as dj,N as ej,C as fj,s as gj,a as hj,o as ij,n as jj,e as kj,d as lj,h as mj,t as nj,qq as oj,Bq as pj,Gq as qj};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Mg as a,Ng as b,Og as c,Pg as d,Qg as e,Rg as f,Sg as g,Tg as h,Ug as i,Vg as j,Wg as k}from"./chunk-c5411vve.js";import"./chunk-j93x5fzs.js";import"./chunk-yx8vftp0.js";export{c as setCachedVideoResult,k as processVideo,b as getCachedVideoResult,f as generateThumbnails,g as generateSpriteSheet,e as generatePoster,h as generateHLSManifest,i as generateDASHManifest,d as clearVideoCache,j as analyzeVideo,a as VideoProcessorCache};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Af as f,Bf as g,Cf as h,xf as c,yf as d,zf as e}from"./chunk-2v320r60.js";import{Mf as a,Pf as b}from"./chunk-qsdv9c1c.js";import"./chunk-5v3dv3xv.js";import"./chunk-ht51fz7w.js";import"./chunk-6ea3th9j.js";import"./chunk-4awxsp8f.js";import"./chunk-hk8j3eps.js";import"./chunk-mxva4zmq.js";import"./chunk-1kg9sz9a.js";import"./chunk-87rj95tw.js";import"./chunk-74r77tz1.js";import"./chunk-xgtcq9bj.js";import"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-xaqjtned.js";import"./chunk-7kpfk426.js";import"./chunk-2tew0h6f.js";import"./chunk-yx8vftp0.js";export{d as virtualPathFor,g as typecheckStxFiles,e as sourcePathFor,h as formatTypecheckDiagnostics,f as findRuntimeTypeDeclarations,b as extractTemplateExpressions,a as extractScriptBlocks,c as buildVirtualSource};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Sh as x,Xh as B,Yh as c,Zh as u,_h as n}from"./chunk-j93x5fzs.js";import{Gu as v}from"./chunk-yx8vftp0.js";import{resolve as JJ,basename as WJ,extname as _J,join as LJ}from"path";import{mkdir as QJ}from"fs/promises";var ZJ={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:2000,cacheTranscoded:!0,cacheThumbnails:!0,cacheManifests:!0};class V{config;constructor(K={}){this.config={...ZJ,...K}}async get(K,J){return c(K,J,"video",this.config)}async set(K,J,X){return u(K,J,X,"video",this.config)}async clear(){return n("video",this.config)}updateConfig(K){this.config={...this.config,...K}}}var S=null;function D(K){if(!S)S=new V(K);else if(K)S.updateConfig(K);return S}async function q(K,J,X){let N=X?{directory:`${X.outputDir}/../.cache`}:{};return D(N).get(K,J)}async function b(K,J,X,N){let Z=N?{directory:`${N.outputDir}/../.cache`}:{};return D(Z).set(K,J,X)}async function $J(){return D().clear()}import{resolve as y,basename as P,extname as f,join as U}from"path";import{mkdir as g}from"fs/promises";async function m(){try{return await import("ts-videos")}catch{return null}}async function h(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate poster"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",M=J.timestamp||0,E=`${z}-poster-${Y}.${G}`,W=U(X,E),Q=await Z.extractThumbnails($,{timestamps:[M],width:J.width||1280,height:J.height,format:G,quality:J.quality||85,outputDir:X,outputPattern:E.replace(`.${G}`,"")});if(Q&&Q.length>0){let _=Q[0];return{path:W,url:`${N}/${E}`,width:_.width||J.width||1280,height:_.height||720,timestamp:M,size:_.size||0}}return null}catch($){return console.warn(`[stx-media] Failed to generate poster: ${$}`),null}}async function d(K,J,X,N){let Z=await m();if(!Z)return[];try{let $=y(K);if(!await B($))return[];await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",W=(await new Z.Input($).getInfo()).duration||60,Q=J.count||10,_=J.interval||W/Q,O=[];for(let w=0;w<Q&&w*_<W;w++)O.push(w*_);let L=await Z.extractThumbnails($,{timestamps:O,width:J.width||320,format:G,quality:J.quality||80,outputDir:X,outputPattern:`${z}-thumb-${Y}`});if(L&&L.length>0)return L.map((w,j)=>({path:w.path||U(X,`${z}-thumb-${Y}-${j}.${G}`),url:`${N}/${z}-thumb-${Y}-${j}.${G}`,width:w.width||J.width||320,height:w.height||180,timestamp:O[j],size:w.size||0}));return[]}catch($){return console.warn(`[stx-media] Failed to generate thumbnails: ${$}`),[]}}async function zJ(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate sprite sheet"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),E=(await new Z.Input($).getInfo()).duration||60,W=J.columns||10,Q=J.interval||5,_=J.thumbnailWidth||160,O=J.thumbnailHeight||90,L=J.format||"jpeg",w=Math.ceil(E/Q),j=Math.ceil(w/W),F=`${z}-sprite-${Y}.${L}`,k=U(X,F),T=[];for(let I=0;I<w;I++)T.push(I*Q);let A=await Z.extractThumbnails($,{timestamps:T,width:_,height:O,format:L,quality:J.quality||70,outputDir:U(X,".temp")});if(!A||A.length===0)return null;try{let I=await import("ts-images"),H=W*_,kJ=j*O,jJ=await I.createSprite({images:A.map((YJ)=>YJ.path),columns:W,padding:0,outputPath:k,format:L,quality:J.quality||70});return{url:`${N}/${F}`,path:k,columns:W,rows:j,thumbnailWidth:_,thumbnailHeight:O,interval:Q,totalFrames:w}}catch{return console.warn("[stx-media] ts-images not installed, sprite sheet generation skipped"),null}}catch($){return console.warn(`[stx-media] Failed to generate sprite sheet: ${$}`),null}}import{resolve as r,basename as e,extname as i,join as C}from"path";import{mkdir as R,writeFile as o}from"fs/promises";async function t(){try{return await import("ts-videos")}catch{return null}}var s=[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000},{label:"360p",width:640,height:360,bitrate:600000,audioBitrate:64000}];async function p(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate HLS manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-hls`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||6,O=(await new $.Input(Y).getInfo()).duration||0,L=[],w=0;for(let k of E){let T=C(M,k.label);await R(T,{recursive:!0});let A=`${k.label}.m3u8`,I=C(T,A);try{let H=await $.generateHLS(Y,{outputDir:T,segmentDuration:W,width:k.width,height:k.height,videoBitrate:k.bitrate,audioBitrate:k.audioBitrate,playlistName:k.label});if(H)L.push({quality:k,url:`${N}/${G}-${z}-hls/${k.label}/${A}`,path:I}),w+=H.segmentCount||Math.ceil(O/W)}catch(H){console.warn(`[stx-media] Failed to generate HLS for ${k.label}: ${H}`)}}if(L.length===0)return null;let j=C(M,"master.m3u8"),F=GJ(L,N,G,z);return await o(j,F),{manifestUrl:`${N}/${G}-${z}-hls/master.m3u8`,manifestPath:j,playlists:L,segmentCount:w,duration:O}}catch(Y){return console.warn(`[stx-media] Failed to generate HLS manifest: ${Y}`),null}}function GJ(K,J,X,N){let Z=["#EXTM3U","#EXT-X-VERSION:3"];for(let $ of K){let{quality:Y}=$,z=Y.bitrate+(Y.audioBitrate||128000),G=`${Y.width}x${Y.height||Math.round(Y.width*9/16)}`;Z.push(`#EXT-X-STREAM-INF:BANDWIDTH=${z},RESOLUTION=${G},NAME="${Y.label}"`,`${Y.label}/${Y.label}.m3u8`)}return Z.join(`
|
|
3
3
|
`)}async function l(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate DASH manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-dash`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||4,Q=Z?.minBufferTime||2,L=(await new $.Input(Y).getInfo()).duration||0,w=[],j=[];for(let A of E){let I=C(M,A.label);await R(I,{recursive:!0});try{if(await $.generateDASH(Y,{outputDir:I,segmentDuration:W,width:A.width,height:A.height,videoBitrate:A.bitrate,audioBitrate:A.audioBitrate})){if(w.push({bandwidth:A.bitrate,width:A.width,height:A.height||Math.round(A.width*9/16),url:`${N}/${G}-${z}-dash/${A.label}/video`}),A.audioBitrate)j.push({bandwidth:A.audioBitrate,url:`${N}/${G}-${z}-dash/${A.label}/audio`})}}catch(H){console.warn(`[stx-media] Failed to generate DASH for ${A.label}: ${H}`)}}if(w.length===0)return null;let F=C(M,"manifest.mpd"),k=NJ(w,j,L,W,Q);await o(F,k);let T=[{type:"video",representations:w}];if(j.length>0)T.push({type:"audio",representations:j});return{manifestUrl:`${N}/${G}-${z}-dash/manifest.mpd`,manifestPath:F,adaptationSets:T,duration:L}}catch(Y){return console.warn(`[stx-media] Failed to generate DASH manifest: ${Y}`),null}}function NJ(K,J,X,N,Z){let $=a(X),Y=a(Z),z=`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011"
|
|
5
5
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
@@ -26,4 +26,4 @@ import{Jh as x,Oh as B,Ph as c,Qh as u,Rh as n}from"./chunk-jw1besrt.js";import{
|
|
|
26
26
|
</Representation>
|
|
27
27
|
`}z+=` </AdaptationSet>
|
|
28
28
|
`}return z+=` </Period>
|
|
29
|
-
</MPD>`,z}function a(K){let J=Math.floor(K/3600),X=Math.floor(K%3600/60),N=Math.floor(K%60),Z="PT";if(J>0)Z+=`${J}H`;if(X>0)Z+=`${X}M`;return Z+=`${N}S`,Z}async function KJ(){try{return await import("ts-videos")}catch{return null}}function MJ(K){switch(K){case"very-low":return 500000;case"low":return 1e6;case"medium":return 2500000;case"high":return 5000000;case"very-high":return 1e7;case"lossless":return 0;default:return 2500000}}function OJ(K){switch(K){case"youtube":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};case"twitter":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"instagram-feed":return{codec:"h264",maxWidth:1080,maxHeight:1080,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"instagram-story":case"instagram-reels":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"tiktok":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"discord":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:60,bitrate:8000000,audioCodec:"aac",audioBitrate:192000};case"linkedin":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"facebook":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"web-progressive":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000,twoPass:!0};case"web-streaming":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};default:return{}}}async function XJ(K){let J=await KJ();if(!J)return null;try{let X=JJ(K),Z=await new J.Input(X).getInfo();return{duration:Z.duration||0,width:Z.width||0,height:Z.height||0,frameRate:Z.frameRate||0,bitrate:Z.bitrate||0,codec:Z.videoCodec||"",audioCodec:Z.audioCodec}}catch(X){return console.warn(`[stx-media] Failed to analyze video: ${X}`),null}}async function wJ(K,J,X,N){let Z=await KJ();if(!Z)return console.warn("[stx-media] ts-videos not installed, skipping processing"),{src:K,processed:!1};let $=await q(K,J,X);if($)return $;try{let Y=JJ(K);if(!await B(Y))return{src:K,processed:!1,errors:[`Source file not found: ${K}`]};let z=X.outputDir||"dist/videos",G=X.baseUrl||"/videos";await QJ(z,{recursive:!0});let M=await x(Y),E=WJ(K,_J(K)),W={src:K,processed:!0,hash:M};N?.({percentage:5,stage:"analyzing"}),W.metadata=await XJ(Y)||void 0;let Q={};if(J.quality)Q.bitrate=MJ(J.quality);if(J.platform)Object.assign(Q,OJ(J.platform));if(J.transcode)Object.assign(Q,J.transcode);if(Object.keys(Q).length>0||J.process){N?.({percentage:10,stage:"transcoding"});let _=`${E}-${M}.mp4`,O=LJ(z,_);try{let L=await AJ(Y,O,Q,Z,(w)=>N?.({percentage:10+w*0.5,stage:"transcoding"}));if(L)W.transcoded={path:O,url:`${G}/${_}`,duration:L.duration,size:L.size,video:{codec:Q.codec||"h264",width:L.width,height:L.height,bitrate:L.bitrate,frameRate:L.frameRate},audio:L.audioCodec?{codec:Q.audioCodec||"aac",bitrate:Q.audioBitrate||128000,sampleRate:Q.sampleRate||48000,channels:Q.channels||2}:void 0}}catch(L){W.errors=W.errors||[],W.errors.push(`Transcoding failed: ${L}`)}}if(J.generatePoster){N?.({percentage:65,stage:"generating-poster"});let _=typeof J.generatePoster==="object"?J.generatePoster:{timestamp:0},O=await h(Y,_,z,G);if(O)W.poster=O}if(X.thumbnails?.enabled){N?.({percentage:70,stage:"generating-thumbnails"});let _=await d(Y,X.thumbnails,z,G);if(_.length>0)W.thumbnails=_}if(J.streaming){N?.({percentage:80,stage:"generating-manifests"});let _=typeof J.streaming==="object"?J.streaming:X.streaming||{format:"hls"};if(_.format==="hls"||_.format===void 0){let O=await p(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,hls:O}}if(_.format==="dash"){let O=await l(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,dash:O}}}if(J.spriteSheet)N?.({percentage:90,stage:"generating-sprite-sheet"});return N?.({percentage:100,stage:"complete"}),await b(K,J,W,X),W}catch(Y){return{src:K,processed:!1,errors:[`Processing failed: ${Y}`]}}}async function AJ(K,J,X,N,Z){try{let Y=await new N.Conversion(K,J,{videoCodec:X.codec,videoBitrate:X.bitrate,width:X.maxWidth,height:X.maxHeight,frameRate:X.frameRate,audioCodec:X.audioCodec,audioBitrate:X.audioBitrate,sampleRate:X.sampleRate,channels:X.channels}).run((z)=>{Z?.(z.percentage/100)});return{duration:Y.duration||0,size:Y.size||0,width:Y.width||X.maxWidth||0,height:Y.height||X.maxHeight||0,bitrate:Y.bitrate||X.bitrate||0,frameRate:Y.frameRate||X.frameRate||30,audioCodec:Y.audioCodec}}catch($){return console.error(`[stx-media] Transcoding failed: ${$}`),null}}export{V as
|
|
29
|
+
</MPD>`,z}function a(K){let J=Math.floor(K/3600),X=Math.floor(K%3600/60),N=Math.floor(K%60),Z="PT";if(J>0)Z+=`${J}H`;if(X>0)Z+=`${X}M`;return Z+=`${N}S`,Z}async function KJ(){try{return await import("ts-videos")}catch{return null}}function MJ(K){switch(K){case"very-low":return 500000;case"low":return 1e6;case"medium":return 2500000;case"high":return 5000000;case"very-high":return 1e7;case"lossless":return 0;default:return 2500000}}function OJ(K){switch(K){case"youtube":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};case"twitter":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"instagram-feed":return{codec:"h264",maxWidth:1080,maxHeight:1080,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"instagram-story":case"instagram-reels":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"tiktok":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"discord":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:60,bitrate:8000000,audioCodec:"aac",audioBitrate:192000};case"linkedin":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"facebook":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"web-progressive":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000,twoPass:!0};case"web-streaming":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};default:return{}}}async function XJ(K){let J=await KJ();if(!J)return null;try{let X=JJ(K),Z=await new J.Input(X).getInfo();return{duration:Z.duration||0,width:Z.width||0,height:Z.height||0,frameRate:Z.frameRate||0,bitrate:Z.bitrate||0,codec:Z.videoCodec||"",audioCodec:Z.audioCodec}}catch(X){return console.warn(`[stx-media] Failed to analyze video: ${X}`),null}}async function wJ(K,J,X,N){let Z=await KJ();if(!Z)return console.warn("[stx-media] ts-videos not installed, skipping processing"),{src:K,processed:!1};let $=await q(K,J,X);if($)return $;try{let Y=JJ(K);if(!await B(Y))return{src:K,processed:!1,errors:[`Source file not found: ${K}`]};let z=X.outputDir||"dist/videos",G=X.baseUrl||"/videos";await QJ(z,{recursive:!0});let M=await x(Y),E=WJ(K,_J(K)),W={src:K,processed:!0,hash:M};N?.({percentage:5,stage:"analyzing"}),W.metadata=await XJ(Y)||void 0;let Q={};if(J.quality)Q.bitrate=MJ(J.quality);if(J.platform)Object.assign(Q,OJ(J.platform));if(J.transcode)Object.assign(Q,J.transcode);if(Object.keys(Q).length>0||J.process){N?.({percentage:10,stage:"transcoding"});let _=`${E}-${M}.mp4`,O=LJ(z,_);try{let L=await AJ(Y,O,Q,Z,(w)=>N?.({percentage:10+w*0.5,stage:"transcoding"}));if(L)W.transcoded={path:O,url:`${G}/${_}`,duration:L.duration,size:L.size,video:{codec:Q.codec||"h264",width:L.width,height:L.height,bitrate:L.bitrate,frameRate:L.frameRate},audio:L.audioCodec?{codec:Q.audioCodec||"aac",bitrate:Q.audioBitrate||128000,sampleRate:Q.sampleRate||48000,channels:Q.channels||2}:void 0}}catch(L){W.errors=W.errors||[],W.errors.push(`Transcoding failed: ${L}`)}}if(J.generatePoster){N?.({percentage:65,stage:"generating-poster"});let _=typeof J.generatePoster==="object"?J.generatePoster:{timestamp:0},O=await h(Y,_,z,G);if(O)W.poster=O}if(X.thumbnails?.enabled){N?.({percentage:70,stage:"generating-thumbnails"});let _=await d(Y,X.thumbnails,z,G);if(_.length>0)W.thumbnails=_}if(J.streaming){N?.({percentage:80,stage:"generating-manifests"});let _=typeof J.streaming==="object"?J.streaming:X.streaming||{format:"hls"};if(_.format==="hls"||_.format===void 0){let O=await p(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,hls:O}}if(_.format==="dash"){let O=await l(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,dash:O}}}if(J.spriteSheet)N?.({percentage:90,stage:"generating-sprite-sheet"});return N?.({percentage:100,stage:"complete"}),await b(K,J,W,X),W}catch(Y){return{src:K,processed:!1,errors:[`Processing failed: ${Y}`]}}}async function AJ(K,J,X,N,Z){try{let Y=await new N.Conversion(K,J,{videoCodec:X.codec,videoBitrate:X.bitrate,width:X.maxWidth,height:X.maxHeight,frameRate:X.frameRate,audioCodec:X.audioCodec,audioBitrate:X.audioBitrate,sampleRate:X.sampleRate,channels:X.channels}).run((z)=>{Z?.(z.percentage/100)});return{duration:Y.duration||0,size:Y.size||0,width:Y.width||X.maxWidth||0,height:Y.height||X.maxHeight||0,bitrate:Y.bitrate||X.bitrate||0,frameRate:Y.frameRate||X.frameRate||30,audioCodec:Y.audioCodec}}catch($){return console.error(`[stx-media] Transcoding failed: ${$}`),null}}export{V as Mg,q as Ng,b as Og,$J as Pg,h as Qg,d as Rg,zJ as Sg,p as Tg,l as Ug,XJ as Vg,wJ as Wg};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function D(j){return j}class F{plugins=new Map;sortedPlugins=[];initialized=!1;async register(j,q){if(this.plugins.has(j.name))throw Error(`Plugin "${j.name}" is already registered`);if(j.dependencies){for(let w of j.dependencies)if(!this.plugins.has(w))throw Error(`Plugin "${j.name}" depends on "${w}" which is not registered`)}if(this.plugins.set(j.name,j),j.onRegister)await j.onRegister(q);this.sortPlugins()}async unregister(j){let q=this.plugins.get(j);if(!q)return!1;for(let[w,z]of this.plugins)if(z.dependencies?.includes(j))throw Error(`Cannot unregister "${j}" because "${w}" depends on it`);if(q.onUnregister)await q.onUnregister();return this.plugins.delete(j),this.sortPlugins(),!0}get(j){return this.plugins.get(j)}has(j){return this.plugins.has(j)}getAll(){return[...this.sortedPlugins]}getAllDirectives(){let j=[];for(let q of this.sortedPlugins)if(q.registerDirectives)j.push(...q.registerDirectives());return j}getAllFilters(){let j={};for(let q of this.sortedPlugins)if(q.registerFilters)Object.assign(j,q.registerFilters());return j}async runBeforeProcess(j){return this.runHooks("beforeProcess",j)}async runAfterParse(j){return this.runHooks("afterParse",j)}async runBeforeDirective(j,q){return this.runDirectiveHooks("beforeDirective",j,q)}async runAfterDirective(j,q){return this.runDirectiveHooks("afterDirective",j,q)}async runBeforeRender(j){return this.runHooks("beforeRender",j)}async runAfterRender(j){return this.runHooks("afterRender",j)}async runOnError(j){for(let q of this.sortedPlugins)if(q.onError)try{let w=await q.onError(j);if(w){if(w.template!==void 0)j.template=w.template;if(w.context)j.context={...j.context,...w.context};if(w.metadata)j.metadata={...j.metadata,...w.metadata};if(w.skip)return j}}catch(w){console.error(`Error in plugin "${q.name}" onError hook:`,w)}return null}sortPlugins(){this.sortedPlugins=Array.from(this.plugins.values()).sort((j,q)=>(j.priority??100)-(q.priority??100))}async runHooks(j,q){let w={...q};for(let z of this.sortedPlugins){let B=z[j];if(B)try{let y=await B(w);if(y){if(y.template!==void 0)w.template=y.template;if(y.context)w.context={...w.context,...y.context};if(y.metadata)w.metadata={...w.metadata,...y.metadata};if(y.skip)break}}catch(y){console.error(`Error in plugin "${z.name}" ${j} hook:`,y)}}return w}async runDirectiveHooks(j,q,w){let z={...w};for(let B of this.sortedPlugins){let y=B[j];if(y)try{let A=await y(q,z);if(A){if(A.template!==void 0)z.template=A.template;if(A.context)z.context={...z.context,...A.context};if(A.metadata)z.metadata={...z.metadata,...A.metadata};if(A.skip)break}}catch(A){console.error(`Error in plugin "${B.name}" ${j} hook:`,A)}}return z}}var G=new F;function H(j,q,w={}){return{name:j,...w,registerDirectives:()=>q}}function I(j,q,w={}){return{name:j,...w,registerFilters:()=>q}}var J=D({name:"stx-debug",version:"1.0.0",description:"Logs all plugin lifecycle events for debugging",priority:0,beforeProcess(j){console.log("[stx-debug] beforeProcess:",j.filePath)},afterParse(j){console.log("[stx-debug] afterParse:",j.template.length,"chars")},beforeDirective(j,q){console.log("[stx-debug] beforeDirective:",j)},afterDirective(j,q){console.log("[stx-debug] afterDirective:",j)},beforeRender(j){console.log("[stx-debug] beforeRender")},afterRender(j){console.log("[stx-debug] afterRender:",j.template.length,"chars")},onError(j){console.error("[stx-debug] onError:",j.error.message,"in phase:",j.phase)}}),K=D({name:"stx-timing",version:"1.0.0",description:"Measures template processing time",priority:1,beforeProcess(j){j.metadata.startTime=performance.now()},afterRender(j){let q=j.metadata.startTime;if(q){let w=performance.now()-q;console.log(`[stx-timing] Processing took ${w.toFixed(2)}ms`)}}});function L(j){return D({name:"stx-variables",version:"1.0.0",description:"Adds predefined variables to template context",beforeProcess(q){return{context:{...q.context,...j}}}})}
|
|
3
|
-
export{D as
|
|
3
|
+
export{D as Xg,F as Yg,G as Zg,H as _g,I as $g,J as ah,K as bh,L as ch};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{km as a,lm as b,mm as c,nm as d,om as e,pm as f,qm as g,rm as h,sm as i,tm as j,um as k,vm as l,wm as m,xm as n,ym as o}from"./chunk-6ea3th9j.js";import"./chunk-4awxsp8f.js";import"./chunk-hk8j3eps.js";import"./chunk-mxva4zmq.js";import"./chunk-1kg9sz9a.js";import"./chunk-87rj95tw.js";import"./chunk-74r77tz1.js";import"./chunk-xgtcq9bj.js";import"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-xaqjtned.js";import"./chunk-7kpfk426.js";import"./chunk-2tew0h6f.js";import"./chunk-yx8vftp0.js";export{h as usesSignalsInScript,o as unescapeHtml,c as registerFilters,b as registerFilter,l as processExpressions,k as interpolateScriptsInTemplate,i as interpolateScriptExpressions,j as interpolateScriptAttributes,d as getAllFilters,n as evaluateExpression,g as escapeHtmlValue,f as escapeHtml,a as defaultFilters,e as clearCustomFilters,m as applyFilters};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{Broadcast as D,BroadcastServer as U}from"ts-broadcasting";import{channel as b}from"ts-broadcasting";import{Broadcast as N,BroadcastServer as p}from"ts-broadcasting";var z=null,H=[];function X(){return z}async function Y(j){if(z)return z;let k=j.driver??"bun",q=j.host??"0.0.0.0",G=j.port??6001,J=j.scheme??"ws",E={verbose:j.verbose??!1,driver:k,default:k,connections:{[k]:{driver:k,host:q,port:G,scheme:J}}};return z=new U(E),D.setServer(z),await z.start(),z}async function Z(){for(let j of H)clearInterval(j);if(H.length=0,!z)return;await z.stop(),z=null}async function $(j){let k=await import(j),q=k.default??k;if(typeof q!=="function")throw Error(`routes/channels.ts must export a default function, got ${typeof q}`);let G=0;return q({channel(E,A){if(G++,A.authorize&&z)z.channels.channel(E,A.authorize);if(A.interval&&A.data){let L=A.event??`${E}.updated`,M=A.data,Q=setInterval(async()=>{try{let T=await M();V(E,L,T)}catch{}},A.interval);H.push(Q)}}}),G}var K=!1;function F(){if(z)return!0;if(!K)K=!0,console.warn("[stx] broadcast() called before server started \u2014 messages will be sent once broadcasting is ready");return!1}function V(j,k,q){if(!F())return;D.send(j,k,q)}function x(j,k,q){if(!F())return;D.toUser(j,k,q)}function C(j,k,q){if(!F())return;D.toUsers(j,k,q)}function S(j,k,q){if(!F())return;D.send(`private-${j}`,k,q)}function w(j,k,q){if(!F())return;D.presence(j,k,q)}
|
|
3
|
-
export{X as
|
|
3
|
+
export{X as Xf,Y as Yf,Z as Zf,$ as _f,V as $f,x as ag,C as bg,S as cg,w as dg,b as eg,N as fg,p as gg};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Dq as X,vm as W}from"./chunk-6ea3th9j.js";import V from"fs";import M from"path";import*as Y from"readline";var j={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},Q={help:{description:"Show available commands",usage:"help [command]",handler:async(q,z)=>{if(q[0]&&Q[q[0]]){let A=Q[q[0]];console.log(`
|
|
3
3
|
${j.bold}${q[0]}${j.reset} - ${A.description}`),console.log(` Usage: ${j.cyan}${A.usage}${j.reset}
|
|
4
4
|
`)}else{console.log(`
|
|
5
5
|
${j.bold}Available Commands:${j.reset}
|
|
@@ -21,4 +21,4 @@ ${j.bold}${j.blue}stx Interactive Mode${j.reset}
|
|
|
21
21
|
${j.dim}Type 'help' for available commands, 'exit' to quit${j.reset}
|
|
22
22
|
`);let B=()=>{let G=z.cwd.replace(process.env.HOME||"","~");A.question(`${j.cyan}stx${j.reset} ${j.dim}${G}${j.reset} ${j.green}>${j.reset} `,async(I)=>{let K=I.trim();if(!K){if(z.running)B();return}z.history.push(K);let L=K.match(/(?:[^\s"]|"[^"]*")+/g)||[],J=L[0]?.toLowerCase(),O=L.slice(1).map((U)=>U.replace(/^"|"$/g,""));if(J&&Q[J])try{await Q[J].handler(O,z)}catch(U){console.log(`${j.red}Error:${j.reset}`,U)}else if(J)if(K.includes("{{")||K.includes("}}"))try{let U=await W(K,z.context,"eval");console.log(`${j.green}\u2192${j.reset} ${U}`)}catch{console.log(`${j.red}Unknown command: ${J}${j.reset}`),console.log(`${j.dim}Type 'help' for available commands${j.reset}`)}else console.log(`${j.red}Unknown command: ${J}${j.reset}`),console.log(`${j.dim}Type 'help' for available commands${j.reset}`);if(z.running)B();else A.close()})};A.on("SIGINT",()=>{console.log(`
|
|
23
23
|
${j.dim}(Use 'exit' to quit)${j.reset}`),B()}),B()}
|
|
24
|
-
export{R as
|
|
24
|
+
export{R as Ff};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Nj as a,Oj as b,Pj as c,Qj as d,Rj as e,Sj as f,Tj as g,Uj as h,Vj as i,Wj as j,Xj as k}from"./chunk-264rn67f.js";import"./chunk-6ea3th9j.js";import"./chunk-4awxsp8f.js";import"./chunk-hk8j3eps.js";import"./chunk-mxva4zmq.js";import"./chunk-1kg9sz9a.js";import"./chunk-87rj95tw.js";import"./chunk-74r77tz1.js";import"./chunk-xgtcq9bj.js";import"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-xaqjtned.js";import"./chunk-7kpfk426.js";import"./chunk-2tew0h6f.js";import"./chunk-yx8vftp0.js";export{a as templateCache,b as readFileCached,d as invalidateFileCacheByDir,c as invalidateFileCache,k as hashFilePath,f as getCachedSignalsRuntime,g as getCachedRouterScript,h as clearDevCaches,i as checkCache,j as cacheTemplate,e as __setSignalsGeneratorsForTest};
|
|
@@ -394,4 +394,4 @@ else {
|
|
|
394
394
|
${JSON.stringify(j)}
|
|
395
395
|
</script>
|
|
396
396
|
`}var r={processPartialHydrationDirectives:b,processStaticDirectives:x,generatePartialHydrationCSS:H,generateIslandManifest:y,createIslandRegistry:f,hydrateIsland:S,hydrateByStrategy:h,hydrateAll:g,isHydrated:v,onHydrated:u};
|
|
397
|
-
export{B as
|
|
397
|
+
export{B as Fi,I as Gi,E as Hi,V as Ii,f as Ji,b as Ki,H as Li,S as Mi,h as Ni,g as Oi,v as Pi,u as Qi,x as Ri,y as Si,r as Ti};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Dq as k,Gl as A,Hl as D,Qm as T,Rm as y,Vo as x,Xl as B,Zl as F,_r as w,ap as M,rp as R}from"./chunk-6ea3th9j.js";import{Gu as P}from"./chunk-yx8vftp0.js";function b(K){return K.endsWith(".md")||K.endsWith(".markdown")}function C(K){let z=[];_(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let G=[...z];_(/<code\b[^>]*>[\s\S]*?<\/code>/gi,G);function _(J,X){let $;while(($=J.exec(K))!==null){let q=$.index,N=q+$[0].length;if(X?.some((Y)=>q>=Y.start&&N<=Y.end))continue;z.push({start:q,end:N})}}if(z.length===0)return K;z.sort((J,X)=>J.start-X.start);let U="",Q=0;for(let J of z){if(J.start<Q)continue;U+=K.slice(Q,J.start),U+=`@raw${K.slice(J.start,J.end)}@endraw`,Q=J.end}return U+=K.slice(Q),U}async function j(K,z={}){let{data:G,content:_}=A(K),Q=await(z.renderer??((J)=>D(J)))(_);return{html:C(Q),frontmatter:G??{}}}import{dirname as v,resolve as H}from"path";function f(K){let z=K,G=x(K);if(G)z=G.content.trim();let _=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,U=[],Q=[],J=[],X=(N)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(N),$;while(($=_.exec(K))!==null){let N=$[1],Y=$[2],E=$[0],Z=N.includes("server");if(X(Y))J.push(E);else if(Z)Q.push(Y);else U.push(E)}let q=z;{let N=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,Y,E=[];while((Y=N.exec(q))!==null){let Z=Y.index+Y[0].length,L=q.indexOf("</script>",Z);if(L===-1)continue;E.push({start:Y.index,end:L+9}),N.lastIndex=L+9}for(let Z=E.length-1;Z>=0;Z--)q=q.substring(0,E[Z].start)+q.substring(E[Z].end)}for(let N of U)q=q.replace(N,"");return{templateContent:q,serverScripts:Q,clientScripts:U,signalsScripts:J}}function g(K,z){return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -9,10 +9,10 @@ import{Bq as k,Fl as A,Gl as D,Pm as T,Qm as y,Uo as x,Wl as B,Yl as F,Yr as w,a
|
|
|
9
9
|
<body>
|
|
10
10
|
${K}
|
|
11
11
|
</body>
|
|
12
|
-
</html>`}async function s(K,z={}){let G=H(K),_=Bun.file(G);if(!await _.exists())throw Error(`Template file not found: ${G}`);let U=await _.text(),Q=null;if(b(G)){let J=await j(U,{renderer:z.markdownRenderer});U=J.html,Q=J.frontmatter}if(Q)z={...z,context:{...Q,...z.context||{}}};if(z.layout){let J=H(z.layout),X=Bun.file(J);if(!await X.exists())throw Error(`Layout template not found: ${J}`);let{layout:$,injectCSS:q,...N}=z,Y=await I(U,G,{...N,injectCSS:!1}),E=await X.text(),Z={...z.context||{},content:Y},L={...N,context:Z,injectCSS:q};return I(E,J,L)}return I(U,G,z)}async function i(K,z={},G={}){return I(K,process.cwd(),{context:z,...G})}async function I(K,z,G={}){let{templateContent:_,serverScripts:U,clientScripts:Q}=f(K),J={...w,...G.options},X={__filename:z,__dirname:v(z),__stx:{},__stx_options:J,__stx_sfc_mode:!0,__stx_inject_css:G.injectCSS===!0,__stxServeContext:void 0,...y(G.context??{}),definePageMeta:()=>{},...G.context||{}};for(let N of U)await
|
|
12
|
+
</html>`}async function s(K,z={}){let G=H(K),_=Bun.file(G);if(!await _.exists())throw Error(`Template file not found: ${G}`);let U=await _.text(),Q=null;if(b(G)){let J=await j(U,{renderer:z.markdownRenderer});U=J.html,Q=J.frontmatter}if(Q)z={...z,context:{...Q,...z.context||{}}};if(z.layout){let J=H(z.layout),X=Bun.file(J);if(!await X.exists())throw Error(`Layout template not found: ${J}`);let{layout:$,injectCSS:q,...N}=z,Y=await I(U,G,{...N,injectCSS:!1}),E=await X.text(),Z={...z.context||{},content:Y},L={...N,context:Z,injectCSS:q};return I(E,J,L)}return I(U,G,z)}async function i(K,z={},G={}){return I(K,process.cwd(),{context:z,...G})}async function I(K,z,G={}){let{templateContent:_,serverScripts:U,clientScripts:Q}=f(K),J={...w,...G.options},X={__filename:z,__dirname:v(z),__stx:{},__stx_options:J,__stx_sfc_mode:!0,__stx_inject_css:G.injectCSS===!0,__stxServeContext:void 0,...y(G.context??{}),definePageMeta:()=>{},...G.context||{}};for(let N of U)await R(N,X,z);let $=new Set,q=_;if(q=await k(q,X,z,J,$),T(X,G.context),G.templateOnly){if(q=q.replace(/<script data-stx-scoped>[\s\S]*?<\/script>\s*/gi,""),q=q.replace(/<!-- stx SEO Tags -->[\s\S]*?(?=<)/i,""),Q.length>0)q+=`
|
|
13
13
|
${Q.join(`
|
|
14
14
|
`)}`}else{if(G.processClientScripts!==!1&&Q.length>0){let N=X.__stx_event_bindings||[],Y=B(X),Z=(await Promise.all(Q.map(async(V)=>{let W=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!W)return V;return await F(W[1],{eventBindings:N,templateContent:q,serverData:Y,filePath:z})}))).join(`
|
|
15
15
|
`);if(q.match(/(<\/body>)/i))q=q.replace(/(<\/body>)/i,`${Z}
|
|
16
16
|
$1`);else q+=`
|
|
17
|
-
${Z}`}q=await
|
|
18
|
-
export{b as
|
|
17
|
+
${Z}`}q=await M(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=g(q,G.title)}if(G.injectCSS)try{let{injectCrosswindCSS:N}=await import("./chunk-v2qx1jrb.js");q=await N(q)}catch{}return q}
|
|
18
|
+
export{b as pk,C as qk,j as rk,s as sk,i as tk,I as uk};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{gl as _,hl as h}from"./chunk-r84h7wxw.js";import{Pl as g,bs as p}from"./chunk-6ea3th9j.js";import{it as N}from"./chunk-xgtcq9bj.js";import W from"path";import q from"fs";var l=5,u=1;function t(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function L(...J){if(t())console.log("[stx:bundler]",...J)}var D=[];function v(J,K,$){D.push({filePath:J||"<inline>",message:K,details:$})}function Yz(){return D.slice()}function Zz(){D.length=0}var F;function $z(J){F=J}function b(){if(F)return F;try{let J=p.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var f=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function wz(J){let K=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,$;while(($=K.exec(J))!==null){let M=$[1];if(!f.some((z)=>z.test(M)))return L("detected user import:",M),!0}let Q=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while(($=Q.exec(J))!==null){let M=$[1];if(/\.css(?:\?.*)?$/.test(M))continue;if(!f.some((z)=>z.test(M)))return L("detected side-effect import:",M),!0}return!1}function i(J,K,$,Q){let M=(Z,z)=>{let G=Z===$?K:W.dirname(Z),Y=W.resolve(G,z),H=[Y,`${Y}.ts`,`${Y}.tsx`,`${Y}.js`,`${Y}.mjs`,`${Y}.jsx`,W.join(Y,"index.ts"),W.join(Y,"index.tsx"),W.join(Y,"index.js"),W.join(Y,"index.mjs")];for(let j of H)try{if(q.existsSync(j)&&q.statSync(j,{throwIfNoEntry:!1})?.isFile())return j}catch{}return Y};return{name:"stx-client-bundle",setup(Z){Z.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(z)=>({path:z.path,external:!0})),Z.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(z)=>({path:z.path,external:!0})),Z.onResolve({filter:/^\//},(z)=>{if(q.existsSync(z.path))return{path:z.path};return{path:z.path,external:!0}}),Z.onResolve({filter:/^\.\.?\//},(z)=>{let G=M(z.importer,z.path);return Q.add(G),{path:G}}),Z.onResolve({filter:/^[@~]\//},(z)=>{let G=W.resolve(J,z.path.slice(2)),Y=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,W.join(G,"index.ts"),W.join(G,"index.tsx"),W.join(G,"index.js"),W.join(G,"index.mjs")];for(let H of Y)if(q.existsSync(H)&&q.statSync(H,{throwIfNoEntry:!1})?.isFile())return L(`resolved ${z.path[0]}/ import:`,z.path,"\u2192",H),Q.add(H),{path:H};return console.warn(`[stx:bundler] could not resolve ${z.path[0]}/ import:`,z.path),{path:G}}),Z.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(z)=>{let G=W.extname(z.path).toLowerCase(),Y=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(z.path!==$)Q.add(z.path);return{contents:q.readFileSync(z.path,"utf8"),loader:Y}})}}}var R=new Map,m=Symbol.for("stx.client-bundle-build-queue");function s(J){let K=globalThis,Q=(K[m]??Promise.resolve()).then(J,J);return K[m]=Q.then(()=>{return},()=>{return}),Q}async function Qz(J,K,$={}){let Q=$.projectRoot||process.cwd(),M=$.minify??!1,Z=$.cacheDir||N(Q,"bundle-cache"),z=new Bun.CryptoHasher("md5");z.update(`${l}\x00${J}\x00${K}`);let G=z.digest("hex").slice(0,12),Y=W.join(Z,`${G}.js`),H=W.join(Z,`${G}.deps.json`),j=Bun.file(Y);if(await j.exists()){let V=Bun.file(H),k=!0;if(await V.exists())try{let T=JSON.parse(await V.text());if(T.metadataVersion!==u||!Array.isArray(T.files))k=!1;for(let S of Array.isArray(T.files)?T.files:[])try{if(q.statSync(S.path).mtimeMs!==S.mtimeMs){k=!1;break}}catch{k=!1;break}}catch{k=!1}if(k)return L("cache hit:",G),await j.text();L("cache invalidated by dep change:",G)}let y=R.get(G);if(y)return await y;let x=s(()=>a(J,K,{projectRoot:Q,minify:M,cacheDir:Z,hash:G,cachePath:Y,depsPath:H}));R.set(G,x);try{return await x}finally{R.delete(G)}}async function a(J,K,$){let{projectRoot:Q,minify:M,cacheDir:Z,hash:z,cachePath:G,depsPath:Y}=$,H=N(Q,"bundle-tmp"),j=W.join(H,`${z}.ts`),y=W.join(H,"out",z);q.mkdirSync(H,{recursive:!0}),q.mkdirSync(y,{recursive:!0});let x=W.dirname(K),V=[],k=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,T=/^(export\s+)?(?:async\s+)?function\s+(\w+)/gm,S;while((S=k.exec(J))!==null){if(S[1])continue;if(S[2])S[2].split(",").forEach((I)=>{let X=I.split(":")[0].trim();if(X)V.push(X)});else if(S[3])V.push(S[3])}while((S=T.exec(J))!==null){if(S[1])continue;V.push(S[2])}let B=V.length>0?`
|
|
3
3
|
export { ${V.join(", ")} }`:"";await Bun.write(j,J+B),L("bundling:",z,"from:",W.basename(K));let P=new Set;try{let I=await Bun.build({entrypoints:[j],outdir:y,target:"browser",format:"esm",minify:M,plugins:[i(Q,x,j,P)],define:{"process.env.NODE_ENV":M?'"production"':'"development"',...g()},root:Q});if(!I.success){let U=I.logs.filter((C)=>C.level==="error").map((C)=>C.message).join(", ")||`Unable to bundle ${W.basename(K)}`,A=_(I.logs,K||void 0);if(console.warn("[stx:bundler] build failed:",U),v(K||"",U,A),b()==="error")throw Error(U);return J}let X="";for(let w of I.outputs){X=await w.text();break}let O=[];for(let w of X.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let U of w[1].split(",")){let A=U.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(A){O.push([A[2],A[1]]);continue}let C=U.trim();if(/^[A-Za-z_$][\w$]*$/.test(C))O.push([C,C])}let c=X.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];X=X.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let E=`__stxBundle_${z}`,n=O.map(([w,U])=>`${JSON.stringify(w)}: ${U}`).join(", "),o=O.map(([w])=>`var ${w} = undefined;`).join(`
|
|
4
4
|
`),r=O.map(([w])=>`${w} = ${E}[${JSON.stringify(w)}];`).join(`
|
|
5
5
|
`);if(X=`${c.join(`
|
|
@@ -10,4 +10,4 @@ ${X}
|
|
|
10
10
|
return { ${n} };
|
|
11
11
|
})();
|
|
12
12
|
${r}`.trim(),L("bundled:",z,"output:",X.length,"bytes"),V.length>0&&O.length===0)return console.warn(`[stx:bundler] dropped every binding for ${W.basename(K)} (${z}); serving the unbundled source and not caching this result`),J;q.mkdirSync(Z,{recursive:!0}),await Bun.write(G,X);let d=Array.from(P).map((w)=>{try{return{path:w,mtimeMs:q.statSync(w).mtimeMs}}catch{return null}}).filter((w)=>w!==null);return await Bun.write(Y,JSON.stringify({metadataVersion:u,files:d})),X}catch(I){let X=_(I,K||void 0),O=h(I,K||void 0);if(console.warn(`[stx:bundler] error: ${O}`),v(K||"",O,X),b()==="error")throw I;return J}finally{try{q.rmSync(j,{force:!0}),q.rmSync(y,{recursive:!0,force:!0})}catch{}}}
|
|
13
|
-
export{t as
|
|
13
|
+
export{t as Zk,v as _k,Yz as $k,Zz as al,$z as bl,b as cl,wz as dl,s as el,Qz as fl};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$ as Wk,$a as Nm,$b as eo,$c as ep,$d as eq,A as Gj,Aa as Yl,Ab as yn,Ac as Fo,Ad as Fp,Ae as Lq,B as Hj,Ba as Zl,Bb as zn,Bc as Go,Bd as Gp,Be as Mq,C as Ij,Ca as km,Cb as An,Cc as Ho,Cd as Hp,Ce as Nq,D as Jj,Da as lm,Db as Bn,Dc as Io,Dd as Ip,De as Oq,E as zk,Ea as mm,Eb as Cn,Ec as Jo,Ed as Jp,Ee as Pq,F as Ak,Fa as nm,Fb as Dn,Fc as Ko,Fd as Kp,Fe as Qq,G as Bk,Ga as om,Gb as En,Gc as Lo,Gd as Lp,Ge as Rq,H as Ck,Ha as sm,Hb as Fn,Hc as Mo,Hd as Mp,He as Sq,I as Dk,Ia as tm,Ib as Gn,Ic as No,Id as Np,Ie as Tq,J as Ek,Ja as um,Jb as Hn,Jc as Oo,Jd as Op,Je as Uq,K as Fk,Ka as vm,Kb as In,Kc as Po,Kd as Pp,Ke as Vq,L as Gk,La as wm,Lb as Jn,Lc as Qo,Ld as Qp,Le as Wq,M as Hk,Ma as xm,Mb as Kn,Mc as Ro,Md as Rp,Me as Xq,N as Ik,Na as ym,Nb as Rn,Nc as So,Nd as Sp,Ne as Yq,O as Jk,Oa as zm,Ob as Sn,Oc as To,Od as Tp,Oe as Zq,P as Kk,Pa as Am,Pb as Tn,Pc as Uo,Pd as Up,Pe as _q,Q as Lk,Qa as Bm,Qb as Un,Qc as Vo,Qd as Vp,Qe as $q,R as Mk,Ra as Cm,Rb as Vn,Rc as Wo,Rd as Wp,Re as ar,S as Nk,Sa as Dm,Sb as Wn,Sc as Xo,Sd as Xp,Se as br,T as Ok,Ta as Em,Tb as Xn,Tc as Yo,Td as Yp,Te as cr,U as Pk,Ua as Fm,Ub as Yn,Uc as Zo,Ud as Zp,Ue as dr,V as Qk,Va as Gm,Vb as Zn,Vc as _o,Vd as _p,Ve as er,W as Rk,Wa as Hm,Wb as _n,Wc as $o,Wd as $p,We as fr,X as Sk,Xa as Jm,Xb as $n,Xc as ap,Xd as aq,Xe as gr,Y as Tk,Ya as Km,Yb as ao,Yc as bp,Yd as bq,Z as Uk,Za as Lm,Zb as bo,Zc as cp,Zd as cq,_ as Vk,_a as Mm,_b as co,_c as dp,_d as dq,aa as Xk,ab as Om,ac as fo,ad as fp,ae as fq,ba as Yk,bb as Pm,bc as go,bd as gp,be as gq,ca as Zk,cb as Qm,cc as ho,cd as hp,ce as hq,da as _k,db as Rm,dc as io,dd as ip,de as iq,ea as $k,eb as Sm,ec as jo,ed as jp,ee as jq,fa as al,fb as Tm,fc as ko,fd as kp,fe as kq,ga as bl,gb as Um,gc as lo,gd as lp,ge as lq,ha as cl,hb as Vm,hc as mo,hd as mp,he as mq,ia as dl,ib as Wm,ic as no,id as np,ie as nq,ja as el,jb as Xm,jc as oo,jd as op,je as oq,ka as fl,kb as Ym,kc as po,kd as pp,ke as pq,la as gl,lb as Zm,lc as qo,ld as qp,le as qq,ma as hl,mb as _m,mc as ro,md as rp,me as rq,na as il,nb as $m,nc as so,nd as sp,ne as sq,o as a,oa as jl,ob as cn,oc as to,od as tp,oe as zq,p as rj,pa as Nl,pb as dn,pc as uo,pd as up,pe as Aq,q as sj,qa as Ol,qb as en,qc as vo,qd as vp,qe as Bq,r as tj,ra as Pl,rb as fn,rc as wo,rd as wp,re as Cq,s as uj,sa as Ql,sb as mn,sc as xo,sd as xp,se as Dq,t as vj,ta as Rl,tb as nn,tc as yo,td as yp,te as Eq,u as wj,ua as Sl,ub as on,uc as zo,ud as zp,ue as Fq,v as xj,va as Tl,vb as pn,vc as Ao,vd as Ap,ve as Gq,w as yj,wa as Ul,wb as un,wc as Bo,wd as Bp,we as Hq,x as zj,xa as Vl,xb as vn,xc as Co,xd as Cp,xe as Iq,y as Ej,ya as Wl,yb as wn,yc as Do,yd as Dp,ye as Jq,z as Fj,za as Xl,zb as xn,zc as Eo,zd as Ep,ze as Kq}from"./chunk-xvmvbkwy.js";import{$e as Nj,Ye as Kj,Ze as Lj,_e as Mj,af as Oj,bf as Pj,cf as Qj,df as Rj,ef as Sj,ff as Tj,gf as Uj,hf as Vj,if as Wj,jf as Xj,kf as Yj}from"./chunk-jy6madxa.js";import{lf as nk,mf as ok,nf as pk,of as qk,pf as rk,qf as sk,rf as tk,sf as uk,tf as vk,uf as wk,vf as xk,wf as yk}from"./chunk-1nztpv0g.js";import{Af as On,Bf as Pn,Cf as Qn,xf as Ln,yf as Mn,zf as Nn}from"./chunk-2v320r60.js";import{Df as an,Ef as bn}from"./chunk-vzskgbqj.js";import{Ff as gn}from"./chunk-d2x4ma3m.js";import{Gf as Bl,Hf as Cl,If as Dl,Jf as El,Kf as Hl,Lf as Ll}from"./chunk-exaa3t0c.js";import{Mf as Fl,Pf as Gl}from"./chunk-qsdv9c1c.js";import{$f as cm,Xf as _l,Yf as $l,Zf as am,_f as bm,ag as dm,bg as em,cg as fm,dg as gm,eg as hm,fg as im,gg as jm}from"./chunk-d19bydks.js";import{hg as lk,ig as mk}from"./chunk-fexeqbkk.js";import{jg as Ml}from"./chunk-1h0twjzw.js";import{kg as pm,lg as qm,mg as rm,ng as Im,og as hn,pg as jn,qg as kn,rg as ln,sg as qn,tg as rn,ug as sn,vg as tn}from"./chunk-rmrxs0qz.js";import{Ag as ol,Bg as pl,Cg as ql,Dg as rl,Eg as sl,Fg as tl,Gg as ul,Hg as vl,Ig as wl,Jg as Il,Kg as Jl,Lg as Kl,wg as kl,xg as ll,yg as ml,zg as nl}from"./chunk-y7z44vr9.js";import{Mg as Gi,Ng as Hi,Og as Ii,Pg as Ji,Qg as Ki,Rg as Li,Sg as Mi,Tg as Ni,Ug as Oi,Vg as Pi,Wg as Qi}from"./chunk-c5411vve.js";import{Xg as gj,Zg as hj}from"./chunk-cs1dc1n7.js";import{dh as Zj,eh as _j,fh as $j,gh as ak,hh as bk,ih as ck,jh as dk,lh as ek,mh as fk,nh as gk,oh as hk,ph as ik,qh as jk,th as kk}from"./chunk-2w64hysh.js";import{uh as Sg,vh as Tg,wh as Ug,xh as Vg}from"./chunk-tv4n71jy.js";import{Ch as Wg}from"./chunk-rbke5wqk.js";import{Dh as bh,Eh as ch,Fh as dh,Gh as eh,Hh as fh,Ih as gh}from"./chunk-gzf1dg38.js";import{Jh as vi,Kh as wi,Lh as xi,Ph as yi,Qh as zi,Rh as Ai}from"./chunk-hh6yxbyv.js";import{$h as ti,Sh as li,Th as mi,Uh as ni,Vh as oi,Wh as pi,Yh as qi,Zh as ri,_h as si,ai as ui}from"./chunk-j93x5fzs.js";import{bi as bg,ci as cg,di as dg,ei as eg,fi as fg,gi as gg}from"./chunk-ntnv2f7a.js";import{hi as hg,ii as ig,ji as jg,ki as kg,li as lg}from"./chunk-1gdzz04h.js";import{mi as mg,ni as ng,oi as og,pi as pg,qi as qg}from"./chunk-ssfhndm6.js";import{ri as rg,si as sg,ti as tg,ui as ug,vi as vg,wi as wg,xi as xg}from"./chunk-94fee5jw.js";import{Ai as Ag,Bi as Bg,Ci as Cg,Di as Dg,yi as yg,zi as zg}from"./chunk-pv9at6r1.js";import{Fi as Eg,Gi as Fg,Hi as Gg,Ii as Hg,Ji as Ig,Ki as Jg,Li as Kg,Mi as Lg,Ni as Mg,Oi as Ng,Pi as Og,Qi as Pg,Ri as Qg,Si as Rg}from"./chunk-dq88kv1p.js";import{Ui as Xf,Vi as Yf}from"./chunk-9agksxkk.js";import{Yi as Zf}from"./chunk-5v3dv3xv.js";import"./chunk-ht51fz7w.js";import{aj as _f}from"./chunk-fvjh7rx0.js";import{bj as $f,cj as ag}from"./chunk-b6jhznkh.js";import{dj as Qd,ej as Rd,fj as Sd,gj as Td,hj as Ud,ij as Vd,jj as Wd,kj as Xd,lj as Yd,mj as Zd,nj as _d,oj as $d,pj as ae,qj as be}from"./chunk-b34x0v3f.js";import{rj as ye,sj as ze}from"./chunk-tbr46jye.js";import{Aj as le,Bj as me,Cj as ne,Dj as oe,Ej as pe,Fj as qe,Gj as re,Hj as se,Ij as te,Jj as ue,Kj as ve,Lj as we,Mj as xe,zj as ke}from"./chunk-nhmq45hh.js";import{Nj as Ae,Oj as Be,Pj as Ce,Qj as De,Rj as Ee,Sj as Fe,Tj as Ge,Uj as He,Vj as Ie,Wj as Je,Xj as Ke}from"./chunk-264rn67f.js";import{pk as tq,qk as uq,rk as vq,sk as wq,tk as xq,uk as yq}from"./chunk-dtfgxjy9.js";import{Ak as yl,Bk as zl,Ck as Al,vk as Aj,wk as Bj,xk as Cj,yk as Dj,zk as xl}from"./chunk-3zdkcdvf.js";import"./chunk-frp9fc7j.js";import"./chunk-r84h7wxw.js";import{$m as Gb,$n as Gc,$p as tf,$q as Ih,$r as jj,Al as da,Am as gb,An as fc,Ao as vd,Ap as Te,Aq as Uf,Ar as hi,Bl as ea,Bm as hb,Bn as gc,Bo as wd,Bp as Ue,Bq as Vf,Br as ii,Cl as fa,Cm as ib,Cn as hc,Co as xd,Cp as Ve,Cq as Wf,Cr as ji,Dl as ga,Dm as jb,Dn as ic,Do as yd,Dp as We,Dq as Xg,Dr as ki,El as ha,Em as kb,En as jc,Eo as zd,Ep as Xe,Eq as Yg,Er as Bi,Fl as ia,Fm as lb,Fn as kc,Fo as Ad,Fp as Ye,Fq as Zg,Fr as Ci,Gm as mb,Gn as lc,Go as Bd,Gp as Ze,Gq as _g,Gr as Di,Hn as mc,Ho as Cd,Hp as _e,Hq as $g,Hr as Ei,Il as ja,Im as nb,In as nc,Io as Dd,Ip as $e,Iq as ah,Ir as Fi,Jl as ka,Jm as ob,Jn as oc,Jo as Ed,Jp as af,Jq as hh,Jr as Ri,Kl as la,Km as pb,Kn as pc,Ko as Fd,Kp as bf,Kq as ih,Kr as Si,Ll as ma,Lm as qb,Ln as qc,Lo as Gd,Lp as cf,Lq as jh,Lr as Ti,Ml as na,Mm as rb,Mn as rc,Mo as Hd,Mp as df,Mq as kh,Mr as Ui,Nm as sb,Nn as sc,No as Id,Np as ef,Nq as lh,Nr as Vi,Om as tb,On as tc,Oo as Jd,Op as ff,Oq as mh,Or as Wi,Pl as qa,Pm as ub,Pn as uc,Po as Kd,Pp as gf,Pq as nh,Pr as Xi,Ql as ra,Qm as vb,Qn as vc,Qo as Ld,Qp as hf,Qq as oh,Qr as Yi,Rl as ya,Rm as wb,Rn as wc,Ro as Md,Rp as jf,Rq as ph,Rr as Zi,Sl as za,Sm as xb,Sn as xc,So as Nd,Sp as kf,Sq as qh,Sr as _i,Tl as Aa,Tm as yb,Tn as yc,To as Od,Tp as lf,Tq as rh,Tr as $i,Ul as Ba,Um as zb,Un as zc,Uo as Pd,Up as mf,Uq as sh,Ur as aj,Vl as Ca,Vm as Ab,Vn as Ac,Vp as nf,Vq as th,Vr as bj,Wl as Da,Wm as Bb,Wn as Bc,Wo as he,Wp as of,Wq as uh,Wr as cj,Xl as Ea,Xm as Cb,Xn as Cc,Xp as pf,Xq as vh,Xr as dj,Yl as Fa,Ym as Db,Yn as Dc,Yp as qf,Yq as wh,Yr as ej,Zl as Ga,Zm as Eb,Zn as Ec,Zo as ie,Zp as rf,Zq as xh,Zr as fj,_m as Fb,_n as Fc,_o as je,_p as sf,_q as Hh,_r as ij,an as Hb,ao as Hc,ap as Le,aq as uf,ar as Jh,as as kj,bn as Ib,bo as Ic,bq as vf,br as Kh,bs as lj,cm as Ha,cn as Jb,co as Jc,cq as wf,cr as Lh,cs as mj,dm as Ia,dn as Kb,do as Kc,dq as xf,dr as Mh,ds as nj,em as Ja,en as Lb,eo as Lc,eq as yf,er as Nh,es as oj,fm as Ka,fn as Mb,fo as Mc,fq as zf,fr as Oh,fs as pj,gm as La,gn as Nb,go as Nc,gq as Af,gr as Ph,gs as qj,hm as Ma,hn as Ob,ho as Oc,hq as Bf,hr as Qh,il as s,in as Pb,io as Pc,iq as Cf,ir as Rh,jl as t,jn as Qb,jo as Qc,jq as Df,jr as Sh,kl as u,km as Na,kn as Rb,ko as Rc,kq as Ef,kr as Th,ll as v,lm as Oa,ln as Sb,lo as Sc,lq as Ff,lr as Uh,ml as w,mm as Pa,mn as Tb,mo as Tc,mq as Gf,mr as Vh,nl as x,nm as Qa,nn as Ub,no as id,nq as Hf,nr as Wh,ol as y,om as Ra,on as Vb,oo as jd,oq as If,or as Xh,pl as z,pm as Sa,pn as Wb,po as kd,pq as Jf,pr as Yh,ql as A,qm as Ta,qn as Xb,qo as ld,qq as Kf,qr as Zh,rl as B,rm as Ua,rn as Yb,ro as md,rp as Me,rq as Lf,rr as _h,sl as C,sm as Va,sn as Zb,so as nd,sq as Mf,sr as $h,tl as D,tm as Wa,tn as _b,to as od,tp as Ne,tq as Nf,tr as ai,ul as E,um as Xa,un as $b,uo as pd,uq as Of,ur as bi,vl as F,vm as Ya,vn as ac,vo as qd,vp as Oe,vq as Pf,vr as ci,wl as G,wm as Za,wn as bc,wo as rd,wp as Pe,wq as Qf,wr as di,xl as H,xm as _a,xn as cc,xo as sd,xp as Qe,xq as Rf,xr as ei,yl as I,ym as $a,yn as dc,yo as td,yp as Re,yq as Sf,yr as fi,zl as J,zn as ec,zo as ud,zp as Se,zq as Tf,zr as gi}from"./chunk-6ea3th9j.js";import{hs as d,is as e,js as f,ks as g,ls as h,ms as i,ns as j,os as k,ps as l,qs as m,rs as n,ss as o,ts as p,us as q,vs as r}from"./chunk-4awxsp8f.js";import{As as Ch,Bs as Dh,Cs as Eh,Ds as Fh,Es as Gh,ws as yh,xs as zh,ys as Ah,zs as Bh}from"./chunk-hk8j3eps.js";import{Fs as b,Gs as c}from"./chunk-mxva4zmq.js";import{Hs as oa,Is as pa}from"./chunk-1kg9sz9a.js";import{Js as ab,Ks as bb,Ms as cb,Ws as db,Xs as eb,Ys as fb}from"./chunk-87rj95tw.js";import{$s as ee,Zs as ce,_s as de,at as fe,dt as ge}from"./chunk-74r77tz1.js";import{et as sa,ft as ta,gt as ua,ht as va,it as wa,jt as xa}from"./chunk-xgtcq9bj.js";import{kt as Uc,lt as Vc,mt as Wc,nt as Xc,ot as Yc,pt as Zc,qt as _c,rt as $c,st as ad,tt as bd,ut as cd,vt as dd,wt as ed,xt as fd,yt as gd,zt as hd}from"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-xaqjtned.js";import{Ot as K,Pt as L,St as M,Xt as N,Yt as O,cu as P,du as Q,eu as R,fu as S,gu as T,hu as U,iu as V,ju as W,ku as X,lu as Y,mu as Z,nu as _,ou as $,pu as aa,qu as ba,su as ca}from"./chunk-7kpfk426.js";import"./chunk-2tew0h6f.js";import"./chunk-yx8vftp0.js";export{Uj as writeNetlifyConfig,Jl as writeManifest,xk as writeImageManifest,_n as wrapComponentForHMR,Vq as withDefaults,fj as webComponentDirectiveHandler,Qo as watermark,Sp as watchViews,Hk as watchMultiple,Ik as watchEffect,Gk as watch,ge as warmImagePlaceholders,Vk as waitForStore,Hd as waitForLocale,Mn as virtualPathFor,Ui as videoDirective,cc as validators,Zq as validated,td as validateValueEnhanced,Yg as validateTemplate,Vo as validateParams,ud as validateFormEnhanced,Hp as validateFile,pd as validateFields,od as validateField,_g as validateDirective,Oc as validateCspDirectives,nj as validateConfig,Ol as validateComponentScripts,km as validateComponentProps,Wf as validateClientScript,Vg as v,Ua as usesSignalsInScript,lh as userComponentFileExists,Bg as useVirtualList,ad as useTitle,Uk as useStoreOrThrow,ro as useStore,Ej as useStorage,bq as useSlots,Gj as useSessionStorage,Zc as useSeoMeta,Wk as useRouteParams,Yk as useRouteParamOrThrow,Xk as useRouteParam,ad as usePageTitle,xe as useOptimistic,_k as useMiddlewareValue,Zk as useMiddlewareState,Fj as useLocalStorage,Tn as useLoadingIndicator,Xc as useHead,Sg as useForm,dq as useAttrs,Jp as uploadFiles,Ip as uploadFile,Rk as updateInstance,ve as untrack,Bh as unregisterDirective,Sk as unmountInstance,$a as unescapeHtml,Pn as typecheckStxFiles,kh as transpileTypeScript,Iq as translate,w as transitionDirective,em as toUsers,dm as toUser,zo as thumbnail,Ap as thumbHashToRGBA,Bp as thumbHashToDataURL,Ae as templateCache,vb as syncRecordedResponse,Xn as stxClientHelpers,ef as structuredDataDirective,Lq as stripLocalePrefix,ul as stripDocumentWrapper,pa as stripCommentsAndLiterals,Sm as stringToStream,Cc as strictCspPreset,Yd as streamingSuspenseDirective,ae as streamToResponse,Wd as streamTemplateSimple,Qd as streamTemplate,zj as stopHmrServer,am as stopBroadcasting,va as stateDirName,wa as stateDir,ke as state,Qf as startsDocument,tn as startProductionServer,gn as startInteractive,$l as startBroadcasting,Nq as stampLocaleLayoutGroup,D as staggerDirective,To as srcsetUrls,E as springDirective,lc as splitByPipe,ql as spaNavVaryHeaders,Nn as sourcePathFor,_o as smartBatchSign,nh as slotContentHasExpressions,Yo as signUrl,ih as shouldTranspileTypeScript,wj as shouldReloadOnChange,bp as shouldRefreshSignature,xj as shouldIgnoreFile,tg as shouldCacheComponent,Do as sharpen,ar as shape,ua as setStateDir,cl as setRouteParams,dl as setMiddlewareState,fe as setImagePlaceholder,Xp as setGlobalProvide,zb as setErrorLocale,zk as setCurrentInstance,Ii as setCachedVideoResult,xi as setCachedImageResult,ri as setCached,dr as serveStxFile,fr as serveMultipleStxFiles,rj as serveMarkdownFile,Dn as serveFile,gr as serveApp,Cn as serve,bo as serializeState,Im as serializeSetCookie,Fo as sepia,_c as seoMetaToHeadConfig,x as scrollAnimateDirective,q as screenReaderDirective,Yi as scopeHTML,Xi as scopeCSS,hf as scanForSitemapEntries,k as scanA11yTargets,l as scanA11yIssues,Jo as saturation,Wo as sanitizeParams,ec as sanitizeFilePath,fc as sanitizeExpression,gc as sanitizeDirectiveParams,dc as sanitizeDirectiveParam,hc as sanitizeComponentProps,Zb as safeExecuteAsync,Yb as safeExecute,Ze as runPreProcessingMiddleware,_e as runPostProcessingMiddleware,kn as runPageAction,qe as runMountCallbacks,ba as runMiddleware,Pk as runHooks,Bq as runDoctor,re as runDestroyCallbacks,nf as runComposers,Ko as rotate,Wg as rewriteImagesWithSiblings,wb as responseBindings,rh as resolveTemplatePath,c as resolveStxTargets,jj as resolveStxDirectories,Hq as resolveI18n,xo as resize,Ha as resetPlaceholders,Wc as resetHead,ao as resetHMRHandler,Mb as resetErrorConfig,Xq as required,La as replacePlaceholders,Qp as renderView,Ri as renderVideoComponent,za as renderVendorStyleTags,kq as renderToString,lq as renderToStream,mq as renderToDOM,zp as renderThumbhashToCanvas,yq as renderTemplateString,wq as renderTemplate,xq as renderString,Td as renderStreamingPage,dh as renderSlot,jg as renderSSRSuspense,jp as renderProtectedVideo,ip as renderProtectedImg,Xo as renderMediaUpload,vq as renderMarkdownView,zl as renderLayoutTypes,Bi as renderImgComponent,nk as renderImageComponent,cd as renderHtmlAttrs,bd as renderHead,Tp as renderEmail,ph as renderComponentWithSlot,dd as renderBodyAttrs,mo as render,Ec as relaxedCspPreset,nd as registerValidationRule,_d as registerStreamingDirectives,to as registerStoresClient,al as registerStore,ff as registerSeoDirectives,V as registerMiddleware,Pa as registerFilters,Oa as registerFilter,Bb as registerErrorMessages,sd as registerEnhancedValidationRule,yh as registerDirective,Nc as registerCspDirectives,nm as registerComponentDirectives,J as registerAnimationDirectives,r as registerA11yDirectives,Dk as ref,_m as redirect,rb as recordResponseStatus,sb as recordResponseHeader,xa as rebaseOntoStateDir,tb as readResponseStatus,ub as readResponseHeaders,pj as readMarkdownFile,Be as readFileCached,Ek as reactive,Oo as quality,gp as pruneSignatureCache,ui as pruneCache,Vp as provide,uq as protectCodeBlocks,Wq as prop,rf as processVueTemplate,zg as processVirtualListDirectives,Dg as processVirtualGridDirectives,Qi as processVideo,qd as processValidateDirective,Od as processTranslateDirective,dg as processTransitionDirectives,gg as processTransitionAttributes,gd as processTitleDirective,jb as processTemplateBindings,$f as processTeleportDirectives,hg as processSuspenseDirectives,af as processStructuredData,Ud as processStreamDirectives,xb as processStatusDirective,Qg as processStaticDirectives,Xe as processStackReplacements,We as processStackPushDirectives,eh as processSlots,sl as processShell,pf as processServerBindings,bf as processSeoDirective,$d as processSectionDirectives,uf as processScopedStyles,hb as processReactiveBindings,kp as processProtectedMedia,Jg as processPartialHydrationDirectives,Vf as processOnceDirective,Ye as processMiddleware,$e as processMetaDirectives,hd as processMetaDirective,qj as processMarkdownFileDirectives,wh as processMarkdownDirectives,Re as processLoops,rg as processKeepAliveDirectives,Uf as processJsonDirective,Cg as processInfiniteListDirectives,Ve as processIncludes,Di as processImgComponents,pk as processImageComponents,ck as processImage,fd as processHeadDirective,jd as processForms,ld as processFormInputDirectives,Ya as processExpressions,ma as processEventDirectives,md as processErrorDirective,sf as processDynamicComponents,Xg as processDirectives,Gh as processDirectiveAttributes,_f as processDeferDirectives,Sc as processCustomDirectives,Kc as processCspDirectives,br as processComponentProps,Ga as processClientScript,kd as processBasicFormDirectives,mg as processAsyncDirectives,Tc as processAppearanceBootstrapDirective,A as processAnimationDirectives,f as processA11yDirectives,Dd as preloadTranslationsBackground,Cd as preloadTranslations,Sn as preloadIslandHandlers,he as preloadIconCollection,Xl as poolStrings,hj as pluginManager,de as placeholdersWarmed,cg as performLeave,bg as performEnter,se as pendingLifecycleCounts,we as peek,Se as partialsCache,Si as parseVideoDirectiveOptions,vo as parseUrl,Cp as parseThumbhashString,rc as parseSwitchBlock,bh as parseSlots,ch as parseSlotElement,wc as parseScriptDeclarations,dj as parseSFCComponent,lp as parseProtectedArgs,Qe as parseLoopBinding,Ci as parseImgComponent,Uh as parseImageUrl,ok as parseImageComponent,hn as parseFormBody,tc as parseExpressionWithFilters,Xm as parseCookies,sm as parseContainerSelector,oc as parseConditionalBlock,uc as parseArguments,H as parseAnimationShorthand,Yq as optional,Yl as optimizeTemplate,uk as optimizeImage,vk as optimizeDirectory,_q as oneOf,Te as onceStore,Mk as onUpdated,gb as onUpdate,Ok as onUnmounted,hl as onServer,Kk as onMounted,oe as onMount,Pg as onHydrated,$p as onErrorCaptured,pe as onDestroy,xg as onDeactivated,gl as onClient,Lk as onBeforeUpdate,Nk as onBeforeUnmount,Jk as onBeforeMount,wg as onActivated,vp as observeElement,$m as notFound,zf as normalizeCriticalHeadOrder,_p as nextTick,qm as negotiateEncoding,P as navigateTo,Qk as mountInstance,z as motionDirective,Dc as moderateCspPreset,Wl as minifyHtml,df as metaDirective,Jf as metaDedupKey,wo as mergeParams,Lf as mergeHtmlAttrs,Yc as mergeHeadConfigs,Hc as mergeCspDirectives,bb as mergeCrosswindConfig,M as matchRoute,xh as markdownDirectiveHandler,oj as markdownCache,b as looksLikeGlob,Kq as localizePath,Ed as loadTranslationLazy,Kd as loadTranslation,kj as loadStxConfig,_ as loadMiddlewareFromDirectory,Kl as loadManifest,rp as loadElement,bm as loadChannels,Rq as lintStxStrict,tp as lazyLoadAll,sp as lazyLoad,C as keyframeDirective,iq as jsxs,jq as jsxDEV,hq as jsx,Zm as jsonResponse,Zd as islandDirective,Jb as isTest,vl as isSpaNavigation,ol as isSpaNavRequest,$o as isSignatureValid,te as isSignal,ak as isSharpAvailable,Lm as isServerEnvironment,el as isServer,Hb as isProduction,d as isPresentationalRole,op as isNativeLazySupported,tq as isMarkdownPath,Ad as isLoading,Bd as isLoaded,hh as isJavaScriptScript,pp as isIntersectionObserverSupported,ik as isImageFile,bk as isImageBackendAvailable,Md as isICUFormat,Og as isHydrated,mh as isHydrateTrigger,pb as isHttpStatus,Km as isEdgeEnvironment,Sq as isDirectiveKind,Ib as isDevelopment,ue as isDerived,vj as isCssOnlyChange,pm as isCompressible,fl as isClient,og as isAsyncComponent,jn as isActionableMethod,Go as invert,De as invalidateFileCacheByDir,Ce as invalidateFileCache,Xa as interpolateScriptsInTemplate,Va as interpolateScriptExpressions,Wa as interpolateScriptAttributes,Vb as inlineError,Gq as injectThemeBootstrap,cf as injectSeoTags,Dq as injectSeo,Le as injectRouterScript,uj as injectHotReload,fa as injectHeatmap,Ic as injectCspMetaTag,fb as injectCrosswindCSS,Sf as injectConfigHeadTags,yf as injectColorModeBootScript,Nf as injectCloakStyle,Ff as injectBuildId,Ba as injectBrowserCoreAutoImports,lb as injectAnalytics,Wp as inject,$k as initStoreRegistry,Xj as initNetlify,Un as initLoadingIndicator,qp as initLazyLoading,fn as initFile,yp as initBlurUp,Ep as initAllBlurUp,Fi as imgDirective,sk as imageDirective,rn as hydrateTemplateStream,qn as hydrateTemplate,Rn as hydrateIslands,Lg as hydrateIsland,sn as hydrateFragment,Mg as hydrateByStrategy,Ng as hydrateAll,jo as hydrate,Bn as htmlResponse,Of as hoistLeadingHeadTags,Af as hoistColorModeBootScript,ga as heatmapDirective,ni as hashString,Ke as hashFilePath,li as hashFile,mi as hashBuffer,qf as hasVueTemplateSyntax,Pe as hasVariables,oo as hasStore,Ma as hasPlaceholders,Vj as hasNetlifyConfig,X as hasMiddleware,na as hasEventDirectives,Rf as hasDocumentShell,$g as hasDirectives,h as hasDOMSupport,lk as handleImageRequest,aq as handleError,qq as h,hk as groupVariantsByFormat,Eo as grayscale,un as gitHash,Ql as getUnusedDirectives,Fd as getTranslationSync,yd as getTranslationCacheStats,Gd as getTranslationAsync,Nd as getTranslation,Qj as getTotalSize,ap as getTimeUntilExpiry,Xf as getStoreScript,po as getStoreNames,no as getStore,Jj as getStorageSize,Ij as getStorageKeys,sh as getSourceLineInfo,jh as getSharedTranspiler,g as getScreenReaderOnlyStyle,Zi as getScopeAttribute,je as getRouteParams,qa as getPublicEnvDefine,ra as getPublicEnv,Zg as getPositionInfo,Ja as getPlaceholderRegistry,ki as getPlaceholderCacheStats,Vc as getPageMeta,yc as getNonce,jk as getMimeType,Z as getMiddlewareNames,W as getMiddleware,zd as getLoadingState,Id as getLoadingLocales,ce as getImagePlaceholder,dk as getImageMetadata,io as getHydrationRuntime,bl as getHydratedStoreState,yj as getHmrServer,Uc as getHead,$n as getHMRHandler,Yh as getFormatExtension,pi as getFileMtime,gk as getFallbackVariant,Db as getErrorMessage,Ab as getErrorLocale,Lb as getErrorConfig,Gb as getErrorCodeName,Ah as getDirectives,zh as getDirective,Ak as getCurrentInstance,Gc as getCspPreset,Pc as getCspHeaderName,cb as getCrosswindServeAsset,vh as getComponentCacheStats,Hi as getCachedVideoResult,ep as getCachedSignature,Fe as getCachedSignalsRuntime,Ge as getCachedRouterScript,ii as getCachedPlaceholder,wi as getCachedImageResult,qi as getCached,ti as getCacheStats,Df as getBuildId,_l as getBroadcastServer,Xh as getBestVariant,Qa as getAllFilters,Lh as generateWidthSrcset,Ag as generateVirtualListCSS,Lp as generateVideoPreview,vd as generateValidationScript,Mp as generateUploadRuntime,Rl as generateTreeShakenBundle,fg as generateTransitionRuntime,eg as generateTransitionCSS,Li as generateThumbnails,bi as generateThumbhashPlaceholder,Bm as generateTemplatesDocs,lg as generateSuspenseRuntime,kg as generateSuspenseCSS,co as generateStateScript,Vh as generateSrcsetData,Ai as generateSrcset,ek as generateSrcSet,Mi as generateSpriteSheet,Up as generateSpaShell,Wh as generateSourceTags,Rh as generateSizesFromBreakpoints,Qh as generateSizesAttribute,fk as generateSizes,gf as generateSitemapIndex,Eq as generateSitemap,np as generateSimpleMediaPicker,hp as generateSignatureRuntime,ze as generateSignalsRuntimeDev,ye as generateSignalsRuntime,Fa as generateServerDataBridge,Wi as generateScopeId,ej as generateSFCWebComponent,ka as generateRuntimeScript,K as generateRouteTypes,L as generateRouteManifest,jf as generateRobotsTxt,Fq as generateRobots,zi as generateResponsiveVariants,aj as generateReactiveWebComponentTS,$i as generateReactiveWebComponent,cj as generateReactiveRuntime,bj as generateReactiveMixin,Ki as generatePoster,hi as generatePlaceholderStyle,gi as generatePlaceholderCSS,ai as generatePlaceholder,Kg as generatePartialHydrationCSS,xc as generateNonce,Rj as generateNetlifyToml,Op as generateMinifiedMediaRuntime,Np as generateMediaRuntime,mp as generateMediaManagerEmbed,Il as generateManifest,Wn as generateLoadingIndicatorHtml,xp as generateLazyLoadRuntime,Al as generateLayoutTypes,di as generateLQIP,vg as generateKeepAliveRuntime,ug as generateKeepAliveCSS,Rg as generateIslandManifest,Kp as generateImagePreview,wk as generateImageManifest,ho as generateHydrationScript,be as generateHydrationRuntime,ko as generateHydrationCSS,Eg as generateHydrationBootstrap,tj as generateHotReloadScript,ea as generateHeatmapScript,Zn as generateHMRClientScript,Ni as generateHLSManifest,eo as generateEventBindings,Ph as generateDprSrcsetWithVariableQuality,Oh as generateDprSrcset,Pf as generateDocumentShell,Gm as generateDocs,Cm as generateDirectivesDocs,Fh as generateDirectiveRuntime,kf as generateDefaultRobotsTxt,Oi as generateDASHManifest,Bc as generateCspMetaTag,Ac as generateCspHeader,eb as generateCrosswindCSS,fq as generateCompositionRuntime,Am as generateComponentsDocs,Fg as generateComponentManifest,ym as generateComponentDoc,fi as generateColorPlaceholder,xf as generateColorModeBootScript,Tk as generateClientRuntime,oi as generateCacheKey,Da as generateBrowserAutoImportDestructuring,Fp as generateBlurUpRuntime,Gp as generateBlurUpCSS,ib as generateBindingsRuntime,Mh as generateAutoWidthSrcset,Ca as generateAutoImportDestructuring,qg as generateAsyncComponentRuntime,pg as generateAsyncComponentCSS,I as generateAnimationRuntime,G as generateAnimationCSS,kb as generateAnalyticsScript,Qn as formatTypecheckDiagnostics,Kn as formatTypeErrors,cn as formatStxContent,Pj as formatSize,O as formatRoutes,dn as formatMarkdownContent,Eb as formatLocalizedError,Ld as formatICU,Nb as formatFilePath,Ub as formatError,Cq as formatDoctorReport,Dm as formatDocsAsMarkdown,Fm as formatDocsAsJson,Em as formatDocsAsHtml,No as format,Vl as foldConstants,Mo as flipVertical,Lo as flipHorizontal,Bl as fingerprint,On as findRuntimeTypeDeclarations,Aq as findPantryPackage,nc as findMatchingEndTag,jc as findMatchingDelimiter,oa as findInterpolationEnd,pc as findIfBlocks,sc as findExpressions,N as findErrorPage,qc as findDirectiveBlocks,Sl as findDeadCode,Sl as findDeadBranches,tm as findContainerRegion,zm as findComponentFiles,er as findCommonDir,Oj as filterRequiredFiles,qh as fileExists,Me as extractVariables,Gl as extractTemplateExpressions,Vd as extractStreamBoundaries,fo as extractState,fh as extractSlotContent,Oe as extractScriptFromTemplate,Fl as extractScriptBlocks,Ka as extractPlaceholders,mc as extractParenthesizedExpression,qb as extractPageResponseStatus,ca as extractLayoutMetadata,ei as extractDominantColor,vc as extractDirectiveParams,ah as extractDirectiveNames,wl as extractContainerContent,wm as extractComponentProps,Gg as extractComponentName,xm as extractComponentDescription,db as extractClassNames,Ea as extractBridgeData,Hg as extractBoundProps,kc as extractBalancedExpression,ya as extractAndStripCssImports,_i as extractAndScopeStyles,la as extractAndProcessEvents,Cj as externalizeSharedAssets,Dj as externalizeRepeatedAssets,Bj as externalizeHtml,_a as evaluateExpression,Ul as evaluateConstant,yb as evaluateAuthExpression,Ta as escapeHtmlValue,Sa as escapeHtml,_b as errorRecovery,ac as errorLogger,ag as ensureTeleportTargets,Tf as ensureDocumentShell,rd as enhancedValidationRules,um as enableDevTools,Tl as eliminateDeadCode,me as effect,Uo as dprUrls,Hm as docsCommand,yl as discoverLayoutNames,wp as disconnectObserver,vm as disableDevTools,bc as devHelpers,rl as detectShell,Jm as detectRuntime,Sj as detectProjectConfig,Zh as detectFormat,Nl as detectBuildMode,le as derived,Wj as deploy,mj as defineStxConfig,so as defineStore,cq as defineSlots,Qq as defineSiteConfig,Uq as definePropsWithValidation,Tq as defineProps,gj as definePlugin,$c as definePageMeta,R as defineMiddleware,Tg as defineForm,Zp as defineExpose,Yp as defineEmits,Ch as defineDirective,sq as defineCustomElement,pn as defineConfig,Dh as defineClientDirective,ng as defineAsyncComponent,Pp as defaultMediaConfig,yk as defaultImageConfig,wd as defaultI18nConfig,da as defaultHeatmapConfig,id as defaultFormClasses,Na as defaultFilters,Rc as defaultCspConfig,ij as defaultConfig,cr as default,ab as deepMergeThemes,tf as dedupeScopedStyles,ci as decodeThumbhash,Mc as cspNonceDirective,Lc as cspDirective,Dp as crossfadeTransition,yo as crop,yg as createVirtualList,Ti as createVideoDirective,Vm as createVercelHandler,Hn as createTypeChecker,Pd as createTranslateFilter,Rm as createTextEncoderStream,rq as createStxApp,Qm as createStreamingResponse,Xd as createStreamRenderer,qo as createStore,U as createStorageManager,S as createServerCookieManager,Ck as createScope,ig as createSSRSuspense,ie as createRouter,$ as createRouteLocation,Fn as createRoute,Dk as createRef,Ek as createReactive,eq as createProvideContext,wn as createProject,on as createProductionBuild,Ia as createPlaceholder,Zl as createOptimizedBuild,Wm as createNetlifyHandler,Kj as createNetlifyClient,aa as createMiddlewareContext,En as createMiddleware,up as createLazyObserver,sg as createKeepAliveCache,Nm as createKVNamespace,Ig as createIslandRegistry,Ei as createImgDirective,tk as createImagePlugin,mk as createImageHandler,rk as createImageDirective,ia as createHeatmapAggregator,Nj as createFileManifest,Mm as createEnvAccessor,Xb as createEnhancedError,Pm as createEdgeHandler,Om as createEdgeCache,th as createDetailedErrorMessage,Um as createDenoHandler,Tj as createDefaultNetlifyConfig,Qc as createCspHeaders,Ym as createCookie,Fk as createComputed,Bk as createComponentInstance,Tm as createCloudflareHandler,T as createClientCookieManager,Eh as createBuiltinDirectives,rq as createApp,F as createAnimationTimeline,Bo as cover,Ne as convertToCommonJS,Io as contrast,Ao as contain,Wb as consoleError,Kb as configureErrorHandling,lj as config,Fk as computed,rm as compressResponse,mf as composerPattern,lf as composer,tl as composeShellWithPage,mm as componentDirective,oh as componentClientSignalNames,Hl as compileTemplate,a as collectRepeatedFlag,Mj as collectDeployFiles,Ji as clearVideoCache,xd as clearTranslationCache,Yf as clearStoreCache,Hj as clearStorage,fp as clearSignatureCache,ji as clearPlaceholderCache,Ue as clearOnceStore,zc as clearNonce,Y as clearMiddleware,ee as clearImagePlaceholders,qk as clearImageCache,Cb as clearErrorMessages,He as clearDevCaches,Ra as clearCustomFilters,of as clearComposers,Zf as clearComposableCache,uh as clearComponentCache,si as clearCache,Vn as cleanupLoadingIndicator,kl as classifyScript,ll as classifyAllScripts,In as checkTemplateFile,Jn as checkTemplate,Ie as checkCache,cp as checkAuthAccess,i as checkA11yWithRegex,j as checkA11y,hm as channel,bn as captureScreenshots,an as captureScreenshot,Jd as cancelPendingLoads,Lj as calculateSha1,Nh as calculateOptimalWidths,Je as cacheTemplate,Vi as buildWebComponents,Ln as buildVirtualSource,Rp as buildViews,uo as buildUrl,Rd as buildSuspenseResolveScript,Pq as buildStaticSite,Cl as buildRuntimeAsset,Dl as buildRouterAsset,Oq as buildLangPickerScript,Th as buildImageUrl,Kf as buildHtmlAttrs,Ll as buildForProduction,om as buildComponentLibrary,dp as buildAuthParams,Ml as buildApp,Mq as buildAlternateLinks,nn as build,fm as broadcastPrivate,gm as broadcastPresence,cm as broadcast,Ho as brightness,Co as blur,Zo as batchSignUrls,ne as batch,n as autoFixA11yFile,o as autoFixA11yDirectory,m as autoFixA11y,Po as auto,e as attributeValue,El as assetTags,ja as asInvocableStatement,$q as arrayOf,Jq as applyTranslations,yi as applyTransformations,gh as applySlots,lm as applyPropDefaults,So as applyPreset,Mf as applyHtmlAttrs,ed as applyHead,Za as applyFilters,pl as appendVary,Fc as apiCspPreset,y as animationGroupDirective,Pi as analyzeVideo,Pl as analyzeUsage,il as analyzeTemplate,jl as analyzeProject,Pl as analyzeDirectiveUsage,mb as analyticsDirective,zn as addStore,yn as addPage,Jc as addNonceToInlineContent,An as addLayout,xn as addComponent,ln as actionRedirectResponse,Q as abortNavigation,p as a11yDirective,Ee as __setSignalsGeneratorsForTest,Ef as __setBuildIdForTest,Gi as VideoProcessorCache,Ug as Validator,s as TransitionType,u as TransitionEase,t as TransitionDirection,ic as Tokenizer,Gn as TemplateTypeChecker,en as TEMPLATE_PRESETS,Tb as StxValidationError,Pb as StxSyntaxError,Rb as StxSecurityError,Qb as StxRuntimeError,Sb as StxFileError,Ob as StxError,nq as Show,Sd as SUSPENSE_RESOLVER_RUNTIME,Aa as STX_AUTO_IMPORTS,ta as STATE_DIR_ENV_VAR,B as SPRING_PRESETS,ml as SPA_NAV_HEADER,nb as RESPONSE_STATUS_KEY,ob as RESPONSE_HEADERS_KEY,mn as ProductionBuild,pq as Portal,vn as PROJECT_TEMPLATES,Ro as PRESETS,lo as MemorySessionStore,Kh as MIME_TYPES,Hh as MEDIA_DEFAULT_WIDTHS,Jh as MEDIA_DEFAULT_FORMATS,xl as LAYOUT_TYPES_FILE,vi as ImageProcessorCache,kk as ImageProcessingError,go as HydrationRuntime,sj as HotReloadServer,ha as HeatmapAggregator,If as HTML_CLASS_MARKER,Hf as HTML_ATTRS_MARKER,gq as Fragment,oq as For,nl as FRAGMENT_CACHE_CONTROL,$b as ErrorLogger,Fb as ErrorCodes,Aj as EXTERNALIZED_ASSET_DIR,Yj as DeployError,Zj as DEFAULT_WIDTHS,v as DEFAULT_TRANSITION_OPTIONS,sa as DEFAULT_STATE_DIR,$j as DEFAULT_QUALITY,_h as DEFAULT_PLACEHOLDER_OPTIONS,_j as DEFAULT_FORMATS,Ih as DEFAULT_DPR_VALUES,Yn as ComponentHMRHandler,Sh as COMMON_SIZES,vf as COLOR_MODE_BOOT_MARKER,wf as COLOR_MODE_BOOT_GLOBAL,Gf as CLOAK_STYLE,jm as BroadcastServer,im as Broadcast,Bf as BUILD_ID_META,Cf as BUILD_ID_HEADER,$h as BLUR_UP_CSS,zq as $path};
|