@stacksjs/stx 0.2.919 → 0.2.921

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 (249) hide show
  1. package/dist/chunk-0678sab4.js +2 -0
  2. package/dist/chunk-0bnv0aaz.js +2 -0
  3. package/dist/chunk-0bvfm5h5.js +2 -0
  4. package/dist/chunk-0c3q5h03.js +2 -0
  5. package/dist/chunk-0fh84wr5.js +2 -0
  6. package/dist/chunk-0p9x0m5n.js +2 -0
  7. package/dist/{chunk-m390z8w8.js → chunk-0rq1w0xr.js} +7 -7
  8. package/dist/{chunk-fwxgzktt.js → chunk-1pc2p489.js} +2 -2
  9. package/dist/{chunk-2szhk8mh.js → chunk-29cy41z3.js} +4 -4
  10. package/dist/{chunk-9mack1g8.js → chunk-2d0pemtc.js} +3 -3
  11. package/dist/{chunk-1bf0grbf.js → chunk-2qnpr0ty.js} +3 -3
  12. package/dist/{chunk-fjpt8arw.js → chunk-2r2tayyd.js} +2 -2
  13. package/dist/chunk-2sfxj244.js +2 -0
  14. package/dist/{chunk-wxqay5c2.js → chunk-30d298vs.js} +1 -1
  15. package/dist/{chunk-d69k67bn.js → chunk-36j2drjv.js} +9 -9
  16. package/dist/{chunk-9gr7m3tb.js → chunk-3d0bjcn7.js} +1 -1
  17. package/dist/chunk-3k9d0h11.js +2 -0
  18. package/dist/{chunk-whnzf9hn.js → chunk-3mc9ew9r.js} +6 -6
  19. package/dist/chunk-43r0h76m.js +2 -0
  20. package/dist/{chunk-cbqe84g3.js → chunk-4f8h38xr.js} +2 -2
  21. package/dist/{chunk-858p3hkz.js → chunk-4jg8ddfy.js} +2 -2
  22. package/dist/chunk-4jh5t3rz.js +2 -0
  23. package/dist/{chunk-rk16391e.js → chunk-4nabpd82.js} +5 -5
  24. package/dist/{chunk-p3x7kwb5.js → chunk-4w203ddt.js} +6 -6
  25. package/dist/chunk-4y2k14ec.js +2 -0
  26. package/dist/chunk-57xcb1wn.js +2 -0
  27. package/dist/chunk-5ekbye3p.js +2 -0
  28. package/dist/chunk-5s1q4y2j.js +2 -0
  29. package/dist/chunk-6359fekc.js +2 -0
  30. package/dist/{chunk-wv0wsavj.js → chunk-66cz2ph7.js} +2 -2
  31. package/dist/{chunk-p0xqm2ne.js → chunk-7767n5k6.js} +1 -1
  32. package/dist/{chunk-xpsg91dh.js → chunk-78j6c3sf.js} +5 -5
  33. package/dist/{chunk-qtzfbv7e.js → chunk-7d0h2pa3.js} +5 -5
  34. package/dist/{chunk-jgtn9t5n.js → chunk-7g720sk3.js} +2 -2
  35. package/dist/chunk-7nshr15z.js +2 -0
  36. package/dist/{chunk-14df2jzs.js → chunk-875wejw1.js} +2 -2
  37. package/dist/chunk-8g6cmgn8.js +2 -0
  38. package/dist/chunk-8gfdy17b.js +2 -0
  39. package/dist/{chunk-fn0y9z1t.js → chunk-8vjsmyrk.js} +5 -5
  40. package/dist/chunk-8yx65vb0.js +2 -0
  41. package/dist/{chunk-09xqy448.js → chunk-90ps064x.js} +2 -2
  42. package/dist/chunk-91nwc581.js +2 -0
  43. package/dist/{chunk-yzqb7y45.js → chunk-94001bha.js} +5 -5
  44. package/dist/chunk-94skx5m6.js +2 -0
  45. package/dist/chunk-9aegppj7.js +2 -0
  46. package/dist/{chunk-gjyz5ma7.js → chunk-9ch2qhbw.js} +1 -1
  47. package/dist/{chunk-m6hrb7rm.js → chunk-9sk596tw.js} +25 -25
  48. package/dist/{chunk-3ftrv1f7.js → chunk-a3qb13vr.js} +20 -20
  49. package/dist/chunk-a5vzdhsk.js +2 -0
  50. package/dist/{chunk-jjq7c8s2.js → chunk-a78k8fkg.js} +2 -2
  51. package/dist/{chunk-txk2z7v0.js → chunk-ag07tdhn.js} +4 -4
  52. package/dist/{chunk-0wctbtad.js → chunk-amnfd29h.js} +3 -3
  53. package/dist/chunk-aqh48tyw.js +2 -0
  54. package/dist/{chunk-zaj3nnvv.js → chunk-avtq2p0c.js} +2 -2
  55. package/dist/{chunk-3kpxkjgm.js → chunk-b0kq5mzq.js} +2 -2
  56. package/dist/chunk-b6am4h24.js +2 -0
  57. package/dist/{chunk-qzqqzraq.js → chunk-b9z4nb1v.js} +6 -6
  58. package/dist/{chunk-d4xjwebv.js → chunk-bwnx71s8.js} +5 -5
  59. package/dist/{chunk-mr9pp5cf.js → chunk-c3nmjx26.js} +2 -2
  60. package/dist/chunk-cajg2sz0.js +2 -0
  61. package/dist/{chunk-3efpqm1f.js → chunk-dhx4m7mf.js} +2 -2
  62. package/dist/chunk-dktqmf4t.js +2 -0
  63. package/dist/chunk-dqwxyk1m.js +2 -0
  64. package/dist/chunk-e2kk1d9z.js +2 -0
  65. package/dist/{chunk-zrxvj3zf.js → chunk-e8aqkt1b.js} +6 -6
  66. package/dist/{chunk-mztjpp7m.js → chunk-e8hvbc53.js} +2 -2
  67. package/dist/{chunk-kk9h53xg.js → chunk-edjzm0vj.js} +3 -3
  68. package/dist/chunk-ee4ejnk2.js +2 -0
  69. package/dist/chunk-eezp4a40.js +2 -0
  70. package/dist/chunk-eh2ynja3.js +2 -0
  71. package/dist/chunk-emk29htn.js +2 -0
  72. package/dist/{chunk-xq5s4vc1.js → chunk-eqj8nj5c.js} +1 -1
  73. package/dist/{chunk-ktv65e3n.js → chunk-f8sh6289.js} +7 -7
  74. package/dist/{chunk-6n6kndk0.js → chunk-fb1hyhgf.js} +3 -3
  75. package/dist/chunk-fd0vnz09.js +2 -0
  76. package/dist/chunk-fyhtp2nt.js +2 -0
  77. package/dist/{chunk-xk7hdpq5.js → chunk-g2fxp9zp.js} +3 -3
  78. package/dist/chunk-gbct53j0.js +2 -0
  79. package/dist/{chunk-m9ta0640.js → chunk-gsm3rk4j.js} +2 -2
  80. package/dist/{chunk-x40j67z1.js → chunk-gt9bt8xa.js} +2 -2
  81. package/dist/{chunk-ft34x0h1.js → chunk-gxdy4qjj.js} +4 -4
  82. package/dist/chunk-gxtq25gr.js +2 -0
  83. package/dist/chunk-h1dnjn9g.js +2 -0
  84. package/dist/{chunk-yvaqgdv1.js → chunk-h7z23fpq.js} +1 -1
  85. package/dist/{chunk-sxrcac01.js → chunk-hakevnm1.js} +2 -2
  86. package/dist/chunk-hn7fv830.js +2 -0
  87. package/dist/chunk-hx6tr46s.js +1459 -0
  88. package/dist/chunk-jenk04c8.js +2 -0
  89. package/dist/{chunk-1baxccfq.js → chunk-jfy0r3hx.js} +24 -24
  90. package/dist/{chunk-9zwmfkfg.js → chunk-jh007a8k.js} +5 -5
  91. package/dist/chunk-jh1hdq31.js +3 -0
  92. package/dist/{chunk-tb4be5ct.js → chunk-jk1hzawb.js} +3 -3
  93. package/dist/{chunk-hht7n4zd.js → chunk-jya12bfn.js} +2 -2
  94. package/dist/chunk-k1qbgpfy.js +2 -0
  95. package/dist/chunk-kgmwja6f.js +2 -0
  96. package/dist/{chunk-z6nyyt3n.js → chunk-khf62zkn.js} +5 -5
  97. package/dist/chunk-kppj8rqa.js +2 -0
  98. package/dist/{chunk-514yg4dr.js → chunk-m3ra99h8.js} +6 -6
  99. package/dist/{chunk-qsnw0qyp.js → chunk-m8rzaqm8.js} +2 -2
  100. package/dist/chunk-msvphygp.js +2 -0
  101. package/dist/chunk-mzbejejf.js +2 -0
  102. package/dist/{chunk-v1x96kjr.js → chunk-nkgqhb7s.js} +7 -7
  103. package/dist/{chunk-9707zz6v.js → chunk-p17jeqz0.js} +2 -2
  104. package/dist/{chunk-2f46pcg0.js → chunk-pe5sstex.js} +2 -2
  105. package/dist/{chunk-vtj3dwhh.js → chunk-pqr4gn9b.js} +2 -2
  106. package/dist/{chunk-40j2pmnb.js → chunk-prj38cyp.js} +5 -5
  107. package/dist/{chunk-mn9t5fnv.js → chunk-q8snpht6.js} +2 -2
  108. package/dist/chunk-q99y5115.js +3 -0
  109. package/dist/{chunk-7axtwg1f.js → chunk-qzspvwv6.js} +2 -2
  110. package/dist/chunk-r02asm46.js +2 -0
  111. package/dist/{chunk-vf7tpgqz.js → chunk-r7zvrh58.js} +16 -16
  112. package/dist/{chunk-ex6dne7e.js → chunk-ra35ptjg.js} +2 -2
  113. package/dist/chunk-rc4712qh.js +2 -0
  114. package/dist/chunk-rq7sg012.js +33 -0
  115. package/dist/{chunk-v060015m.js → chunk-rt4gzqs9.js} +1 -1
  116. package/dist/chunk-rx1xw7q2.js +2 -0
  117. package/dist/{chunk-mnpfvxpa.js → chunk-rzmephr2.js} +30 -30
  118. package/dist/{chunk-0xyfs691.js → chunk-s3rhbwgf.js} +4 -4
  119. package/dist/{chunk-xap1f1bw.js → chunk-s6w14v6h.js} +2 -2
  120. package/dist/{chunk-nkbnsbb0.js → chunk-sdvv8zge.js} +2 -2
  121. package/dist/{chunk-3br07y64.js → chunk-sgppgy5e.js} +5 -5
  122. package/dist/{chunk-v1a5h1tc.js → chunk-sk7pptzf.js} +9 -9
  123. package/dist/{chunk-50zzar2c.js → chunk-sk8x8nw8.js} +3 -3
  124. package/dist/chunk-skjm3zdh.js +2 -0
  125. package/dist/{chunk-5fdc8pej.js → chunk-t4exh7c9.js} +7 -7
  126. package/dist/{chunk-3hfv217t.js → chunk-t64mp8x1.js} +6 -6
  127. package/dist/{chunk-neymp1bb.js → chunk-tfpd7aht.js} +3 -3
  128. package/dist/chunk-tsnzhke9.js +2 -0
  129. package/dist/{chunk-yye2pec5.js → chunk-tt6n2mx6.js} +14 -14
  130. package/dist/chunk-txyze88n.js +2 -0
  131. package/dist/chunk-v1t7sees.js +2 -0
  132. package/dist/{chunk-1a2c4pv8.js → chunk-vhp5hqwp.js} +10 -10
  133. package/dist/{chunk-1vsjmwr1.js → chunk-vn3hsx7v.js} +2 -2
  134. package/dist/chunk-vt410s5m.js +2 -0
  135. package/dist/{chunk-3tcy9r6r.js → chunk-w27j0apm.js} +14 -14
  136. package/dist/{chunk-2zb642qr.js → chunk-w5vxzk5j.js} +6 -6
  137. package/dist/chunk-w81a1e14.js +9 -0
  138. package/dist/{chunk-tnbzg7fd.js → chunk-wajvxzt0.js} +2 -2
  139. package/dist/chunk-wrva7jes.js +2 -0
  140. package/dist/{chunk-p4twxjfs.js → chunk-ws25jw6x.js} +3 -3
  141. package/dist/{chunk-m86sjbx7.js → chunk-ww24mxmd.js} +3 -3
  142. package/dist/chunk-xdprx6tx.js +1331 -0
  143. package/dist/chunk-xgv3gy1b.js +2 -0
  144. package/dist/chunk-xjhv5e5f.js +2 -0
  145. package/dist/chunk-xnvh4jk2.js +21 -0
  146. package/dist/chunk-xtakhmnb.js +2 -0
  147. package/dist/{chunk-zb6my502.js → chunk-y97g0kwc.js} +1 -1
  148. package/dist/chunk-y9f9d4zv.js +2 -0
  149. package/dist/{chunk-qda8tmk9.js → chunk-yfe380a4.js} +2 -2
  150. package/dist/{chunk-6x5a2w5a.js → chunk-ygtz9kc7.js} +2 -2
  151. package/dist/chunk-yyypc7s3.js +2 -0
  152. package/dist/chunk-z5j4prza.js +2 -0
  153. package/dist/{chunk-2jm7map2.js → chunk-z68teecy.js} +2 -2
  154. package/dist/cli.js +20 -20
  155. package/dist/composables/use-media-query.js +23 -22
  156. package/dist/craft-entry.js +2 -2
  157. package/dist/craft.js +2 -2
  158. package/dist/native/accessibility.d.ts +1 -1
  159. package/dist/native/accessibility.js +5 -3
  160. package/dist/native/bridge/protocol.d.ts +1 -0
  161. package/dist/native/compiler/html-to-ir.js +14 -1
  162. package/dist/native/compiler/ir.d.ts +7 -0
  163. package/dist/native/components/primitives.d.ts +1 -0
  164. package/dist/native/event-names.js +4 -0
  165. package/dist/native/prop-names.js +3 -1
  166. package/dist/native/runtime/browser-renderer.js +4 -0
  167. package/dist/native/runtime/craft-bridge.js +1 -0
  168. package/dist/native/runtime/craft.d.ts +3 -0
  169. package/dist/native/runtime/jsc-globals.js +1 -1
  170. package/dist/native/runtime/native-media.js +8 -3
  171. package/dist/native/runtime/shared-screen.js +8 -3
  172. package/dist/native/testing.d.ts +2 -1
  173. package/dist/native/testing.js +2 -1
  174. package/dist/process.js +6 -3
  175. package/dist/pwa.js +3 -3
  176. package/dist/signal-processing.d.ts +2 -2
  177. package/dist/signal-processing.js +17 -11
  178. package/dist/ssg.js +9 -9
  179. package/dist/utils.js +2 -1
  180. package/dist/vue-template.d.ts +2 -0
  181. package/dist/vue-template.js +72 -2
  182. package/package.json +6 -6
  183. package/dist/chunk-0ebaf0pr.js +0 -2
  184. package/dist/chunk-0jjq552g.js +0 -2
  185. package/dist/chunk-15rc8t28.js +0 -2
  186. package/dist/chunk-1jrhjn2b.js +0 -2
  187. package/dist/chunk-1svffhzq.js +0 -2
  188. package/dist/chunk-2m4ydym0.js +0 -33
  189. package/dist/chunk-2mv29s6w.js +0 -9
  190. package/dist/chunk-3aayrnbh.js +0 -21
  191. package/dist/chunk-426gq0g5.js +0 -2
  192. package/dist/chunk-4ge80k8j.js +0 -2
  193. package/dist/chunk-4vdfqr64.js +0 -2
  194. package/dist/chunk-4yz33vzb.js +0 -2
  195. package/dist/chunk-4zcswx6x.js +0 -2
  196. package/dist/chunk-5ht628zp.js +0 -2
  197. package/dist/chunk-67zy5p7x.js +0 -2
  198. package/dist/chunk-8153bfpx.js +0 -2
  199. package/dist/chunk-86p0m920.js +0 -2
  200. package/dist/chunk-88texeh4.js +0 -2
  201. package/dist/chunk-8mye65n9.js +0 -2
  202. package/dist/chunk-8ycgk8w6.js +0 -2
  203. package/dist/chunk-9xcsn4pb.js +0 -2
  204. package/dist/chunk-a5tg553d.js +0 -2
  205. package/dist/chunk-agxxqjjt.js +0 -2
  206. package/dist/chunk-b44pvac7.js +0 -2
  207. package/dist/chunk-b4yp16a2.js +0 -2
  208. package/dist/chunk-fb63xppz.js +0 -2
  209. package/dist/chunk-ffqqkeye.js +0 -2
  210. package/dist/chunk-g1v12bjm.js +0 -2
  211. package/dist/chunk-gg0kkn2e.js +0 -2
  212. package/dist/chunk-ggg8b8n1.js +0 -2
  213. package/dist/chunk-ggrcg7k7.js +0 -2
  214. package/dist/chunk-gmn9ba8f.js +0 -3
  215. package/dist/chunk-gqe574d9.js +0 -2
  216. package/dist/chunk-hajamm16.js +0 -2
  217. package/dist/chunk-hg2n2264.js +0 -2
  218. package/dist/chunk-hxabvt31.js +0 -2
  219. package/dist/chunk-j3sat6vn.js +0 -2
  220. package/dist/chunk-j9gbnqxq.js +0 -2
  221. package/dist/chunk-jj2z4nxa.js +0 -2
  222. package/dist/chunk-k289127j.js +0 -2
  223. package/dist/chunk-m1hfh2t4.js +0 -2
  224. package/dist/chunk-m3qwqhxp.js +0 -2
  225. package/dist/chunk-m9smh7fs.js +0 -2
  226. package/dist/chunk-mhnjtc42.js +0 -2
  227. package/dist/chunk-n4bxb2hx.js +0 -2
  228. package/dist/chunk-n958bxm6.js +0 -2
  229. package/dist/chunk-nkr1aa5z.js +0 -2
  230. package/dist/chunk-p3vswt0f.js +0 -2
  231. package/dist/chunk-p8wnp4p1.js +0 -2
  232. package/dist/chunk-q3z252d9.js +0 -2
  233. package/dist/chunk-qfkak3jb.js +0 -2
  234. package/dist/chunk-rt7xy537.js +0 -2
  235. package/dist/chunk-rwjye578.js +0 -2
  236. package/dist/chunk-sbr3wg75.js +0 -1467
  237. package/dist/chunk-sftznswb.js +0 -2
  238. package/dist/chunk-tz5ktd6d.js +0 -2
  239. package/dist/chunk-vb609vbj.js +0 -1323
  240. package/dist/chunk-vtcyber4.js +0 -2
  241. package/dist/chunk-wq2bpt0w.js +0 -2
  242. package/dist/chunk-wv8zt78c.js +0 -2
  243. package/dist/chunk-xakqpa4z.js +0 -3
  244. package/dist/chunk-xy3ex6ht.js +0 -2
  245. package/dist/chunk-y899wtm8.js +0 -2
  246. package/dist/chunk-ye45znz5.js +0 -2
  247. package/dist/chunk-yegp50jb.js +0 -2
  248. package/dist/chunk-yq9aqpk8.js +0 -2
  249. package/dist/chunk-zt45dqfx.js +0 -2
@@ -5,7 +5,7 @@ import { escapeScriptBody } from "./script-emit.js";
5
5
  import { transformStoreImports } from "./store-imports.js";
6
6
  import { shouldTranspileTypeScript, transpileTypeScript } from "./utils.js";
7
7
  import { injectSignalsRuntime } from "./runtime-injection.js";
8
- import { evictOldest, matchScriptElement, scanAtElementPosition } from "./html-masking.js";
8
+ import { evictOldest, matchScriptElement, scanAtElementPosition, scanHtmlTags } from "./html-masking.js";
9
9
  import { importOnce } from "./lazy-module.js";
10
10
  import { findBodyOpenTag } from "./find-body-tag.js";
11
11
  import { stripCommentsAndLiterals } from "./strip-literals.js";
@@ -101,8 +101,8 @@ function hasTopLevelElseBranch(content) {
101
101
  }
102
102
  return !1;
103
103
  }
104
- export function extractClientSignalNames(template) {
105
- const names = new Set, scriptRe = /<script\b(?![^>]*\bserver\b)(?![^>]*\bsrc\s*=)[^>]*>([\s\S]*?)<\/script>/gi, declRe = /\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useModel)\s*(?:<[^>]*>)?\s*\(/g;
104
+ export function extractClientSignalNames(template, context) {
105
+ const inherited = context?.__stx_client_signal_names, names = new Set(Array.isArray(inherited) ? inherited.filter((name) => typeof name === "string") : []), scriptRe = /<script\b(?![^>]*\bserver\b)(?![^>]*\bsrc\s*=)[^>]*>([\s\S]*?)<\/script>/gi, declRe = /\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useModel)\s*(?:<[^>]*>)?\s*\(/g;
106
106
  let scriptMatch;
107
107
  while ((scriptMatch = scriptRe.exec(template)) !== null) {
108
108
  const body = scriptMatch[1];
@@ -231,10 +231,16 @@ function isBalancedForTag(inner, tag) {
231
231
  depth++;
232
232
  return !0;
233
233
  }
234
- export function convertSignalDirectivesToAttributes(template, context) {
234
+ export function convertSignalDirectivesToAttributes(template, context, componentSignals = []) {
235
235
  const signalNames = extractClientSignalNames(template);
236
+ for (const name of componentSignals)
237
+ signalNames.add(name);
236
238
  function convert(input) {
239
+ if (!input.includes("@if"))
240
+ return input;
237
241
  let output = input;
242
+ const tags = scanHtmlTags(input);
243
+ let tagIndex = 0;
238
244
  const clientLoopScopes = collectClientLoopScopes(input), loopVarsAt = (position) => {
239
245
  const vars = new Set;
240
246
  for (const scope of clientLoopScopes)
@@ -246,7 +252,12 @@ export function convertSignalDirectivesToAttributes(template, context) {
246
252
  let match;
247
253
  const replacements = [];
248
254
  while ((match = ifDirectiveStart.exec(output)) !== null) {
249
- const startIdx = match.index, exprStart = startIdx + match[0].length;
255
+ const startIdx = match.index;
256
+ while (tagIndex < tags.length && tags[tagIndex].end <= startIdx)
257
+ tagIndex++;
258
+ if (tags[tagIndex] && tags[tagIndex].start < startIdx)
259
+ continue;
260
+ const exprStart = startIdx + match[0].length;
250
261
  let depth = 1, i = exprStart;
251
262
  while (i < output.length && depth > 0) {
252
263
  if (output[i] === "(")
@@ -571,12 +582,7 @@ export function convertServerLoopAttributesToDirectives(template, context) {
571
582
  return template;
572
583
  if (!LOOP_ATTRS.some((attr) => template.includes(`${attr}=`)))
573
584
  return template;
574
- const signalNames = extractClientSignalNames(template);
575
- if (Array.isArray(context.__stx_client_signal_names)) {
576
- for (const name of context.__stx_client_signal_names)
577
- if (typeof name === "string")
578
- signalNames.add(name);
579
- }
585
+ const signalNames = extractClientSignalNames(template, context);
580
586
  let output = template;
581
587
  const replacements = [], tagRe = /<([a-zA-Z][\w-]*)((?:[^>"']|"[^"]*"|'[^']*')*)>/g;
582
588
  let match;
package/dist/ssg.js CHANGED
@@ -1,12 +1,12 @@
1
1
  // @bun
2
- import"./chunk-jjq7c8s2.js";import"./chunk-ex6dne7e.js";import"./chunk-2mv29s6w.js";import"./chunk-s1x2pc9b.js";import{_,Dl}from"./chunk-vf7tpgqz.js";import"./chunk-858p3hkz.js";import"./chunk-ayrd026n.js";import{Vt}from"./chunk-vb609vbj.js";import"./chunk-14df2jzs.js";import"./chunk-qda8tmk9.js";import"./chunk-mr9pp5cf.js";import{jt,Bt,Ft,zt,Ht,Ut}from"./chunk-5fdc8pej.js";import{a}from"./chunk-3tcy9r6r.js";import{Ks}from"./chunk-ktv65e3n.js";import"./chunk-txk2z7v0.js";import"./chunk-xpsg91dh.js";import{$e,bn,wn}from"./chunk-3br07y64.js";import"./chunk-fwxgzktt.js";import{S}from"./chunk-m390z8w8.js";import{It,i}from"./chunk-sbr3wg75.js";import"./chunk-d69k67bn.js";import"./chunk-1a2c4pv8.js";import{Ns}from"./chunk-3aayrnbh.js";import"./chunk-whnzf9hn.js";import"./chunk-zaj3nnvv.js";import{$c,Rc,Ac,Pc,Ic}from"./chunk-xk7hdpq5.js";import{hn,br,wr}from"./chunk-pxvp0cc9.js";import{yn}from"./chunk-yvaqgdv1.js";import"./chunk-xakqpa4z.js";import"./chunk-fjpt8arw.js";import{se,Pe}from"./chunk-v1x96kjr.js";import"./chunk-p0xqm2ne.js";import"./chunk-50zzar2c.js";import{l}from"./chunk-6x5a2w5a.js";import{st}from"./chunk-gmn9ba8f.js";import{t,y}from"./chunk-0wctbtad.js";import{f}from"./chunk-p4twxjfs.js";import v from"fs";import p from"path";var xt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function X(e){let n=e.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function bt(e){for(let n of xt){let s=e[n];if(!s)continue;let o=X(s);if(o)return{url:o,source:"env",via:n}}return null}function ct(e){if(!e||typeof e!=="object")return null;let n=e,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?X(s):null}async function vt(e){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(e,o);if(!n(c))continue;try{let r=await import(c),u=ct(r.default??r);if(u)return u}catch{}}return null}async function lt(e={}){let n=e.cwd??process.cwd(),s=e.env??process.env;if(e.explicit){let u=X(e.explicit);if(u)return{url:u,source:"option"}}let o=ct(e.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await vt(n);if(c)return{url:c,source:"site.config",via:"url"};let r=bt(s);if(r)return r;return{url:"http://localhost",source:"fallback"}}function ut(){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
- `)}function J(e){return async()=>({paths:await e(),fallback:!1})}var Pt;function Dt(e){let n=t(e),{depths:s}=y(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(n))!==null){if(s[c.index]!==0)continue;let u=_(n,"(",")",o.lastIndex-1),w=n.indexOf("{",u+1),P=_(n,"{","}",w);if(u<0||w<0||P<0)break;return e.slice(c.index,P+1)}let r=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=r.exec(n))!==null){if(s[c.index]!==0)continue;let u=Dl(n,r.lastIndex).endPos;return e.slice(r.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function dt(e){let n="read";try{let s=await Bun.file(e).text();n="parse";let o=yn(s),c=[...o.server,...o.client,...o.signals].filter((r)=>/(?:^|\s)server(?:\s|=|$)/i.test(t(r.attrs))).sort((r,u)=>s.indexOf(r.fullTag)-s.indexOf(u.fullTag));for(let r of c){if(!/\bgetStaticPaths\b/.test(t(r.content)))continue;let u=(Pt??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(r.content);if(!/\bgetStaticPaths\b/.test(t(u)))continue;let w=Dt(u);if(/\bdefineStaticPaths\b/.test(t(w))&&Vt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let P=Function("defineStaticPaths",`return (${w})`)(J);if(typeof P!=="function")throw TypeError("getStaticPaths must be a function");let k=await P();n="result";let x=Array.isArray(k)?{paths:k}:k;if(!x||typeof x!=="object"||!("paths"in x)||!Array.isArray(x.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let D of x.paths)if(!D||typeof D!=="object"||!D.params||typeof D.params!=="object"||Array.isArray(D.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:x}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class gt{cacheDir;cache=new Map;loaded=!1;salt;constructor(e,n=""){this.cacheDir=e,this.salt=n}async load(){if(this.loaded)return;let e=p.join(this.cacheDir,"build-cache.json");if(await Bun.file(e).exists())try{let n=JSON.parse(await Bun.file(e).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await v.promises.mkdir(this.cacheDir,{recursive:!0});let e=p.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(e,JSON.stringify(n))}getHash(e,n){let s=v.statSync(e),o=`${this.salt}|${e}:${s.mtimeMs}`;for(let r of n)if(v.existsSync(r)){let u=v.statSync(r);o+=`:${r}:${u.mtimeMs}`}let c=0;for(let r=0;r<o.length;r++){let u=o.charCodeAt(r);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(e,n){let s=this.cache.get(e);if(!s)return null;let o=ft(n).some((u)=>v.existsSync(u)),c=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&v.existsSync(u)&&Ns(v.readFileSync(u,"utf8")).some((w)=>/\bserver\b/.test(w.attrs)));if(o||c)return this.cache.delete(e),null;let r=this.getHash(n,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(e),null;return s.html}set(e,n,s,o){let c=this.getHash(n,s);this.cache.set(e,{hash:c,html:o,generatedAt:Date.now(),dependencies:s})}}class pt{cacheDir;constructor(e){this.cacheDir=e}getFilePath(e){let n=e.replace(/[^a-zA-Z0-9]/g,"_")+".json";return p.join(this.cacheDir,"isr",n)}async get(e){let n=this.getFilePath(e);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(e,n){let s=this.getFilePath(e);await v.promises.mkdir(p.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(e){let n=this.getFilePath(e);if(await Bun.file(n).exists())await v.promises.unlink(n)}async invalidatePattern(e){let n=p.join(this.cacheDir,"isr");if(!v.existsSync(n))return;let s=await v.promises.readdir(n);for(let o of s){let c=o.replace(/_/g,"/").replace(".json","");if(e.test(c))await v.promises.unlink(p.join(n,o))}}async needsRevalidation(e){let n=await this.get(e);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function $t(e){let n=[];if(!e.isDynamic)n.push({url:e.pattern,params:{}});else{let s=await dt(e.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${e.pattern} (${e.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${e.pattern} (${e.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${e.pattern} (${e.filePath})`),n;for(let c of o.paths){let r=e.pattern;for(let[u,w]of Object.entries(c.params))r=r.replace(`:${u}`,w).replace(`:${u}*`,w);n.push({url:r,params:c.params,props:c.props,revalidate:c.revalidate})}}return n}function ft(e){return[e.replace(/\.stx$/,".data.ts"),e.replace(/\.stx$/,".data.js"),e+".data.ts",e+".data.js"]}async function kt(e){for(let n of ft(e))if(await Bun.file(n).exists())try{let s=await import(n);if(typeof s.default==="function")return await s.default();else if(typeof s.default==="object")return s.default;else if(typeof s.getData==="function")return await s.getData();else{let{default:o,...c}=s;return c}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Rt(e,n,s){let o=e.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let r=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!r)return null;return await Function("params",`
2
+ import"./chunk-a78k8fkg.js";import"./chunk-ra35ptjg.js";import"./chunk-w81a1e14.js";import"./chunk-s1x2pc9b.js";import{_,Bl}from"./chunk-r7zvrh58.js";import"./chunk-4jg8ddfy.js";import"./chunk-ayrd026n.js";import{Vt}from"./chunk-xdprx6tx.js";import"./chunk-875wejw1.js";import"./chunk-yfe380a4.js";import"./chunk-c3nmjx26.js";import{jt,Bt,Ft,zt,Ht,Ut}from"./chunk-t4exh7c9.js";import{a}from"./chunk-w27j0apm.js";import{Xs}from"./chunk-f8sh6289.js";import"./chunk-ag07tdhn.js";import"./chunk-78j6c3sf.js";import{Re,bn,wn}from"./chunk-sgppgy5e.js";import"./chunk-1pc2p489.js";import{S}from"./chunk-0rq1w0xr.js";import{It,i}from"./chunk-hx6tr46s.js";import"./chunk-36j2drjv.js";import"./chunk-vhp5hqwp.js";import{Ms}from"./chunk-xnvh4jk2.js";import"./chunk-3mc9ew9r.js";import"./chunk-avtq2p0c.js";import{Ac,Pc,Ic,Oc,Nc}from"./chunk-g2fxp9zp.js";import{hn,br,wr}from"./chunk-pxvp0cc9.js";import{yn}from"./chunk-h7z23fpq.js";import"./chunk-jh1hdq31.js";import"./chunk-2r2tayyd.js";import{oe,Ie}from"./chunk-nkgqhb7s.js";import"./chunk-7767n5k6.js";import"./chunk-sk8x8nw8.js";import{l}from"./chunk-ygtz9kc7.js";import{st}from"./chunk-q99y5115.js";import{t,y}from"./chunk-amnfd29h.js";import{f}from"./chunk-ws25jw6x.js";import v from"fs";import p from"path";var xt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function X(e){let n=e.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function bt(e){for(let n of xt){let s=e[n];if(!s)continue;let o=X(s);if(o)return{url:o,source:"env",via:n}}return null}function ct(e){if(!e||typeof e!=="object")return null;let n=e,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?X(s):null}async function vt(e){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(e,o);if(!n(c))continue;try{let r=await import(c),u=ct(r.default??r);if(u)return u}catch{}}return null}async function lt(e={}){let n=e.cwd??process.cwd(),s=e.env??process.env;if(e.explicit){let u=X(e.explicit);if(u)return{url:u,source:"option"}}let o=ct(e.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await vt(n);if(c)return{url:c,source:"site.config",via:"url"};let r=bt(s);if(r)return r;return{url:"http://localhost",source:"fallback"}}function ut(){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
+ `)}function J(e){return async()=>({paths:await e(),fallback:!1})}var Pt;function Dt(e){let n=t(e),{depths:s}=y(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(n))!==null){if(s[c.index]!==0)continue;let u=_(n,"(",")",o.lastIndex-1),w=n.indexOf("{",u+1),P=_(n,"{","}",w);if(u<0||w<0||P<0)break;return e.slice(c.index,P+1)}let r=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=r.exec(n))!==null){if(s[c.index]!==0)continue;let u=Bl(n,r.lastIndex).endPos;return e.slice(r.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function dt(e){let n="read";try{let s=await Bun.file(e).text();n="parse";let o=yn(s),c=[...o.server,...o.client,...o.signals].filter((r)=>/(?:^|\s)server(?:\s|=|$)/i.test(t(r.attrs))).sort((r,u)=>s.indexOf(r.fullTag)-s.indexOf(u.fullTag));for(let r of c){if(!/\bgetStaticPaths\b/.test(t(r.content)))continue;let u=(Pt??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(r.content);if(!/\bgetStaticPaths\b/.test(t(u)))continue;let w=Dt(u);if(/\bdefineStaticPaths\b/.test(t(w))&&Vt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let P=Function("defineStaticPaths",`return (${w})`)(J);if(typeof P!=="function")throw TypeError("getStaticPaths must be a function");let k=await P();n="result";let x=Array.isArray(k)?{paths:k}:k;if(!x||typeof x!=="object"||!("paths"in x)||!Array.isArray(x.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let D of x.paths)if(!D||typeof D!=="object"||!D.params||typeof D.params!=="object"||Array.isArray(D.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:x}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class gt{cacheDir;cache=new Map;loaded=!1;salt;constructor(e,n=""){this.cacheDir=e,this.salt=n}async load(){if(this.loaded)return;let e=p.join(this.cacheDir,"build-cache.json");if(await Bun.file(e).exists())try{let n=JSON.parse(await Bun.file(e).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await v.promises.mkdir(this.cacheDir,{recursive:!0});let e=p.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(e,JSON.stringify(n))}getHash(e,n){let s=v.statSync(e),o=`${this.salt}|${e}:${s.mtimeMs}`;for(let r of n)if(v.existsSync(r)){let u=v.statSync(r);o+=`:${r}:${u.mtimeMs}`}let c=0;for(let r=0;r<o.length;r++){let u=o.charCodeAt(r);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(e,n){let s=this.cache.get(e);if(!s)return null;let o=ft(n).some((u)=>v.existsSync(u)),c=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&v.existsSync(u)&&Ms(v.readFileSync(u,"utf8")).some((w)=>/\bserver\b/.test(w.attrs)));if(o||c)return this.cache.delete(e),null;let r=this.getHash(n,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(e),null;return s.html}set(e,n,s,o){let c=this.getHash(n,s);this.cache.set(e,{hash:c,html:o,generatedAt:Date.now(),dependencies:s})}}class pt{cacheDir;constructor(e){this.cacheDir=e}getFilePath(e){let n=e.replace(/[^a-zA-Z0-9]/g,"_")+".json";return p.join(this.cacheDir,"isr",n)}async get(e){let n=this.getFilePath(e);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(e,n){let s=this.getFilePath(e);await v.promises.mkdir(p.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(e){let n=this.getFilePath(e);if(await Bun.file(n).exists())await v.promises.unlink(n)}async invalidatePattern(e){let n=p.join(this.cacheDir,"isr");if(!v.existsSync(n))return;let s=await v.promises.readdir(n);for(let o of s){let c=o.replace(/_/g,"/").replace(".json","");if(e.test(c))await v.promises.unlink(p.join(n,o))}}async needsRevalidation(e){let n=await this.get(e);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function $t(e){let n=[];if(!e.isDynamic)n.push({url:e.pattern,params:{}});else{let s=await dt(e.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${e.pattern} (${e.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${e.pattern} (${e.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${e.pattern} (${e.filePath})`),n;for(let c of o.paths){let r=e.pattern;for(let[u,w]of Object.entries(c.params))r=r.replace(`:${u}`,w).replace(`:${u}*`,w);n.push({url:r,params:c.params,props:c.props,revalidate:c.revalidate})}}return n}function ft(e){return[e.replace(/\.stx$/,".data.ts"),e.replace(/\.stx$/,".data.js"),e+".data.ts",e+".data.js"]}async function kt(e){for(let n of ft(e))if(await Bun.file(n).exists())try{let s=await import(n);if(typeof s.default==="function")return await s.default();else if(typeof s.default==="object")return s.default;else if(typeof s.getData==="function")return await s.getData();else{let{default:o,...c}=s;return c}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Rt(e,n,s){let o=e.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let r=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!r)return null;return await Function("params",`
4
4
  return (async function getStaticProps() {
5
5
  ${r[1]}
6
6
  })()
7
7
  `)(n)}catch(r){return console.error(`Error executing getStaticProps in ${s}:`,r),null}}function Et(e){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(e)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(e)}async function ht(e,n,s={},o,c){let r=await Bun.file(e.filePath).text(),u=await kt(e.filePath),w=await Rt(r,n,e.filePath),P={...u||{},...w||{},...s,params:n,$route:{path:e.pattern,params:n}},k=new Set,x=[],D=[],E={...c,minifyClient:!0,...o.partialsDir?{partialsDir:o.partialsDir}:{},...o.componentsDir?{componentsDir:o.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(R)=>{x.push(`${p.relative(process.cwd(),R.templatePath)}: ${R.message}
8
- resolved against partialsDir: ${R.partialsDir}`)},onServerScriptError:(R)=>{D.push(`${p.relative(process.cwd(),R.sourcePath)} (${R.kind}): ${R.message}`)}};if(Et(r))console.warn(`Warning: ${e.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let m=await i(r,P,e.filePath,E,k);for(let R of[e.filePath,...k])for(let O of $e(R))k.add(O);if(Object.keys(n).length>0){let R=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(m.includes("</head>"))m=f(m,R);else m=`${R}
9
- ${m}`}if(m=await Pe(m,{router:o.router}),m=await S(m),o.minify!==!1)return{html:Ct(m),dependencies:Array.from(k),includeFailures:x,serverScriptFailures:D};return{html:m,dependencies:Array.from(k),includeFailures:x,serverScriptFailures:D}}function Ct(e){let n=[],s=0,o=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=o.exec(e))!==null){let u=e.slice(s,c.index);n.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let w=c[1],P=c[2],k=c[3];P=st(P).replace(/<\/script/gi,"<\\/script"),n.push(w+P+k),s=c.index+c[0].length}let r=e.slice(s);return n.push(r.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function Tt(e){let n=0;for(let s=0;s<e.length;s++){let o=e.charCodeAt(s);n=(n<<5)-n+o,n=n&n}return`"${Math.abs(n).toString(36)}"`}function Ot(e,n,s,o){if(s?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return o.some((c)=>{if(c instanceof RegExp)return c.test(e);return c.endsWith("/")?e===c.slice(0,-1)||e.startsWith(c):e===c})}function At(e,n){return`<?xml version="1.0" encoding="UTF-8"?>
8
+ resolved against partialsDir: ${R.partialsDir}`)},onServerScriptError:(R)=>{D.push(`${p.relative(process.cwd(),R.sourcePath)} (${R.kind}): ${R.message}`)}};if(Et(r))console.warn(`Warning: ${e.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let m=await i(r,P,e.filePath,E,k);for(let R of[e.filePath,...k])for(let O of Re(R))k.add(O);if(Object.keys(n).length>0){let R=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(m.includes("</head>"))m=f(m,R);else m=`${R}
9
+ ${m}`}if(m=await Ie(m,{router:o.router}),m=await S(m),o.minify!==!1)return{html:Ct(m),dependencies:Array.from(k),includeFailures:x,serverScriptFailures:D};return{html:m,dependencies:Array.from(k),includeFailures:x,serverScriptFailures:D}}function Ct(e){let n=[],s=0,o=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=o.exec(e))!==null){let u=e.slice(s,c.index);n.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let w=c[1],P=c[2],k=c[3];P=st(P).replace(/<\/script/gi,"<\\/script"),n.push(w+P+k),s=c.index+c[0].length}let r=e.slice(s);return n.push(r.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function Tt(e){let n=0;for(let s=0;s<e.length;s++){let o=e.charCodeAt(s);n=(n<<5)-n+o,n=n&n}return`"${Math.abs(n).toString(36)}"`}function Ot(e,n,s,o){if(s?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return o.some((c)=>{if(c instanceof RegExp)return c.test(e);return c.endsWith("/")?e===c.slice(0,-1)||e.startsWith(c):e===c})}function At(e,n){return`<?xml version="1.0" encoding="UTF-8"?>
10
10
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
11
11
  ${e.map((o)=>{let c=new URL(o.loc,n).href,r=` <url>
12
12
  <loc>${F(c)}</loc>`;if(o.lastmod)r+=`
@@ -36,13 +36,13 @@ ${e.map((o)=>{let c=new URL(o.loc,n).href,r=` <url>
36
36
  ${s.join(`
37
37
  `)}
38
38
  </channel>
39
- </rss>`}async function Mt(e={}){let n=Date.now();wn();let s=await a(process.cwd()),o=s.build||{},c=await lt({explicit:e.domain||o.domain,stxConfig:s});if(c.source==="fallback"&&(e.sitemap??o.sitemap??!0))console.warn(ut());let r={router:e.router??s?.router??{},pagesDir:e.pagesDir||o.pagesDir||"pages",outputDir:e.outputDir||o.outputDir||"dist",baseUrl:e.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:e.revalidate??o.revalidate??!1,sitemap:e.sitemap??o.sitemap??!0,sitemapExclude:e.sitemapExclude||o.sitemapExclude||[],robots:e.robots??o.robots??!0,rss:e.rss??o.rss??!1,concurrency:e.concurrency||o.concurrency||10,cache:e.cache??o.cache??!0,cacheDir:e.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:e.contentLoaders||[],hooks:e.hooks||{},minify:e.minify??o.minify??!0,generate404:e.generate404??o.generate404??!0,publicDir:e.publicDir||o.publicDir||"public",trailingSlash:e.trailingSlash??o.trailingSlash??!1,cleanOutput:e.cleanOutput??o.cleanOutput??!0,cacheSalt:e.cacheSalt??"",partialsDir:e.partialsDir||s?.partialsDir||"",componentsDir:e.componentsDir||s?.componentsDir||"",failOnIncludeError:e.failOnIncludeError??!0,failOnServerScriptError:e.failOnServerScriptError??!0,chunkIslands:e.chunkIslands===!0,prefetchIslands:e.prefetchIslands===!0,integrityIslands:e.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,P=0,k={},x={};await r.hooks.onBuildStart?.();try{if(r.cleanOutput&&v.existsSync(r.outputDir))await v.promises.rm(r.outputDir,{recursive:!0});await v.promises.mkdir(r.outputDir,{recursive:!0});let E=r.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:h}=await import("./chunk-86p0m920.js");try{E=h(await d(process.cwd()))}catch{}}let{prepareImageDelivery:m}=await import("./chunk-0ebaf0pr.js"),R=await m(r.publicDir,r.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let O=new gt(r.cacheDir,E);if(r.cache)await O.load();try{let{generateCss:d}=await import("./chunk-86p0m920.js");await d('<div class="bg-black"></div>')}catch{}jt();let mt=s?.routeMiddleware?.dir||"middleware";await Ft(process.cwd(),mt);let V=Bt();if(V.length>0)console.log(`Loaded ${V.length} middleware: ${V.join(", ")}`);let wt=s?.routeMiddleware?.global||[];Ic(s?.layoutsDir,l(process.cwd()));let Z=se(".",{pagesDir:r.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Z.length} routes`);let L=[];for(let d of Z)try{let h=await $t(d);for(let b of h)L.push({route:d,url:b.url,params:b.params,props:b.props,revalidate:b.revalidate??r.revalidate})}catch(h){let b=h instanceof Error?h:Error(String(h));u.failedCount++,u.errors.push({route:d.pattern,error:b}),await r.hooks.onError?.(b,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,b)}u.totalPages=L.length+u.failedCount,console.log(`Generating ${L.length} pages...`);let U=[],Q=[];for(let d=0;d<L.length;d+=r.concurrency)Q.push(L.slice(d,d+r.concurrency));for(let d of Q)await Promise.all(d.map(async(h)=>{let{route:b,url:g,params:M,props:yt,revalidate:rt}=h;try{await r.hooks.onPageStart?.(g);let G=await Bun.file(b.filePath).text(),T=Nt(G),St=T?.middleware?Array.isArray(T.middleware)?T.middleware:[T.middleware]:[],nt=[...wt,...St];if(nt.length>0){let j=zt(g,M,T||{}),z=Ht(j,null,void 0,{isServer:!0}),I=await Ut(nt,z);if(I.redirect){let C=typeof I.redirect==="string"?I.redirect:I.redirect.path||I.redirect,H=Wt(String(C),g),A=qt(g,r);await v.promises.mkdir(p.dirname(A),{recursive:!0}),await Bun.write(A,H),u.successCount++,u.pages.push({route:g,outputPath:A,size:Buffer.byteLength(H),cached:!1}),U.push({loc:g,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${g} \u2192 redirect to ${C}`);return}if(I.abort){let C=typeof I.abort==="string"?I.abort:I.abort?.error?.message||"aborted";console.warn(` \u21B3 ${g} \u2014 middleware aborted: ${C}`);return}}let it=T?.validate;if(typeof it==="function")try{if(!await it({params:M})){console.warn(`Validation failed for ${g}, skipping...`);return}}catch{}let B=null,at=!1;if(r.cache){if(B=O.get(g,b.filePath),B)at=!0,u.cachedCount++}if(!B){let j=await ht(b,M,yt,r,s);if(B=j.html,r.failOnIncludeError&&j.includeFailures.length>0)throw Error(`${j.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
39
+ </rss>`}async function Mt(e={}){let n=Date.now();wn();let s=await a(process.cwd()),o=s.build||{},c=await lt({explicit:e.domain||o.domain,stxConfig:s});if(c.source==="fallback"&&(e.sitemap??o.sitemap??!0))console.warn(ut());let r={router:e.router??s?.router??{},pagesDir:e.pagesDir||o.pagesDir||"pages",outputDir:e.outputDir||o.outputDir||"dist",baseUrl:e.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:e.revalidate??o.revalidate??!1,sitemap:e.sitemap??o.sitemap??!0,sitemapExclude:e.sitemapExclude||o.sitemapExclude||[],robots:e.robots??o.robots??!0,rss:e.rss??o.rss??!1,concurrency:e.concurrency||o.concurrency||10,cache:e.cache??o.cache??!0,cacheDir:e.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:e.contentLoaders||[],hooks:e.hooks||{},minify:e.minify??o.minify??!0,generate404:e.generate404??o.generate404??!0,publicDir:e.publicDir||o.publicDir||"public",trailingSlash:e.trailingSlash??o.trailingSlash??!1,cleanOutput:e.cleanOutput??o.cleanOutput??!0,cacheSalt:e.cacheSalt??"",partialsDir:e.partialsDir||s?.partialsDir||"",componentsDir:e.componentsDir||s?.componentsDir||"",failOnIncludeError:e.failOnIncludeError??!0,failOnServerScriptError:e.failOnServerScriptError??!0,chunkIslands:e.chunkIslands===!0,prefetchIslands:e.prefetchIslands===!0,integrityIslands:e.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,P=0,k={},x={};await r.hooks.onBuildStart?.();try{if(r.cleanOutput&&v.existsSync(r.outputDir))await v.promises.rm(r.outputDir,{recursive:!0});await v.promises.mkdir(r.outputDir,{recursive:!0});let E=r.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:h}=await import("./chunk-8g6cmgn8.js");try{E=h(await d(process.cwd()))}catch{}}let{prepareImageDelivery:m}=await import("./chunk-xjhv5e5f.js"),R=await m(r.publicDir,r.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let O=new gt(r.cacheDir,E);if(r.cache)await O.load();try{let{generateCss:d}=await import("./chunk-8g6cmgn8.js");await d('<div class="bg-black"></div>')}catch{}jt();let mt=s?.routeMiddleware?.dir||"middleware";await Ft(process.cwd(),mt);let V=Bt();if(V.length>0)console.log(`Loaded ${V.length} middleware: ${V.join(", ")}`);let wt=s?.routeMiddleware?.global||[];Nc(s?.layoutsDir,l(process.cwd()));let Z=oe(".",{pagesDir:r.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Z.length} routes`);let L=[];for(let d of Z)try{let h=await $t(d);for(let b of h)L.push({route:d,url:b.url,params:b.params,props:b.props,revalidate:b.revalidate??r.revalidate})}catch(h){let b=h instanceof Error?h:Error(String(h));u.failedCount++,u.errors.push({route:d.pattern,error:b}),await r.hooks.onError?.(b,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,b)}u.totalPages=L.length+u.failedCount,console.log(`Generating ${L.length} pages...`);let U=[],Q=[];for(let d=0;d<L.length;d+=r.concurrency)Q.push(L.slice(d,d+r.concurrency));for(let d of Q)await Promise.all(d.map(async(h)=>{let{route:b,url:g,params:M,props:yt,revalidate:rt}=h;try{await r.hooks.onPageStart?.(g);let G=await Bun.file(b.filePath).text(),T=Nt(G),St=T?.middleware?Array.isArray(T.middleware)?T.middleware:[T.middleware]:[],nt=[...wt,...St];if(nt.length>0){let j=zt(g,M,T||{}),z=Ht(j,null,void 0,{isServer:!0}),I=await Ut(nt,z);if(I.redirect){let C=typeof I.redirect==="string"?I.redirect:I.redirect.path||I.redirect,H=Wt(String(C),g),A=qt(g,r);await v.promises.mkdir(p.dirname(A),{recursive:!0}),await Bun.write(A,H),u.successCount++,u.pages.push({route:g,outputPath:A,size:Buffer.byteLength(H),cached:!1}),U.push({loc:g,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${g} \u2192 redirect to ${C}`);return}if(I.abort){let C=typeof I.abort==="string"?I.abort:I.abort?.error?.message||"aborted";console.warn(` \u21B3 ${g} \u2014 middleware aborted: ${C}`);return}}let it=T?.validate;if(typeof it==="function")try{if(!await it({params:M})){console.warn(`Validation failed for ${g}, skipping...`);return}}catch{}let B=null,at=!1;if(r.cache){if(B=O.get(g,b.filePath),B)at=!0,u.cachedCount++}if(!B){let j=await ht(b,M,yt,r,s);if(B=j.html,r.failOnIncludeError&&j.includeFailures.length>0)throw Error(`${j.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
40
40
  ${j.includeFailures.join(`
41
41
  `)}
42
42
  Set ssg.failOnIncludeError to false to build anyway.`);if(r.failOnServerScriptError&&j.serverScriptFailures.length>0)throw Error(`${j.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
43
43
  ${j.serverScriptFailures.join(`
44
44
  `)}
45
- Set ssg.failOnServerScriptError to false to build anyway.`);if(r.cache)O.set(g,b.filePath,j.dependencies,B)}let N;if(r.trailingSlash)N=p.join(r.outputDir,g,"index.html");else N=g==="/"?p.join(r.outputDir,"index.html"):p.join(r.outputDir,`${g}.html`);if(r.chunkIslands){let{html:j,chunks:z}=$c(B,{integrity:r.integrityIslands,minify:r.minify});if(z.length>0){let I=p.join(r.outputDir,"_stx","islands");await v.promises.mkdir(I,{recursive:!0});for(let C of z){let H=p.join(I,`${C.hash}.js`);if(!await Bun.file(H).exists())await Bun.write(H,C.code);if(!w.has(C.hash)){w.add(C.hash);let A=Buffer.byteLength(C.code,"utf8");P+=A,k[C.hash]={bytes:A,file:`/_stx/islands/${C.hash}.js`}}}if(x[g]=z.map((C)=>C.hash),B=j,r.prefetchIslands)B=Rc(B)}}if(await v.promises.mkdir(p.dirname(N),{recursive:!0}),await Bun.write(N,B),!Ot(g,B,T,r.sitemapExclude))U.push({loc:g,lastmod:new Date().toISOString().split("T")[0],priority:g==="/"?1:0.8});let ot={route:g,outputPath:N,size:Buffer.byteLength(B,"utf8"),cached:at};if(rt!==!1)ot.revalidateAt=Date.now()+rt*1000;u.pages.push(ot),u.successCount++,await r.hooks.onPageEnd?.(g,B)}catch(G){u.failedCount++,u.errors.push({route:g,error:G}),await r.hooks.onError?.(G,g),console.error(`Error generating ${g}:`,G)}}));let tt=bn();if(tt.length>0){let d=tt.map((h)=>`${h.filePath}: ${h.message}`).join(`
45
+ Set ssg.failOnServerScriptError to false to build anyway.`);if(r.cache)O.set(g,b.filePath,j.dependencies,B)}let N;if(r.trailingSlash)N=p.join(r.outputDir,g,"index.html");else N=g==="/"?p.join(r.outputDir,"index.html"):p.join(r.outputDir,`${g}.html`);if(r.chunkIslands){let{html:j,chunks:z}=Ac(B,{integrity:r.integrityIslands,minify:r.minify});if(z.length>0){let I=p.join(r.outputDir,"_stx","islands");await v.promises.mkdir(I,{recursive:!0});for(let C of z){let H=p.join(I,`${C.hash}.js`);if(!await Bun.file(H).exists())await Bun.write(H,C.code);if(!w.has(C.hash)){w.add(C.hash);let A=Buffer.byteLength(C.code,"utf8");P+=A,k[C.hash]={bytes:A,file:`/_stx/islands/${C.hash}.js`}}}if(x[g]=z.map((C)=>C.hash),B=j,r.prefetchIslands)B=Pc(B)}}if(await v.promises.mkdir(p.dirname(N),{recursive:!0}),await Bun.write(N,B),!Ot(g,B,T,r.sitemapExclude))U.push({loc:g,lastmod:new Date().toISOString().split("T")[0],priority:g==="/"?1:0.8});let ot={route:g,outputPath:N,size:Buffer.byteLength(B,"utf8"),cached:at};if(rt!==!1)ot.revalidateAt=Date.now()+rt*1000;u.pages.push(ot),u.successCount++,await r.hooks.onPageEnd?.(g,B)}catch(G){u.failedCount++,u.errors.push({route:g,error:G}),await r.hooks.onError?.(G,g),console.error(`Error generating ${g}:`,G)}}));let tt=bn();if(tt.length>0){let d=tt.map((h)=>`${h.filePath}: ${h.message}`).join(`
46
46
  `);throw Error(`Client script bundling failed:
47
47
  ${d}`)}if(r.cache)await O.save();if(r.generate404){let d=p.join(r.pagesDir,"404.stx");if(await Bun.file(d).exists()){let h=new Set,b={...s,minifyClient:!0,debug:!1,cache:!1},g=await i(await Bun.file(d).text(),{},d,b,h);await Bun.write(p.join(r.outputDir,"404.html"),g)}else await Bun.write(p.join(r.outputDir,"404.html"),`<!DOCTYPE html>
48
48
  <html lang="en">
@@ -65,7 +65,7 @@ ${d}`)}if(r.cache)await O.save();if(r.generate404){let d=p.join(r.pagesDir,"404.
65
65
  <a href="/">Go home</a>
66
66
  </div>
67
67
  </body>
68
- </html>`)}for(let d of[500]){let h=p.join(r.pagesDir,`${d}.stx`);if(await Bun.file(h).exists()){let b=new Set,g={...s,minifyClient:!0,debug:!1,cache:!1},M=await i(await Bun.file(h).text(),{},h,g,b);await Bun.write(p.join(r.outputDir,`${d}.html`),M)}}let K=p.join(r.pagesDir,"error.stx");if(await Bun.file(K).exists()){let d=new Set,h={...s,minifyClient:!0,debug:!1,cache:!1},b=await i(await Bun.file(K).text(),{},K,h,d);await Bun.write(p.join(r.outputDir,"error.html"),b)}if(r.sitemap&&U.length>0){let d=At(U,r.domain),h=p.join(r.outputDir,"sitemap.xml");await Bun.write(h,d),u.sitemapPath=h,console.log(`Generated sitemap.xml with ${U.length} URLs`)}if(r.robots!==!1){let d=typeof r.robots==="object"?r.robots:{},h=[...r.sitemapExclude.filter((g)=>typeof g==="string"),...d.disallow||[]],b=Ks({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...h.length>0?{disallow:h}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",r.domain).href}:{}});await Bun.write(p.join(r.outputDir,"robots.txt"),b),console.log("Generated robots.txt")}if(r.rss){let d=typeof r.rss==="object"?r.rss:{title:"Site Feed",description:"Latest updates",link:r.domain},h=[];if(d.getItems)h=await d.getItems();let b=Lt(d,h),g=p.join(r.outputDir,"rss.xml");await Bun.write(g,b),u.rssPath=g,console.log(`Generated rss.xml with ${h.length} items`)}let W=Ac(r.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let q=Pc(r.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} repeated asset(s) from ${q.pages} page(s) (${(q.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(r.publicDir&&v.existsSync(r.publicDir))await Y(r.publicDir,r.outputDir),console.log(`Copied public assets from ${r.publicDir}`);let et=wr();if(et)await Y(et,p.join(r.outputDir,br)),console.log(`Copied assets from ${hn}`)}catch(E){throw await r.hooks.onError?.(E),E}if(u.buildTime=Date.now()-n,w.size>0){u.islandChunks={count:w.size,totalBytes:P};let E={generatedChunks:w.size,totalBytes:P,chunks:k,pages:x};await Bun.write(p.join(r.outputDir,"_stx","islands-manifest.json"),JSON.stringify(E,null,2))}await r.hooks.onBuildEnd?.(u);let D=u.islandChunks?`
68
+ </html>`)}for(let d of[500]){let h=p.join(r.pagesDir,`${d}.stx`);if(await Bun.file(h).exists()){let b=new Set,g={...s,minifyClient:!0,debug:!1,cache:!1},M=await i(await Bun.file(h).text(),{},h,g,b);await Bun.write(p.join(r.outputDir,`${d}.html`),M)}}let K=p.join(r.pagesDir,"error.stx");if(await Bun.file(K).exists()){let d=new Set,h={...s,minifyClient:!0,debug:!1,cache:!1},b=await i(await Bun.file(K).text(),{},K,h,d);await Bun.write(p.join(r.outputDir,"error.html"),b)}if(r.sitemap&&U.length>0){let d=At(U,r.domain),h=p.join(r.outputDir,"sitemap.xml");await Bun.write(h,d),u.sitemapPath=h,console.log(`Generated sitemap.xml with ${U.length} URLs`)}if(r.robots!==!1){let d=typeof r.robots==="object"?r.robots:{},h=[...r.sitemapExclude.filter((g)=>typeof g==="string"),...d.disallow||[]],b=Xs({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...h.length>0?{disallow:h}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",r.domain).href}:{}});await Bun.write(p.join(r.outputDir,"robots.txt"),b),console.log("Generated robots.txt")}if(r.rss){let d=typeof r.rss==="object"?r.rss:{title:"Site Feed",description:"Latest updates",link:r.domain},h=[];if(d.getItems)h=await d.getItems();let b=Lt(d,h),g=p.join(r.outputDir,"rss.xml");await Bun.write(g,b),u.rssPath=g,console.log(`Generated rss.xml with ${h.length} items`)}let W=Ic(r.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let q=Oc(r.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} repeated asset(s) from ${q.pages} page(s) (${(q.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(r.publicDir&&v.existsSync(r.publicDir))await Y(r.publicDir,r.outputDir),console.log(`Copied public assets from ${r.publicDir}`);let et=wr();if(et)await Y(et,p.join(r.outputDir,br)),console.log(`Copied assets from ${hn}`)}catch(E){throw await r.hooks.onError?.(E),E}if(u.buildTime=Date.now()-n,w.size>0){u.islandChunks={count:w.size,totalBytes:P};let E={generatedChunks:w.size,totalBytes:P,chunks:k,pages:x};await Bun.write(p.join(r.outputDir,"_stx","islands-manifest.json"),JSON.stringify(E,null,2))}await r.hooks.onBuildEnd?.(u);let D=u.islandChunks?`
69
69
  Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
70
70
  Build complete!
71
71
  Total: ${u.totalPages} pages
@@ -73,7 +73,7 @@ Build complete!
73
73
  Cached: ${u.cachedCount}
74
74
  Failed: ${u.failedCount}
75
75
  Time: ${u.buildTime}ms${D}
76
- `),u}async function Y(e,n){await v.promises.mkdir(n,{recursive:!0});let s=await v.promises.readdir(e,{withFileTypes:!0});for(let o of s){let c=p.join(e,o.name),r=p.join(n,o.name);if(o.isDirectory())await v.promises.mkdir(r,{recursive:!0}),await Y(c,r);else await v.promises.copyFile(c,r)}}function _t(e={}){let n=e.cacheDir||l(process.cwd(),"ssg-cache"),s=new pt(n),o=e.revalidate||3600;return{async get(c){let r=await s.get(c);if(!r)return null;if(Date.now()>r.revalidateAfter)this.revalidate(c).catch(console.error);return{html:r.html,headers:{"Cache-Control":`public, max-age=${o}, stale-while-revalidate=${o*2}`,ETag:r.etag,"X-ISR-Generated":new Date(r.generatedAt).toISOString(),...r.headers}}},async revalidate(c){let u=se(".",{pagesDir:e.pagesDir||"pages"}).find((D)=>c.match(D.regex)!==null);if(!u){console.warn(`Route not found for revalidation: ${c}`);return}let w=c.match(u.regex),P={};if(w)u.params.forEach((D,E)=>{P[D]=w[E+1]});let k=await a(),{html:x}=await ht(u,P,{},e,k);await s.set(c,{html:x,generatedAt:Date.now(),revalidateAfter:Date.now()+o*1000,etag:Tt(x)}),console.log(`Revalidated: ${c}`)},async invalidate(c){if(typeof c==="string")await s.invalidate(c);else await s.invalidatePattern(c)}}}function Gt(){return{name:"markdown",extensions:[".md",".mdx"],async load(e){let n=await Bun.file(e).text(),s=n.match(/^---\n([\s\S]*?)\n---/),o={},c=n;if(s){let k=s[1];c=n.slice(s[0].length).trim();for(let x of k.split(`
76
+ `),u}async function Y(e,n){await v.promises.mkdir(n,{recursive:!0});let s=await v.promises.readdir(e,{withFileTypes:!0});for(let o of s){let c=p.join(e,o.name),r=p.join(n,o.name);if(o.isDirectory())await v.promises.mkdir(r,{recursive:!0}),await Y(c,r);else await v.promises.copyFile(c,r)}}function _t(e={}){let n=e.cacheDir||l(process.cwd(),"ssg-cache"),s=new pt(n),o=e.revalidate||3600;return{async get(c){let r=await s.get(c);if(!r)return null;if(Date.now()>r.revalidateAfter)this.revalidate(c).catch(console.error);return{html:r.html,headers:{"Cache-Control":`public, max-age=${o}, stale-while-revalidate=${o*2}`,ETag:r.etag,"X-ISR-Generated":new Date(r.generatedAt).toISOString(),...r.headers}}},async revalidate(c){let u=oe(".",{pagesDir:e.pagesDir||"pages"}).find((D)=>c.match(D.regex)!==null);if(!u){console.warn(`Route not found for revalidation: ${c}`);return}let w=c.match(u.regex),P={};if(w)u.params.forEach((D,E)=>{P[D]=w[E+1]});let k=await a(),{html:x}=await ht(u,P,{},e,k);await s.set(c,{html:x,generatedAt:Date.now(),revalidateAfter:Date.now()+o*1000,etag:Tt(x)}),console.log(`Revalidated: ${c}`)},async invalidate(c){if(typeof c==="string")await s.invalidate(c);else await s.invalidatePattern(c)}}}function Gt(){return{name:"markdown",extensions:[".md",".mdx"],async load(e){let n=await Bun.file(e).text(),s=n.match(/^---\n([\s\S]*?)\n---/),o={},c=n;if(s){let k=s[1];c=n.slice(s[0].length).trim();for(let x of k.split(`
77
77
  `)){let D=x.indexOf(":");if(D>0){let E=x.slice(0,D).trim(),m=x.slice(D+1).trim();if(m==="true")m=!0;else if(m==="false")m=!1;else if(/^\d+$/.test(m))m=parseInt(m,10);else if(/^\d+\.\d+$/.test(m))m=parseFloat(m);else if(m.startsWith("[")&&m.endsWith("]"))m=m.slice(1,-1).split(",").map((R)=>R.trim().replace(/^['"]|['"]$/g,""));o[E]=m}}}let r=c.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*)\*\*/gim,"<strong>$1</strong>").replace(/\*(.*)\*/gim,"<em>$1</em>").replace(/`([^`]+)`/gim,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/gim,'<a href="$2">$1</a>').replace(/\n/gim,"<br>"),u=[],w=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,P;while((P=w.exec(r))!==null){let k=parseInt(P[1],10),x=P[2],D=x.toLowerCase().replace(/[^a-z0-9]+/g,"-");u.push({id:D,text:x,level:k})}return{content:r,data:o,toc:u}}}}function Nt(e){return It(e)}function Wt(e,n){return`<!DOCTYPE html>
78
78
  <html>
79
79
  <head>
@@ -86,4 +86,4 @@ Build complete!
86
86
  <p>Redirecting to <a href="${e}">${e}</a>...</p>
87
87
  <script>window.location.replace('${e}')</script>
88
88
  </body>
89
- </html>`}function qt(e,n){if(e==="/"||e==="")return p.join(n.outputDir,"index.html");let s=e.replace(/^\/|\/$/g,"");if(n.trailingSlash)return p.join(n.outputDir,s,"index.html");return p.join(n.outputDir,`${s}.html`)}var De={generateStaticSite:Mt,createISRHandler:_t,defineStaticPaths:J,createMarkdownLoader:Gt};export{_t as createISRHandler,Gt as createMarkdownLoader,Et as declaresPageAction,De as default,J as defineStaticPaths,Mt as generateStaticSite,Ot as isExcludedFromSitemap};
89
+ </html>`}function qt(e,n){if(e==="/"||e==="")return p.join(n.outputDir,"index.html");let s=e.replace(/^\/|\/$/g,"");if(n.trailingSlash)return p.join(n.outputDir,s,"index.html");return p.join(n.outputDir,`${s}.html`)}var Pe={generateStaticSite:Mt,createISRHandler:_t,defineStaticPaths:J,createMarkdownLoader:Gt};export{_t as createISRHandler,Gt as createMarkdownLoader,Et as declaresPageAction,Pe as default,J as defineStaticPaths,Mt as generateStaticSite,Ot as isExcludedFromSitemap};
package/dist/utils.js CHANGED
@@ -32,6 +32,7 @@ import { validateClientScript } from "./script-validation.js";
32
32
  import { escapeScriptBody } from "./script-emit.js";
33
33
  import { literalValue, parsePropsDeclaration } from "./props-declaration.js";
34
34
  import { scriptAttributes, scriptContainsCode } from "./script-attributes.js";
35
+ import { normalizeVueSetupScripts } from "./vue-template.js";
35
36
  function renderExternalComponentScript(script, context, filePath) {
36
37
  const opening = /^<script\b([^>]*)>/i.exec(script);
37
38
  if (!opening || !/(?:^|\s)src\s*=/i.test(opening[1] ?? ""))
@@ -802,7 +803,7 @@ export async function renderComponentWithSlot(componentPath, props, slotContent,
802
803
  else
803
804
  try {
804
805
  const stamp = fileStamp(componentFilePath);
805
- componentContent = await Bun.file(componentFilePath).text();
806
+ componentContent = normalizeVueSetupScripts(await Bun.file(componentFilePath).text(), componentFilePath);
806
807
  componentsCache.set(componentFilePath, componentContent);
807
808
  componentStamps.set(componentFilePath, stamp);
808
809
  } catch (error) {
@@ -1,3 +1,5 @@
1
+ /** Resolve supported named Vue imports in .stx setup blocks through the STX client runtime. */
2
+ export declare function normalizeVueSetupScripts(template: string, filePath: string): string;
1
3
  /**
2
4
  * Check if template contains any Vue-style directives.
3
5
  * Quick check to avoid unnecessary processing.
@@ -1,3 +1,49 @@
1
+ import { scanHtmlScriptElements, scanHtmlTags } from "./html-masking.js";
2
+ import { isRuntimeOwnedColonAttr } from "./runtime-globals.js";
3
+ import { scriptAttributes, scriptContainsCode } from "./script-attributes.js";
4
+ import { stripCommentsAndLiterals } from "./strip-literals.js";
5
+ const vueSetupApis = new Set([
6
+ "computed",
7
+ "inject",
8
+ "nextTick",
9
+ "onBeforeMount",
10
+ "onBeforeUnmount",
11
+ "onMounted",
12
+ "onUnmounted",
13
+ "provide",
14
+ "reactive",
15
+ "ref",
16
+ "useSlots",
17
+ "watch",
18
+ "watchEffect"
19
+ ]);
20
+ export function normalizeVueSetupScripts(template, filePath) {
21
+ if (!filePath.endsWith(".stx") || !template.includes("vue") || !template.includes("setup"))
22
+ return template;
23
+ const declaration = /^([ \t]*import\s*\{)([^}]*)(\}\s*from\s*)(['"])vue\4/gm, specifier = /^([A-Za-z_$][\w$]*)(?:\s+as\s+[A-Za-z_$][\w$]*)?$/, parts = [];
24
+ let cursor = 0;
25
+ for (const block of scanHtmlScriptElements(template)) {
26
+ const attrs = scriptAttributes(block.attrs);
27
+ if (!attrs.has("setup") || attrs.has("server") || attrs.has("src") || !scriptContainsCode(attrs))
28
+ continue;
29
+ const source = template.slice(block.bodyStart, block.bodyEnd);
30
+ if (!source.includes("vue"))
31
+ continue;
32
+ const tokens = stripCommentsAndLiterals(source), result = source.replace(declaration, (statement, start, imports, from, quote, offset) => {
33
+ if (tokens.slice(offset, offset + start.length).trimStart().slice(0, 6) !== "import")
34
+ return statement;
35
+ return imports.split(",").filter((name) => name.trim()).every((name) => {
36
+ const exported = specifier.exec(name.trim())?.[1];
37
+ return exported !== void 0 && vueSetupApis.has(exported);
38
+ }) ? start + imports + from + quote + "stx" + quote : statement;
39
+ });
40
+ if (result === source)
41
+ continue;
42
+ parts.push(template.slice(cursor, block.bodyStart), result);
43
+ cursor = block.bodyEnd;
44
+ }
45
+ return parts.length ? parts.join("") + template.slice(cursor) : template;
46
+ }
1
47
  const VOID_ELEMENTS = new Set([
2
48
  "area",
3
49
  "base",
@@ -201,7 +247,31 @@ function replaceTagAttrs(html, parsed, newAttrs) {
201
247
  return html.slice(0, parsed.start) + newTag + html.slice(parsed.end);
202
248
  }
203
249
  export function hasVueTemplateSyntax(template) {
204
- return /\bv-(?:if|else-if|else|for|show|model|html|text|pre|once|cloak|memo|bind|on|slot)\b/.test(template);
250
+ return /\bv-(?:if|else-if|else|for|show|model|html|text|pre|once|cloak|memo|bind|on|slot)\b/.test(template) || sameNameBinding.test(template);
251
+ }
252
+ const sameNameBinding = /\s(?:v-bind)?:[a-zA-Z_][\w-]*(?=[\s/>])(?!\s*=)/;
253
+ function expandSameNameBindings(html) {
254
+ if (!sameNameBinding.test(html))
255
+ return html;
256
+ const attribute = /([^\s="'<>]+)(\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>]+))?/g, bindingName = /^(?:v-bind)?:([a-zA-Z_][\w-]*)$/, parts = [];
257
+ let cursor = 0;
258
+ for (const tag of scanHtmlTags(html)) {
259
+ if (tag.closing || !tag.attributes.includes(":"))
260
+ continue;
261
+ const attrs = tag.attributes.replace(attribute, (original, name, value) => {
262
+ const binding = value === void 0 ? bindingName.exec(name)?.[1] : void 0;
263
+ if (!binding || isRuntimeOwnedColonAttr(binding))
264
+ return original;
265
+ const expression = binding.replace(/-([a-zA-Z0-9])/g, (_, letter) => letter.toUpperCase());
266
+ return `:${binding}="${expression}"`;
267
+ });
268
+ if (attrs === tag.attributes)
269
+ continue;
270
+ const start = tag.start + tag.name.length + 1;
271
+ parts.push(html.slice(cursor, start), attrs);
272
+ cursor = start + tag.attributes.length;
273
+ }
274
+ return parts.length ? parts.join("") + html.slice(cursor) : html;
205
275
  }
206
276
  function transformVFor(html) {
207
277
  let result = html, searchFrom = 0;
@@ -437,7 +507,7 @@ function transformVSlot(html) {
437
507
  export function processVueTemplate(template) {
438
508
  if (!hasVueTemplateSyntax(template))
439
509
  return template;
440
- let result = template;
510
+ let result = expandSameNameBindings(template);
441
511
  result = transformVFor(result);
442
512
  result = transformVIfChain(result);
443
513
  result = transformVOnce(result);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.919",
4
+ "version": "0.2.921",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -127,14 +127,14 @@
127
127
  },
128
128
  "dependencies": {
129
129
  "@stacksjs/clapp": "^0.2.17",
130
- "@stacksjs/desktop": "0.2.919",
131
- "@stacksjs/sanitizer": "0.2.919",
132
- "@stacksjs/ts-css": "^0.3.21",
130
+ "@stacksjs/desktop": "0.2.921",
131
+ "@stacksjs/sanitizer": "0.2.921",
132
+ "@stacksjs/ts-css": "^0.3.27",
133
133
  "@stacksjs/ts-i18n": "^0.1.11",
134
134
  "@types/dom-speech-recognition": "^0.0.12",
135
- "bun-plugin-stx": "0.2.919",
135
+ "bun-plugin-stx": "0.2.921",
136
136
  "bunfig": "^0.15.21",
137
- "stx-router": "0.2.919",
137
+ "stx-router": "0.2.921",
138
138
  "ts-broadcasting": "^0.0.13",
139
139
  "ts-images": "^0.2.22",
140
140
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{li,ui,di,yy,Ps,by}from"./chunk-d69k67bn.js";export{Ps as clearImageDeliveryCatalog,yy as deliveredImage,di as efficientDeliverySources,li as getImageDelivery,ui as isTransparentImage,by as prepareImageDelivery};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Nm}from"./chunk-nkbnsbb0.js";import"./chunk-2m4ydym0.js";import"./chunk-yvaqgdv1.js";import"./chunk-xpsg91dh.js";import"./chunk-xakqpa4z.js";import"./chunk-v1x96kjr.js";import"./chunk-3tcy9r6r.js";import"./chunk-50zzar2c.js";import"./chunk-mr9pp5cf.js";import"./chunk-txk2z7v0.js";import"./chunk-ktv65e3n.js";import"./chunk-5fdc8pej.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{Nm as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{b,Wi,Cl,El,Kg,Xg,Gg,Jg,Yg,fo,Zg,Je,ie,Ye,Qg,Wr,em,Rl,Al,Xi,Ze,s,Mn,Pl,w,Ce,Ly}from"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{Al as SIGNAL_COMPOSABLE_CALL,Ce as clearComponentCache,Xi as componentClientSignalNames,Wi as convertToCommonJS,w as createDetailedErrorMessage,Yg as extractDirectiveNames,Cl as extractScriptFromTemplate,b as extractVariables,s as fileExists,Ly as getComponentCacheStats,Xg as getPositionInfo,ie as getSharedTranspiler,Pl as getSourceLineInfo,Jg as hasDirectives,El as hasVariables,em as isHydrateTrigger,Zg as isJavaScriptScript,Ze as renderComponentWithSlot,Mn as resolveTemplatePath,Qg as scopeOnRootElement,fo as scopeSequenceKey,Je as shouldTranspileTypeScript,Rl as slotContentHasExpressions,Ye as transpileTypeScript,Wr as userComponentFileExists,Gg as validateDirective,Kg as validateTemplate};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Co,la,lm,um,dm}from"./chunk-40j2pmnb.js";import"./chunk-0xyfs691.js";export{um as generateManifestLink,Co as generatePwaTags,lm as generateSwRegistrationScript,dm as generateThemeColorMeta,la as injectPwaTags};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Im}from"./chunk-rk16391e.js";import"./chunk-sbr3wg75.js";import"./chunk-m390z8w8.js";import"./chunk-1a2c4pv8.js";import"./chunk-zaj3nnvv.js";import"./chunk-d69k67bn.js";import"./chunk-xakqpa4z.js";import"./chunk-whnzf9hn.js";import"./chunk-fjpt8arw.js";import"./chunk-3aayrnbh.js";import"./chunk-v1x96kjr.js";import"./chunk-p0xqm2ne.js";import"./chunk-fwxgzktt.js";import"./chunk-2mv29s6w.js";import"./chunk-3tcy9r6r.js";import"./chunk-50zzar2c.js";import"./chunk-mr9pp5cf.js";import"./chunk-txk2z7v0.js";import"./chunk-ktv65e3n.js";import"./chunk-5fdc8pej.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{Im as startInteractive};
@@ -1,33 +0,0 @@
1
- // @bun
2
- import{en,U,g,nt,Le,Un}from"./chunk-vf7tpgqz.js";import{B,Kt,Xt,Vr,b,Nl,Gi,Z,M}from"./chunk-vb609vbj.js";import{yn}from"./chunk-yvaqgdv1.js";import{r}from"./chunk-xakqpa4z.js";import{re}from"./chunk-gmn9ba8f.js";import{on,O,c}from"./chunk-p4twxjfs.js";var G=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function W(n){let s=[],t=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,e;while((e=t.exec(n))!==null)s.push({start:e.index,end:e.index+e[0].length});return s}function F(n,s){return s.some((t)=>n>=t.start&&n<t.end)}function Y(n){let s=(n||"").trim();if(!s)return null;if(/[\s>+~,:]/.test(s))return null;let t={},e=s,i=e.match(/^[a-z][\w-]*/i);if(i)t.tag=i[0].toLowerCase(),e=e.slice(i[0].length);while(e.length>0){let o=e.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(o){if(t.attr=o[1],o[3]!==void 0&&o[3]!=="")t.attrValue=o[3];e=e.slice(o[0].length);continue}let l=e.match(/^#([\w-]+)/);if(l){t.id=l[1],e=e.slice(l[0].length);continue}let a=e.match(/^\.([\w-]+)/);if(a){t.className=a[1],e=e.slice(a[0].length);continue}return null}if(!t.tag&&!t.attr&&!t.id&&!t.className)return null;return t}function K(n,s){if(s.attr){if(!(s.attrValue===void 0?new RegExp(`\\b${s.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${s.attr}\\s*=\\s*(["'])\\s*${s.attrValue}\\s*\\1`,"i")).test(n))return!1}if(s.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${s.id}\\s*\\1`,"i").test(n))return!1}if(s.className){let t=n.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!t)return!1;if(!t[2].split(/\s+/).includes(s.className))return!1}return!0}function T(n,s="main"){let t=Y(s);if(!t)return null;let e=/<([a-z][\w-]*)\b([^>]*)>/gi,i=W(n),o;while((o=e.exec(n))!==null){if(F(o.index,i))continue;let l=o[1].toLowerCase(),a=o[2]||"";if(a.trimEnd().endsWith("/")||G.has(l))continue;if(t.tag&&t.tag!==l)continue;if(!K(a,t))continue;let u=o[0],p=o.index+u.length,f=new RegExp(`<(/?)${l}\\b([^>]*)>`,"gi");f.lastIndex=p;let m=1,x;while((x=f.exec(n))!==null){if(F(x.index,i))continue;let S=x[1]==="/";if(!S&&(x[2]||"").trimEnd().endsWith("/"))continue;if(m+=S?-1:1,m===0)return{openTag:u,openIndex:o.index,start:p,end:x.index,tagName:l}}return null}return null}function A(n){return n.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function L(n){let s=/<head\b[^>]*>([\s\S]*?)<\/head\s*>/i.exec(n)?.[1]??"",t=/<(meta|link)\b(?:[^>"']|"[^"]*"|'[^']*')*>|<title\b[^>]*>[\s\S]*?<\/title\s*>/giy;return g(s,(e,i)=>(t.lastIndex=i,t.exec(e)?t.lastIndex:-1)).map(({token:e})=>e)}function Yn(n){let s=[];for(let t of L(n)){if(/^<title\b/i.test(t)){s.push(`<title>${A(t.replace(/^<title\b[^>]*>|<\/title\s*>$/gi,""))}</title>`);continue}let e=on(t);if(/^<meta\b/i.test(t)){let i=e.property?"property":"name",o=nt(e[i]??"").toLowerCase();if(o==="description"||/^(?:og|twitter):[\w:]+$/.test(o))s.push(`<meta ${i}="${r(o)}" content="${A(e.content??"")}">`)}else{let i=nt(e.rel??"").toLowerCase();if(i==="canonical"||i==="alternate"&&e.hreflang)s.push(`<link rel="${i}" href="${A(e.href??"")}"${i==="alternate"?` hreflang="${A(e.hreflang)}"`:""}>`)}}return`<template data-stx-page-head="1">${s.join("")}</template>
3
- `}var J=["media","crossorigin","integrity"];function Zn(n){let s=[];for(let t of L(n)){if(!/^<link\b/i.test(t))continue;let e=on(t);if(nt(e.rel??"").trim().toLowerCase()!=="stylesheet")continue;if(!e.href||"data-css"in e||"disabled"in e)continue;let i=J.filter((o)=>(o in e)).map((o)=>` ${o}="${A(e[o])}"`).join("");s.push(`<link rel="stylesheet" href="${A(e.href)}"${i}>`)}return s.length?`<template data-stx-page-css="1">${s.join("")}</template>
4
- `:""}import P from"path";var X="stx-page-head:",Q=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,_={dev:null,prod:null};function tt(){let n=re()?"dev":"prod",s=_[n];if(s!==null)return s;try{let t=import.meta.require("./chunk-g1v12bjm.js"),e=n==="dev"&&typeof t.getRouterScriptDev==="function"?t.getRouterScriptDev:t.getRouterScript;_[n]=`<script>${e()}</script>`}catch{_[n]=""}return _[n]}async function ja(n,s){if(s===!1)return null;if(s&&typeof s==="string"){let e=P.resolve(n,s);if(await Bun.file(e).exists())return e;return null}let t=P.join(n,"app.stx");if(await Bun.file(t).exists())return t;return null}async function zo(n,s){try{let t=await Bun.file(n).text(),e=t,i=B(t);if(i)e=i.content.trim();let o=yn(t),l=[...o.client.map((d)=>d.fullTag),...o.signals.map((d)=>d.fullTag)],a=[],u=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,p;while((p=u.exec(t))!==null)a.push(p[0]);let f=e;for(let d of o.server)f=f.replace(d.fullTag,"");for(let d of o.client)f=f.replace(d.fullTag,"");f=f.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let m="<!--__STX_PAGE_SLOT__-->";if(f=f.replace(/<slot\s*\/>/gi,m).replace(/<slot\s*>\s*<\/slot>/gi,m),!f.includes(m))return console.warn(`[stx] Shell ${n} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:x,extractVariables:S,defaultConfig:w,loadStxConfig:R}=await import("./chunk-vtcyber4.js"),E=await R(),h={__filename:n,__dirname:P.dirname(n)};for(let d of l){let k=d.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(k&&!d.includes("client")&&!d.includes('type="module"'))await S(k[1],h,n)}let y=await x(f,h,n,{...w,...E,...s},new Set),C=y.indexOf(m);if(C===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:y.substring(0,C),afterSlot:y.substring(C+m.length),filePath:n,shellScripts:l,shellStyles:a}}catch(t){return console.error(`[stx] Error processing shell ${n}:`,t),null}}function gs(n,s,t){let e,i="",o=s.match(Q);if(o){s=s.replace(o[0],"");try{let f=Buffer.from(o[1],"base64").toString("utf8"),m=f.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(m)e=m[1].trim();i=f.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let l=t||e||"stx App",a=tt(),u="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
5
- <html lang="en">
6
- <head>
7
- <meta charset="UTF-8">
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
- <title>${l}</title>
10
- ${i?` ${i}
11
- `:""} ${n.shellStyles.join(`
12
- `)}
13
- </head>
14
- <body>
15
- ${n.beforeSlot}
16
- <div data-stx-content>${s}</div>
17
- ${n.afterSlot}
18
- ${n.shellScripts.filter((f)=>!f.includes("server")).join(`
19
- `)}
20
- ${u}
21
- ${a}
22
- </body>
23
- </html>`}function it(n,s={}){let t=n.trim();if(!Un(t))return n;let e=[],i=t.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(i){let u=i[1],p=/<style\b[^>]*>[\s\S]*?<\/style>/gi,f;while((f=p.exec(u))!==null)e.push(f[0]);let m=u.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);if(m)e.push(m[0]);let x=u.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);if(x)e.push(x[0])}if(s.preserveHead&&i){let u=[],p=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,f;while((f=p.exec(i[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(f[0]))continue;u.push(f[0])}if(u.length>0)e.unshift(`<!--${X}${Buffer.from(u.join(`
24
- `),"utf8").toString("base64")}-->`)}let o=t.match(/<body\b[^>]*>/i),l=c(t);if(o&&l!==-1){let u=o.index+o[0].length,p=t.slice(u,l).trim();if(e.length>0)return e.join(`
25
- `)+`
26
- `+p;return p}let a=t;if(a=a.replace(/<!DOCTYPE\b[^>]*>/i,""),a=a.replace(/<html\b[^>]*>/i,""),a=a.replace(/<\/html\s*>/i,""),i)a=a.replace(/<head\b[^>]*>[\s\S]*?<\/head>/i,e.join(`
27
- `));return a=a.replace(/<body\b[^>]*>/i,""),a=a.replace(/<\/body\s*>/i,""),a.trim()}var N=/^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;function H(n,s,t,e){if(!N.test(s))return!1;let i=s.slice(0,s.indexOf(">")+1),o=/\sdata-stx-owner="([^"]+)"/i.exec(i)?.[1];if(!o)return!0;let l=`data-stx-scope="${o}"`;for(let a=n.indexOf(l);a!==-1;a=n.indexOf(l,a+l.length))if(a>=t&&a<e)return!1;return!0}function Ba(n){return Le(n)}function et(n,s){let t=[],e=new Set;for(let i of g(n,U)){if(i.start>=s.start&&i.start<s.end)continue;let o=i.token.match(/^<script\b((?:"[^"]*"|'[^']*'|[^'">])*)>/i)?.[1]??"",l=new Map;for(let p of o.matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g))l.set(p[1].toLowerCase(),p[2]??p[3]??p[4]??"");let a=l.get("src")?.trim(),u=l.get("type")?.trim().toLowerCase();if(!a||l.has("server")||u&&!["module","text/javascript","application/javascript"].includes(u))continue;if(l.has(en)||l.has("data-stx-runtime")||l.has("data-stx-router")||/^\/_stx\/(?:runtime|router)(?:\.[a-f0-9]{16})?\.js(?:[?#]|$)/i.test(a))continue;if(H(n,i.token,s.start,s.end)||e.has(i.token))continue;e.add(i.token),t.push(i.token)}return t}function $t(n,s="main"){return!!T(n.trim(),s)}function Fe(n,s="main",t=!1){let e=n.trim(),i=[],o=[],l=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(l){let y=l[1],C=/<style\b[^>]*>[\s\S]*?<\/style>/gi,d;while((d=C.exec(y))!==null)i.push(d[0]);let k=/<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;while((d=k.exec(y))!==null){if(N.test(d[0])||d[0].includes("__stx_early_mounts")||/^<script\b[^>]*\bdata-stx-before-runtime(?=[\s=>])/i.test(d[0])||/^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(d[0]))continue;o.push(d[0])}}let a=T(e,s);if(!a)return(t?Yn(n)+Zn(n):"")+it(n);let u=et(e,a),p=new Set(u),{tagName:f,start:m,end:x}=a,S=e.slice(m,x).trim(),w=[],R=e.match(/<body\b[^>]*>/i),E=c(e);if(R&&R.index!==void 0&&E!==-1){let C=[[R.index+R[0].length,a.openIndex],[x+`</${f}>`.length,E]],d=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[k,D]of C){if(k>=D)continue;let z=e.slice(k,D),v;d.lastIndex=0;while((v=d.exec(z))!==null){if(H(e,v[0],m,x))continue;w.push(v[0])}}}let h=[];if(t)h.push(Yn(n)+Zn(n));if(i.length>0)h.push(i.join(`
28
- `));if(u.length>0)h.push(u.join(`
29
- `));if(o.length>0)h.push(o.filter((y)=>!p.has(y)).join(`
30
- `));if(w.length>0)h.push(w.filter((y)=>!p.has(y)).join(`
31
- `));return h.push(S),h.join(`
32
- `)}import j from"fs";import V from"path";function Fa(n,s,t){return{version:1,buildTime:new Date().toISOString(),routes:n,assets:s,outputDir:t}}function za(n,s){let t=V.join(s,"manifest.json");j.writeFileSync(t,JSON.stringify(n,null,2))}function Ha(n){let s=V.join(n,"manifest.json");if(!j.existsSync(s))return null;try{let t=j.readFileSync(s,"utf-8"),e=JSON.parse(t);if(e.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${e.version}`),null;return e}catch(t){return console.warn("[stx] Failed to load manifest:",t),null}}function I(n,s,t={}){let e=`${encodeURIComponent(n)}=${encodeURIComponent(s)}`;if(t.maxAge!==void 0)e+=`; Max-Age=${t.maxAge}`;if(t.expires)e+=`; Expires=${t.expires.toUTCString()}`;if(t.path)e+=`; Path=${t.path}`;if(t.domain)e+=`; Domain=${t.domain}`;if(t.secure)e+="; Secure";if(t.httpOnly)e+="; HttpOnly";if(t.sameSite)e+=`; SameSite=${t.sameSite}`;return e}async function rt(n){let s=n.headers.get("content-type")||"",t={},e=(i,o)=>{let l=t[i];if(l===void 0)t[i]=o;else if(Array.isArray(l))l.push(o);else t[i]=[l,o]};if(s.includes("multipart/form-data")){let i=await n.formData();for(let[o,l]of i.entries())if(typeof l==="string")e(o,l);return t}if(s.includes("application/x-www-form-urlencoded")){for(let[i,o]of new URLSearchParams(await n.text()).entries())e(i,o);return t}return t}function Ho(n){if(!n)return!1;let s=n.toUpperCase();return s!=="GET"&&s!=="HEAD"}async function q(n,s={}){let t=s.request,e=s.method??t?.method;if(!t||!Ho(e))return{ran:!1};if(typeof n.action!=="function")return{ran:!1};let i={};try{i=await rt(t)}catch{}let o=await n.action({request:t,form:i,params:s.params??{},query:n.query??{},cookies:s.cookies??{}});if(o&&typeof o==="object"){let l=o,a=st(l.cookies),u=l.redirect;if(typeof u==="string"&&u)return{redirect:u,ran:!0,...a.length>0?{cookies:a}:{}};let{cookies:p,redirect:f,...m}=l;if(Object.assign(n,m),a.length>0)return{ran:!0,cookies:a}}return{ran:!0}}function st(n){if(!n||typeof n!=="object"||Array.isArray(n))return[];let s=[];for(let[t,e]of Object.entries(n)){if(!t)continue;if(typeof e==="string"){s.push(I(t,e));continue}if(e&&typeof e==="object"){let i=e;if(typeof i.value!=="string")continue;s.push(I(t,i.value,i))}}return s}function Ua(n,s=[],t){let e=new Headers({Location:n,"Cache-Control":"no-store"});for(let i of s)e.append("Set-Cookie",i);for(let[i,o]of Object.entries(t??{}))if(i.toLowerCase()!=="location")e.set(i,o);return new Response(null,{status:303,headers:e})}async function Qn(n,s={}){let{html:t,context:e,redirect:i,cookies:o}=await ot(n,s),l=Kt(e),a=Xt(e);if(i)return{html:t,redirect:i,cookies:o,status:l,headers:a};let{extractStreamBoundaries:u}=await import("./chunk-m1hfh2t4.js"),p=u(e),f=n.streamTemplates;if(f&&Object.keys(f).length>0){let{processDirectives:m}=await import("./chunk-yegp50jb.js"),{defaultConfig:x}=await import("./chunk-hxabvt31.js"),S=e.streamBoundaries||{},w={...x,autoShell:!1},R=Object.keys(f).map((h)=>({id:h,render:async()=>{let y=typeof S[h]==="function"?await S[h]():void 0;return m(f[h],{...e,$boundary:y},n.sourceFile,w,new Set)}})),E=new Set(R.map((h)=>h.id));p=[...(p||[]).filter((h)=>!E.has(h.id)),...R]}return{html:t,boundaries:p&&p.length>0?p:void 0,cookies:o,status:l,headers:a}}async function ot(n,s){let t={__filename:n.sourceFile,__dirname:n.sourceFile.replace(/[/\\][^/\\]+$/,""),...s};if(!n.hasServerScripts&&!Gi(n.html))return{html:n.html,context:t};for(let l of n.serverScriptContent)try{await b(l,t,n.sourceFile)}catch(a){if(s.__stx_strict_hydration)throw a;console.warn(`[stx] Server script error in ${n.sourceFile}:`,a)}let e=await q(t,{request:s.request,method:s.method,params:s.params??{},cookies:s.cookies??{}}),i=(l)=>{let a=l.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),u=Vr(t);if(!u)return a;let p=O(a);return p<0?u+a:a.slice(0,p)+u+a.slice(p)};if(e.redirect)return{html:n.html,context:t,redirect:e.redirect,cookies:e.cookies};if(!Gi(n.html))return{html:i(n.html),context:t,cookies:e.cookies};let o=new Map;for(let[l,a]of Object.entries(n.placeholders))if(a.expression)try{let u=M(a.expression,t);if(a.type==="raw")o.set(l,u!==void 0&&u!==null?String(u):"");else o.set(l,u!==void 0&&u!==null?Z(String(u)):"")}catch(u){if(s.__stx_strict_hydration)throw u;o.set(l,"")}return{html:i(Nl(n.html,o)),context:t,cookies:e.cookies}}
33
- export{Yn,Zn,ja,zo,gs,it,Ba,$t,Fe,Fa,za,Ha,Ho,Ua,Qn};
@@ -1,9 +0,0 @@
1
- // @bun
2
- import{T}from"./chunk-jjq7c8s2.js";import{ql}from"./chunk-ex6dne7e.js";var t=new T(256,{maxBytes:16777216,sizeOf:(n)=>n.source.length*2});function ee(n){let r=t.get(n);if(r)return r.asynchronous;let s=o(n);return t.set(n,{source:n,asynchronous:s}),s}function o(n){let r=new Bun.Transpiler({loader:"js"});if(ql(n))return r.transformSync(`(async function(){
3
- ${n}
4
- })()`),!0;try{return r.transformSync(`(function(){
5
- ${n}
6
- })()`),!1}catch{return r.transformSync(`(async function(){
7
- ${n}
8
- })()`),!0}}
9
- export{ee};
@@ -1,21 +0,0 @@
1
- // @bun
2
- import{St,Jl}from"./chunk-858p3hkz.js";import{L}from"./chunk-ayrd026n.js";import{U,g,Bl}from"./chunk-vf7tpgqz.js";import{J,Zs,o,me,Gt,Nn,Je,Ye}from"./chunk-vb609vbj.js";import{Rr}from"./chunk-v1x96kjr.js";import{W}from"./chunk-mztjpp7m.js";import{Tn}from"./chunk-p0xqm2ne.js";var X=`(?:"[^"]*"|'[^']*'|[^>"'])*`,H=/^<([a-zA-Z][a-zA-Z0-9-]*)\b((?:\s+[^=\s>]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)>([\s\S]*)<\/\1>$/s,Q=65536,q=4,M=new Map;function xy(){M.clear()}function K(e){let c=[];for(let t of g(e,U)){let n=t.token.match(/^<script\b([^>]*)>/i),s=t.token.match(/<\/script\s*>$/i);if(!n||!s)continue;let a=n[0].length,f=t.token.length-s[0].length;c.push(Object.freeze({fullMatch:t.token,attrs:n[1],body:t.token.slice(a,f),start:t.start,end:t.end}))}return c}function Ns(e,c={}){let t=e.length>=Q,n=t?M.get(e):void 0;if(n===void 0){if(n=K(e),t)Bl(M,q),M.set(e,n)}let s=c.skipAttrs;if(!s)return n.slice();let a=[];for(let f of n)if(s.lastIndex=0,!s.test(f.attrs))a.push(f);return a}function hi(e){let c=e.trim(),t=c.match(/^([\s\S]+?)\s+as\s+(.+)$/);if(t){let s=t[1].trim(),a=t[2].trim(),{itemVar:f,indexVar:i}=D(a);if(f)return{style:"as",iterable:s,itemVar:f,indexVar:i}}let n=c.match(/^(\([^)]+\)|\w+(?:\s*,\s*\w+)?)\s+(?:in|of)\s+([\s\S]+)$/);if(n){let s=n[1].trim(),a=n[2].trim(),{itemVar:f,indexVar:i}=D(s);if(f)return{style:"in",iterable:a,itemVar:f,indexVar:i}}return{style:"unknown",iterable:null,itemVar:null,indexVar:null}}function D(e){let c=e.trim(),t=c.match(/^(\w+)\s*=>\s*(\w+)$/);if(t)return{itemVar:t[2],indexVar:t[1]};let n=c.match(/^\(\s*(\w+)(?:\s*,\s*(\w+))?\s*\)$/);if(n)return{itemVar:n[1],indexVar:n[2]||null};let s=c.match(/^(\w+)\s*,\s*(\w+)$/);if(s)return{itemVar:s[1],indexVar:s[2]};let a=c.match(/^(\w+)$/);if(a)return{itemVar:a[1],indexVar:null};return{itemVar:null,indexVar:null}}function Ms(e,c){return Jl(e,c)}function Y(e){let c=/@(if\s*\(|endif|elseif\s*\(|else\b)/g,t=0,n;while((n=c.exec(e))!==null){let s=n[1];if(s.startsWith("if"))t++;else if(s==="endif")t--;else if(t===0)return!0}return!1}function Tr(e){let c=new Set,t=/<script\b(?![^>]*\bserver\b)(?![^>]*\bsrc\s*=)[^>]*>([\s\S]*?)<\/script>/gi,n=/\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useModel)\s*(?:<[^>]*>)?\s*\(/g,s;while((s=t.exec(e))!==null){let a=s[1],f;while((f=n.exec(a))!==null)c.add(f[1])}return c}function ee(e){if(!/[:@]for\s*=/.test(e)&&!/\bx-for\s*=/.test(e))return[];let c=new RegExp(`<([a-zA-Z][\\w-]*)\\b(${X})>`,"iy"),t=/(?:^|\s)(?::for|@for|x-for)\s*=\s*(?:"([^"]*)"|'([^']*)')/i,n=g(e,(a,f)=>{c.lastIndex=f;let i=c.exec(a);if(!i||i.index!==f||!t.test(i[2]))return-1;return c.lastIndex}),s=[];for(let a of n){c.lastIndex=0;let f=c.exec(a.token);if(!f)continue;let i=f[2].match(t),m=hi(i?.[1]??i?.[2]??""),h=[m.itemVar,m.indexVar].filter(Boolean);if(h.length===0)continue;let r=f[1],p=/\/\s*>$/.test(a.token)||O.has(r.toLowerCase())?a.end:j(e,a.start,r,a.end);if(p!==-1)s.push({start:a.start,end:p,vars:new Set(h)})}return s}var z=new Set(["true","false","null","undefined","NaN","Infinity","typeof","instanceof","in","of","new","void","delete","this","Math","JSON","Date","Number","String","Boolean","Array","Object","RegExp","Map","Set","Symbol","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","encodeURI","decodeURI","window","document","console"]);function te(e){return e.replace(/'(?:\\.|[^'\\])*'/g,"''").replace(/"(?:\\.|[^"\\])*"/g,'""').replace(/`(?:\\.|[^`\\])*`/g,"``")}function B(e,c,t,n){if(!e)return!1;let s=te(e),a=!1,f=!1,i=!1,m=/([a-zA-Z_$][\w$]*)/g,h;while((h=m.exec(s))!==null){let u=h[1];if(s.slice(0,h.index).trimEnd().endsWith("."))continue;if(z.has(u))continue;if(c.has(u)||n?.has(u))a=!0;else if(t&&u in t)f=!0}let r=/([a-zA-Z_$][\w$]*)(?:\.[a-zA-Z_$][\w$]*)*\s*\(\s*\)/g,l;while((l=r.exec(s))!==null){let u=l[1];if(s.slice(0,l.index).trimEnd().endsWith("."))continue;if(z.has(u)||t&&u in t)continue;i=!0}return(a||i)&&!f}function N(e,c,t){let n=t===void 0?` ${c}`:` ${c}="${t.replace(/"/g,"&quot;")}"`,s=e.trim(),a=s.match(H);if(a&&!ne(a[1])&&se(a[3],a[1])){let[,f,i,m]=a;return`<${f}${i}${n}>${m}</${f}>`}return`<template${n}>${s}</template>`}function ne(e){return/^[A-Z]/.test(e)}function se(e,c){let t=new RegExp(`<(/)?${c}(?=[\\s/>])`,"gi"),n=0,s;while((s=t.exec(e))!==null)if(s[1]){if(n--,n<0)return!1}else n++;return!0}function yi(e,c){let t=Tr(e);function n(s){let a=s,f=ee(s),i=(l)=>{let p=new Set;for(let u of f)if(l>u.start&&l<u.end)for(let d of u.vars)p.add(d);return p},m=/@if\s*\(/g,h,r=[];while((h=m.exec(a))!==null){let l=h.index,p=l+h[0].length,u=1,d=p;while(d<a.length&&u>0){if(a[d]==="(")u++;else if(a[d]===")")u--;d++}if(u!==0)continue;let S=a.substring(p,d-1).trim(),w=d,E=1,y=w,b=/@(if\s*\(|endif)/g;b.lastIndex=w;let x;while((x=b.exec(a))!==null)if(x[1].startsWith("if"))E++;else if(x[1]==="endif"){if(E--,E===0){y=x.index+x[0].length;break}}if(E!==0)continue;let R=a.substring(w,y-6).trim(),A;if(Y(R)){let C=Tn(a.substring(l,y));if(C.length===0)continue;let T=C[0].branches.filter((_)=>_.type!=="else"),k=i(l);if(!(T.length>0&&T.every((_)=>B(_.condition,t,c,k))))continue;A=C[0].branches.map((_)=>{let V=n(_.content);if(_.type==="elseif")return N(V,"@else-if",_.condition??"");if(_.type==="else")return N(V,"@else");return N(V,"@if",_.condition??"")}).join(`
3
- `)}else{if(!B(S,t,c,i(l)))continue;A=N(n(R),"@if",S)}r.push({start:l,end:y,replacement:A}),m.lastIndex=y}for(let l=r.length-1;l>=0;l--){let{start:p,end:u,replacement:d}=r[l];a=a.substring(0,p)+d+a.substring(u)}return a}return n(e)}function re(e){let c=e.trim();if(c==="")return;if(c==="true")return!0;if(c==="false")return!1;if(c==="null")return!1;if(c==="undefined")return!1;if(c==="NaN")return!1;if(/^-?\d+(?:\.\d+)?$/.test(c)){let s=Number(c);return s!==0&&!Number.isNaN(s)}let t=c.match(/^'((?:\\.|[^'\\])*)'$/);if(t)return t[1].length>0;let n=c.match(/^"((?:\\.|[^"\\])*)"$/);if(n)return n[1].length>0;return}var O=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Z=/<(script|style)\b/iy,ie=/<\/script/gi,oe=/<\/style/gi;function j(e,c,t,n){if(O.has(t.toLowerCase()))return n;let s=t.toLowerCase(),a=e.length,f=1,i=n;while(i<a){let m=e.indexOf("<",i);if(m===-1)return-1;if(i=m,e.startsWith("<!--",i)){let p=e.indexOf("-->",i+4);if(p===-1)return-1;i=p+3;continue}Z.lastIndex=i;let h=Z.exec(e);if(h){let p=e.indexOf(">",i);if(p===-1)return-1;if(e[p-1]==="/"){i=p+1;continue}let u=h[1].toLowerCase()==="script"?ie:oe;u.lastIndex=i;let d=u.exec(e);if(d===null)return-1;let S=e.indexOf(">",d.index);if(S===-1)return-1;i=S+1;continue}if(e[i+1]==="/"){let p=/^<\/([a-z][\w-]*)\s*>/i.exec(e.slice(i,i+64));if(!p){i++;continue}if(p[1].toLowerCase()===s){if(f--,i+=p[0].length,f===0)return i;continue}i+=p[0].length;continue}let r=/^<([a-z][\w-]*)\b/i.exec(e.slice(i,i+64));if(!r){i++;continue}let l=e.indexOf(">",i);if(l===-1)return-1;if(r[1].toLowerCase()===s){let p=e.slice(i,l+1);if(!(/\/\s*>$/.test(p)||O.has(s)))f++}i=l+1}return-1}var ce=/\s(?::else-if|x-else-if|@else-if|:else|x-else|@else)(?=[=\s/>])/;function ae(e,c){let t=c,n=e.length;for(;;){while(t<n&&e[t]!=="<")t++;if(t>=n)return!1;if(e.startsWith("<!--",t)){let f=e.indexOf("-->",t+4);if(f===-1)return!1;t=f+3;continue}break}if(e[t+1]==="/")return!1;let s=e.indexOf(">",t);if(s===-1)return!1;let a=e.slice(t,s+1);return ce.test(a)}function bi(e){if(!e.includes(":if")&&!e.includes(":show")&&!e.includes("x-if")&&!e.includes("x-show")&&!e.includes("@if=")&&!e.includes("@show="))return e;let c=[],t=/<([a-zA-Z][\w-]*)/y,n=/\s/,s=new Set([":if",":show","x-if","x-show","@if","@show"]);g(e,(r,l)=>{t.lastIndex=l;let p=t.exec(r);if(!p||/^(?:script|style)$/i.test(p[1]))return-1;let u=t.lastIndex,d;while(u<r.length){let S=u;while(u<r.length&&n.test(r[u]))u++;let w=u;if(r[w]==="/"){w++;while(w<r.length&&n.test(r[w]))w++}if(r[w]===">"){if(d)c.push({start:l,end:w+1,tag:p[1],...d});return-1}if(u===S)return-1;let E=u;while(u<r.length&&!n.test(r[u])&&r[u]!=="="&&r[u]!==">")u++;if(u===E)return-1;let y=r.slice(E,u);if(y.startsWith("@")&&y.includes("("))return-1;let b=u,x=u;while(x<r.length&&n.test(r[x]))x++;if(r[x]!=="="){u=b;continue}x++;while(x<r.length&&n.test(r[x]))x++;let R=r[x];if(R==='"'||R==="'"){let A=r.indexOf(R,x+1);if(A===-1)return-1;if(!d&&R==='"'&&s.has(y))d={attrName:y,attrStart:S,attrEnd:A+1,value:r.slice(x+1,A)};u=A+1}else{u=x;while(u<r.length&&!n.test(r[u])&&r[u]!==">")u++}}return-1});let a=[],f=-1;for(let r of c){let{start:l,end:p,tag:u,attrName:d,value:S}=r;if(l<f)continue;let w=re(S);if(w===void 0)continue;let b=/\/\s*>$/.test(e.slice(l,p))||O.has(u.toLowerCase())?p:j(e,l,u,p);if(b===-1)continue;if((d===":if"||d==="x-if"||d==="@if")&&ae(e,b))continue;if(w===!0){let R=e.slice(l,r.attrStart)+e.slice(r.attrEnd,p);a.push({start:l,end:p,replacement:R});continue}a.push({start:l,end:b,replacement:""}),f=b}if(a.length===0)return e;a.sort((r,l)=>r.start-l.start);let i=[],m=-1;for(let r of a){if(r.start<m)continue;i.push(r),m=r.end}let h=e;for(let r=i.length-1;r>=0;r--){let{start:l,end:p,replacement:u}=i[r];h=h.substring(0,l)+u+h.substring(p)}return h}var F=[":for","@for","x-for"];function Sg(e){let c=/(\s)((?::|@|x-|v-)[\w.:-]+)\s*=\s*"([^"]*\{\{[^"]*)"/g;return e.replace(c,(t,n,s,a)=>{let f=a.replace(/'((?:[^'\\]|\\.)*)'/g,(i,m)=>{if(!m.includes("{{"))return i;return`\`${m.replace(/`/g,"\\`").replace(/\$\{/g,"\\${").replace(/\{\{\s*([^}]+?)\s*\}\}/g,(r,l)=>`\${${l}}`)}\``});return`${n}${s}="${f}"`})}function Ds(e,c){if(!c||Object.keys(c).length===0)return e;if(!F.some((i)=>e.includes(`${i}=`)))return e;let t=Tr(e);if(Array.isArray(c.__stx_client_signal_names)){for(let i of c.__stx_client_signal_names)if(typeof i==="string")t.add(i)}let n=e,s=[],a=/<([a-zA-Z][\w-]*)((?:[^>"']|"[^"]*"|'[^']*')*)>/g,f;while((f=a.exec(n))!==null){let[i,m,h]=f,r=f.index,l=r+i.length,p=F.map((A)=>({attr:A,m:new RegExp(`\\s${A}="([^"]*)"`).exec(h)})).find((A)=>A.m!==null);if(!p||!p.m)continue;let u=hi(p.m[1]);if(!u.iterable||!u.itemVar)continue;let d=u.iterable.trim().split(/[.[(]/)[0].trim();if(!d||t.has(d)||!(d in c))continue;let S=j(n,r,m,l);if(S===-1)continue;let w=h.replace(new RegExp(`\\s${p.attr}="[^"]*"`),"").replace(/\s:key="[^"]*"/,"").replace(/\sx-cloak(?=\s|$)/,""),E=n.slice(l,S-`</${m}>`.length),y={...c,[u.itemVar]:void 0};if(u.indexVar)y[u.indexVar]=void 0;let b=Ds(E,y),x=u.indexVar?`${u.iterable} as ${u.indexVar} => ${u.itemVar}`:`${u.iterable} as ${u.itemVar}`,R=m.toLowerCase()==="template"?b:`<${m}${w}>${b}</${m}>`;s.push({start:r,end:S,replacement:`@foreach(${x})${R}@endforeach`}),a.lastIndex=S}for(let i=s.length-1;i>=0;i--){let{start:m,end:h,replacement:r}=s[i];n=n.slice(0,m)+r+n.slice(h)}return n}function Ls(e,c){let t=e,n=/@(for|foreach)\s*\(/g,s,a=[],f=[];while((s=n.exec(t))!==null){let i=s[1],m=s.index,h=m+s[0].length,r=1,l=h;while(l<t.length&&r>0){if(t[l]==="(")r++;else if(t[l]===")")r--;l++}if(r!==0)continue;let p=t.substring(h,l-1).trim(),u=l,d=hi(p),S=i==="for"?"@endfor":"@endforeach",w=1,E=u,y=i==="for"?new RegExp("@(for(?!each)\\s*\\(|endfor(?!each))","g"):new RegExp(`@(${i}\\s*\\(|end${i})`,"g");y.lastIndex=u;let b;while((b=y.exec(t))!==null)if(b[1].startsWith(i))w++;else if(w--,w===0){E=b.index+b[0].length;break}if(w!==0)continue;let x=()=>{let v=[d.itemVar,d.indexVar].filter(Boolean);if(v.length)f.push({start:m,end:E,vars:v})};if(d.iterable){let v=d.iterable.trim();if(v.startsWith("[")||v.startsWith("{")||v.startsWith("'")||v.startsWith('"')||v.startsWith("`")||/^-?\d/.test(v)){x();continue}let I=v.split(/[.[(]/)[0].trim(),_=c?I in c:!1,V=f.some((P)=>m>P.start&&m<P.end&&P.vars.includes(I));if(I&&(_||V)){x();continue}}if(d.style==="as")p=d.indexVar?`(${d.itemVar}, ${d.indexVar}) in ${d.iterable}`:`${d.itemVar} in ${d.iterable}`;let R=t.substring(u,E-S.length).trim(),A=c?{...c}:{};if(d.itemVar)delete A[d.itemVar];if(d.indexVar)delete A[d.indexVar];let C=Sg(Ls(R,A)),T=C.match(H),k;if(T){let[,v,I,_]=T;k=`<${v}${I} @for="${p}">${_}</${v}>`}else k=`<template @for="${p}">${C}</template>`;a.push({start:m,end:E,replacement:k}),n.lastIndex=E}for(let i=a.length-1;i>=0;i--){let{start:m,end:h,replacement:r}=a[i];t=t.substring(0,m)+r+t.substring(h)}return t}function le(e){let c=new Set,t=[],n=0,s=0,a=e.length,f=(r)=>{let l=n+1;while(l<a){let p=e[l];if(p==="\\"){l+=2;continue}if(p===r)return l+1;l++}return a},i=()=>{let r=n+2;while(r<a&&e[r]!==`
4
- `)r++;return r},m=()=>{let r=n+2;while(r<a-1){if(e[r]==="*"&&e[r+1]==="/")return r+2;r++}return a},h=(r)=>{let l=r,p=0;while(l<a){let u=e[l];if(u==="/"&&e[l+1]==="/"){let d=l+2;while(d<a&&e[d]!==`
5
- `)d++;l=d;continue}if(u==="/"&&e[l+1]==="*"){let d=l+2;while(d<a-1&&!(e[d]==="*"&&e[d+1]==="/"))d++;l=d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=l+1;while(d<a){if(e[d]==="\\"){d+=2;continue}if(e[d]===u){d++;break}d++}l=d;continue}if(u==="("||u==="["||u==="{"){p++,l++;continue}if(u===")"||u==="]"||u==="}"){p--,l++;continue}if(u===";"&&p===0)return l+1;l++}return a};while(n<a){let r=e[n];if(r==="/"&&e[n+1]==="/"){let l=i();t.push(e.slice(n,l)),n=l;continue}if(r==="/"&&e[n+1]==="*"){let l=m();t.push(e.slice(n,l)),n=l;continue}if(r==='"'||r==="'"||r==="`"){let l=f(r);t.push(e.slice(n,l)),n=l;continue}if(r==="{"){s++,t.push(r),n++;continue}if(r==="}"){s--,t.push(r),n++;continue}if(s===0){let l=n>0?e[n-1]:"";if(l===""||/\s/.test(l)||l===";"||l==="}"||l==="{"){let u=e.slice(n).match(/^(const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=/);if(u){let d=u[2],S=h(n+u[0].length);if(c.has(d)){t.push(`/* stx: deduped const ${d} */`),n=S;continue}c.add(d),t.push(e.slice(n,S)),n=S;continue}}}t.push(r),n++}return t.join("")}var ue=new Set(["script","style","html","head","meta","link","title","!doctype"]);function fe(e){let c=new RegExp(`<([a-zA-Z][a-zA-Z0-9-]*)\\b(${X})>`,"iy"),t=null,n=null;return g(e,(s,a)=>{c.lastIndex=a;let f=c.exec(s);if(!f)return-1;let i=f[1].toLowerCase();if(i==="script"||i==="style")return-1;let m=a+f[0].length-1;if(i==="body"&&n===null)n=m;if(t===null&&!ue.has(i))t=m;return a+f[0].length}),n??t}function de(e,c,t,n){let s=[],a=` data-stx="${n}"`,f=0,i=!1,m=(h)=>{if(t!==null&&!i&&t>=f&&t<=h)s.push(e.slice(f,t),a,e.slice(t,h)),i=!0;else s.push(e.slice(f,h))};for(let h of c){if(h.start<f)continue;m(h.start),f=h.end}return m(e.length),s.join("")}async function js(e,c,t,n={}){let s=Ns(e,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b/}),a=/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useStore|useLocalStorage|useSessionStorage|keptState|useCookie|useId|useModel|useReactiveProp|useFetch|useRef|useEventListener|useDebounce|useDebouncedValue|useThrottle|useInterval|useTimeout|useToggle|useCounter|useClickOutside|useFocus|useAsync|useColorMode|useDark|useMediaQuery|useScrollLock|usePreferredDark|usePreferredLight|usePreferredReducedMotion|usePreferredContrast|useWebSocket|useRoute|useSearchParams|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots|useOptimistic)\s*(?:<[^>]*>)?\s*\(/,f=[],{hasUserImports:i,bundleClientScript:m}=await o("stx/client-script-bundler",()=>import("./chunk-xy3ex6ht.js"));for(let b of s){let x=b.body;if(Je(b.attrs))x=Ye(x);if(n.forceClientSetup||a.test(x)){f.push({content:x,start:b.start,end:b.end});continue}if(!i(x))continue;try{let R=await m(Gt(x).code,c||"",{projectRoot:process.cwd(),externalizeUserModules:!1});if(a.test(R))f.push({content:x,start:b.start,end:b.end})}catch{}}if(f.length===0)return{output:e,setupCode:null};let h=`${c??""}\x00${f.map((b)=>b.content).join("\x00")}`,r=`__stx_setup_${Bun.hash(h).toString(36).slice(0,10)}`,l=[];for(let b=0;b<f.length;b++){let x=f[b].bundled??Gt(f[b].content).code;if(!f[b].bundled&&i(x))x=await m(x,c||"",{projectRoot:process.cwd()});x=Nt(x);let R=L(x);l.push(`// \u2500\u2500 merged signal script #${b+1} \u2500\u2500
6
- ${R}`)}let p=l.join(`
7
-
8
- `);p=le(p);let d=J(p).split(",").map((b)=>b.trim()).filter(Boolean),S=Nn(p,t),w=`
9
- <script data-stx-scoped>
10
- function ${r}() {
11
- ${St("const",d)}
12
- ${me(`${S}${p}`)}
13
- return ${Zs(p,d)};
14
- }
15
- window.__stx_latestSetup=${r};
16
- if(window.stx)window.stx._latestSetup=${r};
17
- </script>`,E=fe(e);return{output:de(e,f,E,r),setupCode:w}}async function wi(e,c,t,n){if(!Ms(e,t))return e;let s=e;if(c.skipSignalsRuntime)return s;let{output:a,setupCode:f}=await js(s,t,n);if(s=a,!f){let i=W(s);if(i&&!/data-stx/.test(i.attrs)&&!/data-stx-auto/.test(i.attrs)){let m=i.tag.replace(/^<body([^>]*)>$/i,"<body$1 data-stx-auto>");s=s.slice(0,i.index)+m+s.slice(i.index+i.tag.length)}}if(s=await Rr(s,c),f){let i=Hc(s,/<\/head>/i),m=i===-1?Hc(s,/<body[^>]*>/i):-1;if(i!==-1)s=`${s.slice(0,i)}${f}
18
- ${s.slice(i)}`;else if(m!==-1){let h=/<body[^>]*>/i.exec(s.slice(m))[0],r=m+h.length;s=`${s.slice(0,r)}
19
- ${f}${s.slice(r)}`}else s=`${s}
20
- ${f}`}return s}function Hc(e,c){let t=/<(script|style)\b[\s\S]*?<\/\1>/gi,n=[],s;while((s=t.exec(e))!==null)n.push([s.index,s.index+s[0].length]);let a=new RegExp(c.source,c.flags.replace(/[gy]/g,"")),f=0;while(f<e.length){let i=a.exec(e.slice(f));if(!i)return-1;let m=f+i.index;if(!n.some(([r,l])=>m>=r&&m<l))return m;f=m+Math.max(i[0].length,1)}return-1}var G="/* [stx import stripped, resolved via window.stx in __stx_setup] */";function kg(e){let c=[];for(let t of e.split(",")){let n=t.trim();if(!n||n.startsWith("type "))continue;let s=n.match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(s&&s[1]!==s[2])c.push(`${s[2]} = ${s[1]}`)}if(c.length===0)return G;return`var ${c.join(", ")}; ${G}`}var ge=/^\s*import\s+(?:type\s+)?\{([^}]*)\}\s+from\s+['"](?:stx|@stacksjs\/stx|@stacksjs\/browser)['"]\s*;?\s*$/gm;function Nt(e){return e.replace(ge,(c,t)=>kg(t))}
21
- export{xy,Ns,hi,Ms,Tr,yi,bi,Sg,Ds,Ls,js,wi,Hc,kg,Nt};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zu,Jo,gr,Qu,ed,td,nd,rd,sd,od,id,ad,cd,ld,ud,dd,pd,fd,gd,md,hd,yd,bd,wd,vd,xd,Sd,kd,_d,Cd,Ed,Td,$d,Rd,Ad,Pd,Id,Od,Nd,Md,Dd,Ld,jd,Bd,Fd,zd,Hd,Ud,gn,ic,Vd,Wd,qd,ac,Kd,Xd,Gd,Jd,Yd,Zd,cc,Qd,ep,tp,np,rp,sp,op,ip,ap,mr,cp,lp,up,dp,pp,fp,gp,mp,hp,yp,bp,wp,Yo,vp,xp,Sp,kp,_p,xs,Ss,Cp,Ep,Tp,$p,Rp,lc,Ap,Pp,Ip,uc,Zo,Op,Np,dc,pc,ks,fc,Mp,mn,Dp,gc,mc,Qo,Lp,ei,jp,Bp,Fp,zp,Hp,Up,Vp,hc,Wp,qp,yc,Kp,Xp,Gp,Jp,Yp,Zp,Qp,ef,tf,nf,rf,sf,of,af,cf,lf,uf,df,pf,ff,gf,mf,hf,yf,bc,bf,wf,vf,xf,Sf,kf,_f,Cf,Ef,Tf,$f,hr,wc,vc,Rf,yr,Af,Pf,If,xc,Sc,_s,Cs,Of,ti,Nf,Mf,Df,Lf,jf,Bf,Ff,zf,Hf,Uf,Vf,Wf,qf,Kf,Xf,Gf,Jf,Yf,Zf,Qf,kc,eg,tg,_c,Cc,ng,rg}from"./chunk-mnpfvxpa.js";export{Hd as AVAILABLE_COMPONENTS,lc as AutoUpdater,Ud as COMPONENT_STYLES,_s as DEFAULT_WATCH_INTERVAL_MS,Sc as MAX_WATCH_INTERVAL_MS,xc as MIN_WATCH_INTERVAL_MS,Zd as MODAL_STYLES,ad as TOAST_STYLES,op as TRAY_MENU_STYLES,dc as UPDATE_MANIFEST_ASSET,Xd as alert,gf as appInfo,Bf as appleScript,rg as applicationDataDirectory,jf as audio,tg as backgroundDelay,uf as battery,Lf as biometric,Tf as bluetooth,Vf as bonjour,mn as bundlePathForExecutable,Lp as caffeinate,Ap as canReplaceBundle,Pp as clearQuarantine,ef as clipboard,Yd as closeAllModals,wp as closeAllWindows,Kd as confirm,yf as contextMenu,Jf as continuityCamera,Gf as coreml,$p as craftBinaryNotFoundMessage,Yo as craftWindowArguments,hr as crashReporter,Ad as createAccordion,kd as createAutocomplete,gd as createAvatar,fd as createBadge,cd as createButton,md as createCard,Ld as createChart,ud as createCheckbox,Ed as createChip,jd as createCodeEditor,vd as createColorPicker,Dd as createDataGrid,xd as createDatePicker,Ss as createDiskImage,yd as createDropdown,Fd as createFileExplorer,Mp as createGitHubUpdateManifest,fc as createGitHubUpdater,Cd as createImageView,Jp as createInterval,_d as createLabel,Od as createListView,Bd as createMediaPlayer,Qd as createMenubar,Id as createModalComponent,ng as createNativeUpdateApi,Cc as createPantrySelfUpdater,Hp as createPreferences,pd as createProgressBar,wd as createRadioButton,bd as createRating,$d as createScrollView,Qo as createSelfUpdater,dd as createSlider,Rd as createSplitView,Pd as createStepper,cc as createSystemTray,Nd as createTable,hd as createTabs,ld as createTextInput,Sd as createTimePicker,Gp as createTimer,Td as createTooltip,Md as createTreeView,zd as createWebView,vp as createWindow,Sp as createWindowWithHTML,ei as decaffeinate,lf as deepLinks,Yp as delay,sd as dismissAlertById,od as dismissAllAlerts,af as dragOut,Ip as extractBundle,Ff as fileAssociations,ti as focus,Mf as focusShortcutsReady,Qp as formatCompact,zp as formatDuration,Fp as formatRemainingTime,Wp as formatShortcut,Zp as formatTime,nf as fs,uc as generateUpdateManifest,id as getActiveAlertCount,Jd as getActiveModalCount,ep as getActiveTrayInstances,yp as getActiveWindowIds,Bp as getCaffeinateStatus,Qf as getCapabilities,kc as getCapability,mp as getDesktopConfig,fp as getDialogBridgeScript,Xp as getRegisteredHotkeys,rp as getSimulatedTrayHTML,sp as getTrayBridgeScript,tp as getTrayInstance,bp as getWindow,_p as getWindowBridgeScript,pc as githubLatestAssetUrl,ks as githubReleaseAssetUrl,sf as globalShortcuts,yr as handoff,Nf as hasFocusShortcuts,Rf as iap,Vp as isAutoLaunchEnabled,eg as isAvailable,jp as isCaffeinated,cf as isDragOutAvailable,kp as isWebviewAvailable,vf as keychain,Af as liveActivities,Df as localServer,Pf as location,Uf as log,Cp as macOSRuntimeExecutablePath,hf as menu,Xf as midi,kf as nativeAutoLaunch,_f as nativeTray,Cf as nativeWindow,df as network,tf as notifications,rd as notify,xp as openDevWindow,Ep as pack,Tp as packageApp,_c as parsePantryUpdateManifest,hc as parseShortcut,Hf as pdf,xf as permissions,Sf as printing,Gd as prompt,gc as quitLauncher,Zo as readBundleIdentity,wc as redactPII,qp as registerHotkey,mc as relaunchBundle,Zu as requestNotificationPermission,hp as resetDesktopConfig,Rp as resolveCraftBinary,xs as resolveCraftExecutablePath,Dp as runningBundleTeamId,wf as screen,If as screenCapture,Cs as screenSharing,Zf as serial,Yf as serviceMenu,Up as setAutoLaunch,gp as setDesktopConfig,rf as shell,Jo as showAlert,lp as showAlertDialog,cp as showColorPicker,up as showConfirmDialog,dp as showErrorDialog,Wd as showErrorModal,nd as showErrorToast,ic as showInfoModal,Qu as showInfoToast,mr as showMessageBox,gn as showModal,ip as showOpenDialog,ac as showQuestionModal,ap as showSaveDialog,qd as showSuccessModal,ed as showSuccessToast,gr as showToast,pp as showWarningDialog,Vd as showWarningModal,td as showWarningToast,bc as sidebar,vc as signPayload,$f as speech,qf as speechRecognition,Wf as spotlight,mf as standardMenus,Op as swapBundle,bf as system,zf as tags,of as theme,Ef as touchbar,np as triggerTrayAction,Kp as unregisterAllHotkeys,yc as unregisterHotkey,pf as updater,Np as verifyBundleTrust,Kf as vision,Of as watchScreenSharing,ff as windowEvents};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wa,eh}from"./chunk-gjyz5ma7.js";export{Wa as definePlugin,eh as pluginManager};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Xa,Vu,ar,bh,Wu,qu,Ku,wh}from"./chunk-m86sjbx7.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{ar as Validator,Vu as defineForm,Wu as processErrorDirective,qu as processErrorsDirective,wh as processFormValidationDirectives,Ku as processHasErrorsDirective,Xa as useForm,bh as v};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Um,Vm,Wm,qm,ku,Km,Xm,Gm,Jm,Ym,Zm,Qm}from"./chunk-3efpqm1f.js";export{Zm as Broadcast,Qm as BroadcastServer,ku as broadcast,Jm as broadcastPresence,Gm as broadcastPrivate,Ym as channel,Um as getBroadcastServer,qm as loadChannels,Vm as startBroadcasting,Wm as stopBroadcasting,Km as toUser,Xm as toUsers};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{le,ue,de,tr,Te,ze,ms,$u,Rt,pn,nr,rr,sr,pe,or,ir,hs}from"./chunk-1vsjmwr1.js";import"./chunk-1bf0grbf.js";export{ue as DEFAULT_FORMATS,de as DEFAULT_QUALITY,le as DEFAULT_WIDTHS,hs as ImageProcessingError,ir as formatSize,pn as generateSizes,Rt as generateSrcSet,nr as getFallbackVariant,ms as getImageMetadata,pe as getMimeType,or as getTotalSize,rr as groupVariantsByFormat,Te as isImageBackendAvailable,sr as isImageFile,tr as isSharpAvailable,ze as processImage,$u as resizeAndConvert};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ru,su,ou,am,cm}from"./chunk-9707zz6v.js";export{su as auditBuildOutput,ru as auditConfig,ou as calculateAuditResult,cm as formatAuditResult,am as runPwaAudit};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xy,Ns,hi,Ms,Tr,yi,bi,Sg,Ds,Ls,js,wi,Hc,kg,Nt}from"./chunk-3aayrnbh.js";import"./chunk-v1x96kjr.js";import"./chunk-p0xqm2ne.js";import"./chunk-3tcy9r6r.js";import"./chunk-50zzar2c.js";import"./chunk-mr9pp5cf.js";import"./chunk-txk2z7v0.js";import"./chunk-ktv65e3n.js";import"./chunk-5fdc8pej.js";import{J}from"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{Sg as bindLoopInterpolations,xy as clearScriptScanCache,Ds as convertServerLoopAttributesToDirectives,yi as convertSignalDirectivesToAttributes,Ls as convertSignalLoopsToAttributes,Tr as extractClientSignalNames,J as extractExports,Hc as findMarkupIndexOutsideScripts,Ms as hasSignalsSyntax,hi as parseLoopExpression,bi as preEvalLiteralReactiveIfs,js as processScriptSetup,wi as processSignals,kg as rewriteStxImportSpecifiers,Ns as scanScriptTags,Nt as stripStxRuntimeImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{os,is,Em,Tm,$m,Rm,Am}from"./chunk-neymp1bb.js";export{os as collectMessageCatalogs,Tm as loadPageMessages,$m as messageAreasIn,Rm as pageLanguages,Em as pageMessagesEnabled,Am as pageMessagesScript,is as pathSpellings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fg,jc,py,Bc,gg,mg,Cn,Cr,fy,hg,yg,gy,S}from"./chunk-m390z8w8.js";import"./chunk-fwxgzktt.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{Cn as buildCss,hg as extractClassNames,mg as fingerprintConfig,yg as generateCss,fy as getCachedCSS,fg as getCssServeAsset,S as injectCss,jc as loadCssEngine,Bc as loadCssEngineConfig,Cr as rebuildCss,py as resetCssCache,gg as resolveUserCssConfig,gy as withLinkedModuleBundles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{jn,Zi}from"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";export{Zi as generateRuntimeConfigTypes,jn as prepareRuntimeConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cu,th,Eu,Tu,nh,rh}from"./chunk-hht7n4zd.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{rh as applySlots,nh as extractSlotContent,th as parseSlotElement,Cu as parseSlots,Tu as processSlots,Eu as renderSlot};