@stacksjs/stx 0.2.313 → 0.2.315

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.
Files changed (63) hide show
  1. package/dist/{chunk-e7dse3cf.js → chunk-0a4nmj4r.js} +1 -1
  2. package/dist/{chunk-sr1xxzye.js → chunk-12mvbz4y.js} +1 -1
  3. package/dist/{chunk-wrngf5nq.js → chunk-15g08hah.js} +1 -1
  4. package/dist/{chunk-s5wevejz.js → chunk-44c01brj.js} +1 -1
  5. package/dist/{chunk-cdayqb5c.js → chunk-56vc1z21.js} +1 -1
  6. package/dist/{chunk-y1b6y022.js → chunk-574wce5h.js} +1 -1
  7. package/dist/{chunk-xdnsxn2f.js → chunk-5k3xfbqt.js} +1 -1
  8. package/dist/{chunk-ws7d1krp.js → chunk-693jjsg9.js} +1 -1
  9. package/dist/{chunk-mq9f910z.js → chunk-693rjvtf.js} +1 -1
  10. package/dist/{chunk-6aqsmree.js → chunk-7r6yhvyt.js} +1 -1
  11. package/dist/{chunk-c0edxvn0.js → chunk-7rcfksy4.js} +2 -2
  12. package/dist/{chunk-9ksr8sjy.js → chunk-840zb3m6.js} +1 -1
  13. package/dist/{chunk-w62chvwb.js → chunk-8bznad4t.js} +1 -1
  14. package/dist/{chunk-54a8kxqj.js → chunk-8z1e5j7f.js} +1 -1
  15. package/dist/{chunk-97bbr767.js → chunk-9g5cr7zt.js} +1 -1
  16. package/dist/{chunk-hnb6kzpe.js → chunk-b546f0ht.js} +1 -1
  17. package/dist/{chunk-ycvxjxhz.js → chunk-bbt6cnp9.js} +1 -1
  18. package/dist/{chunk-8bnpdtjh.js → chunk-bdract2w.js} +1 -1
  19. package/dist/{chunk-yyy5mk7b.js → chunk-btcca88f.js} +1 -1
  20. package/dist/{chunk-4mm03gj3.js → chunk-dh58qn19.js} +1 -1
  21. package/dist/{chunk-34yzcb00.js → chunk-dkcay3vr.js} +2 -2
  22. package/dist/{chunk-3h5z1eby.js → chunk-f4vnkenf.js} +1 -1
  23. package/dist/{chunk-5pm4w6ef.js → chunk-fy85868q.js} +1 -1
  24. package/dist/{chunk-5kh5dr9k.js → chunk-h22zwr5c.js} +47 -21
  25. package/dist/{chunk-avqacmvp.js → chunk-hb5tea65.js} +2 -2
  26. package/dist/{chunk-2vxmgj67.js → chunk-jvm48hdn.js} +1 -1
  27. package/dist/{chunk-n4g9p5td.js → chunk-m01h061q.js} +1 -1
  28. package/dist/{chunk-9ewg41dm.js → chunk-m7crqwcc.js} +1 -1
  29. package/dist/chunk-mc4tqveh.js +2 -0
  30. package/dist/{chunk-df1mx1s1.js → chunk-mc9xjq9z.js} +1 -1
  31. package/dist/{chunk-4xgsb361.js → chunk-mh4whcj5.js} +1 -1
  32. package/dist/{chunk-81jx0c3x.js → chunk-n11mz2b2.js} +1 -1
  33. package/dist/{chunk-cjdjhtc9.js → chunk-ndrndajd.js} +1 -1
  34. package/dist/{chunk-se9jfhzq.js → chunk-nm2erkah.js} +1 -1
  35. package/dist/{chunk-5n5ejg0x.js → chunk-nx2x7few.js} +1 -1
  36. package/dist/{chunk-92g4qya5.js → chunk-p06czqhq.js} +9 -9
  37. package/dist/chunk-pjrsbmf1.js +2 -0
  38. package/dist/chunk-q5rsf8np.js +2 -0
  39. package/dist/{chunk-tt0rww6h.js → chunk-qzqd2w5w.js} +1 -1
  40. package/dist/{chunk-03kxmbb3.js → chunk-rkqs4dt8.js} +1 -1
  41. package/dist/{chunk-29vx193k.js → chunk-twvysckp.js} +1 -1
  42. package/dist/{chunk-wcftvmk4.js → chunk-v00cj2at.js} +1 -1
  43. package/dist/{chunk-k8p54eqr.js → chunk-v8c1av7v.js} +1 -1
  44. package/dist/{chunk-zqd4nrqt.js → chunk-vqxqesr8.js} +171 -171
  45. package/dist/{chunk-kvarrr2y.js → chunk-vzd6g7d1.js} +1 -1
  46. package/dist/{chunk-4mftgf8s.js → chunk-xgdcjqn7.js} +1 -1
  47. package/dist/{chunk-87qbq45v.js → chunk-xrcvqqse.js} +1 -1
  48. package/dist/{chunk-9wtpnaps.js → chunk-y9qnrg8a.js} +2 -2
  49. package/dist/{chunk-1233k4y4.js → chunk-ytrq34w1.js} +1 -1
  50. package/dist/chunk-zbmspw75.js +2 -0
  51. package/dist/{chunk-mbkjkg12.js → chunk-zc4wc48p.js} +1 -1
  52. package/dist/{chunk-bcx36g1n.js → chunk-zkbdw1yr.js} +1 -1
  53. package/dist/cli.js +7 -7
  54. package/dist/craft-entry.js +1 -1
  55. package/dist/craft.js +1 -1
  56. package/dist/process.js +18 -4
  57. package/dist/pwa.js +1 -1
  58. package/dist/ssg.js +2 -2
  59. package/package.json +5 -5
  60. package/dist/chunk-3j7y8yen.js +0 -2
  61. package/dist/chunk-9xfx5q8b.js +0 -2
  62. package/dist/chunk-awwkfzyy.js +0 -2
  63. package/dist/chunk-xtn6zwr8.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ri as a,Si as b,Ti as c}from"./chunk-xdnsxn2f.js";import"./chunk-xwxdwqn9.js";import"./chunk-zqd4nrqt.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-bcx36g1n.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-df1mx1s1.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-5kh5dr9k.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
2
+ import{Ri as a,Si as b,Ti as c}from"./chunk-5k3xfbqt.js";import"./chunk-xwxdwqn9.js";import"./chunk-vqxqesr8.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-zkbdw1yr.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-mc9xjq9z.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-h22zwr5c.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ar as e,Br as f,wr as a,xr as b,yr as c,zr as d}from"./chunk-zqd4nrqt.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-bcx36g1n.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-df1mx1s1.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-5kh5dr9k.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{f as validateConfig,b as resolveStxDirectories,c as loadStxConfig,e as defineStxConfig,a as defaultConfig,d as config};
2
+ import{Ar as e,Br as f,wr as a,xr as b,yr as c,zr as d}from"./chunk-vqxqesr8.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-zkbdw1yr.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-mc9xjq9z.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-h22zwr5c.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{f as validateConfig,b as resolveStxDirectories,c as loadStxConfig,e as defineStxConfig,a as defaultConfig,d as config};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Qo as a,So as b,Uo as c,Vo as d,aq as e,bq as f,cq as g,dq as h,eq as i,fq as j,gq as k,hq as l,iq as m,jq as n,kq as o,lq as p,mq as q,nq as r,oq as s,pq as t,qq as u,rq as v,sq as w,tq as x}from"./chunk-zqd4nrqt.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-bcx36g1n.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-df1mx1s1.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-5kh5dr9k.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{e as validateTemplate,g as validateDirective,n as userComponentFileExists,m as transpileTypeScript,p as slotContentHasExpressions,k as shouldTranspileTypeScript,t as resolveTemplatePath,r as renderComponentWithSlot,j as isJavaScriptScript,o as isHydrateTrigger,d as hasVariables,h as hasDirectives,u as getSourceLineInfo,l as getSharedTranspiler,f as getPositionInfo,x as getComponentCacheStats,s as fileExists,a as extractVariables,c as extractScriptFromTemplate,i as extractDirectiveNames,v as createDetailedErrorMessage,b as convertToCommonJS,q as componentClientSignalNames,w as clearComponentCache};
2
+ import{Qo as a,So as b,Uo as c,Vo as d,aq as e,bq as f,cq as g,dq as h,eq as i,fq as j,gq as k,hq as l,iq as m,jq as n,kq as o,lq as p,mq as q,nq as r,oq as s,pq as t,qq as u,rq as v,sq as w,tq as x}from"./chunk-vqxqesr8.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-zkbdw1yr.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-mc9xjq9z.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-h22zwr5c.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{e as validateTemplate,g as validateDirective,n as userComponentFileExists,m as transpileTypeScript,p as slotContentHasExpressions,k as shouldTranspileTypeScript,t as resolveTemplatePath,r as renderComponentWithSlot,j as isJavaScriptScript,o as isHydrateTrigger,d as hasVariables,h as hasDirectives,u as getSourceLineInfo,l as getSharedTranspiler,f as getPositionInfo,x as getComponentCacheStats,s as fileExists,a as extractVariables,c as extractScriptFromTemplate,i as extractDirectiveNames,v as createDetailedErrorMessage,b as convertToCommonJS,q as componentClientSignalNames,w as clearComponentCache};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Vg as a,Wg as b,Xg as c,Yg as d,Zg as e,_g as f}from"./chunk-ycvxjxhz.js";import"./chunk-zqd4nrqt.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-bcx36g1n.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-df1mx1s1.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-5kh5dr9k.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
2
+ import{Vg as a,Wg as b,Xg as c,Yg as d,Zg as e,_g as f}from"./chunk-bbt6cnp9.js";import"./chunk-vqxqesr8.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-zkbdw1yr.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-mc9xjq9z.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-h22zwr5c.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$t as k,Rt as a,St as b,Tt as c,Ut as d,Vt as e,Wt as f,Xt as g,Yt as h,Zt as i,_t as j,au as l}from"./chunk-bcx36g1n.js";import"./chunk-4ee1aaet.js";import"./chunk-jryjwara.js";export{e as resolveUserCssConfig,c as resetCssCache,h as rebuildCss,d as loadCssEngineConfig,b as loadCssEngine,l as injectCss,a as getCssServeAsset,i as getCachedCSS,k as generateCss,f as fingerprintConfig,j as extractClassNames,g as buildCss};
2
+ import{$t as k,Rt as a,St as b,Tt as c,Ut as d,Vt as e,Wt as f,Xt as g,Yt as h,Zt as i,_t as j,au as l}from"./chunk-zkbdw1yr.js";import"./chunk-4ee1aaet.js";import"./chunk-jryjwara.js";export{e as resolveUserCssConfig,c as resetCssCache,h as rebuildCss,d as loadCssEngineConfig,b as loadCssEngine,l as injectCss,a as getCssServeAsset,i as getCachedCSS,k as generateCss,f as fingerprintConfig,j as extractClassNames,g as buildCss};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Bg as WJ,Dg as YJ,Fg as jJ,lg as ZJ,ng as g,pg as A,vg as n,yg as GJ}from"./chunk-34yzcb00.js";import{Ig as $J}from"./chunk-dvvx1wny.js";import{yl as XJ}from"./chunk-avqacmvp.js";import{uo as h}from"./chunk-zqd4nrqt.js";import{ut as e}from"./chunk-bcx36g1n.js";import{su as QJ,wu as i,yu as p}from"./chunk-18p8dqya.js";import{Sv as l,Wv as VJ,pv as KJ}from"./chunk-5kh5dr9k.js";import{ew as DJ}from"./chunk-jryjwara.js";import JJ from"fs";import k from"path";var{serve:wJ}=globalThis.Bun;VJ();import y from"zlib";import{promisify as a}from"util";var IJ=a(y.brotliCompress),OJ=a(y.gzip),UJ=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],BJ=["text/event-stream","multipart/x-mixed-replace"],_J=1024;function zJ(K){if(!K)return!1;let J=K.toLowerCase();if(BJ.some((G)=>J.startsWith(G)))return!1;return UJ.some((G)=>J.startsWith(G))}function FJ(K){let J=new Map;for(let G of K.split(",")){let[Z,...W]=G.trim().split(";"),O=Z.trim().toLowerCase();if(!O)continue;let U=1;for(let B of W){let w=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(B);if(!w)continue;let F=Number.parseFloat(w[1]);if(Number.isFinite(F))U=F}J.set(O,U)}return J}function LJ(K){if(!K)return null;let J=FJ(K),G=J.get("*"),Z=(W)=>J.get(W)??G??0;if(Z("br")>0)return"br";if(Z("gzip")>0)return"gzip";return null}async function t(K,J,G={}){if(J.headers.get("content-encoding"))return J;if(J.status===204||J.status===304||!J.body)return J;if(!zJ(J.headers.get("content-type")))return J;let Z=LJ(K.headers.get("accept-encoding"));if(!Z)return J;let W;try{W=new Uint8Array(await J.arrayBuffer())}catch{return J}let O=()=>new Response(W,{status:J.status,statusText:J.statusText,headers:s(J.headers)});if(W.length<(G.threshold??_J))return O();try{let U=Z==="br"?await IJ(W,{params:{[y.constants.BROTLI_PARAM_QUALITY]:G.quality??5,[y.constants.BROTLI_PARAM_SIZE_HINT]:W.length}}):await OJ(W);if(U.length>=W.length)return O();let B=s(J.headers);return B.set("Content-Encoding",Z),B.set("Content-Length",String(U.length)),new Response(U,{status:J.status,statusText:J.statusText,headers:B})}catch{return O()}}function s(K){let J=new Headers(K),G=J.get("Vary");if(!G)return J.set("Vary","Accept-Encoding"),J;if(!G.split(",").some((W)=>W.trim().toLowerCase()==="accept-encoding"))J.set("Vary",`${G}, Accept-Encoding`);return J}class d{now;entries=new e(1000,{maxBytes:33554432,sizeOf:(K)=>K.body.byteLength+JSON.stringify(K.headers).length*2});pending=new Map;generation=0;constructor(K=Date.now){this.now=K}invalidate(K){this.generation++,this.pending.clear();for(let J of Array.from(this.entries.keys()))if(K===void 0||this.entries.get(J)?.path===K)this.entries.delete(J)}async respond(K,J,G){let Z,W=async()=>{let X=Z??await G();return X.headers.set("Cache-Control","private, no-store"),X.headers.set("Vary",A(X.headers.get("Vary")).Vary),X};if(!J||K.method!=="GET"||K.headers.has("Cookie")||K.headers.has("Authorization")||K.headers.has("Range"))return W();let O=new URL(K.url),U=`${O.origin}${O.pathname}${O.search}|${g(K)?"fragment":"document"}`,B=this.entries.get(U),w=(X)=>{let T=new Headers(X.headers);return T.set("Cache-Control","private, no-store"),T.set("Age",String(Math.max(0,Math.floor((this.now()-X.created)/1000)))),new Response(X.body.slice(0),{headers:T})},F=B?(this.now()-B.created)/1000:1/0;if(B&&F<J.maxAge)return w(B);let S=this.generation,q=async()=>{let X=await G();Z=X;let T=(X.headers.get("Vary")??"").toLowerCase().split(",").map((L)=>L.trim()).filter(Boolean);if(X.status!==200||X.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(X.headers.get("Cache-Control")??"")||T.some((L)=>L!=="x-stx-router"&&L!=="accept-encoding"))return null;let M=await X.clone().arrayBuffer();if(M.byteLength>1048576)return null;X.headers.set("Vary",A(X.headers.get("Vary")).Vary);let Q={body:M,headers:Array.from(X.headers.entries()),created:this.now(),path:O.pathname};if(this.generation===S)this.entries.set(U,Q);return Q},H=this.pending.get(U);if(!H){if(this.pending.size>=1000)return W();H=q().finally(()=>{if(this.pending.get(U)===H)this.pending.delete(U)}),this.pending.set(U,H)}if(B&&F<J.maxAge+(J.swr??0))return H.catch(()=>{}),w(B);let x=await H;return x?w(x):W()}}var HJ={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function uJ(K={}){let J=k.resolve(K.outputDir||".output"),G=K.port??3000,Z=GJ(J);if(!Z)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${Z.routes.length} routes...`);let W=$J(Z.routeRules),O=new d,U=XJ(J,Z.apiRoutes??[]),B=Bun.file(k.join(J,"server/runtime-config.json")),w=K.runtimeConfig??(await B.exists()?await B.json():void 0),F=w?i(w):void 0,S=new Map,q=new Map,H=new Map,x=new Map;for(let Q of Z.routes)try{let L=k.join(J,Q.compiledPath),Y=JSON.parse(await Bun.file(L).text());if(F)Y.html=p(Y.html,F);S.set(Q.pattern,Y),H.set(Q.pattern,l(Y.html)),x.set(Q.pattern,h(Y.html));let C=k.join(J,Q.fragmentPath);if(await Bun.file(C).exists()){let P=await Bun.file(C).text();q.set(Q.pattern,F?p(P,F):P)}}catch(L){console.warn(`[stx] Failed to load route ${Q.pattern}:`,L)}let X=new Map,T=[];for(let Q of Z.routes)if(Q.hasParams){let{regex:L,params:Y}=KJ(Q.pattern);T.push({regex:L,route:Q,paramNames:Y})}else X.set(Q.pattern,Q);let M=wJ({port:G,async fetch(Q){return t(Q,await QJ(F??i(),async()=>{let Y=new URL(Q.url).pathname;if(K.onRequest){let j=await K.onRequest(Q);if(j)return j}if(K.apiRouter){let j=await K.apiRouter.handleRequest(Q);if(j.status!==404)return j}if(K.apiRoutes?.[Y])return K.apiRoutes[Y](Q);let C=await U(Q);if(C)return C;if((Q.method==="GET"||Q.method==="HEAD")&&Y!=="/"){let j=k.resolve(J,"public"),_;try{_=decodeURIComponent(Y)}catch{_=Y}if(!_.includes("\x00")){let I=k.resolve(j,`.${_}`);if(I===j||I.startsWith(`${j}${k.sep}`))try{if(JJ.existsSync(I)&&JJ.statSync(I).isFile()){let z=k.extname(I).toLowerCase(),E=HJ[z]||"application/octet-stream",v=Y.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(Y);return new Response(Bun.file(I),{headers:{"Content-Type":E,"Cache-Control":v?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let P=g(Q),D=null,o={};if(D=X.get(Y)||null,!D)for(let{regex:j,route:_,paramNames:I}of T){let $=Y.match(j);if($){D=_,I.forEach((z,E)=>{o[z]=$[E+1]});break}}if(!D){let j=X.get("/404")||null;if(j){let _=S.get(j.pattern);if(_)return new Response(_.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}let R=W(Y),r=Object.keys(R).length>0;return O.respond(Q,R.cache,async()=>{let j=S.get(D.pattern);if(P&&Q.method==="GET"&&j&&!j.hasServerScripts&&Object.keys(j.placeholders).length===0){let $=q.get(D.pattern);if($){let z=H.get(D.pattern);return new Response($,{status:j.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...x.has(D.pattern)?{"X-STX-Runtime":x.get(D.pattern)?"true":"false"}:{},...z?{"X-STX-Layout":z.layout,"X-STX-Layout-Group":z.group}:{},...A(),...R.cache?{}:{"Cache-Control":ZJ}}})}}let _=WJ(Q.method),I=S.get(D.pattern);if(!I){let $=X.get("/500")||null;if($){let z=S.get($.pattern);if(z)return new Response(z.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(D.prerendered&&_)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!_&&!I.hasServerScripts&&Object.keys(I.placeholders).length===0)return new Response(I.html,{status:I.status??200,headers:{"Content-Type":"text/html",...A(),"Cache-Control":"public, max-age=60"}});try{let{html:$,boundaries:z,redirect:E,cookies:v,status:m,headers:c}=await jJ(I,{params:o,request:Q,method:Q.method,__stx_strict_hydration:r,__stx_runtime_config:F});if(E)return YJ(E,v,c);if(z&&z.length>0){let{renderStreamingPage:N,streamToResponse:u}=await import("./chunk-kvarrr2y.js"),b=new Headers({...A(),...c,"Cache-Control":"private, no-store"});for(let f of v??[])b.append("Set-Cookie",f);if(P&&!_){let f=l($);b.set("X-STX-Fragment","true"),b.set("X-STX-Runtime",h($)?"true":"false"),b.set("X-STX-Layout",f.layout),b.set("X-STX-Layout-Group",f.group)}return u(N(P&&!_?n($,Z.routerContainer||"main"):$,z,{timeoutMs:30000}),{status:m??I.status??200,headers:b})}let V=new Headers({"Content-Type":"text/html",...A(),...R.cache?{}:{"Cache-Control":"private, no-store"}});for(let N of v??[])V.append("Set-Cookie",N);for(let[N,u]of Object.entries(c??{}))V.set(N,u);if(V.set("Vary",A(V.get("Vary")).Vary),P&&!_){let N=l($);return V.set("X-STX-Fragment","true"),V.set("X-STX-Runtime",h($)?"true":"false"),V.set("X-STX-Layout",N.layout),V.set("X-STX-Layout-Group",N.group),new Response(n($,Z.routerContainer||"main"),{status:m??I.status??200,headers:V})}return new Response($,{status:m??I.status??200,headers:V})}catch($){if(console.error(`[stx] Hydration error for ${Y}:`,$),r)return new Response("Internal Server Error",{status:500});return new Response(I.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${M.port}`),console.log(`[stx] Serving ${Z.routes.length} routes (${S.size} pre-loaded)`),{port:M.port,stop:()=>{O.invalidate(),M.stop()},invalidate:(Q)=>O.invalidate(Q)}}
2
+ import{Bg as WJ,Dg as YJ,Fg as jJ,lg as ZJ,ng as g,pg as A,vg as n,yg as GJ}from"./chunk-dkcay3vr.js";import{Ig as $J}from"./chunk-dvvx1wny.js";import{yl as XJ}from"./chunk-hb5tea65.js";import{uo as h}from"./chunk-vqxqesr8.js";import{ut as e}from"./chunk-zkbdw1yr.js";import{su as QJ,wu as i,yu as p}from"./chunk-18p8dqya.js";import{Sv as l,Wv as VJ,pv as KJ}from"./chunk-h22zwr5c.js";import{ew as DJ}from"./chunk-jryjwara.js";import JJ from"fs";import k from"path";var{serve:wJ}=globalThis.Bun;VJ();import y from"zlib";import{promisify as a}from"util";var IJ=a(y.brotliCompress),OJ=a(y.gzip),UJ=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],BJ=["text/event-stream","multipart/x-mixed-replace"],_J=1024;function zJ(K){if(!K)return!1;let J=K.toLowerCase();if(BJ.some((G)=>J.startsWith(G)))return!1;return UJ.some((G)=>J.startsWith(G))}function FJ(K){let J=new Map;for(let G of K.split(",")){let[Z,...W]=G.trim().split(";"),O=Z.trim().toLowerCase();if(!O)continue;let U=1;for(let B of W){let w=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(B);if(!w)continue;let F=Number.parseFloat(w[1]);if(Number.isFinite(F))U=F}J.set(O,U)}return J}function LJ(K){if(!K)return null;let J=FJ(K),G=J.get("*"),Z=(W)=>J.get(W)??G??0;if(Z("br")>0)return"br";if(Z("gzip")>0)return"gzip";return null}async function t(K,J,G={}){if(J.headers.get("content-encoding"))return J;if(J.status===204||J.status===304||!J.body)return J;if(!zJ(J.headers.get("content-type")))return J;let Z=LJ(K.headers.get("accept-encoding"));if(!Z)return J;let W;try{W=new Uint8Array(await J.arrayBuffer())}catch{return J}let O=()=>new Response(W,{status:J.status,statusText:J.statusText,headers:s(J.headers)});if(W.length<(G.threshold??_J))return O();try{let U=Z==="br"?await IJ(W,{params:{[y.constants.BROTLI_PARAM_QUALITY]:G.quality??5,[y.constants.BROTLI_PARAM_SIZE_HINT]:W.length}}):await OJ(W);if(U.length>=W.length)return O();let B=s(J.headers);return B.set("Content-Encoding",Z),B.set("Content-Length",String(U.length)),new Response(U,{status:J.status,statusText:J.statusText,headers:B})}catch{return O()}}function s(K){let J=new Headers(K),G=J.get("Vary");if(!G)return J.set("Vary","Accept-Encoding"),J;if(!G.split(",").some((W)=>W.trim().toLowerCase()==="accept-encoding"))J.set("Vary",`${G}, Accept-Encoding`);return J}class d{now;entries=new e(1000,{maxBytes:33554432,sizeOf:(K)=>K.body.byteLength+JSON.stringify(K.headers).length*2});pending=new Map;generation=0;constructor(K=Date.now){this.now=K}invalidate(K){this.generation++,this.pending.clear();for(let J of Array.from(this.entries.keys()))if(K===void 0||this.entries.get(J)?.path===K)this.entries.delete(J)}async respond(K,J,G){let Z,W=async()=>{let X=Z??await G();return X.headers.set("Cache-Control","private, no-store"),X.headers.set("Vary",A(X.headers.get("Vary")).Vary),X};if(!J||K.method!=="GET"||K.headers.has("Cookie")||K.headers.has("Authorization")||K.headers.has("Range"))return W();let O=new URL(K.url),U=`${O.origin}${O.pathname}${O.search}|${g(K)?"fragment":"document"}`,B=this.entries.get(U),w=(X)=>{let T=new Headers(X.headers);return T.set("Cache-Control","private, no-store"),T.set("Age",String(Math.max(0,Math.floor((this.now()-X.created)/1000)))),new Response(X.body.slice(0),{headers:T})},F=B?(this.now()-B.created)/1000:1/0;if(B&&F<J.maxAge)return w(B);let S=this.generation,q=async()=>{let X=await G();Z=X;let T=(X.headers.get("Vary")??"").toLowerCase().split(",").map((L)=>L.trim()).filter(Boolean);if(X.status!==200||X.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(X.headers.get("Cache-Control")??"")||T.some((L)=>L!=="x-stx-router"&&L!=="accept-encoding"))return null;let M=await X.clone().arrayBuffer();if(M.byteLength>1048576)return null;X.headers.set("Vary",A(X.headers.get("Vary")).Vary);let Q={body:M,headers:Array.from(X.headers.entries()),created:this.now(),path:O.pathname};if(this.generation===S)this.entries.set(U,Q);return Q},H=this.pending.get(U);if(!H){if(this.pending.size>=1000)return W();H=q().finally(()=>{if(this.pending.get(U)===H)this.pending.delete(U)}),this.pending.set(U,H)}if(B&&F<J.maxAge+(J.swr??0))return H.catch(()=>{}),w(B);let x=await H;return x?w(x):W()}}var HJ={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function uJ(K={}){let J=k.resolve(K.outputDir||".output"),G=K.port??3000,Z=GJ(J);if(!Z)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${Z.routes.length} routes...`);let W=$J(Z.routeRules),O=new d,U=XJ(J,Z.apiRoutes??[]),B=Bun.file(k.join(J,"server/runtime-config.json")),w=K.runtimeConfig??(await B.exists()?await B.json():void 0),F=w?i(w):void 0,S=new Map,q=new Map,H=new Map,x=new Map;for(let Q of Z.routes)try{let L=k.join(J,Q.compiledPath),Y=JSON.parse(await Bun.file(L).text());if(F)Y.html=p(Y.html,F);S.set(Q.pattern,Y),H.set(Q.pattern,l(Y.html)),x.set(Q.pattern,h(Y.html));let C=k.join(J,Q.fragmentPath);if(await Bun.file(C).exists()){let P=await Bun.file(C).text();q.set(Q.pattern,F?p(P,F):P)}}catch(L){console.warn(`[stx] Failed to load route ${Q.pattern}:`,L)}let X=new Map,T=[];for(let Q of Z.routes)if(Q.hasParams){let{regex:L,params:Y}=KJ(Q.pattern);T.push({regex:L,route:Q,paramNames:Y})}else X.set(Q.pattern,Q);let M=wJ({port:G,async fetch(Q){return t(Q,await QJ(F??i(),async()=>{let Y=new URL(Q.url).pathname;if(K.onRequest){let j=await K.onRequest(Q);if(j)return j}if(K.apiRouter){let j=await K.apiRouter.handleRequest(Q);if(j.status!==404)return j}if(K.apiRoutes?.[Y])return K.apiRoutes[Y](Q);let C=await U(Q);if(C)return C;if((Q.method==="GET"||Q.method==="HEAD")&&Y!=="/"){let j=k.resolve(J,"public"),_;try{_=decodeURIComponent(Y)}catch{_=Y}if(!_.includes("\x00")){let I=k.resolve(j,`.${_}`);if(I===j||I.startsWith(`${j}${k.sep}`))try{if(JJ.existsSync(I)&&JJ.statSync(I).isFile()){let z=k.extname(I).toLowerCase(),E=HJ[z]||"application/octet-stream",v=Y.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(Y);return new Response(Bun.file(I),{headers:{"Content-Type":E,"Cache-Control":v?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let P=g(Q),D=null,o={};if(D=X.get(Y)||null,!D)for(let{regex:j,route:_,paramNames:I}of T){let $=Y.match(j);if($){D=_,I.forEach((z,E)=>{o[z]=$[E+1]});break}}if(!D){let j=X.get("/404")||null;if(j){let _=S.get(j.pattern);if(_)return new Response(_.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}let R=W(Y),r=Object.keys(R).length>0;return O.respond(Q,R.cache,async()=>{let j=S.get(D.pattern);if(P&&Q.method==="GET"&&j&&!j.hasServerScripts&&Object.keys(j.placeholders).length===0){let $=q.get(D.pattern);if($){let z=H.get(D.pattern);return new Response($,{status:j.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...x.has(D.pattern)?{"X-STX-Runtime":x.get(D.pattern)?"true":"false"}:{},...z?{"X-STX-Layout":z.layout,"X-STX-Layout-Group":z.group}:{},...A(),...R.cache?{}:{"Cache-Control":ZJ}}})}}let _=WJ(Q.method),I=S.get(D.pattern);if(!I){let $=X.get("/500")||null;if($){let z=S.get($.pattern);if(z)return new Response(z.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(D.prerendered&&_)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!_&&!I.hasServerScripts&&Object.keys(I.placeholders).length===0)return new Response(I.html,{status:I.status??200,headers:{"Content-Type":"text/html",...A(),"Cache-Control":"public, max-age=60"}});try{let{html:$,boundaries:z,redirect:E,cookies:v,status:m,headers:c}=await jJ(I,{params:o,request:Q,method:Q.method,__stx_strict_hydration:r,__stx_runtime_config:F});if(E)return YJ(E,v,c);if(z&&z.length>0){let{renderStreamingPage:N,streamToResponse:u}=await import("./chunk-vzd6g7d1.js"),b=new Headers({...A(),...c,"Cache-Control":"private, no-store"});for(let f of v??[])b.append("Set-Cookie",f);if(P&&!_){let f=l($);b.set("X-STX-Fragment","true"),b.set("X-STX-Runtime",h($)?"true":"false"),b.set("X-STX-Layout",f.layout),b.set("X-STX-Layout-Group",f.group)}return u(N(P&&!_?n($,Z.routerContainer||"main"):$,z,{timeoutMs:30000}),{status:m??I.status??200,headers:b})}let V=new Headers({"Content-Type":"text/html",...A(),...R.cache?{}:{"Cache-Control":"private, no-store"}});for(let N of v??[])V.append("Set-Cookie",N);for(let[N,u]of Object.entries(c??{}))V.set(N,u);if(V.set("Vary",A(V.get("Vary")).Vary),P&&!_){let N=l($);return V.set("X-STX-Fragment","true"),V.set("X-STX-Runtime",h($)?"true":"false"),V.set("X-STX-Layout",N.layout),V.set("X-STX-Layout-Group",N.group),new Response(n($,Z.routerContainer||"main"),{status:m??I.status??200,headers:V})}return new Response($,{status:m??I.status??200,headers:V})}catch($){if(console.error(`[stx] Hydration error for ${Y}:`,$),r)return new Response("Internal Server Error",{status:500});return new Response(I.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${M.port}`),console.log(`[stx] Serving ${Z.routes.length} routes (${S.size} pre-loaded)`),{port:M.port,stop:()=>{O.invalidate(),M.stop()},invalidate:(Q)=>O.invalidate(Q)}}
3
3
  export{zJ as Ve,LJ as We,t as Xe,uJ as Ye};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ui as x,Vi as F,Wi as R}from"./chunk-xwxdwqn9.js";import{fm as K,hq as T,yr as k}from"./chunk-zqd4nrqt.js";import{Pu as y,Qu as N}from"./chunk-xcsf7my7.js";import{Uu as v}from"./chunk-ttny9g8k.js";import j from"path";var P=new Map,E=new Map,h=["composables","functions"];function D(q){let z=j.basename(q,".ts");return z==="index"||z==="types"||q.endsWith(".d.ts")}async function f(q){if(q)return j.resolve(q);let z=`<default>:${process.cwd()}`,W=E.get(z);if(W!==void 0)return W;let H=await u();if(H!==null)E.set(z,H);return H}async function u(){let q=await k(),z=q.root||process.cwd(),W=q.composablesDir;if(W)return j.resolve(z,W);for(let H of h){let Q=j.resolve(z,H);try{let V=new Bun.Glob("**/*.ts");for await(let Z of V.scan({cwd:Q,absolute:!0}))if(!D(Z))return Q}catch{}}return null}async function b(q){let z=Array.isArray(q)?q:q?[j.resolve(q)]:(await k())._layerComposableDirs??[await f()].filter((H)=>!!H),W=new Map;for(let H of z){let Q=new Bun.Glob("**/*.ts");try{for await(let V of Q.scan({cwd:H,absolute:!0})){let Z=j.relative(H,V);if(!D(V)&&!W.has(Z))W.set(Z,V)}}catch{}}return{key:z.join("\x00"),files:[...W.values()].sort()}}async function o(q){let{files:z}=await b(q),W=T({loader:"ts",target:"browser",define:K()}),H=[];for(let Q of z)try{let V=await Bun.file(Q).text(),Z=W.scan(V).exports.filter(($)=>$!=="default");if(Z.length>0)H.push({file:Q,names:Z})}catch{}return H}function p(q,z){return new RegExp(`\\b${z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(q)}function m(q,z,W){let H=new Map;for(let{file:$,names:G}of q)for(let O of G)if(!H.has(O))H.set(O,$);let Q=($)=>{let G=[];for(let[O,U]of H)if(p($,O))G.push(U);return G},V=new Set,Z=W.flatMap(Q);while(Z.length>0){let $=[];for(let G of Z){if(V.has(G))continue;V.add(G);for(let O of Q(z.get(G)??""))if(!V.has(O))$.push(O)}Z=$}return V}async function e(q,z,W){let{key:H,files:Q}=await b(q);if(!H)return null;let V=x(Q);if(Q.length===0)return R(P,H,V,""),null;Q.sort();let Z=T({loader:"ts",target:"browser",define:K()}),$=new Map,G=[];for(let J of Q)try{let Y=await Bun.file(J).text();$.set(J,Y);let L=Z.scan(Y).exports.filter((X)=>X!=="default");if(L.length>0)G.push({file:J,names:L})}catch{$.set(J,"")}let O=z===void 0?new Set(Q):m(G,$,W?[z,...W]:[z]);if(O.size===0)return null;let U=Q.filter((J)=>O.has(J)),A=`${H}\x00${U.join("\x00")}`,B=F(P,A,V);if(B!==void 0)return B||null;let M=[],w=new Set,I=new Set;for(let J of U)try{let Y=$.get(J)??await Bun.file(J).text(),L=j.basename(J,".ts");for(let X of Y.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(X[1])I.add(X[1]);try{for(let X of Z.scan(Y).exports)if(X!=="default")w.add(X)}catch{}Y=y(Y),Y=N(Y),Y=Y.replace(/^export\s+(default\s+)?/gm,""),Y=Z.transformSync(Y),M.push(`// Composable: ${L}
2
+ import{Ui as x,Vi as F,Wi as R}from"./chunk-xwxdwqn9.js";import{fm as K,hq as T,yr as k}from"./chunk-vqxqesr8.js";import{Pu as y,Qu as N}from"./chunk-xcsf7my7.js";import{Uu as v}from"./chunk-ttny9g8k.js";import j from"path";var P=new Map,E=new Map,h=["composables","functions"];function D(q){let z=j.basename(q,".ts");return z==="index"||z==="types"||q.endsWith(".d.ts")}async function f(q){if(q)return j.resolve(q);let z=`<default>:${process.cwd()}`,W=E.get(z);if(W!==void 0)return W;let H=await u();if(H!==null)E.set(z,H);return H}async function u(){let q=await k(),z=q.root||process.cwd(),W=q.composablesDir;if(W)return j.resolve(z,W);for(let H of h){let Q=j.resolve(z,H);try{let V=new Bun.Glob("**/*.ts");for await(let Z of V.scan({cwd:Q,absolute:!0}))if(!D(Z))return Q}catch{}}return null}async function b(q){let z=Array.isArray(q)?q:q?[j.resolve(q)]:(await k())._layerComposableDirs??[await f()].filter((H)=>!!H),W=new Map;for(let H of z){let Q=new Bun.Glob("**/*.ts");try{for await(let V of Q.scan({cwd:H,absolute:!0})){let Z=j.relative(H,V);if(!D(V)&&!W.has(Z))W.set(Z,V)}}catch{}}return{key:z.join("\x00"),files:[...W.values()].sort()}}async function o(q){let{files:z}=await b(q),W=T({loader:"ts",target:"browser",define:K()}),H=[];for(let Q of z)try{let V=await Bun.file(Q).text(),Z=W.scan(V).exports.filter(($)=>$!=="default");if(Z.length>0)H.push({file:Q,names:Z})}catch{}return H}function p(q,z){return new RegExp(`\\b${z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(q)}function m(q,z,W){let H=new Map;for(let{file:$,names:G}of q)for(let O of G)if(!H.has(O))H.set(O,$);let Q=($)=>{let G=[];for(let[O,U]of H)if(p($,O))G.push(U);return G},V=new Set,Z=W.flatMap(Q);while(Z.length>0){let $=[];for(let G of Z){if(V.has(G))continue;V.add(G);for(let O of Q(z.get(G)??""))if(!V.has(O))$.push(O)}Z=$}return V}async function e(q,z,W){let{key:H,files:Q}=await b(q);if(!H)return null;let V=x(Q);if(Q.length===0)return R(P,H,V,""),null;Q.sort();let Z=T({loader:"ts",target:"browser",define:K()}),$=new Map,G=[];for(let J of Q)try{let Y=await Bun.file(J).text();$.set(J,Y);let L=Z.scan(Y).exports.filter((X)=>X!=="default");if(L.length>0)G.push({file:J,names:L})}catch{$.set(J,"")}let O=z===void 0?new Set(Q):m(G,$,W?[z,...W]:[z]);if(O.size===0)return null;let U=Q.filter((J)=>O.has(J)),A=`${H}\x00${U.join("\x00")}`,B=F(P,A,V);if(B!==void 0)return B||null;let M=[],w=new Set,I=new Set;for(let J of U)try{let Y=$.get(J)??await Bun.file(J).text(),L=j.basename(J,".ts");for(let X of Y.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(X[1])I.add(X[1]);try{for(let X of Z.scan(Y).exports)if(X!=="default")w.add(X)}catch{}Y=y(Y),Y=N(Y),Y=Y.replace(/^export\s+(default\s+)?/gm,""),Y=Z.transformSync(Y),M.push(`// Composable: ${L}
3
3
  ${Y.trim()}`)}catch(Y){console.warn(`[stx] Failed to load composable ${J}:`,Y)}if(M.length===0||w.size===0)return R(P,A,V,""),null;let g=[...w].map((J)=>` try { __c[${JSON.stringify(J)}] = ${J}; } catch (e) {}`).join(`
4
4
  `),S=JSON.stringify([...w]),C=M.join(`
5
5
 
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{qu as a,ru as b}from"./chunk-df1mx1s1.js";import"./chunk-18p8dqya.js";import"./chunk-jryjwara.js";export{a as prepareRuntimeConfig,b as generateRuntimeConfigTypes};
2
+ import{qu as a,ru as b}from"./chunk-mc9xjq9z.js";import"./chunk-18p8dqya.js";import"./chunk-jryjwara.js";export{a as prepareRuntimeConfig,b as generateRuntimeConfigTypes};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Le as c,Me as d,Ne as e,Oe as f,Pe as g,Qe as h}from"./chunk-4xgsb361.js";import{Xf as a,_f as b}from"./chunk-yyy5mk7b.js";import"./chunk-xdnsxn2f.js";import"./chunk-xwxdwqn9.js";import"./chunk-zqd4nrqt.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-bcx36g1n.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-df1mx1s1.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-5kh5dr9k.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.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};
2
+ import{Le as c,Me as d,Ne as e,Oe as f,Pe as g,Qe as h}from"./chunk-mh4whcj5.js";import{Xf as a,_f as b}from"./chunk-btcca88f.js";import"./chunk-5k3xfbqt.js";import"./chunk-xwxdwqn9.js";import"./chunk-vqxqesr8.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-zkbdw1yr.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-mc9xjq9z.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-h22zwr5c.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.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{Al as GJ}from"./chunk-avqacmvp.js";import{fm as $J,yr as HJ,zr as zJ}from"./chunk-zqd4nrqt.js";import{jt as KJ,kt as ZJ}from"./chunk-397rqs12.js";import{Bt as u,xt as WJ}from"./chunk-bcx36g1n.js";import{ou as c}from"./chunk-4ee1aaet.js";import X from"path";import O from"fs";function OJ(J){if(!J||typeof J!=="object")return!1;let K=J;return typeof K.message==="string"&&(K.name==="BuildMessage"||K.name==="ResolveMessage"||("position"in K))}function wJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function b(J,K){let $=[];for(let W of wJ(J)){if(OJ(W)){let H=W.position||void 0;$.push({file:K||H?.file,line:H?.line,column:H?.column,message:W.message??"",lineText:H?.lineText});continue}$.push({file:K,message:W instanceof Error?W.message:String(W)})}return $}function s(J,K){return b(J,K).map(($)=>{let W=$.file?`${$.file}${$.line?`:${$.line}${$.column?`:${$.column}`:""}`:""}`:"",H=$.lineText?`
2
+ import{Al as GJ}from"./chunk-hb5tea65.js";import{fm as $J,yr as HJ,zr as zJ}from"./chunk-vqxqesr8.js";import{jt as KJ,kt as ZJ}from"./chunk-397rqs12.js";import{Bt as u,xt as WJ}from"./chunk-zkbdw1yr.js";import{ou as c}from"./chunk-4ee1aaet.js";import X from"path";import O from"fs";function OJ(J){if(!J||typeof J!=="object")return!1;let K=J;return typeof K.message==="string"&&(K.name==="BuildMessage"||K.name==="ResolveMessage"||("position"in K))}function wJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function b(J,K){let $=[];for(let W of wJ(J)){if(OJ(W)){let H=W.position||void 0;$.push({file:K||H?.file,line:H?.line,column:H?.column,message:W.message??"",lineText:H?.lineText});continue}$.push({file:K,message:W instanceof Error?W.message:String(W)})}return $}function s(J,K){return b(J,K).map(($)=>{let W=$.file?`${$.file}${$.line?`:${$.line}${$.column?`:${$.column}`:""}`:""}`:"",H=$.lineText?`
3
3
  ${$.lineText.trim()}`:"";return W?`${W}: ${$.message}${H}`:`${$.message}${H}`}).join(`
4
4
  `)}var UJ=9;function P(J,K,$){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(X.basename(J))||GJ(J,K,$)}var QJ=1,YJ=new Map,f=600,LJ=100,g=new Map;async function TJ(J){let K=g.get(J)??0;if(K>0&&K<LJ){g.set(J,K+1);return}g.set(J,1);try{let $=(await O.promises.readdir(J)).filter((z)=>z.endsWith(".js"));if($.length<=f)return;let H=(await Promise.all($.map(async(z)=>{try{return{name:z,at:(await O.promises.stat(X.join(J,z))).mtimeMs}}catch{return null}}))).filter((z)=>z!==null);H.sort((z,Y)=>Y.at-z.at);for(let z of H.slice(f)){let Y=z.name.slice(0,-3);await O.promises.rm(X.join(J,`${Y}.js`),{force:!0}),await O.promises.rm(X.join(J,`${Y}.deps.json`),{force:!0})}I("pruned bundle cache to",f,"entries")}catch{}}function mJ(J){return YJ.get(J)??[]}function h(J,K){if(J)YJ.set(J,K)}function AJ(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function I(...J){if(AJ())console.log("[stx:bundler]",...J)}var n=[];function t(J,K,$){n.push({filePath:J||"<inline>",message:K,details:$})}function uJ(){return n.slice()}function hJ(){n.length=0}var p;function pJ(J){p=J}function r(){if(p)return p;try{let J=zJ.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var a=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function cJ(J){let K=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,$;while(($=K.exec(J))!==null){let H=$[1];if(!a.some((Y)=>Y.test(H)))return I("detected user import:",H),!0}let W=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while(($=W.exec(J))!==null){let H=$[1];if(/\.css(?:\?.*)?$/.test(H))continue;if(!a.some((Y)=>Y.test(H)))return I("detected side-effect import:",H),!0}return!1}var D="stx-module:",CJ=/\.(?:[cm]?[jt]sx?|json)$/i;function MJ(J,K){return X.relative(J,K).split(X.sep).join("/")}function xJ(J,K){if(K.size===0)return J;return J.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,($,W,H,z)=>{let Y=K.get(z);return Y&&!z.startsWith(D)?`${W}${H}${Y}${H}`:$})}function IJ(J,K){let $=0,W=(z)=>{let Y=`__stxMod${$++}`,j=JSON.stringify(z);return K.push(`var ${Y} = globalThis.__stxModules && globalThis.__stxModules[${j}];`,`if (${Y} === undefined) throw new Error("[stx] module " + ${JSON.stringify(j)} + " is not registered on this page (#1957)");`),Y},H=(z,Y)=>{for(let j of z.split(",")){let T=j.trim();if(!T)continue;let Q=T.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!Q)continue;let Z=Q[1].startsWith('"')?JSON.parse(Q[1]):Q[1],G=Q[2]??Z;K.push(`var ${G} = ${Y}[${JSON.stringify(Z)}];`)}};return J=J.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(z,Y,j)=>{let T=j.slice(D.length),Q=W(T),Z=Y.trim(),G=Z.match(/^([\w$]+)\s*(?:,\s*|$)/);if(G&&!Z.startsWith("{")&&!Z.startsWith("*"))K.push(`var ${G[1]} = ${Q}.default;`),Z=Z.slice(G[0].length).trim();let q=Z.match(/^\*\s*as\s+([\w$]+)$/);if(q)K.push(`var ${q[1]} = ${Q};`);else if(Z.startsWith("{"))H(Z.replace(/^\{|\}$/g,""),Q);return""}),J=J.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(z,Y)=>{return W(Y.slice(D.length)),""}),J}function e(J){let K=[J,`${J}.ts`,`${J}.tsx`,`${J}.js`,`${J}.mjs`,`${J}.jsx`,X.join(J,"index.ts"),X.join(J,"index.tsx"),X.join(J,"index.js"),X.join(J,"index.mjs")];for(let $ of K)try{if(O.existsSync($)&&O.statSync($,{throwIfNoEntry:!1})?.isFile())return $}catch{}return}function NJ(J,K,$,W,H,z=new Map,Y){let j=(Q,Z,G)=>{if(P(Z,J,Y))return null;if(!H||Q!==$||!CJ.test(Z))return null;try{if(!O.statSync(Z,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}W.add(Z);let q=`${D}${MJ(process.cwd(),Z)}`;return z.set(G,q),{path:q,external:!0}},T=(Q,Z)=>{let G=Q===$?K:X.dirname(Q),q=X.resolve(G,Z);return e(q)??q};return{name:"stx-client-bundle",setup(Q){Q.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(Z)=>({path:Z.path,external:!0})),Q.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(Z)=>({path:Z.path,external:!0})),Q.onResolve({filter:/^\//},(Z)=>{let G=e(Z.path);if(G){let q=j(Z.importer,G,Z.path);if(q)return q;if(G!==$)W.add(G);return{path:G}}return{path:Z.path,external:!0}}),Q.onResolve({filter:/^\.\.?\//},(Z)=>{let G=T(Z.importer,Z.path),q=j(Z.importer,G,Z.path);if(q)return q;return W.add(G),{path:G}}),Q.onResolve({filter:/^[@~]\//},(Z)=>{let G=X.resolve(J,Z.path.slice(2)),q=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,X.join(G,"index.ts"),X.join(G,"index.tsx"),X.join(G,"index.js"),X.join(G,"index.mjs")];for(let A of q)if(O.existsSync(A)&&O.statSync(A,{throwIfNoEntry:!1})?.isFile()){let U=j(Z.importer,A,Z.path);if(U)return U;return I(`resolved ${Z.path[0]}/ import:`,Z.path,"\u2192",A),W.add(A),{path:A}}return console.warn(`[stx:bundler] could not resolve ${Z.path[0]}/ import:`,Z.path),{path:G}}),Q.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(Z)=>{if(!H||Z.importer!==$)return;let G=`${D}npm:${Z.path}`;return z.set(Z.path,G),{path:G,external:!0}}),Q.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(Z)=>{if(P(Z.path,J,Y))throw Error(`Server-only API source cannot be imported by a client script: ${Z.path}`);let G=X.extname(Z.path).toLowerCase(),q=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(Z.path!==$)W.add(Z.path);return{contents:O.readFileSync(Z.path,"utf8"),loader:q}})}}}var m=new Map,F=WJ(64),JJ=Symbol.for("stx.client-bundle-build-queue");function _J(J){let K=globalThis,W=(K[JJ]??Promise.resolve()).then(J,J);return K[JJ]=W.then(()=>{return},()=>{return}),W}async function nJ(J,K,$={}){let W=$.projectRoot||process.cwd(),H=(await HJ(W)).serverApi,z=$.minify??!1,Y=$.externalizeUserModules??!0,j=$.cacheDir||c(W,"bundle-cache"),T=new Bun.CryptoHasher("md5");T.update(`${UJ}\x00${JSON.stringify(H??!1)}\x00${Y?"registry":"inline"}\x00${J}\x00${K}`);let Q=T.digest("hex").slice(0,12),Z=X.join(j,`${Q}.js`),G=F.get(Z);if(G){if(u(G.files)&&G.files.every((C)=>!P(C.path,W,H))){I("memo hit:",Q);let C=G.files.map((w)=>w.path);return h(K,C),$.collectInputs?.push(...C),G.code}F.delete(Z),I("memo invalidated by dep change:",Q)}let q=X.join(j,`${Q}.deps.json`),A=Bun.file(Z);if(await A.exists()){let C=Bun.file(q),w=!1,M=null;if(await C.exists())try{let _=JSON.parse(await C.text());if(_.metadataVersion!==QJ||!Array.isArray(_.files))w=!1;else M=_.files,w=!0;if(M&&(!u(M)||M.some((S)=>P(S.path,W,H))))w=!1}catch{w=!1}if(w){if(I("cache hit:",Q),M)h(K,M.map((S)=>S.path)),$.collectInputs?.push(...M.map((S)=>S.path));let _=await A.text();if(M)F.set(Z,{code:_,files:M});return _}I("cache invalidated by dep change:",Q)}let U=m.get(Q);if(U){let C=await U;if($.collectInputs)$.collectInputs.push(...(F.get(Z)?.files??[]).map((w)=>w.path));return C}let v=_J(()=>SJ(J,K,{projectRoot:W,minify:z,cacheDir:j,hash:Q,cachePath:Z,depsPath:q,collectInputs:$.collectInputs,externalizeUserModules:Y,serverApi:H}));m.set(Q,v);try{return await v}finally{m.delete(Q)}}async function SJ(J,K,$){let{projectRoot:W,minify:H,cacheDir:z,hash:Y,cachePath:j,depsPath:T,externalizeUserModules:Q}=$,Z=c(W,"bundle-tmp"),G=X.join(Z,`${Y}.ts`),q=X.join(Z,"out",Y);O.mkdirSync(Z,{recursive:!0}),O.mkdirSync(q,{recursive:!0});let A=X.dirname(K),U=new Set,v=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,C=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,w=KJ(J),{depths:M,balanced:_}=ZJ(w),S=(L)=>!_||M[L]===0,x;while((x=v.exec(w))!==null){if(x[1])continue;if(!S(x.index))continue;if(x[2])x[2].split(",").forEach((L)=>{let k=BJ(L);if(k)U.add(k)});else if(x[3])U.add(x[3])}while((x=C.exec(w))!==null){if(x[1])continue;if(!S(x.index))continue;U.add(x[2])}let XJ=U.size>0?`
5
5
  export { ${[...U].join(", ")} }`:"";await Bun.write(G,J+XJ),I("bundling:",Y,"from:",X.basename(K));let o=new Set,l=new Map;try{let L=await Bun.build({entrypoints:[G],outdir:q,target:"browser",format:"esm",minify:H,plugins:[NJ(W,A,G,o,Q,l,$.serverApi)],define:{"process.env.NODE_ENV":H?'"production"':'"development"',...$J()},root:W});if(!L.success){let B=L.logs.filter((y)=>y.level==="error").map((y)=>y.message).join(", ")||`Unable to bundle ${X.basename(K)}`,R=b(L.logs,K||void 0);if(console.warn("[stx:bundler] build failed:",B),t(K||"",B,R),r()==="error")throw Error(B);return J}let k="";for(let V of L.outputs){k=await V.text();break}let N=[];for(let V of k.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let B of V[1].split(",")){let R=B.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(R){N.push([R[2],R[1]]);continue}let y=B.trim();if(/^[A-Za-z_$][\w$]*$/.test(y))N.push([y,y])}let d=[];k=IJ(xJ(k,l),d);let qJ=k.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];k=k.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let i=`__stxBundle_${Y}`,VJ=N.map(([V,B])=>`${JSON.stringify(V)}: ${B}`).join(", "),kJ=N.map(([V])=>`var ${V} = undefined;`).join(`
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{a as x,b as u,c as b,d as Az,e as G,f as d,h as y,i as I,j as Uz,k as v}from"./chunk-0y46fbkx.js";import{l as h,m as f,n as g}from"./chunk-q9n5swx7.js";import{Qo as V}from"./chunk-zqd4nrqt.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-bcx36g1n.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-df1mx1s1.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-5kh5dr9k.js";import"./chunk-9ebfmdyb.js";import{ew as F}from"./chunk-jryjwara.js";import l from"fs";import R from"path";function m(z,J){let Z=[R.join(z.root,"stx.config.ts"),R.join(z.root,"stx.config.js"),R.join(z.root,"stx.config.mjs")],K=J.debounceMs??300,$=null,X=[];for(let B of Z)try{if(!l.existsSync(B))continue;let Y=l.watch(B,(W)=>{if(W==="change"){if($)clearTimeout($);$=setTimeout(async()=>{d("Config file changed, restarting...");try{await J.onChange()}catch(j){G(`Failed to restart: ${j}`)}},K)}});X.push(Y)}catch{}return{stop(){if($)clearTimeout($);for(let B of X)B.close()}}}import E from"fs";import i from"path";var Gz=".stx/story/analytics.json",Nz=1,c=1e4;class M{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(z){this.storagePath=i.join(z,Gz),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let z=E.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Nz,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let z=i.dirname(this.storagePath);if(await E.promises.mkdir(z,{recursive:!0}),this.storage.events.length>c)this.storage.events=this.storage.events.slice(-c);await E.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:Hz(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(z){this.storage.events.push({...z,timestamp:Date.now()}),this.dirty=!0}trackView(z,J){if(this.endViewTiming(z),this.viewStartTimes.set(z,Date.now()),this.track({type:"view",componentId:z,variantId:J}),this.currentSession&&!this.currentSession.componentViews.includes(z))this.currentSession.componentViews.push(z)}endViewTiming(z){let J=this.viewStartTimes.get(z);if(J){let Z=Date.now()-J;this.track({type:"view",componentId:z,metadata:{duration:Z,endView:!0}}),this.viewStartTimes.delete(z)}}trackPropChange(z,J,Z){this.track({type:"prop_change",componentId:z,propName:J,metadata:{value:Z}})}trackVariantSwitch(z,J){this.track({type:"variant_switch",componentId:z,variantId:J})}trackSearch(z,J){this.track({type:"search",query:z,metadata:{resultCount:J}})}getComponentAnalytics(z,J){let Z=this.storage.events.filter((Q)=>Q.componentId===z),K=Z.filter((Q)=>Q.type==="view"&&!Q.metadata?.endView),$=Z.filter((Q)=>Q.type==="prop_change"),X=Z.filter((Q)=>Q.type==="variant_switch"),B={};for(let Q of $)if(Q.propName)B[Q.propName]=(B[Q.propName]||0)+1;let Y={};for(let Q of X)if(Q.variantId)Y[Q.variantId]=(Y[Q.variantId]||0)+1;let W=new Set(this.storage.sessions.filter((Q)=>Q.componentViews.includes(z)).map((Q)=>Q.id)),j=Z.filter((Q)=>Q.metadata?.duration).map((Q)=>Q.metadata.duration),U=j.length>0?j.reduce((Q,D)=>Q+D,0)/j.length:0,_=Object.entries(B).sort((Q,D)=>D[1]-Q[1]).slice(0,5).map(([Q])=>Q);return{componentId:z,componentName:J,viewCount:K.length,uniqueViews:W.size,lastViewed:K[K.length-1]?.timestamp,propChanges:B,topChangedProps:_,variantViews:Y,avgTimeSpent:U}}getMostViewedComponents(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="view"&&Z.componentId&&!Z.metadata?.endView)J.set(Z.componentId,(J.get(Z.componentId)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({componentId:Z,viewCount:K})).sort((Z,K)=>K.viewCount-Z.viewCount).slice(0,z)}getMostChangedProps(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="prop_change"&&Z.propName)J.set(Z.propName,(J.get(Z.propName)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({propName:Z,changeCount:K})).sort((Z,K)=>K.changeCount-Z.changeCount).slice(0,z)}getSearchAnalytics(){let z=this.storage.events.filter(($)=>$.type==="search"),J=new Map,Z=0;for(let $ of z){if($.query)J.set($.query,(J.get($.query)||0)+1);if($.metadata?.resultCount!==void 0)Z+=$.metadata.resultCount}let K=Array.from(J.entries()).map(([$,X])=>({query:$,count:X})).sort(($,X)=>X.count-$.count).slice(0,10);return{totalSearches:z.length,topQueries:K,avgResultCount:z.length>0?Z/z.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function Hz(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import P from"fs";import p from"path";var Fz=".stx/story/bookmarks.json",Vz=1;class T{storage;storagePath;dirty=!1;constructor(z){this.storagePath=p.join(z,Fz),this.storage=this.loadStorage()}loadStorage(){try{let z=P.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Vz,bookmarks:[]}}}async save(){if(!this.dirty)return;let z=p.dirname(this.storagePath);await P.promises.mkdir(z,{recursive:!0}),await P.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(z,J,Z,K={}){let $={id:Rz(),name:K.name||`${z}/${J}`,storyId:z,variantId:J,props:Z,created:Date.now(),notes:K.notes,color:K.color};return this.storage.bookmarks.push($),this.dirty=!0,$}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(z){return this.storage.bookmarks.filter((J)=>J.storyId===z)}getBookmark(z){return this.storage.bookmarks.find((J)=>J.id===z)}isBookmarked(z,J){return this.storage.bookmarks.some((Z)=>Z.storyId===z&&Z.variantId===J)}updateBookmark(z,J){let Z=this.getBookmark(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deleteBookmark(z){let J=this.storage.bookmarks.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.bookmarks.splice(J,1),this.dirty=!0,!0}toggleBookmark(z,J,Z){let K=this.storage.bookmarks.find((X)=>X.storyId===z&&X.variantId===J);if(K)return this.deleteBookmark(K.id),{added:!1};return{added:!0,bookmark:this.addBookmark(z,J,Z)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(z,J=!0){let Z=JSON.parse(z),K=0;for(let $ of Z.bookmarks){if(J){let X=this.storage.bookmarks.find((B)=>B.id===$.id);if(X)Object.assign(X,$);else this.storage.bookmarks.push($)}else this.storage.bookmarks.push($);K++}if(K>0)this.dirty=!0;return K}}function Rz(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var N=new Set;function s(){return{open(z){N.add(z),z.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(z){N.delete(z)},message(z,J){}}}function q(z){let J=JSON.stringify({...z,timestamp:z.timestamp||Date.now()});for(let Z of N)try{Z.send(J)}catch{N.delete(Z)}}function n(z,J){q({type:"story-update",data:{storyId:z,...J}})}function a(z,J){q({type:"story-add",data:{storyId:z,...J}})}function o(z){q({type:"story-remove",data:{storyId:z}})}function r(z){return`
2
+ import{a as x,b as u,c as b,d as Az,e as G,f as d,h as y,i as I,j as Uz,k as v}from"./chunk-0y46fbkx.js";import{l as h,m as f,n as g}from"./chunk-q9n5swx7.js";import{Qo as V}from"./chunk-vqxqesr8.js";import"./chunk-raxr83fs.js";import"./chunk-at84gyvf.js";import"./chunk-397rqs12.js";import"./chunk-aqrp68m6.js";import"./chunk-zkbdw1yr.js";import"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import"./chunk-4ee1aaet.js";import"./chunk-mc9xjq9z.js";import"./chunk-18p8dqya.js";import"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import"./chunk-ttny9g8k.js";import"./chunk-h22zwr5c.js";import"./chunk-9ebfmdyb.js";import{ew as F}from"./chunk-jryjwara.js";import l from"fs";import R from"path";function m(z,J){let Z=[R.join(z.root,"stx.config.ts"),R.join(z.root,"stx.config.js"),R.join(z.root,"stx.config.mjs")],K=J.debounceMs??300,$=null,X=[];for(let B of Z)try{if(!l.existsSync(B))continue;let Y=l.watch(B,(W)=>{if(W==="change"){if($)clearTimeout($);$=setTimeout(async()=>{d("Config file changed, restarting...");try{await J.onChange()}catch(j){G(`Failed to restart: ${j}`)}},K)}});X.push(Y)}catch{}return{stop(){if($)clearTimeout($);for(let B of X)B.close()}}}import E from"fs";import i from"path";var Gz=".stx/story/analytics.json",Nz=1,c=1e4;class M{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(z){this.storagePath=i.join(z,Gz),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let z=E.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Nz,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let z=i.dirname(this.storagePath);if(await E.promises.mkdir(z,{recursive:!0}),this.storage.events.length>c)this.storage.events=this.storage.events.slice(-c);await E.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:Hz(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(z){this.storage.events.push({...z,timestamp:Date.now()}),this.dirty=!0}trackView(z,J){if(this.endViewTiming(z),this.viewStartTimes.set(z,Date.now()),this.track({type:"view",componentId:z,variantId:J}),this.currentSession&&!this.currentSession.componentViews.includes(z))this.currentSession.componentViews.push(z)}endViewTiming(z){let J=this.viewStartTimes.get(z);if(J){let Z=Date.now()-J;this.track({type:"view",componentId:z,metadata:{duration:Z,endView:!0}}),this.viewStartTimes.delete(z)}}trackPropChange(z,J,Z){this.track({type:"prop_change",componentId:z,propName:J,metadata:{value:Z}})}trackVariantSwitch(z,J){this.track({type:"variant_switch",componentId:z,variantId:J})}trackSearch(z,J){this.track({type:"search",query:z,metadata:{resultCount:J}})}getComponentAnalytics(z,J){let Z=this.storage.events.filter((Q)=>Q.componentId===z),K=Z.filter((Q)=>Q.type==="view"&&!Q.metadata?.endView),$=Z.filter((Q)=>Q.type==="prop_change"),X=Z.filter((Q)=>Q.type==="variant_switch"),B={};for(let Q of $)if(Q.propName)B[Q.propName]=(B[Q.propName]||0)+1;let Y={};for(let Q of X)if(Q.variantId)Y[Q.variantId]=(Y[Q.variantId]||0)+1;let W=new Set(this.storage.sessions.filter((Q)=>Q.componentViews.includes(z)).map((Q)=>Q.id)),j=Z.filter((Q)=>Q.metadata?.duration).map((Q)=>Q.metadata.duration),U=j.length>0?j.reduce((Q,D)=>Q+D,0)/j.length:0,_=Object.entries(B).sort((Q,D)=>D[1]-Q[1]).slice(0,5).map(([Q])=>Q);return{componentId:z,componentName:J,viewCount:K.length,uniqueViews:W.size,lastViewed:K[K.length-1]?.timestamp,propChanges:B,topChangedProps:_,variantViews:Y,avgTimeSpent:U}}getMostViewedComponents(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="view"&&Z.componentId&&!Z.metadata?.endView)J.set(Z.componentId,(J.get(Z.componentId)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({componentId:Z,viewCount:K})).sort((Z,K)=>K.viewCount-Z.viewCount).slice(0,z)}getMostChangedProps(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="prop_change"&&Z.propName)J.set(Z.propName,(J.get(Z.propName)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({propName:Z,changeCount:K})).sort((Z,K)=>K.changeCount-Z.changeCount).slice(0,z)}getSearchAnalytics(){let z=this.storage.events.filter(($)=>$.type==="search"),J=new Map,Z=0;for(let $ of z){if($.query)J.set($.query,(J.get($.query)||0)+1);if($.metadata?.resultCount!==void 0)Z+=$.metadata.resultCount}let K=Array.from(J.entries()).map(([$,X])=>({query:$,count:X})).sort(($,X)=>X.count-$.count).slice(0,10);return{totalSearches:z.length,topQueries:K,avgResultCount:z.length>0?Z/z.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function Hz(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import P from"fs";import p from"path";var Fz=".stx/story/bookmarks.json",Vz=1;class T{storage;storagePath;dirty=!1;constructor(z){this.storagePath=p.join(z,Fz),this.storage=this.loadStorage()}loadStorage(){try{let z=P.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Vz,bookmarks:[]}}}async save(){if(!this.dirty)return;let z=p.dirname(this.storagePath);await P.promises.mkdir(z,{recursive:!0}),await P.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(z,J,Z,K={}){let $={id:Rz(),name:K.name||`${z}/${J}`,storyId:z,variantId:J,props:Z,created:Date.now(),notes:K.notes,color:K.color};return this.storage.bookmarks.push($),this.dirty=!0,$}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(z){return this.storage.bookmarks.filter((J)=>J.storyId===z)}getBookmark(z){return this.storage.bookmarks.find((J)=>J.id===z)}isBookmarked(z,J){return this.storage.bookmarks.some((Z)=>Z.storyId===z&&Z.variantId===J)}updateBookmark(z,J){let Z=this.getBookmark(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deleteBookmark(z){let J=this.storage.bookmarks.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.bookmarks.splice(J,1),this.dirty=!0,!0}toggleBookmark(z,J,Z){let K=this.storage.bookmarks.find((X)=>X.storyId===z&&X.variantId===J);if(K)return this.deleteBookmark(K.id),{added:!1};return{added:!0,bookmark:this.addBookmark(z,J,Z)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(z,J=!0){let Z=JSON.parse(z),K=0;for(let $ of Z.bookmarks){if(J){let X=this.storage.bookmarks.find((B)=>B.id===$.id);if(X)Object.assign(X,$);else this.storage.bookmarks.push($)}else this.storage.bookmarks.push($);K++}if(K>0)this.dirty=!0;return K}}function Rz(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var N=new Set;function s(){return{open(z){N.add(z),z.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(z){N.delete(z)},message(z,J){}}}function q(z){let J=JSON.stringify({...z,timestamp:z.timestamp||Date.now()});for(let Z of N)try{Z.send(J)}catch{N.delete(Z)}}function n(z,J){q({type:"story-update",data:{storyId:z,...J}})}function a(z,J){q({type:"story-add",data:{storyId:z,...J}})}function o(z){q({type:"story-remove",data:{storyId:z}})}function r(z){return`
3
3
  <script>
4
4
  (function() {
5
5
  const ws = new WebSocket('${z}');
@@ -556,7 +556,7 @@ window.__stxPerformance = {
556
556
 
557
557
  window.clearPerformanceMetrics = () => window.__stxPerformance.clear();
558
558
  </script>
559
- `}import w from"fs";import Xz from"path";var Mz=".stx/story/presets.json",C=1,Pz=10;class k{storage;storagePath;dirty=!1;constructor(z){this.storagePath=Xz.join(z,Mz),this.storage=this.loadStorage()}loadStorage(){try{let z=w.readFileSync(this.storagePath,"utf-8"),J=JSON.parse(z);if(J.version!==C)return this.migrateStorage(J);return J}catch{return{version:C,presets:[],recentIds:[]}}}migrateStorage(z){return{version:C,presets:z.presets||[],recentIds:z.recentIds||[]}}async save(){if(!this.dirty)return;let z=Xz.dirname(this.storagePath);await w.promises.mkdir(z,{recursive:!0}),await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(z,J,Z={}){let K={id:Tz(),name:z,description:Z.description,props:J,componentId:Z.componentId,created:Date.now(),usageCount:0,tags:Z.tags};return this.storage.presets.push(K),this.dirty=!0,K}getPreset(z){return this.storage.presets.find((J)=>J.id===z)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(z){return this.storage.presets.filter((J)=>!J.componentId||J.componentId===z)}getRecentPresets(){return this.storage.recentIds.map((z)=>this.getPreset(z)).filter((z)=>z!==void 0)}usePreset(z){let J=this.getPreset(z);if(!J)return;return J.lastUsed=Date.now(),J.usageCount++,this.storage.recentIds=[z,...this.storage.recentIds.filter((Z)=>Z!==z)].slice(0,Pz),this.dirty=!0,J}updatePreset(z,J){let Z=this.getPreset(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deletePreset(z){let J=this.storage.presets.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.presets.splice(J,1),this.storage.recentIds=this.storage.recentIds.filter((Z)=>Z!==z),this.dirty=!0,!0}searchPresets(z){let J=z.toLowerCase();return this.storage.presets.filter((Z)=>{if(Z.name.toLowerCase().includes(J))return!0;if(Z.description?.toLowerCase().includes(J))return!0;if(Z.tags?.some((K)=>K.toLowerCase().includes(J)))return!0;return!1})}getMostUsedPresets(z=5){return[...this.storage.presets].sort((J,Z)=>Z.usageCount-J.usageCount).slice(0,z)}exportPresets(z){let J=z?this.storage.presets.filter((Z)=>z.includes(Z.id)):this.storage.presets;return JSON.stringify({presets:J},null,2)}importPresets(z,J=!1){let Z=JSON.parse(z),K=0;for(let $ of Z.presets){let X=this.storage.presets.find((B)=>B.id===$.id);if(X&&!J)continue;if(X)Object.assign(X,$);else this.storage.presets.push($);K++}if(K>0)this.dirty=!0;return K}}function Tz(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";var Qz=new Map;async function H(z,J,Z={}){let K=performance.now(),$=[];try{let X=await S.promises.stat(J),B=Qz.get(J),Y;if(B&&B.mtime===X.mtimeMs)Y=B.content;else Y=await S.promises.readFile(J,"utf-8"),Qz.set(J,{content:Y,mtime:X.mtimeMs,analyzed:null});let{processDirectives:W}=await import("./chunk-se9jfhzq.js"),j={},U=A(Y);if(U)try{await V(U,j,J)}catch(O){$.push(`Warning: Could not extract script variables: ${O instanceof Error?O.message:String(O)}`)}if(Z.props)Object.assign(j,Z.props);let Q=await W(Y,j,J,{},new Set),D=Wz(Y),L=A(Y);return Q=jz(Q),Q=Dz(Q,j),{html:Q,css:D,js:L,errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}async function qz(z){try{let J=await S.promises.readFile(z,"utf-8"),Z=A(J);if(!Z)return null;let K={};if(await V(Z,K,z),Array.isArray(K.variants))return K.variants;return null}catch{return null}}async function Bz(z,J,Z,K){let $=J.story?.variants;if(!$){let Y=await qz(J.path);if(Y)$=Y}if(!$&&Z==="default")return H(z,J.path,{props:K||{}});if(!$)return H(z,J.path,{props:K||{}});let X=$.find((Y)=>Y.id===Z);if(!X&&Z==="default")return H(z,J.path,{props:K||{}});if(!X)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${Z}' not found`],duration:0};let B={...X.state,...K};if(X.source)return wz(z,X.source,B);return H(z,J.path,{props:B})}async function wz(z,J,Z={}){let K=performance.now(),$=[];try{let{processDirectives:X}=await import("./chunk-se9jfhzq.js"),B={...Z},Y=A(J);if(Y)try{await V(Y,B,"inline-template.stx")}catch{}let j=await X(J,B,"inline-template.stx",{},new Set);return j=jz(j),j=Dz(j,B),{html:j,css:Wz(J),js:A(J),errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}function Wz(z){let J=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
559
+ `}import w from"fs";import Xz from"path";var Mz=".stx/story/presets.json",C=1,Pz=10;class k{storage;storagePath;dirty=!1;constructor(z){this.storagePath=Xz.join(z,Mz),this.storage=this.loadStorage()}loadStorage(){try{let z=w.readFileSync(this.storagePath,"utf-8"),J=JSON.parse(z);if(J.version!==C)return this.migrateStorage(J);return J}catch{return{version:C,presets:[],recentIds:[]}}}migrateStorage(z){return{version:C,presets:z.presets||[],recentIds:z.recentIds||[]}}async save(){if(!this.dirty)return;let z=Xz.dirname(this.storagePath);await w.promises.mkdir(z,{recursive:!0}),await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(z,J,Z={}){let K={id:Tz(),name:z,description:Z.description,props:J,componentId:Z.componentId,created:Date.now(),usageCount:0,tags:Z.tags};return this.storage.presets.push(K),this.dirty=!0,K}getPreset(z){return this.storage.presets.find((J)=>J.id===z)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(z){return this.storage.presets.filter((J)=>!J.componentId||J.componentId===z)}getRecentPresets(){return this.storage.recentIds.map((z)=>this.getPreset(z)).filter((z)=>z!==void 0)}usePreset(z){let J=this.getPreset(z);if(!J)return;return J.lastUsed=Date.now(),J.usageCount++,this.storage.recentIds=[z,...this.storage.recentIds.filter((Z)=>Z!==z)].slice(0,Pz),this.dirty=!0,J}updatePreset(z,J){let Z=this.getPreset(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deletePreset(z){let J=this.storage.presets.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.presets.splice(J,1),this.storage.recentIds=this.storage.recentIds.filter((Z)=>Z!==z),this.dirty=!0,!0}searchPresets(z){let J=z.toLowerCase();return this.storage.presets.filter((Z)=>{if(Z.name.toLowerCase().includes(J))return!0;if(Z.description?.toLowerCase().includes(J))return!0;if(Z.tags?.some((K)=>K.toLowerCase().includes(J)))return!0;return!1})}getMostUsedPresets(z=5){return[...this.storage.presets].sort((J,Z)=>Z.usageCount-J.usageCount).slice(0,z)}exportPresets(z){let J=z?this.storage.presets.filter((Z)=>z.includes(Z.id)):this.storage.presets;return JSON.stringify({presets:J},null,2)}importPresets(z,J=!1){let Z=JSON.parse(z),K=0;for(let $ of Z.presets){let X=this.storage.presets.find((B)=>B.id===$.id);if(X&&!J)continue;if(X)Object.assign(X,$);else this.storage.presets.push($);K++}if(K>0)this.dirty=!0;return K}}function Tz(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";var Qz=new Map;async function H(z,J,Z={}){let K=performance.now(),$=[];try{let X=await S.promises.stat(J),B=Qz.get(J),Y;if(B&&B.mtime===X.mtimeMs)Y=B.content;else Y=await S.promises.readFile(J,"utf-8"),Qz.set(J,{content:Y,mtime:X.mtimeMs,analyzed:null});let{processDirectives:W}=await import("./chunk-nm2erkah.js"),j={},U=A(Y);if(U)try{await V(U,j,J)}catch(O){$.push(`Warning: Could not extract script variables: ${O instanceof Error?O.message:String(O)}`)}if(Z.props)Object.assign(j,Z.props);let Q=await W(Y,j,J,{},new Set),D=Wz(Y),L=A(Y);return Q=jz(Q),Q=Dz(Q,j),{html:Q,css:D,js:L,errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}async function qz(z){try{let J=await S.promises.readFile(z,"utf-8"),Z=A(J);if(!Z)return null;let K={};if(await V(Z,K,z),Array.isArray(K.variants))return K.variants;return null}catch{return null}}async function Bz(z,J,Z,K){let $=J.story?.variants;if(!$){let Y=await qz(J.path);if(Y)$=Y}if(!$&&Z==="default")return H(z,J.path,{props:K||{}});if(!$)return H(z,J.path,{props:K||{}});let X=$.find((Y)=>Y.id===Z);if(!X&&Z==="default")return H(z,J.path,{props:K||{}});if(!X)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${Z}' not found`],duration:0};let B={...X.state,...K};if(X.source)return wz(z,X.source,B);return H(z,J.path,{props:B})}async function wz(z,J,Z={}){let K=performance.now(),$=[];try{let{processDirectives:X}=await import("./chunk-nm2erkah.js"),B={...Z},Y=A(J);if(Y)try{await V(Y,B,"inline-template.stx")}catch{}let j=await X(J,B,"inline-template.stx",{},new Set);return j=jz(j),j=Dz(j,B),{html:j,css:Wz(J),js:A(J),errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}function Wz(z){let J=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
560
560
  `)}function jz(z){return z.replace(/<!--[\s\S]*?-->/g,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"").replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/^\s*\n/gm,"").trim()}function A(z){let J=[],Z=/<script\b[^>]*>([\s\S]*?)<\/script>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
561
561
  `)}function Dz(z,J){let Z=`<script>window.__stxProps = ${JSON.stringify(J)};</script>`;return z+Z}function Lz(z){return z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}async function Oz(z,J){let Z=await I(z);f(z,Z);let K=v(z.config,Z);g(z,K),console.log(` Found ${Z.length} story files`);let $=typeof J.host==="string"?J.host:J.host===!0?"0.0.0.0":"localhost",X=new k(z.root),B=new T(z.root),Y=new M(z.root),W=s(),j=Bun.serve({port:J.port,hostname:$,fetch:async(Q,D)=>{let O=new URL(Q.url).pathname;if(O==="/__hmr"){if(D.upgrade(Q,{data:{isHmr:!0}}))return;return new Response("WebSocket upgrade failed",{status:400})}if(O.startsWith("/api/"))return Cz(z,O,Q,{presetsManager:X,bookmarksManager:B,analyticsTracker:Y});return kz(z,O,J.port)},websocket:{open(Q){W.open(Q)},close(Q){W.close(Q)},message(Q,D){W.message(Q,D)}}}),U=`http://${$}:${J.port}`,_=Uz(z,async(Q,D)=>{console.log(` [${Q}] ${D.relativePath}`);let L=await I(z);f(z,L);let O=v(z.config,L);if(g(z,O),Q==="add")a(D.id,{fileName:D.fileName});else if(Q==="unlink")o(D.id);else n(D.id,{fileName:D.fileName})});if(J.open){let Q=U;try{let{exec:D}=await import("child_process"),L=process.platform;D(`${L==="darwin"?"open":L==="win32"?"start":"xdg-open"} ${Q}`)}catch{}}return{server:j,url:U,close:async()=>{_(),j.stop()}}}async function Cz(z,J,Z,K){let{presetsManager:$,bookmarksManager:X,analyticsTracker:B}=K;if(J==="/api/stories")return Response.json({files:z.storyFiles.map((Y)=>({id:Y.id,fileName:Y.fileName,relativePath:Y.relativePath,treePath:Y.treePath})),tree:z.tree});if(J.startsWith("/api/story/")){let Y=J.slice(11),W=z.storyFiles.find((j)=>j.id===Y);if(!W)return new Response("Story not found",{status:404});try{let j=await Bun.file(W.path).text();return Response.json({id:W.id,fileName:W.fileName,relativePath:W.relativePath,content:j})}catch{return new Response("Error reading story",{status:500})}}if(J==="/api/config")return Response.json({theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets});if(J.startsWith("/api/render/")){let Y=new URL(Z.url),W=J.slice(12).split("/"),j=W[0],U=W[1]||"default",_,Q=Y.searchParams.get("props");if(Q)try{_=JSON.parse(Q)}catch{}let D=z.storyFiles.find((L)=>L.id===j);if(!D)return new Response("Story not found",{status:404});try{let L=await Bz(z,D,U,_);return Response.json({html:L.html,css:L.css,js:L.js,errors:L.errors,duration:L.duration})}catch(L){return Response.json({html:"",css:"",js:"",errors:[L instanceof Error?L.message:String(L)],duration:0},{status:500})}}if(J==="/api/presets"&&Z.method==="GET")return Response.json({presets:$.getAllPresets()});if(J==="/api/presets"&&Z.method==="POST")try{let Y=await Z.json(),W=$.createPreset(Y.name,Y.props,{componentId:Y.componentId,description:Y.description});return await $.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J.startsWith("/api/presets/")&&!J.includes("/use")&&Z.method==="GET"){let Y=J.slice(13),W=$.getPreset(Y);if(!W)return new Response("Preset not found",{status:404});return Response.json(W)}if(J.endsWith("/use")&&Z.method==="POST"){let Y=J.slice(13,-4),W=$.usePreset(Y);if(!W)return new Response("Preset not found",{status:404});return await $.save(),Response.json(W)}if(J.startsWith("/api/presets/")&&Z.method==="DELETE"){let Y=J.slice(13);if(!$.deletePreset(Y))return new Response("Preset not found",{status:404});return await $.save(),Response.json({success:!0})}if(J==="/api/bookmarks"&&Z.method==="GET")return Response.json({bookmarks:X.getAllBookmarks()});if(J==="/api/bookmarks"&&Z.method==="POST")try{let Y=await Z.json(),W=X.addBookmark(Y.storyId,Y.variantId,Y.props,{name:Y.name,notes:Y.notes,color:Y.color});return await X.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J==="/api/bookmarks/toggle"&&Z.method==="POST")try{let Y=await Z.json(),W=X.toggleBookmark(Y.storyId,Y.variantId,Y.props);return await X.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J.startsWith("/api/bookmarks/")&&J!=="/api/bookmarks/toggle"&&Z.method==="GET"){let Y=J.slice(15),W=X.getBookmark(Y);if(!W)return new Response("Bookmark not found",{status:404});return Response.json(W)}if(J.startsWith("/api/bookmarks/")&&Z.method==="DELETE"){let Y=J.slice(15);if(!X.deleteBookmark(Y))return new Response("Bookmark not found",{status:404});return await X.save(),Response.json({success:!0})}if(J==="/api/analytics/track"&&Z.method==="POST")try{let Y=await Z.json();if(Y.type==="view"&&Y.componentId)B.trackView(Y.componentId,Y.variantId);else if(Y.type==="prop_change"&&Y.componentId&&Y.propName)B.trackPropChange(Y.componentId,Y.propName,null);else if(Y.type==="variant_switch"&&Y.componentId&&Y.variantId)B.trackVariantSwitch(Y.componentId,Y.variantId);else if(Y.type==="search"&&Y.query)B.trackSearch(Y.query,0);return await B.save(),Response.json({success:!0})}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J==="/api/analytics/summary"&&Z.method==="GET")return Response.json({mostViewed:B.getMostViewedComponents(10),mostChangedProps:B.getMostChangedProps(10),searchAnalytics:B.getSearchAnalytics()});if(J.startsWith("/api/analytics/component/")&&Z.method==="GET"){let Y=J.slice(25),W=z.storyFiles.find((U)=>U.id===Y),j=B.getComponentAnalytics(Y,W?.fileName||Y);return Response.json(j)}return new Response("Not found",{status:404})}function kz(z,J,Z){let K=Sz(z,Z);return new Response(K,{headers:{"Content-Type":"text/html; charset=utf-8"}})}function Sz(z,J){let{theme:Z}=z.config,K=Z.title||"STX Story",$=`ws://localhost:${J}/__hmr`,X=r($);return`<!DOCTYPE html>
562
562
  <html lang="en" class="${Z.darkClass||"dark"}">
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Wv as y}from"./chunk-5kh5dr9k.js";import N from"fs";import B from"path";var Y="_stx";function L(M){return Bun.hash(M).toString(16).slice(0,8)}function T(M){let C=[],v=(q)=>{for(let g of N.readdirSync(q,{withFileTypes:!0})){let j=B.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(N.existsSync(M))v(M);return C}var S=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-runtime src="${M}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-router src="${M}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(M)=>`<link data-css="generated" rel="stylesheet" href="${M}">`}];function _(M,C=`/${Y}`){let v=[],q=new Set,g=0,j=M;for(let G of S)j=j.replace(G.pattern,(R,K,W)=>{if(/\b(?:src|href)\s*=/.test(K)||!W.trim())return R;let Q=`${G.prefix}.${L(W)}.${G.extension}`;if(!q.has(Q))q.add(Q),v.push({filename:Q,contents:W,contentType:G.contentType});return g+=W.length,G.replace(`${C}/${Q}`)});return{html:j,assets:v,bytesInlined:g}}function a(M){let C={pages:0,assets:0,bytesInlined:0},v=B.join(M,Y),q=new Set;for(let g of T(M)){let j=N.readFileSync(g,"utf8"),{html:G,assets:R,bytesInlined:K}=_(j);if(G===j)continue;for(let W of R){if(q.has(W.filename))continue;q.add(W.filename),N.mkdirSync(v,{recursive:!0}),N.writeFileSync(B.join(v,W.filename),W.contents),C.assets++}N.writeFileSync(g,G),C.bytesInlined+=K,C.pages++}return C}import z from"fs";import P from"path";var I=1024,E=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,d=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function b(M){return Bun.hash(M).toString(16).slice(0,8)}function p(M){let C=[],v=(q)=>{for(let g of z.readdirSync(q,{withFileTypes:!0})){let j=P.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(z.existsSync(M))v(M);return C}function D(M,C){let v=M.match(new RegExp(`\\b${C}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!v)return;return v[2]??v[3]??v[4]??""}function m(M,C,v){if(v.length<I)return!1;if(/\b(?:src|href)\s*=/i.test(C))return!1;if(M.toLowerCase()==="script"){if(!d.has((D(C,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function o(M){let C=[];for(let v of M.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))C.push([v.index,v.index+v[0].length]);return C}function s(M){let C={pages:0,assets:0,bytesInlined:0},v=p(M);if(v.length<2)return C;let q=new Map,g=new Map;for(let Q of v){let O=z.readFileSync(Q,"utf8");q.set(Q,O);let x=o(O);for(let U of O.matchAll(E)){let[w,V,J,$]=U;if(!m(V,J,$))continue;if(x.some(([A,k])=>U.index>=A&&U.index<k))continue;let H=`${V.toLowerCase()}\x00${$}`,X=g.get(H);if(X)X.push({file:Q,whole:w,tag:V,attrs:J,body:$});else g.set(H,[{file:Q,whole:w,tag:V,attrs:J,body:$}])}}let j=[...g.values()].filter((Q)=>new Set(Q.map((O)=>O.file)).size>1);if(j.length===0)return C;let G=P.join(M,Y),R=new Map(q),K=new Map,W=[];for(let Q of j){let{tag:O,body:x}=Q[0],U=O.toLowerCase()==="script",w=`${U?"chunk":"style"}.${b(x)}.${U?"js":"css"}`;W.push({filename:w,contents:x,contentType:U?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let V=`/${Y}/${w}`;for(let J of Q){let $=U?`<script${J.attrs} src="${V}"></script>`:`<link${J.attrs} rel="stylesheet" href="${V}">`,H=R.get(J.file),X=H.replace(J.whole,()=>$);if(X===H)continue;R.set(J.file,X),K.set(J.file,(K.get(J.file)??0)+J.body.length)}}z.mkdirSync(G,{recursive:!0});for(let Q of W)z.writeFileSync(P.join(G,Q.filename),Q.contents),C.assets++;for(let[Q,O]of R){if(O===q.get(Q))continue;z.writeFileSync(Q,O),C.pages++,C.bytesInlined+=K.get(Q)??0}return C}y();import Z from"fs";import F from"path";var h="layout-types.d.ts";function f(M){let C=[],v=(q,g)=>{let j;try{j=Z.readdirSync(q,{withFileTypes:!0})}catch{return}for(let G of j){if(G.name.startsWith("."))continue;let R=F.join(q,G.name);if(G.isDirectory())v(R,g?`${g}/${G.name}`:G.name);else if(G.isFile()&&G.name.endsWith(".stx")&&G.name!=="_layout.stx"){let K=G.name.slice(0,-4);C.push(g?`${g}/${K}`:K)}}};return v(M,""),C.sort()}function c(M){let C=["// Auto-generated by stx \u2014 do not edit.","//","// Makes `definePageMeta({ layout })` reject a name with no layout behind it.","// Include this file in your tsconfig (it lives in the stx state directory,","// `.stx/` by default) for the check to apply.",""];if(M.length===0)return C.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),C.join(`
2
+ import{Wv as y}from"./chunk-h22zwr5c.js";import N from"fs";import B from"path";var Y="_stx";function L(M){return Bun.hash(M).toString(16).slice(0,8)}function T(M){let C=[],v=(q)=>{for(let g of N.readdirSync(q,{withFileTypes:!0})){let j=B.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(N.existsSync(M))v(M);return C}var S=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-runtime src="${M}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-router src="${M}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(M)=>`<link data-css="generated" rel="stylesheet" href="${M}">`}];function _(M,C=`/${Y}`){let v=[],q=new Set,g=0,j=M;for(let G of S)j=j.replace(G.pattern,(R,K,W)=>{if(/\b(?:src|href)\s*=/.test(K)||!W.trim())return R;let Q=`${G.prefix}.${L(W)}.${G.extension}`;if(!q.has(Q))q.add(Q),v.push({filename:Q,contents:W,contentType:G.contentType});return g+=W.length,G.replace(`${C}/${Q}`)});return{html:j,assets:v,bytesInlined:g}}function a(M){let C={pages:0,assets:0,bytesInlined:0},v=B.join(M,Y),q=new Set;for(let g of T(M)){let j=N.readFileSync(g,"utf8"),{html:G,assets:R,bytesInlined:K}=_(j);if(G===j)continue;for(let W of R){if(q.has(W.filename))continue;q.add(W.filename),N.mkdirSync(v,{recursive:!0}),N.writeFileSync(B.join(v,W.filename),W.contents),C.assets++}N.writeFileSync(g,G),C.bytesInlined+=K,C.pages++}return C}import z from"fs";import P from"path";var I=1024,E=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,d=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function b(M){return Bun.hash(M).toString(16).slice(0,8)}function p(M){let C=[],v=(q)=>{for(let g of z.readdirSync(q,{withFileTypes:!0})){let j=P.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(z.existsSync(M))v(M);return C}function D(M,C){let v=M.match(new RegExp(`\\b${C}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!v)return;return v[2]??v[3]??v[4]??""}function m(M,C,v){if(v.length<I)return!1;if(/\b(?:src|href)\s*=/i.test(C))return!1;if(M.toLowerCase()==="script"){if(!d.has((D(C,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function o(M){let C=[];for(let v of M.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))C.push([v.index,v.index+v[0].length]);return C}function s(M){let C={pages:0,assets:0,bytesInlined:0},v=p(M);if(v.length<2)return C;let q=new Map,g=new Map;for(let Q of v){let O=z.readFileSync(Q,"utf8");q.set(Q,O);let x=o(O);for(let U of O.matchAll(E)){let[w,V,J,$]=U;if(!m(V,J,$))continue;if(x.some(([A,k])=>U.index>=A&&U.index<k))continue;let H=`${V.toLowerCase()}\x00${$}`,X=g.get(H);if(X)X.push({file:Q,whole:w,tag:V,attrs:J,body:$});else g.set(H,[{file:Q,whole:w,tag:V,attrs:J,body:$}])}}let j=[...g.values()].filter((Q)=>new Set(Q.map((O)=>O.file)).size>1);if(j.length===0)return C;let G=P.join(M,Y),R=new Map(q),K=new Map,W=[];for(let Q of j){let{tag:O,body:x}=Q[0],U=O.toLowerCase()==="script",w=`${U?"chunk":"style"}.${b(x)}.${U?"js":"css"}`;W.push({filename:w,contents:x,contentType:U?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let V=`/${Y}/${w}`;for(let J of Q){let $=U?`<script${J.attrs} src="${V}"></script>`:`<link${J.attrs} rel="stylesheet" href="${V}">`,H=R.get(J.file),X=H.replace(J.whole,()=>$);if(X===H)continue;R.set(J.file,X),K.set(J.file,(K.get(J.file)??0)+J.body.length)}}z.mkdirSync(G,{recursive:!0});for(let Q of W)z.writeFileSync(P.join(G,Q.filename),Q.contents),C.assets++;for(let[Q,O]of R){if(O===q.get(Q))continue;z.writeFileSync(Q,O),C.pages++,C.bytesInlined+=K.get(Q)??0}return C}y();import Z from"fs";import F from"path";var h="layout-types.d.ts";function f(M){let C=[],v=(q,g)=>{let j;try{j=Z.readdirSync(q,{withFileTypes:!0})}catch{return}for(let G of j){if(G.name.startsWith("."))continue;let R=F.join(q,G.name);if(G.isDirectory())v(R,g?`${g}/${G.name}`:G.name);else if(G.isFile()&&G.name.endsWith(".stx")&&G.name!=="_layout.stx"){let K=G.name.slice(0,-4);C.push(g?`${g}/${K}`:K)}}};return v(M,""),C.sort()}function c(M){let C=["// Auto-generated by stx \u2014 do not edit.","//","// Makes `definePageMeta({ layout })` reject a name with no layout behind it.","// Include this file in your tsconfig (it lives in the stx state directory,","// `.stx/` by default) for the check to apply.",""];if(M.length===0)return C.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),C.join(`
3
3
  `);return C.push("declare module '@stacksjs/stx' {"," interface KnownLayouts {",...M.map((v)=>` '${v}': true`)," }","}","","export {}",""),C.join(`
4
4
  `)}function HM(M,C){if(!M)return[];let v=F.isAbsolute(M)?M:F.resolve(process.cwd(),M),q=f(v),g=c(q),j=F.join(C,h);try{if(Z.existsSync(j)&&Z.readFileSync(j,"utf8")===g)return q;Z.mkdirSync(C,{recursive:!0}),Z.writeFileSync(j,g)}catch{}return q}
5
5
  export{Y as Dk,_ as Ek,a as Fk,s as Gk,h as Hk,f as Ik,c as Jk,HM as Kk};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$ as Tl,$a as Xn,$b as gp,$c as gq,$d as gr,A as Dk,Aa as gn,Ab as Bo,Ac as Hp,Ad as Hq,Ae as Nr,B as Ek,Ba as hn,Bb as Co,Bc as Ip,Bd as Iq,Be as Or,C as Fk,Ca as vn,Cb as Do,Cc as Jp,Cd as Jq,Ce as Pr,D as Gk,Da as wn,Db as Eo,Dc as Kp,Dd as Kq,De as Qr,E as wl,Ea as xn,Eb as Fo,Ec as Lp,Ed as Lq,Ee as Rr,F as xl,Fa as yn,Fb as Go,Fc as Mp,Fd as Mq,Fe as Sr,G as yl,Ga as zn,Gb as Ho,Gc as Np,Gd as Nq,Ge as Tr,H as zl,Ha as An,Hb as Io,Hc as Op,Hd as Oq,He as Ur,I as Al,Ia as En,Ib as Jo,Ic as Pp,Id as Pq,Ie as Vr,J as Bl,Ja as Fn,Jb as Ko,Jc as Qp,Jd as Qq,Je as Wr,K as Cl,Ka as Gn,Kb as Lo,Kc as Rp,Kd as Rq,Ke as Xr,L as Dl,La as Hn,Lb as Mo,Lc as Sp,Ld as Sq,M as El,Ma as In,Mb as No,Mc as Tp,Md as Tq,N as Fl,Na as Jn,Nb as Uo,Nc as Up,Nd as Uq,O as Gl,Oa as Kn,Ob as Vo,Oc as Vp,Od as Vq,P as Hl,Pa as Ln,Pb as Wo,Pc as Wp,Pd as Wq,Q as Il,Qa as Mn,Qb as Xo,Qc as Xp,Qd as Xq,R as Jl,Ra as Nn,Rb as Yo,Rc as Yp,Rd as Yq,S as Kl,Sa as On,Sb as Zo,Sc as Zp,Sd as Zq,T as Ll,Ta as Pn,Tb as _o,Tc as _p,Td as _q,U as Ml,Ua as Qn,Ub as $o,Uc as $p,Ud as $q,V as Nl,Va as Rn,Vb as ap,Vc as aq,Vd as ar,W as Ol,Wa as Sn,Wb as bp,Wc as bq,Wd as br,X as Pl,Xa as Tn,Xb as cp,Xc as cq,Xd as cr,Y as Ql,Ya as Un,Yb as dp,Yc as dq,Yd as dr,Z as Rl,Za as Vn,Zb as ep,Zc as eq,Zd as er,_ as Sl,_a as Wn,_b as fp,_c as fq,_d as fr,aa as Ul,ab as Yn,ac as hp,ad as hq,ae as hr,ba as Vl,bb as Zn,bc as ip,bd as iq,be as or,ca as Wl,cb as _n,cc as jp,cd as jq,ce as pr,da as Xl,db as $n,dc as kp,dd as kq,de as qr,ea as Yl,eb as ao,ec as lp,ed as lq,ee as rr,fa as Zl,fb as bo,fc as mp,fd as mq,fe as sr,ga as _l,gb as co,gc as np,gd as nq,ge as tr,ha as $l,hb as eo,hc as op,hd as oq,he as ur,ia as am,ib as fo,ic as pp,id as pq,ie as vr,ja as bm,jb as go,jc as qp,jd as qq,je as wr,ka as cm,kb as ho,kc as rp,kd as rq,ke as xr,la as dm,lb as io,lc as sp,ld as sq,le as yr,ma as em,mb as jo,mc as tp,md as tq,me as zr,na as fm,nb as mo,nc as up,nd as uq,ne as Ar,o as a,oa as gm,ob as no,oc as vp,od as vq,oe as Br,p as ok,pa as Xm,pb as oo,pc as wp,pd as wq,pe as Cr,q as pk,qa as Ym,qb as po,qc as xp,qd as xq,qe as Dr,r as qk,ra as Zm,rb as ro,rc as yp,rd as yq,re as Er,s as rk,sa as _m,sb as so,sc as zp,sd as zq,se as Fr,t as sk,ta as $m,tb as to,tc as Ap,td as Aq,te as Gr,u as tk,ua as an,ub as uo,uc as Bp,ud as Bq,ue as Hr,v as uk,va as bn,vb as wo,vc as Cp,vd as Cq,ve as Ir,w as vk,wa as cn,wb as xo,wc as Dp,wd as Dq,we as Jr,x as wk,xa as dn,xb as yo,xc as Ep,xd as Eq,xe as Kr,y as Bk,ya as en,yb as zo,yc as Fp,yd as Fq,ye as Lr,z as Ck,za as fn,zb as Ao,zc as Gp,zd as Gq,ze as Mr}from"./chunk-92g4qya5.js";import{Le as Oo,Me as Po,Ne as Qo,Oe as Ro,Pe as So,Qe as To}from"./chunk-4xgsb361.js";import{Re as ko,Se as lo}from"./chunk-2ver2s2y.js";import{Te as qo}from"./chunk-hnb6kzpe.js";import{Ue as Wm}from"./chunk-81jx0c3x.js";import{Ve as Bn,We as Cn,Xe as Dn,Ye as vo}from"./chunk-y1b6y022.js";import{$e as Jk,Ze as Hk,_e as Ik,af as Kk,bf as Lk,cf as Mk,df as Nk,ef as Ok,ff as Pk,gf as Qk,hf as Rk,if as Sk,jf as Tk,kf as Uk,lf as Vk}from"./chunk-ym3r8ktq.js";import{mf as kl,nf as ll,of as ml,pf as nl,qf as ol,rf as pl,sf as ql,tf as rl,uf as sl,vf as tl,wf as ul,xf as vl}from"./chunk-a50hb40e.js";import{yf as il,zf as jl}from"./chunk-ka5wtqmw.js";import{Af as Wk,Bf as Xk,Cf as Yk,Df as Zk,Ef as _k,Ff as $k,Gf as al,If as bl,Jf as cl,Kf as dl,Lf as el,Mf as fl,Nf as gl,Qf as hl}from"./chunk-zdzd2jb4.js";import{Rf as Dm,Sf as Em,Tf as Fm,Uf as Gm,Vf as Jm,Wf as Vm}from"./chunk-9ewg41dm.js";import{Xf as Hm,_f as Im}from"./chunk-yyy5mk7b.js";import{Ag as Om,Bg as Pm,Cg as Qm,Dg as Rm,Eg as Sm,Fg as Tm,Gg as Um,gg as hm,hg as im,ig as jm,jg as km,kg as lm,lg as mm,mg as nm,ng as om,og as pm,pg as qm,qg as rm,rg as sm,sg as tm,tg as um,ug as vm,vg as wm,wg as Km,xg as Lm,yg as Mm,zg as Nm}from"./chunk-34yzcb00.js";import{Hg as xm,Ig as ym}from"./chunk-dvvx1wny.js";import{Jg as jn,Kg as kn,Lg as ln,Mg as mn,Ng as nn,Og as on,Pg as pn,Qg as qn,Rg as rn,Sg as sn,Tg as tn,Ug as un}from"./chunk-xz3evxqp.js";import{Vg as _h,Wg as $h,Xg as ai,Yg as bi,Zg as ci,_g as di}from"./chunk-ycvxjxhz.js";import{$g as sj,ah as tj,bh as uj,fh as vj,gh as wj,hh as xj}from"./chunk-0gbptqh2.js";import{ih as Dj,jh as Ej,kh as Fj,lh as Gj,mh as Hj,nh as Ij,oh as Jj,ph as Kj,qh as Lj,rh as Mj,sh as Nj}from"./chunk-f044qmn3.js";import{Ah as oj,Bh as pj,Ch as qj,Dh as rj,th as ij,uh as jj,vh as kj,wh as lj,xh as mj,zh as nj}from"./chunk-vd5xvsnv.js";import{Eh as dk,Gh as ek}from"./chunk-64djh88a.js";import{Mh as Bh,Nh as Ch,Oh as Dh,Ph as Eh,Qh as Fh,Rh as Gh,Sh as Hh,Th as Ih,Uh as Jh,Vh as Kh,Wh as Lh,Xh as Mh,Yh as Nh,Zh as Oh}from"./chunk-9368t9jm.js";import{$h as Ph,ai as Qh,bi as Rh,ci as Sh}from"./chunk-5tefa8qb.js";import{hi as Th}from"./chunk-mwh3ymwc.js";import{ii as Xg}from"./chunk-fqq5k9ve.js";import{ji as Yg,ki as Zg}from"./chunk-ya5m5vbn.js";import{li as _g,mi as $g,ni as ah,oi as bh,pi as ch,qi as dh}from"./chunk-y4nzmkea.js";import{ri as eh,si as fh,ti as gh,ui as hh,vi as ih}from"./chunk-7kw3grq5.js";import{Ai as nh,wi as jh,xi as kh,yi as lh,zi as mh}from"./chunk-c79nfdyj.js";import{Bi as oh,Ci as ph,Di as qh,Ei as rh,Fi as sh,Gi as th,Hi as uh}from"./chunk-ej8mv2k6.js";import{Ii as vh,Ji as wh,Ki as xh,Li as yh,Mi as zh,Ni as Ah}from"./chunk-cr8v8k53.js";import{Pi as Ug,Qi as Vg}from"./chunk-8bnpdtjh.js";import{Ti as Wg}from"./chunk-xdnsxn2f.js";import"./chunk-xwxdwqn9.js";import{$i as He,Xi as De,Yi as Ee,Zi as Fe,_i as Ge,aj as Ie,bj as Je,cj as Ke,dj as Le,ej as Me,fj as Ne,gj as Oe,hj as Pe,ij as Qe}from"./chunk-97bbr767.js";import{jj as ff,kj as gf,lj as hf,mj as jf,nj as kf,oj as lf,pj as mf,qj as nf,rj as of,sj as pf,tj as qf,uj as rf,vj as sf,wj as tf,xj as uf,yj as vf,zj as wf}from"./chunk-tph7b269.js";import{Gj as Te,Hj as Ue,Ij as Ve,Jj as We,Kj as Xe,Lj as Ye,Mj as Ze,Nj as _e,Oj as $e,Pj as af,Qj as bf,Rj as cf,Sj as df,Tj as ef}from"./chunk-t41aaehf.js";import{$j as Ef,Uj as xf,Vj as yf,Wj as zf,Xj as Af,Yj as Bf,Zj as Cf,_j as Df,ak as Ff,bk as Gf,ck as Hf,dk as If}from"./chunk-4mftgf8s.js";import{Ak as lr,Bk as mr,Ck as nr,xk as ir,yk as jr,zk as kr}from"./chunk-9wtpnaps.js";import{Dk as xk,Ek as yk,Fk as zk,Gk as Ak,Hk as zm,Ik as Am,Jk as Bm,Kk as Cm}from"./chunk-9ksr8sjy.js";import"./chunk-09zjty4k.js";import"./chunk-6aqsmree.js";import{ul as Yb,vl as Zb,zl as _b}from"./chunk-avqacmvp.js";import{$l as Fb,$m as $c,$n as pe,$o as Uf,$p as Uh,$q as hj,Am as sc,An as Ad,Ap as tg,Aq as Ii,Ar as jk,Bl as xa,Bm as tc,Bn as Bd,Bp as ug,Bq as Ji,Br as kk,Cl as ya,Cm as uc,Cn as Cd,Cp as vg,Cq as Ki,Cr as lk,Dl as za,Dm as vc,Dn as Dd,Dp as wg,Dq as Li,Dr as mk,El as Aa,Em as wc,En as Ed,Ep as xg,Eq as Mi,Er as nk,Fl as Ba,Fm as xc,Fn as Fd,Fp as yg,Fq as Ni,Gl as Ca,Gm as yc,Gn as Gd,Gp as zg,Gq as Oi,Hl as Da,Hm as zc,Hn as Hd,Hp as Ag,Hq as Pi,Il as Ea,Im as Ac,In as Id,Ip as Bg,Iq as Qi,Jl as Fa,Jm as Bc,Jn as Jd,Jp as Cg,Jq as Ri,Kl as Ga,Km as Cc,Kn as Kd,Ko as Kf,Kp as Dg,Kq as Si,Ll as Ha,Lm as Dc,Ln as Ld,Lp as Eg,Lq as Ti,Ml as Ia,Mm as Ec,Mn as Md,Mp as Fg,Mq as Ui,Nl as Ja,Nm as Oc,Nn as Nd,Np as Gg,Nq as Vi,Ol as Ka,Om as Pc,On as Od,Op as Hg,Oq as Wi,Pl as La,Pm as Qc,Pn as Pd,Pp as Ig,Pq as Xi,Ql as Ma,Qm as Rc,Qn as Qd,Qo as Lf,Qp as Jg,Qq as Yi,Rl as Na,Rm as Sc,Rn as fe,Rp as Kg,Rq as Zi,Sl as Oa,Sm as Tc,Sn as ge,So as Mf,Sp as Lg,Sq as _i,Tl as ib,Tm as Uc,Tn as he,Tp as Mg,Tq as $i,Ul as jb,Un as ie,Uo as Nf,Up as Ng,Uq as aj,Vl as kb,Vm as Vc,Vn as je,Vo as Of,Vp as Og,Vq as bj,Wl as lb,Wm as Wc,Wn as ke,Wo as Pf,Wp as Pg,Wq as cj,Xl as mb,Xm as Xc,Xn as le,Xo as Qf,Xp as Qg,Xq as dj,Yl as nb,Ym as Yc,Yn as me,Yo as Rf,Yp as Rg,Yq as ej,Zm as Zc,Zn as ne,Zo as Sf,Zp as Sg,Zq as fj,_m as _c,_n as oe,_o as Tf,_p as Tg,_q as gj,am as Gb,an as ad,ao as qe,ap as Vf,aq as Vh,ar as yj,bm as Hb,bn as bd,bo as re,bp as Wf,bq as Wh,br as zj,cm as Ib,cn as cd,co as se,cp as Xf,cq as Xh,cr as Aj,dm as Jb,dn as dd,dp as Yf,dq as Yh,dr as Bj,em as Nb,en as ed,ep as Zf,eq as Zh,er as Cj,fm as Ob,fn as fd,fp as _f,fq as ei,fr as Oj,gm as Pb,gn as gd,gp as $f,gq as fi,gr as Pj,hm as $b,hn as hd,hp as ag,hq as gi,hr as Qj,im as ac,in as id,io as we,ip as bg,iq as hi,ir as Rj,jm as bc,jn as jd,jo as xe,jp as cg,jq as ii,jr as Sj,km as cc,kn as kd,ko as ye,kp as dg,kq as ji,kr as Tj,lm as dc,ln as ld,lo as ze,lp as eg,lq as ki,lr as Uj,mm as ec,mn as md,mo as Ae,mp as fg,mq as li,mr as Vj,nm as fc,nn as nd,no as Be,np as gg,nq as mi,nr as Wj,om as gc,on as od,oo as Ce,op as hg,oq as ni,or as Xj,pm as hc,pn as pd,pp as ig,pq as oi,pr as Yj,qm as ic,qn as qd,qp as jg,qq as pi,qr as Zj,rm as jc,rn as rd,rp as kg,rq as qi,rr as _j,sm as kc,sn as sd,so as Re,sp as lg,sq as ri,sr as $j,tm as lc,tn as td,to as Se,tp as mg,tq as si,tr as ak,um as mc,un as ud,up as ng,uq as ti,ur as bk,vm as nc,vn as vd,vo as Jf,vp as og,vq as ui,vr as ck,wm as oc,wn as wd,wp as pg,wq as Ei,wr as fk,xm as pc,xn as xd,xp as qg,xq as Fi,xr as gk,ym as qc,yn as yd,yp as rg,yq as Gi,yr as hk,zm as rc,zn as zd,zp as sg,zq as Hi,zr as ik}from"./chunk-zqd4nrqt.js";import{$r as x,$s as qa,As as P,Bs as Q,Cs as R,Ds as S,Es as T,Fr as b,Fs as U,Gr as c,Gs as V,Hr as d,Hs as W,Ir as e,Is as X,Jr as f,Js as Y,Kr as g,Ks as Z,Lr as h,Ls as _,Mr as i,Ms as $,Nr as j,Ns as aa,Or as k,Os as ba,Pr as l,Ps as ca,Qr as m,Qs as da,Rr as n,Rs as ea,Sr as o,Ss as fa,Tr as p,Ts as ia,Ur as q,Us as ja,Vr as r,Vs as ka,Wr as s,Ws as la,Xr as t,Xs as ma,Yr as u,Ys as na,Zr as v,Zs as oa,_r as w,_s as pa,as as y,at as ra,bs as z,bt as sa,cs as A,ct as ta,ds as B,dt as ua,es as C,et as va,fs as D,ft as wa,gs as E,hs as F,is as G,js as H,ks as I,ls as J,ms as K,ns as L,xs as M,ys as N,zs as O}from"./chunk-raxr83fs.js";import{gt as ga,ht as ha}from"./chunk-at84gyvf.js";import{it as Kb,jt as Lb,kt as Mb}from"./chunk-397rqs12.js";import{lt as vi,mt as wi,nt as xi,ot as yi,pt as zi,qt as Ai,rt as Bi,st as Ci,tt as Di}from"./chunk-aqrp68m6.js";import{$t as Mc,Lt as Fc,Mt as Gc,Nt as Hc,Ot as Ic,Pt as Jc,Rt as Kc,_t as Lc,au as Nc}from"./chunk-bcx36g1n.js";import{bu as te,cu as ue,du as ve}from"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import{ku as Qb,lu as Rb,mu as Sb,nu as Tb,ou as Ub,pu as Vb}from"./chunk-4ee1aaet.js";import"./chunk-df1mx1s1.js";import{uu as Wb,vu as Xb}from"./chunk-18p8dqya.js";import{Au as Sd,Bu as Td,Cu as Ud,Du as Vd,Eu as Wd,Fu as Xd,Gu as Yd,Hu as Zd,Iu as _d,Ju as $d,Ku as ae,Lu as be,Mu as ce,Nu as de,Ou as ee,zu as Rd}from"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import{$u as vb,Uu as ob,Vu as pb,Wu as qb,Xu as rb,Yu as sb,Zu as tb,_u as ub,av as wb,bv as xb,cv as yb,dv as zb,ev as Ab,fv as Bb,gv as Cb,hv as Db,iv as Eb}from"./chunk-ttny9g8k.js";import{Cv as Ua,Dv as Va,Ev as Wa,Fv as Xa,Gv as Ya,Hv as Za,Iv as _a,Jv as $a,Kv as ab,Lv as bb,Mv as cb,Nv as db,Ov as eb,Pv as fb,Qv as gb,Sv as hb,mv as Pa,nv as Qa,qv as Ra,vv as Sa,wv as Ta}from"./chunk-5kh5dr9k.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{Rk as writeNetlifyConfig,Lm as writeManifest,ul as writeImageManifest,bp as wrapComponentForHMR,Kr as withDefaults,ck as webComponentDirectiveHandler,Sp as watermark,Uq as watchViews,El as watchMultiple,Fl as watchEffect,Dl as watch,Ae as warmImagePlaceholders,Sl as waitForStore,X as waitForLocale,Po as virtualPathFor,Rj as videoDirective,G as validators,Or as validated,qe as validateValueEnhanced,Vh as validateTemplate,xm as validateRouteRules,Xp as validateParams,re as validateFormEnhanced,Jq as validateFile,me as validateFields,le as validateField,Xh as validateDirective,Ld as validateCspDirectives,kk as validateConfig,Ym as validateComponentScripts,vn as validateComponentProps,Tg as validateClientScript,Sh as v,wc as usesSignalsInScript,ub as usesReactiveRuntime,ii as userComponentFileExists,yh as useVirtualList,Zd as useTitle,Rl as useStoreOrThrow,tp as useStore,Bk as useStorage,of as useSlots,Dk as useSessionStorage,Wb as useServerRuntimeConfig,Kf as useServerData,Wd as useSeoMeta,Xb as useRuntimeConfig,Tl as useRouteParams,Vl as useRouteParamOrThrow,Ul as useRouteParam,Zd as usePageTitle,ef as useOptimistic,tf as useModel,Xl as useMiddlewareValue,Wl as useMiddlewareState,Ck as useLocalStorage,Wo as useLoadingIndicator,Ud as useHead,Ph as useForm,qf as useAttrs,Lq as uploadFiles,Kq as uploadFile,Ol as updateInstance,cf as untrack,yi as unregisterDirective,Pl as unmountInstance,Ec as unescapeHtml,So as typecheckStxFiles,hi as transpileTypeScript,xr as translate,Ba as transitionDirective,dc as transformAutoImports,pn as toUsers,on as toUser,Bp as thumbnail,Cq as thumbHashToRGBA,Dq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,xf as templateCache,bd as syncRecordedResponse,_o as stxClientHelpers,dg as structuredDataDirective,Ar as stripLocalePrefix,um as stripDocumentWrapper,Lb as stripCommentsAndLiterals,$n as stringToStream,zd as strictCspPreset,Le as streamingSuspenseDirective,Pe as streamToResponse,Je as streamTemplateSimple,De as streamTemplate,wk as stopHmrServer,ln as stopBroadcasting,Tb as stateDirName,Ub as stateDir,Te as state,Ng as startsDocument,vo as startProductionServer,qo as startInteractive,kn as startBroadcasting,Cr as stampLocaleLayoutGroup,Ia as staggerDirective,Vp as srcsetUrls,Ja as springDirective,id as splitByPipe,qm as spaNavVaryHeaders,Qo as sourcePathFor,aq as smartBatchSign,ki as slotContentHasExpressions,_p as signUrl,fi as shouldTranspileTypeScript,tk as shouldReloadOnChange,dq as shouldRefreshSignature,uk as shouldIgnoreFile,qh as shouldCacheComponent,Fp as sharpen,Rr as shape,Sb as setStateDir,$l as setRouteParams,am as setMiddlewareState,ze as setImagePlaceholder,hf as setGlobalProvide,b as setErrorLocale,wl as setCurrentInstance,Fj as setCachedVideoResult,uj as setCachedImageResult,oj as setCached,Ur as serveStxFile,Wr as serveMultipleStxFiles,ok as serveMarkdownFile,Go as serveFile,Xr as serveApp,Fo as serve,ep as serializeState,Nm as serializeSetCookie,Hp as sepia,Xd as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Vj as scopeHTML,Uj as scopeCSS,gg as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,Lp as saturation,Yp as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,Yf as runPreProcessingMiddleware,Zf as runPostProcessingMiddleware,Qm as runPageAction,Ze as runMountCallbacks,gb as runMiddleware,Ml as runHooks,qr as runDoctor,_e as runDestroyCallbacks,lg as runComposers,Mp as rotate,Th as rewriteImagesWithSiblings,cd as responseBindings,oi as resolveTemplatePath,ha as resolveStxTargets,gk as resolveStxDirectories,wr as resolveI18n,zp as resize,Cc as resetRejectedExpressionWarnings,jc as resetPlaceholders,Td as resetHead,dp as resetHMRHandler,o as resetErrorConfig,Mr as required,nc as replacePlaceholders,Sq as renderView,Oj as renderVideoComponent,ac as renderVendorStyleTags,$q as renderToString,ar as renderToStream,br as renderToDOM,Bq as renderThumbhashToCanvas,nr as renderTemplateString,lr as renderTemplate,mr as renderString,Ge as renderStreamingPage,ai as renderSlot,gh as renderSSRSuspense,lq as renderProtectedVideo,kq as renderProtectedImg,Zp as renderMediaUpload,kr as renderMarkdownView,Bm as renderLayoutTypes,yj as renderImgComponent,kl as renderImageComponent,$d as renderHtmlAttrs,_d as renderHead,Vq as renderEmail,mi as renderComponentWithSlot,ae as renderBodyAttrs,op as render,Bd as relaxedCspPreset,ke as registerValidationRule,Ne as registerStreamingDirectives,vp as registerStoresClient,Zl as registerStore,eg as registerSeoDirectives,_a as registerMiddleware,rc as registerFilters,qc as registerFilter,d as registerErrorMessages,pe as registerEnhancedValidationRule,vi as registerDirective,Kd as registerCspDirectives,yn as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,Al as ref,io as redirect,Zc as recordResponseStatus,_c as recordResponseHeader,Vb as rebaseOntoStateDir,$c as readResponseStatus,ad as readResponseHeaders,mk as readMarkdownFile,yf as readFileCached,Bl as reactive,Qp as quality,iq as pruneSignatureCache,rj as pruneCache,ff as provide,jr as protectCodeBlocks,Lr as prop,og as processVueTemplate,wh as processVirtualListDirectives,Ah as processVirtualGridDirectives,Nj as processVideo,ne as processValidateDirective,ea as processTranslateDirective,ah as processTransitionDirectives,dh as processTransitionAttributes,de as processTitleDirective,Rc as processTemplateBindings,Yg as processTeleportDirectives,eh as processSuspenseDirectives,$f as processStructuredData,He as processStreamDirectives,dd as processStatusDirective,Nh as processStaticDirectives,Wf as processStackReplacements,Vf as processStackPushDirectives,bi as processSlots,sm as processShell,Ce as processServerBindings,ag as processSeoDirective,Oe as processSectionDirectives,Jc as processScopedStyles,Pc as processReactiveBindings,mq as processProtectedMedia,Gh as processPartialHydrationDirectives,Sg as processOnceDirective,Xf as processMiddleware,_f as processMetaDirectives,ee as processMetaDirective,nk as processMarkdownFileDirectives,ti as processMarkdownDirectives,Qf as processLoops,oh as processKeepAliveDirectives,Rg as processJsonDirective,zh as processInfiniteListDirectives,Uf as processIncludes,Aj as processImgComponents,ml as processImageComponents,$k as processImage,ce as processHeadDirective,ge as processForms,ie as processFormInputDirectives,Ac as processExpressions,Ib as processEventDirectives,je as processErrorDirective,pg as processDynamicComponents,Uh as processDirectives,Di as processDirectiveAttributes,Xg as processDeferDirectives,Pd as processCustomDirectives,Hd as processCspDirectives,Sr as processComponentProps,ic as processClientScript,he as processBasicFormDirectives,jh as processAsyncDirectives,Qd as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,ve as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,Vo as preloadIslandHandlers,Be as preloadIconCollection,fn as poolStrings,ek as pluginManager,xe as placeholdersWarmed,$g as performLeave,_g as performEnter,$e as pendingLifecycleCounts,df as peek,Rf as partialsCache,Pj as parseVideoDirectiveOptions,xp as parseUrl,Eq as parseThumbhashString,od as parseSwitchBlock,_h as parseSlots,$h as parseSlotElement,td as parseScriptDeclarations,ak as parseSFCComponent,nq as parseProtectedArgs,Pf as parseLoopBinding,zj as parseImgComponent,Ri as parseImageUrl,ll as parseImageComponent,Om as parseFormBody,qd as parseExpressionWithFilters,zn as parseDefaults,fo as parseCookies,jm as parseContainerSelector,ld as parseConditionalBlock,rd as parseArguments,Ma as parseAnimationShorthand,Nr as optional,gn as optimizeTemplate,rl as optimizeImage,sl as optimizeDirectory,Pr as oneOf,Sf as onceStore,Jl as onUpdated,Oc as onUpdate,Ll as onUnmounted,em as onServer,Hl as onMounted,Xe as onMount,Mh as onHydrated,mf as onErrorCaptured,Ye as onDestroy,uh as onDeactivated,dm as onClient,Il as onBeforeUpdate,Kl as onBeforeUnmount,Gl as onBeforeMount,th as onActivated,xq as observeElement,jo as notFound,ug as normalizeCriticalHeadOrder,lf as nextTick,Cn as negotiateEncoding,Ua as navigateTo,Nl as mountInstance,Ea as motionDirective,Ad as moderateCspPreset,en as minifyHtml,cg as metaDirective,Fg as metaDedupKey,yp as mergeParams,Hg as mergeHtmlAttrs,Vd as mergeHeadConfigs,Gc as mergeCssConfig,Ed as mergeCspDirectives,Ra as matchRoute,ui as markdownDirectiveHandler,lk as markdownCache,ga as looksLikeGlob,zr as localizePath,U as loadTranslationLazy,_ as loadTranslation,hk as loadStxConfig,db as loadMiddlewareFromDirectory,Mm as loadManifest,tq as loadElement,mn as loadChannels,Gr as lintStxStrict,vq as lazyLoadAll,uq as lazyLoad,Ha as keyframeDirective,Zq as jsxs,_q as jsxDEV,Yq as jsx,ho as jsonResponse,Me as islandDirective,l as isTest,vm as isSpaNavigation,om as isSpaNavRequest,bq as isSignatureValid,af as isSignal,Zk as isSharpAvailable,Un as isServerEnvironment,bm as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,qq as isNativeLazySupported,ir as isMarkdownPath,Q as isLoading,R as isLoaded,ei as isJavaScriptScript,rq as isIntersectionObserverSupported,fl as isImageFile,_k as isImageBackendAvailable,aa as isICUFormat,Lh as isHydrated,ji as isHydrateTrigger,Xc as isHttpStatus,Tn as isEdgeEnvironment,Hr as isDirectiveKind,k as isDevelopment,bf as isDerived,sk as isCssOnlyChange,Bn as isCompressible,cm as isClient,lh as isAsyncComponent,Pm as isActionableMethod,Ip as invert,Af as invalidateFileCacheByDir,zf as invalidateFileCache,zc as interpolateScriptsInTemplate,xc as interpolateScriptExpressions,yc as interpolateScriptAttributes,x as inlineError,vr as injectThemeBootstrap,bg as injectSeoTags,sr as injectSeo,Jf as injectRouterScript,rk as injectHotReload,kb as injectHeatmap,Nc as injectCss,Fd as injectCspMetaTag,Pg as injectConfigHeadTags,tg as injectColorModeBootScript,Jg as injectCloakStyle,Ag as injectBuildId,cc as injectBrowserCoreAutoImports,Tc as injectAnalytics,gf as inject,Yl as initStoreRegistry,Uk as initNetlify,Xo as initLoadingIndicator,sq as initLazyLoading,po as initFile,Aq as initBlurUp,Gq as initAllBlurUp,Cj as imgDirective,pl as imageDirective,Tm as hydrateTemplateStream,Sm as hydrateTemplate,Uo as hydrateIslands,Ih as hydrateIsland,Um as hydrateFragment,Jh as hydrateByStrategy,Kh as hydrateAll,lp as hydrate,Eo as htmlResponse,Lg as hoistLeadingHeadTags,vg as hoistColorModeBootScript,lb as heatmapDirective,kj as hashString,If as hashFilePath,ij as hashFile,jj as hashBuffer,ng as hasVueTemplateSyntax,Of as hasVariables,qp as hasStore,oc as hasPlaceholders,Sk as hasNetlifyConfig,ab as hasMiddleware,Jb as hasEventDirectives,Og as hasDocumentShell,Yh as hasDirectives,ma as hasDOMSupport,il as handleImageRequest,nf as handleError,fr as h,el as groupVariantsByFormat,Gp as grayscale,xo as gitHash,_m as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,Nk as getTotalSize,cq as getTimeUntilExpiry,Ug as getStoreScript,rp as getStoreNames,pp as getStore,Gk as getStorageSize,Fk as getStorageKeys,pi as getSourceLineInfo,gi as getSharedTranspiler,Ef as getServeClientAsset,la as getScreenReaderOnlyStyle,Wj as getScopeAttribute,Se as getRouteParams,Ob as getPublicEnvDefine,Pb as getPublicEnv,Wh as getPositionInfo,lc as getPlaceholderRegistry,hj as getPlaceholderCacheStats,Sd as getPageMeta,vd as getNonce,gl as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,we as getImagePlaceholder,al as getImageMetadata,te as getImageDelivery,kp as getHydrationRuntime,_l as getHydratedStoreState,vk as getHmrServer,Rd as getHead,cp as getHMRHandler,Vi as getFormatExtension,mj as getFileMtime,dl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,xi as getDirectives,wi as getDirective,xl as getCurrentInstance,Kc as getCssServeAsset,Dd as getCspPreset,Md as getCspHeaderName,si as getComponentCacheStats,Ej as getCachedVideoResult,gq as getCachedSignature,Cf as getCachedSignalsRuntime,Df as getCachedRouterScript,fj as getCachedPlaceholder,tj as getCachedImageResult,nj as getCached,qj as getCacheStats,yg as getBuildId,jn as getBroadcastServer,Ui as getBestVariant,sc as getAllFilters,Ii as generateWidthSrcset,xh as generateVirtualListCSS,Nq as generateVideoPreview,se as generateValidationScript,Oq as generateUploadRuntime,$m as generateTreeShakenBundle,ch as generateTransitionRuntime,bh as generateTransitionCSS,Ij as generateThumbnails,_i as generateThumbhashPlaceholder,Ln as generateTemplatesDocs,ih as generateSuspenseRuntime,hh as generateSuspenseCSS,fp as generateStateScript,Si as generateSrcsetData,xj as generateSrcset,bl as generateSrcSet,Jj as generateSpriteSheet,Wq as generateSpaShell,Ti as generateSourceTags,Oi as generateSizesFromBreakpoints,Ni as generateSizesAttribute,cl as generateSizes,fg as generateSitemapIndex,tr as generateSitemap,pq as generateSimpleMediaPicker,jq as generateSignatureRuntime,wf as generateSignalsRuntimeDev,vf as generateSignalsRuntime,hc as generateServerDataBridge,Tj as generateScopeId,bk as generateSFCWebComponent,Gb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,hg as generateRobotsTxt,ur as generateRobots,wj as generateResponsiveVariants,Zj as generateReactiveWebComponentTS,Yj as generateReactiveWebComponent,$j as generateReactiveRuntime,_j as generateReactiveMixin,Hj as generatePoster,ej as generatePlaceholderStyle,dj as generatePlaceholderCSS,Zi as generatePlaceholder,Hh as generatePartialHydrationCSS,ud as generateNonce,Ok as generateNetlifyToml,Qq as generateMinifiedMediaRuntime,Pq as generateMediaRuntime,oq as generateMediaManagerEmbed,Km as generateManifest,Zo as generateLoadingIndicatorHtml,zq as generateLazyLoadRuntime,Cm as generateLayoutTypes,aj as generateLQIP,sh as generateKeepAliveRuntime,rh as generateKeepAliveCSS,Oh as generateIslandManifest,Mq as generateImagePreview,tl as generateImageManifest,jp as generateHydrationScript,Qe as generateHydrationRuntime,mp as generateHydrationCSS,Bh as generateHydrationBootstrap,qk as generateHotReloadScript,jb as generateHeatmapScript,ap as generateHMRClientScript,Kj as generateHLSManifest,gp as generateEventBindings,Mi as generateDprSrcsetWithVariableQuality,Li as generateDprSrcset,Mg as generateDocumentShell,Qn as generateDocs,Mn as generateDirectivesDocs,Ci as generateDirectiveRuntime,ig as generateDefaultRobotsTxt,Lj as generateDASHManifest,Mc as generateCss,yd as generateCspMetaTag,xd as generateCspHeader,sf as generateCompositionRuntime,Kn as generateComponentsDocs,Ch as generateComponentManifest,In as generateComponentDoc,cj as generateColorPlaceholder,sg as generateColorModeBootScript,Ql as generateClientRuntime,lj as generateCacheKey,fc as generateBrowserAutoImportDestructuring,Hq as generateBlurUpRuntime,Iq as generateBlurUpCSS,Qc as generateBindingsRuntime,Ji as generateAutoWidthSrcset,ec as generateAutoImportDestructuring,nh as generateAsyncComponentRuntime,mh as generateAsyncComponentCSS,Zb as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,Sc as generateAnalyticsScript,To as formatTypecheckDiagnostics,No as formatTypeErrors,mo as formatStxContent,Mk as formatSize,Ta as formatRoutes,no as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,rr as formatDoctorReport,Nn as formatDocsAsMarkdown,Pn as formatDocsAsJson,On as formatDocsAsHtml,Pp as format,dn as foldConstants,Op as flipVertical,Np as flipHorizontal,Dm as fingerprint,Ro as findRuntimeTypeDeclarations,pr as findPantryPackage,kd as findMatchingEndTag,gd as findMatchingDelimiter,Kb as findInterpolationEnd,md as findIfBlocks,pd as findExpressions,Sa as findErrorPage,Hc as findDuplicateScopedStyleRanges,nd as findDirectiveBlocks,an as findDeadCode,an as findDeadBranches,km as findContainerRegion,Jn as findComponentFiles,Vr as findCommonDir,Lk as filterRequiredFiles,ni as fileExists,Lf as extractVariables,Im as extractTemplateExpressions,Ie as extractStreamBoundaries,hp as extractState,ci as extractSlotContent,Nf as extractScriptFromTemplate,Hm as extractScriptBlocks,mc as extractPlaceholders,jd as extractParenthesizedExpression,Yc as extractPageResponseStatus,hb as extractLayoutMetadata,bj as extractDominantColor,sd as extractDirectiveParams,Zh as extractDirectiveNames,wm as extractContainerContent,Gn as extractComponentProps,Dh as extractComponentName,Hn as extractComponentDescription,Lc as extractClassNames,gc as extractBridgeData,Eh as extractBoundProps,hd as extractBalancedExpression,$b as extractAndStripCssImports,Xj as extractAndScopeStyles,Hb as extractAndProcessEvents,zk as externalizeSharedAssets,Ak as externalizeRepeatedAssets,yk as externalizeHtml,Dc as evaluateExpression,cn as evaluateConstant,ed as evaluateAuthExpression,vc as escapeHtmlValue,uc as escapeHtml,C as errorRecovery,E as errorLogger,Zg as ensureTeleportTargets,Qg as ensureDocumentShell,oe as enhancedValidationRules,En as enableDevTools,bn as eliminateDeadCode,Ve as effect,Wp as dprUrls,Rn as docsCommand,Yb as discoverServerApi,Am as discoverLayoutNames,yq as disconnectObserver,Fn as disableDevTools,F as devHelpers,rm as detectShell,Sn as detectRuntime,Pk as detectProjectConfig,Wi as detectFormat,Xm as detectBuildMode,Ue as derived,Tk as deploy,jk as defineStxConfig,up as defineStore,pf as defineSlots,Fr as defineSiteConfig,Jr as definePropsWithValidation,Ir as defineProps,dk as definePlugin,Yd as definePageMeta,Wa as defineMiddleware,Qh as defineForm,kf as defineExpose,jf as defineEmits,zi as defineDirective,hr as defineCustomElement,uo as defineConfig,Ai as defineClientDirective,kh as defineAsyncComponent,wo as defineApiHandler,Rq as defaultMediaConfig,vl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,fe as defaultFormClasses,pc as defaultFilters,Od as defaultCspConfig,fk as defaultConfig,Tr as default,Fc as deepMergeThemes,Ic as dedupeScopedStyles,nm as decodeTitleEntities,$i as decodeThumbhash,Jd as cspNonceDirective,Id as cspDirective,Fq as crossfadeTransition,Ap as crop,vh as createVirtualList,Qj as createVideoDirective,co as createVercelHandler,Ko as createTypeChecker,fa as createTranslateFilter,_n as createTextEncoderStream,gr as createStxApp,Zn as createStreamingResponse,Ke as createStreamRenderer,sp as createStore,Za as createStorageManager,Xa as createServerCookieManager,_b as createServerApi,zl as createScope,fh as createSSRSuspense,Re as createRouter,ym as createRouteRuleResolver,eb as createRouteLocation,Io as createRoute,Al as createRef,Bl as createReactive,rf as createProvideContext,zo as createProject,to as createProductionBuild,kc as createPlaceholder,hn as createOptimizedBuild,eo as createNetlifyHandler,Hk as createNetlifyClient,fb as createMiddlewareContext,Ho as createMiddleware,wq as createLazyObserver,ph as createKeepAliveCache,Wn as createKVNamespace,Fh as createIslandRegistry,Bj as createImgDirective,ql as createImagePlugin,jl as createImageHandler,ol as createImageDirective,nb as createHeatmapAggregator,Kk as createFileManifest,Vn as createEnvAccessor,z as createEnhancedError,Yn as createEdgeHandler,Xn as createEdgeCache,qi as createDetailedErrorMessage,bo as createDenoHandler,Qk as createDefaultNetlifyConfig,Nd as createCspHeaders,go as createCookie,Cl as createComputed,yl as createComponentInstance,ao as createCloudflareHandler,Ya as createClientCookieManager,Bi as createBuiltinDirectives,gr as createApp,Ka as createAnimationTimeline,Dp as cover,Mf as convertToCommonJS,Kp as contrast,Cp as contain,y as consoleError,m as configureErrorHandling,ik as config,Cl as computed,Dn as compressResponse,kg as composerPattern,jg as composer,tm as composeShellWithPage,xn as componentDirective,li as componentClientSignalNames,Jm as compileTemplate,a as collectRepeatedFlag,Jk as collectDeployFiles,Kg as cloakStyleFragment,Gj as clearVideoCache,N as clearTranslationCache,Vg as clearStoreCache,Ek as clearStorage,hq as clearSignatureCache,uf as clearServerData,gj as clearPlaceholderCache,Tf as clearOnceStore,wd as clearNonce,bb as clearMiddleware,ye as clearImagePlaceholders,ue as clearImageDeliveryCatalog,nl as clearImageCache,e as clearErrorMessages,Ff as clearDevCaches,tc as clearCustomFilters,mg as clearComposers,Wg as clearComposableCache,ri as clearComponentCache,pj as clearCache,Db as clearBlankCache,Yo as cleanupLoadingIndicator,hm as classifyScript,im as classifyAllScripts,Lo as checkTemplateFile,Mo as checkTemplate,Gf as checkCache,eq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,sn as channel,lo as captureScreenshots,ko as captureScreenshot,Z as cancelPendingLoads,Ik as calculateSha1,Ki as calculateOptimalWidths,Hf as cacheTemplate,Sj as buildWebComponents,Oo as buildVirtualSource,Tq as buildViews,wp as buildUrl,Ee as buildSuspenseResolveScript,Er as buildStaticSite,qb as buildRuntimeGlobalsDestructure,Em as buildRuntimeAsset,Fm as buildRouterAsset,Dr as buildLangPickerScript,Qi as buildImageUrl,Bg as buildIdFragment,Gg as buildHtmlAttrs,Vm as buildForProduction,An as buildComponentLibrary,fq as buildAuthParams,Wm as buildApp,Br as buildAlternateLinks,so as build,qn as broadcastPrivate,rn as broadcastPresence,nn as broadcast,Jp as brightness,Mb as bracketDepths,Ep as blur,Eb as blankInertHtmlRegions,$p as batchSignUrls,We as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,Rp as auto,ja as attributeValue,Gm as assetTags,Fb as asInvocableStatement,Qr as arrayOf,yr as applyTranslations,vj as applyTransformations,di as applySlots,wn as applyPropDefaults,Up as applyPreset,Ig as applyHtmlAttrs,be as applyHead,Bc as applyFilters,pm as appendVary,Cd as apiCspPreset,Da as animationGroupDirective,Mj as analyzeVideo,Zm as analyzeUsage,fm as analyzeTemplate,gm as analyzeProject,Zm as analyzeDirectiveUsage,Uc as analyticsDirective,Co as addStore,Bo as addPage,Gd as addNonceToInlineContent,Do as addLayout,Ao as addComponent,Rm as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Bf as __setSignalsGeneratorsForTest,zg as __setBuildIdForTest,Dj as VideoProcessorCache,Rh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,fd as Tokenizer,Jo as TemplateTypeChecker,oo as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,cr as Show,Fe as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,bc as STX_AUTO_IMPORTS,Rb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,lm as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Vc as RESPONSE_STATUS_KEY,Wc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,ro as ProductionBuild,er as Portal,yo as PROJECT_TEMPLATES,Tp as PRESETS,sb as NON_CLIENT_PRIMITIVES,np as MemorySessionStore,Hi as MIME_TYPES,Ei as MEDIA_DEFAULT_WIDTHS,Gi as MEDIA_DEFAULT_FORMATS,zm as LAYOUT_TYPES_FILE,sj as ImageProcessorCache,hl as ImageProcessingError,ip as HydrationRuntime,pk as HotReloadServer,mb as HeatmapAggregator,Eg as HTML_CLASS_MARKER,Dg as HTML_ATTRS_MARKER,Xq as Fragment,dr as For,mm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,xk as EXTERNALIZED_ASSET_DIR,Vk as DeployError,Wk as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Qb as DEFAULT_STATE_DIR,Yk as DEFAULT_QUALITY,Xi as DEFAULT_PLACEHOLDER_OPTIONS,Xk as DEFAULT_FORMATS,Fi as DEFAULT_DPR_VALUES,$o as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,Pi as COMMON_SIZES,qg as COLOR_MODE_BOOT_MARKER,rg as COLOR_MODE_BOOT_GLOBAL,Cg as CLOAK_STYLE,un as BroadcastServer,tn as Broadcast,wg as BUILD_ID_META,xg as BUILD_ID_HEADER,Nb as BROWSER_CORE_IMPORTS,Yi as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,or as $path};
2
+ import{$ as Tl,$a as Xn,$b as gp,$c as gq,$d as gr,A as Dk,Aa as gn,Ab as Bo,Ac as Hp,Ad as Hq,Ae as Nr,B as Ek,Ba as hn,Bb as Co,Bc as Ip,Bd as Iq,Be as Or,C as Fk,Ca as vn,Cb as Do,Cc as Jp,Cd as Jq,Ce as Pr,D as Gk,Da as wn,Db as Eo,Dc as Kp,Dd as Kq,De as Qr,E as wl,Ea as xn,Eb as Fo,Ec as Lp,Ed as Lq,Ee as Rr,F as xl,Fa as yn,Fb as Go,Fc as Mp,Fd as Mq,Fe as Sr,G as yl,Ga as zn,Gb as Ho,Gc as Np,Gd as Nq,Ge as Tr,H as zl,Ha as An,Hb as Io,Hc as Op,Hd as Oq,He as Ur,I as Al,Ia as En,Ib as Jo,Ic as Pp,Id as Pq,Ie as Vr,J as Bl,Ja as Fn,Jb as Ko,Jc as Qp,Jd as Qq,Je as Wr,K as Cl,Ka as Gn,Kb as Lo,Kc as Rp,Kd as Rq,Ke as Xr,L as Dl,La as Hn,Lb as Mo,Lc as Sp,Ld as Sq,M as El,Ma as In,Mb as No,Mc as Tp,Md as Tq,N as Fl,Na as Jn,Nb as Uo,Nc as Up,Nd as Uq,O as Gl,Oa as Kn,Ob as Vo,Oc as Vp,Od as Vq,P as Hl,Pa as Ln,Pb as Wo,Pc as Wp,Pd as Wq,Q as Il,Qa as Mn,Qb as Xo,Qc as Xp,Qd as Xq,R as Jl,Ra as Nn,Rb as Yo,Rc as Yp,Rd as Yq,S as Kl,Sa as On,Sb as Zo,Sc as Zp,Sd as Zq,T as Ll,Ta as Pn,Tb as _o,Tc as _p,Td as _q,U as Ml,Ua as Qn,Ub as $o,Uc as $p,Ud as $q,V as Nl,Va as Rn,Vb as ap,Vc as aq,Vd as ar,W as Ol,Wa as Sn,Wb as bp,Wc as bq,Wd as br,X as Pl,Xa as Tn,Xb as cp,Xc as cq,Xd as cr,Y as Ql,Ya as Un,Yb as dp,Yc as dq,Yd as dr,Z as Rl,Za as Vn,Zb as ep,Zc as eq,Zd as er,_ as Sl,_a as Wn,_b as fp,_c as fq,_d as fr,aa as Ul,ab as Yn,ac as hp,ad as hq,ae as hr,ba as Vl,bb as Zn,bc as ip,bd as iq,be as or,ca as Wl,cb as _n,cc as jp,cd as jq,ce as pr,da as Xl,db as $n,dc as kp,dd as kq,de as qr,ea as Yl,eb as ao,ec as lp,ed as lq,ee as rr,fa as Zl,fb as bo,fc as mp,fd as mq,fe as sr,ga as _l,gb as co,gc as np,gd as nq,ge as tr,ha as $l,hb as eo,hc as op,hd as oq,he as ur,ia as am,ib as fo,ic as pp,id as pq,ie as vr,ja as bm,jb as go,jc as qp,jd as qq,je as wr,ka as cm,kb as ho,kc as rp,kd as rq,ke as xr,la as dm,lb as io,lc as sp,ld as sq,le as yr,ma as em,mb as jo,mc as tp,md as tq,me as zr,na as fm,nb as mo,nc as up,nd as uq,ne as Ar,o as a,oa as gm,ob as no,oc as vp,od as vq,oe as Br,p as ok,pa as Xm,pb as oo,pc as wp,pd as wq,pe as Cr,q as pk,qa as Ym,qb as po,qc as xp,qd as xq,qe as Dr,r as qk,ra as Zm,rb as ro,rc as yp,rd as yq,re as Er,s as rk,sa as _m,sb as so,sc as zp,sd as zq,se as Fr,t as sk,ta as $m,tb as to,tc as Ap,td as Aq,te as Gr,u as tk,ua as an,ub as uo,uc as Bp,ud as Bq,ue as Hr,v as uk,va as bn,vb as wo,vc as Cp,vd as Cq,ve as Ir,w as vk,wa as cn,wb as xo,wc as Dp,wd as Dq,we as Jr,x as wk,xa as dn,xb as yo,xc as Ep,xd as Eq,xe as Kr,y as Bk,ya as en,yb as zo,yc as Fp,yd as Fq,ye as Lr,z as Ck,za as fn,zb as Ao,zc as Gp,zd as Gq,ze as Mr}from"./chunk-p06czqhq.js";import{Le as Oo,Me as Po,Ne as Qo,Oe as Ro,Pe as So,Qe as To}from"./chunk-mh4whcj5.js";import{Re as ko,Se as lo}from"./chunk-2ver2s2y.js";import{Te as qo}from"./chunk-b546f0ht.js";import{Ue as Wm}from"./chunk-n11mz2b2.js";import{Ve as Bn,We as Cn,Xe as Dn,Ye as vo}from"./chunk-574wce5h.js";import{$e as Jk,Ze as Hk,_e as Ik,af as Kk,bf as Lk,cf as Mk,df as Nk,ef as Ok,ff as Pk,gf as Qk,hf as Rk,if as Sk,jf as Tk,kf as Uk,lf as Vk}from"./chunk-ym3r8ktq.js";import{mf as kl,nf as ll,of as ml,pf as nl,qf as ol,rf as pl,sf as ql,tf as rl,uf as sl,vf as tl,wf as ul,xf as vl}from"./chunk-a50hb40e.js";import{yf as il,zf as jl}from"./chunk-ka5wtqmw.js";import{Af as Wk,Bf as Xk,Cf as Yk,Df as Zk,Ef as _k,Ff as $k,Gf as al,If as bl,Jf as cl,Kf as dl,Lf as el,Mf as fl,Nf as gl,Qf as hl}from"./chunk-zdzd2jb4.js";import{Rf as Dm,Sf as Em,Tf as Fm,Uf as Gm,Vf as Jm,Wf as Vm}from"./chunk-m7crqwcc.js";import{Xf as Hm,_f as Im}from"./chunk-btcca88f.js";import{Ag as Om,Bg as Pm,Cg as Qm,Dg as Rm,Eg as Sm,Fg as Tm,Gg as Um,gg as hm,hg as im,ig as jm,jg as km,kg as lm,lg as mm,mg as nm,ng as om,og as pm,pg as qm,qg as rm,rg as sm,sg as tm,tg as um,ug as vm,vg as wm,wg as Km,xg as Lm,yg as Mm,zg as Nm}from"./chunk-dkcay3vr.js";import{Hg as xm,Ig as ym}from"./chunk-dvvx1wny.js";import{Jg as jn,Kg as kn,Lg as ln,Mg as mn,Ng as nn,Og as on,Pg as pn,Qg as qn,Rg as rn,Sg as sn,Tg as tn,Ug as un}from"./chunk-xz3evxqp.js";import{Vg as _h,Wg as $h,Xg as ai,Yg as bi,Zg as ci,_g as di}from"./chunk-bbt6cnp9.js";import{$g as sj,ah as tj,bh as uj,fh as vj,gh as wj,hh as xj}from"./chunk-0gbptqh2.js";import{ih as Dj,jh as Ej,kh as Fj,lh as Gj,mh as Hj,nh as Ij,oh as Jj,ph as Kj,qh as Lj,rh as Mj,sh as Nj}from"./chunk-f044qmn3.js";import{Ah as oj,Bh as pj,Ch as qj,Dh as rj,th as ij,uh as jj,vh as kj,wh as lj,xh as mj,zh as nj}from"./chunk-vd5xvsnv.js";import{Eh as dk,Gh as ek}from"./chunk-64djh88a.js";import{Mh as Bh,Nh as Ch,Oh as Dh,Ph as Eh,Qh as Fh,Rh as Gh,Sh as Hh,Th as Ih,Uh as Jh,Vh as Kh,Wh as Lh,Xh as Mh,Yh as Nh,Zh as Oh}from"./chunk-9368t9jm.js";import{$h as Ph,ai as Qh,bi as Rh,ci as Sh}from"./chunk-5tefa8qb.js";import{hi as Th}from"./chunk-mwh3ymwc.js";import{ii as Xg}from"./chunk-fqq5k9ve.js";import{ji as Yg,ki as Zg}from"./chunk-ya5m5vbn.js";import{li as _g,mi as $g,ni as ah,oi as bh,pi as ch,qi as dh}from"./chunk-y4nzmkea.js";import{ri as eh,si as fh,ti as gh,ui as hh,vi as ih}from"./chunk-7kw3grq5.js";import{Ai as nh,wi as jh,xi as kh,yi as lh,zi as mh}from"./chunk-c79nfdyj.js";import{Bi as oh,Ci as ph,Di as qh,Ei as rh,Fi as sh,Gi as th,Hi as uh}from"./chunk-ej8mv2k6.js";import{Ii as vh,Ji as wh,Ki as xh,Li as yh,Mi as zh,Ni as Ah}from"./chunk-cr8v8k53.js";import{Pi as Ug,Qi as Vg}from"./chunk-bdract2w.js";import{Ti as Wg}from"./chunk-5k3xfbqt.js";import"./chunk-xwxdwqn9.js";import{$i as He,Xi as De,Yi as Ee,Zi as Fe,_i as Ge,aj as Ie,bj as Je,cj as Ke,dj as Le,ej as Me,fj as Ne,gj as Oe,hj as Pe,ij as Qe}from"./chunk-9g5cr7zt.js";import{jj as ff,kj as gf,lj as hf,mj as jf,nj as kf,oj as lf,pj as mf,qj as nf,rj as of,sj as pf,tj as qf,uj as rf,vj as sf,wj as tf,xj as uf,yj as vf,zj as wf}from"./chunk-tph7b269.js";import{Gj as Te,Hj as Ue,Ij as Ve,Jj as We,Kj as Xe,Lj as Ye,Mj as Ze,Nj as _e,Oj as $e,Pj as af,Qj as bf,Rj as cf,Sj as df,Tj as ef}from"./chunk-t41aaehf.js";import{$j as Ef,Uj as xf,Vj as yf,Wj as zf,Xj as Af,Yj as Bf,Zj as Cf,_j as Df,ak as Ff,bk as Gf,ck as Hf,dk as If}from"./chunk-xgdcjqn7.js";import{Ak as lr,Bk as mr,Ck as nr,xk as ir,yk as jr,zk as kr}from"./chunk-y9qnrg8a.js";import{Dk as xk,Ek as yk,Fk as zk,Gk as Ak,Hk as zm,Ik as Am,Jk as Bm,Kk as Cm}from"./chunk-840zb3m6.js";import"./chunk-09zjty4k.js";import"./chunk-7r6yhvyt.js";import{ul as Yb,vl as Zb,zl as _b}from"./chunk-hb5tea65.js";import{$l as Fb,$m as $c,$n as pe,$o as Uf,$p as Uh,$q as hj,Am as sc,An as Ad,Ap as tg,Aq as Ii,Ar as jk,Bl as xa,Bm as tc,Bn as Bd,Bp as ug,Bq as Ji,Br as kk,Cl as ya,Cm as uc,Cn as Cd,Cp as vg,Cq as Ki,Cr as lk,Dl as za,Dm as vc,Dn as Dd,Dp as wg,Dq as Li,Dr as mk,El as Aa,Em as wc,En as Ed,Ep as xg,Eq as Mi,Er as nk,Fl as Ba,Fm as xc,Fn as Fd,Fp as yg,Fq as Ni,Gl as Ca,Gm as yc,Gn as Gd,Gp as zg,Gq as Oi,Hl as Da,Hm as zc,Hn as Hd,Hp as Ag,Hq as Pi,Il as Ea,Im as Ac,In as Id,Ip as Bg,Iq as Qi,Jl as Fa,Jm as Bc,Jn as Jd,Jp as Cg,Jq as Ri,Kl as Ga,Km as Cc,Kn as Kd,Ko as Kf,Kp as Dg,Kq as Si,Ll as Ha,Lm as Dc,Ln as Ld,Lp as Eg,Lq as Ti,Ml as Ia,Mm as Ec,Mn as Md,Mp as Fg,Mq as Ui,Nl as Ja,Nm as Oc,Nn as Nd,Np as Gg,Nq as Vi,Ol as Ka,Om as Pc,On as Od,Op as Hg,Oq as Wi,Pl as La,Pm as Qc,Pn as Pd,Pp as Ig,Pq as Xi,Ql as Ma,Qm as Rc,Qn as Qd,Qo as Lf,Qp as Jg,Qq as Yi,Rl as Na,Rm as Sc,Rn as fe,Rp as Kg,Rq as Zi,Sl as Oa,Sm as Tc,Sn as ge,So as Mf,Sp as Lg,Sq as _i,Tl as ib,Tm as Uc,Tn as he,Tp as Mg,Tq as $i,Ul as jb,Un as ie,Uo as Nf,Up as Ng,Uq as aj,Vl as kb,Vm as Vc,Vn as je,Vo as Of,Vp as Og,Vq as bj,Wl as lb,Wm as Wc,Wn as ke,Wo as Pf,Wp as Pg,Wq as cj,Xl as mb,Xm as Xc,Xn as le,Xo as Qf,Xp as Qg,Xq as dj,Yl as nb,Ym as Yc,Yn as me,Yo as Rf,Yp as Rg,Yq as ej,Zm as Zc,Zn as ne,Zo as Sf,Zp as Sg,Zq as fj,_m as _c,_n as oe,_o as Tf,_p as Tg,_q as gj,am as Gb,an as ad,ao as qe,ap as Vf,aq as Vh,ar as yj,bm as Hb,bn as bd,bo as re,bp as Wf,bq as Wh,br as zj,cm as Ib,cn as cd,co as se,cp as Xf,cq as Xh,cr as Aj,dm as Jb,dn as dd,dp as Yf,dq as Yh,dr as Bj,em as Nb,en as ed,ep as Zf,eq as Zh,er as Cj,fm as Ob,fn as fd,fp as _f,fq as ei,fr as Oj,gm as Pb,gn as gd,gp as $f,gq as fi,gr as Pj,hm as $b,hn as hd,hp as ag,hq as gi,hr as Qj,im as ac,in as id,io as we,ip as bg,iq as hi,ir as Rj,jm as bc,jn as jd,jo as xe,jp as cg,jq as ii,jr as Sj,km as cc,kn as kd,ko as ye,kp as dg,kq as ji,kr as Tj,lm as dc,ln as ld,lo as ze,lp as eg,lq as ki,lr as Uj,mm as ec,mn as md,mo as Ae,mp as fg,mq as li,mr as Vj,nm as fc,nn as nd,no as Be,np as gg,nq as mi,nr as Wj,om as gc,on as od,oo as Ce,op as hg,oq as ni,or as Xj,pm as hc,pn as pd,pp as ig,pq as oi,pr as Yj,qm as ic,qn as qd,qp as jg,qq as pi,qr as Zj,rm as jc,rn as rd,rp as kg,rq as qi,rr as _j,sm as kc,sn as sd,so as Re,sp as lg,sq as ri,sr as $j,tm as lc,tn as td,to as Se,tp as mg,tq as si,tr as ak,um as mc,un as ud,up as ng,uq as ti,ur as bk,vm as nc,vn as vd,vo as Jf,vp as og,vq as ui,vr as ck,wm as oc,wn as wd,wp as pg,wq as Ei,wr as fk,xm as pc,xn as xd,xp as qg,xq as Fi,xr as gk,ym as qc,yn as yd,yp as rg,yq as Gi,yr as hk,zm as rc,zn as zd,zp as sg,zq as Hi,zr as ik}from"./chunk-vqxqesr8.js";import{$r as x,$s as qa,As as P,Bs as Q,Cs as R,Ds as S,Es as T,Fr as b,Fs as U,Gr as c,Gs as V,Hr as d,Hs as W,Ir as e,Is as X,Jr as f,Js as Y,Kr as g,Ks as Z,Lr as h,Ls as _,Mr as i,Ms as $,Nr as j,Ns as aa,Or as k,Os as ba,Pr as l,Ps as ca,Qr as m,Qs as da,Rr as n,Rs as ea,Sr as o,Ss as fa,Tr as p,Ts as ia,Ur as q,Us as ja,Vr as r,Vs as ka,Wr as s,Ws as la,Xr as t,Xs as ma,Yr as u,Ys as na,Zr as v,Zs as oa,_r as w,_s as pa,as as y,at as ra,bs as z,bt as sa,cs as A,ct as ta,ds as B,dt as ua,es as C,et as va,fs as D,ft as wa,gs as E,hs as F,is as G,js as H,ks as I,ls as J,ms as K,ns as L,xs as M,ys as N,zs as O}from"./chunk-raxr83fs.js";import{gt as ga,ht as ha}from"./chunk-at84gyvf.js";import{it as Kb,jt as Lb,kt as Mb}from"./chunk-397rqs12.js";import{lt as vi,mt as wi,nt as xi,ot as yi,pt as zi,qt as Ai,rt as Bi,st as Ci,tt as Di}from"./chunk-aqrp68m6.js";import{$t as Mc,Lt as Fc,Mt as Gc,Nt as Hc,Ot as Ic,Pt as Jc,Rt as Kc,_t as Lc,au as Nc}from"./chunk-zkbdw1yr.js";import{bu as te,cu as ue,du as ve}from"./chunk-jwnbwemq.js";import"./chunk-ry1key0g.js";import{ku as Qb,lu as Rb,mu as Sb,nu as Tb,ou as Ub,pu as Vb}from"./chunk-4ee1aaet.js";import"./chunk-mc9xjq9z.js";import{uu as Wb,vu as Xb}from"./chunk-18p8dqya.js";import{Au as Sd,Bu as Td,Cu as Ud,Du as Vd,Eu as Wd,Fu as Xd,Gu as Yd,Hu as Zd,Iu as _d,Ju as $d,Ku as ae,Lu as be,Mu as ce,Nu as de,Ou as ee,zu as Rd}from"./chunk-64ttktzc.js";import"./chunk-xcsf7my7.js";import"./chunk-2kv2gnzc.js";import{$u as vb,Uu as ob,Vu as pb,Wu as qb,Xu as rb,Yu as sb,Zu as tb,_u as ub,av as wb,bv as xb,cv as yb,dv as zb,ev as Ab,fv as Bb,gv as Cb,hv as Db,iv as Eb}from"./chunk-ttny9g8k.js";import{Cv as Ua,Dv as Va,Ev as Wa,Fv as Xa,Gv as Ya,Hv as Za,Iv as _a,Jv as $a,Kv as ab,Lv as bb,Mv as cb,Nv as db,Ov as eb,Pv as fb,Qv as gb,Sv as hb,mv as Pa,nv as Qa,qv as Ra,vv as Sa,wv as Ta}from"./chunk-h22zwr5c.js";import"./chunk-9ebfmdyb.js";import"./chunk-jryjwara.js";export{Rk as writeNetlifyConfig,Lm as writeManifest,ul as writeImageManifest,bp as wrapComponentForHMR,Kr as withDefaults,ck as webComponentDirectiveHandler,Sp as watermark,Uq as watchViews,El as watchMultiple,Fl as watchEffect,Dl as watch,Ae as warmImagePlaceholders,Sl as waitForStore,X as waitForLocale,Po as virtualPathFor,Rj as videoDirective,G as validators,Or as validated,qe as validateValueEnhanced,Vh as validateTemplate,xm as validateRouteRules,Xp as validateParams,re as validateFormEnhanced,Jq as validateFile,me as validateFields,le as validateField,Xh as validateDirective,Ld as validateCspDirectives,kk as validateConfig,Ym as validateComponentScripts,vn as validateComponentProps,Tg as validateClientScript,Sh as v,wc as usesSignalsInScript,ub as usesReactiveRuntime,ii as userComponentFileExists,yh as useVirtualList,Zd as useTitle,Rl as useStoreOrThrow,tp as useStore,Bk as useStorage,of as useSlots,Dk as useSessionStorage,Wb as useServerRuntimeConfig,Kf as useServerData,Wd as useSeoMeta,Xb as useRuntimeConfig,Tl as useRouteParams,Vl as useRouteParamOrThrow,Ul as useRouteParam,Zd as usePageTitle,ef as useOptimistic,tf as useModel,Xl as useMiddlewareValue,Wl as useMiddlewareState,Ck as useLocalStorage,Wo as useLoadingIndicator,Ud as useHead,Ph as useForm,qf as useAttrs,Lq as uploadFiles,Kq as uploadFile,Ol as updateInstance,cf as untrack,yi as unregisterDirective,Pl as unmountInstance,Ec as unescapeHtml,So as typecheckStxFiles,hi as transpileTypeScript,xr as translate,Ba as transitionDirective,dc as transformAutoImports,pn as toUsers,on as toUser,Bp as thumbnail,Cq as thumbHashToRGBA,Dq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,xf as templateCache,bd as syncRecordedResponse,_o as stxClientHelpers,dg as structuredDataDirective,Ar as stripLocalePrefix,um as stripDocumentWrapper,Lb as stripCommentsAndLiterals,$n as stringToStream,zd as strictCspPreset,Le as streamingSuspenseDirective,Pe as streamToResponse,Je as streamTemplateSimple,De as streamTemplate,wk as stopHmrServer,ln as stopBroadcasting,Tb as stateDirName,Ub as stateDir,Te as state,Ng as startsDocument,vo as startProductionServer,qo as startInteractive,kn as startBroadcasting,Cr as stampLocaleLayoutGroup,Ia as staggerDirective,Vp as srcsetUrls,Ja as springDirective,id as splitByPipe,qm as spaNavVaryHeaders,Qo as sourcePathFor,aq as smartBatchSign,ki as slotContentHasExpressions,_p as signUrl,fi as shouldTranspileTypeScript,tk as shouldReloadOnChange,dq as shouldRefreshSignature,uk as shouldIgnoreFile,qh as shouldCacheComponent,Fp as sharpen,Rr as shape,Sb as setStateDir,$l as setRouteParams,am as setMiddlewareState,ze as setImagePlaceholder,hf as setGlobalProvide,b as setErrorLocale,wl as setCurrentInstance,Fj as setCachedVideoResult,uj as setCachedImageResult,oj as setCached,Ur as serveStxFile,Wr as serveMultipleStxFiles,ok as serveMarkdownFile,Go as serveFile,Xr as serveApp,Fo as serve,ep as serializeState,Nm as serializeSetCookie,Hp as sepia,Xd as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Vj as scopeHTML,Uj as scopeCSS,gg as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,Lp as saturation,Yp as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,Yf as runPreProcessingMiddleware,Zf as runPostProcessingMiddleware,Qm as runPageAction,Ze as runMountCallbacks,gb as runMiddleware,Ml as runHooks,qr as runDoctor,_e as runDestroyCallbacks,lg as runComposers,Mp as rotate,Th as rewriteImagesWithSiblings,cd as responseBindings,oi as resolveTemplatePath,ha as resolveStxTargets,gk as resolveStxDirectories,wr as resolveI18n,zp as resize,Cc as resetRejectedExpressionWarnings,jc as resetPlaceholders,Td as resetHead,dp as resetHMRHandler,o as resetErrorConfig,Mr as required,nc as replacePlaceholders,Sq as renderView,Oj as renderVideoComponent,ac as renderVendorStyleTags,$q as renderToString,ar as renderToStream,br as renderToDOM,Bq as renderThumbhashToCanvas,nr as renderTemplateString,lr as renderTemplate,mr as renderString,Ge as renderStreamingPage,ai as renderSlot,gh as renderSSRSuspense,lq as renderProtectedVideo,kq as renderProtectedImg,Zp as renderMediaUpload,kr as renderMarkdownView,Bm as renderLayoutTypes,yj as renderImgComponent,kl as renderImageComponent,$d as renderHtmlAttrs,_d as renderHead,Vq as renderEmail,mi as renderComponentWithSlot,ae as renderBodyAttrs,op as render,Bd as relaxedCspPreset,ke as registerValidationRule,Ne as registerStreamingDirectives,vp as registerStoresClient,Zl as registerStore,eg as registerSeoDirectives,_a as registerMiddleware,rc as registerFilters,qc as registerFilter,d as registerErrorMessages,pe as registerEnhancedValidationRule,vi as registerDirective,Kd as registerCspDirectives,yn as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,Al as ref,io as redirect,Zc as recordResponseStatus,_c as recordResponseHeader,Vb as rebaseOntoStateDir,$c as readResponseStatus,ad as readResponseHeaders,mk as readMarkdownFile,yf as readFileCached,Bl as reactive,Qp as quality,iq as pruneSignatureCache,rj as pruneCache,ff as provide,jr as protectCodeBlocks,Lr as prop,og as processVueTemplate,wh as processVirtualListDirectives,Ah as processVirtualGridDirectives,Nj as processVideo,ne as processValidateDirective,ea as processTranslateDirective,ah as processTransitionDirectives,dh as processTransitionAttributes,de as processTitleDirective,Rc as processTemplateBindings,Yg as processTeleportDirectives,eh as processSuspenseDirectives,$f as processStructuredData,He as processStreamDirectives,dd as processStatusDirective,Nh as processStaticDirectives,Wf as processStackReplacements,Vf as processStackPushDirectives,bi as processSlots,sm as processShell,Ce as processServerBindings,ag as processSeoDirective,Oe as processSectionDirectives,Jc as processScopedStyles,Pc as processReactiveBindings,mq as processProtectedMedia,Gh as processPartialHydrationDirectives,Sg as processOnceDirective,Xf as processMiddleware,_f as processMetaDirectives,ee as processMetaDirective,nk as processMarkdownFileDirectives,ti as processMarkdownDirectives,Qf as processLoops,oh as processKeepAliveDirectives,Rg as processJsonDirective,zh as processInfiniteListDirectives,Uf as processIncludes,Aj as processImgComponents,ml as processImageComponents,$k as processImage,ce as processHeadDirective,ge as processForms,ie as processFormInputDirectives,Ac as processExpressions,Ib as processEventDirectives,je as processErrorDirective,pg as processDynamicComponents,Uh as processDirectives,Di as processDirectiveAttributes,Xg as processDeferDirectives,Pd as processCustomDirectives,Hd as processCspDirectives,Sr as processComponentProps,ic as processClientScript,he as processBasicFormDirectives,jh as processAsyncDirectives,Qd as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,ve as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,Vo as preloadIslandHandlers,Be as preloadIconCollection,fn as poolStrings,ek as pluginManager,xe as placeholdersWarmed,$g as performLeave,_g as performEnter,$e as pendingLifecycleCounts,df as peek,Rf as partialsCache,Pj as parseVideoDirectiveOptions,xp as parseUrl,Eq as parseThumbhashString,od as parseSwitchBlock,_h as parseSlots,$h as parseSlotElement,td as parseScriptDeclarations,ak as parseSFCComponent,nq as parseProtectedArgs,Pf as parseLoopBinding,zj as parseImgComponent,Ri as parseImageUrl,ll as parseImageComponent,Om as parseFormBody,qd as parseExpressionWithFilters,zn as parseDefaults,fo as parseCookies,jm as parseContainerSelector,ld as parseConditionalBlock,rd as parseArguments,Ma as parseAnimationShorthand,Nr as optional,gn as optimizeTemplate,rl as optimizeImage,sl as optimizeDirectory,Pr as oneOf,Sf as onceStore,Jl as onUpdated,Oc as onUpdate,Ll as onUnmounted,em as onServer,Hl as onMounted,Xe as onMount,Mh as onHydrated,mf as onErrorCaptured,Ye as onDestroy,uh as onDeactivated,dm as onClient,Il as onBeforeUpdate,Kl as onBeforeUnmount,Gl as onBeforeMount,th as onActivated,xq as observeElement,jo as notFound,ug as normalizeCriticalHeadOrder,lf as nextTick,Cn as negotiateEncoding,Ua as navigateTo,Nl as mountInstance,Ea as motionDirective,Ad as moderateCspPreset,en as minifyHtml,cg as metaDirective,Fg as metaDedupKey,yp as mergeParams,Hg as mergeHtmlAttrs,Vd as mergeHeadConfigs,Gc as mergeCssConfig,Ed as mergeCspDirectives,Ra as matchRoute,ui as markdownDirectiveHandler,lk as markdownCache,ga as looksLikeGlob,zr as localizePath,U as loadTranslationLazy,_ as loadTranslation,hk as loadStxConfig,db as loadMiddlewareFromDirectory,Mm as loadManifest,tq as loadElement,mn as loadChannels,Gr as lintStxStrict,vq as lazyLoadAll,uq as lazyLoad,Ha as keyframeDirective,Zq as jsxs,_q as jsxDEV,Yq as jsx,ho as jsonResponse,Me as islandDirective,l as isTest,vm as isSpaNavigation,om as isSpaNavRequest,bq as isSignatureValid,af as isSignal,Zk as isSharpAvailable,Un as isServerEnvironment,bm as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,qq as isNativeLazySupported,ir as isMarkdownPath,Q as isLoading,R as isLoaded,ei as isJavaScriptScript,rq as isIntersectionObserverSupported,fl as isImageFile,_k as isImageBackendAvailable,aa as isICUFormat,Lh as isHydrated,ji as isHydrateTrigger,Xc as isHttpStatus,Tn as isEdgeEnvironment,Hr as isDirectiveKind,k as isDevelopment,bf as isDerived,sk as isCssOnlyChange,Bn as isCompressible,cm as isClient,lh as isAsyncComponent,Pm as isActionableMethod,Ip as invert,Af as invalidateFileCacheByDir,zf as invalidateFileCache,zc as interpolateScriptsInTemplate,xc as interpolateScriptExpressions,yc as interpolateScriptAttributes,x as inlineError,vr as injectThemeBootstrap,bg as injectSeoTags,sr as injectSeo,Jf as injectRouterScript,rk as injectHotReload,kb as injectHeatmap,Nc as injectCss,Fd as injectCspMetaTag,Pg as injectConfigHeadTags,tg as injectColorModeBootScript,Jg as injectCloakStyle,Ag as injectBuildId,cc as injectBrowserCoreAutoImports,Tc as injectAnalytics,gf as inject,Yl as initStoreRegistry,Uk as initNetlify,Xo as initLoadingIndicator,sq as initLazyLoading,po as initFile,Aq as initBlurUp,Gq as initAllBlurUp,Cj as imgDirective,pl as imageDirective,Tm as hydrateTemplateStream,Sm as hydrateTemplate,Uo as hydrateIslands,Ih as hydrateIsland,Um as hydrateFragment,Jh as hydrateByStrategy,Kh as hydrateAll,lp as hydrate,Eo as htmlResponse,Lg as hoistLeadingHeadTags,vg as hoistColorModeBootScript,lb as heatmapDirective,kj as hashString,If as hashFilePath,ij as hashFile,jj as hashBuffer,ng as hasVueTemplateSyntax,Of as hasVariables,qp as hasStore,oc as hasPlaceholders,Sk as hasNetlifyConfig,ab as hasMiddleware,Jb as hasEventDirectives,Og as hasDocumentShell,Yh as hasDirectives,ma as hasDOMSupport,il as handleImageRequest,nf as handleError,fr as h,el as groupVariantsByFormat,Gp as grayscale,xo as gitHash,_m as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,Nk as getTotalSize,cq as getTimeUntilExpiry,Ug as getStoreScript,rp as getStoreNames,pp as getStore,Gk as getStorageSize,Fk as getStorageKeys,pi as getSourceLineInfo,gi as getSharedTranspiler,Ef as getServeClientAsset,la as getScreenReaderOnlyStyle,Wj as getScopeAttribute,Se as getRouteParams,Ob as getPublicEnvDefine,Pb as getPublicEnv,Wh as getPositionInfo,lc as getPlaceholderRegistry,hj as getPlaceholderCacheStats,Sd as getPageMeta,vd as getNonce,gl as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,we as getImagePlaceholder,al as getImageMetadata,te as getImageDelivery,kp as getHydrationRuntime,_l as getHydratedStoreState,vk as getHmrServer,Rd as getHead,cp as getHMRHandler,Vi as getFormatExtension,mj as getFileMtime,dl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,xi as getDirectives,wi as getDirective,xl as getCurrentInstance,Kc as getCssServeAsset,Dd as getCspPreset,Md as getCspHeaderName,si as getComponentCacheStats,Ej as getCachedVideoResult,gq as getCachedSignature,Cf as getCachedSignalsRuntime,Df as getCachedRouterScript,fj as getCachedPlaceholder,tj as getCachedImageResult,nj as getCached,qj as getCacheStats,yg as getBuildId,jn as getBroadcastServer,Ui as getBestVariant,sc as getAllFilters,Ii as generateWidthSrcset,xh as generateVirtualListCSS,Nq as generateVideoPreview,se as generateValidationScript,Oq as generateUploadRuntime,$m as generateTreeShakenBundle,ch as generateTransitionRuntime,bh as generateTransitionCSS,Ij as generateThumbnails,_i as generateThumbhashPlaceholder,Ln as generateTemplatesDocs,ih as generateSuspenseRuntime,hh as generateSuspenseCSS,fp as generateStateScript,Si as generateSrcsetData,xj as generateSrcset,bl as generateSrcSet,Jj as generateSpriteSheet,Wq as generateSpaShell,Ti as generateSourceTags,Oi as generateSizesFromBreakpoints,Ni as generateSizesAttribute,cl as generateSizes,fg as generateSitemapIndex,tr as generateSitemap,pq as generateSimpleMediaPicker,jq as generateSignatureRuntime,wf as generateSignalsRuntimeDev,vf as generateSignalsRuntime,hc as generateServerDataBridge,Tj as generateScopeId,bk as generateSFCWebComponent,Gb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,hg as generateRobotsTxt,ur as generateRobots,wj as generateResponsiveVariants,Zj as generateReactiveWebComponentTS,Yj as generateReactiveWebComponent,$j as generateReactiveRuntime,_j as generateReactiveMixin,Hj as generatePoster,ej as generatePlaceholderStyle,dj as generatePlaceholderCSS,Zi as generatePlaceholder,Hh as generatePartialHydrationCSS,ud as generateNonce,Ok as generateNetlifyToml,Qq as generateMinifiedMediaRuntime,Pq as generateMediaRuntime,oq as generateMediaManagerEmbed,Km as generateManifest,Zo as generateLoadingIndicatorHtml,zq as generateLazyLoadRuntime,Cm as generateLayoutTypes,aj as generateLQIP,sh as generateKeepAliveRuntime,rh as generateKeepAliveCSS,Oh as generateIslandManifest,Mq as generateImagePreview,tl as generateImageManifest,jp as generateHydrationScript,Qe as generateHydrationRuntime,mp as generateHydrationCSS,Bh as generateHydrationBootstrap,qk as generateHotReloadScript,jb as generateHeatmapScript,ap as generateHMRClientScript,Kj as generateHLSManifest,gp as generateEventBindings,Mi as generateDprSrcsetWithVariableQuality,Li as generateDprSrcset,Mg as generateDocumentShell,Qn as generateDocs,Mn as generateDirectivesDocs,Ci as generateDirectiveRuntime,ig as generateDefaultRobotsTxt,Lj as generateDASHManifest,Mc as generateCss,yd as generateCspMetaTag,xd as generateCspHeader,sf as generateCompositionRuntime,Kn as generateComponentsDocs,Ch as generateComponentManifest,In as generateComponentDoc,cj as generateColorPlaceholder,sg as generateColorModeBootScript,Ql as generateClientRuntime,lj as generateCacheKey,fc as generateBrowserAutoImportDestructuring,Hq as generateBlurUpRuntime,Iq as generateBlurUpCSS,Qc as generateBindingsRuntime,Ji as generateAutoWidthSrcset,ec as generateAutoImportDestructuring,nh as generateAsyncComponentRuntime,mh as generateAsyncComponentCSS,Zb as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,Sc as generateAnalyticsScript,To as formatTypecheckDiagnostics,No as formatTypeErrors,mo as formatStxContent,Mk as formatSize,Ta as formatRoutes,no as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,rr as formatDoctorReport,Nn as formatDocsAsMarkdown,Pn as formatDocsAsJson,On as formatDocsAsHtml,Pp as format,dn as foldConstants,Op as flipVertical,Np as flipHorizontal,Dm as fingerprint,Ro as findRuntimeTypeDeclarations,pr as findPantryPackage,kd as findMatchingEndTag,gd as findMatchingDelimiter,Kb as findInterpolationEnd,md as findIfBlocks,pd as findExpressions,Sa as findErrorPage,Hc as findDuplicateScopedStyleRanges,nd as findDirectiveBlocks,an as findDeadCode,an as findDeadBranches,km as findContainerRegion,Jn as findComponentFiles,Vr as findCommonDir,Lk as filterRequiredFiles,ni as fileExists,Lf as extractVariables,Im as extractTemplateExpressions,Ie as extractStreamBoundaries,hp as extractState,ci as extractSlotContent,Nf as extractScriptFromTemplate,Hm as extractScriptBlocks,mc as extractPlaceholders,jd as extractParenthesizedExpression,Yc as extractPageResponseStatus,hb as extractLayoutMetadata,bj as extractDominantColor,sd as extractDirectiveParams,Zh as extractDirectiveNames,wm as extractContainerContent,Gn as extractComponentProps,Dh as extractComponentName,Hn as extractComponentDescription,Lc as extractClassNames,gc as extractBridgeData,Eh as extractBoundProps,hd as extractBalancedExpression,$b as extractAndStripCssImports,Xj as extractAndScopeStyles,Hb as extractAndProcessEvents,zk as externalizeSharedAssets,Ak as externalizeRepeatedAssets,yk as externalizeHtml,Dc as evaluateExpression,cn as evaluateConstant,ed as evaluateAuthExpression,vc as escapeHtmlValue,uc as escapeHtml,C as errorRecovery,E as errorLogger,Zg as ensureTeleportTargets,Qg as ensureDocumentShell,oe as enhancedValidationRules,En as enableDevTools,bn as eliminateDeadCode,Ve as effect,Wp as dprUrls,Rn as docsCommand,Yb as discoverServerApi,Am as discoverLayoutNames,yq as disconnectObserver,Fn as disableDevTools,F as devHelpers,rm as detectShell,Sn as detectRuntime,Pk as detectProjectConfig,Wi as detectFormat,Xm as detectBuildMode,Ue as derived,Tk as deploy,jk as defineStxConfig,up as defineStore,pf as defineSlots,Fr as defineSiteConfig,Jr as definePropsWithValidation,Ir as defineProps,dk as definePlugin,Yd as definePageMeta,Wa as defineMiddleware,Qh as defineForm,kf as defineExpose,jf as defineEmits,zi as defineDirective,hr as defineCustomElement,uo as defineConfig,Ai as defineClientDirective,kh as defineAsyncComponent,wo as defineApiHandler,Rq as defaultMediaConfig,vl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,fe as defaultFormClasses,pc as defaultFilters,Od as defaultCspConfig,fk as defaultConfig,Tr as default,Fc as deepMergeThemes,Ic as dedupeScopedStyles,nm as decodeTitleEntities,$i as decodeThumbhash,Jd as cspNonceDirective,Id as cspDirective,Fq as crossfadeTransition,Ap as crop,vh as createVirtualList,Qj as createVideoDirective,co as createVercelHandler,Ko as createTypeChecker,fa as createTranslateFilter,_n as createTextEncoderStream,gr as createStxApp,Zn as createStreamingResponse,Ke as createStreamRenderer,sp as createStore,Za as createStorageManager,Xa as createServerCookieManager,_b as createServerApi,zl as createScope,fh as createSSRSuspense,Re as createRouter,ym as createRouteRuleResolver,eb as createRouteLocation,Io as createRoute,Al as createRef,Bl as createReactive,rf as createProvideContext,zo as createProject,to as createProductionBuild,kc as createPlaceholder,hn as createOptimizedBuild,eo as createNetlifyHandler,Hk as createNetlifyClient,fb as createMiddlewareContext,Ho as createMiddleware,wq as createLazyObserver,ph as createKeepAliveCache,Wn as createKVNamespace,Fh as createIslandRegistry,Bj as createImgDirective,ql as createImagePlugin,jl as createImageHandler,ol as createImageDirective,nb as createHeatmapAggregator,Kk as createFileManifest,Vn as createEnvAccessor,z as createEnhancedError,Yn as createEdgeHandler,Xn as createEdgeCache,qi as createDetailedErrorMessage,bo as createDenoHandler,Qk as createDefaultNetlifyConfig,Nd as createCspHeaders,go as createCookie,Cl as createComputed,yl as createComponentInstance,ao as createCloudflareHandler,Ya as createClientCookieManager,Bi as createBuiltinDirectives,gr as createApp,Ka as createAnimationTimeline,Dp as cover,Mf as convertToCommonJS,Kp as contrast,Cp as contain,y as consoleError,m as configureErrorHandling,ik as config,Cl as computed,Dn as compressResponse,kg as composerPattern,jg as composer,tm as composeShellWithPage,xn as componentDirective,li as componentClientSignalNames,Jm as compileTemplate,a as collectRepeatedFlag,Jk as collectDeployFiles,Kg as cloakStyleFragment,Gj as clearVideoCache,N as clearTranslationCache,Vg as clearStoreCache,Ek as clearStorage,hq as clearSignatureCache,uf as clearServerData,gj as clearPlaceholderCache,Tf as clearOnceStore,wd as clearNonce,bb as clearMiddleware,ye as clearImagePlaceholders,ue as clearImageDeliveryCatalog,nl as clearImageCache,e as clearErrorMessages,Ff as clearDevCaches,tc as clearCustomFilters,mg as clearComposers,Wg as clearComposableCache,ri as clearComponentCache,pj as clearCache,Db as clearBlankCache,Yo as cleanupLoadingIndicator,hm as classifyScript,im as classifyAllScripts,Lo as checkTemplateFile,Mo as checkTemplate,Gf as checkCache,eq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,sn as channel,lo as captureScreenshots,ko as captureScreenshot,Z as cancelPendingLoads,Ik as calculateSha1,Ki as calculateOptimalWidths,Hf as cacheTemplate,Sj as buildWebComponents,Oo as buildVirtualSource,Tq as buildViews,wp as buildUrl,Ee as buildSuspenseResolveScript,Er as buildStaticSite,qb as buildRuntimeGlobalsDestructure,Em as buildRuntimeAsset,Fm as buildRouterAsset,Dr as buildLangPickerScript,Qi as buildImageUrl,Bg as buildIdFragment,Gg as buildHtmlAttrs,Vm as buildForProduction,An as buildComponentLibrary,fq as buildAuthParams,Wm as buildApp,Br as buildAlternateLinks,so as build,qn as broadcastPrivate,rn as broadcastPresence,nn as broadcast,Jp as brightness,Mb as bracketDepths,Ep as blur,Eb as blankInertHtmlRegions,$p as batchSignUrls,We as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,Rp as auto,ja as attributeValue,Gm as assetTags,Fb as asInvocableStatement,Qr as arrayOf,yr as applyTranslations,vj as applyTransformations,di as applySlots,wn as applyPropDefaults,Up as applyPreset,Ig as applyHtmlAttrs,be as applyHead,Bc as applyFilters,pm as appendVary,Cd as apiCspPreset,Da as animationGroupDirective,Mj as analyzeVideo,Zm as analyzeUsage,fm as analyzeTemplate,gm as analyzeProject,Zm as analyzeDirectiveUsage,Uc as analyticsDirective,Co as addStore,Bo as addPage,Gd as addNonceToInlineContent,Do as addLayout,Ao as addComponent,Rm as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Bf as __setSignalsGeneratorsForTest,zg as __setBuildIdForTest,Dj as VideoProcessorCache,Rh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,fd as Tokenizer,Jo as TemplateTypeChecker,oo as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,cr as Show,Fe as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,bc as STX_AUTO_IMPORTS,Rb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,lm as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Vc as RESPONSE_STATUS_KEY,Wc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,ro as ProductionBuild,er as Portal,yo as PROJECT_TEMPLATES,Tp as PRESETS,sb as NON_CLIENT_PRIMITIVES,np as MemorySessionStore,Hi as MIME_TYPES,Ei as MEDIA_DEFAULT_WIDTHS,Gi as MEDIA_DEFAULT_FORMATS,zm as LAYOUT_TYPES_FILE,sj as ImageProcessorCache,hl as ImageProcessingError,ip as HydrationRuntime,pk as HotReloadServer,mb as HeatmapAggregator,Eg as HTML_CLASS_MARKER,Dg as HTML_ATTRS_MARKER,Xq as Fragment,dr as For,mm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,xk as EXTERNALIZED_ASSET_DIR,Vk as DeployError,Wk as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Qb as DEFAULT_STATE_DIR,Yk as DEFAULT_QUALITY,Xi as DEFAULT_PLACEHOLDER_OPTIONS,Xk as DEFAULT_FORMATS,Fi as DEFAULT_DPR_VALUES,$o as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,Pi as COMMON_SIZES,qg as COLOR_MODE_BOOT_MARKER,rg as COLOR_MODE_BOOT_GLOBAL,Cg as CLOAK_STYLE,un as BroadcastServer,tn as Broadcast,wg as BUILD_ID_META,xg as BUILD_ID_HEADER,Nb as BROWSER_CORE_IMPORTS,Yi as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,or as $path};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ak as m}from"./chunk-9wtpnaps.js";import{ew as z}from"./chunk-jryjwara.js";import{existsSync as s,mkdirSync as T,copyFileSync as F,chmodSync as A}from"fs";import{join as Z,basename as Yq}from"path";import{spawn as j,execSync as Zq}from"child_process";import{tmpdir as c,homedir as P,platform as Lq}from"os";var Iq=`
2
+ import{Ak as m}from"./chunk-y9qnrg8a.js";import{ew as z}from"./chunk-jryjwara.js";import{existsSync as s,mkdirSync as T,copyFileSync as F,chmodSync as A}from"fs";import{join as Z,basename as Yq}from"path";import{spawn as j,execSync as Zq}from"child_process";import{tmpdir as c,homedir as P,platform as Lq}from"os";var Iq=`
3
3
  <script>
4
4
  (function() {
5
5
  'use strict';
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$p as H,Cm as O,Qo as R,rq as x,wr as g}from"./chunk-zqd4nrqt.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;">
2
+ import{$p as H,Cm as O,Qo as R,rq as x,wr as g}from"./chunk-vqxqesr8.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>
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$p as X,Im as W}from"./chunk-zqd4nrqt.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(`
2
+ import{$p as X,Im as W}from"./chunk-vqxqesr8.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}
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Cm as I}from"./chunk-zqd4nrqt.js";import{rs as F,vs as V}from"./chunk-raxr83fs.js";function R(j,W){let U=1,z=W,G="<template",X="</template";while(z<j.length&&U>0){let J=j.indexOf("<",z);if(J===-1)break;if(z=J,j.startsWith(G,z)&&(z+G.length>=j.length||/[\s>\/]/.test(j[z+G.length]))){U++,z+=G.length;continue}if(j.startsWith(X,z)){let Y=j.indexOf(">",z+X.length);if(Y!==-1){if(U--,U===0)return Y+1;z=Y+1;continue}}z++}return U===0?z:-1}var P=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function D(j,W){let U=null;for(let z=W;z<j.length;z++){let G=j[z];if(U){if(G==="\\"){z++;continue}if(G===U)U=null;continue}if(G==='"'||G==="'"){U=G;continue}if(G===">")return z+1}return-1}function b(j){let W=[],U=[],z=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,G=0;while(G<j.length){let X=j.indexOf("<",G);if(X===-1)break;if(j.startsWith("<!--",X)){let $=j.indexOf("-->",X+4);G=$===-1?j.length:$+3;continue}let J=D(j,X+1);if(J===-1)break;let Y=j.slice(X,J),Q=Y.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!Q){G=J;continue}let Z=Q[1]==="/",H=Q[2].toLowerCase();if(Z){let $=U.lastIndexOf(H);if($!==-1)U.splice($);G=J;continue}if(H==="template"&&U.length===0){let $=Y.match(z);if($){let K=R(j,J);if(K!==-1){let O=$[1]||$[2]||$[3];W.push({start:X,end:K,slotName:O,content:j.slice(J,K-11).trim(),propsBinding:$[4]||void 0}),G=K;continue}}}if(!/\/\s*>$/.test(Y)&&!P.has(H)){if(U.push(H),H==="script"||H==="style"){let $=j.toLowerCase().indexOf(`</${H}>`,J);if($!==-1){G=$;continue}}}G=J}return W}function w(j){let W={default:"",named:new Map},U=j,z=b(j);for(let Q of z)W.named.set(Q.slotName,{name:Q.slotName,content:Q.content,propsBinding:Q.propsBinding});z.sort((Q,Z)=>Z.start-Q.start);for(let Q of z)U=U.slice(0,Q.start)+U.slice(Q.end);let G=[],X=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi,J;while((J=X.exec(U))!==null){let[Q,Z,H,_,$,K]=J,O=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),L=(O+B).trim(),q=`<${Z}${L?" "+L:""}>${K}</${Z}>`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:q})}let Y=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*?)\/>/gi;while((J=Y.exec(U))!==null){let[Q,Z,H,_,$]=J,K=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),O=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=(K+O).trim(),L=`<${Z}${B?" "+B:""} />`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:L})}G.sort((Q,Z)=>Z.start-Q.start);for(let Q of G){let Z=W.named.get(Q.slotName);if(Z)Z.content+=Q.element;else W.named.set(Q.slotName,{name:Q.slotName,content:Q.element});U=U.slice(0,Q.start)+U.slice(Q.end)}return W.default=U.trim(),W}function C(j){let W=j.match(/name\s*=\s*["']([^"']+)["']/),U=W?W[1]:"",z={},G=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,X;while((X=G.exec(j))!==null)z[X[1]]=X[2];let J=j.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),Y=J?J[1].trim():"";return{name:U,props:z,defaultContent:Y}}async function N(j,W,U,z){if(!j)return U;let G=j.content;if(j.propsBinding&&Object.keys(W).length>0){let X=j.propsBinding.trim(),J={...z};if(X.startsWith("{")&&X.endsWith("}")){let Y=X.slice(1,-1).split(",").map((Q)=>Q.trim()).filter(Boolean);for(let Q of Y){let[Z,H]=Q.split(":").map(($)=>$.trim()),_=H||Z;if(W[Z]!==void 0)J[_]=W[Z]}}else J[X]=W;G=k(G,J)}return G}function k(j,W){return j.replace(/\{\{\s*([^}]+)\s*\}\}/g,(U,z)=>{try{let G=z.trim(),X=y(G,W);return I(String(X??""))}catch{return`{{ ${z} }}`}})}function y(j,W){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(j)){let z=j.split("."),G=W;for(let X of z)if(G&&typeof G==="object"&&X in G)G=G[X];else return;return G}let U=j.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(U){let[,z,G,X]=U,J=W[z],Y=parseInt(X,10);if(typeof J==="number")switch(G){case"+":return J+Y;case"-":return J-Y;case"*":return J*Y;case"/":return J/Y}}try{if(!F(j))return;return V(j,Object.keys(W))(...Object.values(W))}catch{return}}async function A(j,W,U){let z=j;z=await v(z,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(J,Y,Q,Z)=>{let H=W.named.get(Y),_=Z?.trim()||"",$=Q||"",K={},O=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,B;while((B=O.exec($))!==null){let L=B[1],q=B[2];K[L]=y(q,U)}return await N(H,K,_,U)});let X=/<slot\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return z=z.replace(X,(J,Y)=>{if(J.includes("name="))return J;let Q=Y?.trim()||"";return W.default||Q}),z}async function v(j,W,U){let z=[],G=[];j.replace(W,(Y,...Q)=>{let Z=Q[Q.length-2];return G.push({match:Y,index:Z}),z.push(U(Y,...Q.slice(0,-2))),Y});let X=await Promise.all(z),J=j;for(let Y=G.length-1;Y>=0;Y--){let{match:Q,index:Z}=G[Y];J=J.slice(0,Z)+X[Y]+J.slice(Z+Q.length)}return J}function E(j){let W=w(j);return{defaultSlot:W.default,namedSlots:W.named}}async function M(j,W,U,z){return await A(j,{default:W,named:U},z)}
2
+ import{Cm as I}from"./chunk-vqxqesr8.js";import{rs as F,vs as V}from"./chunk-raxr83fs.js";function R(j,W){let U=1,z=W,G="<template",X="</template";while(z<j.length&&U>0){let J=j.indexOf("<",z);if(J===-1)break;if(z=J,j.startsWith(G,z)&&(z+G.length>=j.length||/[\s>\/]/.test(j[z+G.length]))){U++,z+=G.length;continue}if(j.startsWith(X,z)){let Y=j.indexOf(">",z+X.length);if(Y!==-1){if(U--,U===0)return Y+1;z=Y+1;continue}}z++}return U===0?z:-1}var P=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function D(j,W){let U=null;for(let z=W;z<j.length;z++){let G=j[z];if(U){if(G==="\\"){z++;continue}if(G===U)U=null;continue}if(G==='"'||G==="'"){U=G;continue}if(G===">")return z+1}return-1}function b(j){let W=[],U=[],z=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,G=0;while(G<j.length){let X=j.indexOf("<",G);if(X===-1)break;if(j.startsWith("<!--",X)){let $=j.indexOf("-->",X+4);G=$===-1?j.length:$+3;continue}let J=D(j,X+1);if(J===-1)break;let Y=j.slice(X,J),Q=Y.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!Q){G=J;continue}let Z=Q[1]==="/",H=Q[2].toLowerCase();if(Z){let $=U.lastIndexOf(H);if($!==-1)U.splice($);G=J;continue}if(H==="template"&&U.length===0){let $=Y.match(z);if($){let K=R(j,J);if(K!==-1){let O=$[1]||$[2]||$[3];W.push({start:X,end:K,slotName:O,content:j.slice(J,K-11).trim(),propsBinding:$[4]||void 0}),G=K;continue}}}if(!/\/\s*>$/.test(Y)&&!P.has(H)){if(U.push(H),H==="script"||H==="style"){let $=j.toLowerCase().indexOf(`</${H}>`,J);if($!==-1){G=$;continue}}}G=J}return W}function w(j){let W={default:"",named:new Map},U=j,z=b(j);for(let Q of z)W.named.set(Q.slotName,{name:Q.slotName,content:Q.content,propsBinding:Q.propsBinding});z.sort((Q,Z)=>Z.start-Q.start);for(let Q of z)U=U.slice(0,Q.start)+U.slice(Q.end);let G=[],X=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi,J;while((J=X.exec(U))!==null){let[Q,Z,H,_,$,K]=J,O=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),L=(O+B).trim(),q=`<${Z}${L?" "+L:""}>${K}</${Z}>`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:q})}let Y=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*?)\/>/gi;while((J=Y.exec(U))!==null){let[Q,Z,H,_,$]=J,K=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),O=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=(K+O).trim(),L=`<${Z}${B?" "+B:""} />`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:L})}G.sort((Q,Z)=>Z.start-Q.start);for(let Q of G){let Z=W.named.get(Q.slotName);if(Z)Z.content+=Q.element;else W.named.set(Q.slotName,{name:Q.slotName,content:Q.element});U=U.slice(0,Q.start)+U.slice(Q.end)}return W.default=U.trim(),W}function C(j){let W=j.match(/name\s*=\s*["']([^"']+)["']/),U=W?W[1]:"",z={},G=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,X;while((X=G.exec(j))!==null)z[X[1]]=X[2];let J=j.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),Y=J?J[1].trim():"";return{name:U,props:z,defaultContent:Y}}async function N(j,W,U,z){if(!j)return U;let G=j.content;if(j.propsBinding&&Object.keys(W).length>0){let X=j.propsBinding.trim(),J={...z};if(X.startsWith("{")&&X.endsWith("}")){let Y=X.slice(1,-1).split(",").map((Q)=>Q.trim()).filter(Boolean);for(let Q of Y){let[Z,H]=Q.split(":").map(($)=>$.trim()),_=H||Z;if(W[Z]!==void 0)J[_]=W[Z]}}else J[X]=W;G=k(G,J)}return G}function k(j,W){return j.replace(/\{\{\s*([^}]+)\s*\}\}/g,(U,z)=>{try{let G=z.trim(),X=y(G,W);return I(String(X??""))}catch{return`{{ ${z} }}`}})}function y(j,W){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(j)){let z=j.split("."),G=W;for(let X of z)if(G&&typeof G==="object"&&X in G)G=G[X];else return;return G}let U=j.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(U){let[,z,G,X]=U,J=W[z],Y=parseInt(X,10);if(typeof J==="number")switch(G){case"+":return J+Y;case"-":return J-Y;case"*":return J*Y;case"/":return J/Y}}try{if(!F(j))return;return V(j,Object.keys(W))(...Object.values(W))}catch{return}}async function A(j,W,U){let z=j;z=await v(z,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(J,Y,Q,Z)=>{let H=W.named.get(Y),_=Z?.trim()||"",$=Q||"",K={},O=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,B;while((B=O.exec($))!==null){let L=B[1],q=B[2];K[L]=y(q,U)}return await N(H,K,_,U)});let X=/<slot\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return z=z.replace(X,(J,Y)=>{if(J.includes("name="))return J;let Q=Y?.trim()||"";return W.default||Q}),z}async function v(j,W,U){let z=[],G=[];j.replace(W,(Y,...Q)=>{let Z=Q[Q.length-2];return G.push({match:Y,index:Z}),z.push(U(Y,...Q.slice(0,-2))),Y});let X=await Promise.all(z),J=j;for(let Y=G.length-1;Y>=0;Y--){let{match:Q,index:Z}=G[Y];J=J.slice(0,Z)+X[Y]+J.slice(Z+Q.length)}return J}function E(j){let W=w(j);return{defaultSlot:W.default,namedSlots:W.named}}async function M(j,W,U,z){return await A(j,{default:W,named:U},z)}
3
3
  export{w as Vg,C as Wg,N as Xg,A as Yg,E as Zg,M as _g};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ui as O,Vi as w,Wi as Z}from"./chunk-xwxdwqn9.js";import{gl as R,nl as U,tl as T}from"./chunk-6aqsmree.js";import{Io as W,fm as M,hq as k,yr as C}from"./chunk-zqd4nrqt.js";import{Pu as E,Qu as L}from"./chunk-xcsf7my7.js";import{Uu as B}from"./chunk-ttny9g8k.js";import $ from"path";var Y=new Map;function b(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 K=((H.includes(":")?H.split(":").pop():H)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(K))z.add(K)}for(let J of Q.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let H of(J[1]??"").split(",")){let V=H.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(V))z.add(V)}}async function l(Q){let z;if(Q)z=$.resolve(Q);else{let q=await C();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(Y,z,"",""),null}let V=()=>[...new Set([...H,...H.flatMap((q)=>R(q))])],K=O(V()),P=w(Y,z,K);if(P!==void 0)return P||null;if(H.length===0)return Z(Y,z,K,""),null;let A=[];for(let q of H){let y=await Bun.file(q).text();A.push({file:q,hasUseStore:/useStore\s*\(/.test(y)})}A.sort((q,y)=>{if(q.hasUseStore===y.hasUseStore)return 0;return q.hasUseStore?1:-1});let N=A.map((q)=>q.file),G=[],X=new Set,F=k({loader:"ts",target:"browser",define:M()});for(let q of N)try{let y=await Bun.file(q).text(),I=$.basename(q,".ts");if(b(y,X),U(y))y=await T(y,q,{projectRoot:process.cwd(),externalizeUserModules:!1});y=W(y),y=E(y),y=L(y),y=y.replace(/^export\s+(default\s+)?/gm,""),y=F.transformSync(y),G.push(`// Store: ${I}
2
+ import{Ui as O,Vi as w,Wi as Z}from"./chunk-xwxdwqn9.js";import{gl as R,nl as U,tl as T}from"./chunk-7r6yhvyt.js";import{Io as W,fm as M,hq as k,yr as C}from"./chunk-vqxqesr8.js";import{Pu as E,Qu as L}from"./chunk-xcsf7my7.js";import{Uu as B}from"./chunk-ttny9g8k.js";import $ from"path";var Y=new Map;function b(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 K=((H.includes(":")?H.split(":").pop():H)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(K))z.add(K)}for(let J of Q.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let H of(J[1]??"").split(",")){let V=H.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(V))z.add(V)}}async function l(Q){let z;if(Q)z=$.resolve(Q);else{let q=await C();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(Y,z,"",""),null}let V=()=>[...new Set([...H,...H.flatMap((q)=>R(q))])],K=O(V()),P=w(Y,z,K);if(P!==void 0)return P||null;if(H.length===0)return Z(Y,z,K,""),null;let A=[];for(let q of H){let y=await Bun.file(q).text();A.push({file:q,hasUseStore:/useStore\s*\(/.test(y)})}A.sort((q,y)=>{if(q.hasUseStore===y.hasUseStore)return 0;return q.hasUseStore?1:-1});let N=A.map((q)=>q.file),G=[],X=new Set,F=k({loader:"ts",target:"browser",define:M()});for(let q of N)try{let y=await Bun.file(q).text(),I=$.basename(q,".ts");if(b(y,X),U(y))y=await T(y,q,{projectRoot:process.cwd(),externalizeUserModules:!1});y=W(y),y=E(y),y=L(y),y=y.replace(/^export\s+(default\s+)?/gm,""),y=F.transformSync(y),G.push(`// Store: ${I}
3
3
  ${y.trim()}`)}catch(y){console.warn(`[stx] Failed to load store ${q}:`,y)}if(G.length===0)return Z(Y,z,K,""),null;let j=G.join(`
4
4
 
5
5
  `),x=`;(function(){
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{em as e,eo as f,fo as h,go as u,ho as l,po as m}from"./chunk-zqd4nrqt.js";import{jt as D}from"./chunk-397rqs12.js";import{Uu as g}from"./chunk-ttny9g8k.js";import JJ from"path";import C from"fs";import S from"path";function k(K,Z,$,J){let Q=0;for(let j=Z;j<K.length;j++)if(K[j]===$)Q++;else if(K[j]===J&&!(J===">"&&K[j-1]==="=")){if(--Q===0)return j}return-1}function WJ(K){let Z=D(K),$=0,J=0,Q=[];for(let j=0;j<Z.length;j++)if("([{".includes(Z[j]))$++;else if(")]}".includes(Z[j]))$--;else if(Z[j]===","&&$===0)Q.push(K.slice(J,j).trim()),J=j+1;return Q.push(K.slice(J).trim()),Q}function R(K,Z){let $=D(K),J=new RegExp(`\\b(?:${Z.map((Q)=>Q.replace(/[$]/g,"\\$&")).join("|")})\\s*(?=[<(])`,"g");for(let Q of $.matchAll(J)){let j=Q.index+Q[0].length,G="";if($[j]==="<"){let U=k($,j,"<",">");if(U<0)continue;G=K.slice(j+1,U),j=U+1;while(/\s/.test($[j]||"")&&j<$.length)j++}if($[j]!=="(")continue;let W=k($,j,"(",")");if(W>=0)return{type:G,args:WJ(K.slice(j+1,W))}}return null}var x=`
2
+ import{em as e,eo as f,fo as h,go as u,ho as l,po as m}from"./chunk-vqxqesr8.js";import{jt as D}from"./chunk-397rqs12.js";import{Uu as g}from"./chunk-ttny9g8k.js";import JJ from"path";import C from"fs";import S from"path";function k(K,Z,$,J){let Q=0;for(let j=Z;j<K.length;j++)if(K[j]===$)Q++;else if(K[j]===J&&!(J===">"&&K[j-1]==="=")){if(--Q===0)return j}return-1}function WJ(K){let Z=D(K),$=0,J=0,Q=[];for(let j=0;j<Z.length;j++)if("([{".includes(Z[j]))$++;else if(")]}".includes(Z[j]))$--;else if(Z[j]===","&&$===0)Q.push(K.slice(J,j).trim()),J=j+1;return Q.push(K.slice(J).trim()),Q}function R(K,Z){let $=D(K),J=new RegExp(`\\b(?:${Z.map((Q)=>Q.replace(/[$]/g,"\\$&")).join("|")})\\s*(?=[<(])`,"g");for(let Q of $.matchAll(J)){let j=Q.index+Q[0].length,G="";if($[j]==="<"){let U=k($,j,"<",">");if(U<0)continue;G=K.slice(j+1,U),j=U+1;while(/\s/.test($[j]||"")&&j<$.length)j++}if($[j]!=="(")continue;let W=k($,j,"(",")");if(W>=0)return{type:G,args:WJ(K.slice(j+1,W))}}return null}var x=`
3
3
  type __StxCtor<T> = T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends BooleanConstructor ? boolean : T extends ArrayConstructor ? unknown[] : T extends ObjectConstructor ? object : T extends readonly unknown[] ? __StxCtor<T[number]> : T extends abstract new (...args: any[]) => infer V ? V : unknown;
4
4
  type __StxWiden<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T;
5
5
  type __StxOption<T> = T extends { type: infer C } ? __StxCtor<C> : T extends { default: infer D } ? D extends (...args: any[]) => infer V ? V : __StxWiden<D> : __StxCtor<T>;