@stacksjs/stx 0.2.689 → 0.2.690

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 (79) hide show
  1. package/dist/{chunk-5tkby4j6.js → chunk-063y8kcp.js} +1 -1
  2. package/dist/{chunk-ys6a6azq.js → chunk-1k7js5nz.js} +1 -1
  3. package/dist/{chunk-m2vm06rh.js → chunk-1pzshxft.js} +1 -1
  4. package/dist/chunk-2mf8shg5.js +2 -0
  5. package/dist/{chunk-3t8aag0q.js → chunk-35cvjgj2.js} +1 -1
  6. package/dist/{chunk-ys6zjdfc.js → chunk-43h27729.js} +3 -3
  7. package/dist/{chunk-jdb6qhat.js → chunk-4566drka.js} +1 -1
  8. package/dist/{chunk-6eazxhpe.js → chunk-4f5bmy7h.js} +6 -6
  9. package/dist/{chunk-yn9dwq2b.js → chunk-4hbevevz.js} +1 -1
  10. package/dist/{chunk-2h39d4wz.js → chunk-4mqq6896.js} +5 -5
  11. package/dist/chunk-5443hz48.js +2 -0
  12. package/dist/chunk-55eek6b1.js +2 -0
  13. package/dist/{chunk-m7ce359r.js → chunk-5gh02j5x.js} +1 -1
  14. package/dist/{chunk-5k013c4h.js → chunk-5m42k74p.js} +1 -1
  15. package/dist/{chunk-4mnynzf6.js → chunk-5mcwf93c.js} +2 -2
  16. package/dist/chunk-5y61b94b.js +2 -0
  17. package/dist/{chunk-3tv5h9xn.js → chunk-67mex2d1.js} +1 -1
  18. package/dist/{chunk-sbad32da.js → chunk-8485q7dh.js} +1 -1
  19. package/dist/{chunk-v1qkdg8f.js → chunk-84vsb4v3.js} +1 -1
  20. package/dist/{chunk-9629wqte.js → chunk-91ytsvhd.js} +1 -1
  21. package/dist/{chunk-5grcasys.js → chunk-a5agchz8.js} +1 -1
  22. package/dist/chunk-b6vwy6bd.js +2 -0
  23. package/dist/chunk-b8v19j69.js +2 -0
  24. package/dist/{chunk-km9qyqqm.js → chunk-bzxfbh2x.js} +1 -1
  25. package/dist/{chunk-736bs5xa.js → chunk-c9fs966z.js} +1 -1
  26. package/dist/{chunk-hyk31r03.js → chunk-cm8ad78x.js} +1 -1
  27. package/dist/{chunk-89m0kxj9.js → chunk-dsrgestd.js} +5 -5
  28. package/dist/{chunk-rcr7tncg.js → chunk-e9fmqn0g.js} +1 -1
  29. package/dist/{chunk-mxpmt6wm.js → chunk-ejafjap5.js} +1 -1
  30. package/dist/{chunk-ne7rbqw4.js → chunk-fk2m3xdd.js} +1 -1
  31. package/dist/{chunk-p7j8y51n.js → chunk-g9c284gf.js} +1 -1
  32. package/dist/{chunk-4cnphtcz.js → chunk-h176dx1q.js} +2 -2
  33. package/dist/{chunk-j7ktb5se.js → chunk-hqzhej1p.js} +2 -2
  34. package/dist/{chunk-bsnactb2.js → chunk-hy4gaf8g.js} +1 -1
  35. package/dist/{chunk-cbbheh2r.js → chunk-j5127cxs.js} +1 -1
  36. package/dist/{chunk-mm6xx4pm.js → chunk-jk0gba16.js} +2 -2
  37. package/dist/{chunk-60aezg8h.js → chunk-jkhc0q7g.js} +1 -1
  38. package/dist/{chunk-623w7x5z.js → chunk-jt9kxnva.js} +2 -2
  39. package/dist/{chunk-81meeqhp.js → chunk-mwmmmbxj.js} +4 -4
  40. package/dist/{chunk-a81452y9.js → chunk-n42421az.js} +2 -2
  41. package/dist/{chunk-rvebwzdj.js → chunk-nc85m4p9.js} +1 -1
  42. package/dist/{chunk-tbrznnt4.js → chunk-ngd9dsrd.js} +1 -1
  43. package/dist/chunk-nrw84rpj.js +2 -0
  44. package/dist/chunk-p7nkw2nr.js +2 -0
  45. package/dist/chunk-pj1we4mn.js +2 -0
  46. package/dist/{chunk-qm61depd.js → chunk-ppc64he4.js} +1 -1
  47. package/dist/{chunk-ryg1ww7v.js → chunk-psprkndv.js} +1 -1
  48. package/dist/{chunk-qw2skxm6.js → chunk-q3xesyn0.js} +1 -1
  49. package/dist/{chunk-0s6kqr1h.js → chunk-r86d03dv.js} +1 -1
  50. package/dist/{chunk-eq9s8dcp.js → chunk-s0226rfp.js} +4 -4
  51. package/dist/{chunk-9ed0hr7y.js → chunk-s0ntt1cn.js} +1 -1
  52. package/dist/{chunk-s6vn2w80.js → chunk-s0vs1n7n.js} +1 -1
  53. package/dist/{chunk-280pa4mp.js → chunk-sj6t3cj2.js} +1 -1
  54. package/dist/{chunk-b13rac0d.js → chunk-smqgdmc4.js} +1 -1
  55. package/dist/{chunk-bwcejt6t.js → chunk-tjwv101c.js} +1 -1
  56. package/dist/chunk-twk9kr73.js +2 -0
  57. package/dist/{chunk-qa2mkh94.js → chunk-v7xpafs9.js} +1 -1
  58. package/dist/{chunk-zgwp7pdp.js → chunk-vjt6c16n.js} +1 -1
  59. package/dist/{chunk-kkxwgx4n.js → chunk-vvezfjt1.js} +1 -1
  60. package/dist/chunk-ywydtzba.js +2 -0
  61. package/dist/{chunk-84fn7myr.js → chunk-yxp7jmnz.js} +1 -1
  62. package/dist/{chunk-q3kg8dde.js → chunk-znhrftsf.js} +1 -1
  63. package/dist/cli.js +7 -7
  64. package/dist/craft-entry.js +1 -1
  65. package/dist/craft.js +1 -1
  66. package/dist/pwa.js +1 -1
  67. package/dist/ssg.js +2 -2
  68. package/package.json +5 -5
  69. package/dist/chunk-1w15scke.js +0 -2
  70. package/dist/chunk-2khba4de.js +0 -2
  71. package/dist/chunk-98sa3jgn.js +0 -2
  72. package/dist/chunk-9jwxj1yr.js +0 -2
  73. package/dist/chunk-a3s7tqsp.js +0 -2
  74. package/dist/chunk-dr7j2a0t.js +0 -2
  75. package/dist/chunk-ezj2c0gk.js +0 -2
  76. package/dist/chunk-gjj8krdx.js +0 -2
  77. package/dist/chunk-mj3y2dhh.js +0 -2
  78. package/dist/chunk-xzpwfs7n.js +0 -2
  79. package/dist/chunk-y4kzqam8.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Be,yn,xs,Uo,A}from"./chunk-t6m5d64b.js";import{hn}from"./chunk-bwcejt6t.js";import{xr,S,dc,st,Zo,pc}from"./chunk-gtktv6nn.js";import{T}from"./chunk-6beg47t4.js";import{Ss,l,p,Dt,u,U,D,y,Es,Se,ze,Ts}from"./chunk-r0ys9aqa.js";import{r,fe}from"./chunk-9tg4995v.js";import{f}from"./chunk-b7e07ybq.js";import{W}from"./chunk-078as147.js";import Ge from"path";import Ct from"process";import{AsyncLocalStorage as uo}from"async_hooks";var fr=new uo;function dn(e){return e.__stx_server_data??={pending:new Map,values:new Map}}function gr(e,i){return fr.run(dn(e),i)}async function mr(e,i){let t=fr.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 o=t.pending.get(e);if(o)return o;let a=Promise.resolve().then(i).then((h)=>{let c=JSON.stringify(h,(E,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}),v=JSON.parse(c);return t.values.set(e,v),v}).catch((h)=>{throw t.pending.delete(e),h});return t.pending.set(e,a),a}function dr(e){let i=e.__stx_server_data;if(!i?.values.size)return"";return`<script data-stx-scoped data-stx-server-data type="application/json">${JSON.stringify(Object.fromEntries(i.values)).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}</script>`}function L(e,i=!1){let t=r(e),o=[],a=new Set,h=0,c=0,v=t.length,E=()=>{if(h!==0)return;let R=t.slice(c).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?:[!:;,\n]|=(?!=)|$)/);if(R){if(i&&R[1]==="const")return;let I=R[2];if(!a.has(I))o.push(I),a.add(I);return}let C=t.slice(c).match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(C){if(i&&t.slice(c).startsWith("const"))return;C[1].split(",").forEach((I)=>{let P=I.trim();if(!P)return;let q=P.indexOf(":"),K=(q>=0?P.slice(q+1).trim():P).split(/[\s=]/)[0];if(K&&!a.has(K))o.push(K),a.add(K)});return}let O=t.slice(c).match(/^(?:const|let|var)\s+\[([^\]]+)\]\s*=/);if(O){if(i&&t.slice(c).startsWith("const"))return;O[1].split(",").forEach((I)=>{let P=I.trim().replace(/^\.\.\./,"");if(!P)return;let q=P.split(/[\s=]/)[0];if(q&&!a.has(q))o.push(q),a.add(q)});return}if(i)return;let M=t.slice(c).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(M){let I=M[1];if(!a.has(I))o.push(I),a.add(I);return}let N=t.slice(c).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(N){let I=N[1];if(!a.has(I))o.push(I),a.add(I)}};while(c<v){if(t[c]==="{"){h++,c++;continue}if(t[c]==="}"){h--,c++;continue}if(h===0&&/[a-z]/i.test(t[c])&&(c===0||/\s|[;{}()]/.test(t[c-1])))E();c++}return o.join(", ")}function is(e){return`{ enumerable: true, configurable: true, get() { return ${e} }, set(__stxValue_${e}) { ${e} = __stxValue_${e} } }`}function fo(e,i=L(e).split(",").map((t)=>t.trim()).filter(Boolean)){let t=new Set(L(e,!0).split(",").map((o)=>o.trim()));return i.map((o)=>t.has(o)?`get ${o}() { return ${o} }, set ${o}(__stxValue_${o}) { ${o} = __stxValue_${o} }`:o).join(", ")}function as(e,i){let t=`{ ${fo(e,i)} }`;return L(e).split(",").some((o)=>o.trim()==="__stxLiveBindings")?`Object.defineProperties(${t}, Object.getOwnPropertyDescriptors(__stxLiveBindings))`:t}import Tn from"fs";import Te from"path";function j(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}var hr=new Map;function cs(e,i=!0){let t=hr.get(e);if(i&&t)return t;let o=new Map,a=[Te.join(e,"src"),Te.join(e,"dist"),e];function h(c,v){if(v>6)return;let E;try{E=Tn.readdirSync(c,{withFileTypes:!0})}catch{return}for(let R of E){let C=Te.join(c,R.name);if(R.isDirectory()){if(R.name==="node_modules"||R.name.startsWith("."))continue;h(C,v+1)}else if(R.isFile()&&R.name.endsWith(".stx")){let O=R.name.slice(0,-4);if(!o.has(O))o.set(O,C);let M=O.toLowerCase();if(!o.has(M))o.set(M,C);let N=j(O);if(!o.has(N))o.set(N,C)}}}for(let c of a)if(h(c,0),o.size>0)break;if(i)hr.set(e,o);return o}function ls(e,i){if(e.startsWith(".")||e.startsWith("/"))return null;let t=i;while(!0){let o=Te.join(t,"node_modules",e);try{if(Tn.statSync(o).isDirectory())return o}catch{}let a=Te.dirname(t);if(a===t)return null;t=a}}function us(e,i,t={}){return[Te.resolve(Te.dirname(i),`${e}.stx`),Te.resolve(Te.dirname(i),e),Te.resolve(t.componentsDir||"components",`${e}.stx`),Te.resolve(t.componentsDir||"components",e),e.endsWith(".stx")?e:`${e}.stx`]}function br(e){let i=e.endsWith(".stx")?e.slice(0,-4):e,t=i.split("-").map((a)=>a.charAt(0).toUpperCase()+a.slice(1)).join(""),o=j(i);return[i,t,o]}function To(e,i){let[t,o,a]=br(e);for(let h of[t,t.toLowerCase(),o,a]){let c=i?.__importedComponents?.get(h);if(c!==void 0)return c}}function*$o(e,i,t={},o){let a=br(e);if(a[0].startsWith("./")||a[0].startsWith("../")){yield Te.resolve(Te.dirname(i),`${a[0]}.stx`);return}let h=[...new Set(a.map((E)=>`${E}.stx`))],c=t.projectRoot||process.cwd(),v=[...o?.__originalFilePath?[Te.join(Te.dirname(o.__originalFilePath),"components")]:[],...t.componentsDir?[t.componentsDir]:[],Te.join(Te.dirname(i),"components"),Te.resolve(c,"src/components"),Te.resolve(c,"components"),...import.meta.dir?[Te.resolve(import.meta.dir,"components")]:[]];for(let E of new Set(v)){for(let R of h)yield Te.join(E,R);try{for(let R of Tn.readdirSync(E,{withFileTypes:!0}))if(R.isDirectory())for(let C of h)yield Te.join(E,R.name,C)}catch{}}}function yr(e,i,t={},o){let a=To(e,o);if(a!==void 0)return a;for(let h of $o(e,i,t,o))try{if(Tn.statSync(h,{throwIfNoEntry:!1})?.isFile())return h}catch{}return null}import Xs from"fs";import le from"path";import gt from"path";import Zt from"fs";var po=new Set(["touchstart","touchmove","wheel","mousewheel"]);function ss(e,i){if(i.passive)return!0;if(i.prevent||i.nonpassive)return!1;return po.has(e.toLowerCase())}var _r=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"]),wr={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"},go=new Set(["ctrl","alt","shift","meta"]),vr={left:0,middle:1,right:2};function Sr(e){let i={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 o=t.toLowerCase();if(o==="prevent")i.prevent=!0;else if(o==="stop")i.stop=!0;else if(o==="once")i.once=!0;else if(o==="capture")i.capture=!0;else if(o==="self")i.self=!0;else if(o==="passive")i.passive=!0;else if(o==="nonpassive")i.nonpassive=!0;else if(go.has(o))i.systemKeys.push(o);else if(o in vr)i.mouse=o;else if(o in wr||/^[a-z]$/.test(o))i.keys.push(wr[o]||o.toUpperCase());else if(o.startsWith("debounce")){let a=o.match(/debounce(?:\.(\d+))?/);i.debounce=a?.[1]?Number.parseInt(a[1],10):300}else if(o.startsWith("throttle")){let a=o.match(/throttle(?:\.(\d+))?/);i.throttle=a?.[1]?Number.parseInt(a[1],10):300}}return i}function Er(e,i=""){let t=[],o=0,a=/<([a-z][a-z0-9-]*)\s+([^>]*@[a-z][^>]*)>/gi,h;while((h=a.exec(e))!==null){let[c,v,E]=h,R=h.index,C=R+c.length,O=`__stx_evt_${i}${o++}`,M=[],N=/@([a-z][a-z0-9.]*)\s*=\s*"([^"]*)"/gi,I;while((I=N.exec(E))!==null){let[,q,Z]=I,K=q.split("."),Q=K[0];if(!_r.has(Q))continue;M.push({attribute:`@${q}`,event:Q,handler:Z,modifiers:Sr(K.slice(1)),elementId:O})}let P=/@([a-z][a-z0-9.]*)\s*=\s*'([^']*)'/gi;while((I=P.exec(E))!==null){let[,q,Z]=I,K=q.split("."),Q=K[0];if(!_r.has(Q))continue;M.push({attribute:`@${q}`,event:Q,handler:Z,modifiers:Sr(K.slice(1)),elementId:O})}if(M.length>0)t.push({originalTag:c,elementId:O,events:M,startIndex:R,endIndex:C})}return t}function mo(e){let i=[],{modifiers:t}=e;if(t.self)i.push("if ($event.target !== $el) return");for(let o of t.systemKeys)i.push(`if (!$event.${o}Key) return`);if(t.keys.length>0){let o=t.keys.map((a)=>`$event.key === '${a}'`).join(" || ");i.push(`if (!(${o})) return`)}if(t.mouse!==null){let o=vr[t.mouse];i.push(`if ($event.button !== ${o}) return`)}if(t.prevent)i.push("$event.preventDefault()");if(t.stop)i.push("$event.stopPropagation()");return i.join("; ")}function ho(e,i){let t=e;if(i.debounce!==null)t=`__stx_debounce(() => { ${t} }, ${i.debounce})`;else if(i.throttle!==null)t=`__stx_throttle(() => { ${t} }, ${i.throttle})`;return t}function rs(e){let i=e.trim();if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(i))return e;return`if (typeof ${i} === 'function' && !${i}._isSignal) ${i}($event);`}function xo(e){let{modifiers:i}=e,t=e.elementId.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),o=mo(e),a=ho(rs(e.handler),i),h=[];if(i.once)h.push("once: true");if(i.capture)h.push("capture: true");if(ss(e.event,i))h.push("passive: true");let c=h.length>0?`, { ${h.join(", ")} }`:"",v=a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");if(e.event==="mounted")return`
2
+ import{Be,yn,xs,Uo,A}from"./chunk-t6m5d64b.js";import{hn}from"./chunk-tjwv101c.js";import{xr,S,dc,st,Zo,pc}from"./chunk-gtktv6nn.js";import{T}from"./chunk-6beg47t4.js";import{Ss,l,p,Dt,u,U,D,y,Es,Se,ze,Ts}from"./chunk-r0ys9aqa.js";import{r,fe}from"./chunk-9tg4995v.js";import{f}from"./chunk-b7e07ybq.js";import{W}from"./chunk-078as147.js";import Ge from"path";import Ct from"process";import{AsyncLocalStorage as uo}from"async_hooks";var fr=new uo;function dn(e){return e.__stx_server_data??={pending:new Map,values:new Map}}function gr(e,i){return fr.run(dn(e),i)}async function mr(e,i){let t=fr.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 o=t.pending.get(e);if(o)return o;let a=Promise.resolve().then(i).then((h)=>{let c=JSON.stringify(h,(E,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}),v=JSON.parse(c);return t.values.set(e,v),v}).catch((h)=>{throw t.pending.delete(e),h});return t.pending.set(e,a),a}function dr(e){let i=e.__stx_server_data;if(!i?.values.size)return"";return`<script data-stx-scoped data-stx-server-data type="application/json">${JSON.stringify(Object.fromEntries(i.values)).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}</script>`}function L(e,i=!1){let t=r(e),o=[],a=new Set,h=0,c=0,v=t.length,E=()=>{if(h!==0)return;let R=t.slice(c).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?:[!:;,\n]|=(?!=)|$)/);if(R){if(i&&R[1]==="const")return;let I=R[2];if(!a.has(I))o.push(I),a.add(I);return}let C=t.slice(c).match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(C){if(i&&t.slice(c).startsWith("const"))return;C[1].split(",").forEach((I)=>{let P=I.trim();if(!P)return;let q=P.indexOf(":"),K=(q>=0?P.slice(q+1).trim():P).split(/[\s=]/)[0];if(K&&!a.has(K))o.push(K),a.add(K)});return}let O=t.slice(c).match(/^(?:const|let|var)\s+\[([^\]]+)\]\s*=/);if(O){if(i&&t.slice(c).startsWith("const"))return;O[1].split(",").forEach((I)=>{let P=I.trim().replace(/^\.\.\./,"");if(!P)return;let q=P.split(/[\s=]/)[0];if(q&&!a.has(q))o.push(q),a.add(q)});return}if(i)return;let M=t.slice(c).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(M){let I=M[1];if(!a.has(I))o.push(I),a.add(I);return}let N=t.slice(c).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(N){let I=N[1];if(!a.has(I))o.push(I),a.add(I)}};while(c<v){if(t[c]==="{"){h++,c++;continue}if(t[c]==="}"){h--,c++;continue}if(h===0&&/[a-z]/i.test(t[c])&&(c===0||/\s|[;{}()]/.test(t[c-1])))E();c++}return o.join(", ")}function is(e){return`{ enumerable: true, configurable: true, get() { return ${e} }, set(__stxValue_${e}) { ${e} = __stxValue_${e} } }`}function fo(e,i=L(e).split(",").map((t)=>t.trim()).filter(Boolean)){let t=new Set(L(e,!0).split(",").map((o)=>o.trim()));return i.map((o)=>t.has(o)?`get ${o}() { return ${o} }, set ${o}(__stxValue_${o}) { ${o} = __stxValue_${o} }`:o).join(", ")}function as(e,i){let t=`{ ${fo(e,i)} }`;return L(e).split(",").some((o)=>o.trim()==="__stxLiveBindings")?`Object.defineProperties(${t}, Object.getOwnPropertyDescriptors(__stxLiveBindings))`:t}import Tn from"fs";import Te from"path";function j(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}var hr=new Map;function cs(e,i=!0){let t=hr.get(e);if(i&&t)return t;let o=new Map,a=[Te.join(e,"src"),Te.join(e,"dist"),e];function h(c,v){if(v>6)return;let E;try{E=Tn.readdirSync(c,{withFileTypes:!0})}catch{return}for(let R of E){let C=Te.join(c,R.name);if(R.isDirectory()){if(R.name==="node_modules"||R.name.startsWith("."))continue;h(C,v+1)}else if(R.isFile()&&R.name.endsWith(".stx")){let O=R.name.slice(0,-4);if(!o.has(O))o.set(O,C);let M=O.toLowerCase();if(!o.has(M))o.set(M,C);let N=j(O);if(!o.has(N))o.set(N,C)}}}for(let c of a)if(h(c,0),o.size>0)break;if(i)hr.set(e,o);return o}function ls(e,i){if(e.startsWith(".")||e.startsWith("/"))return null;let t=i;while(!0){let o=Te.join(t,"node_modules",e);try{if(Tn.statSync(o).isDirectory())return o}catch{}let a=Te.dirname(t);if(a===t)return null;t=a}}function us(e,i,t={}){return[Te.resolve(Te.dirname(i),`${e}.stx`),Te.resolve(Te.dirname(i),e),Te.resolve(t.componentsDir||"components",`${e}.stx`),Te.resolve(t.componentsDir||"components",e),e.endsWith(".stx")?e:`${e}.stx`]}function br(e){let i=e.endsWith(".stx")?e.slice(0,-4):e,t=i.split("-").map((a)=>a.charAt(0).toUpperCase()+a.slice(1)).join(""),o=j(i);return[i,t,o]}function To(e,i){let[t,o,a]=br(e);for(let h of[t,t.toLowerCase(),o,a]){let c=i?.__importedComponents?.get(h);if(c!==void 0)return c}}function*$o(e,i,t={},o){let a=br(e);if(a[0].startsWith("./")||a[0].startsWith("../")){yield Te.resolve(Te.dirname(i),`${a[0]}.stx`);return}let h=[...new Set(a.map((E)=>`${E}.stx`))],c=t.projectRoot||process.cwd(),v=[...o?.__originalFilePath?[Te.join(Te.dirname(o.__originalFilePath),"components")]:[],...t.componentsDir?[t.componentsDir]:[],Te.join(Te.dirname(i),"components"),Te.resolve(c,"src/components"),Te.resolve(c,"components"),...import.meta.dir?[Te.resolve(import.meta.dir,"components")]:[]];for(let E of new Set(v)){for(let R of h)yield Te.join(E,R);try{for(let R of Tn.readdirSync(E,{withFileTypes:!0}))if(R.isDirectory())for(let C of h)yield Te.join(E,R.name,C)}catch{}}}function yr(e,i,t={},o){let a=To(e,o);if(a!==void 0)return a;for(let h of $o(e,i,t,o))try{if(Tn.statSync(h,{throwIfNoEntry:!1})?.isFile())return h}catch{}return null}import Xs from"fs";import le from"path";import gt from"path";import Zt from"fs";var po=new Set(["touchstart","touchmove","wheel","mousewheel"]);function ss(e,i){if(i.passive)return!0;if(i.prevent||i.nonpassive)return!1;return po.has(e.toLowerCase())}var _r=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"]),wr={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"},go=new Set(["ctrl","alt","shift","meta"]),vr={left:0,middle:1,right:2};function Sr(e){let i={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 o=t.toLowerCase();if(o==="prevent")i.prevent=!0;else if(o==="stop")i.stop=!0;else if(o==="once")i.once=!0;else if(o==="capture")i.capture=!0;else if(o==="self")i.self=!0;else if(o==="passive")i.passive=!0;else if(o==="nonpassive")i.nonpassive=!0;else if(go.has(o))i.systemKeys.push(o);else if(o in vr)i.mouse=o;else if(o in wr||/^[a-z]$/.test(o))i.keys.push(wr[o]||o.toUpperCase());else if(o.startsWith("debounce")){let a=o.match(/debounce(?:\.(\d+))?/);i.debounce=a?.[1]?Number.parseInt(a[1],10):300}else if(o.startsWith("throttle")){let a=o.match(/throttle(?:\.(\d+))?/);i.throttle=a?.[1]?Number.parseInt(a[1],10):300}}return i}function Er(e,i=""){let t=[],o=0,a=/<([a-z][a-z0-9-]*)\s+([^>]*@[a-z][^>]*)>/gi,h;while((h=a.exec(e))!==null){let[c,v,E]=h,R=h.index,C=R+c.length,O=`__stx_evt_${i}${o++}`,M=[],N=/@([a-z][a-z0-9.]*)\s*=\s*"([^"]*)"/gi,I;while((I=N.exec(E))!==null){let[,q,Z]=I,K=q.split("."),Q=K[0];if(!_r.has(Q))continue;M.push({attribute:`@${q}`,event:Q,handler:Z,modifiers:Sr(K.slice(1)),elementId:O})}let P=/@([a-z][a-z0-9.]*)\s*=\s*'([^']*)'/gi;while((I=P.exec(E))!==null){let[,q,Z]=I,K=q.split("."),Q=K[0];if(!_r.has(Q))continue;M.push({attribute:`@${q}`,event:Q,handler:Z,modifiers:Sr(K.slice(1)),elementId:O})}if(M.length>0)t.push({originalTag:c,elementId:O,events:M,startIndex:R,endIndex:C})}return t}function mo(e){let i=[],{modifiers:t}=e;if(t.self)i.push("if ($event.target !== $el) return");for(let o of t.systemKeys)i.push(`if (!$event.${o}Key) return`);if(t.keys.length>0){let o=t.keys.map((a)=>`$event.key === '${a}'`).join(" || ");i.push(`if (!(${o})) return`)}if(t.mouse!==null){let o=vr[t.mouse];i.push(`if ($event.button !== ${o}) return`)}if(t.prevent)i.push("$event.preventDefault()");if(t.stop)i.push("$event.stopPropagation()");return i.join("; ")}function ho(e,i){let t=e;if(i.debounce!==null)t=`__stx_debounce(() => { ${t} }, ${i.debounce})`;else if(i.throttle!==null)t=`__stx_throttle(() => { ${t} }, ${i.throttle})`;return t}function rs(e){let i=e.trim();if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(i))return e;return`if (typeof ${i} === 'function' && !${i}._isSignal) ${i}($event);`}function xo(e){let{modifiers:i}=e,t=e.elementId.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),o=mo(e),a=ho(rs(e.handler),i),h=[];if(i.once)h.push("once: true");if(i.capture)h.push("capture: true");if(ss(e.event,i))h.push("passive: true");let c=h.length>0?`, { ${h.join(", ")} }`:"",v=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 bo(e,i=""){let t=Er(e,i);if(t.length===0)return{template:e,bindings:[]};let o=e,a=[];for(let h=t.length-1;h>=0;h--){let c=t[h],v=c.originalTag;if(!v.includes(" id="))v=v.replace(/^<([a-z][a-z0-9-]*)/,`<$1 id="${c.elementId}"`);else{let E=v.match(/id=["']([^"']+)["']/);if(E)for(let R of c.events)R.elementId=E[1]}for(let E of c.events){let R=E.attribute.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),C=new RegExp(`\\s*${R}\\s*=\\s*"[^"]*"`,"g"),O=new RegExp(`\\s*${R}\\s*=\\s*'[^']*'`,"g");v=v.replace(C,""),v=v.replace(O,"")}o=o.slice(0,c.startIndex)+v+o.slice(c.endIndex),a.push(...c.events)}return{template:o,bindings:a}}function $r(e){let i=e.$uid;return typeof i==="string"&&i?`${i}_`:""}function Aa(e,i,t){if(pc(e))return e;if(i.__stx_sfc_mode){if(/x-data\s*=\s*["']/.test(e))return e;let{template:v,bindings:E}=bo(e,$r(i)),R=i.__stx_event_bindings||[];return i.__stx_event_bindings=[...R,...E],v}let o=Er(e,$r(i));if(o.length===0)return e;let a=e;for(let v=o.length-1;v>=0;v--){let E=o[v],R=E.originalTag;if(!R.includes(" id="))R=R.replace(/^<([a-z][a-z0-9-]*)/,`<$1 id="${E.elementId}"`);else{let C=R.match(/id=["']([^"']+)["']/);if(C)for(let O of E.events)O.elementId=C[1]}for(let C of E.events){let O=C.attribute.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),M=new RegExp(`\\s*${O}\\s*=\\s*"[^"]*"`,"g"),N=new RegExp(`\\s*${O}\\s*=\\s*'[^']*'`,"g");R=R.replace(M,""),R=R.replace(N,"")}a=a.slice(0,E.startIndex)+R+a.slice(E.endIndex)}let h=Ro(o.flatMap((v)=>v.events)),c=a.lastIndexOf("</body>");if(c!==-1)a=a.slice(0,c)+h+`
115
- `+a.slice(c);else a+=h;return a}function kr(e,i){let t=new Set;for(let o of e.split(",")){let a=o.trim().replace(/^\.\.\./,"").trim();if(!a)continue;if(i){let h=a.lastIndexOf(":");if(h!==-1)a=a.slice(h+1).trim()}if(a=a.split("=")[0].trim(),/^[A-Za-z_$][\w$]*$/.test(a))t.add(a)}return t}function Et(e,i){let t=r(e),{depths:o,balanced:a}=fe(t),h=(v)=>!a||o[v]===0,c=new RegExp(`(?:^|[^\\w$.])((?:const|let|var|function|class)\\s+${i}\\b)`,"g");for(let v of t.matchAll(c)){let E=(v.index??0)+v[0].length-v[1].length;if(h(E))return!0}for(let v of t.matchAll(/(?:const|let|var)\s*\{([^}]*)\}/g))if(h(v.index??0)&&kr(v[1],!0).has(i))return!0;for(let v of t.matchAll(/(?:const|let|var)\s*\[([^\]]*)\]/g))if(h(v.index??0)&&kr(v[1],!1).has(i))return!0;return!1}var Rr="",An,at=/^[A-Za-z_$][\w$]*$/,yo=new Set(["if","for","while","switch","with"]),Cr=["(","[","{"],Tr=[")","]","}"],_o=new Set(["const","let","var","return","if","for","while","do","switch","try","throw","export"]);function wo(e){let i=r(e),t=[];for(let o of i.matchAll(/[A-Za-z_$][\w$]*|=>|\.\.\.|[^\s]/g)){let a=o.index??0;t.push({text:o[0],start:a,end:a+o[0].length})}return{code:i,tokens:t}}function os(e){if(An&&e===Rr)return An;let{code:i,tokens:t}=wo(e),o=new Map,a=[];for(let I=0;I<t.length;I++){let P=t[I].text;if(["(","[","{"].includes(P))a.push(I);else if([")","]","}"].includes(P)){let q=a.at(-1);if(q!==void 0&&["()","[]","{}"].includes(t[q].text+P))a.pop(),o.set(q,I),o.set(I,q)}}function h(I,P){let q=[],Z=I;for(let K=I;K<P;K++){if(["(","[","{"].includes(t[K].text)&&(o.get(K)??P)<P){K=o.get(K);continue}if(t[K].text===",")q.push([Z,K]),Z=K+1}return q.push([Z,P]),q}let c=[];function v(I,P,q,Z=!1){if(t[I]?.text==="...")I++;if(I>=P)return;let K=t[I].text;if(at.test(K)){if(q.add(K),q===C)c.push({name:K,token:I,functionScoped:Z});return}if(K!=="{"&&K!=="[")return;let Q=o.get(I);if(Q===void 0||Q>=P)return;for(let[te,ne]of h(I+1,Q)){let ae=te;if(K==="{")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)&&o.has(me))me=o.get(me)}v(ae,ne,q,Z)}}function E(I,P){let q=new Set;for(let[Z,K]of h(I,P))v(Z,K,q);return q}function R(I){let P=I;for(;P<t.length;P++){let q=t[P].text;if(["(","[","{"].includes(q)&&o.has(P)){P=o.get(P);continue}if([",",";",")","]","}"].includes(q))break}return t[Math.max(I,P-1)]?.end??i.length}let C=new Set,O=[];for(let I=0;I<t.length;I++)if(t[I].text==="=>"){let P=I-1,q=P,Z;if(t[P]?.text===")"&&o.has(P))q=o.get(P),Z=E(q+1,P);else if(t[P]&&at.test(t[P].text))Z=new Set([t[P].text]);else continue;let K=I+1,Q=t[K]?.text==="{"&&o.has(K)?t[o.get(K)].end:R(K);O.push({start:t[q].start,end:Q,bodyStart:t[K]?.start??Q,functionBody:!0,names:Z})}else if(t[I].text==="("&&o.has(I)){let P=t[I-1]?.text;if(!P||yo.has(P)||!at.test(P)&&P!=="*"&&P!=="]")continue;let q=o.get(I),Z=q+1;if(t[Z]?.text===":"){Z++;while(Z<t.length&&!["{","=>",";","="].includes(t[Z].text))Z++}if(t[Z]?.text!=="{"||!o.has(Z))continue;O.push({start:t[I].start,end:t[o.get(Z)].end,bodyStart:t[Z].start,functionBody:P!=="catch",names:E(I+1,q)})}function M(I){let P=I;for(;P<t.length;P++){let q=t[P].text;if(Cr.includes(q)&&o.has(P)){P=o.get(P);continue}if(q===";"||Tr.includes(q))break;let Z=t[P-1];if(P>I&&_o.has(q)&&Z.text!==".")break;if(P>I&&/[\n\r]/.test(i.slice(Z.end,t[P].start))&&(/^[\w$]+$/.test(Z.text)||Tr.includes(Z.text)||['"',"'","`"].includes(Z.text))&&at.test(q)&&!["in","of","instanceof"].includes(q))break}return P}let N=[];for(let I=0;I<t.length;I++){if(t[I].text!=="for")continue;let P=t[I+1]?.text==="await"?I+2:I+1;if(t[P]?.text!=="("||!o.has(P))continue;let q=o.get(P),Z=q+1,K=t[Z]?.text==="{"&&o.has(Z)?o.get(Z):M(Z),Q=t[K]?.text===";"||t[K]?.text==="}"?t[K].end:t[Math.max(Z,K-1)]?.end??i.length;N.push({headStart:P,headEnd:q,start:t[P].start,end:Q})}for(let I=0;I<t.length;I++){let P=t[I].text,q=t[I-1]?.text;if(q==="."||t[I+1]?.text===":")continue;if(q==="as"||q==="<")continue;if(P==="const"||P==="let"||P==="var"){let Z=M(I+1),K=I+1,Q=!1,te=!1,ne=0;for(let ae=I+1;ae<=Z;ae++){let me=t[ae]?.text;if(ae<Z&&Cr.includes(me)&&o.has(ae)&&o.get(ae)<Z){ae=o.get(ae);continue}if(ae<Z&&me===":"&&!te)Q=!0;else if(ae<Z&&me==="="&&ne===0)Q=!1,te=!0;else if(ae<Z&&Q&&me==="<")ne++;else if(ae<Z&&Q&&me===">"&&ne>0)ne--;else if(ae===Z||me===","&&ne===0)v(K,ae,C,P==="var"),K=ae+1,Q=!1,te=!1}}else if(P==="function"||P==="class"){let Z=I+1;if(t[Z]?.text==="*")Z++;if(t[Z]&&at.test(t[Z].text)&&t[Z].text!=="extends")C.add(t[Z].text),c.push({name:t[Z].text,token:Z})}else if(P==="import"){let Z=I+1;if(t[Z]?.text==="*"&&t[Z+1]?.text==="as")Z+=2;let K=t[Z]?.text;if(K&&at.test(K)&&K!=="type"&&t[Z+1]?.text!=="("&&t[Z+1]?.text!==".")C.add(K),c.push({name:K,token:Z,file:!0});let Q=t[Z]?.text==="{"?Z:t[Z+1]?.text===","&&t[Z+2]?.text==="{"?Z+2:-1;if(Q!==-1&&o.has(Q)){let te=o.get(Q);for(let[ne,ae]of h(Q+1,te)){let me=ae-1;while(me>=ne&&!at.test(t[me].text))me--;if(me>=ne&&t[me].text!=="type")c.push({name:t[me].text,token:me,file:!0})}}}}return Rr=e,An={code:i,scopes:O,loops:N,declarations:C,sites:c,tokens:t,pairs:o},An}function fs(e){let i=os(e);return{code:i.code,shadows:(t,o)=>i.scopes.some((a)=>o>=a.start&&o<a.end&&a.names.has(t))}}function In(e){return new Set(os(e).declarations)}function on(e,i){let{scopes:t,loops:o,sites:a,tokens:h,pairs:c}=os(e),v=Array.from({length:h.length},()=>-1),E=[];for(let N=0;N<h.length;N++){v[N]=E.length?E[E.length-1]:-1;let I=h[N].text;if(I==="{"&&c.has(N))E.push(N);else if(I==="}"&&E.length&&c.get(N)===E[E.length-1])E.pop()}let R=new Set,C=new Map;for(let N of a){if(!i.has(N.name))continue;R.add(N.token);let I=N.file?-1:v[N.token],P=I===-1?[0,Number.POSITIVE_INFINITY]:[h[I].start,h[c.get(I)].end];if(N.functionScoped){let Z=h[N.token].start,K=t.filter((Q)=>Q.functionBody&&Z>=Q.bodyStart&&Z<Q.end).sort((Q,te)=>Q.end-Q.bodyStart-(te.end-te.bodyStart))[0];P=K?[K.bodyStart,K.end]:[0,Number.POSITIVE_INFINITY]}else if(!N.file){let Z=o.filter((K)=>N.token>K.headStart&&N.token<K.headEnd).sort((K,Q)=>K.headEnd-K.headStart-(Q.headEnd-Q.headStart))[0];if(Z)P=[Z.start,Z.end]}let q=C.get(N.name);if(q)q.push(P);else C.set(N.name,[P])}let O=new Set;for(let N=0;N<h.length;N++){if(h[N].text!=="import"||h[N-1]?.text===".")continue;let I=N+1;if(h[I]?.text==="type")I++;if(h[I]&&at.test(h[I].text)&&h[I+1]?.text===",")I+=2;if(h[I]?.text==="{"&&c.has(I))for(let P=I+1;P<c.get(I);P++)O.add(P)}let M=new Set;for(let N=0;N<h.length;N++){let I=h[N].text;if(!i.has(I)||M.has(I)||R.has(N)||O.has(N))continue;let P=h[N-1]?.text;if(P==="#"||P==="."&&h[N-2]?.text!=="..")continue;if(h[N+1]?.text===":"&&(P==="{"||P===","))continue;let q=h[N].start;if(C.get(I)?.some(([Z,K])=>q>=Z&&q<K))continue;if(t.some((Z)=>q>=Z.start&&q<Z.end&&Z.names.has(I)))continue;M.add(I)}return M}var Ae="0.2.689";var Ar=Symbol.for(`stx.lazy-module-promises.${Ae}`);function vo(){let e=globalThis;return e[Ar]??=new Map,e[Ar]}function s(e,i){let t=vo(),o=`${import.meta.url}\x00${e}`,a=t.get(o);if(a)return a;let h=i();return t.set(o,h),h.catch(()=>{if(t.get(o)===h)t.delete(o)}),h}var Eo=/<\/(script)/gi;function an(e){if(!e||e.indexOf("</")===-1)return e;return e.replace(Eo,"<\\/$1")}import Pr from"fs";class B{cache=new Map;maxSize;options;sizes;bytes=0;constructor(e=100,i){this.maxSize=e,this.options=i??null,this.sizes=i?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 i=this.cache.keys().next().value;if(i===void 0)break;this.delete(i)}}get(e){if(!this.cache.has(e))return;let i=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,i),i}set(e,i){if(this.cache.has(e))this.delete(e);let t=this.options?this.options.sizeOf(i):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 o=this.cache.keys().next().value;if(o===void 0)break;this.delete(o)}if(this.cache.set(e,i),this.sizes)this.sizes.set(e,t),this.bytes+=t}has(e){return this.cache.has(e)}delete(e){if(this.sizes){let i=this.sizes.get(e);if(i!==void 0)this.bytes-=i,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,ko=500;function Tt(e,i){if(i?.includes("g"))return new RegExp(e,i);let t=`${e}:${i||""}`;if(!St.has(t)){if(St.size>=ko){let o=St.keys().next().value;if(o)St.delete(o)}St.set(t,new RegExp(e,i))}return St.get(t)}class Ir{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(e){let i=Array.from(new Set(e)),t=i.sort().join(","),o=this.pool.find((v)=>v.context.join(",")===t);if(o)return o.func;let a=this.fnCache,h=this.fnCacheMaxSize,c=(...v)=>(E)=>{try{let R=`${t}:${E}`,C=a.get(R);if(!C){if(a.size>=h){let O=a.keys().next().value;if(O)a.delete(O)}C=Function(...i,`
115
+ `+a.slice(c);else a+=h;return a}function kr(e,i){let t=new Set;for(let o of e.split(",")){let a=o.trim().replace(/^\.\.\./,"").trim();if(!a)continue;if(i){let h=a.lastIndexOf(":");if(h!==-1)a=a.slice(h+1).trim()}if(a=a.split("=")[0].trim(),/^[A-Za-z_$][\w$]*$/.test(a))t.add(a)}return t}function Et(e,i){let t=r(e),{depths:o,balanced:a}=fe(t),h=(v)=>!a||o[v]===0,c=new RegExp(`(?:^|[^\\w$.])((?:const|let|var|function|class)\\s+${i}\\b)`,"g");for(let v of t.matchAll(c)){let E=(v.index??0)+v[0].length-v[1].length;if(h(E))return!0}for(let v of t.matchAll(/(?:const|let|var)\s*\{([^}]*)\}/g))if(h(v.index??0)&&kr(v[1],!0).has(i))return!0;for(let v of t.matchAll(/(?:const|let|var)\s*\[([^\]]*)\]/g))if(h(v.index??0)&&kr(v[1],!1).has(i))return!0;return!1}var Rr="",An,at=/^[A-Za-z_$][\w$]*$/,yo=new Set(["if","for","while","switch","with"]),Cr=["(","[","{"],Tr=[")","]","}"],_o=new Set(["const","let","var","return","if","for","while","do","switch","try","throw","export"]);function wo(e){let i=r(e),t=[];for(let o of i.matchAll(/[A-Za-z_$][\w$]*|=>|\.\.\.|[^\s]/g)){let a=o.index??0;t.push({text:o[0],start:a,end:a+o[0].length})}return{code:i,tokens:t}}function os(e){if(An&&e===Rr)return An;let{code:i,tokens:t}=wo(e),o=new Map,a=[];for(let I=0;I<t.length;I++){let P=t[I].text;if(["(","[","{"].includes(P))a.push(I);else if([")","]","}"].includes(P)){let q=a.at(-1);if(q!==void 0&&["()","[]","{}"].includes(t[q].text+P))a.pop(),o.set(q,I),o.set(I,q)}}function h(I,P){let q=[],Z=I;for(let K=I;K<P;K++){if(["(","[","{"].includes(t[K].text)&&(o.get(K)??P)<P){K=o.get(K);continue}if(t[K].text===",")q.push([Z,K]),Z=K+1}return q.push([Z,P]),q}let c=[];function v(I,P,q,Z=!1){if(t[I]?.text==="...")I++;if(I>=P)return;let K=t[I].text;if(at.test(K)){if(q.add(K),q===C)c.push({name:K,token:I,functionScoped:Z});return}if(K!=="{"&&K!=="[")return;let Q=o.get(I);if(Q===void 0||Q>=P)return;for(let[te,ne]of h(I+1,Q)){let ae=te;if(K==="{")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)&&o.has(me))me=o.get(me)}v(ae,ne,q,Z)}}function E(I,P){let q=new Set;for(let[Z,K]of h(I,P))v(Z,K,q);return q}function R(I){let P=I;for(;P<t.length;P++){let q=t[P].text;if(["(","[","{"].includes(q)&&o.has(P)){P=o.get(P);continue}if([",",";",")","]","}"].includes(q))break}return t[Math.max(I,P-1)]?.end??i.length}let C=new Set,O=[];for(let I=0;I<t.length;I++)if(t[I].text==="=>"){let P=I-1,q=P,Z;if(t[P]?.text===")"&&o.has(P))q=o.get(P),Z=E(q+1,P);else if(t[P]&&at.test(t[P].text))Z=new Set([t[P].text]);else continue;let K=I+1,Q=t[K]?.text==="{"&&o.has(K)?t[o.get(K)].end:R(K);O.push({start:t[q].start,end:Q,bodyStart:t[K]?.start??Q,functionBody:!0,names:Z})}else if(t[I].text==="("&&o.has(I)){let P=t[I-1]?.text;if(!P||yo.has(P)||!at.test(P)&&P!=="*"&&P!=="]")continue;let q=o.get(I),Z=q+1;if(t[Z]?.text===":"){Z++;while(Z<t.length&&!["{","=>",";","="].includes(t[Z].text))Z++}if(t[Z]?.text!=="{"||!o.has(Z))continue;O.push({start:t[I].start,end:t[o.get(Z)].end,bodyStart:t[Z].start,functionBody:P!=="catch",names:E(I+1,q)})}function M(I){let P=I;for(;P<t.length;P++){let q=t[P].text;if(Cr.includes(q)&&o.has(P)){P=o.get(P);continue}if(q===";"||Tr.includes(q))break;let Z=t[P-1];if(P>I&&_o.has(q)&&Z.text!==".")break;if(P>I&&/[\n\r]/.test(i.slice(Z.end,t[P].start))&&(/^[\w$]+$/.test(Z.text)||Tr.includes(Z.text)||['"',"'","`"].includes(Z.text))&&at.test(q)&&!["in","of","instanceof"].includes(q))break}return P}let N=[];for(let I=0;I<t.length;I++){if(t[I].text!=="for")continue;let P=t[I+1]?.text==="await"?I+2:I+1;if(t[P]?.text!=="("||!o.has(P))continue;let q=o.get(P),Z=q+1,K=t[Z]?.text==="{"&&o.has(Z)?o.get(Z):M(Z),Q=t[K]?.text===";"||t[K]?.text==="}"?t[K].end:t[Math.max(Z,K-1)]?.end??i.length;N.push({headStart:P,headEnd:q,start:t[P].start,end:Q})}for(let I=0;I<t.length;I++){let P=t[I].text,q=t[I-1]?.text;if(q==="."||t[I+1]?.text===":")continue;if(q==="as"||q==="<")continue;if(P==="const"||P==="let"||P==="var"){let Z=M(I+1),K=I+1,Q=!1,te=!1,ne=0;for(let ae=I+1;ae<=Z;ae++){let me=t[ae]?.text;if(ae<Z&&Cr.includes(me)&&o.has(ae)&&o.get(ae)<Z){ae=o.get(ae);continue}if(ae<Z&&me===":"&&!te)Q=!0;else if(ae<Z&&me==="="&&ne===0)Q=!1,te=!0;else if(ae<Z&&Q&&me==="<")ne++;else if(ae<Z&&Q&&me===">"&&ne>0)ne--;else if(ae===Z||me===","&&ne===0)v(K,ae,C,P==="var"),K=ae+1,Q=!1,te=!1}}else if(P==="function"||P==="class"){let Z=I+1;if(t[Z]?.text==="*")Z++;if(t[Z]&&at.test(t[Z].text)&&t[Z].text!=="extends")C.add(t[Z].text),c.push({name:t[Z].text,token:Z})}else if(P==="import"){let Z=I+1;if(t[Z]?.text==="*"&&t[Z+1]?.text==="as")Z+=2;let K=t[Z]?.text;if(K&&at.test(K)&&K!=="type"&&t[Z+1]?.text!=="("&&t[Z+1]?.text!==".")C.add(K),c.push({name:K,token:Z,file:!0});let Q=t[Z]?.text==="{"?Z:t[Z+1]?.text===","&&t[Z+2]?.text==="{"?Z+2:-1;if(Q!==-1&&o.has(Q)){let te=o.get(Q);for(let[ne,ae]of h(Q+1,te)){let me=ae-1;while(me>=ne&&!at.test(t[me].text))me--;if(me>=ne&&t[me].text!=="type")c.push({name:t[me].text,token:me,file:!0})}}}}return Rr=e,An={code:i,scopes:O,loops:N,declarations:C,sites:c,tokens:t,pairs:o},An}function fs(e){let i=os(e);return{code:i.code,shadows:(t,o)=>i.scopes.some((a)=>o>=a.start&&o<a.end&&a.names.has(t))}}function In(e){return new Set(os(e).declarations)}function on(e,i){let{scopes:t,loops:o,sites:a,tokens:h,pairs:c}=os(e),v=Array.from({length:h.length},()=>-1),E=[];for(let N=0;N<h.length;N++){v[N]=E.length?E[E.length-1]:-1;let I=h[N].text;if(I==="{"&&c.has(N))E.push(N);else if(I==="}"&&E.length&&c.get(N)===E[E.length-1])E.pop()}let R=new Set,C=new Map;for(let N of a){if(!i.has(N.name))continue;R.add(N.token);let I=N.file?-1:v[N.token],P=I===-1?[0,Number.POSITIVE_INFINITY]:[h[I].start,h[c.get(I)].end];if(N.functionScoped){let Z=h[N.token].start,K=t.filter((Q)=>Q.functionBody&&Z>=Q.bodyStart&&Z<Q.end).sort((Q,te)=>Q.end-Q.bodyStart-(te.end-te.bodyStart))[0];P=K?[K.bodyStart,K.end]:[0,Number.POSITIVE_INFINITY]}else if(!N.file){let Z=o.filter((K)=>N.token>K.headStart&&N.token<K.headEnd).sort((K,Q)=>K.headEnd-K.headStart-(Q.headEnd-Q.headStart))[0];if(Z)P=[Z.start,Z.end]}let q=C.get(N.name);if(q)q.push(P);else C.set(N.name,[P])}let O=new Set;for(let N=0;N<h.length;N++){if(h[N].text!=="import"||h[N-1]?.text===".")continue;let I=N+1;if(h[I]?.text==="type")I++;if(h[I]&&at.test(h[I].text)&&h[I+1]?.text===",")I+=2;if(h[I]?.text==="{"&&c.has(I))for(let P=I+1;P<c.get(I);P++)O.add(P)}let M=new Set;for(let N=0;N<h.length;N++){let I=h[N].text;if(!i.has(I)||M.has(I)||R.has(N)||O.has(N))continue;let P=h[N-1]?.text;if(P==="#"||P==="."&&h[N-2]?.text!=="..")continue;if(h[N+1]?.text===":"&&(P==="{"||P===","))continue;let q=h[N].start;if(C.get(I)?.some(([Z,K])=>q>=Z&&q<K))continue;if(t.some((Z)=>q>=Z.start&&q<Z.end&&Z.names.has(I)))continue;M.add(I)}return M}var Ae="0.2.690";var Ar=Symbol.for(`stx.lazy-module-promises.${Ae}`);function vo(){let e=globalThis;return e[Ar]??=new Map,e[Ar]}function s(e,i){let t=vo(),o=`${import.meta.url}\x00${e}`,a=t.get(o);if(a)return a;let h=i();return t.set(o,h),h.catch(()=>{if(t.get(o)===h)t.delete(o)}),h}var Eo=/<\/(script)/gi;function an(e){if(!e||e.indexOf("</")===-1)return e;return e.replace(Eo,"<\\/$1")}import Pr from"fs";class B{cache=new Map;maxSize;options;sizes;bytes=0;constructor(e=100,i){this.maxSize=e,this.options=i??null,this.sizes=i?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 i=this.cache.keys().next().value;if(i===void 0)break;this.delete(i)}}get(e){if(!this.cache.has(e))return;let i=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,i),i}set(e,i){if(this.cache.has(e))this.delete(e);let t=this.options?this.options.sizeOf(i):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 o=this.cache.keys().next().value;if(o===void 0)break;this.delete(o)}if(this.cache.set(e,i),this.sizes)this.sizes.set(e,t),this.bytes+=t}has(e){return this.cache.has(e)}delete(e){if(this.sizes){let i=this.sizes.get(e);if(i!==void 0)this.bytes-=i,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,ko=500;function Tt(e,i){if(i?.includes("g"))return new RegExp(e,i);let t=`${e}:${i||""}`;if(!St.has(t)){if(St.size>=ko){let o=St.keys().next().value;if(o)St.delete(o)}St.set(t,new RegExp(e,i))}return St.get(t)}class Ir{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(e){let i=Array.from(new Set(e)),t=i.sort().join(","),o=this.pool.find((v)=>v.context.join(",")===t);if(o)return o.func;let a=this.fnCache,h=this.fnCacheMaxSize,c=(...v)=>(E)=>{try{let R=`${t}:${E}`,C=a.get(R);if(!C){if(a.size>=h){let O=a.keys().next().value;if(O)a.delete(O)}C=Function(...i,`
116
116
  'use strict';
117
117
  try {
118
118
  return ${E};
@@ -193,7 +193,7 @@ else {
193
193
  // STX: auto-generated event bindings
194
194
  ${e.map((t,o)=>aa(t,o)).join(`
195
195
  `)}`}function Lr(e){let i=[],t=new Set,o=e.replace(/^\s*import\s+.*$/gm,""),a=0,h=o.length,c=0;while(c<h){let v=o[c];if(v==="'"||v==='"'||v==="`"){let E=v;if(c++,E==="`"){let R=0;while(c<h){if(o[c]==="\\"){c+=2;continue}if(o[c]==="`"&&R===0){c++;break}if(o[c]==="$"&&o[c+1]==="{"){R++,c+=2;continue}if(o[c]==="}"&&R>0){R--,c++;continue}c++}}else while(c<h){if(o[c]==="\\"){c+=2;continue}if(o[c]===E){c++;break}c++}continue}if(v==="/"&&o[c+1]==="/"){while(c<h&&o[c]!==`
196
- `)c++;continue}if(v==="/"&&o[c+1]==="*"){c+=2;while(c<h-1&&!(o[c]==="*"&&o[c+1]==="/"))c++;c+=2;continue}if(v==="{"){a++,c++;continue}if(v==="}"){a--,c++;continue}if(a===0){let E=o.slice(c),R=E.match(/^(?:const|let|var)\s+([a-zA-Z_$]\w*)\s*(?::[^=]*)?=/);if(R){let M=R[1];if(!M.startsWith("_")&&!t.has(M))i.push(M),t.add(M);c+=R[0].length;continue}let C=E.match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(C){C[1].split(",").forEach((M)=>{let N=M.trim(),I=N.indexOf(":"),P=I>=0?N.slice(I+1).trim().split(/[\s=]/)[0]:N.split(/[\s=]/)[0];if(P&&!P.startsWith("_")&&!t.has(P))i.push(P),t.add(P)}),c+=C[0].length;continue}let O=E.match(/^(?:async\s+)?function\s+([a-zA-Z_$]\w*)/);if(O){let M=O[1];if(!M.startsWith("_")&&!t.has(M))i.push(M),t.add(M);c+=O[0].length;continue}}c++}return i}var la=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 ua(e){let i=new Set,t=/[a-zA-Z_$][a-zA-Z0-9_$]*/g;function o(M){let N;while((N=t.exec(M))!==null){let I=N[0];if(!la.has(I))i.add(I)}}let a=/\{\{([\s\S]*?)\}\}/g,h;while((h=a.exec(e))!==null)o(h[1]);let c=/:[a-z][\w.-]*\s*=\s*"([^"]*)"/gi;while((h=c.exec(e))!==null)o(h[1]);let v=/:[a-z][\w.-]*\s*=\s*'([^']*)'/gi;while((h=v.exec(e))!==null)o(h[1]);let E=/@[a-z]+(?:\.[a-z]+)*\s*=\s*"([^"]*)"/gi;while((h=E.exec(e))!==null)o(h[1]);let R=/@[a-z]+(?:\.[a-z]+)*\s*=\s*'([^']*)'/gi;while((h=R.exec(e))!==null)o(h[1]);let C=/@model\s*=\s*["']([^"']*)["']/gi;while((h=C.exec(e))!==null)o(h[1]);let O=/@for\s*=\s*["'][^"']*\bin\s+([^"']+)["']/gi;while((h=O.exec(e))!==null)o(h[1]);return i}async function De(e,i={}){let t=e,o="",a=!1,h=[],c=Lo(t,{filePath:i.filePath,projectRoot:i.projectRoot});t=c.code;let v=jo(c.styles),E=It(t);t=E.code,h=[...E.imports,...E.models];let{hasUserImports:R,bundleClientScript:C}=await s("stx/client-script-bundler",()=>import("./chunk-qa2mkh94.js"));if(R(t))t=await C(t,i.filePath||"",{projectRoot:i.projectRoot,minify:i.production}),a=!0;if(i.autoImports!==!1){let Q=Xa(t);t=Q.code,o=Ja(Q.stxImports,Q.browserImports.filter((te)=>!h.includes(te)))}if(o=`${fn(t,i.serverData)}${o}`,t=T(t),!a&&Me(i.attrs||""))t=Le(t);let O=ca(i.eventBindings||[]),M=(i.attrs||"").trim(),N=/\btype\s*=\s*["']module["']/i.test(M),I=i.instanceId?` data-stx-instance="${i.instanceId}"`:"";if(N){let Q=M.replace(/\btype\s*=\s*["']module["']/i,"").trim(),te=`type="module" data-stx-scoped${I}${Q?` ${Q}`:""}`;return`${v}<script ${te}>
196
+ `)c++;continue}if(v==="/"&&o[c+1]==="*"){c+=2;while(c<h-1&&!(o[c]==="*"&&o[c+1]==="/"))c++;c+=2;continue}if(v==="{"){a++,c++;continue}if(v==="}"){a--,c++;continue}if(a===0){let E=o.slice(c),R=E.match(/^(?:const|let|var)\s+([a-zA-Z_$]\w*)\s*(?::[^=]*)?=/);if(R){let M=R[1];if(!M.startsWith("_")&&!t.has(M))i.push(M),t.add(M);c+=R[0].length;continue}let C=E.match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(C){C[1].split(",").forEach((M)=>{let N=M.trim(),I=N.indexOf(":"),P=I>=0?N.slice(I+1).trim().split(/[\s=]/)[0]:N.split(/[\s=]/)[0];if(P&&!P.startsWith("_")&&!t.has(P))i.push(P),t.add(P)}),c+=C[0].length;continue}let O=E.match(/^(?:async\s+)?function\s+([a-zA-Z_$]\w*)/);if(O){let M=O[1];if(!M.startsWith("_")&&!t.has(M))i.push(M),t.add(M);c+=O[0].length;continue}}c++}return i}var la=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 ua(e){let i=new Set,t=/[a-zA-Z_$][a-zA-Z0-9_$]*/g;function o(M){let N;while((N=t.exec(M))!==null){let I=N[0];if(!la.has(I))i.add(I)}}let a=/\{\{([\s\S]*?)\}\}/g,h;while((h=a.exec(e))!==null)o(h[1]);let c=/:[a-z][\w.-]*\s*=\s*"([^"]*)"/gi;while((h=c.exec(e))!==null)o(h[1]);let v=/:[a-z][\w.-]*\s*=\s*'([^']*)'/gi;while((h=v.exec(e))!==null)o(h[1]);let E=/@[a-z]+(?:\.[a-z]+)*\s*=\s*"([^"]*)"/gi;while((h=E.exec(e))!==null)o(h[1]);let R=/@[a-z]+(?:\.[a-z]+)*\s*=\s*'([^']*)'/gi;while((h=R.exec(e))!==null)o(h[1]);let C=/@model\s*=\s*["']([^"']*)["']/gi;while((h=C.exec(e))!==null)o(h[1]);let O=/@for\s*=\s*["'][^"']*\bin\s+([^"']+)["']/gi;while((h=O.exec(e))!==null)o(h[1]);return i}async function De(e,i={}){let t=e,o="",a=!1,h=[],c=Lo(t,{filePath:i.filePath,projectRoot:i.projectRoot});t=c.code;let v=jo(c.styles),E=It(t);t=E.code,h=[...E.imports,...E.models];let{hasUserImports:R,bundleClientScript:C}=await s("stx/client-script-bundler",()=>import("./chunk-v7xpafs9.js"));if(R(t))t=await C(t,i.filePath||"",{projectRoot:i.projectRoot,minify:i.production}),a=!0;if(i.autoImports!==!1){let Q=Xa(t);t=Q.code,o=Ja(Q.stxImports,Q.browserImports.filter((te)=>!h.includes(te)))}if(o=`${fn(t,i.serverData)}${o}`,t=T(t),!a&&Me(i.attrs||""))t=Le(t);let O=ca(i.eventBindings||[]),M=(i.attrs||"").trim(),N=/\btype\s*=\s*["']module["']/i.test(M),I=i.instanceId?` data-stx-instance="${i.instanceId}"`:"";if(N){let Q=M.replace(/\btype\s*=\s*["']module["']/i,"").trim(),te=`type="module" data-stx-scoped${I}${Q?` ${Q}`:""}`;return`${v}<script ${te}>
197
197
  ${an(`${o}${t}
198
198
  ${O}`)}
199
199
  </script>`}let P=Zo(e),q=/function __stx_setup_/.test(t),Z=/\bstx\.mount\s*\(|\bstx\.mountEl\s*\(/.test(e);function K(Q){let te=Q.length>0?`
@@ -286,8 +286,8 @@ ${R.join(`
286
286
  `)a++;return!0}if(e[a]==="/"&&e[a+1]==="*"){a+=2;while(a<h-1&&!(e[a]==="*"&&e[a+1]==="/"))a++;return a+=2,!0}return!1},R=()=>{if(o!==0)return;let C=e.slice(a).match(/^(const|let|var)\s*\{([^}]+)\}\s*=/);if(C){let I=C[2].split(",").map((P)=>{let q=P.trim().split(":");return q[q.length-1].trim()});for(let P of I)if(P&&/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(P)&&!t.has(P))i.push(P),t.add(P);return}let O=e.slice(a).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(O){let I=O[2];if(!t.has(I))i.push(I),t.add(I);return}let M=e.slice(a).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(M){let I=M[1];if(!t.has(I))i.push(I),t.add(I);return}let N=e.slice(a).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(N){let I=N[1];if(!t.has(I))i.push(I),t.add(I)}};while(a<h){if(E())continue;if(e[a]==="'"||e[a]==='"'){c(e[a]);continue}if(e[a]==="`"){v();continue}if(e[a]==="{"){o++,a++;continue}if(e[a]==="}"){o--,a++;continue}if(o===0&&/[a-z]/i.test(e[a])&&(a===0||/\s|[;{}()]/.test(e[a-1])))R();a++}return i}function hl(e){let i=[],t=0,o=0,a=null;for(let h=0;h<e.length;h++){let c=e[h];if(a){if(c==="\\"){h++;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)i.push(e.slice(o,h)),o=h+1}if(o<e.length)i.push(e.slice(o));return i}function xl(e){let i=0,t=null;for(let o=0;o<e.length;o++){let a=e[o];if(t){if(a==="\\"){o++;continue}if(a===t)t=null;continue}if(a==='"'||a==="'"||a==="`"){t=a;continue}if(a==="("||a==="["||a==="{")i++;else if(a===")"||a==="]"||a==="}")i--;else if(a==="="&&i===0){let h=e[o-1],c=e[o+1];if(h==="!"||h==="<"||h===">"||h==="=")continue;if(c==="="||c===">")continue;return o}}return-1}function bl(e,i){try{let t=/=\s*(?:withDefaults\s*\([\s\S]*?defineProps|defineProps)\b/.exec(e);if(!t)return;let o=t.index-1;while(o>=0&&/\s/.test(e[o]))o--;if(e[o]!=="}")return;let a=o,h=0,c=-1;for(;o>=0;o--){let E=e[o];if(E==="}")h++;else if(E==="{"){if(h--,h===0){c=o;break}}}if(c===-1)return;let v=e.slice(c+1,a);for(let E of hl(v)){let R=E.trim();if(!R||R.startsWith("..."))continue;let C=xl(R);if(C===-1)continue;let O=R.slice(0,C).trim();if(!/^[A-Z_$][\w$]*$/i.test(O))continue;if(i[O]!==void 0)continue;let M=R.slice(C+1).trim();if(!M)continue;try{let N=Object.keys(i).filter(Dt),I=Function(...N,`"use strict"; return (${M});`);i[O]=I(...N.map((P)=>i[P]))}catch{}}}catch{}}var yl=new Set(["tr","td","th","thead","tbody","tfoot","caption","colgroup","col","option","optgroup","li","dt","dd","span"]);function iu(e,i){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 o=t[2].toLowerCase();if(!yl.has(o))return null;let a=new RegExp(`<\\/?${o}(?=[\\s/>])(?:[^>"']|"[^"]*"|'[^']*')*>`,"iy"),h=z(e,(R,C)=>(a.lastIndex=C,a.exec(R)?.index===C?a.lastIndex:-1));if(o==="span"&&/\sdata-stx-scope\s*=/.test(h[0]?.token||""))return null;let c=0,v=!1;for(let R of h){if(c+=R.token.startsWith("</")?-1:1,c<0)return null;if(c===0){if(e.slice(R.end).trim())return null;v=!0;break}}if(!v)return null;let E=t[0].length;return e.slice(0,E)+i+e.slice(E)}async function pr(e,i,t,o,a){let h=e.endsWith(".stx")?e.slice(0,-4):e,c=(ne)=>ne.split("-").map((ae)=>ae.charAt(0).toUpperCase()+ae.slice(1)).join(""),v=t.__importedComponents;if(v){for(let ne of[h,h.toLowerCase(),c(h),j(h)])if(v.has(ne))return!0}let E=[...new Set([`${h}.stx`,`${c(h)}.stx`,`${j(h)}.stx`])],R=typeof a.root==="string"?le.resolve(a.root):void 0,C=R??le.dirname(o),O=[],M=(ne)=>{if(ne&&!O.includes(ne))O.push(ne)},N=t.__originalFilePath;if(N)M(le.join(le.dirname(N),"components"));M(i),M(a._rootComponentsDir),M(le.join(le.dirname(o),"components")),M(a.componentsDir);let I=a._targetComponentFallbackNames?.some((ne)=>ne.toLowerCase()===h.toLowerCase());if(!I)for(let ne of a._targetComponentDirs??[])M(ne);if(R)M(le.resolve(R,"resources/views/components")),M(le.resolve(R,"resources/components")),M(le.resolve(R,"src/components")),M(le.resolve(R,"components"));for(let ne of a._layerComponentDirs??[])M(ne);let P=a._pluginComponentDirs;if(Array.isArray(P))for(let ne of P)M(typeof ne==="string"?ne:null);if(M(a.fallbackComponentsDir),I)for(let ne of a._targetComponentDirs??[])M(ne);if(h.startsWith("./")||h.startsWith("../"))return n(le.resolve(le.dirname(o),`${h}.stx`));let q=Vi(le.resolve(import.meta.dir,"components")),Z=O.map((ne)=>le.isAbsolute(ne)?ne:le.resolve(C,ne)),K=`${E.join("\x00")}\x00\x00${Z.join("\x00")}`,Q=Hs.get(K);if(Q!==void 0)return Q;let te=!1;e:for(let ne of Z){if(Vi(ne)===q)continue;for(let ae of E)if(await n(le.join(ne,ae))){te=!0;break e}}return Hs.set(K,te),te}function Vi(e){let i=Ks.get(e);if(i!==void 0)return i;let t=e;try{t=Xs.realpathSync(e)}catch{}return Ks.set(e,t),t}function au(e){return e==="visible"||e==="idle"||e==="interaction"||e.startsWith("media:")}function Ya(e){if(!e)return!1;let i=e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"");return/\{\{[\s\S]*?\}\}|\{!![\s\S]*?!!\}/.test(i)}function _l(e,i,t){if(!e.includes("{{")&&!e.includes("{!!"))return e;let o=(a,h)=>{let c;try{c=_(a,i)}catch{return h}if(c===void 0||c===null)return"";let v=String(c);if(/<\/style/i.test(v))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 v};return e.replace(/\{!!([\s\S]*?)!!\}/g,(a,h)=>o(h,a)).replace(/\{\{([\s\S]*?)\}\}/g,(a,h)=>o(h,a))}var Ui=new Set;function Hi(e,i,t,o){let a=`${e}\x00${i}\x00${o??""}`;if(!process.env.STX_DEBUG&&Ui.has(a))return;Ui.add(a);let h=i?` used in ${i}`:"",c=o?` Cause: ${o}.`:"",v=t.length>0?`
287
287
  searched:
288
288
  ${t.map((E)=>` - ${E}`).join(`
289
- `)}`:"";console.error(`[stx] component <${e}> could not be resolved${h}, so it rendered as nothing.${c}${v}`)}function Ki(e){return`<!-- stx: component "${e.replace(/--+/g,"-")}" could not be resolved; see the server log -->`}function Fo(e){let i=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 o of e){let a;while((a=t.exec(o))!==null)i.add(a[1]);t.lastIndex=0}return[...i]}async function je(e,i,t,o,a,h,c,v=new Set,E,R=et(a),C,O=e){let{extractVariables:M}=await s("stx/variable-extractor",()=>import("./chunk-0s6kqr1h.js")),N=v??new Set;if(N.has(e))return`[Circular component reference: ${e}]`;let I=new Set(N);I.add(e);let P=typeof i.client==="string"?i.client.trim():"";if("client"in i)delete i.client;let q=P&&P!=="load"&&au(P)?P:"";try{let Z=(ce)=>ce.split("-").map((ie)=>ie.charAt(0).toUpperCase()+ie.slice(1)).join(""),K=O.endsWith(".stx")?O.slice(0,-4):O,Q=null,te=a.__importedComponents;if(te){let ce=[K,K.toLowerCase(),Z(K),j(K)];for(let ie of ce)if(te.has(ie)){Q=te.get(ie);break}}let ne=[];if(!Q){let ce=[`${K}.stx`,`${Z(K)}.stx`,`${j(K)}.stx`],ie=[...new Set(ce)],he=a.__originalFilePath,xe=[];if(xe.push(...c._layerComponentDirs??[]),he){let _e=le.join(le.dirname(he),"components");xe.push(_e)}if(o)xe.push(o);let Ke=c._rootComponentsDir;if(typeof Ke==="string"&&!xe.includes(Ke))xe.push(Ke);let Ce=le.join(le.dirname(h),"components");if(!xe.includes(Ce))xe.push(Ce);if(c.componentsDir&&c.componentsDir!==o&&!xe.includes(c.componentsDir))xe.push(c.componentsDir);let pt=c._nativeHostAttrs&&/^(?:checkbox|switch)$/i.test(K),rt=(C?.events??[]).map((_e)=>_e.replace(/^@/,"").split(".")[0].toLowerCase().replace(/-/g,"")),Ut=Object.hasOwn(i,"checked")||Boolean(C?.reactiveProps?.includes("checked")),dt=Object.hasOwn(i,"value")||Boolean(C?.reactiveProps?.includes("value")),yt=!rt.includes("valuechange")&&(Ut||rt.includes("change")&&!dt),wn=c._nativeHostAttrs&&/^textinput$/i.test(K),Yn=rt.includes("update:value")&&!rt.includes("input"),Ht=c._nativeHostAttrs&&/^video$/i.test(K),_t=Object.hasOwn(i,"src")||Boolean(C?.reactiveProps?.includes("src")),Sn=Object.hasOwn(i,"source")||Boolean(C?.reactiveProps?.includes("source")),$n=Ht&&_t&&!Sn&&(C?.events??[]).every((_e)=>/^(?:play|pause|ended|timeupdate|loadedmetadata|loadstart|error)$/.test(_e.replace(/^@/,"").split(".")[0])),Kt=c._targetComponentFallbackNames?.some((_e)=>_e.toLowerCase()===K.toLowerCase())&&(!pt||yt)&&(!wn||Yn)&&(!Ht||$n);for(let _e of Kt?[]:c._targetComponentDirs??[])if(_e&&!xe.includes(_e))xe.push(_e);let it=typeof c.root==="string"?le.resolve(c.root):void 0,vn=it??le.dirname(h),wt=[];if(it)wt.push(le.resolve(it,"resources/views/components")),wt.push(le.resolve(it,"resources/components")),wt.push(le.resolve(it,"src/components")),wt.push(le.resolve(it,"components"));wt.push(le.resolve(import.meta.dir,"components"));for(let _e of wt)if(!xe.includes(_e))xe.push(_e);let nr=c._pluginComponentDirs;if(Array.isArray(nr)){for(let _e of nr)if(typeof _e==="string"&&!xe.includes(_e))xe.push(_e)}if(c.fallbackComponentsDir&&!xe.includes(c.fallbackComponentsDir))xe.push(c.fallbackComponentsDir);if(Kt){for(let _e of c._targetComponentDirs??[])if(_e&&!xe.includes(_e))xe.push(_e)}let sr=[...new Set(xe.map((_e)=>{if(!_e)return _e;return le.isAbsolute(_e)?_e:le.resolve(vn,_e)}))];xe.length=0,xe.push(...sr);let Qn=`${K}\x00${h}\x00${sr.join("\x00")}`,es=Hn.get(Qn);if(es)if(await n(es))Q=es;else Hn.delete(Qn);if(!Q&&(K.startsWith("./")||K.startsWith("../")))Q=le.resolve(le.dirname(h),`${K}.stx`),ne.push(Q);else if(!Q)for(let _e of xe){if(!_e)continue;for(let En of ie){let kn=le.join(_e,En);if(ne.push(kn),await n(kn)){Q=kn;break}}if(Q)break;if(!Q)try{let En=await import("fs");if(!En.statSync(_e,{throwIfNoEntry:!1})?.isDirectory())continue;let co=8,ts=[{path:_e,depth:0}];while(ts.length>0&&!Q){let Rn=ts.pop();if(Rn.depth>=co)continue;let rr;try{rr=En.readdirSync(Rn.path,{withFileTypes:!0})}catch{continue}for(let Cn of rr){if(!Cn.isDirectory())continue;if(Cn.name==="node_modules"||Cn.name.startsWith("."))continue;let or=le.join(Rn.path,Cn.name);for(let lo of ie){let ns=le.join(or,lo);if(ne.push(ns),await n(ns)){Q=ns;break}}if(Q)break;ts.push({path:or,depth:Rn.depth+1})}}}catch{}if(Q)break}if(Q)Hn.set(Qn,Q)}if(!Q||!await n(Q))return Hi(e,h,ne),Ki(e);E.add(Q);let ae;if(en.has(Q))ae=en.get(Q);else try{ae=await Bun.file(Q).text(),en.set(Q,ae)}catch(ce){let ie=ce instanceof Error?ce.message:String(ce);return Hi(e,h,[Q],ie),Ki(e)}if(C)for(let ce of new Set([...Object.keys(i),...C.reactiveProps??[]])){let ie=ce.toLowerCase();if(ie.startsWith("aria-")||ie.startsWith("data-"))continue;let he=ce.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\b${he}\\b`).test(ae))C.declaredProps.add(ce);if(new RegExp(`\\$props\\s*(?:\\.\\s*${he}\\b|\\[\\s*['"]${he}['"]\\s*\\])`).test(ae)||new RegExp(`\\buseReactiveProp\\s*\\(\\s*['"]${he}['"]`).test(ae))C.consumedProps?.add(ce)}let me=new Set(["__originalFilePath","__importedComponents",Mn,"__stx_client_signal_names","__stx_client_declared_names","__stx_runtime_config","__stxServeContext","__stx_scope_seq"]),ke={};for(let[ce,ie]of Object.entries(a))if(!ce.startsWith("__")||me.has(ce))ke[ce]=ie;let Re=R.length>0?{[zn]:[...R]}:{},Ue=t;if(t.includes("@include")){let{processIncludes:ce}=await s("stx/includes",()=>import("./chunk-tbrznnt4.js"));Ue=await ce(t,a,h,c,E)}if(/<[A-Z][\w.-]*[\s/>]/.test(Ue)){let{processComponents:ce}=await s("stx/component-renderer",()=>import("./chunk-rcr7tncg.js"));Ue=await ce(Ue,{...a,__processedComponents:N,...Re},h,c,E)}let We=[];if(Ya(Ue)){let{processExpressions:ce}=await s("stx/expressions",()=>import("./chunk-5grcasys.js")),ie=a.__stx_signals_gate===void 0?{...a,__stx_signals_gate:!0,...Re}:R.length>0?{...a,...Re}:a;Ue=ce(Ue,ie,h);for(let he of Ue.matchAll(/\{\{([\s\S]*?)\}\}/g))We.push(he[1].trim())}let Ze=G(Ue),Ye=[],ht=Ze.output.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(ce,ie)=>{let he=Ze.scripts[Number(ie)]||"",xe=he.match(/^<script\b([^>]*)>/i)?.[1]||"",Ke=xe.match(/\btype\s*=\s*["']([^"']+)["']/i)?.[1]?.toLowerCase(),Ce=!Ke||["module","text/javascript","application/javascript"].includes(Ke),pt=/\sdata-stx-(?:owner|instance)(?=[\s=/>])/i.test(` ${xe}`);if(!/\bserver\b/i.test(xe)&&Ce&&!pt)return Ye.push(he),"";return he}),{extractSlotContent:qn}=await s("stx/slots",()=>import("./chunk-v1qkdg8f.js")),ct=qn(ht),lt={};if(ct.defaultSlot?.trim())lt.default=ct.defaultSlot;for(let[ce,ie]of ct.namedSlots)lt[ce]=ie.content;let ut=a.__stx_scope_seq??={n:0,key:vs(String(a.__filename??h))},Mt=qi(e,process.cwd()),ot=`stx_${(Mt.endsWith(".stx")?Mt.slice(0,-4):Mt).replace(/[^a-zA-Z0-9]/g,"_")}_${++ut.n}_${ut.key}`,Fe={...ke,$uid:ot,$native:c._nativeHostAttrs===!0,...i,props:i,slot:ht,$slots:lt,__processedComponents:I,__sections:{},__stx_signals_gate:we(ae)||Ya(t),__stx_preserved_client_expressions:[...Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[],...We]};bl(ae,Fe);let jt=ae,nn=ue(jt);if(nn)jt=nn.content.trim();let Xn=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Nt=[...ae.matchAll(Xn)];for(let[,ce,ie]of Nt)if(!/\bserver\b|\bsrc\s*=|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(ce))Pe(ie,Q,c.strict);let Je=[],Lt=null,Jn=Nt.some((ce)=>/\bserver\b/.test(ce[1]||"")&&/\bcache\b/.test(ce[1]||"")),xt=null,Qe=null,Bt=null,sn=0,zt=null;if(fl(c),Jn&&Zs>0){let ce=pl({props:i,slot:Ue,slotContext:t.trim()?dl(ke):void 0,buildMode:c.buildMode??"",skipEventDirectives:c.skipEventDirectives===!0,native:c._nativeHostAttrs===!0,clientLoopNames:[...R].sort(),layers:c._layerGraph?.layers.map((ie)=>ie.configFile),uid:ot});if(ce!==null){xt=`${Q}\x00${w(ae)}\x00${ce}`;let ie=Kn.get(xt);if(ie){for(let he of ie.dependencies)E.add(he);if(Kr(a,ie.clientFactories),ut.n+=ie.uidsConsumed,ie.preservedClientExpressions.length>0){let he=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[]);for(let xe of ie.preservedClientExpressions)he.add(xe);a.__stx_preserved_client_expressions=[...he]}return ie.output}Qe=new Set(E),Bt=Ur(a),sn=ut.n,zt=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[])}}let Wt=new Set;for(let ce of Nt){let ie=ce[1]||"",he=ce[2]||"",xe=ie.includes("server");if(Me(ie)&&he.trim())he=Le(he);if(xe&&he){for(let Ce of Oe(he))Wt.add(Ce);try{await M(he,Fe,Q,{onFailure:(Ce)=>{if(Ce.kind!=="unknown")Lt=Ce.kind}})}catch(Ce){}}if(!xe){let Ce=he.replace(/^\s*const\s*\{[^}]+\}\s*=\s*window\.stx\s*;?\s*\n?/gm,""),pt=Ce.includes("{{")&&Ce.includes("}}"),rt=Ce.includes("{!!")&&Ce.includes("!!}");if(pt||rt)Ce=Ho(Ce,Fe,Q);let Ut=ie.replace(/\s*\bts\b/g,"").replace(/\s*\blang\s*=\s*["']?(ts|typescript)["']?/gi,"");Je.push(`<script${Ut}>${Ce}</script>`)}}let qe=G(ae).output.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),Ft=qe?qe[1]:"",Gn=qe?qe[2]:"",tt="",ee=Ft&&/\bscoped\b/i.test(Ft);if(qe)tt=`<style${Ft}>${_l(Gn,Fe,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 ce=/@push\s*\(\s*['"]styles['"]\s*\)([\s\S]*?)@endpush/gi,ie=[];if(re=re.replace(ce,(he,xe)=>{let Ke=xe.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i);if(Ke)ie.push(`<style${Ke[1]}>${Ke[2]}</style>`);return""}),re=re.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/gi,""),ie.length>0)tt=`${tt}${ie.join(`
290
- `)}`}if(t&&re.includes("{{ text || slot }}"))re=re.replace(/\{\{\s*text\s*\|\|\s*slot\s*\}\}/g,()=>t);let{applySlots:ge}=await s("stx/slots",()=>import("./chunk-v1qkdg8f.js")),{defaultSlot:ye,namedSlots:Ee}=ct,Ve=c._nativeHostAttrs===!0&&Je.length>0||Je.some((ce)=>/\b(?:state|derived|effect|ref|useRef|reactive|computed|watch|watchEffect|useModel|useReactiveProp|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots)\s*(?:<[^<>()]*>)?\s*\(/.test(ce)),ft=(ce)=>Ve?bi(ce,ot):ce,tr=new Map([...Ee].map(([ce,ie])=>[ce,{...ie,content:ft(ie.content)}]));re=await ge(re,ft(ye),tr,Fe,Ve?ot:"");let rn=Fo(Je),xn=(Array.isArray(Fe.__stx_client_signal_names)?Fe.__stx_client_signal_names:[]).filter((ce)=>!Wt.has(ce));if(rn.length>0||xn.length>0)Fe.__stx_client_signal_names=[...new Set([...xn,...rn])];else delete Fe.__stx_client_signal_names;let Vt=R.filter((ce)=>!Wt.has(ce)&&!(ce in i));if(Vt.length>0)Fe[zn]=Vt;let bn={...c,_rootComponentsDir:c._rootComponentsDir||c.componentsDir,componentsDir:le.dirname(Q),skipSignalsRuntime:!0,skipEventDirectives:c._nativeHostAttrs===!0||Ve||Je.length===0,defaultLayout:void 0};Fe.__stxProcessingDepth=(a.__stxProcessingDepth||0)+1;let{processDirectives:_n}=await s("stx/process",()=>import("./chunk-a3s7tqsp.js")),nt=await _n(re,Fe,Q,bn,E),bt=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[]);for(let ce of nt.matchAll(/\{\{([\s\S]*?)\}\}/g))bt.add(ce[1].trim());if(bt.size>0)a.__stx_preserved_client_expressions=[...bt];let Xe=ot,He=nt;if(Ve){let ce="";if(Object.keys(i).length>0)try{ce=` data-stx-props="${Vs(JSON.stringify(i))}"`}catch{}let ie=q?` stx-hydrate="${Vs(q)}"`:"",he=Object.fromEntries(Object.entries(lt).map(([dt,yt])=>[dt,Boolean(yt)])),xe=Object.keys(he).length>0?` data-stx-slots="${Vs(JSON.stringify(he))}"`:"",Ke=` data-stx-scope="${Xe}"${ce}${xe}${ie}`,Ce=/^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<span(?=[\s/>])/i.test(nt),pt=/^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<[^>]+\bdata-stx-layout-root(?:\s|=|>)/i.test(nt),rt=Ce?"span":"div";He=iu(nt,Ke)??`<${rt}${Ke} data-stx-component-wrapper${Ce||pt?' style="display:contents"':""}>${nt}</${rt}>`;let Ut=await Promise.all(Je.map(async(dt)=>{let yt=dt.match(/<script([^>]*)>([\s\S]*)<\/script>/i);if(!yt)return dt;let[,wn,Yn]=yt,Ht=zi(dt,Fe,Q);if(Ht!==null)return Ht;let _t=await $l(Yn,Q,c.buildMode==="compile"),Sn=fn(_t.clientCode,Ne(Fe)),{vendorStyleTags:$n}=_t,Kt=Sn?`function(__scopeId) {
289
+ `)}`:"";console.error(`[stx] component <${e}> could not be resolved${h}, so it rendered as nothing.${c}${v}`)}function Ki(e){return`<!-- stx: component "${e.replace(/--+/g,"-")}" could not be resolved; see the server log -->`}function Fo(e){let i=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 o of e){let a;while((a=t.exec(o))!==null)i.add(a[1]);t.lastIndex=0}return[...i]}async function je(e,i,t,o,a,h,c,v=new Set,E,R=et(a),C,O=e){let{extractVariables:M}=await s("stx/variable-extractor",()=>import("./chunk-r86d03dv.js")),N=v??new Set;if(N.has(e))return`[Circular component reference: ${e}]`;let I=new Set(N);I.add(e);let P=typeof i.client==="string"?i.client.trim():"";if("client"in i)delete i.client;let q=P&&P!=="load"&&au(P)?P:"";try{let Z=(ce)=>ce.split("-").map((ie)=>ie.charAt(0).toUpperCase()+ie.slice(1)).join(""),K=O.endsWith(".stx")?O.slice(0,-4):O,Q=null,te=a.__importedComponents;if(te){let ce=[K,K.toLowerCase(),Z(K),j(K)];for(let ie of ce)if(te.has(ie)){Q=te.get(ie);break}}let ne=[];if(!Q){let ce=[`${K}.stx`,`${Z(K)}.stx`,`${j(K)}.stx`],ie=[...new Set(ce)],he=a.__originalFilePath,xe=[];if(xe.push(...c._layerComponentDirs??[]),he){let _e=le.join(le.dirname(he),"components");xe.push(_e)}if(o)xe.push(o);let Ke=c._rootComponentsDir;if(typeof Ke==="string"&&!xe.includes(Ke))xe.push(Ke);let Ce=le.join(le.dirname(h),"components");if(!xe.includes(Ce))xe.push(Ce);if(c.componentsDir&&c.componentsDir!==o&&!xe.includes(c.componentsDir))xe.push(c.componentsDir);let pt=c._nativeHostAttrs&&/^(?:checkbox|switch)$/i.test(K),rt=(C?.events??[]).map((_e)=>_e.replace(/^@/,"").split(".")[0].toLowerCase().replace(/-/g,"")),Ut=Object.hasOwn(i,"checked")||Boolean(C?.reactiveProps?.includes("checked")),dt=Object.hasOwn(i,"value")||Boolean(C?.reactiveProps?.includes("value")),yt=!rt.includes("valuechange")&&(Ut||rt.includes("change")&&!dt),wn=c._nativeHostAttrs&&/^textinput$/i.test(K),Yn=rt.includes("update:value")&&!rt.includes("input"),Ht=c._nativeHostAttrs&&/^video$/i.test(K),_t=Object.hasOwn(i,"src")||Boolean(C?.reactiveProps?.includes("src")),Sn=Object.hasOwn(i,"source")||Boolean(C?.reactiveProps?.includes("source")),$n=Ht&&_t&&!Sn&&(C?.events??[]).every((_e)=>/^(?:play|pause|ended|timeupdate|loadedmetadata|loadstart|error)$/.test(_e.replace(/^@/,"").split(".")[0])),Kt=c._targetComponentFallbackNames?.some((_e)=>_e.toLowerCase()===K.toLowerCase())&&(!pt||yt)&&(!wn||Yn)&&(!Ht||$n);for(let _e of Kt?[]:c._targetComponentDirs??[])if(_e&&!xe.includes(_e))xe.push(_e);let it=typeof c.root==="string"?le.resolve(c.root):void 0,vn=it??le.dirname(h),wt=[];if(it)wt.push(le.resolve(it,"resources/views/components")),wt.push(le.resolve(it,"resources/components")),wt.push(le.resolve(it,"src/components")),wt.push(le.resolve(it,"components"));wt.push(le.resolve(import.meta.dir,"components"));for(let _e of wt)if(!xe.includes(_e))xe.push(_e);let nr=c._pluginComponentDirs;if(Array.isArray(nr)){for(let _e of nr)if(typeof _e==="string"&&!xe.includes(_e))xe.push(_e)}if(c.fallbackComponentsDir&&!xe.includes(c.fallbackComponentsDir))xe.push(c.fallbackComponentsDir);if(Kt){for(let _e of c._targetComponentDirs??[])if(_e&&!xe.includes(_e))xe.push(_e)}let sr=[...new Set(xe.map((_e)=>{if(!_e)return _e;return le.isAbsolute(_e)?_e:le.resolve(vn,_e)}))];xe.length=0,xe.push(...sr);let Qn=`${K}\x00${h}\x00${sr.join("\x00")}`,es=Hn.get(Qn);if(es)if(await n(es))Q=es;else Hn.delete(Qn);if(!Q&&(K.startsWith("./")||K.startsWith("../")))Q=le.resolve(le.dirname(h),`${K}.stx`),ne.push(Q);else if(!Q)for(let _e of xe){if(!_e)continue;for(let En of ie){let kn=le.join(_e,En);if(ne.push(kn),await n(kn)){Q=kn;break}}if(Q)break;if(!Q)try{let En=await import("fs");if(!En.statSync(_e,{throwIfNoEntry:!1})?.isDirectory())continue;let co=8,ts=[{path:_e,depth:0}];while(ts.length>0&&!Q){let Rn=ts.pop();if(Rn.depth>=co)continue;let rr;try{rr=En.readdirSync(Rn.path,{withFileTypes:!0})}catch{continue}for(let Cn of rr){if(!Cn.isDirectory())continue;if(Cn.name==="node_modules"||Cn.name.startsWith("."))continue;let or=le.join(Rn.path,Cn.name);for(let lo of ie){let ns=le.join(or,lo);if(ne.push(ns),await n(ns)){Q=ns;break}}if(Q)break;ts.push({path:or,depth:Rn.depth+1})}}}catch{}if(Q)break}if(Q)Hn.set(Qn,Q)}if(!Q||!await n(Q))return Hi(e,h,ne),Ki(e);E.add(Q);let ae;if(en.has(Q))ae=en.get(Q);else try{ae=await Bun.file(Q).text(),en.set(Q,ae)}catch(ce){let ie=ce instanceof Error?ce.message:String(ce);return Hi(e,h,[Q],ie),Ki(e)}if(C)for(let ce of new Set([...Object.keys(i),...C.reactiveProps??[]])){let ie=ce.toLowerCase();if(ie.startsWith("aria-")||ie.startsWith("data-"))continue;let he=ce.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\b${he}\\b`).test(ae))C.declaredProps.add(ce);if(new RegExp(`\\$props\\s*(?:\\.\\s*${he}\\b|\\[\\s*['"]${he}['"]\\s*\\])`).test(ae)||new RegExp(`\\buseReactiveProp\\s*\\(\\s*['"]${he}['"]`).test(ae))C.consumedProps?.add(ce)}let me=new Set(["__originalFilePath","__importedComponents",Mn,"__stx_client_signal_names","__stx_client_declared_names","__stx_runtime_config","__stxServeContext","__stx_scope_seq"]),ke={};for(let[ce,ie]of Object.entries(a))if(!ce.startsWith("__")||me.has(ce))ke[ce]=ie;let Re=R.length>0?{[zn]:[...R]}:{},Ue=t;if(t.includes("@include")){let{processIncludes:ce}=await s("stx/includes",()=>import("./chunk-ngd9dsrd.js"));Ue=await ce(t,a,h,c,E)}if(/<[A-Z][\w.-]*[\s/>]/.test(Ue)){let{processComponents:ce}=await s("stx/component-renderer",()=>import("./chunk-e9fmqn0g.js"));Ue=await ce(Ue,{...a,__processedComponents:N,...Re},h,c,E)}let We=[];if(Ya(Ue)){let{processExpressions:ce}=await s("stx/expressions",()=>import("./chunk-a5agchz8.js")),ie=a.__stx_signals_gate===void 0?{...a,__stx_signals_gate:!0,...Re}:R.length>0?{...a,...Re}:a;Ue=ce(Ue,ie,h);for(let he of Ue.matchAll(/\{\{([\s\S]*?)\}\}/g))We.push(he[1].trim())}let Ze=G(Ue),Ye=[],ht=Ze.output.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(ce,ie)=>{let he=Ze.scripts[Number(ie)]||"",xe=he.match(/^<script\b([^>]*)>/i)?.[1]||"",Ke=xe.match(/\btype\s*=\s*["']([^"']+)["']/i)?.[1]?.toLowerCase(),Ce=!Ke||["module","text/javascript","application/javascript"].includes(Ke),pt=/\sdata-stx-(?:owner|instance)(?=[\s=/>])/i.test(` ${xe}`);if(!/\bserver\b/i.test(xe)&&Ce&&!pt)return Ye.push(he),"";return he}),{extractSlotContent:qn}=await s("stx/slots",()=>import("./chunk-84vsb4v3.js")),ct=qn(ht),lt={};if(ct.defaultSlot?.trim())lt.default=ct.defaultSlot;for(let[ce,ie]of ct.namedSlots)lt[ce]=ie.content;let ut=a.__stx_scope_seq??={n:0,key:vs(String(a.__filename??h))},Mt=qi(e,process.cwd()),ot=`stx_${(Mt.endsWith(".stx")?Mt.slice(0,-4):Mt).replace(/[^a-zA-Z0-9]/g,"_")}_${++ut.n}_${ut.key}`,Fe={...ke,$uid:ot,$native:c._nativeHostAttrs===!0,...i,props:i,slot:ht,$slots:lt,__processedComponents:I,__sections:{},__stx_signals_gate:we(ae)||Ya(t),__stx_preserved_client_expressions:[...Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[],...We]};bl(ae,Fe);let jt=ae,nn=ue(jt);if(nn)jt=nn.content.trim();let Xn=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Nt=[...ae.matchAll(Xn)];for(let[,ce,ie]of Nt)if(!/\bserver\b|\bsrc\s*=|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(ce))Pe(ie,Q,c.strict);let Je=[],Lt=null,Jn=Nt.some((ce)=>/\bserver\b/.test(ce[1]||"")&&/\bcache\b/.test(ce[1]||"")),xt=null,Qe=null,Bt=null,sn=0,zt=null;if(fl(c),Jn&&Zs>0){let ce=pl({props:i,slot:Ue,slotContext:t.trim()?dl(ke):void 0,buildMode:c.buildMode??"",skipEventDirectives:c.skipEventDirectives===!0,native:c._nativeHostAttrs===!0,clientLoopNames:[...R].sort(),layers:c._layerGraph?.layers.map((ie)=>ie.configFile),uid:ot});if(ce!==null){xt=`${Q}\x00${w(ae)}\x00${ce}`;let ie=Kn.get(xt);if(ie){for(let he of ie.dependencies)E.add(he);if(Kr(a,ie.clientFactories),ut.n+=ie.uidsConsumed,ie.preservedClientExpressions.length>0){let he=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[]);for(let xe of ie.preservedClientExpressions)he.add(xe);a.__stx_preserved_client_expressions=[...he]}return ie.output}Qe=new Set(E),Bt=Ur(a),sn=ut.n,zt=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[])}}let Wt=new Set;for(let ce of Nt){let ie=ce[1]||"",he=ce[2]||"",xe=ie.includes("server");if(Me(ie)&&he.trim())he=Le(he);if(xe&&he){for(let Ce of Oe(he))Wt.add(Ce);try{await M(he,Fe,Q,{onFailure:(Ce)=>{if(Ce.kind!=="unknown")Lt=Ce.kind}})}catch(Ce){}}if(!xe){let Ce=he.replace(/^\s*const\s*\{[^}]+\}\s*=\s*window\.stx\s*;?\s*\n?/gm,""),pt=Ce.includes("{{")&&Ce.includes("}}"),rt=Ce.includes("{!!")&&Ce.includes("!!}");if(pt||rt)Ce=Ho(Ce,Fe,Q);let Ut=ie.replace(/\s*\bts\b/g,"").replace(/\s*\blang\s*=\s*["']?(ts|typescript)["']?/gi,"");Je.push(`<script${Ut}>${Ce}</script>`)}}let qe=G(ae).output.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),Ft=qe?qe[1]:"",Gn=qe?qe[2]:"",tt="",ee=Ft&&/\bscoped\b/i.test(Ft);if(qe)tt=`<style${Ft}>${_l(Gn,Fe,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 ce=/@push\s*\(\s*['"]styles['"]\s*\)([\s\S]*?)@endpush/gi,ie=[];if(re=re.replace(ce,(he,xe)=>{let Ke=xe.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i);if(Ke)ie.push(`<style${Ke[1]}>${Ke[2]}</style>`);return""}),re=re.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/gi,""),ie.length>0)tt=`${tt}${ie.join(`
290
+ `)}`}if(t&&re.includes("{{ text || slot }}"))re=re.replace(/\{\{\s*text\s*\|\|\s*slot\s*\}\}/g,()=>t);let{applySlots:ge}=await s("stx/slots",()=>import("./chunk-84vsb4v3.js")),{defaultSlot:ye,namedSlots:Ee}=ct,Ve=c._nativeHostAttrs===!0&&Je.length>0||Je.some((ce)=>/\b(?:state|derived|effect|ref|useRef|reactive|computed|watch|watchEffect|useModel|useReactiveProp|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots)\s*(?:<[^<>()]*>)?\s*\(/.test(ce)),ft=(ce)=>Ve?bi(ce,ot):ce,tr=new Map([...Ee].map(([ce,ie])=>[ce,{...ie,content:ft(ie.content)}]));re=await ge(re,ft(ye),tr,Fe,Ve?ot:"");let rn=Fo(Je),xn=(Array.isArray(Fe.__stx_client_signal_names)?Fe.__stx_client_signal_names:[]).filter((ce)=>!Wt.has(ce));if(rn.length>0||xn.length>0)Fe.__stx_client_signal_names=[...new Set([...xn,...rn])];else delete Fe.__stx_client_signal_names;let Vt=R.filter((ce)=>!Wt.has(ce)&&!(ce in i));if(Vt.length>0)Fe[zn]=Vt;let bn={...c,_rootComponentsDir:c._rootComponentsDir||c.componentsDir,componentsDir:le.dirname(Q),skipSignalsRuntime:!0,skipEventDirectives:c._nativeHostAttrs===!0||Ve||Je.length===0,defaultLayout:void 0};Fe.__stxProcessingDepth=(a.__stxProcessingDepth||0)+1;let{processDirectives:_n}=await s("stx/process",()=>import("./chunk-5443hz48.js")),nt=await _n(re,Fe,Q,bn,E),bt=new Set(Array.isArray(a.__stx_preserved_client_expressions)?a.__stx_preserved_client_expressions:[]);for(let ce of nt.matchAll(/\{\{([\s\S]*?)\}\}/g))bt.add(ce[1].trim());if(bt.size>0)a.__stx_preserved_client_expressions=[...bt];let Xe=ot,He=nt;if(Ve){let ce="";if(Object.keys(i).length>0)try{ce=` data-stx-props="${Vs(JSON.stringify(i))}"`}catch{}let ie=q?` stx-hydrate="${Vs(q)}"`:"",he=Object.fromEntries(Object.entries(lt).map(([dt,yt])=>[dt,Boolean(yt)])),xe=Object.keys(he).length>0?` data-stx-slots="${Vs(JSON.stringify(he))}"`:"",Ke=` data-stx-scope="${Xe}"${ce}${xe}${ie}`,Ce=/^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<span(?=[\s/>])/i.test(nt),pt=/^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<[^>]+\bdata-stx-layout-root(?:\s|=|>)/i.test(nt),rt=Ce?"span":"div";He=iu(nt,Ke)??`<${rt}${Ke} data-stx-component-wrapper${Ce||pt?' style="display:contents"':""}>${nt}</${rt}>`;let Ut=await Promise.all(Je.map(async(dt)=>{let yt=dt.match(/<script([^>]*)>([\s\S]*)<\/script>/i);if(!yt)return dt;let[,wn,Yn]=yt,Ht=zi(dt,Fe,Q);if(Ht!==null)return Ht;let _t=await $l(Yn,Q,c.buildMode==="compile"),Sn=fn(_t.clientCode,Ne(Fe)),{vendorStyleTags:$n}=_t,Kt=Sn?`function(__scopeId) {
291
291
  ${Sn}
292
292
  return (${_t.factoryBody})(__scopeId);
293
293
  }`:_t.factoryBody,it=q?null:Is(a,Kt),vn=it?`window.__stxComponentFactories[${JSON.stringify(it)}](${JSON.stringify(Xe)});`:`(${Kt})(${JSON.stringify(Xe)});`;if(q)return`${$n}<script type="stx/island" data-stx-island="${Xe}" data-stx-scoped data-stx-owner="${Xe}"${wn}>${vn}</script>`;return`${$n}<script data-stx-scoped data-stx-run="always" data-stx-owner="${Xe}"${wn}>${vn}</script>`}));if(He=He+`
@@ -313,7 +313,7 @@ ${$e.yellow}${$e.bold}Message:${$e.reset} ${i}
313
313
  `,v)C+=`
314
314
  ${$e.blue}${$e.bold}Context:${$e.reset}
315
315
  ${$e.dim}${v}${$e.reset}
316
- `;return C}function pe(){en.clear(),Hn.clear(),Hs.clear(),Ks.clear(),Kn.clear()}function Np(){return{size:en.size,maxSize:500}}var Us=b(128);async function $l(e,i,t){let o=w(e,i,t),a=Us.get(o);if(a){if(ds(a.deps))return a;Us.delete(o)}let h=Lo(e,{filePath:i,projectRoot:process.cwd()}),c=h.code,v=jo(h.styles);c=It(c).code;let{hasUserImports:E,bundleClientScript:R}=await s("stx/client-script-bundler",()=>import("./chunk-qa2mkh94.js")),C=[],O=!1;if(E(c)){let K=c;c=await R(K,i,{projectRoot:process.cwd(),minify:t,collectInputs:C}),O=c===K}let{stripStxRuntimeImports:M}=await s("stx/signal-processing",()=>import("./chunk-ys6a6azq.js"));c=M(c);let N=T(c),I=ml(N),P=new Set(L(N,!0).split(",").map((K)=>K.trim())),q=`function(__scopeId) {
316
+ `;return C}function pe(){en.clear(),Hn.clear(),Hs.clear(),Ks.clear(),Kn.clear()}function Np(){return{size:en.size,maxSize:500}}var Us=b(128);async function $l(e,i,t){let o=w(e,i,t),a=Us.get(o);if(a){if(ds(a.deps))return a;Us.delete(o)}let h=Lo(e,{filePath:i,projectRoot:process.cwd()}),c=h.code,v=jo(h.styles);c=It(c).code;let{hasUserImports:E,bundleClientScript:R}=await s("stx/client-script-bundler",()=>import("./chunk-v7xpafs9.js")),C=[],O=!1;if(E(c)){let K=c;c=await R(K,i,{projectRoot:process.cwd(),minify:t,collectInputs:C}),O=c===K}let{stripStxRuntimeImports:M}=await s("stx/signal-processing",()=>import("./chunk-1k7js5nz.js"));c=M(c);let N=T(c),I=ml(N),P=new Set(L(N,!0).split(",").map((K)=>K.trim())),q=`function(__scopeId) {
317
317
  ${st("const",[...dc,...I],N)}
318
318
  const __scope = window.stx._scopes = window.stx._scopes || {};
319
319
  const __scopeVars = __scope[__scopeId] = __scope[__scopeId] || {};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{up,ia,dp,aa,Sl,kl,nn,Kn,pp,_l,Cl,fp,h}from"./chunk-623w7x5z.js";import"./chunk-rvebwzdj.js";import"./chunk-6eazxhpe.js";import"./chunk-bwcejt6t.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{nn as buildCss,_l as extractClassNames,kl as fingerprintConfig,Cl as generateCss,pp as getCachedCSS,up as getCssServeAsset,h as injectCss,ia as loadCssEngine,aa as loadCssEngineConfig,Kn as rebuildCss,dp as resetCssCache,Sl as resolveUserCssConfig,fp as withLinkedModuleBundles};
2
+ import{up,ia,dp,aa,Sl,kl,nn,Kn,pp,_l,Cl,fp,h}from"./chunk-jt9kxnva.js";import"./chunk-nc85m4p9.js";import"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{nn as buildCss,_l as extractClassNames,kl as fingerprintConfig,Cl as generateCss,pp as getCachedCSS,up as getCssServeAsset,h as injectCss,ia as loadCssEngine,aa as loadCssEngineConfig,Kn as rebuildCss,dp as resetCssCache,Sl as resolveUserCssConfig,fp as withLinkedModuleBundles};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ro,Aa,s,Tt,se,k,Pe,cn,Ie,de,G,cr,ln,ms,za,dn,dr,ys,bs,Ha,Do,Va,Ua,Wa,qa,Ne,De,vs,je,n,gn,m,d,V,Y,we,x,_}from"./chunk-6eazxhpe.js";import{l,p,E,t,ie,U,a,xe,qo,D,bn,Ko,Lt,Go,oc,mr,ic,rt,ac,hr,cc,vn,Xo,lc,yr,vr,Se,Jo}from"./chunk-r0ys9aqa.js";import{Nt}from"./chunk-t6m5d64b.js";import{hn}from"./chunk-bwcejt6t.js";import{h}from"./chunk-623w7x5z.js";import{rr,os}from"./chunk-kypwg2ws.js";import{ga,ma,er,Je,ha,R}from"./chunk-4cnphtcz.js";import{wo,xo,So,ko}from"./chunk-ygb33q5w.js";import{la,Vr}from"./chunk-kkxwgx4n.js";import{Br,Fr,zr}from"./chunk-81meeqhp.js";import{Ur,po,fo,Wr,qr,go}from"./chunk-a81452y9.js";import{jr,Gn}from"./chunk-ryg1ww7v.js";import{ro}from"./chunk-9bgb9n12.js";import{re,ao,co,lo}from"./chunk-hx787tfa.js";import{Jn,he,da,Yn,pa}from"./chunk-eq9s8dcp.js";import{K,Ge}from"./chunk-yft8yn6y.js";import{ya,ba}from"./chunk-9ed0hr7y.js";import{C,wn,Yo}from"./chunk-078as147.js";import gs from"fs";import ce from"path";function lt(){return`
2
+ import{Ro,Aa,s,Tt,se,k,Pe,cn,Ie,de,G,cr,ln,ms,za,dn,dr,ys,bs,Ha,Do,Va,Ua,Wa,qa,Ne,De,vs,je,n,gn,m,d,V,Y,we,x,_}from"./chunk-4f5bmy7h.js";import{l,p,E,t,ie,U,a,xe,qo,D,bn,Ko,Lt,Go,oc,mr,ic,rt,ac,hr,cc,vn,Xo,lc,yr,vr,Se,Jo}from"./chunk-r0ys9aqa.js";import{Nt}from"./chunk-t6m5d64b.js";import{hn}from"./chunk-tjwv101c.js";import{h}from"./chunk-jt9kxnva.js";import{rr,os}from"./chunk-kypwg2ws.js";import{ga,ma,er,Je,ha,R}from"./chunk-h176dx1q.js";import{wo,xo,So,ko}from"./chunk-ygb33q5w.js";import{la,Vr}from"./chunk-vvezfjt1.js";import{Br,Fr,zr}from"./chunk-mwmmmbxj.js";import{Ur,po,fo,Wr,qr,go}from"./chunk-n42421az.js";import{jr,Gn}from"./chunk-psprkndv.js";import{ro}from"./chunk-9bgb9n12.js";import{re,ao,co,lo}from"./chunk-hx787tfa.js";import{Jn,he,da,Yn,pa}from"./chunk-s0226rfp.js";import{K,Ge}from"./chunk-yft8yn6y.js";import{ya,ba}from"./chunk-s0ntt1cn.js";import{C,wn,Yo}from"./chunk-078as147.js";import gs from"fs";import ce from"path";function lt(){return`
3
3
  // STX Lifecycle Runtime
4
4
  (function() {
5
5
  if (typeof window === 'undefined') return;
@@ -1558,13 +1558,13 @@ ${I}
1558
1558
  </style>`;c=c.replace(S,P),v.lastIndex=0}catch(I){}}}return c}import it from"path";var ds=/(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)(['"])(\.\.?\/[^'"]*)\2/g,ps=/(<script\b[^>]*>)([\s\S]*?)(<\/script>)/gi;function fs(i,e){if(!e||!i.includes("/"))return i;let u=it.dirname(e);return i.replace(ds,(c,g,r,f)=>{let v=it.resolve(u,f);return`${g}${r}${v.split(it.sep).join("/")}${r}`})}function un(i,e){if(!e||!i.includes("<script"))return i;return i.replace(ps,(u,c,g,r)=>`${c}${fs(g,e)}${r}`)}var Te="<!--PARENT_CONTENT_PLACEHOLDER-->";function pn(i){return i.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Sn(i,e){let u=i.length,c=e,g=!0,r=[],f=(v)=>v+9<=u&&i[v]==="<"&&i[v+1]==="/"&&(i[v+2]==="s"||i[v+2]==="S")&&(i[v+3]==="c"||i[v+3]==="C")&&(i[v+4]==="r"||i[v+4]==="R")&&(i[v+5]==="i"||i[v+5]==="I")&&(i[v+6]==="p"||i[v+6]==="P")&&(i[v+7]==="t"||i[v+7]==="T")&&(i[v+8]===">"||/\s/.test(i[v+8]));while(c<u){let v=i[c];if(f(c))return c;if(v==="/"&&i[c+1]==="/"){if(c=i.indexOf(`
1559
1559
  `,c+2),c===-1)return-1;c+=1,g=!0;continue}if(v==="/"&&i[c+1]==="*"){let y=i.indexOf("*/",c+2);if(y===-1)return-1;c=y+2,g=!0;continue}if(v==="/"&&g){let y=c+1,S=!1;while(y<u){let b=i[y];if(b==="\\"){y+=2;continue}if(b==="[")S=!0;else if(b==="]")S=!1;else if(b==="/"&&!S){y++;break}else if(b===`
1560
1560
  `){y=-1;break}y++}if(y===-1){c++,g=!1;continue}while(y<u&&/[a-z]/.test(i[y]))y++;c=y,g=!1;continue}if(v==="'"||v==='"'){let y=v;c++;while(c<u){if(i[c]==="\\"){c+=2;continue}if(i[c]===y){c++;break}if(i[c]===`
1561
- `)break;c++}g=!1;continue}if(v==="`"){c++;while(c<u){if(i[c]==="\\"){c+=2;continue}if(i[c]==="`"){c++;break}if(i[c]==="$"&&i[c+1]==="{"){r.push(!0),c+=2,g=!0;break}c++}if(r.length===0)g=!1;continue}if(v==="}"&&r.length>0){r.pop(),c++;while(c<u){if(i[c]==="\\"){c+=2;continue}if(i[c]==="`"){c++,g=!1;break}if(i[c]==="$"&&i[c+1]==="{"){r.push(!0),c+=2,g=!0;break}c++}continue}if(/\s/.test(v));else if(/[)\].\w$]/.test(v))g=!1;else g=!0;c++}return-1}function $n(i,e){let u=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`<script\\b(?=[^>]*\\b${u}(?:\\s|=|/?>))[^>]*>`,"i").exec(i);if(!c)return null;let g=c.index+c[0].length,r=i.indexOf("</script>",g);if(r===-1)return null;let f=i.indexOf(">",r);if(f===-1)return null;return{start:c.index,end:f+1}}var hs=4096;async function fn(i,e,u){if(u.buildMode!=="serve"||e.length<hs)return null;let{registerServeModuleBundle:c}=await import("./chunk-60aezg8h.js");return`<script ${i} src="${c(e)}"></script>`}async function Un(i,e,u){try{let{registeredModuleIdsIn:c,buildModuleRegistryScript:g}=await s("stx/client-module-registry",()=>import("./chunk-736bs5xa.js")),r=[],f=await g(c(...i),{minify:Yo(e.buildMode,e.minifyClient),collectInputs:r});for(let v of r)u?.add(v);if(!f)return null;if(e.buildMode==="serve"){let{registerServeModuleBundle:v}=await import("./chunk-60aezg8h.js");return`<script data-stx-scoped data-stx-run="always" data-stx-modules src="${v(f)}"></script>`}return`<script data-stx-scoped data-stx-run="always" data-stx-modules>${f.replace(/<\/script/gi,"<\\/script")}</script>`}catch{return null}}function ws(i,e=""){let u=$n(i,"data-stx-runtime");if(!u)return i;let c=Jn(i);if(c===-1||c===u.start){if(!e)return i;return i.slice(0,u.end)+e+i.slice(u.end)}if(c<u.start)return i.slice(0,c)+i.slice(u.start,u.end)+e+`
1561
+ `)break;c++}g=!1;continue}if(v==="`"){c++;while(c<u){if(i[c]==="\\"){c+=2;continue}if(i[c]==="`"){c++;break}if(i[c]==="$"&&i[c+1]==="{"){r.push(!0),c+=2,g=!0;break}c++}if(r.length===0)g=!1;continue}if(v==="}"&&r.length>0){r.pop(),c++;while(c<u){if(i[c]==="\\"){c+=2;continue}if(i[c]==="`"){c++,g=!1;break}if(i[c]==="$"&&i[c+1]==="{"){r.push(!0),c+=2,g=!0;break}c++}continue}if(/\s/.test(v));else if(/[)\].\w$]/.test(v))g=!1;else g=!0;c++}return-1}function $n(i,e){let u=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`<script\\b(?=[^>]*\\b${u}(?:\\s|=|/?>))[^>]*>`,"i").exec(i);if(!c)return null;let g=c.index+c[0].length,r=i.indexOf("</script>",g);if(r===-1)return null;let f=i.indexOf(">",r);if(f===-1)return null;return{start:c.index,end:f+1}}var hs=4096;async function fn(i,e,u){if(u.buildMode!=="serve"||e.length<hs)return null;let{registerServeModuleBundle:c}=await import("./chunk-jkhc0q7g.js");return`<script ${i} src="${c(e)}"></script>`}async function Un(i,e,u){try{let{registeredModuleIdsIn:c,buildModuleRegistryScript:g}=await s("stx/client-module-registry",()=>import("./chunk-c9fs966z.js")),r=[],f=await g(c(...i),{minify:Yo(e.buildMode,e.minifyClient),collectInputs:r});for(let v of r)u?.add(v);if(!f)return null;if(e.buildMode==="serve"){let{registerServeModuleBundle:v}=await import("./chunk-jkhc0q7g.js");return`<script data-stx-scoped data-stx-run="always" data-stx-modules src="${v(f)}"></script>`}return`<script data-stx-scoped data-stx-run="always" data-stx-modules>${f.replace(/<\/script/gi,"<\\/script")}</script>`}catch{return null}}function ws(i,e=""){let u=$n(i,"data-stx-runtime");if(!u)return i;let c=Jn(i);if(c===-1||c===u.start){if(!e)return i;return i.slice(0,u.end)+e+i.slice(u.end)}if(c<u.start)return i.slice(0,c)+i.slice(u.start,u.end)+e+`
1562
1562
  `+i.slice(c,u.start)+i.slice(u.end);let g=i.slice(u.start,u.end),r=i.slice(0,u.start)+i.slice(u.end),f=Jn(r);if(f===-1)return g+e+`
1563
1563
  `+r;return r.slice(0,f)+g+e+`
1564
1564
  `+r.slice(f)}function xs(i){let e=/\x00STX_ESC_MUSTACHE_OPEN\x00([\s\S]*?)\x00STX_ESC_MUSTACHE_CLOSE\x00/g;return i.replace(e,(u,c,g)=>{let r=i.slice(0,g);return r.lastIndexOf("<")>r.lastIndexOf(">")?`{{${c}}}`:`{<!--stx-literal-->{${c}}}`})}async function o(i,e,u,c,g){if(c.ssr===!1&&!c.autoShell&&c.buildMode==="spa")return i;if(e.__stx_signals_gate===void 0)e.__stx_signals_gate=we(i,u);let r=!e.__stxProcessingDepth;dn(e);for(let f of c._layerGraph?.configDependencies??[])g.add(f);if(r&&c.runtimeConfig)await hn(e,u,c.runtimeConfig);if(r)Wa(e),e.__stx_scope_seq??={n:0,key:vs(String(e.__filename??u))},e.__stx_head_injections=Go(),e.__stx_seo_staged=!1;if(!e.__stxProcessingDepth)e.__stxProcessingDepth=0;if(e.__stxProcessingDepth++,!e.__onceStore)e.__onceStore=new Set;if((c.debug||!C()&&!wn())&&u&&u.endsWith(".stx"))ro(i,u);try{return await se.timeAsync("template-processing",async()=>{let f=await ks(i,e,u,c,g);if(r)f=Do(f);if(r&&c.autoShell&&c.buildMode!=="compile"){let v=Se(c.app?.head,{known:vr,source:"app.head"}),S=(e.__stx_runtime_head||null)??Jo(),b=(e.__stx_head_raw||"").trim(),w,T=b.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(T)w=T[1].trim(),b=b.replace(T[0],"").trim();let A=e.__sections?.title,O=A?x(A,e,u):void 0,M=S.title||w||O,I=!S.title&&(!!w||!!O),P=S.meta||[],N=new Set(P.map((W)=>rt(W)).filter(Boolean)),F={...v,...M&&{title:M},meta:[...(v.meta||[]).filter((W)=>!N.has(rt(W))),...P],link:[...v.link||[],...S.link||[]],script:[...v.script||[],...S.script||[]],headRaw:[v.headRaw,b].filter(Boolean).join(`
1565
1565
  `),...S.htmlAttrs&&{htmlAttrs:ac(v.htmlAttrs,S.htmlAttrs)},...S.bodyAttrs&&{bodyAttrs:{...v.bodyAttrs||{},...S.bodyAttrs}}},z=Xo(f);if(f=yr(f,F,{...I&&{titleIsHtml:!0},...c.app?.colorMode&&{colorMode:c.app.colorMode}},z),z)f=lc(f,v),f=hr(f,F.htmlAttrs);let L=f.match(/<!-- stx-layout: ([^ ]+) -->/);if(L&&f.includes("<head")){let W=L[1],X=os(W);f=f.replace(/<head\b[^>]*>/i,(Q)=>`${Q}
1566
1566
  <meta name="stx-layout" content="${pn(W)}">
1567
- <meta name="stx-layout-group" content="${pn(X)}">`)}let j=f.match(/function (__stx_setup_\w+)\(/),H=j?K(f):null;if(j&&H&&!/\bdata-stx=/.test(H.tag)){f=Ge(f,(X,Q)=>`<body${Q} data-stx="${j[1]}">`);let W=new RegExp(`(<(?!body)[a-zA-Z][^>]*) data-stx="${j[1]}"`,"i");f=f.replace(W,"$1")}}if(r){let v=e.__stx_head_injections??Go(),y=cc(f);if(y!==null)v.beforeClose.push(y);let S=tn(f);if(S!==null)v.afterOpen.push(S);if(c.offline?.enabled&&!f.includes("data-stx-offline"))v.beforeClose.push(nn);f=oc(f,v);let b=c.app?.colorMode;if(b)f=mr(f,b)}if(r)if($n(f,"data-stx-runtime")){let y=null,S=null,b=null,w=null,T=null;try{let{getStoreScript:O}=await s("stx/store-loader",()=>import("./chunk-xzpwfs7n.js")),M=c.storesDir,I=await O(M);if(I)b=`<script data-stx-stores>${I}</script>`,S=await fn("data-stx-stores",I,c)??b}catch{}y=await Un([f,b],c,g);try{let{getFrameworkComposableScript:O}=await s("stx/framework-composables",()=>import("./chunk-q3kg8dde.js"));T=await O(f)}catch{}try{let{getComposableScript:O}=await s("stx/composable-loader",()=>import("./chunk-mj3y2dhh.js")),M=c.composablesDir,I=[y,b,T].filter((N)=>N!==null),P=await O(c._layerComposableDirs??M,f,I);if(P)w=await fn('data-stx-scoped data-stx-run="always" data-stx-composables',P,c)??`<script data-stx-scoped data-stx-run="always" data-stx-composables>${P}</script>`}catch{}let A=[y,S,w,T].filter((O)=>O!==null).map((O)=>`
1567
+ <meta name="stx-layout-group" content="${pn(X)}">`)}let j=f.match(/function (__stx_setup_\w+)\(/),H=j?K(f):null;if(j&&H&&!/\bdata-stx=/.test(H.tag)){f=Ge(f,(X,Q)=>`<body${Q} data-stx="${j[1]}">`);let W=new RegExp(`(<(?!body)[a-zA-Z][^>]*) data-stx="${j[1]}"`,"i");f=f.replace(W,"$1")}}if(r){let v=e.__stx_head_injections??Go(),y=cc(f);if(y!==null)v.beforeClose.push(y);let S=tn(f);if(S!==null)v.afterOpen.push(S);if(c.offline?.enabled&&!f.includes("data-stx-offline"))v.beforeClose.push(nn);f=oc(f,v);let b=c.app?.colorMode;if(b)f=mr(f,b)}if(r)if($n(f,"data-stx-runtime")){let y=null,S=null,b=null,w=null,T=null;try{let{getStoreScript:O}=await s("stx/store-loader",()=>import("./chunk-nrw84rpj.js")),M=c.storesDir,I=await O(M);if(I)b=`<script data-stx-stores>${I}</script>`,S=await fn("data-stx-stores",I,c)??b}catch{}y=await Un([f,b],c,g);try{let{getFrameworkComposableScript:O}=await s("stx/framework-composables",()=>import("./chunk-znhrftsf.js"));T=await O(f)}catch{}try{let{getComposableScript:O}=await s("stx/composable-loader",()=>import("./chunk-55eek6b1.js")),M=c.composablesDir,I=[y,b,T].filter((N)=>N!==null),P=await O(c._layerComposableDirs??M,f,I);if(P)w=await fn('data-stx-scoped data-stx-run="always" data-stx-composables',P,c)??`<script data-stx-scoped data-stx-run="always" data-stx-composables>${P}</script>`}catch{}let A=[y,S,w,T].filter((O)=>O!==null).map((O)=>`
1568
1568
  ${O}`).join("");f=ws(f,A)}else{let y=await Un([f],c,g);if(y){let S=f.search(/<script\b[^>]*>(?:(?!<\/script>)[\s\S])*?__stxModules\[/i);if(S!==-1)f=f.slice(0,S)+y+`
1569
1569
  `+f.slice(S)}}if(r)f=ic(f);if(r&&e.__stx_inject_css!==!1)f=await h(f,void 0,c.buildMode==="serve",!0);else if(r)f=ln(f);if(f=f.replace(/\x00STX_ESCAPED_AT\x00/g,"@"),f=xs(f),r&&e.__stx_runtime_config)f=Nt(f,e.__stx_runtime_config);if(r&&!e.__stx_defer_server_data){let v=dr(e);if(v){let y=/<head\b[^>]*>/i.exec(f),S=y?y.index+y[0].length:0;f=f.slice(0,S)+v+f.slice(S)}}return f})}catch(f){if(f instanceof U)throw f;let v=f instanceof Error?f.message:String(f),y=new ie(`Template processing failed: ${v}`,u,void 0,void 0,i.substring(0,200)+(i.length>200?"...":""));if(D.log(y,{filePath:u,context:e}),bn.logDetailedError(y,{filePath:u,template:i.substring(0,500)}),C()&&!c.debug)console.error(`[stx] ${ce.relative(process.cwd(),u)||u}: ${y.message}`);if(c.debug)throw y;return qo.createFallbackContent("Template Processing",y)}}async function ks(i,e,u,c,g){let r=process.cwd(),f={...c,partialsDir:c.partialsDir&&!ce.isAbsolute(c.partialsDir)?ce.resolve(r,c.partialsDir):c.partialsDir,componentsDir:c.componentsDir&&!ce.isAbsolute(c.componentsDir)?ce.resolve(r,c.componentsDir):c.componentsDir,layoutsDir:c.layoutsDir&&!ce.isAbsolute(c.layoutsDir)?ce.resolve(r,c.layoutsDir):c.layoutsDir},v=f,y=i;await Es(u,e),$s(e,v),y=await xe(()=>zt(y,e,u,v),y,(L)=>{D.log(L,{filePath:u,phase:"pre-processing-middleware"},"warning"),console.warn(`[stx] pre-processing middleware failed for ${u}: ${L.message}`)}),y=y.replace(/\{\{--[\s\S]*?--\}\}/g,"");let S=de(y,Ie,(L,j)=>`\x00STX_HTML_COMMENT_${j}\x00`);y=S.output;let b=S.tokens,w=(L)=>b.length===0?L:L.replace(/\x00STX_HTML_COMMENT_(\d+)\x00/g,(j,H)=>b[Number(H)]??""),T="\x00STX_ESCAPED_AT\x00",A="\x00STX_ESC_MUSTACHE_OPEN\x00",O="\x00STX_ESC_MUSTACHE_CLOSE\x00";y=y.replace(/@@/g,T),y=y.replace(/@\{\{([\s\S]*?)\}\}/g,(L,j)=>`${A}${j}${O}`),y=Jt(y),y=await an(y,u,g);let M={};y=Fr(y,M);let I={...e.__sections||{}},P="",N=mt(gt(i)),F=/@nolayout\b/.test(y)||N===!1;if(/@nolayout\b/.test(y))y=y.replace(/@nolayout\b\s*/g,"");let z=y.match(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/);if(z)P=z[1],y=y.replace(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/g,"");else if(typeof N==="string"){if(P=N,!/@section\s*\(/.test(y))y=`@section('content')
1570
1570
  ${y.trim()}
@@ -1573,7 +1573,7 @@ ${y.trim()}
1573
1573
  @endsection`}}if(P&&y.includes("<script")){let L=G(y),j=L.scripts.map((H)=>mn(H,u)??H);y=cr(L.output,j)}if(y=y.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(L,j,H)=>(I[j]=H,"")),y=y.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*([^)]+?)\s*\)/g,(L,j,H)=>{if(/^(['"]).*\1$/.test(H.trim()))return L;try{let W=l(H.trim(),e);if(W===void 0)return L;let Q=(e.__stx_inline_section_values??=[]).push(W)-1;return I[j]=`{{ __stx_inline_section_values[${Q}] }}`,""}catch{return L}}),y=y.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@endsection|@show)/g,(L,j,H)=>{if(H.includes("@parent"))I[j]=H.replace("@parent",Te);else I[j]=H.trim();return""}),e.__sections=I,y=y.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])?\)/g,(L,j,H)=>I[j]||H||""),!("slot"in e)||e.slot===void 0)y=y.replace(/\{\{\s*slot\s*\}\}/g,()=>I.content||"");if(y=zr(y,M),P){let L=[],j=G(y),H=de(j.output,cn,(W,X)=>`\x00STX_ORPHAN_STYLE_${X}\x00`);if(y=H.output.replace(/\x00STX_(SCRIPT|ORPHAN_STYLE)_(\d+)\x00/g,(W,X,Q)=>{let ee=X==="SCRIPT"?mn(j.scripts[Number(Q)],u):H.tokens[Number(Q)];if(ee)L.push(ee);return""}),L.length>0){let W=L.join(`
1574
1574
  `);I.content=I.content?`${I.content}
1575
1575
  ${W}`:W,e.__sections=I}}if(P)try{let L;if(ce.isAbsolute(P))L=P,g.add(P);else L=await xe(()=>gn(P,u,f,g),null,()=>{throw new ie(`Failed to resolve layout path: ${P}`,u,void 0,void 0,`Layout referenced from ${u}`)});if(!L){let ee=(oe)=>{if(!oe)return[];try{let ae=ce.isAbsolute(oe)?oe:ce.resolve(process.cwd(),oe);return gs.readdirSync(ae).filter((le)=>le.endsWith(".stx")).map((le)=>le.replace(/\.stx$/,""))}catch{return[]}},te=[...ee(f.layoutsDir),...ee(f.fallbackLayoutsDir)].filter((oe,ae,le)=>le.indexOf(oe)===ae).sort(),ue=`Layout not found: ${P} (referenced from ${u})`+(te.length>0?`. Available layouts: ${te.join(", ")}`:f.layoutsDir?`. No .stx layouts found in ${f.layoutsDir}`:"");if(D.log(Error(ue),{layoutPath:P,filePath:u,available:te},"error"),console.error(`[stx] ${ue}`),f.debug)throw new ie(ue,u);return y}let j=await xe(()=>Bun.file(L).text(),"",()=>{throw new ie(`Failed to read layout file: ${L}`,u,void 0,void 0,"Layout content could not be loaded")});j=un(j,L);let H=j.match(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/);if(H){if(f.debug)console.log(`Found nested layout: ${H[1]} in ${L}`);let ee={},te=j.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(ae,le,be)=>(ee[le]=be.trim(),""));for(let[ae,le]of Object.entries(ee))if(I[ae]&&I[ae].includes(Te)){let be=I[ae].indexOf(Te);I[ae]=I[ae].slice(0,be)+le+I[ae].slice(be+Te.length)}else if(!I[ae])I[ae]=le;let ue={...e,__sections:I},oe=`@layout('${H[1]}')${te}`;return await o(oe,ue,L,f,g)}let W=j.replace(/\{\{--[\s\S]*?--\}\}/g,""),X=Fr(W,M),Q={};return X=X.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(ee,te,ue)=>(Q[te]=ue.trim(),`@slot('${te}')`)),X=X.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(ee,te,ue)=>{if(I[te]){let oe=I[te];if(oe.includes(Te)){let ae=Q[te]||"",le=oe.indexOf(Te);oe=oe.slice(0,le)+ae+oe.slice(le+Te.length)}return oe}return ue||""}),X=Ss(X,I),X=X.replace(/\{\{\s*slot\s*\}\}/g,()=>I.content||""),X=zr(X,M),e.__originalFilePath=u,y=await kn(X,e,L,f,g),y=`<!-- stx-layout: ${P} -->
1576
- ${y}`,w(y)}catch(L){if(L instanceof U)throw L;throw new ie(`Error processing layout ${P}: ${L instanceof Error?L.message:String(L)}`,u)}return w(await kn(y,e,u,f,g))}function Ss(i,e){return i.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(u,c,g)=>{let r=e[c];if(r!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(r))return r}return g||""})}function $s(i,e){if(i.__stx_sfc_mode=!0,i.__stx_options=e,e.buildMode)i.__stx_buildMode=e.buildMode;let u=e.envPrefix||"STX_PUBLIC_",c={};for(let[g,r]of Object.entries(process.env))if(g.startsWith(u)&&r!==void 0)c[g]=r;i.$env=c}async function Es(i,e){await xe(()=>Kt(i,e),void 0,(u)=>{D.log(u,{filePath:i,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${i}: ${u.message}`)})}var ot="data-stx-source";function mn(i,e){if(!i)return i;let u=/^<script\b([^>]*)>/i.exec(i);if(!u||!/\bserver\b/.test(u[1])||u[1].includes(ot))return i;return`<script ${ot}="${encodeURIComponent(e)}"${i.slice(7)}`}function _s(i){let e=new RegExp(`${ot}="([^"]*)"`).exec(i);return e?decodeURIComponent(e[1]):void 0}function yn(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function xn(i,e,u){return`<div data-stx-server-script-error role="alert" style="padding:12px 14px;border:1px solid #f0b4b4;border-left-width:4px;background:#fff5f5;color:#7a1f1f;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace"><strong style="display:block;margin-bottom:4px">stx: a &lt;script server&gt; ${e==="module-resolution"?"imports a module that does not resolve":e==="syntax"?"does not parse":"names something that does not exist"}, so this component rendered nothing.</strong><span style="display:block;opacity:.85">${yn(i)}</span><span style="display:block;margin-top:4px">${yn(u)}</span></div>`}async function Ts(i,e,u,c){let{scanScriptTags:g}=await s("stx/signal-processing",()=>import("./chunk-ys6a6azq.js")),r=[],f=!C()&&!wn();for(let y of g(i)){let S=y.attrs;if(!/\bserver\b/.test(S))continue;let b=y.start+y.fullMatch.indexOf(">")+1,w=Sn(i,b);if(w===-1)continue;let T=i.slice(b,w);if(!T.trim())continue;let A=_s(S)??u,O={index:y.start,length:w+9-y.start};try{let{extractVariables:M}=await s("stx/variable-extractor",()=>import("./chunk-0s6kqr1h.js"));await M(T,e,A,{preserveExisting:!0,onFailure:(I)=>{if(I.kind==="unknown")return;if(c?.onServerScriptError?.({sourcePath:A,kind:I.kind,message:I.message}),!f)return;r.push({...O,markup:xn(A,I.kind,I.message)})}})}catch(M){let I=M instanceof Error?M:Error(String(M));if(D.log(I,{filePath:A,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${A}: ${I.message}`),f)r.push({...O,markup:xn(A,"unknown",I.message)})}}if(r.length===0)return i;let v=i;for(let y of r.sort((S,b)=>b.index-S.index))v=v.slice(0,y.index)+y.markup+v.slice(y.index+y.length);return v}async function Cs(i,e,u){try{let{interpolateScriptsInTemplate:c}=await s("stx/expressions",()=>import("./chunk-5grcasys.js"));return c(i,e,{skipServer:!0})}catch(c){let g=c instanceof Error?c:Error(String(c));return D.log(g,{filePath:u,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${u}: ${g.message}`),i}}async function kn(i,e,u,c,g){let r=i,f=c;if(r=await Ts(r,e,u,c),r=await Bt(r,e,u),r=await Ft(r,e,u),r=await Cs(r,e,u),r=await At(r,e,u,f),we(r))r=po(r,e),r=qr(r,e),r=Wr(r,e);r=fo(r);let{processStreamDirectives:v}=await s("stx/streaming",()=>import("./chunk-2khba4de.js"));r=v(r,e),r=Gn(r,e,u,f,!0),r=await en(r,e,u,f,g),r=await Vr(r,e,u,f,g),r=ga(r,e,u,f);let{processDeferDirectives:y}=await s("stx/defer",()=>import("./chunk-c9jnkbdb.js"));r=y(r,e,u);let{processTeleportDirectives:S}=await s("stx/teleport",()=>import("./chunk-kerxevf9.js"));r=S(r,e,u);let{processTransitionDirectives:b,processTransitionAttributes:w}=await s("stx/transitions",()=>import("./chunk-sqvdrk81.js"));r=b(r,e,u),r=w(r);let{processErrorBoundaryDirectives:T,stripRenderFailedMarkers:A}=await s("stx/error-boundaries",()=>import("./chunk-h85hrwkq.js"));r=T(r,e,u),r=A(r);let{processSuspenseDirectives:O}=await s("stx/suspense",()=>import("./chunk-8j0zcyd7.js"));r=O(r,e,u);let{processAsyncDirectives:M}=await s("stx/async-components",()=>import("./chunk-sncp7jhv.js"));r=M(r,e,u);let{processKeepAliveDirectives:I}=await s("stx/keep-alive",()=>import("./chunk-myc60z74.js"));r=I(r,e,u);let{processVirtualListDirectives:P,processVirtualGridDirectives:N,processInfiniteListDirectives:F}=await s("stx/virtual-scrolling",()=>import("./chunk-a1r3jbt4.js"));r=P(r,e,u),r=N(r,e,u),r=F(r,e,u);let{processPartialHydrationDirectives:z,processStaticDirectives:L}=await s("stx/partial-hydration",()=>import("./chunk-7jxj6cv1.js"));r=z(r,e,u),r=L(r);let{processComputedDirectives:j,processWatchDirectives:H}=await s("stx/computed",()=>import("./chunk-1xdzcy9d.js"));r=j(r,e,u),r=H(r,e,u);let{processFormValidationDirectives:W}=await s("stx/forms-validation",()=>import("./chunk-jdb6qhat.js"));r=W(r,e,u);let{processHeadDirective:X,processTitleDirective:Q,processMetaDirective:ee,resetHead:te}=await s("stx/head",()=>import("./chunk-vnnwp1cg.js"));if(!e.__stx_head_preset&&!e.__stx_runtime_head)te();let ue=X(r);if(r=ue.content,ue.headContent)e.__stx_head_raw=`${e.__stx_head_raw||""}${ue.headContent}
1576
+ ${y}`,w(y)}catch(L){if(L instanceof U)throw L;throw new ie(`Error processing layout ${P}: ${L instanceof Error?L.message:String(L)}`,u)}return w(await kn(y,e,u,f,g))}function Ss(i,e){return i.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(u,c,g)=>{let r=e[c];if(r!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(r))return r}return g||""})}function $s(i,e){if(i.__stx_sfc_mode=!0,i.__stx_options=e,e.buildMode)i.__stx_buildMode=e.buildMode;let u=e.envPrefix||"STX_PUBLIC_",c={};for(let[g,r]of Object.entries(process.env))if(g.startsWith(u)&&r!==void 0)c[g]=r;i.$env=c}async function Es(i,e){await xe(()=>Kt(i,e),void 0,(u)=>{D.log(u,{filePath:i,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${i}: ${u.message}`)})}var ot="data-stx-source";function mn(i,e){if(!i)return i;let u=/^<script\b([^>]*)>/i.exec(i);if(!u||!/\bserver\b/.test(u[1])||u[1].includes(ot))return i;return`<script ${ot}="${encodeURIComponent(e)}"${i.slice(7)}`}function _s(i){let e=new RegExp(`${ot}="([^"]*)"`).exec(i);return e?decodeURIComponent(e[1]):void 0}function yn(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function xn(i,e,u){return`<div data-stx-server-script-error role="alert" style="padding:12px 14px;border:1px solid #f0b4b4;border-left-width:4px;background:#fff5f5;color:#7a1f1f;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace"><strong style="display:block;margin-bottom:4px">stx: a &lt;script server&gt; ${e==="module-resolution"?"imports a module that does not resolve":e==="syntax"?"does not parse":"names something that does not exist"}, so this component rendered nothing.</strong><span style="display:block;opacity:.85">${yn(i)}</span><span style="display:block;margin-top:4px">${yn(u)}</span></div>`}async function Ts(i,e,u,c){let{scanScriptTags:g}=await s("stx/signal-processing",()=>import("./chunk-1k7js5nz.js")),r=[],f=!C()&&!wn();for(let y of g(i)){let S=y.attrs;if(!/\bserver\b/.test(S))continue;let b=y.start+y.fullMatch.indexOf(">")+1,w=Sn(i,b);if(w===-1)continue;let T=i.slice(b,w);if(!T.trim())continue;let A=_s(S)??u,O={index:y.start,length:w+9-y.start};try{let{extractVariables:M}=await s("stx/variable-extractor",()=>import("./chunk-r86d03dv.js"));await M(T,e,A,{preserveExisting:!0,onFailure:(I)=>{if(I.kind==="unknown")return;if(c?.onServerScriptError?.({sourcePath:A,kind:I.kind,message:I.message}),!f)return;r.push({...O,markup:xn(A,I.kind,I.message)})}})}catch(M){let I=M instanceof Error?M:Error(String(M));if(D.log(I,{filePath:A,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${A}: ${I.message}`),f)r.push({...O,markup:xn(A,"unknown",I.message)})}}if(r.length===0)return i;let v=i;for(let y of r.sort((S,b)=>b.index-S.index))v=v.slice(0,y.index)+y.markup+v.slice(y.index+y.length);return v}async function Cs(i,e,u){try{let{interpolateScriptsInTemplate:c}=await s("stx/expressions",()=>import("./chunk-a5agchz8.js"));return c(i,e,{skipServer:!0})}catch(c){let g=c instanceof Error?c:Error(String(c));return D.log(g,{filePath:u,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${u}: ${g.message}`),i}}async function kn(i,e,u,c,g){let r=i,f=c;if(r=await Ts(r,e,u,c),r=await Bt(r,e,u),r=await Ft(r,e,u),r=await Cs(r,e,u),r=await At(r,e,u,f),we(r))r=po(r,e),r=qr(r,e),r=Wr(r,e);r=fo(r);let{processStreamDirectives:v}=await s("stx/streaming",()=>import("./chunk-2mf8shg5.js"));r=v(r,e),r=Gn(r,e,u,f,!0),r=await en(r,e,u,f,g),r=await Vr(r,e,u,f,g),r=ga(r,e,u,f);let{processDeferDirectives:y}=await s("stx/defer",()=>import("./chunk-c9jnkbdb.js"));r=y(r,e,u);let{processTeleportDirectives:S}=await s("stx/teleport",()=>import("./chunk-kerxevf9.js"));r=S(r,e,u);let{processTransitionDirectives:b,processTransitionAttributes:w}=await s("stx/transitions",()=>import("./chunk-sqvdrk81.js"));r=b(r,e,u),r=w(r);let{processErrorBoundaryDirectives:T,stripRenderFailedMarkers:A}=await s("stx/error-boundaries",()=>import("./chunk-h85hrwkq.js"));r=T(r,e,u),r=A(r);let{processSuspenseDirectives:O}=await s("stx/suspense",()=>import("./chunk-8j0zcyd7.js"));r=O(r,e,u);let{processAsyncDirectives:M}=await s("stx/async-components",()=>import("./chunk-sncp7jhv.js"));r=M(r,e,u);let{processKeepAliveDirectives:I}=await s("stx/keep-alive",()=>import("./chunk-myc60z74.js"));r=I(r,e,u);let{processVirtualListDirectives:P,processVirtualGridDirectives:N,processInfiniteListDirectives:F}=await s("stx/virtual-scrolling",()=>import("./chunk-a1r3jbt4.js"));r=P(r,e,u),r=N(r,e,u),r=F(r,e,u);let{processPartialHydrationDirectives:z,processStaticDirectives:L}=await s("stx/partial-hydration",()=>import("./chunk-7jxj6cv1.js"));r=z(r,e,u),r=L(r);let{processComputedDirectives:j,processWatchDirectives:H}=await s("stx/computed",()=>import("./chunk-1xdzcy9d.js"));r=j(r,e,u),r=H(r,e,u);let{processFormValidationDirectives:W}=await s("stx/forms-validation",()=>import("./chunk-4566drka.js"));r=W(r,e,u);let{processHeadDirective:X,processTitleDirective:Q,processMetaDirective:ee,resetHead:te}=await s("stx/head",()=>import("./chunk-vnnwp1cg.js"));if(!e.__stx_head_preset&&!e.__stx_runtime_head)te();let ue=X(r);if(r=ue.content,ue.headContent)e.__stx_head_raw=`${e.__stx_head_raw||""}${ue.headContent}
1577
1577
  `;if(r=Q(r,e),r=ee(r,e,u),r=Xt(r),r=ao(r,e),r=Ct(r),r=Ut(r),r=await Br(r,e,u,f,g),r=await Vr(r,e,u,f,g),e.__stxProcessingDepth===1)r=qa(r,e);if(r=r.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/g,""),r=Do(r),r=re(r,e,u),r=jr(r),r=za(r,e,{filePath:u,buildMode:f.buildMode}),r=co(r,e),r=lo(r,e),r=ze(r,e),r=jt(r,e),r=Ht(r,e),r=await bt(r,e,u,f),r=await ha(r,e,u),r=await ya(r,e,u,f),r=ba(r,e,u,f),r=wo(r,e,u,f),r=xo(r,e,u),r=So(r,e,u,f),r=Et(r,e,u,f),r=ys(r,e),r=bs(r),r=Ha(r),!f.skipEventDirectives)r=Aa(r,e,u);if(r=vt(r,e,u),f.debug){let B=/\bx-data\s*=/.test(r),q=Ur(i);if(B&&q)console.warn(`[stx] ${u}: Template mixes Alpine-style (x-data) and signals (state/derived/effect) reactivity.
1578
1578
  Both work on the same page, but they manage separate scopes.
1579
1579
  Prefer signals (state/derived/effect) for new components.`)}r=la(r,e),r=await x(r,e,u),r=Va(r),r=Ua(r),r=pt(r);let{processXElementDirectives:oe}=await s("stx/x-element",()=>import("./chunk-zhxdpzga.js"));r=oe(r);let ae=e.__originalFilePath||u,le=Ne(e);if(r=await go(r,f,ae,le),r=It(r,e),r=await Wt(r,e,u,f),f.media?.image?.autoSiblings){let B=f.publicDir||"public",{rewriteImagesWithSiblings:q}=await s("stx/image-optimization/auto-sibling",()=>import("./chunk-01ks1244.js"));r=await q(r,{publicDir:B})}if(f.seo?.enabled)r=ko(r,e,f);let be=(B,q,J=!0)=>{if(!q)return B;let me=q.match(/<title\b[^>]*>[\s\S]*?<\/title>/i),ne=/<head\b[^>]*>[\s\S]*?(?:<\/head\s*>|<body\b|$)/i.exec(B),fe=ne?/<title\b[^>]*>[\s\S]*?<\/title>/i.exec(ne[0]):null;if(me&&ne&&fe){if(J){let Ce=ne.index+fe.index;B=B.slice(0,Ce)+me[0]+B.slice(Ce+fe[0].length)}if(q=q.replace(me[0],"").trim(),!q)return B}if(/<\/head>/i.test(B))return B.replace(/<\/head>/i,`${q}
@@ -1587,6 +1587,6 @@ ${lt()}
1587
1587
  `+Ce}else r=r.replace("</head>",`${q}
1588
1588
  </head>`)}else if(r.includes("<body"))r=r.replace(/<body([^>]*)>/,`<body$1>
1589
1589
  ${q}`);else r=q+`
1590
- `+r}{let{scanScriptTags:B}=await s("stx/signal-processing",()=>import("./chunk-ys6a6azq.js")),q=[];for(let J of B(r)){if(!/\bserver\b/i.test(J.attrs))continue;let me=J.start+J.fullMatch.indexOf(">")+1,ne=Sn(r,me);if(ne===-1)continue;let fe=ne+9;while(fe<r.length&&/\s/.test(r[fe]))fe++;q.push({start:J.start,end:fe})}if(q.length>0){let J=Array(q.length+1),me=0;for(let ne=0;ne<q.length;ne++){let{start:fe,end:Ce}=q[ne];J[ne]=r.slice(me,fe),me=Ce}J[q.length]=r.slice(me),r=J.join("")}}let at=ms(r,u);if(at.hasScoped)r=at.html;let Rn=e.__stx_event_bindings||[],Xe=!1,ct=[],Mn=/\s:[a-z][\w.-]*\s*=/.test(r),{scanScriptTags:Dn}=await s("stx/signal-processing",()=>import("./chunk-ys6a6azq.js"));for(let B of Dn(r,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))ct.push({match:B.fullMatch,attrs:B.attrs,content:B.body});for(let{match:B,attrs:q,content:J}of ct){Xe=!0;let me=J;Pe(J,u,c.strict,e.__originalFilePath);let ne=await De(J,{eventBindings:Rn,attrs:q,hasColonDirectives:Mn,templateContent:i,filePath:u,projectRoot:process.cwd(),production:Yo(c.buildMode,c.minifyClient),serverData:le});r=r.replace(B,()=>ne)}if(Xe)e.__stx_event_bindings=[];if(!Xe&&e.__stxProcessingDepth===1){let B=e.__stx_event_bindings||[];if(B.length>0){let q=Ro(B);if(q){let J=r.lastIndexOf("</body>");r=J===-1?r+q:r.slice(0,J)+q+`
1590
+ `+r}{let{scanScriptTags:B}=await s("stx/signal-processing",()=>import("./chunk-1k7js5nz.js")),q=[];for(let J of B(r)){if(!/\bserver\b/i.test(J.attrs))continue;let me=J.start+J.fullMatch.indexOf(">")+1,ne=Sn(r,me);if(ne===-1)continue;let fe=ne+9;while(fe<r.length&&/\s/.test(r[fe]))fe++;q.push({start:J.start,end:fe})}if(q.length>0){let J=Array(q.length+1),me=0;for(let ne=0;ne<q.length;ne++){let{start:fe,end:Ce}=q[ne];J[ne]=r.slice(me,fe),me=Ce}J[q.length]=r.slice(me),r=J.join("")}}let at=ms(r,u);if(at.hasScoped)r=at.html;let Rn=e.__stx_event_bindings||[],Xe=!1,ct=[],Mn=/\s:[a-z][\w.-]*\s*=/.test(r),{scanScriptTags:Dn}=await s("stx/signal-processing",()=>import("./chunk-1k7js5nz.js"));for(let B of Dn(r,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))ct.push({match:B.fullMatch,attrs:B.attrs,content:B.body});for(let{match:B,attrs:q,content:J}of ct){Xe=!0;let me=J;Pe(J,u,c.strict,e.__originalFilePath);let ne=await De(J,{eventBindings:Rn,attrs:q,hasColonDirectives:Mn,templateContent:i,filePath:u,projectRoot:process.cwd(),production:Yo(c.buildMode,c.minifyClient),serverData:le});r=r.replace(B,()=>ne)}if(Xe)e.__stx_event_bindings=[];if(!Xe&&e.__stxProcessingDepth===1){let B=e.__stx_event_bindings||[];if(B.length>0){let q=Ro(B);if(q){let J=r.lastIndexOf("</body>");r=J===-1?r+q:r.slice(0,J)+q+`
1591
1591
  `+r.slice(J)}e.__stx_event_bindings=[]}}if(!he(r)&&da(r))r=await Yn(r,f);if(r=pa(r),f.csp?.enabled&&f.csp.useNonce&&typeof e.cspNonce==="string")r=$t(r,e.cspNonce);return r}
1592
1592
  export{gt,$e,oa,Lr,to,no,Un,o};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Un,o}from"./chunk-4mqq6896.js";import"./chunk-jt9kxnva.js";import"./chunk-9bgb9n12.js";import"./chunk-psprkndv.js";import"./chunk-mwmmmbxj.js";import"./chunk-vvezfjt1.js";import"./chunk-hx787tfa.js";import"./chunk-n42421az.js";import{ye}from"./chunk-s0226rfp.js";import"./chunk-jgxzbthg.js";import"./chunk-nc85m4p9.js";import"./chunk-h176dx1q.js";import"./chunk-s0ntt1cn.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-ygb33q5w.js";import"./chunk-kypwg2ws.js";import{Pe,ys,bs}from"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{Un as buildModulesTag,ye as injectRouterScript,o as processDirectives,ys as processJsonDirective,bs as processOnceDirective,Pe as validateClientScript};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ws,qd,Kd}from"./chunk-35cvjgj2.js";import"./chunk-ejafjap5.js";import"./chunk-cm8ad78x.js";import"./chunk-374nhgyf.js";import"./chunk-n42421az.js";import"./chunk-s0226rfp.js";import"./chunk-jgxzbthg.js";import"./chunk-h176dx1q.js";import"./chunk-s0ntt1cn.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-ygb33q5w.js";import"./chunk-kypwg2ws.js";import"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{Kd as clearComposableCache,qd as getComposableScript,Ws as listComposableModules};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{i}from"./chunk-4cnphtcz.js";import{Us}from"./chunk-pfn70zdr.js";import p from"path";async function Qu(t={}){let d=performance.now(),o=t.root||process.cwd(),e=await i(o),u=t.ssr?.routeRules??e.routeRules??{};if(Us(u),!e.ssr&&Object.keys(u).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let n,l;if(r==="ssg"){let{generateStaticSite:s}=await import("./ssg.js");n=await s({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:s}=await import("./chunk-y4kzqam8.js");l=await s({root:o,outputDir:".output",debug:t.debug,...t.ssr})}let a=Math.round(performance.now()-d);return{mode:r,ssg:n,ssr:l,duration:a}}
2
+ import{i}from"./chunk-h176dx1q.js";import{Us}from"./chunk-pfn70zdr.js";import p from"path";async function Qu(t={}){let d=performance.now(),o=t.root||process.cwd(),e=await i(o),u=t.ssr?.routeRules??e.routeRules??{};if(Us(u),!e.ssr&&Object.keys(u).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let n,l;if(r==="ssg"){let{generateStaticSite:s}=await import("./ssg.js");n=await s({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:s}=await import("./chunk-b6vwy6bd.js");l=await s({root:o,outputDir:".output",debug:t.debug,...t.ssr})}let a=Math.round(performance.now()-d);return{mode:r,ssg:n,ssr:l,duration:a}}
3
3
  export{Qu};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{hn,Vo}from"./chunk-bwcejt6t.js";import"./chunk-t6m5d64b.js";export{Vo as generateRuntimeConfigTypes,hn as prepareRuntimeConfig};
2
+ import{hn,Vo}from"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";export{Vo as generateRuntimeConfigTypes,hn as prepareRuntimeConfig};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{ue,Fa,hs,dn,g,Ne,De}from"./chunk-6eazxhpe.js";import{er,Je,N}from"./chunk-4cnphtcz.js";import{Un,o}from"./chunk-2h39d4wz.js";import{ye}from"./chunk-eq9s8dcp.js";function b(s){return s.endsWith(".md")||s.endsWith(".markdown")}function k(s){let e=[];m(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];m(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function m(n,p){let u;while((u=n.exec(s))!==null){let t=u.index,i=t+u[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return s;e.sort((n,p)=>n.start-p.start);let c="",a=0;for(let n of e){if(n.start<a)continue;c+=s.slice(a,n.start),c+=`@raw${s.slice(n.start,n.end)}@endraw`,a=n.end}return c+=s.slice(a),c}async function R(s,e={}){let{data:r,content:m}=er(s),a=await(e.renderer??((n)=>Je(n)))(m);return{html:k(a),frontmatter:r??{}}}import{dirname as v,resolve as _}from"path";function M(s){let e=s,r=ue(s);if(r)e=r.content.trim();let m=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,c=[],a=[],n=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),u;while((u=m.exec(s))!==null){let i=u[1],l=u[2],d=u[0],f=i.includes("server");if(p(l))n.push(d);else if(f)a.push(l);else c.push(d)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,d=[];while((l=i.exec(t))!==null){let f=l.index+l[0].length,x=t.indexOf("</script>",f);if(x===-1)continue;d.push({start:l.index,end:x+9}),i.lastIndex=x+9}for(let f=d.length-1;f>=0;f--)t=t.substring(0,d[f].start)+t.substring(d[f].end)}for(let i of c)t=t.replace(i,"");return{templateContent:t,serverScripts:a,clientScripts:c,signalsScripts:n}}function E(s,e){return`<!DOCTYPE html>
2
+ import{ue,Fa,hs,dn,g,Ne,De}from"./chunk-4f5bmy7h.js";import{er,Je,N}from"./chunk-h176dx1q.js";import{Un,o}from"./chunk-4mqq6896.js";import{ye}from"./chunk-s0226rfp.js";function b(s){return s.endsWith(".md")||s.endsWith(".markdown")}function k(s){let e=[];m(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];m(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function m(n,p){let u;while((u=n.exec(s))!==null){let t=u.index,i=t+u[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return s;e.sort((n,p)=>n.start-p.start);let c="",a=0;for(let n of e){if(n.start<a)continue;c+=s.slice(a,n.start),c+=`@raw${s.slice(n.start,n.end)}@endraw`,a=n.end}return c+=s.slice(a),c}async function R(s,e={}){let{data:r,content:m}=er(s),a=await(e.renderer??((n)=>Je(n)))(m);return{html:k(a),frontmatter:r??{}}}import{dirname as v,resolve as _}from"path";function M(s){let e=s,r=ue(s);if(r)e=r.content.trim();let m=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,c=[],a=[],n=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),u;while((u=m.exec(s))!==null){let i=u[1],l=u[2],d=u[0],f=i.includes("server");if(p(l))n.push(d);else if(f)a.push(l);else c.push(d)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,d=[];while((l=i.exec(t))!==null){let f=l.index+l[0].length,x=t.indexOf("</script>",f);if(x===-1)continue;d.push({start:l.index,end:x+9}),i.lastIndex=x+9}for(let f=d.length-1;f>=0;f--)t=t.substring(0,d[f].start)+t.substring(d[f].end)}for(let i of c)t=t.replace(i,"");return{templateContent:t,serverScripts:a,clientScripts:c,signalsScripts:n}}function E(s,e){return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -14,5 +14,5 @@ ${a.join(`
14
14
  `)}`}else{if(r.processClientScripts!==!1&&a.length>0){let i=p.__stx_event_bindings||[],l=Ne(p),d=await Promise.all(a.map(async(w)=>{let C=w.match(/<script\b([^>]*)>/i)?.[1]||"";if(/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(C))return w;let h=w.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!h)return w;return await De(h[1],{eventBindings:i,templateContent:t,serverData:l,filePath:e})})),x=[await Un(d,{...n,buildMode:"compile"}),...d].filter(Boolean).join(`
15
15
  `);if(t.match(/(<\/body>)/i))t=t.replace(/(<\/body>)/i,`${x}
16
16
  $1`);else t+=`
17
- ${x}`}t=await ye(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=E(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-yn9dwq2b.js");t=await i(t)}catch{}return t}
17
+ ${x}`}t=await ye(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=E(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-4hbevevz.js");t=await i(t)}catch{}return t}
18
18
  export{Zi};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{jr,Gn,El}from"./chunk-psprkndv.js";import"./chunk-hx787tfa.js";import"./chunk-n42421az.js";import"./chunk-s0226rfp.js";import"./chunk-jgxzbthg.js";import"./chunk-h176dx1q.js";import"./chunk-s0ntt1cn.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-ygb33q5w.js";import"./chunk-kypwg2ws.js";import{$t}from"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{El as declareBareLoopHead,$t as parseLoopBinding,Gn as processLoops,jr as reportDeferredLoopWarnings};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Qu}from"./chunk-m7ce359r.js";import"./chunk-4cnphtcz.js";import"./chunk-9ed0hr7y.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-ygb33q5w.js";import"./chunk-kypwg2ws.js";import"./chunk-6eazxhpe.js";import"./chunk-bwcejt6t.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{Qu as buildApp};
2
+ import{Qu}from"./chunk-5gh02j5x.js";import"./chunk-h176dx1q.js";import"./chunk-s0ntt1cn.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-ygb33q5w.js";import"./chunk-kypwg2ws.js";import"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{Qu as buildApp};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{p,u}from"./chunk-r0ys9aqa.js";import{X,H,d}from"./chunk-6eazxhpe.js";function z(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var N=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function k(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function B(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);n=g===-1?t.length:g+3;continue}let a=k(t,s+1);if(a===-1)return-1;let f=t.slice(s,a),c=f.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(f))e++}n=a}return-1}function Z(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){e=s;continue}let c=f[2].toLowerCase();if(f[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);e=s;continue}let g=/\/\s*>$/.test(a),m=i.length===0?a.match(r):null;if(m){let l=m[1]||m[2],h=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=g||N.has(c)?-1:B(t,c,s);if(S===-1)o.push({start:n,end:s,slotName:l,element:h}),e=s;else o.push({start:n,end:S,slotName:l,element:h+t.slice(s,S)}),e=S;continue}if(!g&&!N.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function L(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){e=s;continue}let c=f[1]==="/",g=f[2].toLowerCase();if(c){let l=i.lastIndexOf(g);if(l!==-1)i.splice(l);e=s;continue}if(g==="template"&&i.length===0){let l=a.match(r);if(l){let h=z(t,s);if(h!==-1){let S=l[1]||l[2]||l[3];o.push({start:n,end:h,slotName:S,content:t.slice(s,h-11).trim(),propsBinding:l[4]||void 0}),e=h;continue}}}if(!/\/\s*>$/.test(a)&&!N.has(g)){if(i.push(g),g==="script"||g==="style"){let l=t.toLowerCase().indexOf(`</${g}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function Hc(t){let o={default:"",named:new Map},i=t,r=L(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=Z(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function td(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function Vc(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r},a=new Set,f=new Set;if(n.startsWith("{")&&n.endsWith("}")){let c=n.slice(1,-1).split(",").map((g)=>g.trim()).filter(Boolean);for(let g of c){let[m,l]=g.split(":").map((S)=>S.trim()),h=l||m;if(s[h]=o[m],o[m]!==void 0)f.add(h);else a.add(h)}}else if(s[n]=o,Object.values(o).some((c)=>c===void 0))a.add(n);else f.add(n);e=j(e,s,a,f)}return e}function j(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(e,n)=>{try{let s=n.trim();if(H(s,i))return e;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!H(s,r))return e;let a=_(s,o);if(a===void 0)return e;return d(String(a??""))}catch{return`{{ ${n} }}`}})}function _(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!p(t))return;return u(t,Object.keys(o))(...Object.values(o))}catch{return}}async function Uc(t,o,i,r){let e=t;e=await I(e,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(a,f,c,g)=>{let m=o.named.get(f),l=g?.trim()||"",h=c||"",S={},E=[],C=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,b;while((b=C.exec(h))!==null){let w=b[1],x=b[2];S[w]=_(x,i),E.push([w,x])}if(r!==void 0&&m?.propsBinding&&Object.values(S).some((w)=>w===void 0)){let w=m.propsBinding.trim(),x=X(`${w} in []`),y="__stx_slot_props";while(x.includes(y))y+="_";let M=E.map(([A,P])=>{let O=S[A],R;try{R=O===void 0?void 0:JSON.stringify(O)}catch{}return`${JSON.stringify(A)}:(${R??P})`}).join(","),v=d(JSON.stringify({binding:w,names:x,owner:r}));return`<template :for="${d(`${y} in [{${M}}]`)}" data-stx-slot-binding="${encodeURIComponent(w)}" data-stx-slot-scope="${v}">${m.content}</template>`}return await Vc(m,S,l,i)});let s=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return e=e.replace(s,(a,f,c)=>{if(/\bname\s*=/.test(f||""))return a;let g=c?.trim()||"";return o.default||g}),e}async function I(t,o,i){let r=[],e=[];t.replace(o,(a,...f)=>{let c=f[f.length-2];return e.push({match:a,index:c}),r.push(i(a,...f.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:f,index:c}=e[a];s=s.slice(0,c)+n[a]+s.slice(c+f.length)}return s}function nd(t){let o=Hc(t);return{defaultSlot:o.default,namedSlots:o.named}}async function rd(t,o,i,r,e){return await Uc(t,{default:o,named:i},r,e)}
2
+ import{p,u}from"./chunk-r0ys9aqa.js";import{X,H,d}from"./chunk-4f5bmy7h.js";function z(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var N=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function k(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function B(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);n=g===-1?t.length:g+3;continue}let a=k(t,s+1);if(a===-1)return-1;let f=t.slice(s,a),c=f.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(f))e++}n=a}return-1}function Z(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){e=s;continue}let c=f[2].toLowerCase();if(f[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);e=s;continue}let g=/\/\s*>$/.test(a),m=i.length===0?a.match(r):null;if(m){let l=m[1]||m[2],h=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=g||N.has(c)?-1:B(t,c,s);if(S===-1)o.push({start:n,end:s,slotName:l,element:h}),e=s;else o.push({start:n,end:S,slotName:l,element:h+t.slice(s,S)}),e=S;continue}if(!g&&!N.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function L(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){e=s;continue}let c=f[1]==="/",g=f[2].toLowerCase();if(c){let l=i.lastIndexOf(g);if(l!==-1)i.splice(l);e=s;continue}if(g==="template"&&i.length===0){let l=a.match(r);if(l){let h=z(t,s);if(h!==-1){let S=l[1]||l[2]||l[3];o.push({start:n,end:h,slotName:S,content:t.slice(s,h-11).trim(),propsBinding:l[4]||void 0}),e=h;continue}}}if(!/\/\s*>$/.test(a)&&!N.has(g)){if(i.push(g),g==="script"||g==="style"){let l=t.toLowerCase().indexOf(`</${g}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function Hc(t){let o={default:"",named:new Map},i=t,r=L(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=Z(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function td(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function Vc(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r},a=new Set,f=new Set;if(n.startsWith("{")&&n.endsWith("}")){let c=n.slice(1,-1).split(",").map((g)=>g.trim()).filter(Boolean);for(let g of c){let[m,l]=g.split(":").map((S)=>S.trim()),h=l||m;if(s[h]=o[m],o[m]!==void 0)f.add(h);else a.add(h)}}else if(s[n]=o,Object.values(o).some((c)=>c===void 0))a.add(n);else f.add(n);e=j(e,s,a,f)}return e}function j(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(e,n)=>{try{let s=n.trim();if(H(s,i))return e;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!H(s,r))return e;let a=_(s,o);if(a===void 0)return e;return d(String(a??""))}catch{return`{{ ${n} }}`}})}function _(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!p(t))return;return u(t,Object.keys(o))(...Object.values(o))}catch{return}}async function Uc(t,o,i,r){let e=t;e=await I(e,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(a,f,c,g)=>{let m=o.named.get(f),l=g?.trim()||"",h=c||"",S={},E=[],C=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,b;while((b=C.exec(h))!==null){let w=b[1],x=b[2];S[w]=_(x,i),E.push([w,x])}if(r!==void 0&&m?.propsBinding&&Object.values(S).some((w)=>w===void 0)){let w=m.propsBinding.trim(),x=X(`${w} in []`),y="__stx_slot_props";while(x.includes(y))y+="_";let M=E.map(([A,P])=>{let O=S[A],R;try{R=O===void 0?void 0:JSON.stringify(O)}catch{}return`${JSON.stringify(A)}:(${R??P})`}).join(","),v=d(JSON.stringify({binding:w,names:x,owner:r}));return`<template :for="${d(`${y} in [{${M}}]`)}" data-stx-slot-binding="${encodeURIComponent(w)}" data-stx-slot-scope="${v}">${m.content}</template>`}return await Vc(m,S,l,i)});let s=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return e=e.replace(s,(a,f,c)=>{if(/\bname\s*=/.test(f||""))return a;let g=c?.trim()||"";return o.default||g}),e}async function I(t,o,i){let r=[],e=[];t.replace(o,(a,...f)=>{let c=f[f.length-2];return e.push({match:a,index:c}),r.push(i(a,...f.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:f,index:c}=e[a];s=s.slice(0,c)+n[a]+s.slice(c+f.length)}return s}function nd(t){let o=Hc(t);return{defaultSlot:o.default,namedSlots:o.named}}async function rd(t,o,i,r,e){return await Uc(t,{default:o,named:i},r,e)}
3
3
  export{Hc,td,Vc,Uc,nd,rd};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Hc,td,Vc,Uc,nd,rd}from"./chunk-sbad32da.js";import"./chunk-6eazxhpe.js";import"./chunk-bwcejt6t.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{rd as applySlots,nd as extractSlotContent,td as parseSlotElement,Hc as parseSlots,Uc as processSlots,Vc as renderSlot};
2
+ import{Hc,td,Vc,Uc,nd,rd}from"./chunk-8485q7dh.js";import"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{rd as applySlots,nd as extractSlotContent,td as parseSlotElement,Hc as parseSlots,Uc as processSlots,Vc as renderSlot};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Ze}from"./chunk-kypwg2ws.js";import{ft,Dn}from"./chunk-ct0ee0fr.js";import{Oe,un,Qa,ec}from"./chunk-6eazxhpe.js";import{mr,hr,yr,vr,Se}from"./chunk-r0ys9aqa.js";import{A}from"./chunk-t6m5d64b.js";import{Vo}from"./chunk-bwcejt6t.js";import{h}from"./chunk-623w7x5z.js";import{o}from"./chunk-2h39d4wz.js";import{N,i}from"./chunk-4cnphtcz.js";import{_a}from"./chunk-912r15hr.js";import{Ve,_e,Ii,Oi,Cn}from"./chunk-mm6xx4pm.js";import{en,Zs}from"./chunk-hyk31r03.js";import{En}from"./chunk-pfn70zdr.js";import{Kt,Fn,zn}from"./chunk-hqj28381.js";import{q}from"./chunk-eq9s8dcp.js";import m from"fs";import c from"path";import{createHash as Q}from"crypto";function W(n){return Q("sha256").update(n).digest("hex").slice(0,8)}function J(n=!1){let l=n?Dn():ft(),a=W(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function U(){let n=Ze(),l=W(n);return{content:n,filename:`router.${l}.js`,hash:l}}import V from"path";import{createHash as ee}from"crypto";function te(n={}){let l=new Set;return{context:new Proxy(n,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(n,l,a={}){let r=V.resolve(n),e=await Bun.file(r).text(),S=ee("sha256").update(e).digest("hex").slice(0,16);Qa();let _={};try{_=await i(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,f;while((f=d.exec(e))!==null){let R=f[1];if(/\bserver\b/.test(R))y.push(f[2])}let u=new Set(y.flatMap((R)=>Oe(R))),{context:D}=te({__filename:r,__dirname:V.dirname(r),__stx_serverDeclared:u}),w=new Set,j={...N,..._,...a,buildMode:"compile",strict:!1},b=await o(e,D,r,j,w),C=Ve(b),P=ec();return{route:l,sourceFile:n,html:b,fragment:C,placeholders:P,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(w),contentHash:S,status:un(e),streamTemplates:D.__streamTemplates}}var re=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(n,l){let a=0,r=0;if(!m.existsSync(n))return{copied:a,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,_){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(re.has(d.name))continue;let f=c.join(S,d.name),u=c.join(_,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(f,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(f,u),a++,r+=m.statSync(u).size}}}return e(n,l),{copied:a,bytes:r}}async function zu(n={}){let l=Date.now(),a=c.resolve(n.root||process.cwd()),r=c.resolve(a,n.outputDir||".output");console.log("[stx build] Starting production build...");let e=await i(a),S=c.resolve(a,n.componentsDir??e.componentsDir??"components"),_=c.resolve(a,n.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,n.layoutsDir??e.layoutsDir??"layouts"),d=n.publicDir??e.publicDir??"public",f=Se(e.app?.head,{known:vr,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",w=n.routeRules??e.routeRules??{},j=En(w),b=n.serverApi??e.serverApi,C=typeof b==="object"?b:{};if(b)en(a,C);if(e.runtimeConfig)A(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let P=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of P)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=q(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],B=R.filter((s)=>!Y.some((g)=>s.pattern.startsWith(`/${g}/`)||s.pattern===`/${g}`));console.log(`[stx build] Found ${B.length} page routes (${R.length-B.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=J(n.debug),x=U();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let M=[],k=[];for(let s of B){let g=j(s.pattern),O=g.rendering==="prerender";if(O&&(s.pattern.includes(":")||s.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${s.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(s.filePath,s.pattern,{configDir:a,componentsDir:S,partialsDir:_,layoutsDir:y,debug:n.debug});if(M.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=yr(t.html,f,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=mr(t.html,u);if(f.htmlAttrs)t.html=hr(t.html,f.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let I=p[1];t.html=t.html.replace(" "+I,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${I}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await h(t.html),O){let p=await Cn(t,{params:{},request:new Request(`http://stx.build${s.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${s.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=_e(t.html,D);let L=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),z=c.join("server","pages",`${L}.compiled.json`),G=c.join("server","fragments",`${L}.html`);await Bun.write(c.join(r,z),JSON.stringify(t,null,2)),await Bun.write(c.join(r,G),t.fragment),k.push({pattern:s.pattern,compiledPath:z,fragmentPath:G,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:O}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(g).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let E=c.resolve(a,d);if(m.existsSync(E)){let{copied:s,bytes:g}=Z(E,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(g/1024).toFixed(1)}KB) from ${d}/`)}let H=zn(a);if(H){let{copied:s,bytes:g}=Z(H,c.join(r,"public",Fn));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(g/1024).toFixed(1)}KB) from ${Kt}/`)}let F={runtime:v.filename,router:x.filename},T=Ii(k,F,r);if(T.routeRules=w,T.routerContainer=D,b)T.apiRoutes=await Zs(a,r,C);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Vo(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(_a(e._layerGraph),null,2));Oi(T,r);let K=Date.now()-l;return console.log(`
2
+ import{Ze}from"./chunk-kypwg2ws.js";import{ft,Dn}from"./chunk-ct0ee0fr.js";import{Oe,un,Qa,ec}from"./chunk-4f5bmy7h.js";import{mr,hr,yr,vr,Se}from"./chunk-r0ys9aqa.js";import{A}from"./chunk-t6m5d64b.js";import{Vo}from"./chunk-tjwv101c.js";import{h}from"./chunk-jt9kxnva.js";import{o}from"./chunk-4mqq6896.js";import{N,i}from"./chunk-h176dx1q.js";import{_a}from"./chunk-912r15hr.js";import{Ve,_e,Ii,Oi,Cn}from"./chunk-jk0gba16.js";import{en,Zs}from"./chunk-cm8ad78x.js";import{En}from"./chunk-pfn70zdr.js";import{Kt,Fn,zn}from"./chunk-hqj28381.js";import{q}from"./chunk-s0226rfp.js";import m from"fs";import c from"path";import{createHash as Q}from"crypto";function W(n){return Q("sha256").update(n).digest("hex").slice(0,8)}function J(n=!1){let l=n?Dn():ft(),a=W(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function U(){let n=Ze(),l=W(n);return{content:n,filename:`router.${l}.js`,hash:l}}import V from"path";import{createHash as ee}from"crypto";function te(n={}){let l=new Set;return{context:new Proxy(n,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(n,l,a={}){let r=V.resolve(n),e=await Bun.file(r).text(),S=ee("sha256").update(e).digest("hex").slice(0,16);Qa();let _={};try{_=await i(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,f;while((f=d.exec(e))!==null){let R=f[1];if(/\bserver\b/.test(R))y.push(f[2])}let u=new Set(y.flatMap((R)=>Oe(R))),{context:D}=te({__filename:r,__dirname:V.dirname(r),__stx_serverDeclared:u}),w=new Set,j={...N,..._,...a,buildMode:"compile",strict:!1},b=await o(e,D,r,j,w),C=Ve(b),P=ec();return{route:l,sourceFile:n,html:b,fragment:C,placeholders:P,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(w),contentHash:S,status:un(e),streamTemplates:D.__streamTemplates}}var re=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(n,l){let a=0,r=0;if(!m.existsSync(n))return{copied:a,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,_){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(re.has(d.name))continue;let f=c.join(S,d.name),u=c.join(_,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(f,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(f,u),a++,r+=m.statSync(u).size}}}return e(n,l),{copied:a,bytes:r}}async function zu(n={}){let l=Date.now(),a=c.resolve(n.root||process.cwd()),r=c.resolve(a,n.outputDir||".output");console.log("[stx build] Starting production build...");let e=await i(a),S=c.resolve(a,n.componentsDir??e.componentsDir??"components"),_=c.resolve(a,n.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,n.layoutsDir??e.layoutsDir??"layouts"),d=n.publicDir??e.publicDir??"public",f=Se(e.app?.head,{known:vr,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",w=n.routeRules??e.routeRules??{},j=En(w),b=n.serverApi??e.serverApi,C=typeof b==="object"?b:{};if(b)en(a,C);if(e.runtimeConfig)A(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let P=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of P)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=q(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],B=R.filter((s)=>!Y.some((g)=>s.pattern.startsWith(`/${g}/`)||s.pattern===`/${g}`));console.log(`[stx build] Found ${B.length} page routes (${R.length-B.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=J(n.debug),x=U();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let M=[],k=[];for(let s of B){let g=j(s.pattern),O=g.rendering==="prerender";if(O&&(s.pattern.includes(":")||s.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${s.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(s.filePath,s.pattern,{configDir:a,componentsDir:S,partialsDir:_,layoutsDir:y,debug:n.debug});if(M.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=yr(t.html,f,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=mr(t.html,u);if(f.htmlAttrs)t.html=hr(t.html,f.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let I=p[1];t.html=t.html.replace(" "+I,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${I}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await h(t.html),O){let p=await Cn(t,{params:{},request:new Request(`http://stx.build${s.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${s.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=_e(t.html,D);let L=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),z=c.join("server","pages",`${L}.compiled.json`),G=c.join("server","fragments",`${L}.html`);await Bun.write(c.join(r,z),JSON.stringify(t,null,2)),await Bun.write(c.join(r,G),t.fragment),k.push({pattern:s.pattern,compiledPath:z,fragmentPath:G,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:O}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(g).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let E=c.resolve(a,d);if(m.existsSync(E)){let{copied:s,bytes:g}=Z(E,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(g/1024).toFixed(1)}KB) from ${d}/`)}let H=zn(a);if(H){let{copied:s,bytes:g}=Z(H,c.join(r,"public",Fn));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(g/1024).toFixed(1)}KB) from ${Kt}/`)}let F={runtime:v.filename,router:x.filename},T=Ii(k,F,r);if(T.routeRules=w,T.routerContainer=D,b)T.apiRoutes=await Zs(a,r,C);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Vo(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(_a(e._layerGraph),null,2));Oi(T,r);let K=Date.now()-l;return console.log(`
3
3
  [stx build] Done in ${K}ms \u2014 ${M.length} pages compiled`),{pageCount:M.length,assets:F,outputDir:r,duration:K}}
4
4
  export{zu};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{be,ws,cu,Dp,lu,Mp,Ot,d,V,Y,mn,we,uu,Ho,du,Lp,x,pu,jp,_,Bp}from"./chunk-6eazxhpe.js";import"./chunk-bwcejt6t.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{pu as applyFilters,Mp as clearCustomFilters,uu as clientLoopScopes,ws as defaultFilters,mn as escapeAttributeValue,d as escapeHtml,V as escapeHtmlValue,Y as escapeInterpolatedHtmlValue,_ as evaluateExpression,be as findMustacheEnd,lu as getAllFilters,du as interpolateScriptAttributes,Ho as interpolateScriptExpressions,Lp as interpolateScriptsInTemplate,x as processExpressions,cu as registerFilter,Dp as registerFilters,Ot as replaceInterpolations,jp as resetRejectedExpressionWarnings,Bp as unescapeHtml,we as usesSignalsInScript};
2
+ import{be,ws,cu,Dp,lu,Mp,Ot,d,V,Y,mn,we,uu,Ho,du,Lp,x,pu,jp,_,Bp}from"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{pu as applyFilters,Mp as clearCustomFilters,uu as clientLoopScopes,ws as defaultFilters,mn as escapeAttributeValue,d as escapeHtml,V as escapeHtmlValue,Y as escapeInterpolatedHtmlValue,_ as evaluateExpression,be as findMustacheEnd,lu as getAllFilters,du as interpolateScriptAttributes,Ho as interpolateScriptExpressions,Lp as interpolateScriptsInTemplate,x as processExpressions,cu as registerFilter,Dp as registerFilters,Ot as replaceInterpolations,jp as resetRejectedExpressionWarnings,Bp as unescapeHtml,we as usesSignalsInScript};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{zu}from"./chunk-91ytsvhd.js";import"./chunk-jk0gba16.js";import"./chunk-ct0ee0fr.js";import"./chunk-hy4gaf8g.js";import"./chunk-cm8ad78x.js";import"./chunk-4mqq6896.js";import"./chunk-jt9kxnva.js";import"./chunk-9bgb9n12.js";import"./chunk-psprkndv.js";import"./chunk-mwmmmbxj.js";import"./chunk-vvezfjt1.js";import"./chunk-hx787tfa.js";import"./chunk-n42421az.js";import"./chunk-s0226rfp.js";import"./chunk-jgxzbthg.js";import"./chunk-nc85m4p9.js";import"./chunk-h176dx1q.js";import"./chunk-s0ntt1cn.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-ygb33q5w.js";import"./chunk-kypwg2ws.js";import"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{zu as buildForProduction};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Iu}from"./chunk-smqgdmc4.js";import"./chunk-4mqq6896.js";import"./chunk-jt9kxnva.js";import"./chunk-9bgb9n12.js";import"./chunk-psprkndv.js";import"./chunk-mwmmmbxj.js";import"./chunk-vvezfjt1.js";import"./chunk-hx787tfa.js";import"./chunk-n42421az.js";import"./chunk-s0226rfp.js";import"./chunk-jgxzbthg.js";import"./chunk-nc85m4p9.js";import"./chunk-h176dx1q.js";import"./chunk-s0ntt1cn.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-ygb33q5w.js";import"./chunk-kypwg2ws.js";import"./chunk-4f5bmy7h.js";import"./chunk-tjwv101c.js";import"./chunk-t6m5d64b.js";import"./chunk-r0ys9aqa.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{Iu as startInteractive};