@stacksjs/stx 0.2.380 → 0.2.382

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 (159) hide show
  1. package/dist/{chunk-m7zebyq5.js → chunk-01mh30km.js} +1 -1
  2. package/dist/chunk-03h5sckj.js +2 -0
  3. package/dist/{chunk-y2drxh2s.js → chunk-0gcy2dss.js} +1 -1
  4. package/dist/chunk-0t944mfd.js +2 -0
  5. package/dist/{chunk-sf4e6cnx.js → chunk-1c4vex8k.js} +1 -1
  6. package/dist/{chunk-n7m0zs73.js → chunk-1k0bcce4.js} +1 -1
  7. package/dist/chunk-1qb48mwq.js +2 -0
  8. package/dist/{chunk-myyj9qp3.js → chunk-1rdm5y91.js} +1 -1
  9. package/dist/{chunk-m859sqt4.js → chunk-2jcq8wck.js} +144 -144
  10. package/dist/{chunk-nvksp2ws.js → chunk-2pbx4h33.js} +1 -1
  11. package/dist/chunk-2vhj2w6v.js +2 -0
  12. package/dist/{chunk-1n3syq26.js → chunk-347ry9a1.js} +1 -1
  13. package/dist/chunk-3dfdag91.js +30 -0
  14. package/dist/chunk-3e0vdykh.js +2 -0
  15. package/dist/chunk-3q9rpjx0.js +2 -0
  16. package/dist/chunk-475vgeag.js +2 -0
  17. package/dist/{chunk-j8vff5b1.js → chunk-48j3hn03.js} +1 -1
  18. package/dist/chunk-4djwtq0y.js +47 -0
  19. package/dist/{chunk-cdnytss4.js → chunk-4jjfekvz.js} +1 -1
  20. package/dist/{chunk-wqa77pdn.js → chunk-4vscfb5b.js} +1 -1
  21. package/dist/{chunk-qsrmt975.js → chunk-4xjxkcp9.js} +1 -1
  22. package/dist/chunk-53f5qb1g.js +2 -0
  23. package/dist/{chunk-660e7tfb.js → chunk-569c91d8.js} +1 -1
  24. package/dist/{chunk-v8q5jr1g.js → chunk-5a9bpgct.js} +2 -2
  25. package/dist/{chunk-an1vn2mr.js → chunk-61tpvbag.js} +1 -1
  26. package/dist/chunk-6zp2wq8v.js +2 -0
  27. package/dist/chunk-7ay5eat0.js +12 -0
  28. package/dist/{chunk-wcn0v9az.js → chunk-7m7xy16d.js} +1 -1
  29. package/dist/{chunk-s3tpyage.js → chunk-7wkxs25k.js} +1 -1
  30. package/dist/{chunk-43ammxkh.js → chunk-8fs08c5g.js} +1 -1
  31. package/dist/chunk-8k85q2zt.js +2 -0
  32. package/dist/{chunk-jtnhq04d.js → chunk-8n38pxhd.js} +1 -1
  33. package/dist/chunk-8wy7ydta.js +2 -0
  34. package/dist/chunk-9z016nwp.js +2 -0
  35. package/dist/chunk-a05jd4s9.js +2 -0
  36. package/dist/chunk-ac8cy837.js +3 -0
  37. package/dist/{chunk-6pywgdcs.js → chunk-af6gmyj3.js} +1 -1
  38. package/dist/chunk-b285gcxy.js +2 -0
  39. package/dist/{chunk-ttfx0b5m.js → chunk-b5d9pmy1.js} +1 -1
  40. package/dist/chunk-bax6pzjg.js +2 -0
  41. package/dist/{chunk-123vn4r5.js → chunk-bhaave87.js} +1 -1
  42. package/dist/{chunk-tatyh40f.js → chunk-bpyq447k.js} +1 -1
  43. package/dist/{chunk-585vt0xw.js → chunk-bsfkdb4p.js} +1 -1
  44. package/dist/chunk-bxdryz2j.js +2 -0
  45. package/dist/{chunk-h2dpcnhr.js → chunk-cc97w3eq.js} +1 -1
  46. package/dist/{chunk-m1axasq6.js → chunk-cprtxpqx.js} +1 -1
  47. package/dist/{chunk-508xtkyq.js → chunk-dgy4cp6g.js} +217 -217
  48. package/dist/chunk-dhhmvbnk.js +2 -0
  49. package/dist/{chunk-vd9ss2dm.js → chunk-dvqwp792.js} +1 -1
  50. package/dist/{chunk-yv4d9nzf.js → chunk-e0n9r2b8.js} +1 -1
  51. package/dist/{chunk-dv2x6xxs.js → chunk-e4k05e63.js} +1 -1
  52. package/dist/{chunk-a96rnwf0.js → chunk-e6d229x4.js} +1 -1
  53. package/dist/{chunk-v6ebzqkd.js → chunk-e6jjec9v.js} +1 -1
  54. package/dist/{chunk-x8t29tnr.js → chunk-eap7w3a8.js} +1 -1
  55. package/dist/chunk-egpdk2dj.js +2 -0
  56. package/dist/{chunk-tpqyvmqd.js → chunk-ekaghc8q.js} +1 -1
  57. package/dist/chunk-ez4jw7cw.js +2 -0
  58. package/dist/{chunk-rqshksja.js → chunk-f809mcb5.js} +1 -1
  59. package/dist/{chunk-xcf8q763.js → chunk-f9z6nbff.js} +1 -1
  60. package/dist/chunk-ftn7dnxq.js +2 -0
  61. package/dist/chunk-fvkqkh13.js +2 -0
  62. package/dist/{chunk-pecjvzrk.js → chunk-g1qfrafq.js} +1 -1
  63. package/dist/{chunk-60s7hgym.js → chunk-gkct9fys.js} +2 -2
  64. package/dist/{chunk-0xh7vqce.js → chunk-h5pdcxre.js} +2 -2
  65. package/dist/{chunk-8qs79pym.js → chunk-hd8t911b.js} +1 -1
  66. package/dist/chunk-hegdnj5p.js +2 -0
  67. package/dist/{chunk-2e0fg0jk.js → chunk-hmwhjmma.js} +1 -1
  68. package/dist/{chunk-ha15g06r.js → chunk-hwevsa8j.js} +1 -1
  69. package/dist/{chunk-y2s9c0f0.js → chunk-j4af4f7v.js} +1 -1
  70. package/dist/{chunk-hfqycvep.js → chunk-jmdd817r.js} +1 -1
  71. package/dist/{chunk-a3fsqjag.js → chunk-jsr4z0mh.js} +2 -2
  72. package/dist/{chunk-cypwvwpa.js → chunk-kagjfzk0.js} +29 -24
  73. package/dist/chunk-kt6wm51e.js +3 -0
  74. package/dist/{chunk-nh6p0k17.js → chunk-ma41bbjn.js} +1 -1
  75. package/dist/{chunk-m2c9847h.js → chunk-mtr8g311.js} +1 -1
  76. package/dist/chunk-nv5w3rrp.js +2 -0
  77. package/dist/{chunk-ht2496q5.js → chunk-pxfztwya.js} +1 -1
  78. package/dist/{chunk-xpw4r8qb.js → chunk-q0e7qgdx.js} +2 -2
  79. package/dist/{chunk-dhh2r9vj.js → chunk-q0msfad0.js} +1 -1
  80. package/dist/{chunk-qg9rm36c.js → chunk-q3vkf153.js} +1 -1
  81. package/dist/{chunk-km3e88cy.js → chunk-q4vhc2hd.js} +1 -1
  82. package/dist/chunk-q7mfbq9w.js +2 -0
  83. package/dist/{chunk-2sa8rk32.js → chunk-qbyqzd6s.js} +2 -2
  84. package/dist/{chunk-eewneg7t.js → chunk-qg4e12et.js} +1 -1
  85. package/dist/{chunk-3jm88rme.js → chunk-qppqwhhy.js} +1 -1
  86. package/dist/{chunk-f486k78c.js → chunk-qva72pba.js} +1 -1
  87. package/dist/{chunk-yk277pd8.js → chunk-r5tcd2dm.js} +1 -1
  88. package/dist/{chunk-ms3xppjb.js → chunk-r75c4h16.js} +1 -1
  89. package/dist/{chunk-e4jsntps.js → chunk-s7j42ma7.js} +1 -1
  90. package/dist/chunk-sdych4rv.js +2 -0
  91. package/dist/{chunk-9jh1etzh.js → chunk-sfzs3wpt.js} +2 -2
  92. package/dist/{chunk-zhzcahz5.js → chunk-sh77d4tv.js} +1 -1
  93. package/dist/chunk-tmjm99ca.js +2 -0
  94. package/dist/{chunk-w6mt6tt1.js → chunk-ttp58jbs.js} +1 -1
  95. package/dist/{chunk-w3xwpe5f.js → chunk-tznfbxj3.js} +1 -1
  96. package/dist/{chunk-cjqqh2cn.js → chunk-wb2rvvkh.js} +1 -1
  97. package/dist/chunk-wv3s2mq9.js +2 -0
  98. package/dist/{chunk-bt3nnbkm.js → chunk-wwvasdjy.js} +1 -1
  99. package/dist/chunk-x6jgpwfc.js +2 -0
  100. package/dist/{chunk-n0qssshb.js → chunk-xaddzx9d.js} +1 -1
  101. package/dist/{chunk-xpc8ygpz.js → chunk-xbfc6cw2.js} +1 -1
  102. package/dist/chunk-y3gh0z6a.js +2 -0
  103. package/dist/chunk-yfwds8a2.js +2 -0
  104. package/dist/chunk-yjv8a221.js +2 -0
  105. package/dist/{chunk-ytksxjme.js → chunk-ymva6dnj.js} +1 -1
  106. package/dist/{chunk-8kwmj99g.js → chunk-ystnxqsq.js} +1 -1
  107. package/dist/chunk-z9tsmcb1.js +2 -0
  108. package/dist/{chunk-a6a1b4yj.js → chunk-zf7daamg.js} +1 -1
  109. package/dist/cli.js +14 -14
  110. package/dist/craft-entry.js +1 -1
  111. package/dist/craft.js +1 -1
  112. package/dist/database.js +1 -1
  113. package/dist/engine-bindings.d.ts +1 -1
  114. package/dist/engine-bindings.js +1 -0
  115. package/dist/pwa/workbox.js +9 -3
  116. package/dist/pwa.js +2 -2
  117. package/dist/ssg.js +2 -2
  118. package/dist/stx-module-imports.js +1 -0
  119. package/dist/stx-virtual-ts.js +1 -0
  120. package/dist/template-tag-balance.js +1 -1
  121. package/dist/variable-extractor.js +13 -1
  122. package/dist/visual-testing.js +1 -1
  123. package/package.json +5 -5
  124. package/dist/chunk-0jts0tmp.js +0 -2
  125. package/dist/chunk-0nknfsxa.js +0 -2
  126. package/dist/chunk-14bq0xmx.js +0 -2
  127. package/dist/chunk-2g6k94hw.js +0 -2
  128. package/dist/chunk-3ef52k5e.js +0 -2
  129. package/dist/chunk-3eq3h4cm.js +0 -2
  130. package/dist/chunk-4vg0zgas.js +0 -2
  131. package/dist/chunk-5d8ppxbm.js +0 -2
  132. package/dist/chunk-6esv7x92.js +0 -2
  133. package/dist/chunk-6vqzyvn2.js +0 -2
  134. package/dist/chunk-73kw81xx.js +0 -2
  135. package/dist/chunk-7ngmxv4z.js +0 -47
  136. package/dist/chunk-8nqkzq6v.js +0 -2
  137. package/dist/chunk-98cret6x.js +0 -2
  138. package/dist/chunk-c9fg7wte.js +0 -2
  139. package/dist/chunk-chejthpz.js +0 -2
  140. package/dist/chunk-cvfyjqbp.js +0 -2
  141. package/dist/chunk-fa68t20e.js +0 -2
  142. package/dist/chunk-nqa2rqjs.js +0 -2
  143. package/dist/chunk-pvptmxgd.js +0 -2
  144. package/dist/chunk-pvxh9ms3.js +0 -2
  145. package/dist/chunk-qsygwwkt.js +0 -2
  146. package/dist/chunk-sgraj16m.js +0 -2
  147. package/dist/chunk-sqj228wh.js +0 -2
  148. package/dist/chunk-tfk1w25g.js +0 -3
  149. package/dist/chunk-tmcnptq6.js +0 -2
  150. package/dist/chunk-vafmd261.js +0 -2
  151. package/dist/chunk-vwh3j3fh.js +0 -30
  152. package/dist/chunk-wea6j8hh.js +0 -2
  153. package/dist/chunk-wfeshaa9.js +0 -2
  154. package/dist/chunk-wkgywcpz.js +0 -2
  155. package/dist/chunk-wpe1ns0w.js +0 -2
  156. package/dist/chunk-ws7dy2jt.js +0 -2
  157. package/dist/chunk-wxfbfa9w.js +0 -2
  158. package/dist/chunk-yht9jjry.js +0 -2
  159. package/dist/chunk-zzvkcf01.js +0 -12
package/dist/ssg.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ck as wq,xk as Uq,yk as Iq}from"./chunk-e4jsntps.js";import{Dk as Eq,Ek as Tq,Fk as Dq}from"./chunk-frp9fc7j.js";import{_k as _q,bl as zq,cl as Aq}from"./chunk-f486k78c.js";import"./chunk-xpw4r8qb.js";import"./chunk-qjvny3wf.js";import{Mp as C,Um as Oq,ko as l,no as Hq,yr as n}from"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import{ot as Xq}from"./chunk-a3fsqjag.js";import{tt as d}from"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import{_t as Bq}from"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import{Aw as Gq,Bw as Lq,Cw as Nq,xw as Yq,yw as Vq,zw as jq}from"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import{Tw as P}from"./chunk-myyj9qp3.js";import X from"fs";import j from"path";import{createHash as xq}from"crypto";function yq(q){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(q).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return q}}var Pq=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Cq(q){return Bun.hash(q).toString(16)}function Qq(q,Z={}){if(!q.includes('type="stx/island"'))return{html:q,chunks:[]};let $=new Map,Q=q.replace(Pq,(J,W,_,z)=>{let L=z.trim();if(!L)return J;if(/\bdata-stx-src=/.test(_))return J;if(Z.minify)L=yq(L);let A=Cq(L);if(!$.has(A))$.set(A,L);let B=Z.integrity?` data-stx-integrity="sha384-${xq("sha384").update(L).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${W}" data-stx-src="/_stx/islands/${A}.js"${B}${_}></script>`}),K=Array.from($,([J,W])=>({hash:J,code:W}));return{html:Q,chunks:K}}var gq=new Set(["visible","idle"]);function Zq(q){if(!q.includes("data-stx-src="))return q;let Z=new Map,$=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,Q;while((Q=$.exec(q))!==null)Z.set(Q[1],Q[2]);let K=new Set,J=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,W;while((W=J.exec(q))!==null)if(gq.has(Z.get(W[1])||""))K.add(W[2]);let _=q.lastIndexOf("</head>");if(K.size===0||_===-1)return q;let z=Array.from(K).filter((L)=>!q.includes(`rel="prefetch" href="${L}"`)).map((L)=>`<link rel="prefetch" href="${L}" as="script">`).join("");if(!z)return q;return q.slice(0,_)+z+q.slice(_)}var fq=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function h(q){let Z=q.trim();if(!Z)return null;let $=/^https?:\/\//i.test(Z)?Z:`https://${Z}`;try{return new URL($).origin+new URL($).pathname.replace(/\/$/,"")}catch{return null}}function mq(q){for(let Z of fq){let $=q[Z];if(!$)continue;let Q=h($);if(Q)return{url:Q,source:"env",via:Z}}return null}function $q(q){if(!q||typeof q!=="object")return null;let Z=q,$=Z.site?.url??Z.url??Z.app?.url;return typeof $==="string"?h($):null}async function dq(q){let{existsSync:Z}=await import("fs"),$=await import("path");for(let Q of["site.config.ts","site.config.js",".config/site.config.ts"]){let K=$.resolve(q,Q);if(!Z(K))continue;try{let J=await import(K),W=$q(J.default??J);if(W)return W}catch{}}return null}async function Kq(q={}){let Z=q.cwd??process.cwd(),$=q.env??process.env;if(q.explicit){let W=h(q.explicit);if(W)return{url:W,source:"option"}}let Q=$q(q.stxConfig);if(Q)return{url:Q,source:"stx.config",via:"site.url"};let K=await dq(Z);if(K)return{url:K,source:"site.config",via:"url"};let J=mq($);if(J)return J;return{url:"http://localhost",source:"fallback"}}function Wq(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
2
+ import{Ck as wq,xk as Uq,yk as Iq}from"./chunk-s7j42ma7.js";import{Dk as Eq,Ek as Tq,Fk as Dq}from"./chunk-frp9fc7j.js";import{_k as _q,bl as zq,cl as Aq}from"./chunk-qva72pba.js";import"./chunk-q0e7qgdx.js";import"./chunk-qjvny3wf.js";import{Mp as C,Um as Oq,ko as l,no as Hq,yr as n}from"./chunk-dgy4cp6g.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import{ot as Xq}from"./chunk-jsr4z0mh.js";import{tt as d}from"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-f809mcb5.js";import"./chunk-k6bagvmz.js";import{_t as Bq}from"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-qbyqzd6s.js";import"./chunk-eap7w3a8.js";import{uw as Yq,vw as Vq,ww as jq,xw as Gq,yw as Lq,zw as Nq}from"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import{Uw as P}from"./chunk-1rdm5y91.js";import X from"fs";import j from"path";import{createHash as xq}from"crypto";function yq(q){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(q).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return q}}var Pq=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Cq(q){return Bun.hash(q).toString(16)}function Qq(q,Z={}){if(!q.includes('type="stx/island"'))return{html:q,chunks:[]};let $=new Map,Q=q.replace(Pq,(J,W,_,z)=>{let L=z.trim();if(!L)return J;if(/\bdata-stx-src=/.test(_))return J;if(Z.minify)L=yq(L);let A=Cq(L);if(!$.has(A))$.set(A,L);let B=Z.integrity?` data-stx-integrity="sha384-${xq("sha384").update(L).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${W}" data-stx-src="/_stx/islands/${A}.js"${B}${_}></script>`}),K=Array.from($,([J,W])=>({hash:J,code:W}));return{html:Q,chunks:K}}var gq=new Set(["visible","idle"]);function Zq(q){if(!q.includes("data-stx-src="))return q;let Z=new Map,$=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,Q;while((Q=$.exec(q))!==null)Z.set(Q[1],Q[2]);let K=new Set,J=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,W;while((W=J.exec(q))!==null)if(gq.has(Z.get(W[1])||""))K.add(W[2]);let _=q.lastIndexOf("</head>");if(K.size===0||_===-1)return q;let z=Array.from(K).filter((L)=>!q.includes(`rel="prefetch" href="${L}"`)).map((L)=>`<link rel="prefetch" href="${L}" as="script">`).join("");if(!z)return q;return q.slice(0,_)+z+q.slice(_)}var fq=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function h(q){let Z=q.trim();if(!Z)return null;let $=/^https?:\/\//i.test(Z)?Z:`https://${Z}`;try{return new URL($).origin+new URL($).pathname.replace(/\/$/,"")}catch{return null}}function mq(q){for(let Z of fq){let $=q[Z];if(!$)continue;let Q=h($);if(Q)return{url:Q,source:"env",via:Z}}return null}function $q(q){if(!q||typeof q!=="object")return null;let Z=q,$=Z.site?.url??Z.url??Z.app?.url;return typeof $==="string"?h($):null}async function dq(q){let{existsSync:Z}=await import("fs"),$=await import("path");for(let Q of["site.config.ts","site.config.js",".config/site.config.ts"]){let K=$.resolve(q,Q);if(!Z(K))continue;try{let J=await import(K),W=$q(J.default??J);if(W)return W}catch{}}return null}async function Kq(q={}){let Z=q.cwd??process.cwd(),$=q.env??process.env;if(q.explicit){let W=h(q.explicit);if(W)return{url:W,source:"option"}}let Q=$q(q.stxConfig);if(Q)return{url:Q,source:"stx.config",via:"site.url"};let K=await dq(Z);if(K)return{url:K,source:"site.config",via:"url"};let J=mq($);if(J)return J;return{url:"http://localhost",source:"fallback"}}function Wq(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
3
3
  `)}class Fq{cacheDir;cache=new Map;loaded=!1;salt;constructor(q,Z=""){this.cacheDir=q,this.salt=Z}async load(){if(this.loaded)return;let q=j.join(this.cacheDir,"build-cache.json");if(await Bun.file(q).exists())try{let Z=JSON.parse(await Bun.file(q).text());for(let[$,Q]of Object.entries(Z))this.cache.set($,Q)}catch{}this.loaded=!0}async save(){await X.promises.mkdir(this.cacheDir,{recursive:!0});let q=j.join(this.cacheDir,"build-cache.json"),Z={};for(let[$,Q]of this.cache)Z[$]=Q;await Bun.write(q,JSON.stringify(Z))}getHash(q,Z){let $=X.statSync(q),Q=`${this.salt}|${q}:${$.mtimeMs}`;for(let J of Z)if(X.existsSync(J)){let W=X.statSync(J);Q+=`:${J}:${W.mtimeMs}`}let K=0;for(let J=0;J<Q.length;J++){let W=Q.charCodeAt(J);K=(K<<5)-K+W,K=K&K}return Math.abs(K).toString(36)}get(q,Z){let $=this.cache.get(q);if(!$)return null;let Q=this.getHash(Z,$.dependencies??[]);if($.hash!==Q)return this.cache.delete(q),null;return $.html}set(q,Z,$,Q){let K=this.getHash(Z,$);this.cache.set(q,{hash:K,html:Q,generatedAt:Date.now(),dependencies:$})}}class Rq{cacheDir;constructor(q){this.cacheDir=q}getFilePath(q){let Z=q.replace(/[^a-zA-Z0-9]/g,"_")+".json";return j.join(this.cacheDir,"isr",Z)}async get(q){let Z=this.getFilePath(q);if(!await Bun.file(Z).exists())return null;try{return JSON.parse(await Bun.file(Z).text())}catch{return null}}async set(q,Z){let $=this.getFilePath(q);await X.promises.mkdir(j.dirname($),{recursive:!0}),await Bun.write($,JSON.stringify(Z))}async invalidate(q){let Z=this.getFilePath(q);if(await Bun.file(Z).exists())await X.promises.unlink(Z)}async invalidatePattern(q){let Z=j.join(this.cacheDir,"isr");if(!X.existsSync(Z))return;let $=await X.promises.readdir(Z);for(let Q of $){let K=Q.replace(/_/g,"/").replace(".json","");if(q.test(K))await X.promises.unlink(j.join(Z,Q))}}async needsRevalidation(q){let Z=await this.get(q);if(!Z)return!0;return Date.now()>Z.revalidateAfter}}async function pq(q){try{let $=(await Bun.file(q).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!$)return null;let Q=$[1];if(!Q.includes("getStaticPaths"))return null;let K=Q.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!K)return null;return await Function(`
4
4
  return (async function getStaticPaths() {
5
5
  ${K[1]}
@@ -41,7 +41,7 @@ ${q.map((Q)=>{let K=new URL(Q.loc,Z).href,J=` <url>
41
41
  ${$.join(`
42
42
  `)}
43
43
  </channel>
44
- </rss>`}async function tq(q={}){let Z=Date.now();Aq();let $=await n(process.cwd()),Q=$.build||{},K=await Kq({explicit:q.domain||Q.domain,stxConfig:$});if(K.source==="fallback"&&(q.sitemap??Q.sitemap??!0))console.warn(Wq());let J={router:q.router??$?.router??{},pagesDir:q.pagesDir||Q.pagesDir||"pages",outputDir:q.outputDir||Q.outputDir||"dist",baseUrl:q.baseUrl||Q.baseUrl||"/",domain:K.url,revalidate:q.revalidate??Q.revalidate??!1,sitemap:q.sitemap??Q.sitemap??!0,sitemapExclude:q.sitemapExclude||Q.sitemapExclude||[],robots:q.robots??Q.robots??!0,rss:q.rss??Q.rss??!1,concurrency:q.concurrency||Q.concurrency||10,cache:q.cache??Q.cache??!0,cacheDir:q.cacheDir||Q.cacheDir||d(process.cwd(),"ssg-cache"),contentLoaders:q.contentLoaders||[],hooks:q.hooks||{},minify:q.minify??Q.minify??!0,generate404:q.generate404??Q.generate404??!0,publicDir:q.publicDir||Q.publicDir||"public",trailingSlash:q.trailingSlash??Q.trailingSlash??!1,cleanOutput:q.cleanOutput??Q.cleanOutput??!0,cacheSalt:q.cacheSalt??"",partialsDir:q.partialsDir||$?.partialsDir||"",componentsDir:q.componentsDir||$?.componentsDir||"",failOnIncludeError:q.failOnIncludeError??!0,failOnServerScriptError:q.failOnServerScriptError??!0,chunkIslands:q.chunkIslands===!0,prefetchIslands:q.prefetchIslands===!0,integrityIslands:q.integrityIslands===!0},W={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},_=new Set,z=0,L={},A={};await J.hooks.onBuildStart?.();try{if(J.cleanOutput&&X.existsSync(J.outputDir))await X.promises.rm(J.outputDir,{recursive:!0});await X.promises.mkdir(J.outputDir,{recursive:!0});let U=J.cacheSalt;if(!U){let{resolveUserCssConfig:Y,fingerprintConfig:N}=await import("./chunk-xcf8q763.js");try{U=N(await Y(process.cwd()))}catch{}}let{prepareImageDelivery:G}=await import("./chunk-yv4d9nzf.js"),H=await G(J.publicDir,J.outputDir);if(H.count>0)console.log(`Optimized ${H.count} image(s) for responsive delivery`),U=[U,H.fingerprint].filter(Boolean).join(":");let F=new Fq(J.cacheDir,U);if(J.cache)await F.load();try{let{generateCss:Y}=await import("./chunk-xcf8q763.js");await Y('<div class="bg-black"></div>')}catch{}Yq();let kq=$?.routeMiddleware?.dir||"middleware";await jq(process.cwd(),kq);let p=Vq();if(p.length>0)console.log(`Loaded ${p.length} middleware: ${p.join(", ")}`);let bq=$?.routeMiddleware?.global||[];wq($?.layoutsDir,d(process.cwd()));let i=l(".",{pagesDir:J.pagesDir,pagesDirs:$?._layerPageDirs});console.log(`Found ${i.length} routes`);let g=[];for(let Y of i){let N=await uq(Y);for(let O of N)g.push({route:Y,url:O.url,params:O.params,props:O.props,revalidate:O.revalidate??J.revalidate})}W.totalPages=g.length,console.log(`Generating ${W.totalPages} pages...`);let S=[],o=[];for(let Y=0;Y<g.length;Y+=J.concurrency)o.push(g.slice(Y,Y+J.concurrency));for(let Y of o)await Promise.all(Y.map(async(N)=>{let{route:O,url:V,params:v,props:Sq,revalidate:r}=N;try{await J.hooks.onPageStart?.(V);let R=await Bun.file(O.filePath).text(),M=QJ(R),vq=M?.middleware?Array.isArray(M.middleware)?M.middleware:[M.middleware]:[],t=[...bq,...vq];if(t.length>0){let T=Gq(V,v,M||{}),k=Lq(T,null,void 0,{isServer:!0}),D=await Nq(t,k);if(D.redirect){let I=typeof D.redirect==="string"?D.redirect:D.redirect.path||D.redirect,y=ZJ(String(I),V),b=$J(V,J);await X.promises.mkdir(j.dirname(b),{recursive:!0}),await Bun.write(b,y),W.successCount++,W.pages.push({route:V,outputPath:b,size:Buffer.byteLength(y),cached:!1}),S.push({loc:V,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${V} \u2192 redirect to ${I}`);return}if(D.abort){let I=typeof D.abort==="string"?D.abort:D.abort?.error?.message||"aborted";console.warn(` \u21B3 ${V} \u2014 middleware aborted: ${I}`);return}}let e=R.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(e)try{if(!await Function("route",`
44
+ </rss>`}async function tq(q={}){let Z=Date.now();Aq();let $=await n(process.cwd()),Q=$.build||{},K=await Kq({explicit:q.domain||Q.domain,stxConfig:$});if(K.source==="fallback"&&(q.sitemap??Q.sitemap??!0))console.warn(Wq());let J={router:q.router??$?.router??{},pagesDir:q.pagesDir||Q.pagesDir||"pages",outputDir:q.outputDir||Q.outputDir||"dist",baseUrl:q.baseUrl||Q.baseUrl||"/",domain:K.url,revalidate:q.revalidate??Q.revalidate??!1,sitemap:q.sitemap??Q.sitemap??!0,sitemapExclude:q.sitemapExclude||Q.sitemapExclude||[],robots:q.robots??Q.robots??!0,rss:q.rss??Q.rss??!1,concurrency:q.concurrency||Q.concurrency||10,cache:q.cache??Q.cache??!0,cacheDir:q.cacheDir||Q.cacheDir||d(process.cwd(),"ssg-cache"),contentLoaders:q.contentLoaders||[],hooks:q.hooks||{},minify:q.minify??Q.minify??!0,generate404:q.generate404??Q.generate404??!0,publicDir:q.publicDir||Q.publicDir||"public",trailingSlash:q.trailingSlash??Q.trailingSlash??!1,cleanOutput:q.cleanOutput??Q.cleanOutput??!0,cacheSalt:q.cacheSalt??"",partialsDir:q.partialsDir||$?.partialsDir||"",componentsDir:q.componentsDir||$?.componentsDir||"",failOnIncludeError:q.failOnIncludeError??!0,failOnServerScriptError:q.failOnServerScriptError??!0,chunkIslands:q.chunkIslands===!0,prefetchIslands:q.prefetchIslands===!0,integrityIslands:q.integrityIslands===!0},W={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},_=new Set,z=0,L={},A={};await J.hooks.onBuildStart?.();try{if(J.cleanOutput&&X.existsSync(J.outputDir))await X.promises.rm(J.outputDir,{recursive:!0});await X.promises.mkdir(J.outputDir,{recursive:!0});let U=J.cacheSalt;if(!U){let{resolveUserCssConfig:Y,fingerprintConfig:N}=await import("./chunk-f9z6nbff.js");try{U=N(await Y(process.cwd()))}catch{}}let{prepareImageDelivery:G}=await import("./chunk-e0n9r2b8.js"),H=await G(J.publicDir,J.outputDir);if(H.count>0)console.log(`Optimized ${H.count} image(s) for responsive delivery`),U=[U,H.fingerprint].filter(Boolean).join(":");let F=new Fq(J.cacheDir,U);if(J.cache)await F.load();try{let{generateCss:Y}=await import("./chunk-f9z6nbff.js");await Y('<div class="bg-black"></div>')}catch{}Yq();let kq=$?.routeMiddleware?.dir||"middleware";await jq(process.cwd(),kq);let p=Vq();if(p.length>0)console.log(`Loaded ${p.length} middleware: ${p.join(", ")}`);let bq=$?.routeMiddleware?.global||[];wq($?.layoutsDir,d(process.cwd()));let i=l(".",{pagesDir:J.pagesDir,pagesDirs:$?._layerPageDirs});console.log(`Found ${i.length} routes`);let g=[];for(let Y of i){let N=await uq(Y);for(let O of N)g.push({route:Y,url:O.url,params:O.params,props:O.props,revalidate:O.revalidate??J.revalidate})}W.totalPages=g.length,console.log(`Generating ${W.totalPages} pages...`);let S=[],o=[];for(let Y=0;Y<g.length;Y+=J.concurrency)o.push(g.slice(Y,Y+J.concurrency));for(let Y of o)await Promise.all(Y.map(async(N)=>{let{route:O,url:V,params:v,props:Sq,revalidate:r}=N;try{await J.hooks.onPageStart?.(V);let R=await Bun.file(O.filePath).text(),M=QJ(R),vq=M?.middleware?Array.isArray(M.middleware)?M.middleware:[M.middleware]:[],t=[...bq,...vq];if(t.length>0){let T=Gq(V,v,M||{}),k=Lq(T,null,void 0,{isServer:!0}),D=await Nq(t,k);if(D.redirect){let I=typeof D.redirect==="string"?D.redirect:D.redirect.path||D.redirect,y=ZJ(String(I),V),b=$J(V,J);await X.promises.mkdir(j.dirname(b),{recursive:!0}),await Bun.write(b,y),W.successCount++,W.pages.push({route:V,outputPath:b,size:Buffer.byteLength(y),cached:!1}),S.push({loc:V,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${V} \u2192 redirect to ${I}`);return}if(D.abort){let I=typeof D.abort==="string"?D.abort:D.abort?.error?.message||"aborted";console.warn(` \u21B3 ${V} \u2014 middleware aborted: ${I}`);return}}let e=R.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(e)try{if(!await Function("route",`
45
45
  const validate = ${e[1]};
46
46
  return validate(route);
47
47
  `)({params:v})){console.warn(`Validation failed for ${V}, skipping...`);return}}catch{}let E=null,qq=!1;if(J.cache){if(E=F.get(V,O.filePath),E)qq=!0,W.cachedCount++}if(!E){let T=await Mq(O,v,Sq,J,$);if(E=T.html,J.failOnIncludeError&&T.includeFailures.length>0)throw Error(`${T.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
@@ -5,6 +5,7 @@ const ENVIRONMENT_BINDINGS = new Set([
5
5
  "exports",
6
6
  "require",
7
7
  "$bool",
8
+ "$num",
8
9
  "window",
9
10
  "document",
10
11
  "console",
@@ -346,6 +346,7 @@ export const STX_SERVER_CONTEXT = [
346
346
  ];
347
347
  const TYPED_SERVER_CONTEXT = {
348
348
  $bool: "declare function $bool(value: unknown, fallback?: boolean): boolean",
349
+ $num: "declare function $num(value: unknown, fallback?: number): number",
349
350
  $uid: "declare var $uid: string"
350
351
  };
351
352
  export function serverContextDeclarations(typed = new Set) {
@@ -38,7 +38,7 @@ function blankKeepingLines(s) {
38
38
  return s.replace(/[^\n]/g, " ");
39
39
  }
40
40
  export function findUnbalancedTags(template) {
41
- const stripped = template.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, blankKeepingLines).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi, blankKeepingLines).replace(/<!--[\s\S]*?-->/g, blankKeepingLines).replace(/\{\{\{[\s\S]*?\}\}\}/g, blankKeepingLines).replace(/\{\{[\s\S]*?\}\}/g, blankKeepingLines).replace(/\{!![\s\S]*?!!\}/g, blankKeepingLines), opens = new Map, closes = new Map, tagRe = /<(\/?)([A-Za-z][\w-]*)\b(?:[^>"']|"[^"]*"|'[^']*')*?(\/?)>/g;
41
+ const stripped = template.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, blankKeepingLines).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi, blankKeepingLines).replace(/<!--[\s\S]*?-->/g, blankKeepingLines).replace(/\{\{\{[\s\S]*?\}\}\}/g, blankKeepingLines).replace(/\{\{[\s\S]*?\}\}/g, blankKeepingLines).replace(/\{!![\s\S]*?!!\}/g, blankKeepingLines), opens = new Map, closes = new Map, tagRe = /<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g;
42
42
  let m;
43
43
  while ((m = tagRe.exec(stripped)) !== null) {
44
44
  const isClose = m[1] === "/", name = m[2], selfClose = m[3] === "/";
@@ -313,6 +313,18 @@ export async function extractVariables(scriptContent, context, filePath, options
313
313
  return !0;
314
314
  }
315
315
  return Boolean(value);
316
+ }, $num = (value, fallback = 0) => {
317
+ if (value === void 0 || value === null)
318
+ return fallback;
319
+ if (typeof value === "string") {
320
+ const text = value.trim();
321
+ if (text === "")
322
+ return fallback;
323
+ const parsed = Number(text);
324
+ return Number.isFinite(parsed) ? parsed : fallback;
325
+ }
326
+ const parsed = Number(value);
327
+ return Number.isFinite(parsed) ? parsed : fallback;
316
328
  };
317
329
  for (const shadowed of ["name", "length", "caller", "arguments"]) {
318
330
  if (Object.prototype.hasOwnProperty.call(propsObj, shadowed))
@@ -503,7 +515,7 @@ export async function extractVariables(scriptContent, context, filePath, options
503
515
  const hostRuntimeConfig = context.__stx_options?.runtimeConfig;
504
516
  if (hostRuntimeConfig || /\buse(?:Server)?RuntimeConfig\b/.test(jsContent))
505
517
  await prepareRuntimeConfig(context, filePath, hostRuntimeConfig);
506
- const result = await withRuntimeConfig(context.__stx_runtime_config ?? currentRuntimeConfig() ?? resolveRuntimeConfig(), () => withServerData(context, () => scriptFn(module, exports, requireFn, propsObj, $props, $bool, defineProps, withDefaults, defineClientPayload, useServerData, useRuntimeConfig, useServerRuntimeConfig, state, derived, effect, batch, onMount, onDestroy, definePageMeta, useRoute, useRouter, useHead, useSeoMeta, responseApi.setResponseStatus, responseApi.setResponseHeader, responseApi.notFound, ref, reactive, computed, watch, onMounted, onUnmounted, nextTick, defineEmits, defineExpose, defineSlots, provide, inject, useColorMode, useDark, useMediaQuery, useScrollLock, usePreferredDark, usePreferredLight, usePreferredReducedMotion, usePreferredContrast, windowProxy, mockDocument, mockConsole, mockWindow.confirm, mockWindow.alert, mockWindow.fetch, paramsObj, ...propArgValues, ...scriptContextValues)));
518
+ const result = await withRuntimeConfig(context.__stx_runtime_config ?? currentRuntimeConfig() ?? resolveRuntimeConfig(), () => withServerData(context, () => scriptFn(module, exports, requireFn, propsObj, $props, $bool, $num, defineProps, withDefaults, defineClientPayload, useServerData, useRuntimeConfig, useServerRuntimeConfig, state, derived, effect, batch, onMount, onDestroy, definePageMeta, useRoute, useRouter, useHead, useSeoMeta, responseApi.setResponseStatus, responseApi.setResponseHeader, responseApi.notFound, ref, reactive, computed, watch, onMounted, onUnmounted, nextTick, defineEmits, defineExpose, defineSlots, provide, inject, useColorMode, useDark, useMediaQuery, useScrollLock, usePreferredDark, usePreferredLight, usePreferredReducedMotion, usePreferredContrast, windowProxy, mockDocument, mockConsole, mockWindow.confirm, mockWindow.alert, mockWindow.fetch, paramsObj, ...propArgValues, ...scriptContextValues)));
507
519
  if (options.preserveExisting) {
508
520
  for (const [key, value] of Object.entries(result))
509
521
  if (!(key in context) || context[key] === void 0)
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-myyj9qp3.js";import B from"fs";import $ from"path";import k from"crypto";var V=[{name:"mobile",width:375,height:667,isMobile:!0,hasTouch:!0},{name:"tablet",width:768,height:1024,isMobile:!0,hasTouch:!0},{name:"desktop",width:1280,height:800,isMobile:!1,hasTouch:!1},{name:"wide",width:1920,height:1080,isMobile:!1,hasTouch:!1}];function J(N={}){let Y={snapshotDir:N.snapshotDir||"__snapshots__",screenshotDir:N.screenshotDir||"__screenshots__",updateSnapshots:N.updateSnapshots||process.env.UPDATE_SNAPSHOTS==="true",threshold:N.threshold??0.01,viewports:N.viewports||V,generateDiff:N.generateDiff??!0,diffDir:N.diffDir||"__diffs__",compare:N.compare||b,ci:N.ci??process.env.CI==="true",retries:N.retries??(N.ci?3:1)};return{async snapshot(M,X){let q=$.join(Y.snapshotDir,`${X}.html`),G=C(M),Q=K(G);if(await Bun.file(q).exists()){let W=await Bun.file(q).text(),Z=K(C(W));if(Q===Z)return{passed:!0,snapshotPath:q,message:"Snapshot matches"};if(Y.updateSnapshots)return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"Snapshot updated"};let F=$.join(Y.diffDir,`${X}.actual.html`),U=$.join(Y.diffDir,`${X}.diff.html`);return await B.promises.mkdir(Y.diffDir,{recursive:!0}),await Bun.write(F,G),await Bun.write(U,I(W,G)),{passed:!1,snapshotPath:q,actualPath:F,diffPath:U,message:"Snapshot does not match"}}return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"New snapshot created"}},async snapshotJson(M,X){let q=$.join(Y.snapshotDir,`${X}.json`),G=JSON.stringify(M,null,2);if(await Bun.file(q).exists()){let Q=await Bun.file(q).text();if(G===Q)return{passed:!0,snapshotPath:q};if(Y.updateSnapshots)return await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"Snapshot updated"};return{passed:!1,snapshotPath:q,message:`JSON snapshot mismatch:
2
+ import"./chunk-1rdm5y91.js";import B from"fs";import $ from"path";import k from"crypto";var V=[{name:"mobile",width:375,height:667,isMobile:!0,hasTouch:!0},{name:"tablet",width:768,height:1024,isMobile:!0,hasTouch:!0},{name:"desktop",width:1280,height:800,isMobile:!1,hasTouch:!1},{name:"wide",width:1920,height:1080,isMobile:!1,hasTouch:!1}];function J(N={}){let Y={snapshotDir:N.snapshotDir||"__snapshots__",screenshotDir:N.screenshotDir||"__screenshots__",updateSnapshots:N.updateSnapshots||process.env.UPDATE_SNAPSHOTS==="true",threshold:N.threshold??0.01,viewports:N.viewports||V,generateDiff:N.generateDiff??!0,diffDir:N.diffDir||"__diffs__",compare:N.compare||b,ci:N.ci??process.env.CI==="true",retries:N.retries??(N.ci?3:1)};return{async snapshot(M,X){let q=$.join(Y.snapshotDir,`${X}.html`),G=C(M),Q=K(G);if(await Bun.file(q).exists()){let W=await Bun.file(q).text(),Z=K(C(W));if(Q===Z)return{passed:!0,snapshotPath:q,message:"Snapshot matches"};if(Y.updateSnapshots)return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"Snapshot updated"};let F=$.join(Y.diffDir,`${X}.actual.html`),U=$.join(Y.diffDir,`${X}.diff.html`);return await B.promises.mkdir(Y.diffDir,{recursive:!0}),await Bun.write(F,G),await Bun.write(U,I(W,G)),{passed:!1,snapshotPath:q,actualPath:F,diffPath:U,message:"Snapshot does not match"}}return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"New snapshot created"}},async snapshotJson(M,X){let q=$.join(Y.snapshotDir,`${X}.json`),G=JSON.stringify(M,null,2);if(await Bun.file(q).exists()){let Q=await Bun.file(q).text();if(G===Q)return{passed:!0,snapshotPath:q};if(Y.updateSnapshots)return await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"Snapshot updated"};return{passed:!1,snapshotPath:q,message:`JSON snapshot mismatch:
3
3
  ${z(Q,G)}`}}return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"New snapshot created"}},matchInlineSnapshot(M,X){let q=C(M);if(X===void 0)return{passed:!0,expected:q};let G=C(X);return{passed:q===G,expected:q}},getConfig(){return Y}}}function D(N={}){let Y=J(N),M=Y.getConfig();return{async compareScreenshots(X,q,G="desktop"){let Q=$.join(M.screenshotDir,G,`${X}.png`),W=$.join(M.diffDir,G,`${X}.actual.png`),Z=$.join(M.diffDir,G,`${X}.diff.png`);if(await Bun.file(Q).exists()){let F=await Bun.file(Q).arrayBuffer(),U=Buffer.from(F),_=await M.compare(q,U);if(_.match||_.diffPercentage<=M.threshold)return{viewport:G,passed:!0,baselinePath:Q};if(M.updateSnapshots)return await B.promises.mkdir($.dirname(Q),{recursive:!0}),await Bun.write(Q,q),{viewport:G,passed:!0,baselinePath:Q};if(await B.promises.mkdir($.dirname(W),{recursive:!0}),await Bun.write(W,q),_.diffImage&&M.generateDiff)await Bun.write(Z,_.diffImage);return{viewport:G,passed:!1,baselinePath:Q,actualPath:W,diffPath:M.generateDiff?Z:void 0,diffPercentage:_.diffPercentage}}return await B.promises.mkdir($.dirname(Q),{recursive:!0}),await Bun.write(Q,q),{viewport:G,passed:!0,baselinePath:Q}},async testViewports(X,q,G=M.viewports){let Q=[];for(let W of G){let Z=null;for(let F=0;F<M.retries;F++)try{let U=await q(W),_=await this.compareScreenshots(X,U,W.name);Q.push(_),Z=null;break}catch(U){if(Z=U,F<M.retries-1)await new Promise((_)=>setTimeout(_,100*(F+1)))}if(Z)Q.push({viewport:W.name,passed:!1,baselinePath:"",diffPercentage:100})}return Q},getSnapshotTester(){return Y}}}function L(N={}){let M=D(N).getSnapshotTester(),X=new Map;return{addStory(q){X.set(`${q.component}/${q.name}`,q)},addStories(q){for(let G of q)this.addStory(G)},getStories(){return Array.from(X.values())},getStoriesForComponent(q){return Array.from(X.values()).filter((G)=>G.component===q)},async testStory(q){let G=X.get(q);if(!G)return{name:q,passed:!1,duration:0,snapshots:[],screenshots:[],errors:[Error(`Story not found: ${q}`)]};let Q=Date.now(),W={name:q,passed:!0,duration:0,snapshots:[],screenshots:[],errors:[]};try{let Z=await G.render(),F=await M.snapshot(Z,q.replace(/\//g,"-"));if(W.snapshots.push(F),!F.passed)W.passed=!1}catch(Z){W.passed=!1,W.errors.push(Z)}return W.duration=Date.now()-Q,W},async testAllStories(){let q=[];for(let G of X.keys()){let Q=await this.testStory(G);q.push(Q)}return q},async generateStoryIndex(){let q={};for(let G of X.values()){if(!q[G.component])q[G.component]=[];q[G.component].push({name:G.name,args:G.args})}return JSON.stringify(q,null,2)}}}async function S(N,Y={}){let M={outputDir:Y.outputDir||"visual-test-report",format:Y.format||"html",title:Y.title||"Visual Test Report",includeScreenshots:Y.includeScreenshots??!0};await B.promises.mkdir(M.outputDir,{recursive:!0});let X=N.length,q=N.filter((F)=>F.passed).length,G=X-q,Q=N.reduce((F,U)=>F+U.duration,0);if(M.format==="json"){let F={title:M.title,summary:{total:X,passed:q,failed:G,duration:Q},results:N,generatedAt:new Date().toISOString()},U=$.join(M.outputDir,"report.json");return await Bun.write(U,JSON.stringify(F,null,2)),U}if(M.format==="markdown"){let F=`# ${M.title}
4
4
 
5
5
  `;F+=`## Summary
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.380",
4
+ "version": "0.2.382",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -118,12 +118,12 @@
118
118
  "dependencies": {
119
119
  "@stacksjs/ts-css": "^0.3.2",
120
120
  "@stacksjs/clapp": "^0.2.16",
121
- "@stacksjs/desktop": "0.2.380",
122
- "@stacksjs/sanitizer": "0.2.380",
121
+ "@stacksjs/desktop": "0.2.382",
122
+ "@stacksjs/sanitizer": "0.2.382",
123
123
  "@stacksjs/ts-i18n": "^0.1.11",
124
- "bun-plugin-stx": "0.2.380",
124
+ "bun-plugin-stx": "0.2.382",
125
125
  "bunfig": "^0.15.19",
126
- "stx-router": "0.2.380",
126
+ "stx-router": "0.2.382",
127
127
  "ts-broadcasting": "^0.0.11",
128
128
  "ts-images": "^0.2.22",
129
129
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Eo as a,Fo as b,Go as c,Ho as d,Io as e,Jo as f,Ko as g,Lo as h,Mo as i,No as j,Oo as k}from"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{b as stripTypeScript,i as splitDeclaration,d as isSyntaxFailure,c as isModuleResolutionFailure,e as isMissingBindingFailure,g as isCompleteImport,k as hasVariables,f as extractVariables,j as extractScriptFromTemplate,h as convertToCommonJS,a as STX_ENGINE_BINDING_NAMES};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Au as n,Bu as o,Cu as p,nu as a,ou as b,pu as c,qu as d,ru as e,su as f,tu as g,uu as h,vu as i,wu as j,xu as k,yu as l,zu as m}from"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-myyj9qp3.js";export{i as useTitle,f as useSeoMeta,i as usePageTitle,d as useHead,g as seoMetaToHeadConfig,c as resetHead,k as renderHtmlAttrs,j as renderHead,l as renderBodyAttrs,o as processTitleDirective,p as processMetaDirective,n as processHeadDirective,e as mergeHeadConfigs,b as getPageMeta,a as getHead,h as definePageMeta,m as applyHead};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$k as b,_k as a,al as c,bl as d,cl as e,dl as f,el as g,fl as h,gl as i,hl as j,il as k,jl as l,kl as m,ll as n,ml as o}from"./chunk-f486k78c.js";import"./chunk-xpw4r8qb.js";import"./chunk-qjvny3wf.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{o as tempBuildName,b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,l as rewriteRegistryImports,g as resolveBundlerFallback,j as registryIdForPath,c as recordBundleFailure,m as queueClientBundleBuild,k as normalizeRegistrySpecifiers,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,n as bundleClientScript,i as MODULE_SPECIFIER_PREFIX};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Lg as a,Mg as b,Ng as c,Og as d,Pg as e,Qg as f}from"./chunk-43ammxkh.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ho as b,io as c,jo as d}from"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import{sv as a}from"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{b as rendersAsElement,c as processESImports,d as processComponents,a as freeIdentifiers};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Uk as a,Vk as b,Wk as c,Xk as d,Yk as e}from"./chunk-cypwvwpa.js";import"./chunk-myyj9qp3.js";export{b as injectPwaTags,e as generateThemeColorMeta,c as generateSwRegistrationScript,a as generatePwaTags,d as generateManifestLink};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{wv as a,xv as b}from"./chunk-s3tpyage.js";import"./chunk-myyj9qp3.js";export{a as transformStoreImports,b as stripModuleImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Po as a,Qo as b,Ro as c,So as d}from"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{b as reportDeferredLoopWarnings,c as processLoops,a as parseLoopBinding,d as declareBareLoopHead};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$ as lm,$a as oo,$b as zp,$c as zq,$d as zr,A as Xk,Aa as zn,Ab as To,Ac as _p,Ad as _q,Ae as es,B as Yk,Ba as An,Bb as Uo,Bc as $p,Bd as $q,Be as fs,C as Zk,Ca as Nn,Cb as Vo,Cc as aq,Cd as ar,Ce as gs,D as _k,Da as On,Db as Wo,Dc as bq,Dd as br,De as hs,E as Ql,Ea as Pn,Eb as Xo,Ec as cq,Ed as cr,Ee as is,F as Rl,Fa as Qn,Fb as Yo,Fc as dq,Fd as dr,Fe as js,G as Sl,Ga as Rn,Gb as Zo,Gc as eq,Gd as er,Ge as ks,H as Tl,Ha as Sn,Hb as _o,Hc as fq,Hd as fr,He as ls,I as Ul,Ia as Wn,Ib as $o,Ic as gq,Id as gr,Ie as ms,J as Vl,Ja as Xn,Jb as ap,Jc as hq,Jd as hr,Je as ns,K as Wl,Ka as Yn,Kb as bp,Kc as iq,Kd as ir,Ke as os,L as Xl,La as Zn,Lb as cp,Lc as jq,Ld as jr,M as Yl,Ma as _n,Mb as dp,Mc as kq,Md as kr,N as Zl,Na as $n,Nb as lp,Nc as lq,Nd as lr,O as _l,Oa as ao,Ob as mp,Oc as mq,Od as mr,P as $l,Pa as bo,Pb as np,Pc as nq,Pd as nr,Q as am,Qa as co,Qb as op,Qc as oq,Qd as or,R as bm,Ra as eo,Rb as pp,Rc as pq,Rd as pr,S as cm,Sa as fo,Sb as qp,Sc as qq,Sd as qr,T as dm,Ta as go,Tb as rp,Tc as rq,Td as rr,U as em,Ua as ho,Ub as sp,Uc as sq,Ud as sr,V as fm,Va as io,Vb as tp,Vc as tq,Vd as tr,W as gm,Wa as jo,Wb as up,Wc as uq,Wd as ur,X as hm,Xa as ko,Xb as vp,Xc as vq,Xd as vr,Y as im,Ya as lo,Yb as wp,Yc as wq,Yd as wr,Z as jm,Za as mo,Zb as xp,Zc as xq,Zd as xr,_ as km,_a as no,_b as yp,_c as yq,_d as yr,aa as mm,ab as po,ac as Ap,ad as Aq,ae as Ar,ba as nm,bb as qo,bc as Bp,bd as Bq,be as Hr,ca as om,cb as ro,cc as Cp,cd as Cq,ce as Ir,da as pm,db as so,dc as Dp,dd as Dq,de as Jr,ea as qm,eb as to,ec as Ep,ed as Eq,ee as Kr,fa as rm,fb as uo,fc as Fp,fd as Fq,fe as Lr,ga as sm,gb as vo,gc as Gp,gd as Gq,ge as Mr,ha as tm,hb as wo,hc as Hp,hd as Hq,he as Nr,ia as um,ib as xo,ic as Ip,id as Iq,ie as Or,ja as vm,jb as yo,jc as Jp,jd as Jq,je as Pr,ka as wm,kb as zo,kc as Kp,kd as Kq,ke as Qr,la as xm,lb as Ao,lc as Lp,ld as Lq,le as Rr,ma as ym,mb as Bo,mc as Mp,md as Mq,me as Sr,na as zm,nb as Eo,nc as Np,nd as Nq,ne as Tr,o as a,oa as Am,ob as Fo,oc as Op,od as Oq,oe as Ur,p as Ik,pa as on,pb as Go,pc as Pp,pd as Pq,pe as Vr,q as Jk,qa as pn,qb as Ho,qc as Qp,qd as Qq,qe as Wr,r as Kk,ra as qn,rb as Jo,rc as Rp,rd as Rq,re as Xr,s as Lk,sa as rn,sb as Ko,sc as Sp,sd as Sq,se as Yr,t as Mk,ta as sn,tb as Lo,tc as Tp,td as Tq,te as Zr,u as Nk,ua as tn,ub as Mo,uc as Up,ud as Uq,ue as _r,v as Ok,va as un,vb as Oo,vc as Vp,vd as Vq,ve as $r,w as Pk,wa as vn,wb as Po,wc as Wp,wd as Wq,we as as,x as Qk,xa as wn,xb as Qo,xc as Xp,xd as Xq,xe as bs,y as Vk,ya as xn,yb as Ro,yc as Yp,yd as Yq,ye as cs,z as Wk,za as yn,zb as So,zc as Zp,zd as Zq,ze as ds}from"./chunk-m859sqt4.js";import{Le as ep,Me as fp,Ne as gp,Oe as hp,Pe as ip,Qe as jp,Re as kp}from"./chunk-8qs79pym.js";import{Se as Co,Te as Do}from"./chunk-7hb89n3z.js";import{Ue as Io}from"./chunk-w6mt6tt1.js";import{Ve as nn}from"./chunk-dhh2r9vj.js";import{We as Tn,Xe as Un,Ye as Vn,Ze as No}from"./chunk-cdnytss4.js";import{$e as al,_e as $k,af as bl,bf as cl,cf as dl,df as el,ef as fl,ff as gl,gf as hl,hf as il,if as jl,jf as kl,kf as ll,lf as ml,mf as nl}from"./chunk-n0d7nwhd.js";import{nf as El,of as Fl,pf as Gl,qf as Hl,rf as Il,sf as Jl,tf as Kl,uf as Ll,vf as Ml,wf as Nl,xf as Ol,yf as Pl}from"./chunk-m7zebyq5.js";import{Af as Dl,zf as Cl}from"./chunk-eewneg7t.js";import{Bf as ol,Cf as pl,Df as ql,Ef as rl,Ff as sl,Gf as tl,Hf as ul,Jf as vl,Kf as wl,Lf as xl,Mf as yl,Nf as zl,Of as Al,Rf as Bl}from"./chunk-km3e88cy.js";import{Sf as Xm,Tf as Ym,Uf as Zm,Vf as _m,Wf as $m,Xf as mn}from"./chunk-m1axasq6.js";import{$f as Em,Yf as Bm,Zf as Cm,_f as Dm,ag as Fm,bg as Gm,cg as Hm,dg as Im,eg as Jm,fg as Km,gg as Lm,hg as Mm,ig as Nm,jg as Om,kg as Pm,lg as Qm,mg as an,ng as bn,og as cn,pg as dn,qg as en,rg as fn,sg as gn,tg as hn,ug as jn,vg as kn,wg as ln}from"./chunk-vwh3j3fh.js";import{xg as Rm,yg as Sm}from"./chunk-0knxnyq6.js";import{Ag as Cn,Bg as Dn,Cg as En,Dg as Fn,Eg as Gn,Fg as Hn,Gg as In,Hg as Jn,Ig as Kn,Jg as Ln,Kg as Mn,zg as Bn}from"./chunk-634gaa9d.js";import{Lg as ri,Mg as si,Ng as ti,Og as ui,Pg as vi,Qg as wi}from"./chunk-43ammxkh.js";import{Rg as Mj,Sg as Nj,Tg as Oj,Xg as Pj,Yg as Qj,Zg as Rj}from"./chunk-an1vn2mr.js";import{$g as Yj,_g as Xj,ah as Zj,bh as _j,ch as $j,dh as ak,eh as bk,fh as ck,gh as dk,hh as ek,ih as fk}from"./chunk-m2c9847h.js";import{jh as Cj,kh as Dj,lh as Ej,mh as Fj,nh as Gj,ph as Hj,qh as Ij,rh as Jj,sh as Kj,th as Lj}from"./chunk-bcpjhcpn.js";import{uh as xk,wh as yk}from"./chunk-y4zddt5r.js";import{Ch as Mh,Dh as Nh,Eh as Oh,Fh as Ph,Gh as Qh,Hh as Rh}from"./chunk-g7bpkpd4.js";import{Jh as Sh,Kh as Th,Lh as Uh,Mh as Vh,Nh as Wh,Oh as Xh,Ph as Yh,Qh as Zh,Rh as _h,Sh as $h,Th as ai,Uh as bi,Vh as ci,Wh as di}from"./chunk-k33778kc.js";import{$h as hi,Yh as ei,Zh as fi,_h as gi}from"./chunk-ys4hpkrp.js";import{ei as ii}from"./chunk-g1vxsvqv.js";import{hi as lh}from"./chunk-660e7tfb.js";import{ii as mh}from"./chunk-fqq5k9ve.js";import{ji as nh,ki as oh}from"./chunk-ya5m5vbn.js";import{li as ph,mi as qh,ni as rh,oi as sh,pi as th,qi as uh}from"./chunk-y4nzmkea.js";import{ri as vh,si as wh,ti as xh,ui as yh,vi as zh}from"./chunk-7kw3grq5.js";import{Ai as Eh,wi as Ah,xi as Bh,yi as Ch,zi as Dh}from"./chunk-c79nfdyj.js";import{Bi as Fh,Ci as Gh,Di as Hh,Ei as Ih,Fi as Jh,Gi as Kh,Hi as Lh}from"./chunk-ej8mv2k6.js";import{Ii as jh,Ji as kh}from"./chunk-jtnhq04d.js";import"./chunk-ra1s4s6b.js";import{Ni as Pe,Oi as Qe,Pi as Re,Qi as Se,Ri as Te,Si as Ue,Ti as Ve,Ui as We,Vi as Xe,Wi as Ye,Xi as Ze,Yi as _e,Zi as $e,_i as af}from"./chunk-yk277pd8.js";import{$i as sf,aj as tf,bj as uf,cj as vf,dj as wf,ej as xf,fj as yf,gj as zf,hj as Af,ij as Bf,jj as Cf,kj as Df,lj as Ef,mj as Ff,nj as Gf,oj as Hf,pj as If}from"./chunk-585vt0xw.js";import{Aj as hf,Bj as jf,Cj as kf,Dj as lf,Ej as mf,Fj as nf,Gj as of,Hj as pf,Ij as qf,Jj as rf,wj as df,xj as ef,yj as ff,zj as gf}from"./chunk-y32dbdta.js";import{Kj as Jf,Lj as Kf,Mj as Lf,Nj as Mf,Oj as Nf,Pj as Of,Qj as Pf,Rj as Qf,Sj as Rf,Tj as Sf,Uj as Tf,Vj as Uf,Wj as Vf,Xj as Wf}from"./chunk-j8vff5b1.js";import{pk as Br,qk as Cr,rk as Dr,sk as Er,tk as Fr,uk as Gr}from"./chunk-60s7hgym.js";import{Ak as Um,Bk as Vm,Ck as Wm,vk as Rk,wk as Sk,xk as Tk,yk as Uk,zk as Tm}from"./chunk-e4jsntps.js";import"./chunk-frp9fc7j.js";import"./chunk-f486k78c.js";import{nl as ec,ol as fc,sl as gc}from"./chunk-xpw4r8qb.js";import{ul as bc}from"./chunk-qjvny3wf.js";import{$l as Qb,$m as ld,$o as yg,$p as mi,$q as Bj,Al as Ca,Am as Ec,An as Qd,Ap as Zg,Aq as aj,Ar as Dk,Bl as Da,Bm as Fc,Bn as Rd,Bp as _g,Bq as bj,Br as Ek,Cl as Ea,Cm as Gc,Cn as Sd,Co as Yf,Cp as $g,Cq as cj,Cr as Fk,Dl as Fa,Dm as Hc,Dn as Td,Dp as ah,Dq as dj,Dr as Gk,El as Ga,Em as Ic,En as Ud,Ep as bh,Eq as ej,Er as Hk,Fl as Ha,Fm as Jc,Fn as Vd,Fp as ch,Fq as fj,Gl as Ia,Gm as Kc,Gn as Wd,Gp as dh,Gq as gj,Hl as Ja,Hm as Lc,Hn as Xd,Hp as eh,Hq as hj,Il as Ka,Im as Mc,In as Yd,Ip as fh,Iq as ij,Jl as La,Jm as Nc,Jn as Zd,Jo as Zf,Jp as gh,Jq as jj,Kl as Ma,Km as Oc,Kn as _d,Kp as hh,Kq as kj,Ll as Na,Lm as Pc,Ln as $d,Lo as _f,Lp as ih,Lq as lj,Ml as Oa,Mm as Qc,Mn as ae,Mp as ji,Mq as mj,Nl as ib,Nm as _c,Nn as re,No as $f,Np as ki,Nq as nj,Ol as jb,Om as $c,On as se,Oo as ag,Oq as oj,Pl as kb,Pm as ad,Pn as te,Po as bg,Pq as pj,Ql as lb,Qm as bd,Qn as ue,Qo as cg,Qp as li,Qq as qj,Rl as mb,Rm as cd,Rn as ve,Ro as dg,Rq as rj,Sl as nb,Sm as dd,Sn as we,So as eg,Sq as sj,Tm as ed,Tn as xe,To as qg,Tq as tj,Un as ye,Uo as rg,Uq as uj,Vl as Kb,Vm as fd,Vn as ze,Vo as sg,Vq as vj,Wl as Lb,Wm as gd,Wn as Ae,Wo as tg,Wq as wj,Xl as Mb,Xm as hd,Xn as Be,Xo as ug,Xq as xj,Yl as Nb,Ym as id,Yn as Ce,Yo as vg,Yq as yj,Zl as Ob,Zm as jd,Zn as De,Zo as wg,Zq as zj,_l as Pb,_m as kd,_n as Ee,_o as xg,_q as Aj,am as Ub,an as md,ao as Ie,ap as zg,aq as ni,ar as Sj,bm as Vb,bn as nd,bo as Je,bp as Ag,bq as oi,br as Tj,cm as Wb,cn as od,co as Ke,cp as Bg,cq as pi,cr as Uj,dm as hc,dn as pd,do as Le,dp as Cg,dq as qi,dr as Vj,em as ic,en as qd,eo as Me,ep as Dg,eq as xi,er as Wj,fm as jc,fn as vd,fo as Ne,fp as Eg,fq as yi,fr as gk,gm as kc,gn as wd,go as Oe,gp as Fg,gq as zi,gr as hk,hm as lc,hn as xd,hp as Gg,hq as Ai,hr as ik,im as mc,in as yd,ip as Hg,iq as Bi,ir as jk,jm as nc,jn as zd,jp as Ig,jq as Ci,jr as kk,km as oc,kn as Ad,ko as bf,kp as Jg,kq as Di,kr as lk,lm as pc,ln as Bd,lo as cf,lp as Kg,lq as Ei,lr as mk,mm as qc,mn as Cd,mp as Lg,mq as Fi,mr as nk,nm as rc,nn as Dd,no as Xf,np as Mg,nq as Gi,nr as ok,om as sc,on as Ed,op as Ng,oq as Hi,or as pk,pm as tc,pn as Fd,pp as Og,pq as Ii,pr as qk,qm as uc,qn as Gd,qp as Pg,qq as Ji,qr as rk,rm as vc,rn as Hd,rp as Qg,rq as Ki,rr as sk,sm as wc,sn as Id,sp as Rg,sq as Li,sr as tk,tm as xc,tn as Jd,tp as Sg,tq as Mi,tr as uk,um as yc,un as Kd,up as Tg,uq as Ni,ur as vk,vl as xa,vm as zc,vn as Ld,vp as Ug,vq as Oi,vr as wk,wl as ya,wm as Ac,wn as Md,wp as Vg,wq as Yi,wr as zk,xl as za,xm as Bc,xn as Nd,xp as Wg,xq as Zi,xr as Ak,yl as Aa,ym as Cc,yn as Od,yp as Xg,yq as _i,yr as Bk,zl as Ba,zm as Dc,zn as Pd,zp as Yg,zq as $i,zr as Ck}from"./chunk-508xtkyq.js";import{$r as ia,Fr as M,Gr as N,Hr as O,Ir as P,Jr as Q,Kr as R,Lr as S,Mr as T,Nr as U,Or as V,Pr as W,Qr as X,Rr as Y,Sr as Z,Tr as _,Ur as $,Vr as aa,Wr as ba,Xr as ca,Yr as da,Zr as ea,_r as fa,as as ja,bs as ka,cs as la,ds as ma,es as na,fs as oa,gs as pa,hs as qa,is as ra,js as sa,ks as ta,ls as ua,ms as va,ns as wa}from"./chunk-nh6p0k17.js";import{os as ga,ps as ha}from"./chunk-49trnqad.js";import{qs as Rb,rs as Sb,ss as Tb}from"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import{As as Qi,Bs as Ri,Cs as Si,Ds as Ti,Es as Ui,Fs as Vi,Gs as Wi,Hs as Xi,zs as Pi}from"./chunk-cbj5a2tk.js";import{$s as Tc,Zs as Rc,_s as Sc,at as Uc,bt as Vc,dt as Wc,mt as Xc,nt as Yc,ot as Zc}from"./chunk-a3fsqjag.js";import{pt as Xb,qt as Yb,rt as Zb,st as _b,tt as $b,ut as ac}from"./chunk-2zbmyvqc.js";import{Bt as Fe,Dt as Ge,Gt as He}from"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import{Lt as cc,Mt as dc}from"./chunk-k6bagvmz.js";import{$t as pg,Qt as fg,Rt as gg,St as hg,Tt as ig,Ut as jg,Vt as kg,Wt as lg,Yt as mg,Zt as ng,_t as og}from"./chunk-zhzcahz5.js";import{Au as oe,Bu as pe,Cu as qe,au as rd,bu as sd,cu as td,du as ud,nu as be,ou as ce,pu as de,qu as ee,ru as fe,su as ge,tu as he,uu as ie,vu as je,wu as ke,xu as le,yu as me,zu as ne}from"./chunk-8kwmj99g.js";import{$u as z,Du as b,Eu as c,Fu as d,Gu as e,Hu as f,Iu as g,Ju as h,Ku as i,Lu as j,Mu as k,Nu as l,Ou as m,Pu as n,Qu as o,Ru as p,Su as q,Tu as r,Uu as s,Vu as t,Wu as u,Xu as v,Yu as w,Zu as x,_u as y,av as A,bv as B,cv as C,dv as D,ev as E,fv as F,gv as G,hv as H,iv as I,jv as J,kv as K,lv as L}from"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import{Bv as ob,Cv as pb,Dv as qb,Ev as rb,Fv as sb,Gv as tb,Hv as ub,Iv as vb,Jv as wb,Kv as xb,Lv as yb,Mv as zb,Nv as Ab,Ov as Bb,Pv as Cb,Qv as Db,Rv as Eb,Sv as Fb,Tv as Gb,Uv as Hb,Vv as Ib,Wv as Jb}from"./chunk-x8t29tnr.js";import{$v as Qa,Aw as eb,Bw as fb,Cw as gb,Ew as hb,_v as Pa,cw as Ra,hw as Sa,iw as Ta,ow as Ua,pw as Va,qw as Wa,rw as Xa,sw as Ya,tw as Za,uw as _a,vw as $a,ww as ab,xw as bb,yw as cb,zw as db}from"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{jl as writeNetlifyConfig,bn as writeManifest,Ol as writeImageManifest,up as wrapComponentForHMR,bs as withDefaults,wk as webComponentDirectiveHandler,jq as watermark,lr as watchViews,Yl as watchMultiple,Zl as watchEffect,Xl as watch,Me as warmImagePlaceholders,km as waitForStore,X as waitForLocale,fp as virtualPathFor,jk as videoDirective,G as validators,fs as validated,Ce as validateValueEnhanced,mi as validateTemplate,Rm as validateRouteRules,oq as validateParams,De as validateFormEnhanced,ar as validateFile,ye as validateFields,xe as validateField,oi as validateDirective,Xd as validateCspDirectives,Ek as validateConfig,pn as validateComponentScripts,Nn as validateComponentProps,ih as validateClientScript,hi as v,Hc as usesSignalsInScript,ub as usesReactiveRuntime,Ci as userComponentFileExists,Ph as useVirtualList,je as useTitle,jm as useStoreOrThrow,Mp as useStore,Vk as useStorage,Af as useSlots,Xk as useSessionStorage,cc as useServerRuntimeConfig,Yf as useServerData,ge as useSeoMeta,dc as useRuntimeConfig,lm as useRouteParams,nm as useRouteParamOrThrow,mm as useRouteParam,je as usePageTitle,rf as useOptimistic,Ff as useModel,pm as useMiddlewareValue,om as useMiddlewareState,Wk as useLocalStorage,np as useLoadingIndicator,ee as useHead,ei as useForm,Cf as useAttrs,cr as uploadFiles,br as uploadFile,gm as updateInstance,pf as untrack,Si as unregisterDirective,hm as unmountInstance,Qc as unescapeHtml,jp as typecheckStxFiles,Ai as transpileTypeScript,Qr as translate,Ba as transitionDirective,lc as transformAutoImports,Hn as toUsers,Gn as toUser,Up as thumbnail,Vq as thumbHashToRGBA,Wq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,Jf as templateCache,nd as syncRecordedResponse,rp as stxClientHelpers,kg as structuredDataDirective,Tr as stripLocalePrefix,Om as stripDocumentWrapper,Sb as stripCommentsAndLiterals,so as stringToStream,Ld as strictCspPreset,Xe as streamingSuspenseDirective,$e as streamToResponse,Ve as streamTemplateSimple,Pe as streamTemplate,Qk as stopHmrServer,Dn as stopBroadcasting,_b as stateDirName,$b as stateDir,df as state,ch as startsDocument,No as startProductionServer,Io as startInteractive,Cn as startBroadcasting,Vr as stampLocaleLayoutGroup,Ia as staggerDirective,mq as srcsetUrls,Ja as springDirective,ud as splitByPipe,Km as spaNavVaryHeaders,gp as sourcePathFor,tq as smartBatchSign,Ei as slotContentHasExpressions,rq as signUrl,yi as shouldTranspileTypeScript,Nk as shouldReloadOnChange,wq as shouldRefreshSignature,Ok as shouldIgnoreFile,Hh as shouldCacheComponent,Yp as sharpen,is as shape,Zb as setStateDir,tm as setRouteParams,um as setMiddlewareState,Le as setImagePlaceholder,uf as setGlobalProvide,b as setErrorLocale,Ql as setCurrentInstance,Zj as setCachedVideoResult,Oj as setCachedImageResult,Ij as setCached,ls as serveStxFile,ns as serveMultipleStxFiles,Ik as serveMarkdownFile,Yo as serveFile,os as serveApp,Xo as serve,xp as serializeState,dn as serializeSetCookie,_p as sepia,he as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Bi as scopeOnRootElement,nk as scopeHTML,mk as scopeCSS,ng as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,cq as saturation,pq as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,Gb as runtimeEventRegexLiteral,Eb as runtimeDirectiveNamesLiteral,yg as runPreProcessingMiddleware,zg as runPostProcessingMiddleware,gn as runPageAction,kf as runMountCallbacks,gb as runMiddleware,em as runHooks,Jr as runDoctor,lf as runDestroyCallbacks,Cg as runComposers,dq as rotate,ii as rewriteImagesWithSiblings,od as responseBindings,Ii as resolveTemplatePath,ha as resolveStxTargets,Ak as resolveStxDirectories,Pr as resolveI18n,Sp as resize,qg as resetUnscopedSignalWarnings,Oc as resetRejectedExpressionWarnings,sc as resetPlaceholders,de as resetHead,wp as resetHMRHandler,o as resetErrorConfig,ds as required,cg as reportDeferredLoopWarnings,wc as replacePlaceholders,Ec as replaceInterpolations,jr as renderView,gk as renderVideoComponent,ic as renderVendorStyleTags,sr as renderToString,tr as renderToStream,ur as renderToDOM,Uq as renderThumbhashToCanvas,Gr as renderTemplateString,Er as renderTemplate,Fr as renderString,Se as renderStreamingPage,ti as renderSlot,xh as renderSSRSuspense,Eq as renderProtectedVideo,Dq as renderProtectedImg,qq as renderMediaUpload,Dr as renderMarkdownView,Vm as renderLayoutTypes,Sj as renderImgComponent,El as renderImageComponent,le as renderHtmlAttrs,ke as renderHead,mr as renderEmail,Gi as renderComponentWithSlot,me as renderBodyAttrs,Hp as render,Nd as relaxedCspPreset,we as registerValidationRule,Ze as registerStreamingDirectives,Op as registerStoresClient,rm as registerStore,Rf as registerServeModuleBundle,lg as registerSeoDirectives,_a as registerMiddleware,Ac as registerFilters,zc as registerFilter,d as registerErrorMessages,Be as registerEnhancedValidationRule,Pi as registerDirective,Wd as registerCspDirectives,Qn as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,mc as referencesName,Ul as ref,Ao as redirect,jd as recordResponseStatus,kd as recordResponseHeader,ac as rebaseOntoStateDir,ld as readResponseStatus,md as readResponseHeaders,Gk as readMarkdownFile,Kf as readFileCached,Vl as reactive,hq as quality,Bq as pruneSignatureCache,Lj as pruneCache,sf as provide,Cr as protectCodeBlocks,cs as prop,Fg as processVueTemplate,Nh as processVirtualListDirectives,Rh as processVirtualGridDirectives,fk as processVideo,ze as processValidateDirective,ea as processTranslateDirective,rh as processTransitionDirectives,uh as processTransitionAttributes,pe as processTitleDirective,bd as processTemplateBindings,nh as processTeleportDirectives,vh as processSuspenseDirectives,gg as processStructuredData,Te as processStreamDirectives,pd as processStatusDirective,ci as processStaticDirectives,wg as processStackReplacements,vg as processStackPushDirectives,ui as processSlots,Mm as processShell,Oe as processServerBindings,hg as processSeoDirective,_e as processSectionDirectives,Vc as processScopedStyles,$c as processReactiveBindings,Fq as processProtectedMedia,Xh as processPartialHydrationDirectives,hh as processOnceDirective,xg as processMiddleware,fg as processMetaDirectives,qe as processMetaDirective,Hk as processMarkdownFileDirectives,Ni as processMarkdownDirectives,dg as processLoops,Fh as processKeepAliveDirectives,gh as processJsonDirective,Qh as processInfiniteListDirectives,ug as processIncludes,Uj as processImgComponents,Gl as processImageComponents,tl as processImage,oe as processHeadDirective,se as processForms,ue as processFormInputDirectives,Mc as processExpressions,Pb as processEventDirectives,ve as processErrorDirective,Gg as processDynamicComponents,ji as processDirectives,Xi as processDirectiveAttributes,mh as processDeferDirectives,$d as processCustomDirectives,Td as processCspDirectives,js as processComponentProps,rc as processClientScript,te as processBasicFormDirectives,Ah as processAsyncDirectives,ae as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,He as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,mp as preloadIslandHandlers,Ne as preloadIconCollection,yn as poolStrings,yk as pluginManager,Je as placeholdersWarmed,qh as performLeave,ph as performEnter,mf as pendingLifecycleCounts,qf as peek,rg as partialsCache,hk as parseVideoDirectiveOptions,Qp as parseUrl,Xq as parseThumbhashString,Ad as parseSwitchBlock,ri as parseSlots,si as parseSlotElement,Fd as parseScriptDeclarations,uk as parseSFCComponent,Gq as parseProtectedArgs,bg as parseLoopBinding,Tj as parseImgComponent,jj as parseImageUrl,Fl as parseImageComponent,en as parseFormBody,Cd as parseExpressionWithFilters,Rn as parseDefaults,xo as parseCookies,Dm as parseContainerSelector,xd as parseConditionalBlock,Dd as parseArguments,Ma as parseAnimationShorthand,es as optional,zn as optimizeTemplate,Ll as optimizeImage,Ml as optimizeDirectory,gs as oneOf,sg as onceStore,bm as onUpdated,_c as onUpdate,dm as onUnmounted,ym as onServer,$l as onMounted,hf as onMount,bi as onHydrated,yf as onErrorCaptured,jf as onDestroy,Lh as onDeactivated,xm as onClient,am as onBeforeUpdate,cm as onBeforeUnmount,_l as onBeforeMount,Kh as onActivated,Qq as observeElement,Bo as notFound,Lg as normalizeCriticalHeadOrder,xf as nextTick,Un as negotiateEncoding,Ua as navigateTo,fm as mountInstance,Ea as motionDirective,Md as moderateCspPreset,xn as minifyHtml,jg as metaDirective,Wg as metaDedupKey,Rp as mergeParams,Yg as mergeHtmlAttrs,fe as mergeHeadConfigs,Sc as mergeCssConfig,Qd as mergeCspDirectives,Ra as matchRoute,Oi as markdownDirectiveHandler,Fk as markdownCache,ga as looksLikeGlob,Sr as localizePath,U as loadTranslationLazy,_ as loadTranslation,Bk as loadStxConfig,db as loadMiddlewareFromDirectory,cn as loadManifest,Mq as loadElement,En as loadChannels,Lb as listensPassively,Zr as lintStxStrict,Oq as lazyLoadAll,Nq as lazyLoad,Ha as keyframeDirective,qr as jsxs,rr as jsxDEV,pr as jsx,zo as jsonResponse,Ye as islandDirective,l as isTest,Pm as isSpaNavigation,Im as isSpaNavRequest,uq as isSignatureValid,nf as isSignal,rl as isSharpAvailable,lo as isServerEnvironment,vm as isServer,yb as isRuntimeOwnedColonAttr,Hb as isRuntimeEventName,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,Jq as isNativeLazySupported,Br as isMarkdownPath,Q as isLoading,R as isLoaded,xi as isJavaScriptScript,Kq as isIntersectionObserverSupported,zl as isImageFile,sl as isImageBackendAvailable,aa as isICUFormat,ai as isHydrated,Di as isHydrateTrigger,hd as isHttpStatus,ko as isEdgeEnvironment,_r as isDirectiveKind,k as isDevelopment,of as isDerived,Mk as isCssOnlyChange,Tn as isCompressible,wm as isClient,Ch as isAsyncComponent,fn as isActionableMethod,$p as invert,Mf as invalidateFileCacheByDir,Lf as invalidateFileCache,Lc as interpolateScriptsInTemplate,Jc as interpolateScriptExpressions,Kc as interpolateScriptAttributes,x as inlineError,Or as injectThemeBootstrap,ig as injectSeoTags,Lr as injectSeo,Xf as injectRouterScript,Lk as injectHotReload,kb as injectHeatmap,Zc as injectCss,Rd as injectCspMetaTag,eh as injectConfigHeadTags,Kg as injectColorModeBootScript,_g as injectCloakStyle,Rg as injectBuildId,kc as injectBrowserCoreAutoImports,dd as injectAnalytics,tf as inject,qm as initStoreRegistry,ml as initNetlify,op as initLoadingIndicator,Lq as initLazyLoading,Ho as initFile,Tq as initBlurUp,Zq as initAllBlurUp,Wj as imgDirective,Jl as imageDirective,kn as hydrateTemplateStream,jn as hydrateTemplate,lp as hydrateIslands,Zh as hydrateIsland,ln as hydrateFragment,_h as hydrateByStrategy,$h as hydrateAll,Ep as hydrate,Wo as htmlResponse,ah as hoistLeadingHeadTags,Mg as hoistColorModeBootScript,lb as heatmapDirective,Ej as hashString,Wf as hashFilePath,Cj as hashFile,Dj as hashBuffer,Eg as hasVueTemplateSyntax,ag as hasVariables,Jp as hasStore,xc as hasPlaceholders,kl as hasNetlifyConfig,ab as hasMiddleware,Qb as hasEventDirectives,dh as hasDocumentShell,pi as hasDirectives,ma as hasDOMSupport,Cl as handleImageRequest,zf as handleError,yr as h,yl as groupVariantsByFormat,Zp as grayscale,Po as gitHash,rn as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,fl as getTotalSize,vq as getTimeUntilExpiry,jh as getStoreScript,Kp as getStoreNames,Ip as getStore,_k as getStorageSize,Zk as getStorageKeys,Ji as getSourceLineInfo,zi as getSharedTranspiler,Sf as getServeModuleBundle,Qf as getServeClientAsset,la as getScreenReaderOnlyStyle,ok as getScopeAttribute,cf as getRouteParams,Vb as getPublicEnvDefine,Wb as getPublicEnv,ni as getPositionInfo,uc as getPlaceholderRegistry,Bj as getPlaceholderCacheStats,ce as getPageMeta,Hd as getNonce,Al as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,Ie as getImagePlaceholder,ul as getImageMetadata,Fe as getImageDelivery,Dp as getHydrationRuntime,sm as getHydratedStoreState,Pk as getHmrServer,be as getHead,vp as getHMRHandler,nj as getFormatExtension,Gj as getFileMtime,xl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Ri as getDirectives,Qi as getDirective,Rl as getCurrentInstance,Wc as getCssServeAsset,Pd as getCspPreset,Yd as getCspHeaderName,Mi as getComponentCacheStats,Yj as getCachedVideoResult,zq as getCachedSignature,Of as getCachedSignalsRuntime,Pf as getCachedRouterScript,zj as getCachedPlaceholder,Nj as getCachedImageResult,Hj as getCached,Kj as getCacheStats,Pg as getBuildId,Bn as getBroadcastServer,mj as getBestVariant,Bc as getAllFilters,aj as generateWidthSrcset,Oh as generateVirtualListCSS,er as generateVideoPreview,Ee as generateValidationScript,fr as generateUploadRuntime,sn as generateTreeShakenBundle,th as generateTransitionRuntime,sh as generateTransitionCSS,ak as generateThumbnails,sj as generateThumbhashPlaceholder,bo as generateTemplatesDocs,zh as generateSuspenseRuntime,yh as generateSuspenseCSS,yp as generateStateScript,kj as generateSrcsetData,Rj as generateSrcset,vl as generateSrcSet,bk as generateSpriteSheet,nr as generateSpaShell,lj as generateSourceTags,gj as generateSizesFromBreakpoints,fj as generateSizesAttribute,wl as generateSizes,mg as generateSitemapIndex,Mr as generateSitemap,Iq as generateSimpleMediaPicker,Cq as generateSignatureRuntime,If as generateSignalsRuntimeDev,Hf as generateSignalsRuntime,qc as generateServerDataBridge,lk as generateScopeId,vk as generateSFCWebComponent,Nb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,og as generateRobotsTxt,Nr as generateRobots,Qj as generateResponsiveVariants,rk as generateReactiveWebComponentTS,qk as generateReactiveWebComponent,tk as generateReactiveRuntime,sk as generateReactiveMixin,$j as generatePoster,yj as generatePlaceholderStyle,xj as generatePlaceholderCSS,rj as generatePlaceholder,Yh as generatePartialHydrationCSS,Gd as generateNonce,gl as generateNetlifyToml,hr as generateMinifiedMediaRuntime,gr as generateMediaRuntime,Hq as generateMediaManagerEmbed,an as generateManifest,qp as generateLoadingIndicatorHtml,Sq as generateLazyLoadRuntime,Wm as generateLayoutTypes,uj as generateLQIP,Jh as generateKeepAliveRuntime,Ih as generateKeepAliveCSS,di as generateIslandManifest,dr as generateImagePreview,Nl as generateImageManifest,Cp as generateHydrationScript,af as generateHydrationRuntime,Fp as generateHydrationCSS,Sh as generateHydrationBootstrap,Kk as generateHotReloadScript,jb as generateHeatmapScript,tp as generateHMRClientScript,ck as generateHLSManifest,zp as generateEventBindings,ej as generateDprSrcsetWithVariableQuality,dj as generateDprSrcset,bh as generateDocumentShell,ho as generateDocs,co as generateDirectivesDocs,Wi as generateDirectiveRuntime,pg as generateDefaultRobotsTxt,dk as generateDASHManifest,Yc as generateCss,Kd as generateCspMetaTag,Jd as generateCspHeader,Ef as generateCompositionRuntime,ao as generateComponentsDocs,Th as generateComponentManifest,_n as generateComponentDoc,wj as generateColorPlaceholder,Jg as generateColorModeBootScript,im as generateClientRuntime,Fj as generateCacheKey,oc as generateBrowserAutoImportDestructuring,_q as generateBlurUpRuntime,$q as generateBlurUpCSS,ad as generateBindingsRuntime,bj as generateAutoWidthSrcset,nc as generateAutoImportDestructuring,Eh as generateAsyncComponentRuntime,Dh as generateAsyncComponentCSS,fc as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,cd as generateAnalyticsScript,kp as formatTypecheckDiagnostics,dp as formatTypeErrors,Eo as formatStxContent,el as formatSize,Ta as formatRoutes,Fo as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,Kr as formatDoctorReport,eo as formatDocsAsMarkdown,go as formatDocsAsJson,fo as formatDocsAsHtml,gq as format,wn as foldConstants,fq as flipVertical,eq as flipHorizontal,Xm as fingerprint,ip as findStxModuleDeclarations,hp as findRuntimeTypeDeclarations,Ir as findPantryPackage,Dc as findMustacheEnd,wd as findMatchingEndTag,sd as findMatchingDelimiter,Rb as findInterpolationEnd,yd as findIfBlocks,Bd as findExpressions,Sa as findErrorPage,Tc as findDuplicateScopedStyleRanges,zd as findDirectiveBlocks,tn as findDeadCode,tn as findDeadBranches,Em as findContainerRegion,$n as findComponentFiles,ms as findCommonDir,dl as filterRequiredFiles,Hi as fileExists,Zf as extractVariables,li as extractTemplateExpressions,Ue as extractStreamBoundaries,Ap as extractState,vi as extractSlotContent,$f as extractScriptFromTemplate,ki as extractScriptBlocks,vc as extractPlaceholders,vd as extractParenthesizedExpression,id as extractPageResponseStatus,hb as extractLayoutMetadata,vj as extractDominantColor,Ed as extractDirectiveParams,qi as extractDirectiveNames,Qm as extractContainerContent,Yn as extractComponentProps,Uh as extractComponentName,Zn as extractComponentDescription,Xc as extractClassNames,pc as extractBridgeData,Vh as extractBoundProps,td as extractBalancedExpression,hc as extractAndStripCssImports,pk as extractAndScopeStyles,Ob as extractAndProcessEvents,Tk as externalizeSharedAssets,Uk as externalizeRepeatedAssets,Sk as externalizeHtml,Pc as evaluateExpression,vn as evaluateConstant,qd as evaluateAuthExpression,Gc as escapeHtmlValue,Fc as escapeHtml,C as errorRecovery,E as errorLogger,oh as ensureTeleportTargets,fh as ensureDocumentShell,Ae as enhancedValidationRules,Wn as enableDevTools,un as eliminateDeadCode,ff as effect,nq as dprUrls,io as docsCommand,ec as discoverServerApi,Um as discoverLayoutNames,Rq as disconnectObserver,Xn as disableDevTools,F as devHelpers,Lm as detectShell,jo as detectRuntime,hl as detectProjectConfig,oj as detectFormat,on as detectBuildMode,ef as derived,ll as deploy,Dk as defineStxConfig,Np as defineStore,Bf as defineSlots,Yr as defineSiteConfig,as as definePropsWithValidation,$r as defineProps,xk as definePlugin,ie as definePageMeta,Wa as defineMiddleware,fi as defineForm,wf as defineExpose,vf as defineEmits,Ti as defineDirective,Ar as defineCustomElement,Mo as defineConfig,Ui as defineClientDirective,Bh as defineAsyncComponent,Oo as defineApiHandler,ir as defaultMediaConfig,Pl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,re as defaultFormClasses,yc as defaultFilters,_d as defaultCspConfig,zk as defaultConfig,ks as default,Rc as deepMergeThemes,Uc as dedupeScopedStyles,Hm as decodeTitleEntities,tj as decodeThumbhash,eg as declareBareLoopHead,Vd as cspNonceDirective,Ud as cspDirective,Yq as crossfadeTransition,Tp as crop,Mh as createVirtualList,ik as createVideoDirective,vo as createVercelHandler,ap as createTypeChecker,fa as createTranslateFilter,ro as createTextEncoderStream,zr as createStxApp,qo as createStreamingResponse,We as createStreamRenderer,Lp as createStore,Za as createStorageManager,Xa as createServerCookieManager,gc as createServerApi,Tl as createScope,wh as createSSRSuspense,bf as createRouter,Sm as createRouteRuleResolver,eb as createRouteLocation,_o as createRoute,Ul as createRef,Vl as createReactive,Df as createProvideContext,Ro as createProject,Lo as createProductionBuild,tc as createPlaceholder,An as createOptimizedBuild,wo as createNetlifyHandler,$k as createNetlifyClient,fb as createMiddlewareContext,Zo as createMiddleware,Pq as createLazyObserver,Gh as createKeepAliveCache,no as createKVNamespace,Wh as createIslandRegistry,Vj as createImgDirective,Kl as createImagePlugin,Dl as createImageHandler,Il as createImageDirective,nb as createHeatmapAggregator,cl as createFileManifest,mo as createEnvAccessor,z as createEnhancedError,po as createEdgeHandler,oo as createEdgeCache,Ki as createDetailedErrorMessage,uo as createDenoHandler,il as createDefaultNetlifyConfig,Zd as createCspHeaders,yo as createCookie,Wl as createComputed,Sl as createComponentInstance,to as createCloudflareHandler,Ya as createClientCookieManager,Vi as createBuiltinDirectives,zr as createApp,Ka as createAnimationTimeline,Wp as cover,_f as convertToCommonJS,bq as contrast,Vp as contain,y as consoleError,m as configureErrorHandling,Ck as config,Wl as computed,Vn as compressResponse,Bg as composerPattern,Ag as composer,Nm as composeShellWithPage,Pn as componentDirective,Fi as componentClientSignalNames,$m as compileTemplate,a as collectRepeatedFlag,bl as collectDeployFiles,$g as cloakStyleFragment,Ic as clientLoopScopes,_j as clearVideoCache,N as clearTranslationCache,kh as clearStoreCache,Yk as clearStorage,Aq as clearSignatureCache,Gf as clearServerData,Aj as clearPlaceholderCache,tg as clearOnceStore,Id as clearNonce,bb as clearMiddleware,Ke as clearImagePlaceholders,Ge as clearImageDeliveryCatalog,Hl as clearImageCache,e as clearErrorMessages,Tf as clearDevCaches,Cc as clearCustomFilters,Dg as clearComposers,lh as clearComposableCache,Li as clearComponentCache,Jj as clearCache,Ib as clearBlankCache,pp as cleanupLoadingIndicator,Bm as classifyScript,Cm as classifyAllScripts,bp as checkTemplateFile,cp as checkTemplate,Uf as checkCache,xq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,Kn as channel,Do as captureScreenshots,Co as captureScreenshot,Z as cancelPendingLoads,al as calculateSha1,cj as calculateOptimalWidths,Vf as cacheTemplate,bc as cacheEngineFingerprint,kk as buildWebComponents,ep as buildVirtualSource,kr as buildViews,Pp as buildUrl,Qe as buildSuspenseResolveScript,Xr as buildStaticSite,qb as buildRuntimeGlobalsDestructure,Ym as buildRuntimeAsset,Zm as buildRouterAsset,Wr as buildLangPickerScript,ij as buildImageUrl,Sg as buildIdFragment,Xg as buildHtmlAttrs,mn as buildForProduction,Sn as buildComponentLibrary,yq as buildAuthParams,nn as buildApp,Ur as buildAlternateLinks,Ko as build,In as broadcastPrivate,Jn as broadcastPresence,Fn as broadcast,aq as brightness,Tb as bracketDepths,Xp as blur,Jb as blankInertHtmlRegions,sq as batchSignUrls,gf as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,iq as auto,ja as attributeValue,_m as assetTags,Mb as asInvocableStatement,hs as arrayOf,Rr as applyTranslations,Pj as applyTransformations,wi as applySlots,On as applyPropDefaults,lq as applyPreset,Zg as applyHtmlAttrs,ne as applyHead,Nc as applyFilters,Jm as appendVary,Od as apiCspPreset,Da as animationGroupDirective,ek as analyzeVideo,qn as analyzeUsage,zm as analyzeTemplate,Am as analyzeProject,qn as analyzeDirectiveUsage,ed as analyticsDirective,Uo as addStore,To as addPage,Sd as addNonceToInlineContent,Vo as addLayout,So as addComponent,hn as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Nf as __setSignalsGeneratorsForTest,Qg as __setBuildIdForTest,Xj as VideoProcessorCache,gi as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,rd as Tokenizer,$o as TemplateTypeChecker,Go as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,vr as Show,Re as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,jc as STX_AUTO_IMPORTS,Yb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,Fm as SPA_NAV_HEADER,Kb as SCROLL_BLOCKING_EVENTS,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Fb as RUNTIME_EVENT_NAMES,Db as RUNTIME_DIRECTIVE_NAMES,fd as RESPONSE_STATUS_KEY,gd as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,Jo as ProductionBuild,xr as Portal,Qo as PROJECT_TEMPLATES,kq as PRESETS,sb as NON_CLIENT_PRIMITIVES,Gp as MemorySessionStore,$i as MIME_TYPES,Yi as MEDIA_DEFAULT_WIDTHS,_i as MEDIA_DEFAULT_FORMATS,Tm as LAYOUT_TYPES_FILE,Mj as ImageProcessorCache,Bl as ImageProcessingError,Bp as HydrationRuntime,Jk as HotReloadServer,mb as HeatmapAggregator,Vg as HTML_CLASS_MARKER,Ug as HTML_ATTRS_MARKER,or as Fragment,wr as For,Gm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Rk as EXTERNALIZED_ASSET_DIR,nl as DeployError,ol as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Xb as DEFAULT_STATE_DIR,ql as DEFAULT_QUALITY,pj as DEFAULT_PLACEHOLDER_OPTIONS,pl as DEFAULT_FORMATS,Zi as DEFAULT_DPR_VALUES,sp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,hj as COMMON_SIZES,Hg as COLOR_MODE_BOOT_MARKER,Ig as COLOR_MODE_BOOT_GLOBAL,Tg as CLOAK_STYLE,Mn as BroadcastServer,Ln as Broadcast,Ng as BUILD_ID_META,Og as BUILD_ID_HEADER,Ub as BROWSER_CORE_IMPORTS,qj as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,Hr as $path};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ht as a,It as b}from"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-myyj9qp3.js";export{a as prepareRuntimeConfig,b as generateRuntimeConfigTypes};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{lk as a,mk as b,nk as c,ok as d}from"./chunk-ytksxjme.js";import"./chunk-60s7hgym.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
@@ -1,47 +0,0 @@
1
- // @bun
2
- import{Tw as z}from"./chunk-myyj9qp3.js";var Yq={1001:{message:"Unclosed directive: {{directive}}",help:"Make sure to close the directive with the appropriate end tag"},1002:{message:"Unclosed expression at position {{position}}",help:"Check for missing closing braces }}"},1003:{message:"Invalid directive syntax: {{directive}}",help:"Review the directive documentation for correct syntax"},1004:{message:"Malformed expression: {{expression}}",help:"Check for syntax errors in your expression"},1005:{message:"Unexpected token: {{token}}",help:"Remove or fix the unexpected token"},1101:{message:"Undefined variable: {{variable}}",help:"Make sure the variable is defined in the template context"},1102:{message:"Type error: {{details}}",help:"Check that you are using the correct types"},1103:{message:"Evaluation error: {{details}}",help:"Review the expression for errors"},1104:{message:"Infinite loop detected in {{location}}",help:"Check your loop conditions"},1105:{message:"Circular reference detected: {{path}}",help:"Remove the circular dependency"},1201:{message:"Unsafe expression blocked: {{expression}}",help:"This expression contains potentially dangerous code"},1202:{message:"Path traversal attempt blocked: {{path}}",help:"Use only relative paths within allowed directories"},1203:{message:"Potential XSS attempt blocked",help:"Sanitize user input before rendering"},1204:{message:"Code injection attempt blocked: {{code}}",help:"Avoid executing dynamic code"},1205:{message:"Prohibited DOM API usage: {{api}}",help:"Use STX.useRefs(), STX.useRef(), STX.el() and other STX helpers instead of direct DOM manipulation"},1301:{message:"File not found: {{path}}",help:"Check that the file exists and the path is correct"},1302:{message:"Error reading file: {{path}}",help:"Check file permissions and encoding"},1303:{message:"Invalid file path: {{path}}",help:"Use a valid file path"},1304:{message:"Permission denied: {{path}}",help:"Check file permissions"},1401:{message:"Invalid configuration: {{details}}",help:"Review your stx.config.ts file"},1402:{message:"Missing required configuration: {{key}}",help:"Add the required configuration option"},1403:{message:"Deprecated configuration: {{key}}",help:"Update to the new configuration format"},1501:{message:"Component not found: {{name}}",help:"Check that the component exists in your components directory"},1502:{message:"Invalid props for component {{name}}: {{details}}",help:"Check the component prop requirements"},1503:{message:"Error rendering component {{name}}: {{details}}",help:"Check the component template for errors"},1601:{message:"Filter not found: {{filter}}",help:"Register the filter or check the filter name"},1602:{message:"Invalid arguments for filter {{filter}}: {{details}}",help:"Check the filter documentation for correct arguments"},1603:{message:"Expression evaluation timed out",help:"Simplify the expression or increase the timeout"}},N={},u="en";function Gq(q){u=q}function Bq(){return u}function Hq(q){N={...N,...q}}function wq(){N={}}function f(q,V={}){let J=N[q]||Yq[q]||{message:`Unknown error (code: ${q})`},Q=J.message,Z=J.help;for(let[$,Y]of Object.entries(V)){let X=`{{${$}}}`;if(Q=Q.replace(new RegExp(X,"g"),Y),Z)Z=Z.replace(new RegExp(X,"g"),Y)}return{message:Q,help:Z}}function Wq(q,V={}){let{message:J,help:Q}=f(q,V);return Q?`${J}
3
- Help: ${Q}`:J}var D={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function S(q){for(let[V,J]of Object.entries(D))if(J===q)return V;return}function Mq(){let{NODE_ENV:q}=process.env;return q==="production"}function K(){let{STX_DEBUG:q}=process.env;return!Mq()||q==="true"}function aq(){let{NODE_ENV:q}=process.env;return q==="test"}import Dq from"path";var x={showRelativePaths:!1,enableAutoRecovery:K(),logRecoveryWarnings:!0},j={...x};function Iq(q){j={...j,...q}}function T(){return{...j}}function Fq(){j={...x}}function _(q){if(!j.showRelativePaths||!q)return q;let V=j.baseDir||process.cwd();try{let J=Dq.relative(V,q);return J.startsWith("..")?q:J}catch{return q}}class O extends Error{code;filePath;line;column;context;numericCode;constructor(q,V,J,Q,Z,$,Y){super(q);this.code=V;this.filePath=J;this.line=Q;this.column=Z;this.context=$;if(this.name="StxError",this.numericCode=Y||D.EVALUATION_ERROR,this.filePath)this.filePath=_(this.filePath)}}class c extends O{constructor(q,V,J,Q,Z,$){super(q,"stx_SYNTAX_ERROR",V,J,Q,Z,$||D.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class m extends O{constructor(q,V,J,Q,Z,$){super(q,"stx_RUNTIME_ERROR",V,J,Q,Z,$||D.EVALUATION_ERROR);this.name="StxRuntimeError"}}class d extends O{constructor(q,V,J,Q,Z,$){super(q,"stx_SECURITY_ERROR",V,J,Q,Z,$||D.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class p extends O{constructor(q,V,J,Q,Z,$){super(q,"stx_FILE_ERROR",V,J,Q,Z,$||D.FILE_NOT_FOUND);this.name="StxFileError"}}class l extends O{isFatal=!0;constructor(q,V,J,Q,Z,$){super(q,"stx_VALIDATION_ERROR",V,J,Q,Z,$||D.DOM_API_VIOLATION);this.name="StxValidationError"}}function h(q){let{type:V,message:J,code:Q,filePath:Z,line:$,column:Y,template:X,offset:B,snippet:G,suggestion:H,format:w="text"}=q,W=$,M=Y;if(!W&&X&&B!==void 0){let E=o(X,B);W=E.line,M=E.column}let F=Z?_(Z):void 0,Xq=Q?S(Q):void 0,U={type:V,code:Q,codeName:Xq,message:J,filePath:F,line:W,column:M,snippet:G,suggestion:H,timestamp:new Date().toISOString()},k;switch(w){case"html":k=jq(U);break;case"json":k=JSON.stringify(U,null,2);break;case"console":k=Uq(U,X,B);break;case"text":default:k=Oq(U,X,B);break}return{formatted:k,data:U}}function Oq(q,V,J){let Q=[],Z=q.code?` [${q.codeName||q.code}]`:"";if(Q.push(`[${q.type} Error${Z}]`),q.filePath){let $=q.filePath;if(q.line){if($+=`:${q.line}`,q.column)$+=`:${q.column}`}Q.push(`at ${$}`)}if(Q.push(`
4
- ${q.message}`),V&&q.line){let $=kq(V,q.line,2);if($)Q.push(`
5
- ${$}`)}if(q.snippet)Q.push(`
6
- Snippet: ${q.snippet}`);if(q.suggestion)Q.push(`
7
- Suggestion: ${q.suggestion}`);return Q.join(" ")}function jq(q){let V=q.code?` [${q.code}]`:"",J=q.filePath?` in ${q.filePath}${q.line?`:${q.line}`:""}`:"",Q=`<!-- [${q.type} Error${V}]${J}: ${s(q.message)}`;if(q.suggestion)Q+=` | Suggestion: ${s(q.suggestion)}`;return Q+=" -->",Q}function Uq(q,V,J){let G=[],H=q.code?` [${q.codeName||q.code}]`:"";if(G.push(`\x1B[1m${"\x1B[31m"}\u2501\u2501\u2501 ${q.type} Error${H} \u2501\u2501\u2501${"\x1B[0m"}`),q.filePath){let w=`\x1B[36m${q.filePath}\x1B[0m`;if(q.line){if(w+=`\x1B[90m:${q.line}\x1B[0m`,q.column)w+=`\x1B[90m:${q.column}\x1B[0m`}G.push(`
8
- \x1B[90mat\x1B[0m ${w}`)}if(G.push(`
9
-
10
- ${q.message}`),V&&q.line){let w=Kq(V,q.line,2);if(w)G.push(`
11
-
12
- \x1B[90mContext:\x1B[0m
13
- ${w}`)}if(q.suggestion)G.push(`
14
-
15
- \x1B[33mSuggestion:\x1B[0m ${q.suggestion}`);return G.push(`
16
- ${"\x1B[31m"}\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501${"\x1B[0m"}`),G.join("")}function kq(q,V,J){let Q=q.split(`
17
- `),Z=Math.max(0,V-J-1),$=Math.min(Q.length-1,V+J-1),Y=[];for(let X=Z;X<=$;X++){let B=(X+1).toString().padStart(4),G=X===V-1?">":" ";Y.push(`${G}${B} | ${Q[X]}`)}return Y.join(`
18
- `)}function Kq(q,V,J){let Q=q.split(`
19
- `),Z=Math.max(0,V-J-1),$=Math.min(Q.length-1,V+J-1),Y="\x1B[90m",X="\x1B[31m",B="\x1B[0m",G=[];for(let H=Z;H<=$;H++){let w=(H+1).toString().padStart(4),W=H===V-1,M=W?"\x1B[31m>\x1B[0m":" ",F=W?`\x1B[31m${Q[H]}\x1B[0m`:`\x1B[90m${Q[H]}\x1B[0m`;G.push(`${M}\x1B[90m${w}\x1B[0m | ${F}`)}return G.join(`
20
- `)}function s(q){return q.replace(/--/g,"- -").replace(/>/g,"&gt;")}function o(q,V){let Q=q.substring(0,V).split(`
21
- `);return{line:Q.length,column:Q[Q.length-1].length}}function zq(q,V,J){return h({type:q,message:V,code:J,format:"html"}).formatted}function Nq(q,V,J,Q,Z){return h({type:q,message:V,code:Z,filePath:J,line:Q,format:"console"}).formatted}function Tq(q,V,J){let Q=J.template.split(`
22
- `),Z=o(J.template,J.offset),$=`[${q} Error at line ${Z.line} in ${J.filePath}]: ${V}
23
-
24
- `,Y=Math.max(0,Z.line-3),X=Math.min(Q.length-1,Z.line+2);$+=`Context:
25
- `;for(let B=Y;B<=X;B++){let G=B+1,H=Q[B]||"",w=B===Z.line-1?">":" ";$+=`${w} ${G.toString().padStart(3)}: ${H}
26
- `}if(Z.line-1<Q.length){let B=" ".repeat(Z.column+5);$+=`${B}^
27
- `}return $}function _q(q,V,J){try{return q()}catch(Q){if(J&&Q instanceof Error)J(Q);return V}}async function Lq(q,V,J){try{return await q()}catch(Q){if(J&&Q instanceof Error)J(Q);return V}}var bq={isEnabled(){return T().enableAutoRecovery},fixCommonSyntaxErrors(q){let V=T();if(!V.enableAutoRecovery)return{fixed:q,fixes:[]};let J=q,Q=[],Z=(J.match(/\{\{/g)||[]).length,$=(J.match(/\}\}/g)||[]).length;if(Z>$){let X=Z-$;J+="}}".repeat(X),Q.push(`Added ${X} missing closing braces '}}'`)}let Y=["if","foreach","for","switch","section"];for(let X of Y){let B=(J.match(new RegExp(`@${X}\\b`,"g"))||[]).length,G=(J.match(new RegExp(`@end${X}\\b`,"g"))||[]).length;if(B>G){let H=B-G;for(let w=0;w<H;w++)J+=`
28
- @end${X}`;Q.push(`Added ${H} missing @end${X}`)}}if(Q.length>0&&V.logRecoveryWarnings)console.warn("[stx] Auto-recovery applied fixes:"),Q.forEach((X)=>console.warn(` - ${X}`)),console.warn(" Consider fixing these issues in your template.");return{fixed:J,fixes:Q}},createFallbackContent(q,V){if(K())return`<!-- ${q} failed: ${V.message} -->`;return"<!-- stx rendering error -->"}};class v{errors=[];maxErrors;enableFileLogging;logFilePath;logFormat;maxFileSize;maxLogFiles;minLevel;writeQueue=Promise.resolve();constructor(q={}){this.maxErrors=q.maxErrors??1000,this.enableFileLogging=q.enableFileLogging??!1,this.logFilePath=q.logFilePath??".stx/errors.log",this.logFormat=q.logFormat??"json",this.maxFileSize=q.maxFileSize??10485760,this.maxLogFiles=q.maxLogFiles??5,this.minLevel=q.minLevel??"all"}configure(q){if(q.maxErrors!==void 0)this.maxErrors=q.maxErrors;if(q.enableFileLogging!==void 0)this.enableFileLogging=q.enableFileLogging;if(q.logFilePath!==void 0)this.logFilePath=q.logFilePath;if(q.logFormat!==void 0)this.logFormat=q.logFormat;if(q.maxFileSize!==void 0)this.maxFileSize=q.maxFileSize;if(q.maxLogFiles!==void 0)this.maxLogFiles=q.maxLogFiles;if(q.minLevel!==void 0)this.minLevel=q.minLevel}log(q,V,J="error"){let Q={timestamp:new Date,error:q,context:V,level:J};if(this.errors.push(Q),this.errors.length>this.maxErrors)this.errors=this.errors.slice(-this.maxErrors);if(this.enableFileLogging&&this.shouldLog(J))this.writeToFile(Q)}shouldLog(q){if(this.minLevel==="all")return!0;if(this.minLevel==="warning")return q==="error"||q==="warning";if(this.minLevel==="error")return q==="error";return!0}formatEntry(q){if(this.logFormat==="json")return JSON.stringify({timestamp:q.timestamp.toISOString(),level:q.level||"error",type:q.error.constructor.name,message:q.error.message,stack:q.error.stack,context:q.context});let V=[`[${q.timestamp.toISOString()}] [${(q.level||"error").toUpperCase()}] ${q.error.constructor.name}: ${q.error.message}`];if(q.error.stack)V.push(` Stack: ${q.error.stack.split(`
29
- `).slice(1).join(`
30
- `)}`);if(q.context)V.push(` Context: ${JSON.stringify(q.context)}`);return V.join(`
31
- `)}writeToFile(q){this.writeQueue=this.writeQueue.then(async()=>{try{let V=await import("fs"),Q=(await import("path")).dirname(this.logFilePath);if(!V.existsSync(Q))V.mkdirSync(Q,{recursive:!0});await this.rotateIfNeeded(V);let Z=`${this.formatEntry(q)}
32
- `;V.appendFileSync(this.logFilePath,Z,"utf-8")}catch(V){if(process.env.STX_DEBUG==="true")console.error("Failed to write to error log:",V)}})}async rotateIfNeeded(q){try{if(!q.existsSync(this.logFilePath))return;if(q.statSync(this.logFilePath).size<this.maxFileSize)return;for(let J=this.maxLogFiles-1;J>=1;J--){let Q=`${this.logFilePath}.${J}`,Z=`${this.logFilePath}.${J+1}`;if(q.existsSync(Q))if(J>=this.maxLogFiles-1)q.unlinkSync(Q);else q.renameSync(Q,Z)}if(this.maxLogFiles<=1)q.writeFileSync(this.logFilePath,"");else q.renameSync(this.logFilePath,`${this.logFilePath}.1`)}catch(V){if(process.env.STX_DEBUG==="true")console.error("Failed to rotate error logs:",V)}}getRecentErrors(q=10){return this.errors.slice(-q)}getErrorsByType(q){return this.errors.filter((V)=>V.error.constructor.name===q)}getErrorsByLevel(q){return this.errors.filter((V)=>V.level===q)}clear(){this.errors.length=0}async clearLogFile(){try{let q=await import("fs");if(q.existsSync(this.logFilePath))q.writeFileSync(this.logFilePath,"","utf-8")}catch(q){if(process.env.STX_DEBUG==="true")console.error("Failed to clear error log:",q)}}getStats(){let q={},V={error:0,warning:0,info:0};for(let J of this.errors){let Q=J.error.constructor.name;q[Q]=(q[Q]||0)+1;let Z=J.level||"error";V[Z]=(V[Z]||0)+1}return{total:this.errors.length,byType:q,byLevel:V}}async exportToFile(q,V="json"){let J=await import("fs"),Z=(await import("path")).dirname(q);if(!J.existsSync(Z))J.mkdirSync(Z,{recursive:!0});if(V==="json"){let $=this.errors.map((Y)=>({timestamp:Y.timestamp.toISOString(),level:Y.level||"error",type:Y.error.constructor.name,message:Y.error.message,stack:Y.error.stack,context:Y.context}));J.writeFileSync(q,JSON.stringify($,null,2),"utf-8")}else{let $=this.errors.map((Y)=>this.formatEntry(Y));J.writeFileSync(q,$.join(`
33
-
34
- `),"utf-8")}}async flush(){await this.writeQueue}}var Aq=new v,Rq={isDevelopment(){return K()},logDetailedError(q,V){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",q.message),console.error("Stack:",q.stack),V)console.error("Context:",V);console.error("========================")},createErrorReport(q,V){let J=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${q.message}`,`Type: ${q.constructor.name}`,`Stack: ${q.stack}`];if(V)J.push(`Context: ${JSON.stringify(V,null,2)}`);return J.push("========================"),J.join(`
35
- `)}};import g from"path";var P={isValidFilePath(q,V){let J=q.replace(/\\/g,"/");if(J.includes("\x00"))return!1;if(J.includes("../")||J.includes("..\\")||J===".."||J.startsWith("../")||J.endsWith("/..")||J.includes("/..\\")||J.includes("\\../"))return!1;if(/^[a-z][a-z0-9+.-]*:/i.test(J))return!1;if(J.startsWith("/")){if(["/etc/","/root/","/var/","/usr/","/bin/","/sbin/","/proc/","/sys/","/dev/","/boot/","/home/","/private/","/Library/","/System/"].some(($)=>J===$.slice(0,-1)||J.startsWith($)))return!1}if(/^[a-z]:/i.test(J)){if(["Windows/","Windows\\","System32/","System32\\","Program Files/","Program Files\\"].some(($)=>J.includes($)))return!1}if(V){let Z=g.resolve(V,q),$=g.resolve(V);if(!Z.startsWith($+g.sep)&&Z!==$)return!1}return!0},isValidVariableName(q){return/^[a-z_$]\w*$/i.test(q)},isValidDirectiveName(q){return/^[a-z][\w-]*$/i.test(q)},isSafeContent(q){return![/<script[^>]*>[\s\S]*?<\/script>/i,/javascript:/i,/data:text\/html/i,/vbscript:/i,/on\w+\s*=/i].some((J)=>J.test(q))}};function Sq(q){let V={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return q.replace(/[&<>"']/g,(J)=>V[J]||J)}function L(q,V={}){let{allowHtml:J=!1,maxLength:Q=1e4,allowSpecialChars:Z=!0,customSanitizer:$}=V,Y=[],X=q,B=!1;if($){let H=$(X);if(H!==X)X=H,B=!0}if(X.includes("\x00"))X=X.replace(/\0/g,""),B=!0,Y.push("Null bytes removed from parameter");if(X.length>Q)X=X.substring(0,Q),B=!0,Y.push(`Parameter truncated to ${Q} characters`);if(!J&&/<[^>]+>/.test(X))X=Sq(X),B=!0,Y.push("HTML content was escaped");let G=[{pattern:/javascript:/gi,replacement:"",name:"javascript: URI"},{pattern:/vbscript:/gi,replacement:"",name:"vbscript: URI"},{pattern:/data:text\/html/gi,replacement:"",name:"data:text/html URI"}];for(let{pattern:H,replacement:w,name:W}of G)if(H.test(X))X=X.replace(H,w),B=!0,Y.push(`Removed ${W} from parameter`);if(!Z){let H=X;if(X=X.split("").filter((w)=>{let W=w.charCodeAt(0);return W>=32&&W!==127}).join(""),X!==H)B=!0,Y.push("Control characters removed")}return{value:X,modified:B,warnings:Y}}function hq(q,V){let J=q.replace(/\0/g,"");J=J.replace(/\\/g,"/"),J=J.replace(/^[a-z][a-z0-9+.-]*:/i,"");while(J.includes("../")||J.includes("./"))J=J.replace(/\.\.\//g,"").replace(/\.\//g,"");if(!P.isValidFilePath(J,V))return null;return J}function vq(q){let V=[],J=q.trim(),Q=J!==q,Z=[{pattern:/\beval\s*\(/gi,name:"eval()"},{pattern:/\bFunction\s*\(/gi,name:"Function()"},{pattern:/\bsetTimeout\s*\(/gi,name:"setTimeout()"},{pattern:/\bsetInterval\s*\(/gi,name:"setInterval()"},{pattern:/\bimport\s*\(/gi,name:"dynamic import()"},{pattern:/\brequire\s*\(/gi,name:"require()"},{pattern:/\b__proto__\b/gi,name:"__proto__"},{pattern:/\bconstructor\b/gi,name:"constructor"},{pattern:/\bprototype\b/gi,name:"prototype"}];for(let{pattern:$,name:Y}of Z)if($.test(J))V.push(`Potentially dangerous pattern detected: ${Y}`);if(J.includes("\x00"))J=J.replace(/\0/g,""),Q=!0,V.push("Null bytes removed from expression");return{value:J,modified:Q,warnings:V}}function gq(q,V={}){return q.map((J)=>L(J,V))}function r(q){let V={};for(let[J,Q]of Object.entries(q)){if(!P.isValidVariableName(J))continue;if(typeof Q==="string"){let Z=L(Q);V[J]=Z.value}else if(Array.isArray(Q))V[J]=Q.map((Z)=>typeof Z==="string"?L(Z).value:Z);else if(typeof Q==="object"&&Q!==null)V[J]=r(Q);else V[J]=Q}return V}var Pq={maxSanitizeDepth:10,allowBracketNotation:!1},e={...Pq};var A=/\bnew\s+/,R="__stx_safe_ctors",qq=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,A,/\bdelete\s+/,/\bthis\b/],Cq=new Set(["eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this",R]),Vq=new Set(["__proto__","constructor","prototype"]),yq=/[\w)\]]\s*\[\s*['"]/;function Jq(q){let V="",J=[],Q=null,Z=!1;for(let $=0;$<q.length;$++){let Y=q[$];if(Z){Z=!1;continue}if(Y==="\\"&&Q){Z=!0;continue}if(Q){if(Q==="`"&&Y==="$"&&$+1<q.length&&q[$+1]==="{"){let X=1;$+=2;while($<q.length&&X>0){if(q[$]==="{")X++;else if(q[$]==="}")X--;if(X>0)V+=q[$],J.push($),$++}continue}if(Y===Q)Q=null;continue}if(Y==='"'||Y==="'"||Y==="`"){Q=Y;continue}V+=Y,J.push($)}return{text:V,map:J}}function Eq(q){return Jq(q).text}var Qq=["Collator","DateTimeFormat","DisplayNames","ListFormat","Locale","NumberFormat","PluralRules","RelativeTimeFormat","Segmenter"],Zq=(()=>{let q={Date,URL,URLSearchParams},V=Intl;for(let J of Qq)if(typeof V[J]==="function")q[`Intl_${J}`]=V[J];return Object.freeze(Object.assign(Object.create(null),q))})(),uq=/^new(\s+)(Date|URLSearchParams|URL|Intl\s*\.\s*([A-Z_a-z]\w*))\s*\(/,n=/(?<![\w$])new(?![\w$])/g,i=`only new Date(), new URL(), new URLSearchParams() and new Intl.{${Qq.join(",")}}() are allowed`;function fq(q){let{text:V,map:J}=Jq(q),Q=[];n.lastIndex=0;let Z;while((Z=n.exec(V))!==null){let Y=Z.index;if(/(?<!\.)\.\s*$/.test(V.slice(0,Y)))continue;let X=uq.exec(V.slice(Y)),B=X?.[3],G=!X?null:B?`Intl_${B}`:X[2];if(!X||!G||!(G in Zq))throw new I(`matched /${A.source}/; ${i}`,q);let H=Y+X[0].length,w=J[Y],W=J[H-1]+1;if(q.slice(w,W)!==V.slice(Y,H))throw new I(`matched /${A.source}/; ${i}`,q);let M=w+3+X[1].length;Q.push({start:M,end:M+X[2].length,key:G})}let $=q;for(let Y=Q.length-1;Y>=0;Y--){let X=Q[Y];$=`${$.slice(0,X.start)}${R}.${X.key}${$.slice(X.end)}`}return{source:$,usesSafeConstructors:Q.length>0}}class I extends Error{rule;expression;constructor(q,V,J){super(J??`Potentially unsafe expression (${q}): ${V}`);this.name="UnsafeExpressionError",this.rule=q,this.expression=V}}function UV(q){try{return y(q),null}catch(V){return V instanceof I?V.rule:V instanceof Error?V.message:String(V)}}function xq(q,V){let J=/[$A-Z_a-z][$\w]*/g,Q;while((Q=J.exec(q))!==null){let Z=Q[0],$=q[Q.index-1];if(Cq.has(Z))throw new I(`matched /\\b${Z}\\b/; identifier ${Z}`,V);if($==="."&&Vq.has(Z))throw new I(`matched /.${Z}/; property ${Z}`,V)}}function cq(q){let V=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=V.exec(q))!==null){let Q=J[2];if(!Vq.has(Q))continue;let Z=q.slice(0,J.index).match(/\S(?=\s*$)/)?.[0],$=q.slice(J.index+J[0].length).match(/^\s*(\S)/)?.[1];if(!((Z==="{"||Z===",")&&$===":"))throw new I(`bracket key ${J[2]}`,q)}}function y(q){let V=q.trim(),J=Eq(V);xq(J,V),cq(V);for(let Q of qq){if(Q===A)continue;if(Q.test(J))throw new I(`matched /${Q.source}/`,V)}if(!e.allowBracketNotation&&yq.test(V))throw new I("bracket notation with a string key; enable with configureSafeEvaluator({ allowBracketNotation: true })",V,`Bracket notation with strings not allowed: ${V}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return fq(V)}function mq(q){return y(q),q.trim()}function dq(q){let V={};V.Math=Math,V.JSON=JSON,V.Date=Date,V.String=String,V.Number=Number,V.Boolean=Boolean,V.Array=Array,V.parseInt=Number.parseInt,V.parseFloat=Number.parseFloat,V.isNaN=Number.isNaN,V.isFinite=Number.isFinite,V.encodeURIComponent=encodeURIComponent,V.decodeURIComponent=decodeURIComponent;for(let[J,Q]of Object.entries(q)){if(J.startsWith("__")||qq.some((Z)=>Z.test(J)))continue;if(Q&&typeof Q==="object"&&!Array.isArray(Q))V[J]=C(Q);else V[J]=Q}return V}function C(q,V=0){if(V>=e.maxSanitizeDepth)return"[Object too deep]";if(q===null||typeof q!=="object")return q;if(Array.isArray(q))return q.map((Q)=>C(Q,V+1));if(q instanceof Date||q instanceof RegExp||q instanceof Map||q instanceof Set||q instanceof Error)return q;let J={};for(let[Q,Z]of Object.entries(q)){if(Q.startsWith("__")||Q==="constructor"||Q==="prototype")continue;if(Z&&typeof Z==="object")J[Q]=C(Z,V+1);else J[Q]=Z}return J}function pq(q,V){try{let J=dq(V),Q=Object.keys(J),Z=Object.values(J);return rq(q,Q)(...Z)}catch{return}}function kV(q){try{return mq(q),!0}catch{return!1}}function KV(q,V){try{let J=pq(q,V);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}var $q=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","let","static","implements","interface","package","private","protected","public","arguments","eval","await"]),lq=2000,b=new Map;function a(q,V){let J=`${q.join(",")}\x00${V}`,Q=b.get(J);if(Q)return Q;let Z=Function(...q,V);if(b.size>=lq)b.clear();return b.set(J,Z),Z}function zV(q){return q.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g," ").replace(/\??\.\s*[a-zA-Z_$][\w$]*/g," ").replace(/([{,]\s*)[a-zA-Z_$][\w$]*(\s*:)/g,"$1$2").match(/\b[a-zA-Z_$][\w$]*\b/g)||[]}var sq=/^[A-Za-z_$][\w$]*$/;function oq(q){return sq.test(q)&&!$q.has(q)}function rq(q,V){let{source:J,usesSafeConstructors:Q}=y(q),Z=[];for(let G=0;G<V.length;G++){if(!oq(V[G]))continue;if(V[G]===R)continue;Z.push({key:V[G],index:G})}Z.sort((G,H)=>G.key.localeCompare(H.key));let $=Z.map((G)=>G.key),Y=Z.map((G)=>G.index),X=`
36
- 'use strict';
37
- try {
38
- return ${J};
39
- }
40
- catch (e) {
41
- if (e instanceof TypeError) {
42
- return undefined;
43
- }
44
- throw e;
45
- }
46
- `;return nq(Q?(G)=>{let H=a([R,...$,...G],X);return(...w)=>H(Zq,...w)}:(G)=>a([...$,...G],X),$,V,Z,Y)}function nq(q,V,J,Q,Z){let $=q([]),Y=Q.every((B,G)=>B.index===G);if(V.length===J.length&&Y)return t($,V,q);return t((...B)=>{let G=Array(Z.length);for(let H=0;H<Z.length;H++)G[H]=B[Z[H]];return $(...G)},V,q,(B)=>{$=q(B)})}function t(q,V,J,Q){let $=/^(\w+) is not defined$/,Y=q,X=[],B=new Set(V);return(...G)=>{for(let H=0;H<=8;H++)try{return Y(...G)}catch(w){let W=w instanceof Error?w.message:"",M=$.exec(W);if(!(w instanceof ReferenceError)||!M)return;let F=M[1];if(B.has(F)||$q.has(F))return;if(B.add(F),X.push(F),Q)Q(X);else Y=J(X)}return}}function NV(q){let V=q.trim(),J=[/\beval\s*\(/i,/\bFunction\s*\(/i,/\bimport\s*\(/i,/\brequire\s*\(/i,/\bprocess\b/i,/\b__proto__\b/i,/\bconstructor\s*[.(]/i,/\bglobalThis\b/i,/\bwindow\b/i,/\bdocument\b/i,/\bfetch\s*\(/i,/\bBun\b/i,/\bDeno\b/i,/\bconsole\b/i,/\bthis\b/i,/\bReflect\b/i,/\bProxy\b/i,/\bprototype\b/i,/\.(bind|call|apply)\s*\(/i];for(let Q of J)if(Q.test(V))return!1;return!0}
47
- export{Gq as Du,Bq as Eu,Hq as Fu,wq as Gu,f as Hu,Wq as Iu,D as Ju,S as Ku,Mq as Lu,K as Mu,aq as Nu,Iq as Ou,T as Pu,Fq as Qu,_ as Ru,O as Su,c as Tu,m as Uu,d as Vu,p as Wu,l as Xu,h as Yu,zq as Zu,Nq as _u,Tq as $u,_q as av,Lq as bv,bq as cv,v as dv,Aq as ev,Rq as fv,P as gv,L as hv,hq as iv,vq as jv,gq as kv,r as lv,UV as mv,mq as nv,dq as ov,pq as pv,kV as qv,KV as rv,zV as sv,oq as tv,rq as uv,NV as vv};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Xf as a}from"./chunk-m1axasq6.js";import"./chunk-vwh3j3fh.js";import"./chunk-0knxnyq6.js";import"./chunk-585vt0xw.js";import"./chunk-y32dbdta.js";import"./chunk-frp9fc7j.js";import"./chunk-xpw4r8qb.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{a as buildForProduction};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Am as g,Bm as h,Cm as i,Dm as j,Em as k,Fm as l,Gm as m,Hm as n,Im as o,Jm as p,Km as q,Lm as r,Mm as s,um as a,vm as b,wm as c,xm as d,ym as e,zm as f}from"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{j as usesSignalsInScript,s as unescapeHtml,q as resetRejectedExpressionWarnings,g as replaceInterpolations,c as registerFilters,b as registerFilter,o as processExpressions,n as interpolateScriptsInTemplate,l as interpolateScriptExpressions,m as interpolateScriptAttributes,d as getAllFilters,f as findMustacheEnd,r as evaluateExpression,i as escapeHtmlValue,h as escapeHtml,a as defaultFilters,k as clientLoopScopes,e as clearCustomFilters,p as applyFilters};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ni as a,Oi as b,Pi as c,Qi as d,Ri as e,Si as f,Ti as g,Ui as h,Vi as i,Wi as j,Xi as k,Yi as l,Zi as m,_i as n}from"./chunk-yk277pd8.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fi as a,gi as b,hi as c}from"./chunk-660e7tfb.js";import"./chunk-ra1s4s6b.js";import"./chunk-f486k78c.js";import"./chunk-xpw4r8qb.js";import"./chunk-qjvny3wf.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ve as a}from"./chunk-dhh2r9vj.js";import"./chunk-0knxnyq6.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{a as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ao as m,oo as a,po as b,qo as c,ro as d,so as e,to as f,uo as g,vo as h,wo as i,xo as j,yo as k,zo as l}from"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{m as stripStxRuntimeImports,b as scanScriptTags,l as rewriteStxImportSpecifiers,j as processSignals,h as processScriptSetup,f as preEvalLiteralReactiveIfs,c as parseLoopExpression,d as hasSignalsSyntax,k as findMarkupIndexOutsideScripts,i as extractExports,g as convertSignalLoopsToAttributes,e as convertSignalDirectivesToAttributes,a as clearScriptScanCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ze as a}from"./chunk-cdnytss4.js";import"./chunk-vwh3j3fh.js";import"./chunk-0knxnyq6.js";import"./chunk-xpw4r8qb.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{a as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Af as b,zf as a}from"./chunk-eewneg7t.js";import"./chunk-km3e88cy.js";import"./chunk-myyj9qp3.js";export{a as handleImageRequest,b as createImageHandler};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ii as a,Ji as b}from"./chunk-jtnhq04d.js";import"./chunk-ra1s4s6b.js";import"./chunk-f486k78c.js";import"./chunk-xpw4r8qb.js";import"./chunk-qjvny3wf.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{a as getStoreScript,b as clearStoreCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Kj as b,Lj as c,Mj as d,Nj as e,Oj as f,Pj as g,Qj as h,Rj as i,Sj as j,Tj as k,Uj as l,Vj as m,Wj as n,Xj as o}from"./chunk-j8vff5b1.js";import{ul as a}from"./chunk-qjvny3wf.js";import"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{b as templateCache,j as registerServeModuleBundle,c as readFileCached,e as invalidateFileCacheByDir,d as invalidateFileCache,o as hashFilePath,k as getServeModuleBundle,i as getServeClientAsset,g as getCachedSignalsRuntime,h as getCachedRouterScript,l as clearDevCaches,m as checkCache,n as cacheTemplate,a as cacheEngineFingerprint,f as __setSignalsGeneratorsForTest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Le as c,Me as d,Ne as e,Oe as f,Pe as g,Qe as h,Re as i}from"./chunk-8qs79pym.js";import"./chunk-660e7tfb.js";import"./chunk-ra1s4s6b.js";import"./chunk-f486k78c.js";import"./chunk-xpw4r8qb.js";import"./chunk-qjvny3wf.js";import{Np as a,Qp as b}from"./chunk-508xtkyq.js";import"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-rqshksja.js";import"./chunk-k6bagvmz.js";import"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-s3tpyage.js";import"./chunk-2sa8rk32.js";import"./chunk-x8t29tnr.js";import"./chunk-0xh7vqce.js";import"./chunk-wqa77pdn.js";import"./chunk-myyj9qp3.js";export{d as virtualPathFor,h as typecheckStxFiles,e as sourcePathFor,i as formatTypecheckDiagnostics,g as findStxModuleDeclarations,f as findRuntimeTypeDeclarations,b as extractTemplateExpressions,a as extractScriptBlocks,c as buildVirtualSource};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{yv as a,zv as b}from"./chunk-2sa8rk32.js";import"./chunk-myyj9qp3.js";export{b as warnUnbalancedTags,a as findUnbalancedTags};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{fs as Q}from"./chunk-nh6p0k17.js";import"./chunk-49trnqad.js";import{tt as R}from"./chunk-2zbmyvqc.js";import"./chunk-7ngmxv4z.js";import"./chunk-myyj9qp3.js";import O from"fs";import U from"path";async function W(j,b={}){let q=Date.now(),z={total:0,passed:0,failed:0,new:0,failures:[],duration:0},K=b.snapshotDir||R(j.root,"story","snapshots");await O.promises.mkdir(K,{recursive:!0});let B=j.storyFiles;if(b.filter&&b.filter.length>0)B=B.filter((J)=>b.filter.some((G)=>J.fileName.toLowerCase().includes(G.toLowerCase())));for(let J of B)await X(J,K,b,z);return z.duration=Date.now()-q,z}async function X(j,b,q,z){let K=j.story;if(!K)return;for(let B of K.variants){z.total++;let J=U.join(b,`${j.id}-${B.id}.snap`),G=Y(B.source||""),L=await _(J);if(q.update||!L){let M={storyId:j.id,variantId:B.id,component:j.fileName,timestamp:Date.now(),hash:G};if(await O.promises.writeFile(J,JSON.stringify(M,null,2)),!L)z.new++;z.passed++}else try{let M=await O.promises.readFile(J,"utf-8"),N=JSON.parse(M);if(N.hash===G)z.passed++;else z.failed++,z.failures.push({storyId:j.id,variantId:B.id,component:j.fileName,message:"Snapshot mismatch",difference:Z(N.hash,G)})}catch(M){z.failed++,z.failures.push({storyId:j.id,variantId:B.id,component:j.fileName,message:`Error reading snapshot: ${M}`})}}}async function A(j,b={}){return(await W(j,{...b,update:!0})).total}function Y(j){let b=0;for(let q=0;q<j.length;q++){let z=j.charCodeAt(q);b=(b<<5)-b+z,b=b&b}return b.toString(16)}function Z(j,b){if(j===b)return 0;let q=Math.abs(Number.parseInt(j,16)-Number.parseInt(b,16));return Math.min(q/1e6,1)}async function _(j){try{return await O.promises.access(j),!0}catch{return!1}}function I(j){let b=[];if(b.push(""),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(" STX Story Visual Regression Tests"),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(""),j.failures.length>0){b.push(" \u274C Failures:"),b.push("");for(let q of j.failures){if(b.push(` \u2022 ${q.component} / ${q.variantId}`),b.push(` ${q.message}`),q.difference!==void 0)b.push(` Difference: ${(q.difference*100).toFixed(2)}%`);b.push("")}}if(b.push(" Summary:"),b.push(` Total: ${j.total}`),b.push(` Passed: ${j.passed} \u2713`),b.push(` Failed: ${j.failed} \u2717`),j.new>0)b.push(` New: ${j.new} \u26A1`);return b.push(` Time: ${j.duration}ms`),b.push(""),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(""),b.join(`
3
- `)}async function S(j,b={}){let q=performance.now(),z=[],K=0,B=0;for(let G of j.storyFiles)try{let L=await Bun.file(G.path).text(),M=await Q(L,G.path);if(M.length>0){for(let N of M)z.push({storyId:G.id,variantId:"default",component:G.component,message:`A11y: ${N.message}`,expected:"No accessibility violations",actual:`${N.type}: ${N.message} (impact: ${N.impact})`});B++}else K++}catch(L){z.push({storyId:G.id,variantId:"default",component:G.component,message:`Failed to check a11y: ${L instanceof Error?L.message:String(L)}`,expected:"File readable for a11y check",actual:"File read error"}),B++}let J=performance.now()-q;return{total:j.storyFiles.length,passed:K,failed:B,new:0,failures:z,duration:J}}export{A as updateSnapshots,W as runVisualTests,S as runA11yTests,I as formatTestResults};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ei as a}from"./chunk-g1vxsvqv.js";import"./chunk-myyj9qp3.js";export{a as rewriteImagesWithSiblings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$t as l,Qt as a,Rt as b,St as c,Tt as d,Ut as e,Vt as f,Wt as g,Xt as h,Yt as i,Zt as j,_t as k}from"./chunk-zhzcahz5.js";import"./chunk-8kwmj99g.js";import"./chunk-7ngmxv4z.js";import"./chunk-myyj9qp3.js";export{f as structuredDataDirective,j as scanForSitemapEntries,g as registerSeoDirectives,b as processStructuredData,c as processSeoDirective,a as processMetaDirectives,e as metaDirective,d as injectSeoTags,i as generateSitemapIndex,h as generateSitemap,k as generateRobotsTxt,l as generateDefaultRobotsTxt};
@@ -1,30 +0,0 @@
1
- // @bun
2
- import{$m as c,Cm as P,Do as i,Fp as h,Jo as T,Lm as k,an as l,sm as R,tm as O}from"./chunk-508xtkyq.js";import{Qs as S,Ss as y}from"./chunk-a3fsqjag.js";import{Mu as m}from"./chunk-7ngmxv4z.js";import{Fw as YJ,Iw as ZJ,Jw as $J}from"./chunk-0xh7vqce.js";import{Qw as XJ,Tw as q}from"./chunk-myyj9qp3.js";var r=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function s(J,Y,Q){let X={fullTag:Q,content:Y,attrs:J};if(/\bserver\b/.test(J))return{...X,type:"server"};if(/\bdata-stx-scoped\b/.test(J))return{...X,type:"client"};if(r.test(Y))return{...X,type:"signals"};if(/\bclient\b/.test(J)||/\btype\s*=\s*["']module["']/.test(J)||/\bsrc\s*=/.test(J))return{...X,type:"client"};return{...X,type:"server"}}var o=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function C(J){let Y=[],Q=[],X=[],$=0;while($<J.length){let Z=J.indexOf("<",$);if(Z===-1)break;let U=y(J,Z);if(U>Z){$=U;continue}let W=S(J,Z);if(W>Z){let j=J.slice(Z,W),F=o.exec(j);if(F){let K=s(F[1],F[2],j);switch(K.type){case"signals":Y.push(K);break;case"client":Q.push(K);break;case"server":X.push(K);break}}$=W;continue}$=Z+(J.startsWith("<!--",Z)?4:1)}return{signals:Y,client:Q,server:X}}var a=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function t(J){let Y=[],Q=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,X;while((X=Q.exec(J))!==null)Y.push({start:X.index,end:X.index+X[0].length});return Y}function v(J,Y){return Y.some((Q)=>J>=Q.start&&J<Q.end)}function e(J){let Y=(J||"").trim();if(!Y)return null;if(/[\s>+~,:]/.test(Y))return null;let Q={},X=Y,$=X.match(/^[a-z][\w-]*/i);if($)Q.tag=$[0].toLowerCase(),X=X.slice($[0].length);while(X.length>0){let Z=X.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(Z){if(Q.attr=Z[1],Z[3]!==void 0&&Z[3]!=="")Q.attrValue=Z[3];X=X.slice(Z[0].length);continue}let U=X.match(/^#([\w-]+)/);if(U){Q.id=U[1],X=X.slice(U[0].length);continue}let W=X.match(/^\.([\w-]+)/);if(W){Q.className=W[1],X=X.slice(W[0].length);continue}return null}if(!Q.tag&&!Q.attr&&!Q.id&&!Q.className)return null;return Q}function JJ(J,Y){if(Y.attr){if(!(Y.attrValue===void 0?new RegExp(`\\b${Y.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${Y.attr}\\s*=\\s*(["'])\\s*${Y.attrValue}\\s*\\1`,"i")).test(J))return!1}if(Y.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${Y.id}\\s*\\1`,"i").test(J))return!1}if(Y.className){let Q=J.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!Q)return!1;if(!Q[2].split(/\s+/).includes(Y.className))return!1}return!0}function x(J,Y="main"){let Q=e(Y);if(!Q)return null;let X=/<([a-z][\w-]*)\b([^>]*)>/gi,$=t(J),Z;while((Z=X.exec(J))!==null){if(v(Z.index,$))continue;let U=Z[1].toLowerCase(),W=Z[2]||"";if(W.trimEnd().endsWith("/")||a.has(U))continue;if(Q.tag&&Q.tag!==U)continue;if(!JJ(W,Q))continue;let j=Z[0],F=Z.index+j.length,K=new RegExp(`<(/?)${U}\\b([^>]*)>`,"gi");K.lastIndex=F;let G=1,B;while((B=K.exec(J))!==null){if(v(B.index,$))continue;let w=B[1]==="/";if(!w&&(B[2]||"").trimEnd().endsWith("/"))continue;if(G+=w?-1:1,G===0)return{openTag:j,openIndex:Z.index,start:F,end:B.index,tagName:U}}return null}return null}var NJ="X-STX-Router",_J="private, no-store";function AJ(J){return J.replace(/&#(\d+);/g,(Y,Q)=>f(Number(Q),Y)).replace(/&#x([0-9a-f]+);/gi,(Y,Q)=>f(Number.parseInt(Q,16),Y)).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")}function f(J,Y){if(!Number.isInteger(J)||J<0||J>1114111)return Y;try{return String.fromCodePoint(J)}catch{return Y}}function g(J){return J.headers.get("X-STX-Router")==="true"}function QJ(J,Y){if(!J)return Y;return J.split(",").some((X)=>X.trim().toLowerCase()===Y.toLowerCase())?J:`${J}, ${Y}`}function IJ(J){return{Vary:QJ(J,"X-STX-Router")}}import E from"path";YJ();var UJ="stx-page-head:",WJ=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,D={dev:null,prod:null};function jJ(){let J=m()?"dev":"prod",Y=D[J];if(Y!==null)return Y;try{let Q=($J(),XJ(ZJ)),X=J==="dev"&&typeof Q.getRouterScriptDev==="function"?Q.getRouterScriptDev:Q.getRouterScript;D[J]=`<script>${X()}</script>`}catch{D[J]=""}return D[J]}async function RJ(J,Y){if(Y===!1)return null;if(Y&&typeof Y==="string"){let X=E.resolve(J,Y);if(await Bun.file(X).exists())return X;return null}let Q=E.join(J,"app.stx");if(await Bun.file(Q).exists())return Q;return null}async function PJ(J,Y){try{let Q=await Bun.file(J).text(),X=Q,$=Q.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)X=$[1].trim();let Z=C(Q),U=[...Z.client.map((V)=>V.fullTag),...Z.signals.map((V)=>V.fullTag)],W=[],j=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,F;while((F=j.exec(Q))!==null)W.push(F[0]);let K=X;for(let V of Z.server)K=K.replace(V.fullTag,"");for(let V of Z.client)K=K.replace(V.fullTag,"");K=K.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let G="<!--__STX_PAGE_SLOT__-->";if(K=K.replace(/<slot\s*\/>/gi,G).replace(/<slot\s*>\s*<\/slot>/gi,G),!K.includes(G))return console.warn(`[stx] Shell ${J} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:B,extractVariables:w,defaultConfig:N,loadStxConfig:A}=await import("./chunk-6esv7x92.js"),I=await A(),z={__filename:J,__dirname:E.dirname(J)};for(let V of U){let L=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(L&&!V.includes("client")&&!V.includes('type="module"'))await w(L[1],z,J)}let _=await B(K,z,J,{...N,...I,...Y},new Set),H=_.indexOf(G);if(H===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:_.substring(0,H),afterSlot:_.substring(H+G.length),filePath:J,shellScripts:U,shellStyles:W}}catch(Q){return console.error(`[stx] Error processing shell ${J}:`,Q),null}}function kJ(J,Y,Q){let X,$="",Z=Y.match(WJ);if(Z){Y=Y.replace(Z[0],"");try{let K=Buffer.from(Z[1],"base64").toString("utf8"),G=K.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(G)X=G[1].trim();$=K.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let U=Q||X||"stx App",W=jJ(),j="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>${U}</title>
8
- ${$?` ${$}
9
- `:""} ${J.shellStyles.join(`
10
- `)}
11
- </head>
12
- <body>
13
- ${J.beforeSlot}
14
- <div data-stx-content>${Y}</div>
15
- ${J.afterSlot}
16
- ${J.shellScripts.filter((K)=>!K.includes("server")).join(`
17
- `)}
18
- ${j}
19
- ${W}
20
- </body>
21
- </html>`}function KJ(J,Y={}){let Q=J.trim();if(!h(Q))return J;let X=[],$=Q.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if($){let j=$[1],F=/<style\b[^>]*>[\s\S]*?<\/style>/gi,K;while((K=F.exec(j))!==null)X.push(K[0]);let G=j.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);if(G)X.push(G[0]);let B=j.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);if(B)X.push(B[0])}if(Y.preserveHead&&$){let j=[],F=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,K;while((K=F.exec($[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(K[0]))continue;j.push(K[0])}if(j.length>0)X.unshift(`<!--${UJ}${Buffer.from(j.join(`
22
- `),"utf8").toString("base64")}-->`)}let Z=Q.match(/<body\b[^>]*>/i),U=Q.lastIndexOf("</body>");if(Z&&U!==-1){let j=Z.index+Z[0].length,F=Q.slice(j,U).trim();if(X.length>0)return X.join(`
23
- `)+`
24
- `+F;return F}let W=Q;if(W=W.replace(/<!DOCTYPE\b[^>]*>/i,""),W=W.replace(/<html\b[^>]*>/i,""),W=W.replace(/<\/html\s*>/i,""),$)W=W.replace(/<head\b[^>]*>[\s\S]*?<\/head>/i,X.join(`
25
- `));return W=W.replace(/<body\b[^>]*>/i,""),W=W.replace(/<\/body\s*>/i,""),W.trim()}var u=/^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;function TJ(J){return g(J)}function SJ(J,Y="main"){let Q=J.trim(),X=[],$=[],Z=Q.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(Z){let A=Z[1],I=/<style\b[^>]*>[\s\S]*?<\/style>/gi,z;while((z=I.exec(A))!==null)X.push(z[0]);let _=/<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;while((z=_.exec(A))!==null){if(u.test(z[0])||z[0].includes("__stx_early_mounts")||/^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(z[0]))continue;$.push(z[0])}}let U=x(Q,Y);if(!U)return KJ(J);let{tagName:W,start:j,end:F}=U,K=Q.slice(j,F).trim(),G=[],B=Q.match(/<body\b[^>]*>/i),w=Q.lastIndexOf("</body>");if(B&&B.index!==void 0&&w!==-1){let I=[[B.index+B[0].length,U.openIndex],[F+`</${W}>`.length,w]],z=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[_,H]of I){if(_>=H)continue;let V=Q.slice(_,H),L;z.lastIndex=0;while((L=z.exec(V))!==null){if(u.test(L[0]))continue;G.push(L[0])}}}let N=[];if(X.length>0)N.push(X.join(`
26
- `));if($.length>0)N.push($.join(`
27
- `));if(G.length>0)N.push(G.join(`
28
- `));return N.push(K),N.join(`
29
- `)}import M from"fs";import p from"path";function fJ(J,Y,Q){return{version:1,buildTime:new Date().toISOString(),routes:J,assets:Y,outputDir:Q}}function gJ(J,Y){let Q=p.join(Y,"manifest.json");M.writeFileSync(Q,JSON.stringify(J,null,2))}function uJ(J){let Y=p.join(J,"manifest.json");if(!M.existsSync(Y))return null;try{let Q=M.readFileSync(Y,"utf-8"),X=JSON.parse(Q);if(X.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${X.version}`),null;return X}catch(Q){return console.warn("[stx] Failed to load manifest:",Q),null}}function b(J,Y,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(Y)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function FJ(J){let Y=J.headers.get("content-type")||"",Q={},X=($,Z)=>{let U=Q[$];if(U===void 0)Q[$]=Z;else if(Array.isArray(U))U.push(Z);else Q[$]=[U,Z]};if(Y.includes("multipart/form-data")){let $=await J.formData();for(let[Z,U]of $.entries())if(typeof U==="string")X(Z,U);return Q}if(Y.includes("application/x-www-form-urlencoded")){for(let[$,Z]of new URLSearchParams(await J.text()).entries())X($,Z);return Q}return Q}function GJ(J){if(!J)return!1;let Y=J.toUpperCase();return Y!=="GET"&&Y!=="HEAD"}async function d(J,Y={}){let Q=Y.request,X=Y.method??Q?.method;if(!Q||!GJ(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let $={};try{$=await FJ(Q)}catch{}let Z=await J.action({request:Q,form:$,params:Y.params??{},query:J.query??{},cookies:Y.cookies??{}});if(Z&&typeof Z==="object"){let U=Z,W=zJ(U.cookies),j=U.redirect;if(typeof j==="string"&&j)return{redirect:j,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:F,redirect:K,...G}=U;if(Object.assign(J,G),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function zJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let Y=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){Y.push(b(Q,X));continue}if(X&&typeof X==="object"){let $=X;if(typeof $.value!=="string")continue;Y.push(b(Q,$.value,$))}}return Y}function dJ(J,Y=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let $ of Y)X.append("Set-Cookie",$);for(let[$,Z]of Object.entries(Q??{}))if($.toLowerCase()!=="location")X.set($,Z);return new Response(null,{status:303,headers:X})}async function aJ(J,Y={}){return(await n(J,Y)).html}async function tJ(J,Y={}){let{html:Q,context:X,redirect:$,cookies:Z}=await n(J,Y),U=c(X),W=l(X);if($)return{html:Q,redirect:$,cookies:Z,status:U,headers:W};let{extractStreamBoundaries:j}=await import("./chunk-c9fg7wte.js"),F=j(X),K=J.streamTemplates;if(K&&Object.keys(K).length>0){let{processDirectives:G}=await import("./chunk-wea6j8hh.js"),{defaultConfig:B}=await import("./chunk-yht9jjry.js"),w=X.streamBoundaries||{},N={...B,autoShell:!1},A=Object.keys(K).map((z)=>({id:z,render:async()=>{let _=typeof w[z]==="function"?await w[z]():void 0;return G(K[z],{...X,$boundary:_},J.sourceFile,N,new Set)}})),I=new Set(A.map((z)=>z.id));F=[...(F||[]).filter((z)=>!I.has(z.id)),...A]}return{html:Q,boundaries:F&&F.length>0?F:void 0,cookies:Z,status:U,headers:W}}async function n(J,Y){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...Y};if(!J.hasServerScripts&&!O(J.html))return{html:J.html,context:Q};for(let U of J.serverScriptContent)try{await T(U,Q,J.sourceFile)}catch(W){if(Y.__stx_strict_hydration)throw W;console.warn(`[stx] Server script error in ${J.sourceFile}:`,W)}let X=await d(Q,{request:Y.request,method:Y.method,params:Y.params??{},cookies:Y.cookies??{}}),$=(U)=>{let W=U.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),j=i(Q);if(!j)return W;let F=W.indexOf("</head>");return F<0?j+W:W.slice(0,F)+j+W.slice(F)};if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!O(J.html))return{html:$(J.html),context:Q,cookies:X.cookies};let Z=new Map;for(let[U,W]of Object.entries(J.placeholders))if(W.expression)try{let j=k(W.expression,Q);if(W.type==="raw")Z.set(U,j!==void 0&&j!==null?String(j):"");else Z.set(U,j!==void 0&&j!==null?P(String(j)):"")}catch(j){if(Y.__stx_strict_hydration)throw j;Z.set(U,"")}return{html:$(R(J.html,Z)),context:Q,cookies:X.cookies}}async function eJ(J,Y={}){if(!J.hasServerScripts&&!O(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...Y};for(let $ of J.serverScriptContent)try{await T($,Q,J.sourceFile)}catch(Z){console.warn(`[stx] Server script error in ${J.sourceFile}:`,Z)}if(!O(J.fragment))return J.fragment;let X=new Map;for(let[$,Z]of Object.entries(J.placeholders))if(Z.expression)try{let U=k(Z.expression,Q);if(Z.type==="raw")X.set($,U!==void 0&&U!==null?String(U):"");else X.set($,U!==void 0&&U!==null?P(String(U)):"")}catch{X.set($,"")}return R(J.fragment,X)}
30
- export{s as Yf,C as Zf,e as _f,x as $f,NJ as ag,_J as bg,AJ as cg,g as dg,QJ as eg,IJ as fg,RJ as gg,PJ as hg,kJ as ig,KJ as jg,TJ as kg,SJ as lg,fJ as mg,gJ as ng,uJ as og,b as pg,FJ as qg,GJ as rg,d as sg,dJ as tg,aJ as ug,tJ as vg,eJ as wg};