@stacksjs/stx 0.2.736 → 0.2.739

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 (96) hide show
  1. package/dist/{chunk-hxy0qwqs.js → chunk-0cs8apdb.js} +1 -1
  2. package/dist/{chunk-3n3vmhtd.js → chunk-31rg3qz7.js} +1 -1
  3. package/dist/chunk-33qd6h6n.js +2 -0
  4. package/dist/{chunk-as108kr9.js → chunk-373nfr24.js} +2 -2
  5. package/dist/{chunk-3cwvp8vc.js → chunk-3nmkx2yg.js} +8 -8
  6. package/dist/{chunk-mvbw706e.js → chunk-42r0h45w.js} +1 -1
  7. package/dist/{chunk-2kz9d366.js → chunk-48b5fwp2.js} +2 -2
  8. package/dist/{chunk-z8jq4qe7.js → chunk-49km7zfs.js} +2 -2
  9. package/dist/{chunk-j8r7r1wv.js → chunk-4fydrjq9.js} +1 -1
  10. package/dist/{chunk-arbhrz4x.js → chunk-4me1smce.js} +6 -6
  11. package/dist/{chunk-1dss61y2.js → chunk-4ree52mq.js} +1 -1
  12. package/dist/{chunk-np6gcwgs.js → chunk-4xxe3qe5.js} +5 -5
  13. package/dist/{chunk-r1qcq029.js → chunk-54vc7zr6.js} +1 -1
  14. package/dist/{chunk-5cr84pp2.js → chunk-5j9h42bf.js} +1 -1
  15. package/dist/{chunk-b2x1wd97.js → chunk-5tdz3z5q.js} +1 -1
  16. package/dist/{chunk-pgz6yy2m.js → chunk-7af3dwx9.js} +1 -1
  17. package/dist/{chunk-jpfp8f5r.js → chunk-7sqnts69.js} +4 -4
  18. package/dist/{chunk-jkqe35rg.js → chunk-a0xegxej.js} +1 -1
  19. package/dist/{chunk-vvrn688m.js → chunk-arcczsd3.js} +1 -1
  20. package/dist/{chunk-my4m7bk0.js → chunk-c3nwrp52.js} +1 -1
  21. package/dist/{chunk-a0c2qg2b.js → chunk-d5mmgzqs.js} +1 -1
  22. package/dist/{chunk-hnmqnncv.js → chunk-dbdgfkyc.js} +1 -1
  23. package/dist/{chunk-ph2yg39f.js → chunk-dghy97z8.js} +1 -1
  24. package/dist/{chunk-755wsp41.js → chunk-dxfkt19x.js} +24 -4
  25. package/dist/{chunk-enpchwv1.js → chunk-e79f1nqx.js} +1 -1
  26. package/dist/{chunk-6t78kw7s.js → chunk-fn37y9w0.js} +1 -1
  27. package/dist/{chunk-ejhvxggz.js → chunk-fq4v88bm.js} +1 -1
  28. package/dist/{chunk-h0xyzp7v.js → chunk-fs1vnqwp.js} +1 -1
  29. package/dist/{chunk-3dyhn59d.js → chunk-g2d41h5e.js} +1 -1
  30. package/dist/chunk-gcqc1a23.js +2 -0
  31. package/dist/{chunk-018149qp.js → chunk-gyjqjq4a.js} +1 -1
  32. package/dist/{chunk-fv4s2yjf.js → chunk-hmsy1x01.js} +1 -1
  33. package/dist/{chunk-z7ry4w8w.js → chunk-hws0g4w8.js} +1 -1
  34. package/dist/{chunk-5zrz59dy.js → chunk-hx9sejvz.js} +1 -1
  35. package/dist/{chunk-t98sz9rb.js → chunk-j23gevpf.js} +1 -1
  36. package/dist/chunk-j50ave27.js +2 -0
  37. package/dist/{chunk-x0014jes.js → chunk-jq18vvgv.js} +2 -2
  38. package/dist/{chunk-wy2kct6z.js → chunk-jtdnstfj.js} +1 -1
  39. package/dist/{chunk-zqnttswy.js → chunk-jvkdv346.js} +1 -1
  40. package/dist/{chunk-e18z6ntg.js → chunk-kf8dmjb7.js} +1 -1
  41. package/dist/{chunk-y6964t7z.js → chunk-mhx8qba9.js} +1 -1
  42. package/dist/{chunk-g2kfmmfa.js → chunk-mnyy63gy.js} +3 -3
  43. package/dist/chunk-ndvpk5ze.js +2 -0
  44. package/dist/chunk-ph0xas8r.js +2 -0
  45. package/dist/chunk-q0z39h2m.js +2 -0
  46. package/dist/{chunk-00y2xpfk.js → chunk-qg29g74v.js} +1 -1
  47. package/dist/chunk-r16mwj49.js +2 -0
  48. package/dist/{chunk-eqxezwg4.js → chunk-rgbc1qe2.js} +1 -1
  49. package/dist/{chunk-h1rq3935.js → chunk-rsdb4xj8.js} +4 -4
  50. package/dist/{chunk-1pgr2n0h.js → chunk-sw385js5.js} +1 -1
  51. package/dist/{chunk-wnt00y7f.js → chunk-syq3a4s2.js} +1 -1
  52. package/dist/{chunk-6pqsf6tq.js → chunk-trpvddrv.js} +2 -2
  53. package/dist/{chunk-a64crz43.js → chunk-tx8htbte.js} +1 -1
  54. package/dist/{chunk-vresxjg7.js → chunk-tyvpm2x1.js} +1 -1
  55. package/dist/{chunk-9q15h90v.js → chunk-vphm6c38.js} +1 -1
  56. package/dist/{chunk-e3egwyax.js → chunk-vpr2m2xj.js} +1 -1
  57. package/dist/{chunk-ysk3rmz2.js → chunk-vvh18y7t.js} +1 -1
  58. package/dist/{chunk-1t0xwfy2.js → chunk-w6gzkcm4.js} +5 -5
  59. package/dist/chunk-wdvfqmgv.js +2 -0
  60. package/dist/chunk-wv171crf.js +2 -0
  61. package/dist/{chunk-mt789hbw.js → chunk-xafm270g.js} +1 -1
  62. package/dist/{chunk-e25aeftz.js → chunk-ypy39vy3.js} +1 -1
  63. package/dist/chunk-yyr9ps8k.js +2 -0
  64. package/dist/{chunk-s7q5wrsa.js → chunk-z3kbjsqw.js} +1 -1
  65. package/dist/chunk-znshn986.js +3 -0
  66. package/dist/cli.js +8 -8
  67. package/dist/client/signals-class-runtime.js +1 -0
  68. package/dist/client/signals-component-props-runtime.js +1 -0
  69. package/dist/client/signals-expression-compiler-runtime.js +8 -0
  70. package/dist/client/signals-expression-runtime.js +2 -1
  71. package/dist/client/signals-for-runtime.js +4 -2
  72. package/dist/client/signals-if-chain-runtime.js +1 -0
  73. package/dist/client/signals-if-runtime.js +2 -1
  74. package/dist/client/signals-model-runtime.js +1 -0
  75. package/dist/client/signals-process-element-runtime.js +2 -0
  76. package/dist/client/signals-show-runtime.js +1 -0
  77. package/dist/client/signals-style-runtime.js +1 -0
  78. package/dist/craft-entry.js +1 -1
  79. package/dist/craft.js +1 -1
  80. package/dist/native/runtime/binding-diagnostics.d.ts +3 -0
  81. package/dist/native/runtime/binding-diagnostics.js +20 -0
  82. package/dist/native/runtime/shared-screen.js +2 -0
  83. package/dist/pwa.js +1 -1
  84. package/dist/ssg.js +2 -2
  85. package/package.json +5 -5
  86. package/dist/chunk-0ajbe55p.js +0 -2
  87. package/dist/chunk-0ee76md1.js +0 -2
  88. package/dist/chunk-2hpt1f4r.js +0 -2
  89. package/dist/chunk-jbryd6s7.js +0 -3
  90. package/dist/chunk-n14zxb4g.js +0 -2
  91. package/dist/chunk-nfg5tjn2.js +0 -2
  92. package/dist/chunk-q6tmvtqq.js +0 -2
  93. package/dist/chunk-w9qxsp09.js +0 -2
  94. package/dist/chunk-wke3dw59.js +0 -2
  95. package/dist/chunk-xbc84n7q.js +0 -2
  96. package/dist/chunk-zx5wbfxd.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{sh,yf,Ro,rs,rr,Ao,Po,ss,os,is,Io,qa,bf,yt}from"./chunk-2kz9d366.js";import"./chunk-jpfp8f5r.js";import"./chunk-m5nzpjej.js";import"./chunk-z8jq4qe7.js";import"./chunk-h0xyzp7v.js";import"./chunk-4c86wr9a.js";import"./chunk-3fwdxxh1.js";import"./chunk-q7fh1xka.js";import"./chunk-2mqzpzy7.js";import{z}from"./chunk-arbhrz4x.js";import"./chunk-e3egwyax.js";import"./chunk-rbmt5w9v.js";import"./chunk-zkx2m308.js";import"./chunk-zn3c0ew5.js";import"./chunk-ez35607j.js";export{sh as clearScriptScanCache,ss as convertServerLoopAttributesToDirectives,Ao as convertSignalDirectivesToAttributes,os as convertSignalLoopsToAttributes,rr as extractClientSignalNames,z as extractExports,qa as findMarkupIndexOutsideScripts,rs as hasSignalsSyntax,Ro as parseLoopExpression,Po as preEvalLiteralReactiveIfs,is as processScriptSetup,Io as processSignals,bf as rewriteStxImportSpecifiers,yf as scanScriptTags,yt as stripStxRuntimeImports};
2
+ import{sh,yf,Ro,rs,rr,Ao,Po,ss,os,is,Io,qa,bf,yt}from"./chunk-48b5fwp2.js";import"./chunk-7sqnts69.js";import"./chunk-m5nzpjej.js";import"./chunk-49km7zfs.js";import"./chunk-fs1vnqwp.js";import"./chunk-4c86wr9a.js";import"./chunk-3fwdxxh1.js";import"./chunk-q7fh1xka.js";import"./chunk-2mqzpzy7.js";import{z}from"./chunk-4me1smce.js";import"./chunk-vpr2m2xj.js";import"./chunk-rbmt5w9v.js";import"./chunk-zkx2m308.js";import"./chunk-zn3c0ew5.js";import"./chunk-ez35607j.js";export{sh as clearScriptScanCache,ss as convertServerLoopAttributesToDirectives,Ao as convertSignalDirectivesToAttributes,os as convertSignalLoopsToAttributes,rr as extractClientSignalNames,z as extractExports,qa as findMarkupIndexOutsideScripts,rs as hasSignalsSyntax,Ro as parseLoopExpression,Po as preEvalLiteralReactiveIfs,is as processScriptSetup,Io as processSignals,bf as rewriteStxImportSpecifiers,yf as scanScriptTags,yt as stripStxRuntimeImports};
@@ -1,8 +1,8 @@
1
1
  // @bun
2
- import{ot,Xc}from"./chunk-ez35607j.js";import{A}from"./chunk-zn3c0ew5.js";import{z,xs,o,ln,W,S,gc,Ot,mn,Le,je}from"./chunk-arbhrz4x.js";import{or}from"./chunk-jpfp8f5r.js";import{L}from"./chunk-f4gqzg1y.js";import{on}from"./chunk-m5nzpjej.js";var D=`(?:"[^"]*"|'[^']*'|[^>"'])*`,q=/^<([a-zA-Z][a-zA-Z0-9-]*)\b((?:\s+[^=\s>]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)>([\s\S]*)<\/\1>$/s,J=65536,K=4,M=new Map;function sh(){M.clear()}function Y(e){let i=[];for(let n of S(e,W)){let t=n.token.match(/^<script\b([^>]*)>/i),s=n.token.match(/<\/script\s*>$/i);if(!t||!s)continue;let a=t[0].length,f=n.token.length-s[0].length;i.push(Object.freeze({fullMatch:n.token,attrs:t[1],body:n.token.slice(a,f),start:n.start,end:n.end}))}return i}function yf(e,i={}){let n=e.length>=J,t=n?M.get(e):void 0;if(t===void 0){if(t=Y(e),n)gc(M,K),M.set(e,t)}let s=i.skipAttrs;if(!s)return t.slice();let a=[];for(let f of t)if(s.lastIndex=0,!s.test(f.attrs))a.push(f);return a}function Ro(e){let i=e.trim(),n=i.match(/^([\s\S]+?)\s+as\s+(.+)$/);if(n){let s=n[1].trim(),a=n[2].trim(),{itemVar:f,indexVar:c}=F(a);if(f)return{style:"as",iterable:s,itemVar:f,indexVar:c}}let t=i.match(/^(\([^)]+\)|\w+(?:\s*,\s*\w+)?)\s+(?:in|of)\s+([\s\S]+)$/);if(t){let s=t[1].trim(),a=t[2].trim(),{itemVar:f,indexVar:c}=F(s);if(f)return{style:"in",iterable:a,itemVar:f,indexVar:c}}return{style:"unknown",iterable:null,itemVar:null,indexVar:null}}function F(e){let i=e.trim(),n=i.match(/^(\w+)\s*=>\s*(\w+)$/);if(n)return{itemVar:n[2],indexVar:n[1]};let t=i.match(/^\(\s*(\w+)(?:\s*,\s*(\w+))?\s*\)$/);if(t)return{itemVar:t[1],indexVar:t[2]||null};let s=i.match(/^(\w+)\s*,\s*(\w+)$/);if(s)return{itemVar:s[1],indexVar:s[2]};let a=i.match(/^(\w+)$/);if(a)return{itemVar:a[1],indexVar:null};return{itemVar:null,indexVar:null}}function rs(e,i){return Xc(e,i)}function ee(e){let i=/@(if\s*\(|endif|elseif\s*\(|else\b)/g,n=0,t;while((t=i.exec(e))!==null){let s=t[1];if(s.startsWith("if"))n++;else if(s==="endif")n--;else if(n===0)return!0}return!1}function rr(e){let i=new Set,n=/<script\b(?![^>]*\bserver\b)(?![^>]*\bsrc\s*=)[^>]*>([\s\S]*?)<\/script>/gi,t=/\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useModel)\s*(?:<[^>]*>)?\s*\(/g,s;while((s=n.exec(e))!==null){let a=s[1],f;while((f=t.exec(a))!==null)i.add(f[1])}return i}function te(e){if(!/[:@]for\s*=/.test(e)&&!/\bx-for\s*=/.test(e))return[];let i=new RegExp(`<([a-zA-Z][\\w-]*)\\b(${D})>`,"iy"),n=/(?:^|\s)(?::for|@for|x-for)\s*=\s*(?:"([^"]*)"|'([^']*)')/i,t=S(e,(a,f)=>{i.lastIndex=f;let c=i.exec(a);if(!c||c.index!==f||!n.test(c[2]))return-1;return i.lastIndex}),s=[];for(let a of t){i.lastIndex=0;let f=i.exec(a.token);if(!f)continue;let c=f[2].match(n),p=Ro(c?.[1]??c?.[2]??""),h=[p.itemVar,p.indexVar].filter(Boolean);if(h.length===0)continue;let r=f[1],g=/\/\s*>$/.test(a.token)||P.has(r.toLowerCase())?a.end:Z(e,a.start,r,a.end);if(g!==-1)s.push({start:a.start,end:g,vars:new Set(h)})}return s}var U=new Set(["true","false","null","undefined","NaN","Infinity","typeof","instanceof","in","of","new","void","delete","this","Math","JSON","Date","Number","String","Boolean","Array","Object","RegExp","Map","Set","Symbol","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","encodeURI","decodeURI","window","document","console"]);function ne(e){return e.replace(/'(?:\\.|[^'\\])*'/g,"''").replace(/"(?:\\.|[^"\\])*"/g,'""').replace(/`(?:\\.|[^`\\])*`/g,"``")}function G(e,i,n,t){if(!e)return!1;let s=ne(e),a=!1,f=!1,c=!1,p=/([a-zA-Z_$][\w$]*)/g,h;while((h=p.exec(s))!==null){let l=h[1];if(s.slice(0,h.index).trimEnd().endsWith("."))continue;if(U.has(l))continue;if(i.has(l)||t?.has(l))a=!0;else if(n&&l in n)f=!0}let r=/([a-zA-Z_$][\w$]*)(?:\.[a-zA-Z_$][\w$]*)*\s*\(\s*\)/g,u;while((u=r.exec(s))!==null){let l=u[1];if(s.slice(0,u.index).trimEnd().endsWith("."))continue;if(U.has(l)||n&&l in n)continue;c=!0}return(a||c)&&!f}function O(e,i,n){let t=n===void 0?` ${i}`:` ${i}="${n.replace(/"/g,"&quot;")}"`,s=e.trim(),a=s.match(q);if(a&&se(a[3],a[1])){let[,f,c,p]=a;return`<${f}${c}${t}>${p}</${f}>`}return`<template${t}>${s}</template>`}function se(e,i){let n=new RegExp(`<(/)?${i}(?=[\\s/>])`,"gi"),t=0,s;while((s=n.exec(e))!==null)if(s[1]){if(t--,t<0)return!1}else t++;return!0}function Ao(e,i){let n=rr(e);function t(s){let a=s,f=te(s),c=(u)=>{let g=new Set;for(let l of f)if(u>l.start&&u<l.end)for(let d of l.vars)g.add(d);return g},p=/@if\s*\(/g,h,r=[];while((h=p.exec(a))!==null){let u=h.index,g=u+h[0].length,l=1,d=g;while(d<a.length&&l>0){if(a[d]==="(")l++;else if(a[d]===")")l--;d++}if(l!==0)continue;let b=a.substring(g,d-1).trim(),w=d,E=1,y=w,m=/@(if\s*\(|endif)/g;m.lastIndex=w;let x;while((x=m.exec(a))!==null)if(x[1].startsWith("if"))E++;else if(x[1]==="endif"){if(E--,E===0){y=x.index+x[0].length;break}}if(E!==0)continue;let R=a.substring(w,y-6).trim(),v;if(ee(R)){let I=on(a.substring(u,y));if(I.length===0)continue;let k=I[0].branches.filter((C)=>C.type!=="else"),V=c(u);if(!(k.length>0&&k.every((C)=>G(C.condition,n,i,V))))continue;v=I[0].branches.map((C)=>{let N=t(C.content);if(C.type==="elseif")return O(N,"@else-if",C.condition??"");if(C.type==="else")return O(N,"@else");return O(N,"@if",C.condition??"")}).join(`
2
+ import{ot,Xc}from"./chunk-ez35607j.js";import{A}from"./chunk-zn3c0ew5.js";import{z,xs,o,ln,W,S,gc,Ot,mn,Le,je}from"./chunk-4me1smce.js";import{or}from"./chunk-7sqnts69.js";import{L}from"./chunk-f4gqzg1y.js";import{on}from"./chunk-m5nzpjej.js";var D=`(?:"[^"]*"|'[^']*'|[^>"'])*`,q=/^<([a-zA-Z][a-zA-Z0-9-]*)\b((?:\s+[^=\s>]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)>([\s\S]*)<\/\1>$/s,J=65536,K=4,M=new Map;function sh(){M.clear()}function Y(e){let i=[];for(let n of S(e,W)){let t=n.token.match(/^<script\b([^>]*)>/i),s=n.token.match(/<\/script\s*>$/i);if(!t||!s)continue;let a=t[0].length,f=n.token.length-s[0].length;i.push(Object.freeze({fullMatch:n.token,attrs:t[1],body:n.token.slice(a,f),start:n.start,end:n.end}))}return i}function yf(e,i={}){let n=e.length>=J,t=n?M.get(e):void 0;if(t===void 0){if(t=Y(e),n)gc(M,K),M.set(e,t)}let s=i.skipAttrs;if(!s)return t.slice();let a=[];for(let f of t)if(s.lastIndex=0,!s.test(f.attrs))a.push(f);return a}function Ro(e){let i=e.trim(),n=i.match(/^([\s\S]+?)\s+as\s+(.+)$/);if(n){let s=n[1].trim(),a=n[2].trim(),{itemVar:f,indexVar:c}=F(a);if(f)return{style:"as",iterable:s,itemVar:f,indexVar:c}}let t=i.match(/^(\([^)]+\)|\w+(?:\s*,\s*\w+)?)\s+(?:in|of)\s+([\s\S]+)$/);if(t){let s=t[1].trim(),a=t[2].trim(),{itemVar:f,indexVar:c}=F(s);if(f)return{style:"in",iterable:a,itemVar:f,indexVar:c}}return{style:"unknown",iterable:null,itemVar:null,indexVar:null}}function F(e){let i=e.trim(),n=i.match(/^(\w+)\s*=>\s*(\w+)$/);if(n)return{itemVar:n[2],indexVar:n[1]};let t=i.match(/^\(\s*(\w+)(?:\s*,\s*(\w+))?\s*\)$/);if(t)return{itemVar:t[1],indexVar:t[2]||null};let s=i.match(/^(\w+)\s*,\s*(\w+)$/);if(s)return{itemVar:s[1],indexVar:s[2]};let a=i.match(/^(\w+)$/);if(a)return{itemVar:a[1],indexVar:null};return{itemVar:null,indexVar:null}}function rs(e,i){return Xc(e,i)}function ee(e){let i=/@(if\s*\(|endif|elseif\s*\(|else\b)/g,n=0,t;while((t=i.exec(e))!==null){let s=t[1];if(s.startsWith("if"))n++;else if(s==="endif")n--;else if(n===0)return!0}return!1}function rr(e){let i=new Set,n=/<script\b(?![^>]*\bserver\b)(?![^>]*\bsrc\s*=)[^>]*>([\s\S]*?)<\/script>/gi,t=/\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useModel)\s*(?:<[^>]*>)?\s*\(/g,s;while((s=n.exec(e))!==null){let a=s[1],f;while((f=t.exec(a))!==null)i.add(f[1])}return i}function te(e){if(!/[:@]for\s*=/.test(e)&&!/\bx-for\s*=/.test(e))return[];let i=new RegExp(`<([a-zA-Z][\\w-]*)\\b(${D})>`,"iy"),n=/(?:^|\s)(?::for|@for|x-for)\s*=\s*(?:"([^"]*)"|'([^']*)')/i,t=S(e,(a,f)=>{i.lastIndex=f;let c=i.exec(a);if(!c||c.index!==f||!n.test(c[2]))return-1;return i.lastIndex}),s=[];for(let a of t){i.lastIndex=0;let f=i.exec(a.token);if(!f)continue;let c=f[2].match(n),p=Ro(c?.[1]??c?.[2]??""),h=[p.itemVar,p.indexVar].filter(Boolean);if(h.length===0)continue;let r=f[1],g=/\/\s*>$/.test(a.token)||P.has(r.toLowerCase())?a.end:Z(e,a.start,r,a.end);if(g!==-1)s.push({start:a.start,end:g,vars:new Set(h)})}return s}var U=new Set(["true","false","null","undefined","NaN","Infinity","typeof","instanceof","in","of","new","void","delete","this","Math","JSON","Date","Number","String","Boolean","Array","Object","RegExp","Map","Set","Symbol","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","encodeURI","decodeURI","window","document","console"]);function ne(e){return e.replace(/'(?:\\.|[^'\\])*'/g,"''").replace(/"(?:\\.|[^"\\])*"/g,'""').replace(/`(?:\\.|[^`\\])*`/g,"``")}function G(e,i,n,t){if(!e)return!1;let s=ne(e),a=!1,f=!1,c=!1,p=/([a-zA-Z_$][\w$]*)/g,h;while((h=p.exec(s))!==null){let l=h[1];if(s.slice(0,h.index).trimEnd().endsWith("."))continue;if(U.has(l))continue;if(i.has(l)||t?.has(l))a=!0;else if(n&&l in n)f=!0}let r=/([a-zA-Z_$][\w$]*)(?:\.[a-zA-Z_$][\w$]*)*\s*\(\s*\)/g,u;while((u=r.exec(s))!==null){let l=u[1];if(s.slice(0,u.index).trimEnd().endsWith("."))continue;if(U.has(l)||n&&l in n)continue;c=!0}return(a||c)&&!f}function O(e,i,n){let t=n===void 0?` ${i}`:` ${i}="${n.replace(/"/g,"&quot;")}"`,s=e.trim(),a=s.match(q);if(a&&se(a[3],a[1])){let[,f,c,p]=a;return`<${f}${c}${t}>${p}</${f}>`}return`<template${t}>${s}</template>`}function se(e,i){let n=new RegExp(`<(/)?${i}(?=[\\s/>])`,"gi"),t=0,s;while((s=n.exec(e))!==null)if(s[1]){if(t--,t<0)return!1}else t++;return!0}function Ao(e,i){let n=rr(e);function t(s){let a=s,f=te(s),c=(u)=>{let g=new Set;for(let l of f)if(u>l.start&&u<l.end)for(let d of l.vars)g.add(d);return g},p=/@if\s*\(/g,h,r=[];while((h=p.exec(a))!==null){let u=h.index,g=u+h[0].length,l=1,d=g;while(d<a.length&&l>0){if(a[d]==="(")l++;else if(a[d]===")")l--;d++}if(l!==0)continue;let b=a.substring(g,d-1).trim(),w=d,E=1,y=w,m=/@(if\s*\(|endif)/g;m.lastIndex=w;let x;while((x=m.exec(a))!==null)if(x[1].startsWith("if"))E++;else if(x[1]==="endif"){if(E--,E===0){y=x.index+x[0].length;break}}if(E!==0)continue;let R=a.substring(w,y-6).trim(),v;if(ee(R)){let I=on(a.substring(u,y));if(I.length===0)continue;let k=I[0].branches.filter((C)=>C.type!=="else"),V=c(u);if(!(k.length>0&&k.every((C)=>G(C.condition,n,i,V))))continue;v=I[0].branches.map((C)=>{let N=t(C.content);if(C.type==="elseif")return O(N,"@else-if",C.condition??"");if(C.type==="else")return O(N,"@else");return O(N,"@if",C.condition??"")}).join(`
3
3
  `)}else{if(!G(b,n,i,c(u)))continue;v=O(t(R),"@if",b)}r.push({start:u,end:y,replacement:v}),p.lastIndex=y}for(let u=r.length-1;u>=0;u--){let{start:g,end:l,replacement:d}=r[u];a=a.substring(0,g)+d+a.substring(l)}return a}return t(e)}function re(e){let i=e.trim();if(i==="")return;if(i==="true")return!0;if(i==="false")return!1;if(i==="null")return!1;if(i==="undefined")return!1;if(i==="NaN")return!1;if(/^-?\d+(?:\.\d+)?$/.test(i)){let s=Number(i);return s!==0&&!Number.isNaN(s)}let n=i.match(/^'((?:\\.|[^'\\])*)'$/);if(n)return n[1].length>0;let t=i.match(/^"((?:\\.|[^"\\])*)"$/);if(t)return t[1].length>0;return}var P=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),X=/<(script|style)\b/iy,ie=/<\/script/gi,oe=/<\/style/gi;function Z(e,i,n,t){if(P.has(n.toLowerCase()))return t;let s=n.toLowerCase(),a=e.length,f=1,c=t;while(c<a){let p=e.indexOf("<",c);if(p===-1)return-1;if(c=p,e.startsWith("<!--",c)){let g=e.indexOf("-->",c+4);if(g===-1)return-1;c=g+3;continue}X.lastIndex=c;let h=X.exec(e);if(h){let g=e.indexOf(">",c);if(g===-1)return-1;if(e[g-1]==="/"){c=g+1;continue}let l=h[1].toLowerCase()==="script"?ie:oe;l.lastIndex=c;let d=l.exec(e);if(d===null)return-1;let b=e.indexOf(">",d.index);if(b===-1)return-1;c=b+1;continue}if(e[c+1]==="/"){let g=/^<\/([a-z][\w-]*)\s*>/i.exec(e.slice(c,c+64));if(!g){c++;continue}if(g[1].toLowerCase()===s){if(f--,c+=g[0].length,f===0)return c;continue}c+=g[0].length;continue}let r=/^<([a-z][\w-]*)\b/i.exec(e.slice(c,c+64));if(!r){c++;continue}let u=e.indexOf(">",c);if(u===-1)return-1;if(r[1].toLowerCase()===s){let g=e.slice(c,u+1);if(!(/\/\s*>$/.test(g)||P.has(s)))f++}c=u+1}return-1}var ce=/\s(?::else-if|x-else-if|@else-if|:else|x-else|@else)(?=[=\s/>])/;function ae(e,i){let n=i,t=e.length;for(;;){while(n<t&&e[n]!=="<")n++;if(n>=t)return!1;if(e.startsWith("<!--",n)){let f=e.indexOf("-->",n+4);if(f===-1)return!1;n=f+3;continue}break}if(e[n+1]==="/")return!1;let s=e.indexOf(">",n);if(s===-1)return!1;let a=e.slice(n,s+1);return ce.test(a)}function Po(e){if(!e.includes(":if")&&!e.includes(":show")&&!e.includes("x-if")&&!e.includes("x-show")&&!e.includes("@if=")&&!e.includes("@show="))return e;let i=[],n=/<([a-zA-Z][\w-]*)/y,t=/\s/,s=new Set([":if",":show","x-if","x-show","@if","@show"]);S(e,(r,u)=>{n.lastIndex=u;let g=n.exec(r);if(!g||/^(?:script|style)$/i.test(g[1]))return-1;let l=n.lastIndex,d;while(l<r.length){let b=l;while(l<r.length&&t.test(r[l]))l++;let w=l;if(r[w]==="/"){w++;while(w<r.length&&t.test(r[w]))w++}if(r[w]===">"){if(d)i.push({start:u,end:w+1,tag:g[1],...d});return-1}if(l===b)return-1;let E=l;while(l<r.length&&!t.test(r[l])&&r[l]!=="="&&r[l]!==">")l++;if(l===E)return-1;let y=r.slice(E,l);if(y.startsWith("@")&&y.includes("("))return-1;let m=l,x=l;while(x<r.length&&t.test(r[x]))x++;if(r[x]!=="="){l=m;continue}x++;while(x<r.length&&t.test(r[x]))x++;let R=r[x];if(R==='"'||R==="'"){let v=r.indexOf(R,x+1);if(v===-1)return-1;if(!d&&R==='"'&&s.has(y))d={attrName:y,attrStart:b,attrEnd:v+1,value:r.slice(x+1,v)};l=v+1}else{l=x;while(l<r.length&&!t.test(r[l])&&r[l]!==">")l++}}return-1});let a=[],f=-1;for(let r of i){let{start:u,end:g,tag:l,attrName:d,value:b}=r;if(u<f)continue;let w=re(b);if(w===void 0)continue;let m=/\/\s*>$/.test(e.slice(u,g))||P.has(l.toLowerCase())?g:Z(e,u,l,g);if(m===-1)continue;if((d===":if"||d==="x-if"||d==="@if")&&ae(e,m))continue;if(w===!0){let R=e.slice(u,r.attrStart)+e.slice(r.attrEnd,g);a.push({start:u,end:g,replacement:R});continue}a.push({start:u,end:m,replacement:""}),f=m}if(a.length===0)return e;a.sort((r,u)=>r.start-u.start);let c=[],p=-1;for(let r of a){if(r.start<p)continue;c.push(r),p=r.end}let h=e;for(let r=c.length-1;r>=0;r--){let{start:u,end:g,replacement:l}=c[r];h=h.substring(0,u)+l+h.substring(g)}return h}var H=[":for","@for","x-for"];function ss(e,i){if(!i||Object.keys(i).length===0)return e;if(!H.some((c)=>e.includes(`${c}=`)))return e;let n=rr(e);if(Array.isArray(i.__stx_client_signal_names)){for(let c of i.__stx_client_signal_names)if(typeof c==="string")n.add(c)}let t=e,s=[],a=/<([a-zA-Z][\w-]*)((?:[^>"']|"[^"]*"|'[^']*')*)>/g,f;while((f=a.exec(t))!==null){let[c,p,h]=f,r=f.index,u=r+c.length,g=H.map((v)=>({attr:v,m:new RegExp(`\\s${v}="([^"]*)"`).exec(h)})).find((v)=>v.m!==null);if(!g||!g.m)continue;let l=Ro(g.m[1]);if(!l.iterable||!l.itemVar)continue;let d=l.iterable.trim().split(/[.[(]/)[0].trim();if(!d||n.has(d)||!(d in i))continue;let b=Z(t,r,p,u);if(b===-1)continue;let w=h.replace(new RegExp(`\\s${g.attr}="[^"]*"`),"").replace(/\s:key="[^"]*"/,"").replace(/\sx-cloak(?=\s|$)/,""),E=t.slice(u,b-`</${p}>`.length),y={...i,[l.itemVar]:void 0};if(l.indexVar)y[l.indexVar]=void 0;let m=ss(E,y),x=l.indexVar?`${l.iterable} as ${l.indexVar} => ${l.itemVar}`:`${l.iterable} as ${l.itemVar}`,R=p.toLowerCase()==="template"?m:`<${p}${w}>${m}</${p}>`;s.push({start:r,end:b,replacement:`@foreach(${x})${R}@endforeach`}),a.lastIndex=b}for(let c=s.length-1;c>=0;c--){let{start:p,end:h,replacement:r}=s[c];t=t.slice(0,p)+r+t.slice(h)}return t}function os(e,i){let n=e,t=/@(for|foreach)\s*\(/g,s,a=[],f=[];while((s=t.exec(n))!==null){let c=s[1],p=s.index,h=p+s[0].length,r=1,u=h;while(u<n.length&&r>0){if(n[u]==="(")r++;else if(n[u]===")")r--;u++}if(r!==0)continue;let g=n.substring(h,u-1).trim(),l=u,d=Ro(g),b=c==="for"?"@endfor":"@endforeach",w=1,E=l,y=c==="for"?new RegExp("@(for(?!each)\\s*\\(|endfor(?!each))","g"):new RegExp(`@(${c}\\s*\\(|end${c})`,"g");y.lastIndex=l;let m;while((m=y.exec(n))!==null)if(m[1].startsWith(c))w++;else if(w--,w===0){E=m.index+m[0].length;break}if(w!==0)continue;let x=()=>{let _=[d.itemVar,d.indexVar].filter(Boolean);if(_.length)f.push({start:p,end:E,vars:_})};if(d.iterable){let _=d.iterable.trim();if(_.startsWith("[")||_.startsWith("{")||_.startsWith("'")||_.startsWith('"')||_.startsWith("`")||/^-?\d/.test(_)){x();continue}let T=_.split(/[.[(]/)[0].trim(),C=i?T in i:!1,N=f.some((j)=>p>j.start&&p<j.end&&j.vars.includes(T));if(T&&(C||N)){x();continue}}if(d.style==="as")g=d.indexVar?`(${d.itemVar}, ${d.indexVar}) in ${d.iterable}`:`${d.itemVar} in ${d.iterable}`;let R=n.substring(l,E-b.length).trim(),v=i?{...i}:{};if(d.itemVar)delete v[d.itemVar];if(d.indexVar)delete v[d.indexVar];let I=os(R,v),k=I.match(q),V;if(k){let[,_,T,C]=k;V=`<${_}${T} @for="${g}">${C}</${_}>`}else V=`<template @for="${g}">${I}</template>`;a.push({start:p,end:E,replacement:V}),t.lastIndex=E}for(let c=a.length-1;c>=0;c--){let{start:p,end:h,replacement:r}=a[c];n=n.substring(0,p)+r+n.substring(h)}return n}function le(e){let i=new Set,n=[],t=0,s=0,a=e.length,f=(r)=>{let u=t+1;while(u<a){let g=e[u];if(g==="\\"){u+=2;continue}if(g===r)return u+1;u++}return a},c=()=>{let r=t+2;while(r<a&&e[r]!==`
4
4
  `)r++;return r},p=()=>{let r=t+2;while(r<a-1){if(e[r]==="*"&&e[r+1]==="/")return r+2;r++}return a},h=(r)=>{let u=r,g=0;while(u<a){let l=e[u];if(l==="/"&&e[u+1]==="/"){let d=u+2;while(d<a&&e[d]!==`
5
- `)d++;u=d;continue}if(l==="/"&&e[u+1]==="*"){let d=u+2;while(d<a-1&&!(e[d]==="*"&&e[d+1]==="/"))d++;u=d+2;continue}if(l==='"'||l==="'"||l==="`"){let d=u+1;while(d<a){if(e[d]==="\\"){d+=2;continue}if(e[d]===l){d++;break}d++}u=d;continue}if(l==="("||l==="["||l==="{"){g++,u++;continue}if(l===")"||l==="]"||l==="}"){g--,u++;continue}if(l===";"&&g===0)return u+1;u++}return a};while(t<a){let r=e[t];if(r==="/"&&e[t+1]==="/"){let u=c();n.push(e.slice(t,u)),t=u;continue}if(r==="/"&&e[t+1]==="*"){let u=p();n.push(e.slice(t,u)),t=u;continue}if(r==='"'||r==="'"||r==="`"){let u=f(r);n.push(e.slice(t,u)),t=u;continue}if(r==="{"){s++,n.push(r),t++;continue}if(r==="}"){s--,n.push(r),t++;continue}if(s===0){let u=t>0?e[t-1]:"";if(u===""||/\s/.test(u)||u===";"||u==="}"||u==="{"){let l=e.slice(t).match(/^(const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=/);if(l){let d=l[2],b=h(t+l[0].length);if(i.has(d)){n.push(`/* stx: deduped const ${d} */`),t=b;continue}i.add(d),n.push(e.slice(t,b)),t=b;continue}}}n.push(r),t++}return n.join("")}var ue=new Set(["script","style","html","head","meta","link","title","!doctype"]);function B(e,i,n){for(let t of n){if(t.start>=i)return!1;if(t.end>e)return!0}return!1}function fe(e,i,n){let t=0;while(t<e.length){let s=e.indexOf(i,t);if(s===-1)return!1;if(!B(s,s+i.length,n))return!0;t=s+i.length}return!1}function de(e,i){if(fe(e,"<body",i)){let s=new RegExp(`<body(${D})>`,"g"),a;while((a=s.exec(e))!==null)if(!B(a.index,a.index+a[0].length,i))return a.index+a[0].length-1;return null}let n=new RegExp(`<([a-zA-Z][a-zA-Z0-9-]*)\\b(${D})>`,"gi"),t;while((t=n.exec(e))!==null){if(B(t.index,t.index+t[0].length,i))continue;if(ue.has(t[1].toLowerCase()))continue;return t.index+t[0].length-1}return null}function ge(e,i,n,t){let s=[],a=` data-stx="${t}"`,f=0,c=!1,p=(h)=>{if(n!==null&&!c&&n>=f&&n<=h)s.push(e.slice(f,n),a,e.slice(n,h)),c=!0;else s.push(e.slice(f,h))};for(let h of i){if(h.start<f)continue;p(h.start),f=h.end}return p(e.length),s.join("")}async function is(e,i,n,t={}){let s=yf(e,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b/}),a=/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useStore|useLocalStorage|useSessionStorage|keptState|useCookie|useId|useModel|useReactiveProp|useFetch|useRef|useEventListener|useDebounce|useDebouncedValue|useThrottle|useInterval|useTimeout|useToggle|useCounter|useClickOutside|useFocus|useAsync|useColorMode|useDark|useMediaQuery|useScrollLock|usePreferredDark|usePreferredLight|usePreferredReducedMotion|usePreferredContrast|useWebSocket|useRoute|useSearchParams|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots|useOptimistic)\s*(?:<[^>]*>)?\s*\(/,f=[],{hasUserImports:c,bundleClientScript:p}=await o("stx/client-script-bundler",()=>import("./chunk-a0c2qg2b.js"));for(let m of s){let x=m.body;if(Le(m.attrs))x=je(x);if(t.forceClientSetup||a.test(x)){f.push({content:x,start:m.start,end:m.end});continue}if(!c(x))continue;try{let R=await p(Ot(x).code,i||"",{projectRoot:process.cwd(),externalizeUserModules:!1});if(a.test(R))f.push({content:x,start:m.start,end:m.end})}catch{}}if(f.length===0)return{output:e,setupCode:null};let h=`${i??""}\x00${f.map((m)=>m.content).join("\x00")}`,r=`__stx_setup_${Bun.hash(h).toString(36).slice(0,10)}`,u=[];for(let m=0;m<f.length;m++){let x=f[m].bundled??Ot(f[m].content).code;if(!f[m].bundled&&c(x))x=await p(x,i||"",{projectRoot:process.cwd()});x=yt(x);let R=A(x);u.push(`// \u2500\u2500 merged signal script #${m+1} \u2500\u2500
5
+ `)d++;u=d;continue}if(l==="/"&&e[u+1]==="*"){let d=u+2;while(d<a-1&&!(e[d]==="*"&&e[d+1]==="/"))d++;u=d+2;continue}if(l==='"'||l==="'"||l==="`"){let d=u+1;while(d<a){if(e[d]==="\\"){d+=2;continue}if(e[d]===l){d++;break}d++}u=d;continue}if(l==="("||l==="["||l==="{"){g++,u++;continue}if(l===")"||l==="]"||l==="}"){g--,u++;continue}if(l===";"&&g===0)return u+1;u++}return a};while(t<a){let r=e[t];if(r==="/"&&e[t+1]==="/"){let u=c();n.push(e.slice(t,u)),t=u;continue}if(r==="/"&&e[t+1]==="*"){let u=p();n.push(e.slice(t,u)),t=u;continue}if(r==='"'||r==="'"||r==="`"){let u=f(r);n.push(e.slice(t,u)),t=u;continue}if(r==="{"){s++,n.push(r),t++;continue}if(r==="}"){s--,n.push(r),t++;continue}if(s===0){let u=t>0?e[t-1]:"";if(u===""||/\s/.test(u)||u===";"||u==="}"||u==="{"){let l=e.slice(t).match(/^(const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=/);if(l){let d=l[2],b=h(t+l[0].length);if(i.has(d)){n.push(`/* stx: deduped const ${d} */`),t=b;continue}i.add(d),n.push(e.slice(t,b)),t=b;continue}}}n.push(r),t++}return n.join("")}var ue=new Set(["script","style","html","head","meta","link","title","!doctype"]);function B(e,i,n){for(let t of n){if(t.start>=i)return!1;if(t.end>e)return!0}return!1}function fe(e,i,n){let t=0;while(t<e.length){let s=e.indexOf(i,t);if(s===-1)return!1;if(!B(s,s+i.length,n))return!0;t=s+i.length}return!1}function de(e,i){if(fe(e,"<body",i)){let s=new RegExp(`<body(${D})>`,"g"),a;while((a=s.exec(e))!==null)if(!B(a.index,a.index+a[0].length,i))return a.index+a[0].length-1;return null}let n=new RegExp(`<([a-zA-Z][a-zA-Z0-9-]*)\\b(${D})>`,"gi"),t;while((t=n.exec(e))!==null){if(B(t.index,t.index+t[0].length,i))continue;if(ue.has(t[1].toLowerCase()))continue;return t.index+t[0].length-1}return null}function ge(e,i,n,t){let s=[],a=` data-stx="${t}"`,f=0,c=!1,p=(h)=>{if(n!==null&&!c&&n>=f&&n<=h)s.push(e.slice(f,n),a,e.slice(n,h)),c=!0;else s.push(e.slice(f,h))};for(let h of i){if(h.start<f)continue;p(h.start),f=h.end}return p(e.length),s.join("")}async function is(e,i,n,t={}){let s=yf(e,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b/}),a=/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useStore|useLocalStorage|useSessionStorage|keptState|useCookie|useId|useModel|useReactiveProp|useFetch|useRef|useEventListener|useDebounce|useDebouncedValue|useThrottle|useInterval|useTimeout|useToggle|useCounter|useClickOutside|useFocus|useAsync|useColorMode|useDark|useMediaQuery|useScrollLock|usePreferredDark|usePreferredLight|usePreferredReducedMotion|usePreferredContrast|useWebSocket|useRoute|useSearchParams|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots|useOptimistic)\s*(?:<[^>]*>)?\s*\(/,f=[],{hasUserImports:c,bundleClientScript:p}=await o("stx/client-script-bundler",()=>import("./chunk-d5mmgzqs.js"));for(let m of s){let x=m.body;if(Le(m.attrs))x=je(x);if(t.forceClientSetup||a.test(x)){f.push({content:x,start:m.start,end:m.end});continue}if(!c(x))continue;try{let R=await p(Ot(x).code,i||"",{projectRoot:process.cwd(),externalizeUserModules:!1});if(a.test(R))f.push({content:x,start:m.start,end:m.end})}catch{}}if(f.length===0)return{output:e,setupCode:null};let h=`${i??""}\x00${f.map((m)=>m.content).join("\x00")}`,r=`__stx_setup_${Bun.hash(h).toString(36).slice(0,10)}`,u=[];for(let m=0;m<f.length;m++){let x=f[m].bundled??Ot(f[m].content).code;if(!f[m].bundled&&c(x))x=await p(x,i||"",{projectRoot:process.cwd()});x=yt(x);let R=A(x);u.push(`// \u2500\u2500 merged signal script #${m+1} \u2500\u2500
6
6
  ${R}`)}let g=u.join(`
7
7
 
8
8
  `);g=le(g);let d=z(g).split(",").map((m)=>m.trim()).filter(Boolean),b=mn(g,n),w=`
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{t,c}from"./chunk-zkx2m308.js";import{r,hn,h}from"./chunk-arbhrz4x.js";import{Qe}from"./chunk-2mqzpzy7.js";import{ps,gs}from"./chunk-q7fh1xka.js";import{oc,Lo,us,ds}from"./chunk-3fwdxxh1.js";import{nc,rc}from"./chunk-h0xyzp7v.js";import{vt}from"./chunk-am4wadh7.js";import{an,dc,pr,fr}from"./chunk-qc93ce5h.js";import{g}from"./chunk-0dve54ne.js";import{Us}from"./chunk-dhy6n39n.js";import Q from"fs";import N from"path";import{loadConfigWithResult as Ht}from"bunfig";var B={duration:300,delay:0,ease:"ease",direction:"both"};function nt(e,s={}){let{duration:i,delay:o,ease:n,direction:l,custom:d}={...B,...s};if(e==="custom"&&d)return d;switch(e){case"fade":return`${l==="in"?"opacity: 0; animation: fadeIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"opacity: 1; animation: fadeOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"opacity: 1; transition: opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
2
+ import{t,c}from"./chunk-zkx2m308.js";import{r,hn,h}from"./chunk-4me1smce.js";import{Qe}from"./chunk-2mqzpzy7.js";import{ps,gs}from"./chunk-q7fh1xka.js";import{oc,Lo,us,ds}from"./chunk-3fwdxxh1.js";import{nc,rc}from"./chunk-fs1vnqwp.js";import{vt}from"./chunk-am4wadh7.js";import{an,dc,pr,fr}from"./chunk-qc93ce5h.js";import{g}from"./chunk-0dve54ne.js";import{Us}from"./chunk-dhy6n39n.js";import Q from"fs";import N from"path";import{loadConfigWithResult as Ht}from"bunfig";var B={duration:300,delay:0,ease:"ease",direction:"both"};function nt(e,s={}){let{duration:i,delay:o,ease:n,direction:l,custom:d}={...B,...s};if(e==="custom"&&d)return d;switch(e){case"fade":return`${l==="in"?"opacity: 0; animation: fadeIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"opacity: 1; animation: fadeOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"opacity: 1; transition: opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
3
3
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
4
4
  @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }`;case"slide":return`${l==="in"?"transform: translateY(20px); opacity: 0; animation: slideIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"transform: translateY(0); opacity: 1; animation: slideOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"transform: translateY(0); opacity: 1; transition: transform var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms), opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
5
5
  @keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@@ -1307,6 +1307,6 @@ ${y}
1307
1307
  customElements.define('${s}', ${d});
1308
1308
  `}async function Ze(e,s,i,o){if(s.length<1)return c("WebComponent","@webcomponent directive requires at least the tag name parameter",t.INVALID_DIRECTIVE_SYNTAX);let n=s[0].replace(/['"]/g,""),d=(i.__stx_options||{}).componentsDir||"components",p=q.isAbsolute(d)?[q.join(d,`${n}.stx`),q.join(q.dirname(o),`${n}.stx`)]:[q.join(q.dirname(o),d,`${n}.stx`),q.join(process.cwd(),d,`${n}.stx`),q.join(q.dirname(o),`${n}.stx`)],u=null;for(let f of p)if(await r(f)){u=await Bun.file(f).text();break}if(!u)return c("WebComponent",`Component file not found: ${n}.stx`,t.FILE_NOT_FOUND);let m=Ft(u,n);return`<script type="module">
1309
1309
  ${qt(m)}
1310
- </script>`}var j={enabled:!0,ssr:!1,partialsDir:"partials",componentsDir:"components",layoutsDir:"layouts",defaultLayout:"default",debug:!1,cache:!0,stateDir:an,cachePath:".stx/cache",cacheVersion:"1.0.0",componentRenderCacheBytes:33554432,build:{pagesDir:"pages",outputDir:"dist",baseUrl:"/",sitemap:!0,minify:!0,cache:!0,cacheDir:".stx/ssg-cache",concurrency:10,generate404:!0,publicDir:"public",trailingSlash:!1,cleanOutput:!0},customDirectives:[{name:"markdown",handler:Ie,hasEndTag:!0,description:"Render markdown content to HTML"},{name:"webcomponent",handler:Ze,hasEndTag:!1,description:"Include a web component in the template"},nc,rc,ps,gs,De,ke,Ae,Pe,_e,Oe,Fe,$e,...Us],middleware:[],i18n:{defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},webComponents:{enabled:!1,outputDir:"dist/web-components",components:[]},docs:{enabled:!1,outputDir:"docs",format:"markdown",components:!0,templates:!0,directives:!0},streaming:{enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},hydration:{enabled:!1,mode:"islands",clientEntry:"src/client.ts",autoMarkers:!0,preload:"lazy"},router:{enabled:!0,container:"main",linkSelector:"a[href]",viewTransitions:!0,scrollToTop:!0,scrollRestoration:!0,prefetch:!0,cache:!0,cacheTTL:300000,skipSelectors:'[data-no-router], [target="_blank"]',viewTransitionCSS:{oldRoot:"fade-out 0.15s ease-in",newRoot:"fade-in 0.2s ease-out",oldContent:"slide-out 0.2s ease-in",newContent:"slide-in 0.25s ease-out"}},a11y:{enabled:!0,addSrOnlyStyles:!0,level:"AA",autoFix:!1,ignoreChecks:[]},seo:{enabled:!0,socialPreview:!0,defaultConfig:{title:"stx Project",description:"A website built with stx templating engine"}},animation:{enabled:!0,defaultDuration:300,defaultEase:"ease",respectMotionPreferences:!0,staggerDelay:50},markdown:{enabled:!0,syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0,additionalThemes:["light-plus","one-dark-pro","dracula","monokai","solarized-light","nord","github-dark"]}},loops:{maxWhileIterations:1000,useAltLoopVariable:!1},story:{enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],port:6006},pwa:{enabled:!1,manifest:{name:"stx App",shortName:"stx",description:"A Progressive Web App built with stx",startUrl:"/",display:"standalone",orientation:"any",themeColor:"#000000",backgroundColor:"#ffffff",scope:"/"},icons:{src:"public/icon.png",sizes:[72,96,128,144,152,192,384,512],generateWebP:!0,generateAppleIcons:!0,outputDir:"pwa-icons",purpose:["any","maskable"]},routes:[{pattern:"/",strategy:"network-first"},{pattern:"/static/*",strategy:"cache-first",maxAgeSeconds:2592000},{pattern:"/api/*",strategy:"network-only"},{pattern:"*.js",strategy:"stale-while-revalidate"},{pattern:"*.css",strategy:"stale-while-revalidate"},{pattern:"*.png",strategy:"cache-first"},{pattern:"*.jpg",strategy:"cache-first"},{pattern:"*.webp",strategy:"cache-first"},{pattern:"*.svg",strategy:"cache-first"}],offline:{enabled:!0,fallbackTitle:"You are offline",fallbackMessage:"Please check your internet connection and try again.",precacheAssets:[]},serviceWorker:{fileName:"sw.js",cacheVersion:"1.0.0",skipWaiting:!0,clientsClaim:!0,navigationPreload:!1,excludeRoutes:["/api/auth/*"],cacheFileTypes:["html","css","js","png","jpg","jpeg","webp","svg","woff","woff2"],useWorkbox:!1},autoInject:!0,push:{enabled:!1,defaultOptions:{vibrate:[100,50,100],requireInteraction:!1}},backgroundSync:{enabled:!1,queueName:"stx-sync-queue",maxRetentionMinutes:1440,maxRetries:3,minInterval:1000,forms:[],endpoints:[]},shareTarget:{enabled:!1,action:"/share-target",method:"POST",enctype:"multipart/form-data",params:{title:"title",text:"text",url:"url"}},fileHandlers:{enabled:!1},protocolHandlers:[],cacheStorage:{maxSize:100,maxEntries:500,maxAge:30,purgeStrategy:"lru"},updates:{enabled:!0,promptUser:!0,autoReload:!1,message:"A new version is available. Reload to update?"},precache:{enabled:!0,includeHtml:!0,includeJs:!0,includeCss:!0,includeImages:!0,includeFonts:!0,include:[],exclude:["*.map","*.LICENSE.txt"],maxFileSizeKB:500}},media:{enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3],tsImages:{enabled:!0,outputDir:"dist/images",baseUrl:"/images",formatQuality:{jpeg:{quality:85,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4,lossless:!1}},breakpoints:[320,480,640,768,1024,1280,1536,1920],batchOptions:{concurrency:4,optimizationPreset:"web"}}},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0,tsVideos:{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos",defaultQuality:"high",streaming:{enabled:!0,format:"hls",segmentDuration:6,defaultQualities:[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000}]},thumbnails:{enabled:!0,count:10,format:"webp",width:320},transcoding:{defaultCodec:"h264",defaultAudioCodec:"aac",speedPreset:"medium"}}},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}},broadcasting:{enabled:!1,driver:"bun",host:"0.0.0.0",port:6001,scheme:"ws",verbose:!1}};function Ut(e,s,i){let o=s||"pages";if(e)return{root:e,pagesDir:o};let n=i||process.cwd(),l=N.join(n,"resources","views"),d=N.join(n,"resources","layouts");if(Q.existsSync(l)&&Q.existsSync(d))return{root:"resources",pagesDir:"views"};let p=N.join(n,"resources","views","pages");if(Q.existsSync(p))return{root:"resources/views",pagesDir:o};return{root:".",pagesDir:o}}var et=new Set,ue=["partialsDir","componentsDir","layoutsDir"],Se=new WeakMap;function Bt(e,s){let i=s.replace(/[\\/]+$/,"");if(!i||i===".")return!0;let o=e.replace(/\\/g,"/"),n=i.replace(/\\/g,"/");return o===n||o.startsWith(`${n}/`)}function Sf(e,s){let i=!e.root,o=Ut(e.root,e.pagesDir,s);if(e.root=o.root,e.pagesDir=o.pagesDir,i&&o.root!=="."){let n=`${s}::${o.root}`;if(!et.has(n))et.add(n),console.warn(`[stx] No "root" in config \u2014 inferred "${o.root}" from the project layout. Template directories are resolved under it; set root explicitly to pin this.`)}if(!Se.has(e)){let n={};for(let l of ue){let d=e[l];if(typeof d==="string"&&d)n[l]=d}Se.set(e,n)}if(e.root&&e.root!=="."){let n=e.root;for(let l of ue){let d=e[l];if(typeof d!=="string"||!d)continue;if(N.isAbsolute(d)||Bt(d,n))continue;e[l]=N.join(n,d)}}for(let n of ue){let l=e[n];if(typeof l!=="string"||!l||N.isAbsolute(l))continue;e[n]=N.resolve(s,l)}return e}function Jt(e,s){let i=Se.get(e);for(let o of ue){let n=e[o];if(typeof n!=="string"||!n)continue;let l=N.isAbsolute(n)?n:N.join(s,n);if(Q.existsSync(l))continue;let d=i?.[o]??n,p=e.root,u=!!p&&p!==".";console.warn(`[stx] ${String(o)} resolves to "${l}", which does not exist. Configured as "${d}"`+(u?`, resolved under root "${p}".`:"."))}}function Kt(e){if(e.customDirectives)e.customDirectives=[...e.customDirectives];if(e.middleware)e.middleware=[...e.middleware];if(e.apiRoutes)e.apiRoutes={...e.apiRoutes}}function Gt(e){if(dc(e.stateDir),e.stateDir=pr(),e.cachePath=fr(e.cachePath),e.build)e.build.cacheDir=fr(e.build.cacheDir);if(e.media?.cache)e.media.cache.directory=fr(e.media.cache.directory);if(e.story)e.story.outDir=fr(e.story.outDir)}var K=null,Y=new Map,de=new Map,se=null;async function Do(e,s=Ht){try{return await s(e)}catch(i){if(i instanceof Error&&i.name==="ConfigNotFoundError")return{config:e.defaultConfig};throw i}}async function a(e){let s=e?N.resolve(e):process.cwd(),i=de.get(s);if(i&&i.signature!==us(i.graph)){let l=Y.get(s);if(Y.delete(s),de.delete(s),!e)K=null,se=null;let{clearComponentCache:d}=await import("./chunk-1pgr2n0h.js"),{partialsCache:p}=await import("./chunk-a64crz43.js");if(d(),p.clear(),l&&i.configSignature===ds(i.graph)){let u=l.then(async(m)=>{let y={...i.graph};await Lo(y,s),de.set(s,{graph:y,signature:us(y),configSignature:ds(y)});let f={...m,_layerGraph:y};if(!e)K=f;return f});return Y.set(s,u),u}}if(!e){if(K)return K;if(se)return se}let o=Y.get(s);if(o)return o;let n=(async()=>{let l=[".ts",".js",".mjs",".cjs",".json"],d=l.some((v)=>Q.existsSync(N.join(s,`stx.config${v}`))),p=l.some((v)=>Q.existsSync(N.join(s,"config",`ui${v}`))),u;if(d&&p){let v=await Do({name:"ui",cwd:N.join(s,"config"),defaultConfig:j,errorPolicy:"throw",verbose:!1});u=(await Do({name:"stx",alias:"ui",cwd:s,defaultConfig:v.config,errorPolicy:"throw",verbose:!1})).config}else u=(await Do({name:"stx",alias:"ui",cwd:s,defaultConfig:j,errorPolicy:"throw",verbose:!1})).config;if(u.extends!==void 0||i){let v=await oc(s,j);u=v.config,de.set(s,{graph:v.graph,signature:us(v.graph),configSignature:ds(v.graph)})}if(u.runtimeConfig){let{resolveRuntimeConfig:v}=await import("./chunk-5wpgbwap.js");v(u.runtimeConfig,{});let{generateRuntimeConfigTypes:b}=await import("./chunk-b2x1wd97.js");await b(s,u.runtimeConfig)}Kt(u),Gt(u),Sf(u,s),Jt(u,s);let m=[],y=new Set((u.plugins??[]).map((v)=>typeof v==="string"?v:v[0]));for(let v of u.componentPackages??["@stacksjs/components"]){let b=`${v}/stx-plugin`;if(y.has(b)||y.has(v))continue;try{g.resolve(b,{paths:[s]}),m.push(b)}catch{}}let f=[...u.plugins??[],...m];if(f.length>0){let{pluginManager:v}=await import("./chunk-362sjw8c.js"),b=[],x=[];for(let k of f){let S=typeof k==="string"?k:k[0],_=typeof k==="string"?{}:k[1]||{};try{let A,E;try{let w=g.resolve(S,{paths:[s]});A=await import(w),E=N.dirname(w)}catch{let w=N.resolve(s,S);A=await import(w),E=N.dirname(w)}let I=A.default||A;if(!v.has(I.name))await v.register(I,u);if(I.components){let w=Array.isArray(I.components)?I.components:[I.components];for(let C of w)b.push(N.resolve(E,C))}if(I.pages){let w=N.resolve(E,I.pages),C=_.path||"/";x.push({dir:w,prefix:C})}if(I.setup){let w={addDirective:(C)=>{u.customDirectives=u.customDirectives||[],u.customDirectives.push(C)},addRoute:(C,D)=>{u.apiRoutes=u.apiRoutes||{},u.apiRoutes[C]=D},addMiddleware:(C)=>{u.middleware=u.middleware||[],u.middleware.push(C)},pluginDir:E,config:u};await I.setup(_,w)}process.stderr.write(`[stx] Plugin loaded: ${I.name||S}
1310
+ </script>`}var j={enabled:!0,ssr:!1,partialsDir:"partials",componentsDir:"components",layoutsDir:"layouts",defaultLayout:"default",debug:!1,cache:!0,stateDir:an,cachePath:".stx/cache",cacheVersion:"1.0.0",componentRenderCacheBytes:33554432,build:{pagesDir:"pages",outputDir:"dist",baseUrl:"/",sitemap:!0,minify:!0,cache:!0,cacheDir:".stx/ssg-cache",concurrency:10,generate404:!0,publicDir:"public",trailingSlash:!1,cleanOutput:!0},customDirectives:[{name:"markdown",handler:Ie,hasEndTag:!0,description:"Render markdown content to HTML"},{name:"webcomponent",handler:Ze,hasEndTag:!1,description:"Include a web component in the template"},nc,rc,ps,gs,De,ke,Ae,Pe,_e,Oe,Fe,$e,...Us],middleware:[],i18n:{defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},webComponents:{enabled:!1,outputDir:"dist/web-components",components:[]},docs:{enabled:!1,outputDir:"docs",format:"markdown",components:!0,templates:!0,directives:!0},streaming:{enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},hydration:{enabled:!1,mode:"islands",clientEntry:"src/client.ts",autoMarkers:!0,preload:"lazy"},router:{enabled:!0,container:"main",linkSelector:"a[href]",viewTransitions:!0,scrollToTop:!0,scrollRestoration:!0,prefetch:!0,cache:!0,cacheTTL:300000,skipSelectors:'[data-no-router], [target="_blank"]',viewTransitionCSS:{oldRoot:"fade-out 0.15s ease-in",newRoot:"fade-in 0.2s ease-out",oldContent:"slide-out 0.2s ease-in",newContent:"slide-in 0.25s ease-out"}},a11y:{enabled:!0,addSrOnlyStyles:!0,level:"AA",autoFix:!1,ignoreChecks:[]},seo:{enabled:!0,socialPreview:!0,defaultConfig:{title:"stx Project",description:"A website built with stx templating engine"}},animation:{enabled:!0,defaultDuration:300,defaultEase:"ease",respectMotionPreferences:!0,staggerDelay:50},markdown:{enabled:!0,syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0,additionalThemes:["light-plus","one-dark-pro","dracula","monokai","solarized-light","nord","github-dark"]}},loops:{maxWhileIterations:1000,useAltLoopVariable:!1},story:{enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],port:6006},pwa:{enabled:!1,manifest:{name:"stx App",shortName:"stx",description:"A Progressive Web App built with stx",startUrl:"/",display:"standalone",orientation:"any",themeColor:"#000000",backgroundColor:"#ffffff",scope:"/"},icons:{src:"public/icon.png",sizes:[72,96,128,144,152,192,384,512],generateWebP:!0,generateAppleIcons:!0,outputDir:"pwa-icons",purpose:["any","maskable"]},routes:[{pattern:"/",strategy:"network-first"},{pattern:"/static/*",strategy:"cache-first",maxAgeSeconds:2592000},{pattern:"/api/*",strategy:"network-only"},{pattern:"*.js",strategy:"stale-while-revalidate"},{pattern:"*.css",strategy:"stale-while-revalidate"},{pattern:"*.png",strategy:"cache-first"},{pattern:"*.jpg",strategy:"cache-first"},{pattern:"*.webp",strategy:"cache-first"},{pattern:"*.svg",strategy:"cache-first"}],offline:{enabled:!0,fallbackTitle:"You are offline",fallbackMessage:"Please check your internet connection and try again.",precacheAssets:[]},serviceWorker:{fileName:"sw.js",cacheVersion:"1.0.0",skipWaiting:!0,clientsClaim:!0,navigationPreload:!1,excludeRoutes:["/api/auth/*"],cacheFileTypes:["html","css","js","png","jpg","jpeg","webp","svg","woff","woff2"],useWorkbox:!1},autoInject:!0,push:{enabled:!1,defaultOptions:{vibrate:[100,50,100],requireInteraction:!1}},backgroundSync:{enabled:!1,queueName:"stx-sync-queue",maxRetentionMinutes:1440,maxRetries:3,minInterval:1000,forms:[],endpoints:[]},shareTarget:{enabled:!1,action:"/share-target",method:"POST",enctype:"multipart/form-data",params:{title:"title",text:"text",url:"url"}},fileHandlers:{enabled:!1},protocolHandlers:[],cacheStorage:{maxSize:100,maxEntries:500,maxAge:30,purgeStrategy:"lru"},updates:{enabled:!0,promptUser:!0,autoReload:!1,message:"A new version is available. Reload to update?"},precache:{enabled:!0,includeHtml:!0,includeJs:!0,includeCss:!0,includeImages:!0,includeFonts:!0,include:[],exclude:["*.map","*.LICENSE.txt"],maxFileSizeKB:500}},media:{enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3],tsImages:{enabled:!0,outputDir:"dist/images",baseUrl:"/images",formatQuality:{jpeg:{quality:85,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4,lossless:!1}},breakpoints:[320,480,640,768,1024,1280,1536,1920],batchOptions:{concurrency:4,optimizationPreset:"web"}}},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0,tsVideos:{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos",defaultQuality:"high",streaming:{enabled:!0,format:"hls",segmentDuration:6,defaultQualities:[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000}]},thumbnails:{enabled:!0,count:10,format:"webp",width:320},transcoding:{defaultCodec:"h264",defaultAudioCodec:"aac",speedPreset:"medium"}}},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}},broadcasting:{enabled:!1,driver:"bun",host:"0.0.0.0",port:6001,scheme:"ws",verbose:!1}};function Ut(e,s,i){let o=s||"pages";if(e)return{root:e,pagesDir:o};let n=i||process.cwd(),l=N.join(n,"resources","views"),d=N.join(n,"resources","layouts");if(Q.existsSync(l)&&Q.existsSync(d))return{root:"resources",pagesDir:"views"};let p=N.join(n,"resources","views","pages");if(Q.existsSync(p))return{root:"resources/views",pagesDir:o};return{root:".",pagesDir:o}}var et=new Set,ue=["partialsDir","componentsDir","layoutsDir"],Se=new WeakMap;function Bt(e,s){let i=s.replace(/[\\/]+$/,"");if(!i||i===".")return!0;let o=e.replace(/\\/g,"/"),n=i.replace(/\\/g,"/");return o===n||o.startsWith(`${n}/`)}function Sf(e,s){let i=!e.root,o=Ut(e.root,e.pagesDir,s);if(e.root=o.root,e.pagesDir=o.pagesDir,i&&o.root!=="."){let n=`${s}::${o.root}`;if(!et.has(n))et.add(n),console.warn(`[stx] No "root" in config \u2014 inferred "${o.root}" from the project layout. Template directories are resolved under it; set root explicitly to pin this.`)}if(!Se.has(e)){let n={};for(let l of ue){let d=e[l];if(typeof d==="string"&&d)n[l]=d}Se.set(e,n)}if(e.root&&e.root!=="."){let n=e.root;for(let l of ue){let d=e[l];if(typeof d!=="string"||!d)continue;if(N.isAbsolute(d)||Bt(d,n))continue;e[l]=N.join(n,d)}}for(let n of ue){let l=e[n];if(typeof l!=="string"||!l||N.isAbsolute(l))continue;e[n]=N.resolve(s,l)}return e}function Jt(e,s){let i=Se.get(e);for(let o of ue){let n=e[o];if(typeof n!=="string"||!n)continue;let l=N.isAbsolute(n)?n:N.join(s,n);if(Q.existsSync(l))continue;let d=i?.[o]??n,p=e.root,u=!!p&&p!==".";console.warn(`[stx] ${String(o)} resolves to "${l}", which does not exist. Configured as "${d}"`+(u?`, resolved under root "${p}".`:"."))}}function Kt(e){if(e.customDirectives)e.customDirectives=[...e.customDirectives];if(e.middleware)e.middleware=[...e.middleware];if(e.apiRoutes)e.apiRoutes={...e.apiRoutes}}function Gt(e){if(dc(e.stateDir),e.stateDir=pr(),e.cachePath=fr(e.cachePath),e.build)e.build.cacheDir=fr(e.build.cacheDir);if(e.media?.cache)e.media.cache.directory=fr(e.media.cache.directory);if(e.story)e.story.outDir=fr(e.story.outDir)}var K=null,Y=new Map,de=new Map,se=null;async function Do(e,s=Ht){try{return await s(e)}catch(i){if(i instanceof Error&&i.name==="ConfigNotFoundError")return{config:e.defaultConfig};throw i}}async function a(e){let s=e?N.resolve(e):process.cwd(),i=de.get(s);if(i&&i.signature!==us(i.graph)){let l=Y.get(s);if(Y.delete(s),de.delete(s),!e)K=null,se=null;let{clearComponentCache:d}=await import("./chunk-sw385js5.js"),{partialsCache:p}=await import("./chunk-tx8htbte.js");if(d(),p.clear(),l&&i.configSignature===ds(i.graph)){let u=l.then(async(m)=>{let y={...i.graph};await Lo(y,s),de.set(s,{graph:y,signature:us(y),configSignature:ds(y)});let f={...m,_layerGraph:y};if(!e)K=f;return f});return Y.set(s,u),u}}if(!e){if(K)return K;if(se)return se}let o=Y.get(s);if(o)return o;let n=(async()=>{let l=[".ts",".js",".mjs",".cjs",".json"],d=l.some((v)=>Q.existsSync(N.join(s,`stx.config${v}`))),p=l.some((v)=>Q.existsSync(N.join(s,"config",`ui${v}`))),u;if(d&&p){let v=await Do({name:"ui",cwd:N.join(s,"config"),defaultConfig:j,errorPolicy:"throw",verbose:!1});u=(await Do({name:"stx",alias:"ui",cwd:s,defaultConfig:v.config,errorPolicy:"throw",verbose:!1})).config}else u=(await Do({name:"stx",alias:"ui",cwd:s,defaultConfig:j,errorPolicy:"throw",verbose:!1})).config;if(u.extends!==void 0||i){let v=await oc(s,j);u=v.config,de.set(s,{graph:v.graph,signature:us(v.graph),configSignature:ds(v.graph)})}if(u.runtimeConfig){let{resolveRuntimeConfig:v}=await import("./chunk-5wpgbwap.js");v(u.runtimeConfig,{});let{generateRuntimeConfigTypes:b}=await import("./chunk-5tdz3z5q.js");await b(s,u.runtimeConfig)}Kt(u),Gt(u),Sf(u,s),Jt(u,s);let m=[],y=new Set((u.plugins??[]).map((v)=>typeof v==="string"?v:v[0]));for(let v of u.componentPackages??["@stacksjs/components"]){let b=`${v}/stx-plugin`;if(y.has(b)||y.has(v))continue;try{g.resolve(b,{paths:[s]}),m.push(b)}catch{}}let f=[...u.plugins??[],...m];if(f.length>0){let{pluginManager:v}=await import("./chunk-362sjw8c.js"),b=[],x=[];for(let k of f){let S=typeof k==="string"?k:k[0],_=typeof k==="string"?{}:k[1]||{};try{let A,E;try{let w=g.resolve(S,{paths:[s]});A=await import(w),E=N.dirname(w)}catch{let w=N.resolve(s,S);A=await import(w),E=N.dirname(w)}let I=A.default||A;if(!v.has(I.name))await v.register(I,u);if(I.components){let w=Array.isArray(I.components)?I.components:[I.components];for(let C of w)b.push(N.resolve(E,C))}if(I.pages){let w=N.resolve(E,I.pages),C=_.path||"/";x.push({dir:w,prefix:C})}if(I.setup){let w={addDirective:(C)=>{u.customDirectives=u.customDirectives||[],u.customDirectives.push(C)},addRoute:(C,D)=>{u.apiRoutes=u.apiRoutes||{},u.apiRoutes[C]=D},addMiddleware:(C)=>{u.middleware=u.middleware||[],u.middleware.push(C)},pluginDir:E,config:u};await I.setup(_,w)}process.stderr.write(`[stx] Plugin loaded: ${I.name||S}
1311
1311
  `)}catch(A){console.warn(`[stx] Failed to load plugin ${S}:`,A.message)}}u._pluginComponentDirs=b,u._pluginPageDirs=x}return u})();if(Y.set(s,n),n.catch(()=>{if(Y.get(s)===n)Y.delete(s)}),!e)se=n,n.then((l)=>{K=l}).catch(()=>{});return n}var P=new Proxy(j,{get(e,s){if(K&&s in K)return K[s];if(!se)a().catch((i)=>{console.warn("[stx] Failed to load config file:",i?.message||i)});return e[s]}});function ph(e){return e}function fh(e){let s=[],i=[];if(e.partialsDir!==void 0&&typeof e.partialsDir!=="string")s.push({path:"partialsDir",message:"partialsDir must be a string",severity:"error"});if(e.componentsDir!==void 0&&typeof e.componentsDir!=="string")s.push({path:"componentsDir",message:"componentsDir must be a string",severity:"error"});if(e.cache!==void 0&&typeof e.cache!=="boolean")s.push({path:"cache",message:"cache must be a boolean",severity:"error"});if(e.debug!==void 0&&typeof e.debug!=="boolean")s.push({path:"debug",message:"debug must be a boolean",severity:"error"});if(e.streaming){if(e.streaming.bufferSize!==void 0){if(typeof e.streaming.bufferSize!=="number"||e.streaming.bufferSize<=0)s.push({path:"streaming.bufferSize",message:"streaming.bufferSize must be a positive number",severity:"error"})}if(e.streaming.timeout!==void 0){if(typeof e.streaming.timeout!=="number"||e.streaming.timeout<=0)s.push({path:"streaming.timeout",message:"streaming.timeout must be a positive number",severity:"error"})}if(e.streaming.strategy!==void 0){let o=["auto","manual","sections"];if(!o.includes(e.streaming.strategy))s.push({path:"streaming.strategy",message:`streaming.strategy must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.i18n){if(e.i18n.format!==void 0){let o=["json","yaml","yml","js"];if(!o.includes(e.i18n.format))s.push({path:"i18n.format",message:`i18n.format must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.animation){if(e.animation.defaultDuration!==void 0){if(typeof e.animation.defaultDuration!=="number"||e.animation.defaultDuration<0)s.push({path:"animation.defaultDuration",message:"animation.defaultDuration must be a non-negative number",severity:"error"})}if(e.animation.staggerDelay!==void 0){if(typeof e.animation.staggerDelay!=="number"||e.animation.staggerDelay<0)s.push({path:"animation.staggerDelay",message:"animation.staggerDelay must be a non-negative number",severity:"error"})}}if(e.a11y){if(e.a11y.level!==void 0){let o=["AA","AAA"];if(!o.includes(e.a11y.level))s.push({path:"a11y.level",message:`a11y.level must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.hydration){if(e.hydration.mode!==void 0){let o=["progressive","islands"];if(!o.includes(e.hydration.mode))s.push({path:"hydration.mode",message:`hydration.mode must be one of: ${o.join(", ")}`,severity:"error"})}if(e.hydration.preload!==void 0){let o=["none","eager","lazy"];if(!o.includes(e.hydration.preload))s.push({path:"hydration.preload",message:`hydration.preload must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.customDirectives)if(!Array.isArray(e.customDirectives))s.push({path:"customDirectives",message:"customDirectives must be an array",severity:"error"});else e.customDirectives.forEach((o,n)=>{if(!o.name||typeof o.name!=="string")s.push({path:`customDirectives[${n}].name`,message:"Custom directive must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")s.push({path:`customDirectives[${n}].handler`,message:"Custom directive must have a handler function",severity:"error"})});if(e.middleware)if(!Array.isArray(e.middleware))s.push({path:"middleware",message:"middleware must be an array",severity:"error"});else e.middleware.forEach((o,n)=>{if(!o.name||typeof o.name!=="string")s.push({path:`middleware[${n}].name`,message:"Middleware must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")s.push({path:`middleware[${n}].handler`,message:"Middleware must have a handler function",severity:"error"});if(!o.timing||!["before","after"].includes(o.timing))s.push({path:`middleware[${n}].timing`,message:'Middleware timing must be "before" or "after"',severity:"error"})});if(e.debug===!0&&e.cache===!0)i.push({path:"debug+cache",message:"Debug mode with caching enabled may show stale content during development",severity:"warning"});if(e.seo?.enabled===!0&&!e.seo?.defaultConfig?.title)i.push({path:"seo.defaultConfig.title",message:"SEO is enabled but no default title is set",severity:"warning"});if(e.pwa){if(e.pwa.enabled===!0&&!e.pwa.manifest?.name)s.push({path:"pwa.manifest.name",message:"PWA manifest name is required when PWA is enabled",severity:"error"});if(e.pwa.manifest?.display!==void 0){let o=["fullscreen","standalone","minimal-ui","browser"];if(!o.includes(e.pwa.manifest.display))s.push({path:"pwa.manifest.display",message:`PWA display must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.manifest?.orientation!==void 0){let o=["portrait","landscape","any","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"];if(!o.includes(e.pwa.manifest.orientation))s.push({path:"pwa.manifest.orientation",message:`PWA orientation must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.routes){let o=["cache-first","network-first","stale-while-revalidate","network-only","cache-only"];e.pwa.routes.forEach((n,l)=>{if(!n.pattern||typeof n.pattern!=="string")s.push({path:`pwa.routes[${l}].pattern`,message:"PWA route must have a pattern string",severity:"error"});if(!o.includes(n.strategy))s.push({path:`pwa.routes[${l}].strategy`,message:`PWA route strategy must be one of: ${o.join(", ")}`,severity:"error"});if(n.maxAgeSeconds!==void 0&&(typeof n.maxAgeSeconds!=="number"||n.maxAgeSeconds<0))s.push({path:`pwa.routes[${l}].maxAgeSeconds`,message:"PWA route maxAgeSeconds must be a non-negative number",severity:"error"});if(n.maxEntries!==void 0&&(typeof n.maxEntries!=="number"||n.maxEntries<1))s.push({path:`pwa.routes[${l}].maxEntries`,message:"PWA route maxEntries must be a positive number",severity:"error"})})}if(e.pwa.icons?.sizes){if(!Array.isArray(e.pwa.icons.sizes))s.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be an array of numbers",severity:"error"});else if(e.pwa.icons.sizes.filter((n)=>typeof n!=="number"||n<16||n>1024).length>0)s.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be numbers between 16 and 1024",severity:"error"})}if(e.pwa.icons?.purpose){let o=["any","maskable","monochrome"];if(e.pwa.icons.purpose.filter((l)=>!o.includes(l)).length>0)s.push({path:"pwa.icons.purpose",message:`PWA icon purpose must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.enabled===!0&&!e.pwa.icons?.src)i.push({path:"pwa.icons.src",message:"PWA is enabled but no icon source specified. Provide a 512x512 PNG for best results.",severity:"warning"});if(e.pwa.enabled===!0&&!e.pwa.manifest?.themeColor)i.push({path:"pwa.manifest.themeColor",message:"PWA theme color not set, defaulting to black",severity:"warning"})}return{valid:s.length===0,errors:s,warnings:i}}
1312
1312
  export{Ja,Ya,cr,Ye,Za,ls,j,Sf,Do,a,P,ph,fh};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{_}from"./chunk-ez35607j.js";import{A,kn}from"./chunk-zn3c0ew5.js";import{cn,w,x,C,Y}from"./chunk-arbhrz4x.js";import{a}from"./chunk-z8jq4qe7.js";import{Te,Qt,en,tn}from"./chunk-5cr84pp2.js";import{yt}from"./chunk-2kz9d366.js";import{ft,jn,Kt,ce}from"./chunk-h6pmg82p.js";import{T,$r}from"./chunk-xaddgvkx.js";import h from"path";var S=new Map,D=new Map,k=w(64),E=new Map,X=["composables","functions"];function z(t){let n=h.basename(t,".ts");return n==="index"||n==="types"||t.endsWith(".d.ts")}async function Z(t){if(t)return h.resolve(t);let n=`<default>:${process.cwd()}`,i=E.get(n);if(i!==void 0)return i;let e=await q();if(e!==null)E.set(n,e);return e}async function q(){let t=await a(),n=t.root||process.cwd(),i=t.composablesDir;if(i)return h.resolve(n,i);for(let e of X){let s=h.resolve(n,e);try{let d=new Bun.Glob("**/*.ts");for await(let c of d.scan({cwd:s,absolute:!0}))if(!z(c))return s}catch{}}return null}async function G(t){let n=Array.isArray(t)?t:t?[h.resolve(t)]:(await a())._layerComposableDirs??[await Z()].filter((e)=>!!e),i=new Map;for(let e of n){let s=new Bun.Glob("**/*.ts");try{for await(let d of s.scan({cwd:e,absolute:!0})){let c=h.relative(e,d);if(!z(d)&&!i.has(c))i.set(c,d)}}catch{}}return{key:n.join("\x00"),files:[...i.values()].sort()}}async function so(t){let{files:n}=await G(t),i=Y({loader:"ts",target:"browser",define:C()}),e=[];for(let s of n)try{let d=await Bun.file(s).text(),c=i.scan(d).exports.filter((m)=>m!=="default");if(c.length>0)e.push({file:s,names:c})}catch{}return e}function Q(t,n){return new RegExp(`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(t)}function J(t,n){let i=new Set(t.match(/\w+/g)),e=new Set;for(let s of n)if(/^\w+$/.test(s)?i.has(s):Q(t,s))e.add(s);return e}var U=w(64);function V(t,n){let i=x(t,n.size),e=U.get(i);if(e)return e;let s;try{s=cn(t,n)}catch{s=J(t,n)}let d=[...t.matchAll(/(?:const|let|var)\s*\{([^}]*)\}\s*=\s*window\.__composables\u0008/g),...t.matchAll(/import\s*\{([^}]*)\}\s*from\s*['"]@composables['"]/g)];for(let c of d)for(let m of c[1].split(",")){let p=m.trim().split(/\s*(?::|\u0008as\u0008)\s*/)[0];if(p&&n.has(p))s.add(p)}return U.set(i,s),s}function ee(t,n,i){let e=new Map;for(let{file:u,names:l}of t)for(let f of l)if(!e.has(f))e.set(f,u);let s=(u)=>{let l=[];for(let f of J(u,e.keys()))l.push(e.get(f));return l},d=new Set(e.keys()),c=(u)=>{let l=[];for(let f of V(u,d))l.push(e.get(f));return l},m=new Set,p=i.flatMap((u,l)=>l===0?s(u):c(u));while(p.length>0){let u=[];for(let l of p){if(m.has(l))continue;m.add(l);for(let f of c(n.get(l)??""))if(!m.has(f))u.push(f)}p=u}return m}async function Nm(t,n,i){let{key:e,files:s}=await G(t);if(!e)return null;let d=()=>[...new Set([...s,...s.flatMap((o)=>Te(o))])],c=ft(d());if(s.length===0)return ce(S,e,c,""),null;s.sort();let m=Y({loader:"ts",target:"browser",define:C()}),p=Kt(D,e,c);if(!p){let o=new Map,r=[];for(let g of s)try{let y=await Bun.file(g).text();o.set(g,y);let b=m.scan(y).exports.filter((W)=>W!=="default");if(b.length>0)r.push({file:g,names:b})}catch{o.set(g,"")}p=ce(D,e,c,{codeByFile:o,modules:r})}let{codeByFile:u,modules:l}=p,f;if(n===void 0)f=new Set(s);else{let o=i?[n,...i]:[n],r=x(o.join("\x00"),e,o.length,c),g=k.get(r);if(f=g??ee(l,u,o),!g)k.set(r,f)}if(f.size===0)return null;let I=s.filter((o)=>f.has(o)),B=`${e}\x00${I.join("\x00")}\x00${en()}`,F=Kt(S,B,c);if(F!==void 0)return F||null;let M=[],v=new Set,R=new Set;for(let o of I)try{let r=u.get(o)??await Bun.file(o).text(),g=h.basename(o,".ts");for(let b of r.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(b[1])R.add(b[1]);let y=[];try{for(let b of m.scan(r).exports)if(b!=="default")v.add(b),y.push(b)}catch{}if(r=A(r),Qt(r))r=await tn(r,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:y}),r=yt(r);r=kn(r),r=r.replace(/^export\s+(default\s+)?/gm,""),r=m.transformSync(r),M.push(`// Composable: ${g}
2
+ import{_}from"./chunk-ez35607j.js";import{A,kn}from"./chunk-zn3c0ew5.js";import{cn,w,x,C,Y}from"./chunk-4me1smce.js";import{a}from"./chunk-49km7zfs.js";import{Te,Qt,en,tn}from"./chunk-5j9h42bf.js";import{yt}from"./chunk-48b5fwp2.js";import{ft,jn,Kt,ce}from"./chunk-h6pmg82p.js";import{T,$r}from"./chunk-xaddgvkx.js";import h from"path";var S=new Map,D=new Map,k=w(64),E=new Map,X=["composables","functions"];function z(t){let n=h.basename(t,".ts");return n==="index"||n==="types"||t.endsWith(".d.ts")}async function Z(t){if(t)return h.resolve(t);let n=`<default>:${process.cwd()}`,i=E.get(n);if(i!==void 0)return i;let e=await q();if(e!==null)E.set(n,e);return e}async function q(){let t=await a(),n=t.root||process.cwd(),i=t.composablesDir;if(i)return h.resolve(n,i);for(let e of X){let s=h.resolve(n,e);try{let d=new Bun.Glob("**/*.ts");for await(let c of d.scan({cwd:s,absolute:!0}))if(!z(c))return s}catch{}}return null}async function G(t){let n=Array.isArray(t)?t:t?[h.resolve(t)]:(await a())._layerComposableDirs??[await Z()].filter((e)=>!!e),i=new Map;for(let e of n){let s=new Bun.Glob("**/*.ts");try{for await(let d of s.scan({cwd:e,absolute:!0})){let c=h.relative(e,d);if(!z(d)&&!i.has(c))i.set(c,d)}}catch{}}return{key:n.join("\x00"),files:[...i.values()].sort()}}async function so(t){let{files:n}=await G(t),i=Y({loader:"ts",target:"browser",define:C()}),e=[];for(let s of n)try{let d=await Bun.file(s).text(),c=i.scan(d).exports.filter((m)=>m!=="default");if(c.length>0)e.push({file:s,names:c})}catch{}return e}function Q(t,n){return new RegExp(`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(t)}function J(t,n){let i=new Set(t.match(/\w+/g)),e=new Set;for(let s of n)if(/^\w+$/.test(s)?i.has(s):Q(t,s))e.add(s);return e}var U=w(64);function V(t,n){let i=x(t,n.size),e=U.get(i);if(e)return e;let s;try{s=cn(t,n)}catch{s=J(t,n)}let d=[...t.matchAll(/(?:const|let|var)\s*\{([^}]*)\}\s*=\s*window\.__composables\u0008/g),...t.matchAll(/import\s*\{([^}]*)\}\s*from\s*['"]@composables['"]/g)];for(let c of d)for(let m of c[1].split(",")){let p=m.trim().split(/\s*(?::|\u0008as\u0008)\s*/)[0];if(p&&n.has(p))s.add(p)}return U.set(i,s),s}function ee(t,n,i){let e=new Map;for(let{file:u,names:l}of t)for(let f of l)if(!e.has(f))e.set(f,u);let s=(u)=>{let l=[];for(let f of J(u,e.keys()))l.push(e.get(f));return l},d=new Set(e.keys()),c=(u)=>{let l=[];for(let f of V(u,d))l.push(e.get(f));return l},m=new Set,p=i.flatMap((u,l)=>l===0?s(u):c(u));while(p.length>0){let u=[];for(let l of p){if(m.has(l))continue;m.add(l);for(let f of c(n.get(l)??""))if(!m.has(f))u.push(f)}p=u}return m}async function Nm(t,n,i){let{key:e,files:s}=await G(t);if(!e)return null;let d=()=>[...new Set([...s,...s.flatMap((o)=>Te(o))])],c=ft(d());if(s.length===0)return ce(S,e,c,""),null;s.sort();let m=Y({loader:"ts",target:"browser",define:C()}),p=Kt(D,e,c);if(!p){let o=new Map,r=[];for(let g of s)try{let y=await Bun.file(g).text();o.set(g,y);let b=m.scan(y).exports.filter((W)=>W!=="default");if(b.length>0)r.push({file:g,names:b})}catch{o.set(g,"")}p=ce(D,e,c,{codeByFile:o,modules:r})}let{codeByFile:u,modules:l}=p,f;if(n===void 0)f=new Set(s);else{let o=i?[n,...i]:[n],r=x(o.join("\x00"),e,o.length,c),g=k.get(r);if(f=g??ee(l,u,o),!g)k.set(r,f)}if(f.size===0)return null;let I=s.filter((o)=>f.has(o)),B=`${e}\x00${I.join("\x00")}\x00${en()}`,F=Kt(S,B,c);if(F!==void 0)return F||null;let M=[],v=new Set,R=new Set;for(let o of I)try{let r=u.get(o)??await Bun.file(o).text(),g=h.basename(o,".ts");for(let b of r.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(b[1])R.add(b[1]);let y=[];try{for(let b of m.scan(r).exports)if(b!=="default")v.add(b),y.push(b)}catch{}if(r=A(r),Qt(r))r=await tn(r,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:y}),r=yt(r);r=kn(r),r=r.replace(/^export\s+(default\s+)?/gm,""),r=m.transformSync(r),M.push(`// Composable: ${g}
3
3
  ${r.trim()}`)}catch(r){console.warn(`[stx] Failed to load composable ${o}:`,r)}if(M.length===0||v.size===0)return ce(S,B,c,""),null;let L=[...v].map((o)=>` try { if (!(${JSON.stringify(o)} in __c)) __c[${JSON.stringify(o)}] = ${o}; } catch (e) {}`).join(`
4
4
  `),j=JSON.stringify([...v]),N=M.join(`
5
5
 
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Fe,vn,Ns,ci,O}from"./chunk-rbmt5w9v.js";import{bn}from"./chunk-e3egwyax.js";import{Rr,_,Kc,ot,hi,Gc}from"./chunk-ez35607j.js";import{A}from"./chunk-zn3c0ew5.js";import{Ds,u,f,Mt,d,q,B,b,Bs,ke,He,Fs}from"./chunk-zkx2m308.js";import{s,ge}from"./chunk-05qf3e2p.js";import{g}from"./chunk-0dve54ne.js";import{K}from"./chunk-xaddgvkx.js";import Xe from"path";import kt from"process";import{AsyncLocalStorage as Eo}from"async_hooks";var cr=new Eo;function fn(e){return e.__stx_server_data??={pending:new Map,values:new Map}}function lr(e,n){return cr.run(fn(e),n)}async function ur(e,n){let t=cr.getStore();if(!t)throw Error("useServerData must run inside a <script server> render");if(typeof e!=="string"||!e.trim())throw TypeError("useServerData requires a non-empty string key");let i=t.pending.get(e);if(i)return i;let a=Promise.resolve().then(n).then((l)=>{let c=JSON.stringify(l,(v,R)=>{if(R===void 0||typeof R==="function"||typeof R==="symbol"||typeof R==="bigint"||typeof R==="number"&&!Number.isFinite(R))throw TypeError(`useServerData(${JSON.stringify(e)}) requires JSON-serializable data`);if(R&&typeof R==="object"&&!Array.isArray(R)&&Object.getPrototypeOf(R)!==Object.prototype&&Object.getPrototypeOf(R)!==null)throw TypeError(`useServerData(${JSON.stringify(e)}) requires JSON-serializable data`);return R}),y=JSON.parse(c);return t.values.set(e,y),y}).catch((l)=>{throw t.pending.delete(e),l});return t.pending.set(e,a),a}function vr(e){let n=e.__stx_server_data;if(!n?.values.size)return"";return`<script data-stx-scoped data-stx-server-data type="application/json">${JSON.stringify(Object.fromEntries(n.values)).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}</script>`}function z(e,n=!1){let t=s(e),i=[],a=new Set,l=0,c=0,y=t.length,v=()=>{if(l!==0)return;let R=t.slice(c).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?:[!:;,\n]|=(?!=)|$)/);if(R){if(n&&R[1]==="const")return;let P=R[2];if(!a.has(P))i.push(P),a.add(P);return}let T=t.slice(c).match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(T){if(n&&t.slice(c).startsWith("const"))return;T[1].split(",").forEach((P)=>{let M=P.trim();if(!M)return;let G=M.indexOf(":"),L=(G>=0?M.slice(G+1).trim():M).split(/[\s=]/)[0];if(L&&!a.has(L))i.push(L),a.add(L)});return}let D=t.slice(c).match(/^(?:const|let|var)\s+\[([^\]]+)\]\s*=/);if(D){if(n&&t.slice(c).startsWith("const"))return;D[1].split(",").forEach((P)=>{let M=P.trim().replace(/^\.\.\./,"");if(!M)return;let G=M.split(/[\s=]/)[0];if(G&&!a.has(G))i.push(G),a.add(G)});return}if(n)return;let N=t.slice(c).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(N){let P=N[1];if(!a.has(P))i.push(P),a.add(P);return}let j=t.slice(c).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(j){let P=j[1];if(!a.has(P))i.push(P),a.add(P)}};while(c<y){if(t[c]==="{"){l++,c++;continue}if(t[c]==="}"){l--,c++;continue}if(l===0&&/[a-z]/i.test(t[c])&&(c===0||/\s|[;{}()]/.test(t[c-1])))v();c++}return i.join(", ")}function ws(e){return`{ enumerable: true, configurable: true, get() { return ${e} }, set(__stxValue_${e}) { ${e} = __stxValue_${e} } }`}function ko(e,n=z(e).split(",").map((t)=>t.trim()).filter(Boolean)){let t=new Set(z(e,!0).split(",").map((i)=>i.trim()));return n.map((i)=>t.has(i)?`get ${i}() { return ${i} }, set ${i}(__stxValue_${i}) { ${i} = __stxValue_${i} }`:i).join(", ")}function xs(e,n){let t=`{ ${ko(e,n)} }`;return z(e).split(",").some((i)=>i.trim()==="__stxLiveBindings")?`Object.defineProperties(${t}, Object.getOwnPropertyDescriptors(__stxLiveBindings))`:t}import An from"fs";import Ae from"path";function H(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}var fr=new Map;function Ss(e,n=!0){let t=fr.get(e);if(n&&t)return t;let i=new Map,a=[Ae.join(e,"src"),Ae.join(e,"dist"),e];function l(c,y){if(y>6)return;let v;try{v=An.readdirSync(c,{withFileTypes:!0})}catch{return}for(let R of v){let T=Ae.join(c,R.name);if(R.isDirectory()){if(R.name==="node_modules"||R.name.startsWith("."))continue;l(T,y+1)}else if(R.isFile()&&R.name.endsWith(".stx")){let D=R.name.slice(0,-4);if(!i.has(D))i.set(D,T);let N=D.toLowerCase();if(!i.has(N))i.set(N,T);let j=H(D);if(!i.has(j))i.set(j,T)}}}for(let c of a)if(l(c,0),i.size>0)break;if(n)fr.set(e,i);return i}function ks(e,n){if(e.startsWith(".")||e.startsWith("/"))return null;let t=n;while(!0){let i=Ae.join(t,"node_modules",e);try{if(An.statSync(i).isDirectory())return i}catch{}let a=Ae.dirname(t);if(a===t)return null;t=a}}function _s(e,n,t={}){return[Ae.resolve(Ae.dirname(n),`${e}.stx`),Ae.resolve(Ae.dirname(n),e),Ae.resolve(t.componentsDir||"components",`${e}.stx`),Ae.resolve(t.componentsDir||"components",e),e.endsWith(".stx")?e:`${e}.stx`]}function dr(e){let n=e.endsWith(".stx")?e.slice(0,-4):e,t=n.split("-").map((a)=>a.charAt(0).toUpperCase()+a.slice(1)).join(""),i=H(n);return[n,t,i]}function Wo(e,n){let[t,i,a]=dr(e);for(let l of[t,t.toLowerCase(),i,a]){let c=n?.__importedComponents?.get(l);if(c!==void 0)return c}}function*qo(e,n,t={},i){let a=dr(e);if(a[0].startsWith("./")||a[0].startsWith("../")){yield Ae.resolve(Ae.dirname(n),`${a[0]}.stx`);return}let l=[...new Set(a.map((v)=>`${v}.stx`))],c=t.projectRoot||process.cwd(),y=[...i?.__originalFilePath?[Ae.join(Ae.dirname(i.__originalFilePath),"components")]:[],...t.componentsDir?[t.componentsDir]:[],Ae.join(Ae.dirname(n),"components"),Ae.resolve(c,"src/components"),Ae.resolve(c,"components"),...import.meta.dir?[Ae.resolve(import.meta.dir,"components")]:[]];for(let v of new Set(y)){for(let R of l)yield Ae.join(v,R);try{for(let R of An.readdirSync(v,{withFileTypes:!0}))if(R.isDirectory())for(let T of l)yield Ae.join(v,R.name,T)}catch{}}}function pr(e,n,t={},i){let a=Wo(e,i);if(a!==void 0)return a;for(let l of qo(e,n,t,i))try{if(An.statSync(l,{throwIfNoEntry:!1})?.isFile())return l}catch{}return null}import Ys from"fs";import ce from"path";import ht from"path";import qt from"fs";var Ro=new Set(["touchstart","touchmove","wheel","mousewheel"]);function os(e,n){if(n.passive)return!0;if(n.prevent||n.nonpassive)return!1;return Ro.has(e.toLowerCase())}var xr=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","wheel","keydown","keyup","keypress","submit","reset","change","input","focus","blur","focusin","focusout","select","invalid","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","scroll","resize","load","error","abort","animationstart","animationend","animationiteration","transitionstart","transitionend","transitionrun","transitioncancel","mounted","unmounted"]),_r={enter:"Enter",tab:"Tab",delete:"Delete",backspace:"Backspace",esc:"Escape",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown"},Co=new Set(["ctrl","alt","shift","meta"]),Er={left:0,middle:1,right:2};function Sr(e){let n={prevent:!1,stop:!1,once:!1,capture:!1,self:!1,passive:!1,nonpassive:!1,keys:[],systemKeys:[],mouse:null,debounce:null,throttle:null};for(let t of e){let i=t.toLowerCase();if(i==="prevent")n.prevent=!0;else if(i==="stop")n.stop=!0;else if(i==="once")n.once=!0;else if(i==="capture")n.capture=!0;else if(i==="self")n.self=!0;else if(i==="passive")n.passive=!0;else if(i==="nonpassive")n.nonpassive=!0;else if(Co.has(i))n.systemKeys.push(i);else if(i in Er)n.mouse=i;else if(i in _r||/^[a-z]$/.test(i))n.keys.push(_r[i]||i.toUpperCase());else if(i.startsWith("debounce")){let a=i.match(/debounce(?:\.(\d+))?/);n.debounce=a?.[1]?Number.parseInt(a[1],10):300}else if(i.startsWith("throttle")){let a=i.match(/throttle(?:\.(\d+))?/);n.throttle=a?.[1]?Number.parseInt(a[1],10):300}}return n}function kr(e,n=""){let t=[],i=0,a=/<([a-z][a-z0-9-]*)\s+([^>]*@[a-z][^>]*)>/gi,l;while((l=a.exec(e))!==null){let[c,y,v]=l,R=l.index,T=R+c.length,D=`__stx_evt_${n}${i++}`,N=[],j=/@([a-z][a-z0-9.]*)\s*=\s*"([^"]*)"/gi,P;while((P=j.exec(v))!==null){let[,G,F]=P,L=G.split("."),Q=L[0];if(!xr.has(Q))continue;N.push({attribute:`@${G}`,event:Q,handler:F,modifiers:Sr(L.slice(1)),elementId:D})}let M=/@([a-z][a-z0-9.]*)\s*=\s*'([^']*)'/gi;while((P=M.exec(v))!==null){let[,G,F]=P,L=G.split("."),Q=L[0];if(!xr.has(Q))continue;N.push({attribute:`@${G}`,event:Q,handler:F,modifiers:Sr(L.slice(1)),elementId:D})}if(N.length>0)t.push({originalTag:c,elementId:D,events:N,startIndex:R,endIndex:T})}return t}function To(e){let n=[],{modifiers:t}=e;if(t.self)n.push("if ($event.target !== $el) return");for(let i of t.systemKeys)n.push(`if (!$event.${i}Key) return`);if(t.keys.length>0){let i=t.keys.map((a)=>`$event.key === '${a}'`).join(" || ");n.push(`if (!(${i})) return`)}if(t.mouse!==null){let i=Er[t.mouse];n.push(`if ($event.button !== ${i}) return`)}if(t.prevent)n.push("$event.preventDefault()");if(t.stop)n.push("$event.stopPropagation()");return n.join("; ")}function Ao(e,n){let t=e;if(n.debounce!==null)t=`__stx_debounce(() => { ${t} }, ${n.debounce})`;else if(n.throttle!==null)t=`__stx_throttle(() => { ${t} }, ${n.throttle})`;return t}function as(e){let n=e.trim();if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(n))return e;return`if (typeof ${n} === 'function' && !${n}._isSignal) ${n}($event);`}function Io(e){let{modifiers:n}=e,t=e.elementId.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),i=To(e),a=Ao(as(e.handler),n),l=[];if(n.once)l.push("once: true");if(n.capture)l.push("capture: true");if(os(e.event,n))l.push("passive: true");let c=l.length>0?`, { ${l.join(", ")} }`:"",y=a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");if(e.event==="mounted")return`
2
+ import{Fe,vn,Ns,ci,O}from"./chunk-rbmt5w9v.js";import{bn}from"./chunk-vpr2m2xj.js";import{Rr,_,Kc,ot,hi,Gc}from"./chunk-ez35607j.js";import{A}from"./chunk-zn3c0ew5.js";import{Ds,u,f,Mt,d,q,B,b,Bs,ke,He,Fs}from"./chunk-zkx2m308.js";import{s,ge}from"./chunk-05qf3e2p.js";import{g}from"./chunk-0dve54ne.js";import{K}from"./chunk-xaddgvkx.js";import Xe from"path";import kt from"process";import{AsyncLocalStorage as Eo}from"async_hooks";var cr=new Eo;function fn(e){return e.__stx_server_data??={pending:new Map,values:new Map}}function lr(e,n){return cr.run(fn(e),n)}async function ur(e,n){let t=cr.getStore();if(!t)throw Error("useServerData must run inside a <script server> render");if(typeof e!=="string"||!e.trim())throw TypeError("useServerData requires a non-empty string key");let i=t.pending.get(e);if(i)return i;let a=Promise.resolve().then(n).then((l)=>{let c=JSON.stringify(l,(v,R)=>{if(R===void 0||typeof R==="function"||typeof R==="symbol"||typeof R==="bigint"||typeof R==="number"&&!Number.isFinite(R))throw TypeError(`useServerData(${JSON.stringify(e)}) requires JSON-serializable data`);if(R&&typeof R==="object"&&!Array.isArray(R)&&Object.getPrototypeOf(R)!==Object.prototype&&Object.getPrototypeOf(R)!==null)throw TypeError(`useServerData(${JSON.stringify(e)}) requires JSON-serializable data`);return R}),y=JSON.parse(c);return t.values.set(e,y),y}).catch((l)=>{throw t.pending.delete(e),l});return t.pending.set(e,a),a}function vr(e){let n=e.__stx_server_data;if(!n?.values.size)return"";return`<script data-stx-scoped data-stx-server-data type="application/json">${JSON.stringify(Object.fromEntries(n.values)).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}</script>`}function z(e,n=!1){let t=s(e),i=[],a=new Set,l=0,c=0,y=t.length,v=()=>{if(l!==0)return;let R=t.slice(c).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?:[!:;,\n]|=(?!=)|$)/);if(R){if(n&&R[1]==="const")return;let P=R[2];if(!a.has(P))i.push(P),a.add(P);return}let T=t.slice(c).match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(T){if(n&&t.slice(c).startsWith("const"))return;T[1].split(",").forEach((P)=>{let M=P.trim();if(!M)return;let G=M.indexOf(":"),L=(G>=0?M.slice(G+1).trim():M).split(/[\s=]/)[0];if(L&&!a.has(L))i.push(L),a.add(L)});return}let D=t.slice(c).match(/^(?:const|let|var)\s+\[([^\]]+)\]\s*=/);if(D){if(n&&t.slice(c).startsWith("const"))return;D[1].split(",").forEach((P)=>{let M=P.trim().replace(/^\.\.\./,"");if(!M)return;let G=M.split(/[\s=]/)[0];if(G&&!a.has(G))i.push(G),a.add(G)});return}if(n)return;let N=t.slice(c).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(N){let P=N[1];if(!a.has(P))i.push(P),a.add(P);return}let j=t.slice(c).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(j){let P=j[1];if(!a.has(P))i.push(P),a.add(P)}};while(c<y){if(t[c]==="{"){l++,c++;continue}if(t[c]==="}"){l--,c++;continue}if(l===0&&/[a-z]/i.test(t[c])&&(c===0||/\s|[;{}()]/.test(t[c-1])))v();c++}return i.join(", ")}function ws(e){return`{ enumerable: true, configurable: true, get() { return ${e} }, set(__stxValue_${e}) { ${e} = __stxValue_${e} } }`}function ko(e,n=z(e).split(",").map((t)=>t.trim()).filter(Boolean)){let t=new Set(z(e,!0).split(",").map((i)=>i.trim()));return n.map((i)=>t.has(i)?`get ${i}() { return ${i} }, set ${i}(__stxValue_${i}) { ${i} = __stxValue_${i} }`:i).join(", ")}function xs(e,n){let t=`{ ${ko(e,n)} }`;return z(e).split(",").some((i)=>i.trim()==="__stxLiveBindings")?`Object.defineProperties(${t}, Object.getOwnPropertyDescriptors(__stxLiveBindings))`:t}import An from"fs";import Ae from"path";function H(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}var fr=new Map;function Ss(e,n=!0){let t=fr.get(e);if(n&&t)return t;let i=new Map,a=[Ae.join(e,"src"),Ae.join(e,"dist"),e];function l(c,y){if(y>6)return;let v;try{v=An.readdirSync(c,{withFileTypes:!0})}catch{return}for(let R of v){let T=Ae.join(c,R.name);if(R.isDirectory()){if(R.name==="node_modules"||R.name.startsWith("."))continue;l(T,y+1)}else if(R.isFile()&&R.name.endsWith(".stx")){let D=R.name.slice(0,-4);if(!i.has(D))i.set(D,T);let N=D.toLowerCase();if(!i.has(N))i.set(N,T);let j=H(D);if(!i.has(j))i.set(j,T)}}}for(let c of a)if(l(c,0),i.size>0)break;if(n)fr.set(e,i);return i}function ks(e,n){if(e.startsWith(".")||e.startsWith("/"))return null;let t=n;while(!0){let i=Ae.join(t,"node_modules",e);try{if(An.statSync(i).isDirectory())return i}catch{}let a=Ae.dirname(t);if(a===t)return null;t=a}}function _s(e,n,t={}){return[Ae.resolve(Ae.dirname(n),`${e}.stx`),Ae.resolve(Ae.dirname(n),e),Ae.resolve(t.componentsDir||"components",`${e}.stx`),Ae.resolve(t.componentsDir||"components",e),e.endsWith(".stx")?e:`${e}.stx`]}function dr(e){let n=e.endsWith(".stx")?e.slice(0,-4):e,t=n.split("-").map((a)=>a.charAt(0).toUpperCase()+a.slice(1)).join(""),i=H(n);return[n,t,i]}function Wo(e,n){let[t,i,a]=dr(e);for(let l of[t,t.toLowerCase(),i,a]){let c=n?.__importedComponents?.get(l);if(c!==void 0)return c}}function*qo(e,n,t={},i){let a=dr(e);if(a[0].startsWith("./")||a[0].startsWith("../")){yield Ae.resolve(Ae.dirname(n),`${a[0]}.stx`);return}let l=[...new Set(a.map((v)=>`${v}.stx`))],c=t.projectRoot||process.cwd(),y=[...i?.__originalFilePath?[Ae.join(Ae.dirname(i.__originalFilePath),"components")]:[],...t.componentsDir?[t.componentsDir]:[],Ae.join(Ae.dirname(n),"components"),Ae.resolve(c,"src/components"),Ae.resolve(c,"components"),...import.meta.dir?[Ae.resolve(import.meta.dir,"components")]:[]];for(let v of new Set(y)){for(let R of l)yield Ae.join(v,R);try{for(let R of An.readdirSync(v,{withFileTypes:!0}))if(R.isDirectory())for(let T of l)yield Ae.join(v,R.name,T)}catch{}}}function pr(e,n,t={},i){let a=Wo(e,i);if(a!==void 0)return a;for(let l of qo(e,n,t,i))try{if(An.statSync(l,{throwIfNoEntry:!1})?.isFile())return l}catch{}return null}import Ys from"fs";import ce from"path";import ht from"path";import qt from"fs";var Ro=new Set(["touchstart","touchmove","wheel","mousewheel"]);function os(e,n){if(n.passive)return!0;if(n.prevent||n.nonpassive)return!1;return Ro.has(e.toLowerCase())}var xr=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","wheel","keydown","keyup","keypress","submit","reset","change","input","focus","blur","focusin","focusout","select","invalid","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","scroll","resize","load","error","abort","animationstart","animationend","animationiteration","transitionstart","transitionend","transitionrun","transitioncancel","mounted","unmounted"]),_r={enter:"Enter",tab:"Tab",delete:"Delete",backspace:"Backspace",esc:"Escape",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown"},Co=new Set(["ctrl","alt","shift","meta"]),Er={left:0,middle:1,right:2};function Sr(e){let n={prevent:!1,stop:!1,once:!1,capture:!1,self:!1,passive:!1,nonpassive:!1,keys:[],systemKeys:[],mouse:null,debounce:null,throttle:null};for(let t of e){let i=t.toLowerCase();if(i==="prevent")n.prevent=!0;else if(i==="stop")n.stop=!0;else if(i==="once")n.once=!0;else if(i==="capture")n.capture=!0;else if(i==="self")n.self=!0;else if(i==="passive")n.passive=!0;else if(i==="nonpassive")n.nonpassive=!0;else if(Co.has(i))n.systemKeys.push(i);else if(i in Er)n.mouse=i;else if(i in _r||/^[a-z]$/.test(i))n.keys.push(_r[i]||i.toUpperCase());else if(i.startsWith("debounce")){let a=i.match(/debounce(?:\.(\d+))?/);n.debounce=a?.[1]?Number.parseInt(a[1],10):300}else if(i.startsWith("throttle")){let a=i.match(/throttle(?:\.(\d+))?/);n.throttle=a?.[1]?Number.parseInt(a[1],10):300}}return n}function kr(e,n=""){let t=[],i=0,a=/<([a-z][a-z0-9-]*)\s+([^>]*@[a-z][^>]*)>/gi,l;while((l=a.exec(e))!==null){let[c,y,v]=l,R=l.index,T=R+c.length,D=`__stx_evt_${n}${i++}`,N=[],j=/@([a-z][a-z0-9.]*)\s*=\s*"([^"]*)"/gi,P;while((P=j.exec(v))!==null){let[,G,F]=P,L=G.split("."),Q=L[0];if(!xr.has(Q))continue;N.push({attribute:`@${G}`,event:Q,handler:F,modifiers:Sr(L.slice(1)),elementId:D})}let M=/@([a-z][a-z0-9.]*)\s*=\s*'([^']*)'/gi;while((P=M.exec(v))!==null){let[,G,F]=P,L=G.split("."),Q=L[0];if(!xr.has(Q))continue;N.push({attribute:`@${G}`,event:Q,handler:F,modifiers:Sr(L.slice(1)),elementId:D})}if(N.length>0)t.push({originalTag:c,elementId:D,events:N,startIndex:R,endIndex:T})}return t}function To(e){let n=[],{modifiers:t}=e;if(t.self)n.push("if ($event.target !== $el) return");for(let i of t.systemKeys)n.push(`if (!$event.${i}Key) return`);if(t.keys.length>0){let i=t.keys.map((a)=>`$event.key === '${a}'`).join(" || ");n.push(`if (!(${i})) return`)}if(t.mouse!==null){let i=Er[t.mouse];n.push(`if ($event.button !== ${i}) return`)}if(t.prevent)n.push("$event.preventDefault()");if(t.stop)n.push("$event.stopPropagation()");return n.join("; ")}function Ao(e,n){let t=e;if(n.debounce!==null)t=`__stx_debounce(() => { ${t} }, ${n.debounce})`;else if(n.throttle!==null)t=`__stx_throttle(() => { ${t} }, ${n.throttle})`;return t}function as(e){let n=e.trim();if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(n))return e;return`if (typeof ${n} === 'function' && !${n}._isSignal) ${n}($event);`}function Io(e){let{modifiers:n}=e,t=e.elementId.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),i=To(e),a=Ao(as(e.handler),n),l=[];if(n.once)l.push("once: true");if(n.capture)l.push("capture: true");if(os(e.event,n))l.push("passive: true");let c=l.length>0?`, { ${l.join(", ")} }`:"",y=a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");if(e.event==="mounted")return`
3
3
  (function() {
4
4
  var $el = document.getElementById('${t}');
5
5
  if (!$el) return;
@@ -112,7 +112,7 @@ else {
112
112
  `)}
113
113
  })();
114
114
  </script>`}function Oo(e,n=""){let t=kr(e,n);if(t.length===0)return{template:e,bindings:[]};let i=e,a=[];for(let l=t.length-1;l>=0;l--){let c=t[l],y=c.originalTag;if(!y.includes(" id="))y=y.replace(/^<([a-z][a-z0-9-]*)/,`<$1 id="${c.elementId}"`);else{let v=y.match(/id=["']([^"']+)["']/);if(v)for(let R of c.events)R.elementId=v[1]}for(let v of c.events){let R=v.attribute.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),T=new RegExp(`\\s*${R}\\s*=\\s*"[^"]*"`,"g"),D=new RegExp(`\\s*${R}\\s*=\\s*'[^']*'`,"g");y=y.replace(T,""),y=y.replace(D,"")}i=i.slice(0,c.startIndex)+y+i.slice(c.endIndex),a.push(...c.events)}return{template:i,bindings:a}}function $r(e){let n=e.$uid;return typeof n==="string"&&n?`${n}_`:""}function pc(e,n,t){if(Gc(e))return e;if(n.__stx_sfc_mode){if(/x-data\s*=\s*["']/.test(e))return e;let{template:y,bindings:v}=Oo(e,$r(n)),R=n.__stx_event_bindings||[];return n.__stx_event_bindings=[...R,...v],y}let i=kr(e,$r(n));if(i.length===0)return e;let a=e;for(let y=i.length-1;y>=0;y--){let v=i[y],R=v.originalTag;if(!R.includes(" id="))R=R.replace(/^<([a-z][a-z0-9-]*)/,`<$1 id="${v.elementId}"`);else{let T=R.match(/id=["']([^"']+)["']/);if(T)for(let D of v.events)D.elementId=T[1]}for(let T of v.events){let D=T.attribute.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),N=new RegExp(`\\s*${D}\\s*=\\s*"[^"]*"`,"g"),j=new RegExp(`\\s*${D}\\s*=\\s*'[^']*'`,"g");R=R.replace(N,""),R=R.replace(j,"")}a=a.slice(0,v.startIndex)+R+a.slice(v.endIndex)}let l=Ko(i.flatMap((y)=>y.events)),c=a.lastIndexOf("</body>");if(c!==-1)a=a.slice(0,c)+l+`
115
- `+a.slice(c);else a+=l;return a}function Cr(e,n){let t=new Set;for(let i of e.split(",")){let a=i.trim().replace(/^\.\.\./,"").trim();if(!a)continue;if(n){let l=a.lastIndexOf(":");if(l!==-1)a=a.slice(l+1).trim()}if(a=a.split("=")[0].trim(),/^[A-Za-z_$][\w$]*$/.test(a))t.add(a)}return t}function Tt(e,n){let t=s(e),{depths:i,balanced:a}=ge(t),l=(y)=>!a||i[y]===0,c=new RegExp(`(?:^|[^\\w$.])((?:const|let|var|function|class)\\s+${n}\\b)`,"g");for(let y of t.matchAll(c)){let v=(y.index??0)+y[0].length-y[1].length;if(l(v))return!0}for(let y of t.matchAll(/(?:const|let|var)\s*\{([^}]*)\}/g))if(l(y.index??0)&&Cr(y[1],!0).has(n))return!0;for(let y of t.matchAll(/(?:const|let|var)\s*\[([^\]]*)\]/g))if(l(y.index??0)&&Cr(y[1],!1).has(n))return!0;return!1}var Tr="",In,lt=/^[A-Za-z_$][\w$]*$/,Po=new Set(["if","for","while","switch","with"]),Ar=["(","[","{"],Ir=[")","]","}"],Do=new Set(["const","let","var","return","if","for","while","do","switch","try","throw","export"]);function Mo(e){let n=s(e),t=[];for(let i of n.matchAll(/[A-Za-z_$][\w$]*|=>|\.\.\.|[^\s]/g)){let a=i.index??0;t.push({text:i[0],start:a,end:a+i[0].length})}return{code:n,tokens:t}}function cs(e){if(In&&e===Tr)return In;let{code:n,tokens:t}=Mo(e),i=new Map,a=[];for(let P=0;P<t.length;P++){let M=t[P].text;if(["(","[","{"].includes(M))a.push(P);else if([")","]","}"].includes(M)){let G=a.at(-1);if(G!==void 0&&["()","[]","{}"].includes(t[G].text+M))a.pop(),i.set(G,P),i.set(P,G)}}function l(P,M){let G=[],F=P;for(let L=P;L<M;L++){if(["(","[","{"].includes(t[L].text)&&(i.get(L)??M)<M){L=i.get(L);continue}if(t[L].text===",")G.push([F,L]),F=L+1}return G.push([F,M]),G}let c=[];function y(P,M,G,F=!1){if(t[P]?.text==="...")P++;if(P>=M)return;let L=t[P].text;if(lt.test(L)){if(G.add(L),G===T)c.push({name:L,token:P,functionScoped:F});return}if(L!=="{"&&L!=="[")return;let Q=i.get(P);if(Q===void 0||Q>=M)return;for(let[te,ne]of l(P+1,Q)){let ae=te;if(L==="{")for(let me=te;me<ne;me++){if(t[me].text===":"){ae=me+1;break}if(t[me].text==="=")break;if(["(","[","{"].includes(t[me].text)&&i.has(me))me=i.get(me)}y(ae,ne,G,F)}}function v(P,M){let G=new Set;for(let[F,L]of l(P,M))y(F,L,G);return G}function R(P){let M=P;for(;M<t.length;M++){let G=t[M].text;if(["(","[","{"].includes(G)&&i.has(M)){M=i.get(M);continue}if([",",";",")","]","}"].includes(G))break}return t[Math.max(P,M-1)]?.end??n.length}let T=new Set,D=[];for(let P=0;P<t.length;P++)if(t[P].text==="=>"){let M=P-1,G=M,F;if(t[M]?.text===")"&&i.has(M))G=i.get(M),F=v(G+1,M);else if(t[M]&&lt.test(t[M].text))F=new Set([t[M].text]);else continue;let L=P+1,Q=t[L]?.text==="{"&&i.has(L)?t[i.get(L)].end:R(L);D.push({start:t[G].start,end:Q,bodyStart:t[L]?.start??Q,functionBody:!0,names:F})}else if(t[P].text==="("&&i.has(P)){let M=t[P-1]?.text;if(!M||Po.has(M)||!lt.test(M)&&M!=="*"&&M!=="]")continue;let G=i.get(P),F=G+1;if(t[F]?.text===":"){F++;while(F<t.length&&!["{","=>",";","="].includes(t[F].text))F++}if(t[F]?.text!=="{"||!i.has(F))continue;D.push({start:t[P].start,end:t[i.get(F)].end,bodyStart:t[F].start,functionBody:M!=="catch",names:v(P+1,G)})}function N(P){let M=P;for(;M<t.length;M++){let G=t[M].text;if(Ar.includes(G)&&i.has(M)){M=i.get(M);continue}if(G===";"||Ir.includes(G))break;let F=t[M-1];if(M>P&&Do.has(G)&&F.text!==".")break;if(M>P&&/[\n\r]/.test(n.slice(F.end,t[M].start))&&(/^[\w$]+$/.test(F.text)||Ir.includes(F.text)||['"',"'","`"].includes(F.text))&&lt.test(G)&&!["in","of","instanceof"].includes(G))break}return M}let j=[];for(let P=0;P<t.length;P++){if(t[P].text!=="for")continue;let M=t[P+1]?.text==="await"?P+2:P+1;if(t[M]?.text!=="("||!i.has(M))continue;let G=i.get(M),F=G+1,L=t[F]?.text==="{"&&i.has(F)?i.get(F):N(F),Q=t[L]?.text===";"||t[L]?.text==="}"?t[L].end:t[Math.max(F,L-1)]?.end??n.length;j.push({headStart:M,headEnd:G,start:t[M].start,end:Q})}for(let P=0;P<t.length;P++){let M=t[P].text,G=t[P-1]?.text;if(G==="."||t[P+1]?.text===":")continue;if(G==="as"||G==="<")continue;if(M==="const"||M==="let"||M==="var"){let F=N(P+1),L=P+1,Q=!1,te=!1,ne=0;for(let ae=P+1;ae<=F;ae++){let me=t[ae]?.text;if(ae<F&&Ar.includes(me)&&i.has(ae)&&i.get(ae)<F){ae=i.get(ae);continue}if(ae<F&&me===":"&&!te)Q=!0;else if(ae<F&&me==="="&&ne===0)Q=!1,te=!0;else if(ae<F&&Q&&me==="<")ne++;else if(ae<F&&Q&&me===">"&&ne>0)ne--;else if(ae===F||me===","&&ne===0)y(L,ae,T,M==="var"),L=ae+1,Q=!1,te=!1}}else if(M==="function"||M==="class"){let F=P+1;if(t[F]?.text==="*")F++;if(t[F]&&lt.test(t[F].text)&&t[F].text!=="extends")T.add(t[F].text),c.push({name:t[F].text,token:F})}else if(M==="import"){let F=P+1;if(t[F]?.text==="*"&&t[F+1]?.text==="as")F+=2;let L=t[F]?.text;if(L&&lt.test(L)&&L!=="type"&&t[F+1]?.text!=="("&&t[F+1]?.text!==".")T.add(L),c.push({name:L,token:F,file:!0});let Q=t[F]?.text==="{"?F:t[F+1]?.text===","&&t[F+2]?.text==="{"?F+2:-1;if(Q!==-1&&i.has(Q)){let te=i.get(Q);for(let[ne,ae]of l(Q+1,te)){let me=ae-1;while(me>=ne&&!lt.test(t[me].text))me--;if(me>=ne&&t[me].text!=="type")c.push({name:t[me].text,token:me,file:!0})}}}}return Tr=e,In={code:n,scopes:D,loops:j,declarations:T,sites:c,tokens:t,pairs:i},In}function ls(e){let n=cs(e);return{code:n.code,shadows:(t,i)=>n.scopes.some((a)=>i>=a.start&&i<a.end&&a.names.has(t))}}function On(e){return new Set(cs(e).declarations)}function cn(e,n){let{scopes:t,loops:i,sites:a,tokens:l,pairs:c}=cs(e),y=Array.from({length:l.length},()=>-1),v=[];for(let j=0;j<l.length;j++){y[j]=v.length?v[v.length-1]:-1;let P=l[j].text;if(P==="{"&&c.has(j))v.push(j);else if(P==="}"&&v.length&&c.get(j)===v[v.length-1])v.pop()}let R=new Set,T=new Map;for(let j of a){if(!n.has(j.name))continue;R.add(j.token);let P=j.file?-1:y[j.token],M=P===-1?[0,Number.POSITIVE_INFINITY]:[l[P].start,l[c.get(P)].end];if(j.functionScoped){let F=l[j.token].start,L=t.filter((Q)=>Q.functionBody&&F>=Q.bodyStart&&F<Q.end).sort((Q,te)=>Q.end-Q.bodyStart-(te.end-te.bodyStart))[0];M=L?[L.bodyStart,L.end]:[0,Number.POSITIVE_INFINITY]}else if(!j.file){let F=i.filter((L)=>j.token>L.headStart&&j.token<L.headEnd).sort((L,Q)=>L.headEnd-L.headStart-(Q.headEnd-Q.headStart))[0];if(F)M=[F.start,F.end]}let G=T.get(j.name);if(G)G.push(M);else T.set(j.name,[M])}let D=new Set;for(let j=0;j<l.length;j++){if(l[j].text!=="import"||l[j-1]?.text===".")continue;let P=j+1;if(l[P]?.text==="type")P++;if(l[P]&&lt.test(l[P].text)&&l[P+1]?.text===",")P+=2;if(l[P]?.text==="{"&&c.has(P))for(let M=P+1;M<c.get(P);M++)D.add(M)}let N=new Set;for(let j=0;j<l.length;j++){let P=l[j].text;if(!n.has(P)||N.has(P)||R.has(j)||D.has(j))continue;let M=l[j-1]?.text;if(M==="#"||M==="."&&l[j-2]?.text!=="..")continue;if(l[j+1]?.text===":"&&(M==="{"||M===","))continue;let G=l[j].start;if(T.get(P)?.some(([F,L])=>G>=F&&G<L))continue;if(t.some((F)=>G>=F.start&&G<F.end&&F.names.has(P)))continue;N.add(P)}return N}var Pe="0.2.736";var Or=Symbol.for(`stx.lazy-module-promises.${Pe}`);function No(){let e=globalThis;return e[Or]??=new Map,e[Or]}function o(e,n){let t=No(),i=`${import.meta.url}\x00${e}`,a=t.get(i);if(a)return a;let l=n();return t.set(i,l),l.catch(()=>{if(t.get(i)===l)t.delete(i)}),l}var Lo=/<\/(script)/gi;function ln(e){if(!e||e.indexOf("</")===-1)return e;return e.replace(Lo,"<\\/$1")}import Mr from"fs";class U{cache=new Map;maxSize;options;sizes;bytes=0;constructor(e=100,n){this.maxSize=e,this.options=n??null,this.sizes=n?new Map:null}get byteSize(){return this.bytes}setMaxBytes(e){if(!this.options)return;this.options={...this.options,maxBytes:e};while(this.bytes>e&&this.cache.size>0){let n=this.cache.keys().next().value;if(n===void 0)break;this.delete(n)}}get(e){if(!this.cache.has(e))return;let n=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,n),n}set(e,n){if(this.cache.has(e))this.delete(e);let t=this.options?this.options.sizeOf(n):0;if(this.options&&t>this.options.maxBytes)return;while(this.cache.size>0&&(this.cache.size>=this.maxSize||this.options!==null&&this.bytes+t>this.options.maxBytes)){let i=this.cache.keys().next().value;if(i===void 0)break;this.delete(i)}if(this.cache.set(e,n),this.sizes)this.sizes.set(e,t),this.bytes+=t}has(e){return this.cache.has(e)}delete(e){if(this.sizes){let n=this.sizes.get(e);if(n!==void 0)this.bytes-=n,this.sizes.delete(e)}return this.cache.delete(e)}clear(){this.cache.clear(),this.sizes?.clear(),this.bytes=0}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}}var St=new Map,Bo=500;function $t(e,n){if(n?.includes("g"))return new RegExp(e,n);let t=`${e}:${n||""}`;if(!St.has(t)){if(St.size>=Bo){let i=St.keys().next().value;if(i)St.delete(i)}St.set(t,new RegExp(e,n))}return St.get(t)}class Pr{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(e){let n=Array.from(new Set(e)),t=n.sort().join(","),i=this.pool.find((y)=>y.context.join(",")===t);if(i)return i.func;let a=this.fnCache,l=this.fnCacheMaxSize,c=(...y)=>(v)=>{try{let R=`${t}:${v}`,T=a.get(R);if(!T){if(a.size>=l){let D=a.keys().next().value;if(D)a.delete(D)}T=Function(...n,`
115
+ `+a.slice(c);else a+=l;return a}function Cr(e,n){let t=new Set;for(let i of e.split(",")){let a=i.trim().replace(/^\.\.\./,"").trim();if(!a)continue;if(n){let l=a.lastIndexOf(":");if(l!==-1)a=a.slice(l+1).trim()}if(a=a.split("=")[0].trim(),/^[A-Za-z_$][\w$]*$/.test(a))t.add(a)}return t}function Tt(e,n){let t=s(e),{depths:i,balanced:a}=ge(t),l=(y)=>!a||i[y]===0,c=new RegExp(`(?:^|[^\\w$.])((?:const|let|var|function|class)\\s+${n}\\b)`,"g");for(let y of t.matchAll(c)){let v=(y.index??0)+y[0].length-y[1].length;if(l(v))return!0}for(let y of t.matchAll(/(?:const|let|var)\s*\{([^}]*)\}/g))if(l(y.index??0)&&Cr(y[1],!0).has(n))return!0;for(let y of t.matchAll(/(?:const|let|var)\s*\[([^\]]*)\]/g))if(l(y.index??0)&&Cr(y[1],!1).has(n))return!0;return!1}var Tr="",In,lt=/^[A-Za-z_$][\w$]*$/,Po=new Set(["if","for","while","switch","with"]),Ar=["(","[","{"],Ir=[")","]","}"],Do=new Set(["const","let","var","return","if","for","while","do","switch","try","throw","export"]);function Mo(e){let n=s(e),t=[];for(let i of n.matchAll(/[A-Za-z_$][\w$]*|=>|\.\.\.|[^\s]/g)){let a=i.index??0;t.push({text:i[0],start:a,end:a+i[0].length})}return{code:n,tokens:t}}function cs(e){if(In&&e===Tr)return In;let{code:n,tokens:t}=Mo(e),i=new Map,a=[];for(let P=0;P<t.length;P++){let M=t[P].text;if(["(","[","{"].includes(M))a.push(P);else if([")","]","}"].includes(M)){let G=a.at(-1);if(G!==void 0&&["()","[]","{}"].includes(t[G].text+M))a.pop(),i.set(G,P),i.set(P,G)}}function l(P,M){let G=[],F=P;for(let L=P;L<M;L++){if(["(","[","{"].includes(t[L].text)&&(i.get(L)??M)<M){L=i.get(L);continue}if(t[L].text===",")G.push([F,L]),F=L+1}return G.push([F,M]),G}let c=[];function y(P,M,G,F=!1){if(t[P]?.text==="...")P++;if(P>=M)return;let L=t[P].text;if(lt.test(L)){if(G.add(L),G===T)c.push({name:L,token:P,functionScoped:F});return}if(L!=="{"&&L!=="[")return;let Q=i.get(P);if(Q===void 0||Q>=M)return;for(let[te,ne]of l(P+1,Q)){let ae=te;if(L==="{")for(let me=te;me<ne;me++){if(t[me].text===":"){ae=me+1;break}if(t[me].text==="=")break;if(["(","[","{"].includes(t[me].text)&&i.has(me))me=i.get(me)}y(ae,ne,G,F)}}function v(P,M){let G=new Set;for(let[F,L]of l(P,M))y(F,L,G);return G}function R(P){let M=P;for(;M<t.length;M++){let G=t[M].text;if(["(","[","{"].includes(G)&&i.has(M)){M=i.get(M);continue}if([",",";",")","]","}"].includes(G))break}return t[Math.max(P,M-1)]?.end??n.length}let T=new Set,D=[];for(let P=0;P<t.length;P++)if(t[P].text==="=>"){let M=P-1,G=M,F;if(t[M]?.text===")"&&i.has(M))G=i.get(M),F=v(G+1,M);else if(t[M]&&lt.test(t[M].text))F=new Set([t[M].text]);else continue;let L=P+1,Q=t[L]?.text==="{"&&i.has(L)?t[i.get(L)].end:R(L);D.push({start:t[G].start,end:Q,bodyStart:t[L]?.start??Q,functionBody:!0,names:F})}else if(t[P].text==="("&&i.has(P)){let M=t[P-1]?.text;if(!M||Po.has(M)||!lt.test(M)&&M!=="*"&&M!=="]")continue;let G=i.get(P),F=G+1;if(t[F]?.text===":"){F++;while(F<t.length&&!["{","=>",";","="].includes(t[F].text))F++}if(t[F]?.text!=="{"||!i.has(F))continue;D.push({start:t[P].start,end:t[i.get(F)].end,bodyStart:t[F].start,functionBody:M!=="catch",names:v(P+1,G)})}function N(P){let M=P;for(;M<t.length;M++){let G=t[M].text;if(Ar.includes(G)&&i.has(M)){M=i.get(M);continue}if(G===";"||Ir.includes(G))break;let F=t[M-1];if(M>P&&Do.has(G)&&F.text!==".")break;if(M>P&&/[\n\r]/.test(n.slice(F.end,t[M].start))&&(/^[\w$]+$/.test(F.text)||Ir.includes(F.text)||['"',"'","`"].includes(F.text))&&lt.test(G)&&!["in","of","instanceof"].includes(G))break}return M}let j=[];for(let P=0;P<t.length;P++){if(t[P].text!=="for")continue;let M=t[P+1]?.text==="await"?P+2:P+1;if(t[M]?.text!=="("||!i.has(M))continue;let G=i.get(M),F=G+1,L=t[F]?.text==="{"&&i.has(F)?i.get(F):N(F),Q=t[L]?.text===";"||t[L]?.text==="}"?t[L].end:t[Math.max(F,L-1)]?.end??n.length;j.push({headStart:M,headEnd:G,start:t[M].start,end:Q})}for(let P=0;P<t.length;P++){let M=t[P].text,G=t[P-1]?.text;if(G==="."||t[P+1]?.text===":")continue;if(G==="as"||G==="<")continue;if(M==="const"||M==="let"||M==="var"){let F=N(P+1),L=P+1,Q=!1,te=!1,ne=0;for(let ae=P+1;ae<=F;ae++){let me=t[ae]?.text;if(ae<F&&Ar.includes(me)&&i.has(ae)&&i.get(ae)<F){ae=i.get(ae);continue}if(ae<F&&me===":"&&!te)Q=!0;else if(ae<F&&me==="="&&ne===0)Q=!1,te=!0;else if(ae<F&&Q&&me==="<")ne++;else if(ae<F&&Q&&me===">"&&ne>0)ne--;else if(ae===F||me===","&&ne===0)y(L,ae,T,M==="var"),L=ae+1,Q=!1,te=!1}}else if(M==="function"||M==="class"){let F=P+1;if(t[F]?.text==="*")F++;if(t[F]&&lt.test(t[F].text)&&t[F].text!=="extends")T.add(t[F].text),c.push({name:t[F].text,token:F})}else if(M==="import"){let F=P+1;if(t[F]?.text==="*"&&t[F+1]?.text==="as")F+=2;let L=t[F]?.text;if(L&&lt.test(L)&&L!=="type"&&t[F+1]?.text!=="("&&t[F+1]?.text!==".")T.add(L),c.push({name:L,token:F,file:!0});let Q=t[F]?.text==="{"?F:t[F+1]?.text===","&&t[F+2]?.text==="{"?F+2:-1;if(Q!==-1&&i.has(Q)){let te=i.get(Q);for(let[ne,ae]of l(Q+1,te)){let me=ae-1;while(me>=ne&&!lt.test(t[me].text))me--;if(me>=ne&&t[me].text!=="type")c.push({name:t[me].text,token:me,file:!0})}}}}return Tr=e,In={code:n,scopes:D,loops:j,declarations:T,sites:c,tokens:t,pairs:i},In}function ls(e){let n=cs(e);return{code:n.code,shadows:(t,i)=>n.scopes.some((a)=>i>=a.start&&i<a.end&&a.names.has(t))}}function On(e){return new Set(cs(e).declarations)}function cn(e,n){let{scopes:t,loops:i,sites:a,tokens:l,pairs:c}=cs(e),y=Array.from({length:l.length},()=>-1),v=[];for(let j=0;j<l.length;j++){y[j]=v.length?v[v.length-1]:-1;let P=l[j].text;if(P==="{"&&c.has(j))v.push(j);else if(P==="}"&&v.length&&c.get(j)===v[v.length-1])v.pop()}let R=new Set,T=new Map;for(let j of a){if(!n.has(j.name))continue;R.add(j.token);let P=j.file?-1:y[j.token],M=P===-1?[0,Number.POSITIVE_INFINITY]:[l[P].start,l[c.get(P)].end];if(j.functionScoped){let F=l[j.token].start,L=t.filter((Q)=>Q.functionBody&&F>=Q.bodyStart&&F<Q.end).sort((Q,te)=>Q.end-Q.bodyStart-(te.end-te.bodyStart))[0];M=L?[L.bodyStart,L.end]:[0,Number.POSITIVE_INFINITY]}else if(!j.file){let F=i.filter((L)=>j.token>L.headStart&&j.token<L.headEnd).sort((L,Q)=>L.headEnd-L.headStart-(Q.headEnd-Q.headStart))[0];if(F)M=[F.start,F.end]}let G=T.get(j.name);if(G)G.push(M);else T.set(j.name,[M])}let D=new Set;for(let j=0;j<l.length;j++){if(l[j].text!=="import"||l[j-1]?.text===".")continue;let P=j+1;if(l[P]?.text==="type")P++;if(l[P]&&lt.test(l[P].text)&&l[P+1]?.text===",")P+=2;if(l[P]?.text==="{"&&c.has(P))for(let M=P+1;M<c.get(P);M++)D.add(M)}let N=new Set;for(let j=0;j<l.length;j++){let P=l[j].text;if(!n.has(P)||N.has(P)||R.has(j)||D.has(j))continue;let M=l[j-1]?.text;if(M==="#"||M==="."&&l[j-2]?.text!=="..")continue;if(l[j+1]?.text===":"&&(M==="{"||M===","))continue;let G=l[j].start;if(T.get(P)?.some(([F,L])=>G>=F&&G<L))continue;if(t.some((F)=>G>=F.start&&G<F.end&&F.names.has(P)))continue;N.add(P)}return N}var Pe="0.2.739";var Or=Symbol.for(`stx.lazy-module-promises.${Pe}`);function No(){let e=globalThis;return e[Or]??=new Map,e[Or]}function o(e,n){let t=No(),i=`${import.meta.url}\x00${e}`,a=t.get(i);if(a)return a;let l=n();return t.set(i,l),l.catch(()=>{if(t.get(i)===l)t.delete(i)}),l}var Lo=/<\/(script)/gi;function ln(e){if(!e||e.indexOf("</")===-1)return e;return e.replace(Lo,"<\\/$1")}import Mr from"fs";class U{cache=new Map;maxSize;options;sizes;bytes=0;constructor(e=100,n){this.maxSize=e,this.options=n??null,this.sizes=n?new Map:null}get byteSize(){return this.bytes}setMaxBytes(e){if(!this.options)return;this.options={...this.options,maxBytes:e};while(this.bytes>e&&this.cache.size>0){let n=this.cache.keys().next().value;if(n===void 0)break;this.delete(n)}}get(e){if(!this.cache.has(e))return;let n=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,n),n}set(e,n){if(this.cache.has(e))this.delete(e);let t=this.options?this.options.sizeOf(n):0;if(this.options&&t>this.options.maxBytes)return;while(this.cache.size>0&&(this.cache.size>=this.maxSize||this.options!==null&&this.bytes+t>this.options.maxBytes)){let i=this.cache.keys().next().value;if(i===void 0)break;this.delete(i)}if(this.cache.set(e,n),this.sizes)this.sizes.set(e,t),this.bytes+=t}has(e){return this.cache.has(e)}delete(e){if(this.sizes){let n=this.sizes.get(e);if(n!==void 0)this.bytes-=n,this.sizes.delete(e)}return this.cache.delete(e)}clear(){this.cache.clear(),this.sizes?.clear(),this.bytes=0}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}}var St=new Map,Bo=500;function $t(e,n){if(n?.includes("g"))return new RegExp(e,n);let t=`${e}:${n||""}`;if(!St.has(t)){if(St.size>=Bo){let i=St.keys().next().value;if(i)St.delete(i)}St.set(t,new RegExp(e,n))}return St.get(t)}class Pr{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(e){let n=Array.from(new Set(e)),t=n.sort().join(","),i=this.pool.find((y)=>y.context.join(",")===t);if(i)return i.func;let a=this.fnCache,l=this.fnCacheMaxSize,c=(...y)=>(v)=>{try{let R=`${t}:${v}`,T=a.get(R);if(!T){if(a.size>=l){let D=a.keys().next().value;if(D)a.delete(D)}T=Function(...n,`
116
116
  'use strict';
117
117
  try {
118
118
  return ${v};
@@ -193,7 +193,7 @@ else {
193
193
  // STX: auto-generated event bindings
194
194
  ${e.map((t,i)=>da(t,i)).join(`
195
195
  `)}`}function zr(e){let n=[],t=new Set,i=e.replace(/^\s*import\s+.*$/gm,""),a=0,l=i.length,c=0;while(c<l){let y=i[c];if(y==="'"||y==='"'||y==="`"){let v=y;if(c++,v==="`"){let R=0;while(c<l){if(i[c]==="\\"){c+=2;continue}if(i[c]==="`"&&R===0){c++;break}if(i[c]==="$"&&i[c+1]==="{"){R++,c+=2;continue}if(i[c]==="}"&&R>0){R--,c++;continue}c++}}else while(c<l){if(i[c]==="\\"){c+=2;continue}if(i[c]===v){c++;break}c++}continue}if(y==="/"&&i[c+1]==="/"){while(c<l&&i[c]!==`
196
- `)c++;continue}if(y==="/"&&i[c+1]==="*"){c+=2;while(c<l-1&&!(i[c]==="*"&&i[c+1]==="/"))c++;c+=2;continue}if(y==="{"){a++,c++;continue}if(y==="}"){a--,c++;continue}if(a===0){let v=i.slice(c),R=v.match(/^(?:const|let|var)\s+([a-zA-Z_$]\w*)\s*(?::[^=]*)?=/);if(R){let N=R[1];if(!N.startsWith("_")&&!t.has(N))n.push(N),t.add(N);c+=R[0].length;continue}let T=v.match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(T){T[1].split(",").forEach((N)=>{let j=N.trim(),P=j.indexOf(":"),M=P>=0?j.slice(P+1).trim().split(/[\s=]/)[0]:j.split(/[\s=]/)[0];if(M&&!M.startsWith("_")&&!t.has(M))n.push(M),t.add(M)}),c+=T[0].length;continue}let D=v.match(/^(?:async\s+)?function\s+([a-zA-Z_$]\w*)/);if(D){let N=D[1];if(!N.startsWith("_")&&!t.has(N))n.push(N),t.add(N);c+=D[0].length;continue}}c++}return n}var ga=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"]);function ma(e){let n=new Set,t=/[a-zA-Z_$][a-zA-Z0-9_$]*/g;function i(N){let j;while((j=t.exec(N))!==null){let P=j[0];if(!ga.has(P))n.add(P)}}let a=/\{\{([\s\S]*?)\}\}/g,l;while((l=a.exec(e))!==null)i(l[1]);let c=/:[a-z][\w.-]*\s*=\s*"([^"]*)"/gi;while((l=c.exec(e))!==null)i(l[1]);let y=/:[a-z][\w.-]*\s*=\s*'([^']*)'/gi;while((l=y.exec(e))!==null)i(l[1]);let v=/@[a-z]+(?:\.[a-z]+)*\s*=\s*"([^"]*)"/gi;while((l=v.exec(e))!==null)i(l[1]);let R=/@[a-z]+(?:\.[a-z]+)*\s*=\s*'([^']*)'/gi;while((l=R.exec(e))!==null)i(l[1]);let T=/@model\s*=\s*["']([^"']*)["']/gi;while((l=T.exec(e))!==null)i(l[1]);let D=/@for\s*=\s*["'][^"']*\bin\s+([^"']+)["']/gi;while((l=D.exec(e))!==null)i(l[1]);return n}async function Me(e,n={}){let t=e,i="",a=!1,l=[],c=ti(t,{filePath:n.filePath,projectRoot:n.projectRoot});t=c.code;let y=ni(c.styles),v=Ot(t);t=v.code,l=[...v.imports,...v.models];let{hasUserImports:R,bundleClientScript:T}=await o("stx/client-script-bundler",()=>import("./chunk-a0c2qg2b.js"));if(R(t))t=await T(t,n.filePath||"",{projectRoot:n.projectRoot,minify:n.production}),a=!0;if(n.autoImports!==!1){let Q=Pc(t);t=Q.code,i=Ic(Q.stxImports,Q.browserImports.filter((te)=>!l.includes(te)))}if(i=`${mn(t,n.serverData)}${i}`,t=A(t),!a&&Le(n.attrs||""))t=je(t);let D=pa(n.eventBindings||[]),N=(n.attrs||"").trim(),j=/\btype\s*=\s*["']module["']/i.test(N),P=n.instanceId?` data-stx-instance="${n.instanceId}"`:"";if(j){let Q=N.replace(/\btype\s*=\s*["']module["']/i,"").trim(),te=`type="module" data-stx-scoped${P}${Q?` ${Q}`:""}`;return`${y}<script ${te}>
196
+ `)c++;continue}if(y==="/"&&i[c+1]==="*"){c+=2;while(c<l-1&&!(i[c]==="*"&&i[c+1]==="/"))c++;c+=2;continue}if(y==="{"){a++,c++;continue}if(y==="}"){a--,c++;continue}if(a===0){let v=i.slice(c),R=v.match(/^(?:const|let|var)\s+([a-zA-Z_$]\w*)\s*(?::[^=]*)?=/);if(R){let N=R[1];if(!N.startsWith("_")&&!t.has(N))n.push(N),t.add(N);c+=R[0].length;continue}let T=v.match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(T){T[1].split(",").forEach((N)=>{let j=N.trim(),P=j.indexOf(":"),M=P>=0?j.slice(P+1).trim().split(/[\s=]/)[0]:j.split(/[\s=]/)[0];if(M&&!M.startsWith("_")&&!t.has(M))n.push(M),t.add(M)}),c+=T[0].length;continue}let D=v.match(/^(?:async\s+)?function\s+([a-zA-Z_$]\w*)/);if(D){let N=D[1];if(!N.startsWith("_")&&!t.has(N))n.push(N),t.add(N);c+=D[0].length;continue}}c++}return n}var ga=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"]);function ma(e){let n=new Set,t=/[a-zA-Z_$][a-zA-Z0-9_$]*/g;function i(N){let j;while((j=t.exec(N))!==null){let P=j[0];if(!ga.has(P))n.add(P)}}let a=/\{\{([\s\S]*?)\}\}/g,l;while((l=a.exec(e))!==null)i(l[1]);let c=/:[a-z][\w.-]*\s*=\s*"([^"]*)"/gi;while((l=c.exec(e))!==null)i(l[1]);let y=/:[a-z][\w.-]*\s*=\s*'([^']*)'/gi;while((l=y.exec(e))!==null)i(l[1]);let v=/@[a-z]+(?:\.[a-z]+)*\s*=\s*"([^"]*)"/gi;while((l=v.exec(e))!==null)i(l[1]);let R=/@[a-z]+(?:\.[a-z]+)*\s*=\s*'([^']*)'/gi;while((l=R.exec(e))!==null)i(l[1]);let T=/@model\s*=\s*["']([^"']*)["']/gi;while((l=T.exec(e))!==null)i(l[1]);let D=/@for\s*=\s*["'][^"']*\bin\s+([^"']+)["']/gi;while((l=D.exec(e))!==null)i(l[1]);return n}async function Me(e,n={}){let t=e,i="",a=!1,l=[],c=ti(t,{filePath:n.filePath,projectRoot:n.projectRoot});t=c.code;let y=ni(c.styles),v=Ot(t);t=v.code,l=[...v.imports,...v.models];let{hasUserImports:R,bundleClientScript:T}=await o("stx/client-script-bundler",()=>import("./chunk-d5mmgzqs.js"));if(R(t))t=await T(t,n.filePath||"",{projectRoot:n.projectRoot,minify:n.production}),a=!0;if(n.autoImports!==!1){let Q=Pc(t);t=Q.code,i=Ic(Q.stxImports,Q.browserImports.filter((te)=>!l.includes(te)))}if(i=`${mn(t,n.serverData)}${i}`,t=A(t),!a&&Le(n.attrs||""))t=je(t);let D=pa(n.eventBindings||[]),N=(n.attrs||"").trim(),j=/\btype\s*=\s*["']module["']/i.test(N),P=n.instanceId?` data-stx-instance="${n.instanceId}"`:"";if(j){let Q=N.replace(/\btype\s*=\s*["']module["']/i,"").trim(),te=`type="module" data-stx-scoped${P}${Q?` ${Q}`:""}`;return`${y}<script ${te}>
197
197
  ${ln(`${i}${t}
198
198
  ${D}`)}
199
199
  </script>`}let M=hi(e),G=/function __stx_setup_/.test(t),F=/\bstx\.mount\s*\(|\bstx\.mountEl\s*\(/.test(e);function L(Q){let te=Q.length>0?`
@@ -287,8 +287,8 @@ ${R.join(`
287
287
  `){let P=e[a];if(P==="\\"){a+=2;continue}if(P==="[")j=!0;else if(P==="]")j=!1;else if(P==="/"&&!j){a++;while(a<l&&/[a-z]/i.test(e[a]))a++;return}a++}},N=()=>{if(i!==0)return;let j=e.slice(a).match(/^(const|let|var)\s*\{([^}]+)\}\s*=/);if(j){let F=j[2].split(",").map((L)=>{let Q=L.trim().split(":");return Q[Q.length-1].trim()});for(let L of F)if(L&&/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(L)&&!t.has(L))n.push(L),t.add(L);return}let P=e.slice(a).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(P){let F=P[2];if(!t.has(F))n.push(F),t.add(F);return}let M=e.slice(a).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(M){let F=M[1];if(!t.has(F))n.push(F),t.add(F);return}let G=e.slice(a).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(G){let F=G[1];if(!t.has(F))n.push(F),t.add(F)}};while(a<l){if(v())continue;if(e[a]==="'"||e[a]==='"'){c(e[a]);continue}if(e[a]==="`"){y();continue}if(e[a]==="/"&&T()){D();continue}if(e[a]==="{"){i++,a++;continue}if(e[a]==="}"){i--,a++;continue}if(i===0&&/[a-z]/i.test(e[a])&&(a===0||/\s|[;{}()]/.test(e[a-1])))N();a++}return n}function wl(e){let n=[],t=0,i=0,a=null;for(let l=0;l<e.length;l++){let c=e[l];if(a){if(c==="\\"){l++;continue}if(c===a)a=null;continue}if(c==='"'||c==="'"||c==="`"){a=c;continue}if(c==="("||c==="["||c==="{")t++;else if(c===")"||c==="]"||c==="}")t--;else if(c===","&&t===0)n.push(e.slice(i,l)),i=l+1}if(i<e.length)n.push(e.slice(i));return n}function Sl(e){let n=0,t=null;for(let i=0;i<e.length;i++){let a=e[i];if(t){if(a==="\\"){i++;continue}if(a===t)t=null;continue}if(a==='"'||a==="'"||a==="`"){t=a;continue}if(a==="("||a==="["||a==="{")n++;else if(a===")"||a==="]"||a==="}")n--;else if(a==="="&&n===0){let l=e[i-1],c=e[i+1];if(l==="!"||l==="<"||l===">"||l==="=")continue;if(c==="="||c===">")continue;return i}}return-1}function $l(e,n){try{let t=/=\s*(?:withDefaults\s*\([\s\S]*?defineProps|defineProps)\b/.exec(e);if(!t)return;let i=t.index-1;while(i>=0&&/\s/.test(e[i]))i--;if(e[i]!=="}")return;let a=i,l=0,c=-1;for(;i>=0;i--){let v=e[i];if(v==="}")l++;else if(v==="{"){if(l--,l===0){c=i;break}}}if(c===-1)return;let y=e.slice(c+1,a);for(let v of wl(y)){let R=v.trim();if(!R||R.startsWith("..."))continue;let T=Sl(R);if(T===-1)continue;let D=R.slice(0,T).trim();if(!/^[A-Z_$][\w$]*$/i.test(D))continue;if(n[D]!==void 0)continue;let N=R.slice(T+1).trim();if(!N)continue;try{let j=Object.keys(n).filter(Mt),P=Function(...j,`"use strict"; return (${N});`);n[D]=P(...j.map((M)=>n[M]))}catch{}}}catch{}}var vl=new Set(["tr","td","th","thead","tbody","tfoot","caption","colgroup","col","option","optgroup","li","dt","dd","span"]);function Gf(e,n){let t=e.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)<([a-zA-Z][a-zA-Z0-9-]*)/s);if(!t)return null;let i=t[2].toLowerCase();if(!vl.has(i))return null;let a=new RegExp(`<\\/?${i}(?=[\\s/>])(?:[^>"']|"[^"]*"|'[^']*')*>`,"iy"),l=S(e,(R,T)=>(a.lastIndex=T,a.exec(R)?.index===T?a.lastIndex:-1));if(i==="span"&&/\sdata-stx-scope\s*=/.test(l[0]?.token||""))return null;let c=0,y=!1;for(let R of l){if(c+=R.token.startsWith("</")?-1:1,c<0)return null;if(c===0){if(e.slice(R.end).trim())return null;y=!0;break}}if(!y)return null;let v=t[0].length;return e.slice(0,v)+n+e.slice(v)}function ao(e,n){if(!e)return!1;return[...n.additionalComponentsDirs??[],...n.fallbackComponentsDir?[n.fallbackComponentsDir]:[]].some((i)=>{let a=ce.relative(ce.resolve(i),ce.resolve(e));return!a.startsWith("..")&&!ce.isAbsolute(a)})}async function wr(e,n,t,i,a){let l=e.endsWith(".stx")?e.slice(0,-4):e,c=(ne)=>ne.split("-").map((ae)=>ae.charAt(0).toUpperCase()+ae.slice(1)).join(""),y=t.__importedComponents;if(y){for(let ne of[l,l.toLowerCase(),c(l),H(l)])if(y.has(ne))return!0}let v=[...new Set([`${l}.stx`,`${c(l)}.stx`,`${H(l)}.stx`])],R=typeof a.root==="string"?ce.resolve(a.root):void 0,T=R??ce.dirname(i),D=[],N=(ne)=>{if(ne&&!D.includes(ne))D.push(ne)},j=t.__originalFilePath;if(j)N(ce.join(ce.dirname(j),"components"));if(ao(n,a))N(a._rootComponentsDir);N(n),N(a._rootComponentsDir),N(ce.join(ce.dirname(i),"components")),N(a.componentsDir);for(let ne of a.additionalComponentsDirs??[])N(ne);let P=a._targetComponentFallbackNames?.some((ne)=>ne.toLowerCase()===l.toLowerCase());if(!P)for(let ne of a._targetComponentDirs??[])N(ne);if(R)N(ce.resolve(R,"resources/views/components")),N(ce.resolve(R,"resources/components")),N(ce.resolve(R,"src/components")),N(ce.resolve(R,"components"));for(let ne of a._layerComponentDirs??[])N(ne);let M=a._pluginComponentDirs;if(Array.isArray(M))for(let ne of M)N(typeof ne==="string"?ne:null);if(N(a.fallbackComponentsDir),P)for(let ne of a._targetComponentDirs??[])N(ne);if(l.startsWith("./")||l.startsWith("../"))return r(ce.resolve(ce.dirname(i),`${l}.stx`));let G=eo(ce.resolve(import.meta.dir,"components")),F=D.map((ne)=>ce.isAbsolute(ne)?ne:ce.resolve(T,ne)),L=`${v.join("\x00")}\x00\x00${F.join("\x00")}`,Q=qs.get(L);if(Q!==void 0)return Q;let te=!1;e:for(let ne of F){if(eo(ne)===G)continue;for(let ae of v)if(await r(ce.join(ne,ae))){te=!0;break e}}return qs.set(L,te),te}function eo(e){let n=Xs.get(e);if(n!==void 0)return n;let t=e;try{t=Ys.realpathSync(e)}catch{}return Xs.set(e,t),t}function Xf(e){return e==="visible"||e==="idle"||e==="interaction"||e.startsWith("media:")}function Oc(e){if(!e)return!1;let n=e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"");return/\{\{[\s\S]*?\}\}|\{!![\s\S]*?!!\}/.test(n)}function El(e,n,t){if(!e.includes("{{")&&!e.includes("{!!"))return e;let i=(a,l)=>{let c;try{c=E(a,n)}catch{return l}if(c===void 0||c===null)return"";let y=String(c);if(/<\/style/i.test(y))return console.warn(`[stx] a <style> expression in ${t??"<unknown>"} evaluated to CSS containing a closing style tag, which would end the element early, so it was dropped rather than emitted.`),"";return y};return e.replace(/\{!!([\s\S]*?)!!\}/g,(a,l)=>i(l,a)).replace(/\{\{([\s\S]*?)\}\}/g,(a,l)=>i(l,a))}var to=new Set;function no(e,n,t,i){let a=`${e}\x00${n}\x00${i??""}`;if(!process.env.STX_DEBUG&&to.has(a))return;to.add(a);let l=n?` used in ${n}`:"",c=i?` Cause: ${i}.`:"",y=t.length>0?`
288
288
  searched:
289
289
  ${t.map((v)=>` - ${v}`).join(`
290
- `)}`:"";console.error(`[stx] component <${e}> could not be resolved${l}, so it rendered as nothing.${c}${y}`)}function so(e){return`<!-- stx: component "${e.replace(/--+/g,"-")}" could not be resolved; see the server log -->`}function si(e){let n=new Set,t=/\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useModel|useReactiveProp|useLocalStorage|useSessionStorage|keptState|useCookie|useDebouncedValue)\s*(?:<[^>]*>)?\s*\(/g;for(let i of e){let a;while((a=t.exec(i))!==null)n.add(a[1]);t.lastIndex=0}return[...n]}async function Be(e,n,t,i,a,l,c,y=new Set,v,R=tt(a),T,D=e){let{extractVariables:N}=await o("stx/variable-extractor",()=>import("./chunk-6t78kw7s.js")),j=y??new Set;if(j.has(e))return`[Circular component reference: ${e}]`;let P=new Set(j);P.add(e);let M=typeof n.client==="string"?n.client.trim():"";if("client"in n)delete n.client;let G=M&&M!=="load"&&Xf(M)?M:"";try{let F=(se)=>se.split("-").map((le)=>le.charAt(0).toUpperCase()+le.slice(1)).join(""),L=D.endsWith(".stx")?D.slice(0,-4):D,Q=null,te=a.__importedComponents;if(te){let se=[L,L.toLowerCase(),F(L),H(L)];for(let le of se)if(te.has(le)){Q=te.get(le);break}}let ne=[];if(!Q){let se=[`${L}.stx`,`${F(L)}.stx`,`${H(L)}.stx`],le=[...new Set(se)],_e=a.__originalFilePath,he=[];if(he.push(...c._layerComponentDirs??[]),_e){let be=ce.join(ce.dirname(_e),"components");he.push(be)}let Ve=c._rootComponentsDir;if(typeof Ve==="string"&&ao(i,c)&&!he.includes(Ve))he.push(Ve);if(i&&!he.includes(i))he.push(i);if(typeof Ve==="string"&&!he.includes(Ve))he.push(Ve);let Ce=ce.join(ce.dirname(l),"components");if(!he.includes(Ce))he.push(Ce);if(c.componentsDir&&c.componentsDir!==i&&!he.includes(c.componentsDir))he.push(c.componentsDir);for(let be of c.additionalComponentsDirs??[])if(be&&!he.includes(be))he.push(be);let ct=c._nativeHostAttrs&&/^(?:checkbox|switch)$/i.test(L),nt=(T?.events??[]).map((be)=>be.replace(/^@/,"").split(".")[0].toLowerCase().replace(/-/g,"")),Kt=Object.hasOwn(n,"checked")||Boolean(T?.reactiveProps?.includes("checked")),ts=Object.hasOwn(n,"value")||Boolean(T?.reactiveProps?.includes("value")),gt=!nt.includes("valuechange")&&(Kt||nt.includes("change")&&!ts),yt=c._nativeHostAttrs&&/^textinput$/i.test(L),_n=nt.includes("update:value")&&!nt.includes("input"),wn=c._nativeHostAttrs&&/^video$/i.test(L),Sn=Object.hasOwn(n,"src")||Boolean(T?.reactiveProps?.includes("src")),_t=Object.hasOwn(n,"source")||Boolean(T?.reactiveProps?.includes("source")),$n=wn&&Sn&&!_t&&(T?.events??[]).every((be)=>/^(?:play|pause|ended|timeupdate|loadedmetadata|loadstart|error)$/.test(be.replace(/^@/,"").split(".")[0])),mt=(be)=>Object.hasOwn(n,be)||Boolean(T?.reactiveProps?.includes(be)),En=c._nativeHostAttrs&&/^button$/i.test(L)&&(mt("symbol")||mt("iconOnly")||mt("title")&&!mt("label")&&!t.trim()),Zt=c._targetComponentFallbackNames?.some((be)=>be.toLowerCase()===L.toLowerCase())&&(!ct||gt)&&(!yt||_n)&&(!wn||$n)&&!En;for(let be of Zt?[]:c._targetComponentDirs??[])if(be&&!he.includes(be))he.push(be);let st=typeof c.root==="string"?ce.resolve(c.root):void 0,So=st??ce.dirname(l),wt=[];if(st)wt.push(ce.resolve(st,"resources/views/components")),wt.push(ce.resolve(st,"resources/components")),wt.push(ce.resolve(st,"src/components")),wt.push(ce.resolve(st,"components"));wt.push(ce.resolve(import.meta.dir,"components"));for(let be of wt)if(!he.includes(be))he.push(be);let rr=c._pluginComponentDirs;if(Array.isArray(rr)){for(let be of rr)if(typeof be==="string"&&!he.includes(be))he.push(be)}if(c.fallbackComponentsDir&&!he.includes(c.fallbackComponentsDir))he.push(c.fallbackComponentsDir);if(Zt){for(let be of c._targetComponentDirs??[])if(be&&!he.includes(be))he.push(be)}let ir=[...new Set(he.map((be)=>{if(!be)return be;return ce.isAbsolute(be)?be:ce.resolve(So,be)}))];he.length=0,he.push(...ir);let ns=`${L}\x00${l}\x00${ir.join("\x00")}`,ss=Kn.get(ns);if(ss)if(await r(ss))Q=ss;else Kn.delete(ns);if(!Q&&(L.startsWith("./")||L.startsWith("../")))Q=ce.resolve(ce.dirname(l),`${L}.stx`),ne.push(Q);else if(!Q)for(let be of he){if(!be)continue;for(let kn of le){let Rn=ce.join(be,kn);if(ne.push(Rn),await r(Rn)){Q=Rn;break}}if(Q)break;if(!Q)try{let kn=await import("fs");if(!kn.statSync(be,{throwIfNoEntry:!1})?.isDirectory())continue;let $o=8,rs=[{path:be,depth:0}];while(rs.length>0&&!Q){let Cn=rs.pop();if(Cn.depth>=$o)continue;let or;try{or=kn.readdirSync(Cn.path,{withFileTypes:!0})}catch{continue}for(let Tn of or){if(!Tn.isDirectory())continue;if(Tn.name==="node_modules"||Tn.name.startsWith("."))continue;let ar=ce.join(Cn.path,Tn.name);for(let vo of le){let is=ce.join(ar,vo);if(ne.push(is),await r(is)){Q=is;break}}if(Q)break;rs.push({path:ar,depth:Cn.depth+1})}}}catch{}if(Q)break}if(Q)Kn.set(ns,Q)}if(!Q||!await r(Q))return no(e,l,ne),so(e);v.add(Q);let ae;if(tn.has(Q))ae=tn.get(Q);else try{ae=await Bun.file(Q).text(),tn.set(Q,ae)}catch(se){let le=se instanceof Error?se.message:String(se);return no(e,l,[Q],le),so(e)}if(T)for(let se of new Set([...Object.keys(n),...T.reactiveProps??[]])){let le=se.toLowerCase();if(le.startsWith("aria-")||le.startsWith("data-"))continue;let _e=se.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\b${_e}\\b`).test(ae))T.declaredProps.add(se);if(new RegExp(`\\$props\\s*(?:\\.\\s*${_e}\\b|\\[\\s*['"]${_e}['"]\\s*\\])`).test(ae)||new RegExp(`\\buseReactiveProp\\s*\\(\\s*['"]${_e}['"]`).test(ae))T.consumedProps?.add(se)}let me=new Set(["__originalFilePath","__importedComponents",Mn,"__stx_client_signal_names","__stx_client_declared_names","__stx_runtime_config","__stxServeContext","__stx_scope_seq"]),Ee={};for(let[se,le]of Object.entries(a))if(!se.startsWith("__")||me.has(se))Ee[se]=le;let Te=R.length>0?{[Wn]:[...R]}:{},ze=t;if(t.includes("@include")){let{processIncludes:se}=await o("stx/includes",()=>import("./chunk-a64crz43.js"));ze=await se(t,a,l,c,v)}if(/<[A-Z][\w.-]*[\s/>]/.test(ze)){let{processComponents:se}=await o("stx/component-renderer",()=>import("./chunk-3n3vmhtd.js"));ze=await se(ze,{...a,__processedComponents:j,...Te},l,c,v)}let $e=[];if(Oc(ze)){let{processExpressions:se}=await o("stx/expressions",()=>import("./chunk-ph2yg39f.js")),le=a.__stx_signals_gate===void 0?{...a,__stx_signals_gate:!0,...Te}:R.length>0?{...a,...Te}:a;ze=se(ze,le,l);for(let _e of ze.matchAll(/\{\{([\s\S]*?)\}\}/g))$e.push(_e[1].trim())}let rt=X(ze),ut=[],Ct=rt.output.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(se,le)=>{let _e=rt.scripts[Number(le)]||"",he=_e.match(/^<script\b([^>]*)>/i)?.[1]||"",Ve=he.match(/\btype\s*=\s*["']([^"']+)["']/i)?.[1]?.toLowerCase(),Ce=!Ve||["module","text/javascript","application/javascript"].includes(Ve),ct=/\sdata-stx-(?:owner|instance)(?=[\s=/>])/i.test(` ${he}`);if(!/\bserver\b/i.test(he)&&Ce&&!ct)return ut.push(_e),"";return _e}),{extractSlotContent:Xn}=await o("stx/slots",()=>import("./chunk-vresxjg7.js")),ft=Xn(Ct),dt={};if(ft.defaultSlot?.trim())dt.default=ft.defaultSlot;for(let[se,le]of ft.namedSlots)dt[se]=le.content;let pt=a.__stx_scope_seq??={n:0,key:Is(String(a.__filename??l))},Dt=oo(e,process.cwd()),it=`stx_${(Dt.endsWith(".stx")?Dt.slice(0,-4):Dt).replace(/[^a-zA-Z0-9]/g,"_")}_${++pt.n}_${pt.key}`,We={...Ee,$uid:it,$native:c._nativeHostAttrs===!0,...n,props:n,slot:Ct,$slots:dt,__processedComponents:P,__sections:{},__stx_signals_gate:xe(ae)||Oc(t),__stx_preserved_client_expressions:[...Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[],...$e]};$l(ae,We);let jt=ae,sn=de(jt);if(sn)jt=sn.content.trim();let Jn=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Lt=[...ae.matchAll(Jn)];for(let[,se,le]of Lt)if(!/\bserver\b|\bsrc\s*=|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(se))Ie(le,Q,c.strict);let Ze=[],Bt=null,Gn=Lt.some((se)=>/\bserver\b/.test(se[1]||"")&&/\bcache\b/.test(se[1]||"")),bt=null,Je=null,zt=null,rn=0,Wt=null;if(hl(c),Gn&&Js>0){let se=xl({props:n,slot:ze,slotContext:t.trim()?bl(Ee):void 0,buildMode:c.buildMode??"",skipEventDirectives:c.skipEventDirectives===!0,native:c._nativeHostAttrs===!0,clientLoopNames:[...R].sort(),layers:c._layerGraph?.layers.map((le)=>le.configFile),uid:it});if(se!==null){bt=`${Q}\x00${x(ae)}\x00${se}`;let le=Zn.get(bt);if(le){for(let _e of le.dependencies)v.add(_e);if(qr(a,le.clientFactories),pt.n+=le.uidsConsumed,le.preservedClientExpressions.length>0){let _e=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[]);for(let he of le.preservedClientExpressions)_e.add(he);a.__stx_preserved_client_expressions=[..._e]}return le.output}Je=new Set(v),zt=Kr(a),rn=pt.n,Wt=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[])}}let Ft=new Set;for(let se of Lt){let le=se[1]||"",_e=se[2]||"",he=le.includes("server");if(Le(le)&&_e.trim())_e=je(_e);if(he&&_e){for(let Ce of Ne(_e))Ft.add(Ce);try{await N(_e,We,Q,{onFailure:(Ce)=>{if(Ce.kind!=="unknown")Bt=Ce.kind}})}catch(Ce){}}if(!he){let Ce=_e.replace(/^\s*const\s*\{[^}]+\}\s*=\s*window\.stx\s*;?\s*\n?/gm,""),ct=Ce.includes("{{")&&Ce.includes("}}"),nt=Ce.includes("{!!")&&Ce.includes("!!}");if(ct||nt)Ce=ii(Ce,We,Q);let Kt=le.replace(/\s*\bts\b/g,"").replace(/\s*\blang\s*=\s*["']?(ts|typescript)["']?/gi,"");Ze.push(`<script${Kt}>${Ce}</script>`)}}let qe=X(ae).output.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),Vt=qe?qe[1]:"",Yn=qe?qe[2]:"",Ge="",ee=Vt&&/\bscoped\b/i.test(Vt);if(qe)Ge=`<style${Vt}>${El(Yn,We,Q)}</style>`;let re=jt;if(re=re.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),qe)re=re.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");{let se=/@push\s*\(\s*['"]styles['"]\s*\)([\s\S]*?)@endpush/gi,le=[];if(re=re.replace(se,(_e,he)=>{let Ve=he.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i);if(Ve)le.push(`<style${Ve[1]}>${Ve[2]}</style>`);return""}),re=re.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/gi,""),le.length>0)Ge=`${Ge}${le.join(`
291
- `)}`}if(t&&re.includes("{{ text || slot }}"))re=re.replace(/\{\{\s*text\s*\|\|\s*slot\s*\}\}/g,()=>t);let{applySlots:ue}=await o("stx/slots",()=>import("./chunk-vresxjg7.js")),{defaultSlot:ye,namedSlots:Re}=ft,Ue=a.__stx_signals_gate===!0&&/\s(?:@[\w:.-]+|x-on:[\w:.-]+)\s*=/.test(Ct),Ye=c._nativeHostAttrs===!0&&Ze.length>0||Ue&&Ze.length>0||Ze.some((se)=>/\b(?:state|derived|effect|ref|useRef|reactive|computed|watch|watchEffect|useModel|useReactiveProp|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots)\s*(?:<[^<>()]*>)?\s*\(/.test(se)),Qn=(se)=>Ye?Ti(se,it):se,es=new Map([...Re].map(([se,le])=>[se,{...le,content:Qn(le.content)}]));re=await ue(re,Qn(ye),es,We,Ye?it:"");let on=si(Ze),Ut=(Array.isArray(We.__stx_client_signal_names)?We.__stx_client_signal_names:[]).filter((se)=>!Ft.has(se));if(on.length>0||Ut.length>0)We.__stx_client_signal_names=[...new Set([...Ut,...on])];else delete We.__stx_client_signal_names;let Ht=R.filter((se)=>!Ft.has(se)&&!(se in n));if(Ht.length>0)We[Wn]=Ht;let an={...c,_rootComponentsDir:c._rootComponentsDir||c.componentsDir,componentsDir:ce.dirname(Q),skipSignalsRuntime:!0,skipEventDirectives:c._nativeHostAttrs===!0||Ye||Ze.length===0,defaultLayout:void 0};We.__stxProcessingDepth=(a.__stxProcessingDepth||0)+1;let{processDirectives:xn}=await o("stx/process",()=>import("./chunk-n14zxb4g.js")),Qe=await xn(re,We,Q,an,v),at=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[]);for(let se of Qe.matchAll(/\{\{([\s\S]*?)\}\}/g))at.add(se[1].trim());if(at.size>0)a.__stx_preserved_client_expressions=[...at];let et=it,Ke=Qe;if(Ye){let se="";if(Object.keys(n).length>0)try{se=` data-stx-props="${Ks(JSON.stringify(n))}"`}catch{}let le=G?` stx-hydrate="${Ks(G)}"`:"",_e=Object.fromEntries(Object.entries(dt).map(([gt,yt])=>[gt,Boolean(yt)])),he=Object.keys(_e).length>0?` data-stx-slots="${Ks(JSON.stringify(_e))}"`:"",Ve=` data-stx-scope="${et}"${se}${he}${le}`,Ce=/^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<span(?=[\s/>])/i.test(Qe),ct=/^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<[^>]+\bdata-stx-layout-root(?:\s|=|>)/i.test(Qe),nt=Ce?"span":"div",Kt=ct&&c._nativeHostAttrs?' style="display:flex;flex:1;min-height:0;min-width:0"':Ce||ct?' style="display:contents"':"";Ke=Gf(Qe,Ve)??`<${nt}${Ve} data-stx-component-wrapper${Kt}>${Qe}</${nt}>`;let ts=await Promise.all(Ze.map(async(gt)=>{let yt=gt.match(/<script([^>]*)>([\s\S]*)<\/script>/i);if(!yt)return gt;let[,_n,wn]=yt,Sn=Gi(gt,We,Q);if(Sn!==null)return Sn;let _t=await Rl(wn,Q,c.buildMode==="compile"),$n=mn(_t.clientCode,De(We)),{vendorStyleTags:mt}=_t,En=$n?`function(__scopeId) {
290
+ `)}`:"";console.error(`[stx] component <${e}> could not be resolved${l}, so it rendered as nothing.${c}${y}`)}function so(e){return`<!-- stx: component "${e.replace(/--+/g,"-")}" could not be resolved; see the server log -->`}function si(e){let n=new Set,t=/\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useModel|useReactiveProp|useLocalStorage|useSessionStorage|keptState|useCookie|useDebouncedValue)\s*(?:<[^>]*>)?\s*\(/g;for(let i of e){let a;while((a=t.exec(i))!==null)n.add(a[1]);t.lastIndex=0}return[...n]}async function Be(e,n,t,i,a,l,c,y=new Set,v,R=tt(a),T,D=e){let{extractVariables:N}=await o("stx/variable-extractor",()=>import("./chunk-fn37y9w0.js")),j=y??new Set;if(j.has(e))return`[Circular component reference: ${e}]`;let P=new Set(j);P.add(e);let M=typeof n.client==="string"?n.client.trim():"";if("client"in n)delete n.client;let G=M&&M!=="load"&&Xf(M)?M:"";try{let F=(se)=>se.split("-").map((le)=>le.charAt(0).toUpperCase()+le.slice(1)).join(""),L=D.endsWith(".stx")?D.slice(0,-4):D,Q=null,te=a.__importedComponents;if(te){let se=[L,L.toLowerCase(),F(L),H(L)];for(let le of se)if(te.has(le)){Q=te.get(le);break}}let ne=[];if(!Q){let se=[`${L}.stx`,`${F(L)}.stx`,`${H(L)}.stx`],le=[...new Set(se)],_e=a.__originalFilePath,he=[];if(he.push(...c._layerComponentDirs??[]),_e){let be=ce.join(ce.dirname(_e),"components");he.push(be)}let Ve=c._rootComponentsDir;if(typeof Ve==="string"&&ao(i,c)&&!he.includes(Ve))he.push(Ve);if(i&&!he.includes(i))he.push(i);if(typeof Ve==="string"&&!he.includes(Ve))he.push(Ve);let Ce=ce.join(ce.dirname(l),"components");if(!he.includes(Ce))he.push(Ce);if(c.componentsDir&&c.componentsDir!==i&&!he.includes(c.componentsDir))he.push(c.componentsDir);for(let be of c.additionalComponentsDirs??[])if(be&&!he.includes(be))he.push(be);let ct=c._nativeHostAttrs&&/^(?:checkbox|switch)$/i.test(L),nt=(T?.events??[]).map((be)=>be.replace(/^@/,"").split(".")[0].toLowerCase().replace(/-/g,"")),Kt=Object.hasOwn(n,"checked")||Boolean(T?.reactiveProps?.includes("checked")),ts=Object.hasOwn(n,"value")||Boolean(T?.reactiveProps?.includes("value")),gt=!nt.includes("valuechange")&&(Kt||nt.includes("change")&&!ts),yt=c._nativeHostAttrs&&/^textinput$/i.test(L),_n=nt.includes("update:value")&&!nt.includes("input"),wn=c._nativeHostAttrs&&/^video$/i.test(L),Sn=Object.hasOwn(n,"src")||Boolean(T?.reactiveProps?.includes("src")),_t=Object.hasOwn(n,"source")||Boolean(T?.reactiveProps?.includes("source")),$n=wn&&Sn&&!_t&&(T?.events??[]).every((be)=>/^(?:play|pause|ended|timeupdate|loadedmetadata|loadstart|error)$/.test(be.replace(/^@/,"").split(".")[0])),mt=(be)=>Object.hasOwn(n,be)||Boolean(T?.reactiveProps?.includes(be)),En=c._nativeHostAttrs&&/^button$/i.test(L)&&(mt("symbol")||mt("iconOnly")||mt("title")&&!mt("label")&&!t.trim()),Zt=c._targetComponentFallbackNames?.some((be)=>be.toLowerCase()===L.toLowerCase())&&(!ct||gt)&&(!yt||_n)&&(!wn||$n)&&!En;for(let be of Zt?[]:c._targetComponentDirs??[])if(be&&!he.includes(be))he.push(be);let st=typeof c.root==="string"?ce.resolve(c.root):void 0,So=st??ce.dirname(l),wt=[];if(st)wt.push(ce.resolve(st,"resources/views/components")),wt.push(ce.resolve(st,"resources/components")),wt.push(ce.resolve(st,"src/components")),wt.push(ce.resolve(st,"components"));wt.push(ce.resolve(import.meta.dir,"components"));for(let be of wt)if(!he.includes(be))he.push(be);let rr=c._pluginComponentDirs;if(Array.isArray(rr)){for(let be of rr)if(typeof be==="string"&&!he.includes(be))he.push(be)}if(c.fallbackComponentsDir&&!he.includes(c.fallbackComponentsDir))he.push(c.fallbackComponentsDir);if(Zt){for(let be of c._targetComponentDirs??[])if(be&&!he.includes(be))he.push(be)}let ir=[...new Set(he.map((be)=>{if(!be)return be;return ce.isAbsolute(be)?be:ce.resolve(So,be)}))];he.length=0,he.push(...ir);let ns=`${L}\x00${l}\x00${ir.join("\x00")}`,ss=Kn.get(ns);if(ss)if(await r(ss))Q=ss;else Kn.delete(ns);if(!Q&&(L.startsWith("./")||L.startsWith("../")))Q=ce.resolve(ce.dirname(l),`${L}.stx`),ne.push(Q);else if(!Q)for(let be of he){if(!be)continue;for(let kn of le){let Rn=ce.join(be,kn);if(ne.push(Rn),await r(Rn)){Q=Rn;break}}if(Q)break;if(!Q)try{let kn=await import("fs");if(!kn.statSync(be,{throwIfNoEntry:!1})?.isDirectory())continue;let $o=8,rs=[{path:be,depth:0}];while(rs.length>0&&!Q){let Cn=rs.pop();if(Cn.depth>=$o)continue;let or;try{or=kn.readdirSync(Cn.path,{withFileTypes:!0})}catch{continue}for(let Tn of or){if(!Tn.isDirectory())continue;if(Tn.name==="node_modules"||Tn.name.startsWith("."))continue;let ar=ce.join(Cn.path,Tn.name);for(let vo of le){let is=ce.join(ar,vo);if(ne.push(is),await r(is)){Q=is;break}}if(Q)break;rs.push({path:ar,depth:Cn.depth+1})}}}catch{}if(Q)break}if(Q)Kn.set(ns,Q)}if(!Q||!await r(Q))return no(e,l,ne),so(e);v.add(Q);let ae;if(tn.has(Q))ae=tn.get(Q);else try{ae=await Bun.file(Q).text(),tn.set(Q,ae)}catch(se){let le=se instanceof Error?se.message:String(se);return no(e,l,[Q],le),so(e)}if(T)for(let se of new Set([...Object.keys(n),...T.reactiveProps??[]])){let le=se.toLowerCase();if(le.startsWith("aria-")||le.startsWith("data-"))continue;let _e=se.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\b${_e}\\b`).test(ae))T.declaredProps.add(se);if(new RegExp(`\\$props\\s*(?:\\.\\s*${_e}\\b|\\[\\s*['"]${_e}['"]\\s*\\])`).test(ae)||new RegExp(`\\buseReactiveProp\\s*\\(\\s*['"]${_e}['"]`).test(ae))T.consumedProps?.add(se)}let me=new Set(["__originalFilePath","__importedComponents",Mn,"__stx_client_signal_names","__stx_client_declared_names","__stx_runtime_config","__stxServeContext","__stx_scope_seq"]),Ee={};for(let[se,le]of Object.entries(a))if(!se.startsWith("__")||me.has(se))Ee[se]=le;let Te=R.length>0?{[Wn]:[...R]}:{},ze=t;if(t.includes("@include")){let{processIncludes:se}=await o("stx/includes",()=>import("./chunk-tx8htbte.js"));ze=await se(t,a,l,c,v)}if(/<[A-Z][\w.-]*[\s/>]/.test(ze)){let{processComponents:se}=await o("stx/component-renderer",()=>import("./chunk-31rg3qz7.js"));ze=await se(ze,{...a,__processedComponents:j,...Te},l,c,v)}let $e=[];if(Oc(ze)){let{processExpressions:se}=await o("stx/expressions",()=>import("./chunk-dghy97z8.js")),le=a.__stx_signals_gate===void 0?{...a,__stx_signals_gate:!0,...Te}:R.length>0?{...a,...Te}:a;ze=se(ze,le,l);for(let _e of ze.matchAll(/\{\{([\s\S]*?)\}\}/g))$e.push(_e[1].trim())}let rt=X(ze),ut=[],Ct=rt.output.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(se,le)=>{let _e=rt.scripts[Number(le)]||"",he=_e.match(/^<script\b([^>]*)>/i)?.[1]||"",Ve=he.match(/\btype\s*=\s*["']([^"']+)["']/i)?.[1]?.toLowerCase(),Ce=!Ve||["module","text/javascript","application/javascript"].includes(Ve),ct=/\sdata-stx-(?:owner|instance)(?=[\s=/>])/i.test(` ${he}`);if(!/\bserver\b/i.test(he)&&Ce&&!ct)return ut.push(_e),"";return _e}),{extractSlotContent:Xn}=await o("stx/slots",()=>import("./chunk-tyvpm2x1.js")),ft=Xn(Ct),dt={};if(ft.defaultSlot?.trim())dt.default=ft.defaultSlot;for(let[se,le]of ft.namedSlots)dt[se]=le.content;let pt=a.__stx_scope_seq??={n:0,key:Is(String(a.__filename??l))},Dt=oo(e,process.cwd()),it=`stx_${(Dt.endsWith(".stx")?Dt.slice(0,-4):Dt).replace(/[^a-zA-Z0-9]/g,"_")}_${++pt.n}_${pt.key}`,We={...Ee,$uid:it,$native:c._nativeHostAttrs===!0,...n,props:n,slot:Ct,$slots:dt,__processedComponents:P,__sections:{},__stx_signals_gate:xe(ae)||Oc(t),__stx_preserved_client_expressions:[...Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[],...$e]};$l(ae,We);let jt=ae,sn=de(jt);if(sn)jt=sn.content.trim();let Jn=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Lt=[...ae.matchAll(Jn)];for(let[,se,le]of Lt)if(!/\bserver\b|\bsrc\s*=|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(se))Ie(le,Q,c.strict);let Ze=[],Bt=null,Gn=Lt.some((se)=>/\bserver\b/.test(se[1]||"")&&/\bcache\b/.test(se[1]||"")),bt=null,Je=null,zt=null,rn=0,Wt=null;if(hl(c),Gn&&Js>0){let se=xl({props:n,slot:ze,slotContext:t.trim()?bl(Ee):void 0,buildMode:c.buildMode??"",skipEventDirectives:c.skipEventDirectives===!0,native:c._nativeHostAttrs===!0,clientLoopNames:[...R].sort(),layers:c._layerGraph?.layers.map((le)=>le.configFile),uid:it});if(se!==null){bt=`${Q}\x00${x(ae)}\x00${se}`;let le=Zn.get(bt);if(le){for(let _e of le.dependencies)v.add(_e);if(qr(a,le.clientFactories),pt.n+=le.uidsConsumed,le.preservedClientExpressions.length>0){let _e=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[]);for(let he of le.preservedClientExpressions)_e.add(he);a.__stx_preserved_client_expressions=[..._e]}return le.output}Je=new Set(v),zt=Kr(a),rn=pt.n,Wt=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[])}}let Ft=new Set;for(let se of Lt){let le=se[1]||"",_e=se[2]||"",he=le.includes("server");if(Le(le)&&_e.trim())_e=je(_e);if(he&&_e){for(let Ce of Ne(_e))Ft.add(Ce);try{await N(_e,We,Q,{onFailure:(Ce)=>{if(Ce.kind!=="unknown")Bt=Ce.kind}})}catch(Ce){}}if(!he){let Ce=_e.replace(/^\s*const\s*\{[^}]+\}\s*=\s*window\.stx\s*;?\s*\n?/gm,""),ct=Ce.includes("{{")&&Ce.includes("}}"),nt=Ce.includes("{!!")&&Ce.includes("!!}");if(ct||nt)Ce=ii(Ce,We,Q);let Kt=le.replace(/\s*\bts\b/g,"").replace(/\s*\blang\s*=\s*["']?(ts|typescript)["']?/gi,"");Ze.push(`<script${Kt}>${Ce}</script>`)}}let qe=X(ae).output.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),Vt=qe?qe[1]:"",Yn=qe?qe[2]:"",Ge="",ee=Vt&&/\bscoped\b/i.test(Vt);if(qe)Ge=`<style${Vt}>${El(Yn,We,Q)}</style>`;let re=jt;if(re=re.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),qe)re=re.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");{let se=/@push\s*\(\s*['"]styles['"]\s*\)([\s\S]*?)@endpush/gi,le=[];if(re=re.replace(se,(_e,he)=>{let Ve=he.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i);if(Ve)le.push(`<style${Ve[1]}>${Ve[2]}</style>`);return""}),re=re.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/gi,""),le.length>0)Ge=`${Ge}${le.join(`
291
+ `)}`}if(t&&re.includes("{{ text || slot }}"))re=re.replace(/\{\{\s*text\s*\|\|\s*slot\s*\}\}/g,()=>t);let{applySlots:ue}=await o("stx/slots",()=>import("./chunk-tyvpm2x1.js")),{defaultSlot:ye,namedSlots:Re}=ft,Ue=a.__stx_signals_gate===!0&&/\s(?:@[\w:.-]+|x-on:[\w:.-]+)\s*=/.test(Ct),Ye=c._nativeHostAttrs===!0&&Ze.length>0||Ue&&Ze.length>0||Ze.some((se)=>/\b(?:state|derived|effect|ref|useRef|reactive|computed|watch|watchEffect|useModel|useReactiveProp|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots)\s*(?:<[^<>()]*>)?\s*\(/.test(se)),Qn=(se)=>Ye?Ti(se,it):se,es=new Map([...Re].map(([se,le])=>[se,{...le,content:Qn(le.content)}]));re=await ue(re,Qn(ye),es,We,Ye?it:"");let on=si(Ze),Ut=(Array.isArray(We.__stx_client_signal_names)?We.__stx_client_signal_names:[]).filter((se)=>!Ft.has(se));if(on.length>0||Ut.length>0)We.__stx_client_signal_names=[...new Set([...Ut,...on])];else delete We.__stx_client_signal_names;let Ht=R.filter((se)=>!Ft.has(se)&&!(se in n));if(Ht.length>0)We[Wn]=Ht;let an={...c,_rootComponentsDir:c._rootComponentsDir||c.componentsDir,componentsDir:ce.dirname(Q),skipSignalsRuntime:!0,skipEventDirectives:c._nativeHostAttrs===!0||Ye||Ze.length===0,defaultLayout:void 0};We.__stxProcessingDepth=(a.__stxProcessingDepth||0)+1;let{processDirectives:xn}=await o("stx/process",()=>import("./chunk-wv171crf.js")),Qe=await xn(re,We,Q,an,v),at=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[]);for(let se of Qe.matchAll(/\{\{([\s\S]*?)\}\}/g))at.add(se[1].trim());if(at.size>0)a.__stx_preserved_client_expressions=[...at];let et=it,Ke=Qe;if(Ye){let se="";if(Object.keys(n).length>0)try{se=` data-stx-props="${Ks(JSON.stringify(n))}"`}catch{}let le=G?` stx-hydrate="${Ks(G)}"`:"",_e=Object.fromEntries(Object.entries(dt).map(([gt,yt])=>[gt,Boolean(yt)])),he=Object.keys(_e).length>0?` data-stx-slots="${Ks(JSON.stringify(_e))}"`:"",Ve=` data-stx-scope="${et}"${se}${he}${le}`,Ce=/^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<span(?=[\s/>])/i.test(Qe),ct=/^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<[^>]+\bdata-stx-layout-root(?:\s|=|>)/i.test(Qe),nt=Ce?"span":"div",Kt=ct&&c._nativeHostAttrs?' style="display:flex;flex:1;min-height:0;min-width:0"':Ce||ct?' style="display:contents"':"";Ke=Gf(Qe,Ve)??`<${nt}${Ve} data-stx-component-wrapper${Kt}>${Qe}</${nt}>`;let ts=await Promise.all(Ze.map(async(gt)=>{let yt=gt.match(/<script([^>]*)>([\s\S]*)<\/script>/i);if(!yt)return gt;let[,_n,wn]=yt,Sn=Gi(gt,We,Q);if(Sn!==null)return Sn;let _t=await Rl(wn,Q,c.buildMode==="compile"),$n=mn(_t.clientCode,De(We)),{vendorStyleTags:mt}=_t,En=$n?`function(__scopeId) {
292
292
  ${$n}
293
293
  return (${_t.factoryBody})(__scopeId);
294
294
  }`:_t.factoryBody,Zt=G?null:hs(a,En),st=Zt?`window.__stxComponentFactories[${JSON.stringify(Zt)}](${JSON.stringify(et)});`:`(${En})(${JSON.stringify(et)});`;if(G)return`${mt}<script type="stx/island" data-stx-island="${et}" data-stx-scoped data-stx-owner="${et}"${_n}>${st}</script>`;return`${mt}<script data-stx-scoped data-stx-run="always" data-stx-owner="${et}"${_n}>${st}</script>`}));if(Ke=Ke+`
@@ -314,7 +314,7 @@ ${Se.yellow}${Se.bold}Message:${Se.reset} ${n}
314
314
  `,y)T+=`
315
315
  ${Se.blue}${Se.bold}Context:${Se.reset}
316
316
  ${Se.dim}${y}${Se.reset}
317
- `;return T}function fe(){tn.clear(),Kn.clear(),qs.clear(),Xs.clear(),Zn.clear()}function wh(){return{size:tn.size,maxSize:500}}var Zs=w(128);async function Rl(e,n,t){let i=x(e,n,t),a=Zs.get(i);if(a){if(Cs(a.deps))return a;Zs.delete(i)}let l=ti(e,{filePath:n,projectRoot:process.cwd()}),c=l.code,y=ni(l.styles);c=Ot(c).code;let{hasUserImports:v,bundleClientScript:R}=await o("stx/client-script-bundler",()=>import("./chunk-a0c2qg2b.js")),T=[],D=!1;if(v(c)){let L=c;c=await R(L,n,{projectRoot:process.cwd(),minify:t,collectInputs:T}),D=c===L}let{stripStxRuntimeImports:N}=await o("stx/signal-processing",()=>import("./chunk-mvbw706e.js"));c=N(c);let j=A(c),P=_l(j),M=new Set(z(j,!0).split(",").map((L)=>L.trim())),G=`function(__scopeId) {
317
+ `;return T}function fe(){tn.clear(),Kn.clear(),qs.clear(),Xs.clear(),Zn.clear()}function wh(){return{size:tn.size,maxSize:500}}var Zs=w(128);async function Rl(e,n,t){let i=x(e,n,t),a=Zs.get(i);if(a){if(Cs(a.deps))return a;Zs.delete(i)}let l=ti(e,{filePath:n,projectRoot:process.cwd()}),c=l.code,y=ni(l.styles);c=Ot(c).code;let{hasUserImports:v,bundleClientScript:R}=await o("stx/client-script-bundler",()=>import("./chunk-d5mmgzqs.js")),T=[],D=!1;if(v(c)){let L=c;c=await R(L,n,{projectRoot:process.cwd(),minify:t,collectInputs:T}),D=c===L}let{stripStxRuntimeImports:N}=await o("stx/signal-processing",()=>import("./chunk-42r0h45w.js"));c=N(c);let j=A(c),P=_l(j),M=new Set(z(j,!0).split(",").map((L)=>L.trim())),G=`function(__scopeId) {
318
318
  ${ot("const",[...Kc,...P],j)}
319
319
  const __scope = window.stx._scopes = window.stx._scopes || {};
320
320
  const __scopeVars = __scope[__scopeId] = __scope[__scopeId] || {};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-ez35607j.js";import"./chunk-zn3c0ew5.js";import{w,x,C,Y}from"./chunk-arbhrz4x.js";import"./chunk-zkx2m308.js";import"./chunk-rbmt5w9v.js";import"./chunk-e3egwyax.js";import f from"path";var b=["applyOfflineUpdate","broadcast","cacheMedia","calculateDistance","canNotify","clearCookies","clearFetchCache","clearOfflineData","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","onOfflineUpdateReady","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAmbientSound","useAnimationFrame","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBreathPacer","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useOutbox","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],L=new Set(b);var l=new Map,h=w(64),S=new Set,k=0,R=new Set(b);function T(){l.clear(),h.clear()}function P(n){let o=new Map;for(let r of n){let a=f.basename(r);if(a.endsWith(".d.ts"))continue;let t=a.replace(/\.[jt]s$/,"");if(t==="index")continue;if(t===a)continue;let i=o.get(t);if(i&&!i.endsWith(".js"))continue;o.set(t,r)}return[...o.values()].sort()}function I(n,o){let r=o.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${r}\\b`).test(n)}function M(n){if(!n)return[];let o=x(n,k),r=h.get(o);if(r)return r.slice();let a=n.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),t=[];for(let i of R){if(S.has(i))continue;let u=i.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${u}\\s*\\(`).test(a))t.push(i)}return t.sort(),h.set(o,t),t.slice()}async function A(n,o){let r=M(n);if(r.length===0)return null;let a=o??f.join(import.meta.dir,"composables"),t=`${a}\x00${r.join(",")}`,i=l.get(t);if(i!==void 0)return i||null;let u=Y({loader:"ts",target:"browser",define:C()}),O=new Set(r),m=[],d=new Set,p=[];try{let s=new Bun.Glob("*.{ts,js}");for await(let e of s.scan({cwd:a,absolute:!0}))p.push(e)}catch{return l.set(t,""),null}p=P(p);for(let s of p){let e;try{e=await Bun.file(s).text()}catch{continue}let g=[];try{g=u.scan(e).exports.filter((c)=>c!=="default")}catch{continue}if(!g.some((c)=>O.has(c)))continue;try{e=e.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^import\s+type\s+.*$/gm,""),e=e.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),e=e.replace(/^export\s+default\s+/gm,""),e=e.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),m.push(`// ${f.basename(s).replace(/\.[jt]s$/,"")}
2
+ import"./chunk-ez35607j.js";import"./chunk-zn3c0ew5.js";import{w,x,C,Y}from"./chunk-4me1smce.js";import"./chunk-zkx2m308.js";import"./chunk-rbmt5w9v.js";import"./chunk-vpr2m2xj.js";import f from"path";var b=["applyOfflineUpdate","broadcast","cacheMedia","calculateDistance","canNotify","clearCookies","clearFetchCache","clearOfflineData","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","onOfflineUpdateReady","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAmbientSound","useAnimationFrame","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBreathPacer","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useOutbox","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],L=new Set(b);var l=new Map,h=w(64),S=new Set,k=0,R=new Set(b);function T(){l.clear(),h.clear()}function P(n){let o=new Map;for(let r of n){let a=f.basename(r);if(a.endsWith(".d.ts"))continue;let t=a.replace(/\.[jt]s$/,"");if(t==="index")continue;if(t===a)continue;let i=o.get(t);if(i&&!i.endsWith(".js"))continue;o.set(t,r)}return[...o.values()].sort()}function I(n,o){let r=o.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${r}\\b`).test(n)}function M(n){if(!n)return[];let o=x(n,k),r=h.get(o);if(r)return r.slice();let a=n.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),t=[];for(let i of R){if(S.has(i))continue;let u=i.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${u}\\s*\\(`).test(a))t.push(i)}return t.sort(),h.set(o,t),t.slice()}async function A(n,o){let r=M(n);if(r.length===0)return null;let a=o??f.join(import.meta.dir,"composables"),t=`${a}\x00${r.join(",")}`,i=l.get(t);if(i!==void 0)return i||null;let u=Y({loader:"ts",target:"browser",define:C()}),O=new Set(r),m=[],d=new Set,p=[];try{let s=new Bun.Glob("*.{ts,js}");for await(let e of s.scan({cwd:a,absolute:!0}))p.push(e)}catch{return l.set(t,""),null}p=P(p);for(let s of p){let e;try{e=await Bun.file(s).text()}catch{continue}let g=[];try{g=u.scan(e).exports.filter((c)=>c!=="default")}catch{continue}if(!g.some((c)=>O.has(c)))continue;try{e=e.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^import\s+type\s+.*$/gm,""),e=e.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),e=e.replace(/^export\s+default\s+/gm,""),e=e.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),m.push(`// ${f.basename(s).replace(/\.[jt]s$/,"")}
3
3
  ${u.transformSync(e).trim()}`);for(let c of g)d.add(c)}catch(c){console.warn(`[stx] framework composable ${f.basename(s)} could not be bundled:`,c)}}let y=r.filter((s)=>!d.has(s)&&!I(n,s));if(y.length>0)console.warn(`[stx] could not bundle ${y.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(m.length===0)return l.set(t,""),null;let E=[...d].map((s)=>` try { if (!(${JSON.stringify(s)} in __s)) { __s[${JSON.stringify(s)}] = ${s}; if (!(${JSON.stringify(s)} in window)) window[${JSON.stringify(s)}] = ${s}; } } catch (e) {}`).join(`
4
4
  `),v=`<script data-stx-scoped data-stx-run="always" data-stx-framework-composables>
5
5
  ;(function(){