@stacksjs/stx 0.2.604 → 0.2.606

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 (238) hide show
  1. package/dist/{chunk-38mt83wa.js → chunk-06wv8qwy.js} +6 -6
  2. package/dist/chunk-0d6b3eeb.js +2 -0
  3. package/dist/{chunk-9cgga2aw.js → chunk-0v89nfz1.js} +2 -2
  4. package/dist/chunk-1e28n9q2.js +2 -0
  5. package/dist/chunk-1fdrhfc0.js +2 -0
  6. package/dist/{chunk-htcptqtn.js → chunk-1jxdkp8x.js} +6 -6
  7. package/dist/chunk-1veeefpn.js +2 -0
  8. package/dist/{chunk-6eg9a3mt.js → chunk-20k77e2a.js} +4 -4
  9. package/dist/chunk-2r4an7bh.js +2 -0
  10. package/dist/chunk-304vaxnk.js +2 -0
  11. package/dist/chunk-327bt8zb.js +2 -0
  12. package/dist/chunk-36n8yz6t.js +2 -0
  13. package/dist/{chunk-jczknjbw.js → chunk-3cnwstra.js} +2 -2
  14. package/dist/chunk-3gm6013p.js +2 -0
  15. package/dist/chunk-3ttnn4t3.js +2 -0
  16. package/dist/chunk-3yttgk0s.js +2 -0
  17. package/dist/chunk-4ck2xc8m.js +2 -0
  18. package/dist/{chunk-rd7w0cx4.js → chunk-4dfqgmgs.js} +39 -39
  19. package/dist/chunk-4jasfhh6.js +2 -0
  20. package/dist/{chunk-axz1x4r9.js → chunk-4tj0ap61.js} +5 -5
  21. package/dist/{chunk-9nt3q23a.js → chunk-53y4z4p2.js} +3 -3
  22. package/dist/{chunk-j1dmkt29.js → chunk-5e182xqt.js} +1 -1
  23. package/dist/{chunk-67m2prah.js → chunk-5s47qfp6.js} +2 -2
  24. package/dist/{chunk-bn7fzfc2.js → chunk-5taenpfg.js} +1 -1
  25. package/dist/chunk-605c6zks.js +2 -0
  26. package/dist/chunk-61d0gr5b.js +2 -0
  27. package/dist/{chunk-1944jgb2.js → chunk-67tpacz0.js} +1 -1
  28. package/dist/{chunk-9h1ytsgm.js → chunk-6by8dtan.js} +2 -2
  29. package/dist/{chunk-k71e38fk.js → chunk-6xsm53pz.js} +4 -4
  30. package/dist/{chunk-tc3ne706.js → chunk-7095f0hb.js} +9 -9
  31. package/dist/chunk-7renf4zp.js +2 -0
  32. package/dist/{chunk-9wtb959p.js → chunk-81qmj3sd.js} +7 -7
  33. package/dist/chunk-8t3c2myr.js +2 -0
  34. package/dist/chunk-8x2ejkcc.js +2 -0
  35. package/dist/chunk-915s0may.js +2 -0
  36. package/dist/chunk-93na8hh0.js +2 -0
  37. package/dist/{chunk-de3gknmn.js → chunk-9734nkc8.js} +3 -3
  38. package/dist/chunk-9fpnnfr3.js +2 -0
  39. package/dist/{chunk-ftr0fvw7.js → chunk-9zwdpa7p.js} +5 -5
  40. package/dist/chunk-ajd5w5c4.js +2 -0
  41. package/dist/{chunk-nfht2ryp.js → chunk-azpkje69.js} +8 -5
  42. package/dist/chunk-b4tbqz8r.js +2 -0
  43. package/dist/chunk-be2kmw0p.js +2 -0
  44. package/dist/{chunk-48s1nprc.js → chunk-bhf9yt2w.js} +2 -2
  45. package/dist/chunk-bkjre6xk.js +127 -0
  46. package/dist/chunk-bnpb6ez9.js +2 -0
  47. package/dist/{chunk-jtq8e3b0.js → chunk-bsy8v1xj.js} +2 -2
  48. package/dist/chunk-c0h9cxew.js +2 -0
  49. package/dist/{chunk-zrw1zf54.js → chunk-cfpenvc7.js} +3 -3
  50. package/dist/chunk-cw76y2p5.js +2 -0
  51. package/dist/chunk-d0kes50w.js +2 -0
  52. package/dist/{chunk-4st1qw62.js → chunk-dmdhbwmn.js} +3 -3
  53. package/dist/{chunk-t19th11m.js → chunk-dnqq1ze0.js} +3 -3
  54. package/dist/chunk-dzbkgsv8.js +4 -0
  55. package/dist/chunk-dzekcand.js +2 -0
  56. package/dist/{chunk-bfbmdjh4.js → chunk-efy3038a.js} +2 -2
  57. package/dist/chunk-en388k3h.js +2 -0
  58. package/dist/chunk-ewkza45r.js +2 -0
  59. package/dist/chunk-fcgf8d5k.js +2 -0
  60. package/dist/chunk-fese2cf6.js +2 -0
  61. package/dist/{chunk-79zfhk62.js → chunk-fwp1en28.js} +6 -6
  62. package/dist/{chunk-9x4r15mv.js → chunk-ghdyqt98.js} +2 -2
  63. package/dist/chunk-gk7mmc2e.js +2 -0
  64. package/dist/chunk-gw2dvp35.js +2 -0
  65. package/dist/chunk-h9drxwva.js +2 -0
  66. package/dist/chunk-hrr7k1qc.js +2 -0
  67. package/dist/{chunk-jb6zejnt.js → chunk-htf3z9et.js} +3 -3
  68. package/dist/chunk-j04brkj0.js +2 -0
  69. package/dist/chunk-jbvwg4gs.js +2 -0
  70. package/dist/{chunk-wkxzzdzs.js → chunk-jpxekhdh.js} +3 -3
  71. package/dist/chunk-jshj69dy.js +2 -0
  72. package/dist/{chunk-y09g63k0.js → chunk-jsktg3ab.js} +5 -5
  73. package/dist/{chunk-zvs13kgh.js → chunk-k3f4044e.js} +2 -2
  74. package/dist/chunk-k7spjpr0.js +2 -0
  75. package/dist/chunk-kgvm5ytn.js +2 -0
  76. package/dist/chunk-km9a5gp4.js +2 -0
  77. package/dist/{chunk-4h58as2c.js → chunk-kxjd6e2h.js} +2 -2
  78. package/dist/{chunk-nb0ytx70.js → chunk-m95zjk91.js} +2 -2
  79. package/dist/{chunk-h7atbtds.js → chunk-m9h7pmkh.js} +5 -5
  80. package/dist/chunk-mfery7a4.js +2 -0
  81. package/dist/chunk-mn7a5b55.js +3 -0
  82. package/dist/{chunk-vmsw9sdw.js → chunk-mtxs4fya.js} +2 -2
  83. package/dist/{chunk-8s7zbhdd.js → chunk-mvwcf4xy.js} +4 -4
  84. package/dist/chunk-myqhdz1w.js +2 -0
  85. package/dist/chunk-n35yc890.js +3 -0
  86. package/dist/chunk-n882b1fy.js +2 -0
  87. package/dist/chunk-p8sv5fqs.js +2 -0
  88. package/dist/chunk-pndhb1nk.js +2 -0
  89. package/dist/chunk-pt7e0be5.js +2 -0
  90. package/dist/chunk-q40ahbjs.js +2 -0
  91. package/dist/{chunk-gzpxvca7.js → chunk-qh07a85k.js} +3 -3
  92. package/dist/chunk-qjxxhdv7.js +2 -0
  93. package/dist/chunk-qygr4pv8.js +2 -0
  94. package/dist/{chunk-18ws9heh.js → chunk-r4h8fg1x.js} +1 -1
  95. package/dist/chunk-r4wqh5fd.js +2845 -0
  96. package/dist/{chunk-tnafnb23.js → chunk-r69jfs59.js} +1 -1
  97. package/dist/{chunk-xcyreehd.js → chunk-rg7wvcqw.js} +2 -2
  98. package/dist/{chunk-82bttwqm.js → chunk-rmv35cx0.js} +2 -2
  99. package/dist/chunk-rp93n4z7.js +3 -0
  100. package/dist/chunk-rrw2jg26.js +2 -0
  101. package/dist/{chunk-kn2exbq7.js → chunk-s45envb5.js} +5 -5
  102. package/dist/{chunk-tds3d65g.js → chunk-s4pjf2pc.js} +2 -2
  103. package/dist/{chunk-b3c1gggs.js → chunk-sswjv8p9.js} +2 -2
  104. package/dist/{chunk-bsy10tz6.js → chunk-t9t66sz4.js} +6 -6
  105. package/dist/{chunk-pb7vste8.js → chunk-tbsjg23k.js} +4 -4
  106. package/dist/{chunk-q6h6yjg4.js → chunk-tcd2zez3.js} +2 -2
  107. package/dist/{chunk-f17rcvdb.js → chunk-td30jg06.js} +2 -2
  108. package/dist/{chunk-qf39z0hg.js → chunk-td5100fz.js} +7 -7
  109. package/dist/{chunk-hvqjs9ps.js → chunk-tyb481p0.js} +1 -1
  110. package/dist/{chunk-a8n6mt7s.js → chunk-tydv84gj.js} +2 -2
  111. package/dist/{chunk-hsy9rhct.js → chunk-vehtypx0.js} +2 -2
  112. package/dist/{chunk-jmczvhpy.js → chunk-vhajhs44.js} +5 -5
  113. package/dist/{chunk-5c153w4j.js → chunk-vm2d4hap.js} +3 -3
  114. package/dist/{chunk-y3wdf7v7.js → chunk-vntpfbwy.js} +1 -1
  115. package/dist/{chunk-25zpd110.js → chunk-vp3fzjsc.js} +2 -2
  116. package/dist/{chunk-3xdfqn0d.js → chunk-vvfpb3k3.js} +5 -5
  117. package/dist/{chunk-q1cvef6b.js → chunk-vw62fjpv.js} +3 -3
  118. package/dist/{chunk-er5wxv0f.js → chunk-w67rrd1f.js} +10 -10
  119. package/dist/{chunk-shnsvsg4.js → chunk-w8g2ppnr.js} +2 -2
  120. package/dist/chunk-wjhhb6dn.js +2 -0
  121. package/dist/chunk-wm8w2721.js +2 -0
  122. package/dist/{chunk-g6ew2drc.js → chunk-wy53pys4.js} +5 -5
  123. package/dist/{chunk-v8ze2q95.js → chunk-wzjf33es.js} +2 -2
  124. package/dist/{chunk-gh181dnr.js → chunk-x8q5przn.js} +10 -10
  125. package/dist/{chunk-vn6h03nq.js → chunk-xjxc4q3w.js} +27 -27
  126. package/dist/chunk-y2wr7c9e.js +2 -0
  127. package/dist/{chunk-kx52xt96.js → chunk-y54fz9rk.js} +2 -2
  128. package/dist/{chunk-788d9msn.js → chunk-y6gj9jq8.js} +6 -6
  129. package/dist/chunk-y8jjmwa9.js +2 -0
  130. package/dist/{chunk-xwatzxk5.js → chunk-y9a9cvke.js} +13 -13
  131. package/dist/{chunk-y0qjpcc8.js → chunk-yzj55rfs.js} +3 -3
  132. package/dist/{chunk-hz11wmx9.js → chunk-z8fhtym2.js} +2 -2
  133. package/dist/chunk-z8mdsjzw.js +2 -0
  134. package/dist/chunk-zg87pybq.js +2 -0
  135. package/dist/chunk-zs3ezqy3.js +2 -0
  136. package/dist/{chunk-ydt4sd6m.js → chunk-zs3tmd12.js} +2 -2
  137. package/dist/cli.js +20 -20
  138. package/dist/component-renderer.js +62 -9
  139. package/dist/craft-entry.js +2 -2
  140. package/dist/craft.js +2 -2
  141. package/dist/expressions.js +7 -1
  142. package/dist/native/accessibility.d.ts +12 -0
  143. package/dist/native/accessibility.js +19 -0
  144. package/dist/native/compiler/headwind-to-style.js +23 -29
  145. package/dist/native/compiler/html-to-ir.js +17 -7
  146. package/dist/native/compiler/inline-style.d.ts +7 -0
  147. package/dist/native/compiler/inline-style.js +8 -1
  148. package/dist/native/compiler/ir.d.ts +3 -1
  149. package/dist/native/compiler/render-screen.js +1 -1
  150. package/dist/native/components/primitives.d.ts +16 -14
  151. package/dist/native/components/primitives.js +1 -0
  152. package/dist/native/index.d.ts +1 -0
  153. package/dist/native/primitives/Link.stx +5 -0
  154. package/dist/native/prop-names.js +6 -0
  155. package/dist/native/runtime/binding-tree.js +2 -1
  156. package/dist/native/runtime/browser-renderer.js +63 -4
  157. package/dist/native/runtime/craft-bridge.js +8 -2
  158. package/dist/native/runtime/craft.d.ts +4 -0
  159. package/dist/native/runtime/native-host.js +20 -14
  160. package/dist/native/runtime/overlay-presenter.d.ts +2 -0
  161. package/dist/native/runtime/overlay-presenter.js +10 -5
  162. package/dist/native/runtime/view-operations.d.ts +1 -1
  163. package/dist/native/runtime/view-operations.js +5 -1
  164. package/dist/pwa.js +3 -3
  165. package/dist/slot-scopes.d.ts +7 -0
  166. package/dist/slot-scopes.js +19 -0
  167. package/dist/slots.js +23 -7
  168. package/dist/ssg.js +12 -12
  169. package/dist/stx-virtual-ts.js +6 -5
  170. package/dist/utils.d.ts +1 -1
  171. package/dist/utils.js +1 -1
  172. package/package.json +5 -5
  173. package/dist/chunk-00vp75pj.js +0 -2
  174. package/dist/chunk-04gt67sv.js +0 -2
  175. package/dist/chunk-08p1kxsj.js +0 -2
  176. package/dist/chunk-0hpw65yr.js +0 -2
  177. package/dist/chunk-0rekvsy4.js +0 -2
  178. package/dist/chunk-122y2fkw.js +0 -3
  179. package/dist/chunk-138zjhwa.js +0 -2
  180. package/dist/chunk-1sbj8yqe.js +0 -2
  181. package/dist/chunk-2c7ysn9s.js +0 -2
  182. package/dist/chunk-2qt63502.js +0 -2
  183. package/dist/chunk-2wb1w0p6.js +0 -2
  184. package/dist/chunk-38mt99p3.js +0 -2
  185. package/dist/chunk-3q312svf.js +0 -2
  186. package/dist/chunk-6djvj6hg.js +0 -2
  187. package/dist/chunk-6vncjspv.js +0 -2
  188. package/dist/chunk-7dkwf9h5.js +0 -2
  189. package/dist/chunk-7ejmya3v.js +0 -2
  190. package/dist/chunk-8992smwz.js +0 -2
  191. package/dist/chunk-8mffwm1f.js +0 -2
  192. package/dist/chunk-8txwa114.js +0 -2
  193. package/dist/chunk-9j6hk72q.js +0 -2
  194. package/dist/chunk-a1szmtn1.js +0 -127
  195. package/dist/chunk-acm2tym9.js +0 -2
  196. package/dist/chunk-afmzxwj1.js +0 -2
  197. package/dist/chunk-bk3yktq8.js +0 -2
  198. package/dist/chunk-bpz3yv92.js +0 -2
  199. package/dist/chunk-bx3qewwk.js +0 -2
  200. package/dist/chunk-ce2d0hz9.js +0 -2
  201. package/dist/chunk-d81h4mxd.js +0 -2
  202. package/dist/chunk-dgtxj56t.js +0 -3
  203. package/dist/chunk-djqmzzn6.js +0 -2
  204. package/dist/chunk-eactb0nz.js +0 -2
  205. package/dist/chunk-eqa0wdv9.js +0 -4
  206. package/dist/chunk-esac5ych.js +0 -2
  207. package/dist/chunk-esj49jvz.js +0 -2
  208. package/dist/chunk-et8wjgxw.js +0 -2
  209. package/dist/chunk-ffykng6w.js +0 -2
  210. package/dist/chunk-fwt5fh5w.js +0 -2
  211. package/dist/chunk-g3qbe5y2.js +0 -2
  212. package/dist/chunk-h5g8k974.js +0 -2
  213. package/dist/chunk-hhwnd24n.js +0 -2
  214. package/dist/chunk-hq4mtcp0.js +0 -2
  215. package/dist/chunk-hvd9qc98.js +0 -2
  216. package/dist/chunk-j0z7010x.js +0 -2845
  217. package/dist/chunk-jhswy523.js +0 -2
  218. package/dist/chunk-jjs6nqh1.js +0 -2
  219. package/dist/chunk-jyqanvwp.js +0 -2
  220. package/dist/chunk-khdvzjzd.js +0 -2
  221. package/dist/chunk-n06xznty.js +0 -2
  222. package/dist/chunk-p973efbe.js +0 -2
  223. package/dist/chunk-qq59xzwc.js +0 -2
  224. package/dist/chunk-r0e743c3.js +0 -2
  225. package/dist/chunk-r4adpej7.js +0 -2
  226. package/dist/chunk-rd9yv1n3.js +0 -3
  227. package/dist/chunk-shzesarq.js +0 -2
  228. package/dist/chunk-t9914jjh.js +0 -2
  229. package/dist/chunk-wf2wnmjg.js +0 -2
  230. package/dist/chunk-wn2gzwmv.js +0 -2
  231. package/dist/chunk-wr6gw263.js +0 -2
  232. package/dist/chunk-xarb7knj.js +0 -2
  233. package/dist/chunk-xe7jw7nn.js +0 -2
  234. package/dist/chunk-xfe2nzxd.js +0 -2
  235. package/dist/chunk-xjwgzp6s.js +0 -2
  236. package/dist/chunk-xmz2h8cb.js +0 -2
  237. package/dist/chunk-y6909jm7.js +0 -2
  238. package/dist/chunk-zg0pnh4w.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{N}from"./chunk-zvs13kgh.js";var t={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function L(e){for(let[r,n]of Object.entries(t))if(n===e)return r;return}import le from"path";var ue={showRelativePaths:!1,enableAutoRecovery:N(),logRecoveryWarnings:!0},A={...ue};function k(){return{...A}}function _(e){if(!A.showRelativePaths||!e)return e;let r=A.baseDir||process.cwd();try{let n=le.relative(r,e);return n.startsWith("..")?e:n}catch{return e}}class R extends Error{code;filePath;line;column;context;numericCode;constructor(e,r,n,o,s,a,g){super(e);this.code=r;this.filePath=n;this.line=o;this.column=s;this.context=a;if(this.name="StxError",this.numericCode=g||t.EVALUATION_ERROR,this.filePath)this.filePath=_(this.filePath)}}class Y extends R{constructor(e,r,n,o,s,a){super(e,"stx_RUNTIME_ERROR",r,n,o,s,a||t.EVALUATION_ERROR);this.name="StxRuntimeError"}}class In extends R{constructor(e,r,n,o,s,a){super(e,"stx_FILE_ERROR",r,n,o,s,a||t.FILE_NOT_FOUND);this.name="StxFileError"}}class xr extends R{isFatal=!0;constructor(e,r,n,o,s,a){super(e,"stx_VALIDATION_ERROR",r,n,o,s,a||t.DOM_API_VIOLATION);this.name="StxValidationError"}}function G(e){let{type:r,message:n,code:o,filePath:s,line:a,column:g,template:u,offset:h,snippet:m,suggestion:d,format:f="text"}=e,E=a,x=g;if(!E&&u&&h!==void 0){let V=he(u,h);E=V.line,x=V.column}let w=s?_(s):void 0,y=o?L(o):void 0,S={type:r,code:o,codeName:y,message:n,filePath:w,line:E,column:x,snippet:m,suggestion:d,timestamp:new Date().toISOString()},v;switch(f){case"html":v=fe(S);break;case"json":v=JSON.stringify(S,null,2);break;case"console":v=me(S,u,h);break;case"text":default:v=ge(S,u,h);break}return{formatted:v,data:S}}function ge(e,r,n){let o=[],s=e.code?` [${e.codeName||e.code}]`:"";if(o.push(`[${e.type} Error${s}]`),e.filePath){let a=e.filePath;if(e.line){if(a+=`:${e.line}`,e.column)a+=`:${e.column}`}o.push(`at ${a}`)}if(o.push(`
2
+ import{N}from"./chunk-k3f4044e.js";var t={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function L(e){for(let[r,n]of Object.entries(t))if(n===e)return r;return}import le from"path";var ue={showRelativePaths:!1,enableAutoRecovery:N(),logRecoveryWarnings:!0},A={...ue};function k(){return{...A}}function _(e){if(!A.showRelativePaths||!e)return e;let r=A.baseDir||process.cwd();try{let n=le.relative(r,e);return n.startsWith("..")?e:n}catch{return e}}class R extends Error{code;filePath;line;column;context;numericCode;constructor(e,r,n,o,s,a,g){super(e);this.code=r;this.filePath=n;this.line=o;this.column=s;this.context=a;if(this.name="StxError",this.numericCode=g||t.EVALUATION_ERROR,this.filePath)this.filePath=_(this.filePath)}}class Y extends R{constructor(e,r,n,o,s,a){super(e,"stx_RUNTIME_ERROR",r,n,o,s,a||t.EVALUATION_ERROR);this.name="StxRuntimeError"}}class On extends R{constructor(e,r,n,o,s,a){super(e,"stx_FILE_ERROR",r,n,o,s,a||t.FILE_NOT_FOUND);this.name="StxFileError"}}class Sr extends R{isFatal=!0;constructor(e,r,n,o,s,a){super(e,"stx_VALIDATION_ERROR",r,n,o,s,a||t.DOM_API_VIOLATION);this.name="StxValidationError"}}function G(e){let{type:r,message:n,code:o,filePath:s,line:a,column:g,template:u,offset:h,snippet:m,suggestion:d,format:f="text"}=e,E=a,x=g;if(!E&&u&&h!==void 0){let V=he(u,h);E=V.line,x=V.column}let w=s?_(s):void 0,y=o?L(o):void 0,S={type:r,code:o,codeName:y,message:n,filePath:w,line:E,column:x,snippet:m,suggestion:d,timestamp:new Date().toISOString()},v;switch(f){case"html":v=fe(S);break;case"json":v=JSON.stringify(S,null,2);break;case"console":v=me(S,u,h);break;case"text":default:v=ge(S,u,h);break}return{formatted:v,data:S}}function ge(e,r,n){let o=[],s=e.code?` [${e.codeName||e.code}]`:"";if(o.push(`[${e.type} Error${s}]`),e.filePath){let a=e.filePath;if(e.line){if(a+=`:${e.line}`,e.column)a+=`:${e.column}`}o.push(`at ${a}`)}if(o.push(`
3
3
  ${e.message}`),r&&e.line){let a=pe(r,e.line,2);if(a)o.push(`
4
4
  ${a}`)}if(e.snippet)o.push(`
5
5
  Snippet: ${e.snippet}`);if(e.suggestion)o.push(`
@@ -17,15 +17,15 @@ ${"\x1B[31m"}\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\
17
17
  `)}function de(e,r,n){let o=e.split(`
18
18
  `),s=Math.max(0,r-n-1),a=Math.min(o.length-1,r+n-1),g="\x1B[90m",u="\x1B[31m",h="\x1B[0m",m=[];for(let d=s;d<=a;d++){let f=(d+1).toString().padStart(4),E=d===r-1,x=E?"\x1B[31m>\x1B[0m":" ",w=E?`\x1B[31m${o[d]}\x1B[0m`:`\x1B[90m${o[d]}\x1B[0m`;m.push(`${x}\x1B[90m${f}\x1B[0m | ${w}`)}return m.join(`
19
19
  `)}function X(e){return e.replace(/--/g,"- -").replace(/>/g,"&gt;")}function he(e,r){let o=e.substring(0,r).split(`
20
- `);return{line:o.length,column:o[o.length-1].length}}function i(e,r,n){return G({type:e,message:r,code:n,format:"html"}).formatted}async function se(e,r,n){try{return await e()}catch(o){if(n&&o instanceof Error)n(o);return r}}var Js={isEnabled(){return k().enableAutoRecovery},fixCommonSyntaxErrors(e){let r=k();if(!r.enableAutoRecovery)return{fixed:e,fixes:[]};let n=e,o=[],s=(n.match(/\{\{/g)||[]).length,a=(n.match(/\}\}/g)||[]).length;if(s>a){let u=s-a;n+="}}".repeat(u),o.push(`Added ${u} missing closing braces '}}'`)}let g=["if","foreach","for","switch","section"];for(let u of g){let h=(n.match(new RegExp(`@${u}\\b`,"g"))||[]).length,m=(n.match(new RegExp(`@end${u}\\b`,"g"))||[]).length;if(h>m){let d=h-m;for(let f=0;f<d;f++)n+=`
20
+ `);return{line:o.length,column:o[o.length-1].length}}function i(e,r,n){return G({type:e,message:r,code:n,format:"html"}).formatted}async function oe(e,r,n){try{return await e()}catch(o){if(n&&o instanceof Error)n(o);return r}}var Ys={isEnabled(){return k().enableAutoRecovery},fixCommonSyntaxErrors(e){let r=k();if(!r.enableAutoRecovery)return{fixed:e,fixes:[]};let n=e,o=[],s=(n.match(/\{\{/g)||[]).length,a=(n.match(/\}\}/g)||[]).length;if(s>a){let u=s-a;n+="}}".repeat(u),o.push(`Added ${u} missing closing braces '}}'`)}let g=["if","foreach","for","switch","section"];for(let u of g){let h=(n.match(new RegExp(`@${u}\\b`,"g"))||[]).length,m=(n.match(new RegExp(`@end${u}\\b`,"g"))||[]).length;if(h>m){let d=h-m;for(let f=0;f<d;f++)n+=`
21
21
  @end${u}`;o.push(`Added ${d} missing @end${u}`)}}if(o.length>0&&r.logRecoveryWarnings)console.warn("[stx] Auto-recovery applied fixes:"),o.forEach((u)=>console.warn(` - ${u}`)),console.warn(" Consider fixing these issues in your template.");return{fixed:n,fixes:o}},createFallbackContent(e,r){if(N())return`<!-- ${e} failed: ${r.message} -->`;return"<!-- stx rendering error -->"}};class P{errors=[];maxErrors;enableFileLogging;logFilePath;logFormat;maxFileSize;maxLogFiles;minLevel;writeQueue=Promise.resolve();constructor(e={}){this.maxErrors=e.maxErrors??1000,this.enableFileLogging=e.enableFileLogging??!1,this.logFilePath=e.logFilePath??".stx/errors.log",this.logFormat=e.logFormat??"json",this.maxFileSize=e.maxFileSize??10485760,this.maxLogFiles=e.maxLogFiles??5,this.minLevel=e.minLevel??"all"}configure(e){if(e.maxErrors!==void 0)this.maxErrors=e.maxErrors;if(e.enableFileLogging!==void 0)this.enableFileLogging=e.enableFileLogging;if(e.logFilePath!==void 0)this.logFilePath=e.logFilePath;if(e.logFormat!==void 0)this.logFormat=e.logFormat;if(e.maxFileSize!==void 0)this.maxFileSize=e.maxFileSize;if(e.maxLogFiles!==void 0)this.maxLogFiles=e.maxLogFiles;if(e.minLevel!==void 0)this.minLevel=e.minLevel}log(e,r,n="error"){let o={timestamp:new Date,error:e,context:r,level:n};if(this.errors.push(o),this.errors.length>this.maxErrors)this.errors=this.errors.slice(-this.maxErrors);if(this.enableFileLogging&&this.shouldLog(n))this.writeToFile(o)}shouldLog(e){if(this.minLevel==="all")return!0;if(this.minLevel==="warning")return e==="error"||e==="warning";if(this.minLevel==="error")return e==="error";return!0}formatEntry(e){if(this.logFormat==="json")return JSON.stringify({timestamp:e.timestamp.toISOString(),level:e.level||"error",type:e.error.constructor.name,message:e.error.message,stack:e.error.stack,context:e.context});let r=[`[${e.timestamp.toISOString()}] [${(e.level||"error").toUpperCase()}] ${e.error.constructor.name}: ${e.error.message}`];if(e.error.stack)r.push(` Stack: ${e.error.stack.split(`
22
22
  `).slice(1).join(`
23
23
  `)}`);if(e.context)r.push(` Context: ${JSON.stringify(e.context)}`);return r.join(`
24
24
  `)}writeToFile(e){this.writeQueue=this.writeQueue.then(async()=>{try{let r=await import("fs"),n=await import("path"),o=n.dirname(this.logFilePath);if(!r.existsSync(o))r.mkdirSync(o,{recursive:!0});await this.rotateIfNeeded(r);let s=`${this.formatEntry(e)}
25
25
  `;r.appendFileSync(this.logFilePath,s,"utf-8")}catch(r){if(process.env.STX_DEBUG==="true")console.error("Failed to write to error log:",r)}})}async rotateIfNeeded(e){try{if(!e.existsSync(this.logFilePath))return;if(e.statSync(this.logFilePath).size<this.maxFileSize)return;for(let n=this.maxLogFiles-1;n>=1;n--){let o=`${this.logFilePath}.${n}`,s=`${this.logFilePath}.${n+1}`;if(e.existsSync(o))if(n>=this.maxLogFiles-1)e.unlinkSync(o);else e.renameSync(o,s)}if(this.maxLogFiles<=1)e.writeFileSync(this.logFilePath,"");else e.renameSync(this.logFilePath,`${this.logFilePath}.1`)}catch(r){if(process.env.STX_DEBUG==="true")console.error("Failed to rotate error logs:",r)}}getRecentErrors(e=10){return this.errors.slice(-e)}getErrorsByType(e){return this.errors.filter((r)=>r.error.constructor.name===e)}getErrorsByLevel(e){return this.errors.filter((r)=>r.level===e)}clear(){this.errors.length=0}async clearLogFile(){try{let e=await import("fs");if(e.existsSync(this.logFilePath))e.writeFileSync(this.logFilePath,"","utf-8")}catch(e){if(process.env.STX_DEBUG==="true")console.error("Failed to clear error log:",e)}}getStats(){let e={},r={error:0,warning:0,info:0};for(let n of this.errors){let o=n.error.constructor.name;e[o]=(e[o]||0)+1;let s=n.level||"error";r[s]=(r[s]||0)+1}return{total:this.errors.length,byType:e,byLevel:r}}async exportToFile(e,r="json"){let n=await import("fs"),o=await import("path"),s=o.dirname(e);if(!n.existsSync(s))n.mkdirSync(s,{recursive:!0});if(r==="json"){let a=this.errors.map((g)=>({timestamp:g.timestamp.toISOString(),level:g.level||"error",type:g.error.constructor.name,message:g.error.message,stack:g.error.stack,context:g.context}));n.writeFileSync(e,JSON.stringify(a,null,2),"utf-8")}else{let a=this.errors.map((g)=>this.formatEntry(g));n.writeFileSync(e,a.join(`
26
26
 
27
- `),"utf-8")}}async flush(){await this.writeQueue}}var I=new P,Ft={isDevelopment(){return N()},logDetailedError(e,r){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",e.message),console.error("Stack:",e.stack),r)console.error("Context:",r);console.error("========================")},createErrorReport(e,r){let n=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${e.message}`,`Type: ${e.constructor.name}`,`Stack: ${e.stack}`];if(r)n.push(`Context: ${JSON.stringify(r,null,2)}`);return n.push("========================"),n.join(`
28
- `)}};var Ee={maxSanitizeDepth:10,allowBracketNotation:!1},K={...Ee};var O=/\bnew\s+/,F="__stx_safe_ctors",ee=["Bun","Deno","Buffer","fetch","atob","btoa","console","Response","Request","Headers","WebAssembly","structuredClone","queueMicrotask","crypto","performance","navigator","Worker","WebSocket","BroadcastChannel","EventSource","XMLHttpRequest","localStorage","sessionStorage"],T=[...ee,"Function","setTimeout","setInterval","setImmediate","process","require","exports","module","window","document","global","globalThis","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry"],H=T.map(()=>{return}),M=Object.freeze(Object.assign(Object.create(null),{keys:Object.keys,values:Object.values,entries:Object.entries,fromEntries:Object.fromEntries,assign:Object.assign,hasOwn:Object.hasOwn,is:Object.is})),j=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,O,/\bdelete\s+/,/\bthis\b/,/\\u(?:\{[\dA-Fa-f]+\}|[\dA-Fa-f]{4})/],U=new Set([...ee,"eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this",F]),B=new Set(["__proto__","constructor","prototype"]);function te(e){let r="",n=[],o=null,s=!1;for(let a=0;a<e.length;a++){let g=e[a];if(s){s=!1;continue}if(g==="\\"&&o){s=!0;continue}if(o){if(o==="`"&&g==="$"&&a+1<e.length&&e[a+1]==="{"){let u=1;a+=2;while(a<e.length&&u>0){if(e[a]==="{")u++;else if(e[a]==="}")u--;if(u>0)r+=e[a],n.push(a),a++}continue}if(g===o)o=null;continue}if(g==='"'||g==="'"||g==="`"){o=g;continue}r+=g,n.push(a)}return{text:r,map:n}}function re(e){return te(e).text}var ne=["Collator","DateTimeFormat","DisplayNames","ListFormat","Locale","NumberFormat","PluralRules","RelativeTimeFormat","Segmenter"],oe=(()=>{let e={Date,URL,URLSearchParams},r=Intl;for(let n of ne)if(typeof r[n]==="function")e[`Intl_${n}`]=r[n];return Object.freeze(Object.assign(Object.create(null),e))})(),xe=/^new(\s+)(Date|URLSearchParams|URL|Intl\s*\.\s*([A-Z_a-z]\w*))\s*\(/,q=/(?<![\w$])new(?![\w$])/g,J=`only new Date(), new URL(), new URLSearchParams() and new Intl.{${ne.join(",")}}() are allowed`;function be(e){let{text:r,map:n}=te(e),o=[];q.lastIndex=0;let s;while((s=q.exec(r))!==null){let g=s.index;if(/(?<!\.)\.\s*$/.test(r.slice(0,g)))continue;let u=xe.exec(r.slice(g)),h=u?.[3],m=!u?null:h?`Intl_${h}`:u[2];if(!u||!m||!(m in oe))throw new b(`matched /${O.source}/; ${J}`,e);let d=g+u[0].length,f=n[g],E=n[d-1]+1;if(e.slice(f,E)!==r.slice(g,d))throw new b(`matched /${O.source}/; ${J}`,e);let x=f+3+u[1].length;o.push({start:x,end:x+u[2].length,key:m})}let a=e;for(let g=o.length-1;g>=0;g--){let u=o[g];a=`${a.slice(0,u.start)}${F}.${u.key}${a.slice(u.end)}`}return{source:a,usesSafeConstructors:o.length>0}}class b extends Error{rule;expression;constructor(e,r,n){super(n??`Potentially unsafe expression (${e}): ${r}`);this.name="UnsafeExpressionError",this.rule=e,this.expression=r}}function On(e){try{return W(e),null}catch(r){return r instanceof b?r.rule:r instanceof Error?r.message:String(r)}}function ie(e,r){let n=/[$A-Z_a-z][$\w]*/g,o;while((o=n.exec(e))!==null){let s=o[0],a=e[o.index-1];if(U.has(s))throw new b(`matched /\\b${s}\\b/; identifier ${s}`,r);if(a==="."&&B.has(s))throw new b(`matched /.${s}/; property ${s}`,r)}}function ae(e,r=!0){let n=/(?:[$\w)\].]|\?\.)\s*\[([^\]]*)\]/g,o=new Set,s;while((s=n.exec(e))!==null){let a=s.index+s[0].indexOf("["),g=e.slice(0,a);if(/(?:^|[^$\w])(?:let|const|var)\s*$/.test(g))continue;let u=s[1].trim(),h=/^'(?:[^'\\]|\\.)*'$/.test(u),m=/^"(?:[^"\\]|\\.)*"$/.test(u);if(/^\d+$/.test(u))continue;if(h||m){let f=u.slice(1,-1);if(B.has(f))throw new b(`bracket key ${f}`,e);if(!K.allowBracketNotation)throw new b("bracket notation with a string key; enable with configureSafeEvaluator({ allowBracketNotation: true })",e,`Bracket notation with strings not allowed: ${e}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);continue}if(r&&/^[$A-Z_a-z][$\w]*$/.test(u)){o.add(u);continue}throw new b("dynamic bracket notation is not allowed",e)}return[...o]}function W(e){let r=e.trim(),n=re(r);ie(n,r);let o=ae(r);for(let s of j){if(s===O)continue;if(s.test(n))throw new b(`matched /${s.source}/`,r)}return{...be(r),dynamicKeys:o}}function Ys(e){return W(e),e.trim()}function Sr(e){let r={};r.Math=Math,r.JSON=JSON,r.Date=Date,r.String=String,r.Number=Number,r.Boolean=Boolean,r.Array=Array,r.Object=M,r.parseInt=Number.parseInt,r.parseFloat=Number.parseFloat,r.isNaN=Number.isNaN,r.isFinite=Number.isFinite,r.encodeURIComponent=encodeURIComponent,r.decodeURIComponent=decodeURIComponent;for(let[n,o]of Object.entries(e)){if(n.startsWith("__")||j.some((s)=>s.test(n)))continue;if(o&&typeof o==="object"&&!Array.isArray(o))r[n]=z(o);else r[n]=o}return r}function z(e,r=0){if(r>=K.maxSanitizeDepth)return"[Object too deep]";if(e===null||typeof e!=="object")return e;if(Array.isArray(e))return e.map((o)=>z(o,r+1));if(e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error)return e;let n={};for(let[o,s]of Object.entries(e)){if(o.startsWith("__")||o==="constructor"||o==="prototype")continue;if(s&&typeof s==="object")n[o]=z(s,r+1);else n[o]=s}return n}function l(e,r){try{let n=Sr(r),o=Object.keys(n),s=Object.values(n);return c(e,o)(...s)}catch{return}}function p(e){try{return Ys(e),!0}catch{return!1}}function Ki(e,r){try{let n=Sr(r),o=Object.keys(n),s=Object.values(n),a=!1,u=c(e,o,()=>{a=!0})(...s);return!a&&Boolean(u)}catch{return!1}}function D(e,r){try{let n=l(e,r);if(n&&typeof n==="object"&&!Array.isArray(n))return n;return{}}catch{return{}}}var ce=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","let","static","implements","interface","package","private","protected","public","arguments","eval","await"]),ye=2000,C=new Map;function Q(e,r){let n=`${e.join(",")}\x00${r}`,o=C.get(n);if(o)return o;let s=Function(...e,r);if(C.size>=ye)C.clear();return C.set(n,s),s}function Re(e){return e.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g," ").replace(/\??\.\s*[a-zA-Z_$][\w$]*/g," ").replace(/([{,]\s*)[a-zA-Z_$][\w$]*(\s*:)/g,"$1$2").match(/\b[a-zA-Z_$][\w$]*\b/g)||[]}var we=/^[A-Za-z_$][\w$]*$/;function it(e){return we.test(e)&&!ce.has(e)}function c(e,r,n){let{source:o,usesSafeConstructors:s,dynamicKeys:a}=W(e),g=[];for(let f=0;f<r.length;f++){if(!it(r[f]))continue;if(r[f]===F||r[f]==="Object"||U.has(r[f]))continue;g.push({key:r[f],index:f})}g.sort((f,E)=>f.key.localeCompare(E.key));let u=g.map((f)=>f.key),h=g.map((f)=>f.index),m=`
27
+ `),"utf-8")}}async flush(){await this.writeQueue}}var I=new P,zt={isDevelopment(){return N()},logDetailedError(e,r){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",e.message),console.error("Stack:",e.stack),r)console.error("Context:",r);console.error("========================")},createErrorReport(e,r){let n=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${e.message}`,`Type: ${e.constructor.name}`,`Stack: ${e.stack}`];if(r)n.push(`Context: ${JSON.stringify(r,null,2)}`);return n.push("========================"),n.join(`
28
+ `)}};var Ee={maxSanitizeDepth:10,allowBracketNotation:!1},K={...Ee};var O=/\bnew\s+/,F="__stx_safe_ctors",ee=["Bun","Deno","Buffer","fetch","atob","btoa","console","Response","Request","Headers","WebAssembly","structuredClone","queueMicrotask","crypto","performance","navigator","Worker","WebSocket","BroadcastChannel","EventSource","XMLHttpRequest","localStorage","sessionStorage"],T=[...ee,"Function","setTimeout","setInterval","setImmediate","process","require","exports","module","window","document","global","globalThis","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry"],H=T.map(()=>{return}),M=Object.freeze(Object.assign(Object.create(null),{keys:Object.keys,values:Object.values,entries:Object.entries,fromEntries:Object.fromEntries,assign:Object.assign,hasOwn:Object.hasOwn,is:Object.is})),j=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,O,/\bdelete\s+/,/\bthis\b/,/\\u(?:\{[\dA-Fa-f]+\}|[\dA-Fa-f]{4})/],U=new Set([...ee,"eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this",F]),B=new Set(["__proto__","constructor","prototype"]);function te(e){let r="",n=[],o=null,s=!1;for(let a=0;a<e.length;a++){let g=e[a];if(s){s=!1;continue}if(g==="\\"&&o){s=!0;continue}if(o){if(o==="`"&&g==="$"&&a+1<e.length&&e[a+1]==="{"){let u=1;a+=2;while(a<e.length&&u>0){if(e[a]==="{")u++;else if(e[a]==="}")u--;if(u>0)r+=e[a],n.push(a),a++}continue}if(g===o)o=null;continue}if(g==='"'||g==="'"||g==="`"){o=g;continue}r+=g,n.push(a)}return{text:r,map:n}}function re(e){return te(e).text}var ne=["Collator","DateTimeFormat","DisplayNames","ListFormat","Locale","NumberFormat","PluralRules","RelativeTimeFormat","Segmenter"],se=(()=>{let e={Date,URL,URLSearchParams},r=Intl;for(let n of ne)if(typeof r[n]==="function")e[`Intl_${n}`]=r[n];return Object.freeze(Object.assign(Object.create(null),e))})(),xe=/^new(\s+)(Date|URLSearchParams|URL|Intl\s*\.\s*([A-Z_a-z]\w*))\s*\(/,q=/(?<![\w$])new(?![\w$])/g,J=`only new Date(), new URL(), new URLSearchParams() and new Intl.{${ne.join(",")}}() are allowed`;function be(e){let{text:r,map:n}=te(e),o=[];q.lastIndex=0;let s;while((s=q.exec(r))!==null){let g=s.index;if(/(?<!\.)\.\s*$/.test(r.slice(0,g)))continue;let u=xe.exec(r.slice(g)),h=u?.[3],m=!u?null:h?`Intl_${h}`:u[2];if(!u||!m||!(m in se))throw new b(`matched /${O.source}/; ${J}`,e);let d=g+u[0].length,f=n[g],E=n[d-1]+1;if(e.slice(f,E)!==r.slice(g,d))throw new b(`matched /${O.source}/; ${J}`,e);let x=f+3+u[1].length;o.push({start:x,end:x+u[2].length,key:m})}let a=e;for(let g=o.length-1;g>=0;g--){let u=o[g];a=`${a.slice(0,u.start)}${F}.${u.key}${a.slice(u.end)}`}return{source:a,usesSafeConstructors:o.length>0}}class b extends Error{rule;expression;constructor(e,r,n){super(n??`Potentially unsafe expression (${e}): ${r}`);this.name="UnsafeExpressionError",this.rule=e,this.expression=r}}function Dn(e){try{return W(e),null}catch(r){return r instanceof b?r.rule:r instanceof Error?r.message:String(r)}}function ie(e,r){let n=/[$A-Z_a-z][$\w]*/g,o;while((o=n.exec(e))!==null){let s=o[0],a=e[o.index-1];if(U.has(s))throw new b(`matched /\\b${s}\\b/; identifier ${s}`,r);if(a==="."&&B.has(s))throw new b(`matched /.${s}/; property ${s}`,r)}}function ae(e,r=!0){let n=/(?:[$\w)\].]|\?\.)\s*\[([^\]]*)\]/g,o=new Set,s;while((s=n.exec(e))!==null){let a=s.index+s[0].indexOf("["),g=e.slice(0,a);if(/(?:^|[^$\w])(?:let|const|var)\s*$/.test(g))continue;let u=s[1].trim(),h=/^'(?:[^'\\]|\\.)*'$/.test(u),m=/^"(?:[^"\\]|\\.)*"$/.test(u);if(/^\d+$/.test(u))continue;if(h||m){let f=u.slice(1,-1);if(B.has(f))throw new b(`bracket key ${f}`,e);if(!K.allowBracketNotation)throw new b("bracket notation with a string key; enable with configureSafeEvaluator({ allowBracketNotation: true })",e,`Bracket notation with strings not allowed: ${e}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);continue}if(r&&/^[$A-Z_a-z][$\w]*$/.test(u)){o.add(u);continue}throw new b("dynamic bracket notation is not allowed",e)}return[...o]}function W(e){let r=e.trim(),n=re(r);ie(n,r);let o=ae(r);for(let s of j){if(s===O)continue;if(s.test(n))throw new b(`matched /${s.source}/`,r)}return{...be(r),dynamicKeys:o}}function Zs(e){return W(e),e.trim()}function kr(e){let r={};r.Math=Math,r.JSON=JSON,r.Date=Date,r.String=String,r.Number=Number,r.Boolean=Boolean,r.Array=Array,r.Object=M,r.parseInt=Number.parseInt,r.parseFloat=Number.parseFloat,r.isNaN=Number.isNaN,r.isFinite=Number.isFinite,r.encodeURIComponent=encodeURIComponent,r.decodeURIComponent=decodeURIComponent;for(let[n,o]of Object.entries(e)){if(n.startsWith("__")||j.some((s)=>s.test(n)))continue;if(o&&typeof o==="object"&&!Array.isArray(o))r[n]=z(o);else r[n]=o}return r}function z(e,r=0){if(r>=K.maxSanitizeDepth)return"[Object too deep]";if(e===null||typeof e!=="object")return e;if(Array.isArray(e))return e.map((o)=>z(o,r+1));if(e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error)return e;let n={};for(let[o,s]of Object.entries(e)){if(o.startsWith("__")||o==="constructor"||o==="prototype")continue;if(s&&typeof s==="object")n[o]=z(s,r+1);else n[o]=s}return n}function l(e,r){try{let n=kr(r),o=Object.keys(n),s=Object.values(n);return c(e,o)(...s)}catch{return}}function p(e){try{return Zs(e),!0}catch{return!1}}function Xi(e,r){try{let n=kr(r),o=Object.keys(n),s=Object.values(n),a=!1,u=c(e,o,()=>{a=!0})(...s);return!a&&Boolean(u)}catch{return!1}}function D(e,r){try{let n=l(e,r);if(n&&typeof n==="object"&&!Array.isArray(n))return n;return{}}catch{return{}}}var ce=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","let","static","implements","interface","package","private","protected","public","arguments","eval","await"]),ye=2000,C=new Map;function Q(e,r){let n=`${e.join(",")}\x00${r}`,o=C.get(n);if(o)return o;let s=Function(...e,r);if(C.size>=ye)C.clear();return C.set(n,s),s}function Ae(e){return e.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g," ").replace(/\??\.\s*[a-zA-Z_$][\w$]*/g," ").replace(/([{,]\s*)[a-zA-Z_$][\w$]*(\s*:)/g,"$1$2").match(/\b[a-zA-Z_$][\w$]*\b/g)||[]}var we=/^[A-Za-z_$][\w$]*$/;function at(e){return we.test(e)&&!ce.has(e)}function c(e,r,n){let{source:o,usesSafeConstructors:s,dynamicKeys:a}=W(e),g=[];for(let f=0;f<r.length;f++){if(!at(r[f]))continue;if(r[f]===F||r[f]==="Object"||U.has(r[f]))continue;g.push({key:r[f],index:f})}g.sort((f,E)=>f.key.localeCompare(E.key));let u=g.map((f)=>f.key),h=g.map((f)=>f.index),m=`
29
29
  'use strict';
30
30
  try {
31
31
  return ${o};
@@ -36,5 +36,5 @@ catch (e) {
36
36
  }
37
37
  throw e;
38
38
  }
39
- `;return Se(ve(s?(f)=>{let E=Q([F,"Object",...T,...u,...f],m);return(...x)=>E(oe,M,...H,...x)}:(f)=>{let E=Q(["Object",...T,...u,...f],m);return(...x)=>E(M,...H,...x)},u,r,g,h,n),r,a)}function Se(e,r,n){if(n.length===0)return e;let o=n.map((s)=>r.indexOf(s));return(...s)=>{for(let a of o){if(a<0)continue;let g=s[a];if(typeof g==="string"&&B.has(g))return}return e(...s)}}function ve(e,r,n,o,s,a){let g=e([]),u=o.every((m,d)=>m.index===d);if(r.length===n.length&&u)return Z(g,r,e,void 0,a);return Z((...m)=>{let d=Array(s.length);for(let f=0;f<s.length;f++)d[f]=m[s[f]];return g(...d)},r,e,(m)=>{g=e(m)},a)}function Z(e,r,n,o,s){let g=/^(\w+) is not defined$/,u=e,h=[],m=new Set(r);return(...d)=>{for(let f=0;f<=8;f++)try{return u(...d)}catch(E){let x=E instanceof Error?E.message:"",w=g.exec(x);if(!(E instanceof ReferenceError)||!w)return;let y=w[1];if(m.has(y)||ce.has(y)||U.has(y))return;if(s?.(y),m.add(y),h.push(y),o)o(h);else u=n(h)}return}}function kr(e){let r=e.trim();try{let n=re(r);if(/\b(?:eval|function|import|require|process|globalthis|window|document|fetch|bun|deno|buffer|console|reflect|proxy|prototype|constructor|this)\b/i.test(n))return!1;ie(n,r),ae(r);for(let o of j)if(o.test(n))return!1}catch{return!1}return!0}
40
- export{t,Y,In,xr,i,se,Js,I,Ft,On,Ys,Sr,l,p,Ki,D,Re,it,c,kr};
39
+ `;return Se(ve(s?(f)=>{let E=Q([F,"Object",...T,...u,...f],m);return(...x)=>E(se,M,...H,...x)}:(f)=>{let E=Q(["Object",...T,...u,...f],m);return(...x)=>E(M,...H,...x)},u,r,g,h,n),r,a)}function Se(e,r,n){if(n.length===0)return e;let o=n.map((s)=>r.indexOf(s));return(...s)=>{for(let a of o){if(a<0)continue;let g=s[a];if(typeof g==="string"&&B.has(g))return}return e(...s)}}function ve(e,r,n,o,s,a){let g=e([]),u=o.every((m,d)=>m.index===d);if(r.length===n.length&&u)return Z(g,r,e,void 0,a);return Z((...m)=>{let d=Array(s.length);for(let f=0;f<s.length;f++)d[f]=m[s[f]];return g(...d)},r,e,(m)=>{g=e(m)},a)}function Z(e,r,n,o,s){let g=/^(\w+) is not defined$/,u=e,h=[],m=new Set(r);return(...d)=>{for(let f=0;f<=8;f++)try{return u(...d)}catch(E){let x=E instanceof Error?E.message:"",w=g.exec(x);if(!(E instanceof ReferenceError)||!w)return;let y=w[1];if(m.has(y)||ce.has(y)||U.has(y))return;if(s?.(y),m.add(y),h.push(y),o)o(h);else u=n(h)}return}}function Cr(e){let r=e.trim();try{let n=re(r);if(/\b(?:eval|function|import|require|process|globalthis|window|document|fetch|bun|deno|buffer|console|reflect|proxy|prototype|constructor|this)\b/i.test(n))return!1;ie(n,r),ae(r);for(let o of j)if(o.test(n))return!1}catch{return!1}return!0}
40
+ export{t,Y,On,Sr,i,oe,Ys,I,zt,Dn,Zs,kr,l,p,Xi,D,Ae,at,c,Cr};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ur,Wr,qr,Ra,Aa,Pa,Do,Ia,Oa}from"./chunk-67tpacz0.js";export{Ur as ImageProcessorCache,Do as applyTransformations,Ra as clearImageCache,Ia as generateResponsiveVariants,Oa as generateSrcset,Wr as getCachedImageResult,Pa as optimizeImage,Aa as processImage,qr as setCachedImageResult};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- function c(i){if(!i.startsWith("/")||/[?#\\]/.test(i))throw Error(`Invalid route rule pattern: ${i}`);let t=i==="/"?[]:i.slice(1).split("/");if(t.some((r,e)=>!r||r.includes("*")&&r!=="*"&&r!=="**"||r==="**"&&e!==t.length-1||r.startsWith(":")&&!/^:[\w]+$/.test(r)))throw Error(`Unsupported route rule pattern: ${i}`);return t}function Hr(i){for(let[t,r]of Object.entries(i)){if(c(t),!r||typeof r!=="object"||Object.keys(r).some((e)=>e!=="rendering"&&e!=="cache"))throw Error(`Unsupported route rule for ${t}`);if(r.rendering!==void 0&&r.rendering!=="prerender"&&r.rendering!=="dynamic")throw Error(`Unsupported rendering mode for ${t}`);if(r.cache!==void 0&&r.cache!==!1){let e=r.cache;if(!e||e.public!==!0||Object.keys(e).some((n)=>!["public","maxAge","swr"].includes(n))||!Number.isFinite(e.maxAge)||e.maxAge<=0||e.swr!==void 0&&(!Number.isFinite(e.swr)||e.swr<0))throw Error(`Route cache for ${t} requires public: true, maxAge > 0 and swr >= 0`);if(r.rendering==="prerender")throw Error(`Prerendered route ${t} cannot revalidate; use dynamic rendering with cache`)}}}function qt(i={}){Hr(i);let t=(e)=>e==="**"?0:e==="*"?1:e.startsWith(":")?2:3,r=Object.entries(i).map(([e,n])=>({pattern:e,parts:c(e),rule:n}));return r.sort((e,n)=>{for(let o=0;o<Math.max(e.parts.length,n.parts.length);o++){let s=(n.parts[o]===void 0?4:t(n.parts[o]))-(e.parts[o]===void 0?4:t(e.parts[o]));if(s)return s}return e.pattern.localeCompare(n.pattern)}),(e)=>{let n=e==="/"?[]:e.replace(/\/$/,"").slice(1).split("/");return r.find(({parts:o})=>o.every((s,u)=>s==="**"||n[u]!==void 0&&(s==="*"||s.startsWith(":")||s===n[u]))&&(o.at(-1)==="**"||o.length===n.length))?.rule??{}}}
3
- export{Hr,qt};
2
+ function c(i){if(!i.startsWith("/")||/[?#\\]/.test(i))throw Error(`Invalid route rule pattern: ${i}`);let t=i==="/"?[]:i.slice(1).split("/");if(t.some((r,e)=>!r||r.includes("*")&&r!=="*"&&r!=="**"||r==="**"&&e!==t.length-1||r.startsWith(":")&&!/^:[\w]+$/.test(r)))throw Error(`Unsupported route rule pattern: ${i}`);return t}function Vr(i){for(let[t,r]of Object.entries(i)){if(c(t),!r||typeof r!=="object"||Object.keys(r).some((e)=>e!=="rendering"&&e!=="cache"))throw Error(`Unsupported route rule for ${t}`);if(r.rendering!==void 0&&r.rendering!=="prerender"&&r.rendering!=="dynamic")throw Error(`Unsupported rendering mode for ${t}`);if(r.cache!==void 0&&r.cache!==!1){let e=r.cache;if(!e||e.public!==!0||Object.keys(e).some((n)=>!["public","maxAge","swr"].includes(n))||!Number.isFinite(e.maxAge)||e.maxAge<=0||e.swr!==void 0&&(!Number.isFinite(e.swr)||e.swr<0))throw Error(`Route cache for ${t} requires public: true, maxAge > 0 and swr >= 0`);if(r.rendering==="prerender")throw Error(`Prerendered route ${t} cannot revalidate; use dynamic rendering with cache`)}}}function Gt(i={}){Vr(i);let t=(e)=>e==="**"?0:e==="*"?1:e.startsWith(":")?2:3,r=Object.entries(i).map(([e,n])=>({pattern:e,parts:c(e),rule:n}));return r.sort((e,n)=>{for(let o=0;o<Math.max(e.parts.length,n.parts.length);o++){let s=(n.parts[o]===void 0?4:t(n.parts[o]))-(e.parts[o]===void 0?4:t(e.parts[o]));if(s)return s}return e.pattern.localeCompare(n.pattern)}),(e)=>{let n=e==="/"?[]:e.replace(/\/$/,"").slice(1).split("/");return r.find(({parts:o})=>o.every((s,u)=>s==="**"||n[u]!==void 0&&(s==="*"||s.startsWith(":")||s===n[u]))&&(o.at(-1)==="**"||o.length===n.length))?.rule??{}}}
3
+ export{Vr,Gt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{wu,xu}from"./chunk-9734nkc8.js";import"./chunk-y6gj9jq8.js";import"./chunk-vhajhs44.js";import"./chunk-s4pjf2pc.js";import"./chunk-r4wqh5fd.js";import"./chunk-dnqq1ze0.js";import"./chunk-wzjf33es.js";import"./chunk-6xsm53pz.js";import"./chunk-3cnwstra.js";import"./chunk-bhf9yt2w.js";import"./chunk-td5100fz.js";import"./chunk-x8q5przn.js";import"./chunk-06wv8qwy.js";import"./chunk-bsy8v1xj.js";import"./chunk-sswjv8p9.js";import"./chunk-azpkje69.js";import"./chunk-rmv35cx0.js";export{xu as clearStoreCache,wu as getStoreScript};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{da,wo,pa,fa,xo,ga,ma,ha,ya,So,ba,wl}from"./chunk-wy53pys4.js";import{Io,Ca}from"./chunk-td30jg06.js";import{B,F,z,Kt,Q,ce,Kn,Be,wt,Xt,Jt,Yt,H,Zt,Qt,Xn}from"./chunk-m95zjk91.js";import{tc}from"./chunk-efy3038a.js";import"./chunk-yzj55rfs.js";export{F as DEFAULT_FORMATS,z as DEFAULT_QUALITY,B as DEFAULT_WIDTHS,Xn as ImageProcessingError,fa as clearImageCache,xo as createImageDirective,Ca as createImageHandler,ma as createImagePlugin,wl as defaultImageConfig,Qt as formatSize,So as generateImageManifest,wt as generateSizes,Be as generateSrcSet,Xt as getFallbackVariant,Kn as getImageMetadata,H as getMimeType,Zt as getTotalSize,Jt as groupVariantsByFormat,Io as handleImageRequest,ga as imageDirective,Q as isImageBackendAvailable,Yt as isImageFile,Kt as isSharpAvailable,ya as optimizeDirectory,ha as optimizeImage,wo as parseImageComponent,ce as processImage,pa as processImageComponents,da as renderImageComponent,tc as rewriteImagesWithSiblings,ba as writeImageManifest};
@@ -159,7 +159,7 @@ else {
159
159
  stxIslands.initIslands();
160
160
  }
161
161
  })();
162
- </script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function Fa(){let e=new Map;return{islands:e,register(t){e.set(t.id,t)},get(t){return e.get(t)},async hydrate(t){let n=e.get(t);if(!n||n.hydrated)return;if(n.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:t,component:n.component}}))},async hydrateAll(){let t=Array.from(e.values()).filter((n)=>!n.hydrated).map((n)=>this.hydrate(n.id));await Promise.all(t)}}}function I(e){return`
162
+ </script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function za(){let e=new Map;return{islands:e,register(t){e.set(t.id,t)},get(t){return e.get(t)},async hydrate(t){let n=e.get(t);if(!n||n.hydrated)return;if(n.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:t,component:n.component}}))},async hydrateAll(){let t=Array.from(e.values()).filter((n)=>!n.hydrated).map((n)=>this.hydrate(n.id));await Promise.all(t)}}}function I(e){return`
163
163
  <script data-hydrate="${e}">
164
164
  (function() {
165
165
  const island = document.querySelector('[data-island="${e}"]');
@@ -311,7 +311,7 @@ else {
311
311
  });
312
312
  })();
313
313
  </script>
314
- `}function za(e,t={},n){let r=e,i=!1,d=/@client:(load|idle|visible|media|only|hover|event)/i.test(e);if(r=u(r,"load",t),r=u(r,"idle",t),r=u(r,"visible",t),r=u(r,"media",t),r=M(r),r=u(r,"hover",t),r=u(r,"event",t),i=d&&r!==e,i)r+=`
314
+ `}function Ha(e,t={},n){let r=e,i=!1,d=/@client:(load|idle|visible|media|only|hover|event)/i.test(e);if(r=u(r,"load",t),r=u(r,"idle",t),r=u(r,"visible",t),r=u(r,"media",t),r=M(r),r=u(r,"hover",t),r=u(r,"event",t),i=d&&r!==e,i)r+=`
315
315
  `+v();return r}function u(e,t,n){let r=new RegExp(`@client:${t}(?:\\s*\\(([^)]*)\\))?\\s*([\\s\\S]*?)@endclient`,"gi");return e.replace(r,(i,d,o)=>{let a={strategy:t};if(d)try{let E=d.split(",").map((h)=>h.trim());for(let h of E){let[m,g]=h.split(":").map((p)=>p.trim());if(m&&g){let p=g.replace(/^['"]|['"]$/g,"");a[m]=p}}}catch{}let s=`island-${Math.random().toString(36).substring(2,9)}`,y=b(o.trim()),f=w(o.trim(),n),c=[];if(a.rootMargin)c.push(`data-root-margin="${a.rootMargin}"`);if(a.threshold!==void 0)c.push(`data-threshold="${a.threshold}"`);if(a.media)c.push(`data-media="${a.media}"`);if(a.event)c.push(`data-event="${a.event}"`);if(y)c.push(`data-component="${y}"`);let x=Object.keys(f).length>0?`
316
316
  <script type="application/json" data-island-props="${s}">${JSON.stringify(f)}</script>`:"",l="";switch(t){case"load":l=I(s);break;case"idle":l=L(s,a);break;case"visible":l=C(s,a);break;case"media":l=S(s,a);break;case"hover":l=k(s);break;case"event":l=H(s,a);break}return`
317
317
  <div data-island="${s}"
@@ -342,7 +342,7 @@ else {
342
342
  }
343
343
  })();
344
344
  </script>
345
- `})}function Ha(){return`
345
+ `})}function Va(){return`
346
346
  /* Island base styles */
347
347
  .stx-island {
348
348
  display: contents;
@@ -383,9 +383,9 @@ else {
383
383
  .stx-island.hydrated {
384
384
  opacity: 1;
385
385
  }
386
- `}function Va(e){if(typeof window>"u")return;let t=document.querySelector(`[data-island="${e}"]`);if(!t||t.classList.contains("hydrated"))return;t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function Ua(e){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${e}"]:not(.hydrated)`).forEach((n)=>{n.classList.add("hydrated"),n.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function Wa(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((t)=>{t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function qa(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function Ga(e){return new Promise((t)=>{if(typeof window>"u"){t();return}let n=document.querySelector(`[data-island="${e}"]`);if(!n){t();return}if(n.classList.contains("hydrated")){t();return}n.addEventListener("stx:hydrated",()=>t(),{once:!0})})}function Ka(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function Xa(e){let t=e.map((n)=>({id:n.id,component:n.component,strategy:n.options.strategy,props:n.props}));return`
386
+ `}function Ua(e){if(typeof window>"u")return;let t=document.querySelector(`[data-island="${e}"]`);if(!t||t.classList.contains("hydrated"))return;t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function Wa(e){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${e}"]:not(.hydrated)`).forEach((n)=>{n.classList.add("hydrated"),n.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function qa(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((t)=>{t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function Ga(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function Ka(e){return new Promise((t)=>{if(typeof window>"u"){t();return}let n=document.querySelector(`[data-island="${e}"]`);if(!n){t();return}if(n.classList.contains("hydrated")){t();return}n.addEventListener("stx:hydrated",()=>t(),{once:!0})})}function Xa(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function Ja(e){let t=e.map((n)=>({id:n.id,component:n.component,strategy:n.options.strategy,props:n.props}));return`
387
387
  <script type="application/json" id="stx-island-manifest">
388
388
  ${JSON.stringify(t)}
389
389
  </script>
390
- `}var Xl={processPartialHydrationDirectives:za,processStaticDirectives:Ka,generatePartialHydrationCSS:Ha,generateIslandManifest:Xa,createIslandRegistry:Fa,hydrateIsland:Va,hydrateByStrategy:Ua,hydrateAll:Wa,isHydrated:qa,onHydrated:Ga};
391
- export{Fa,za,Ha,Va,Ua,Wa,qa,Ga,Ka,Xa,Xl};
390
+ `}var Jl={processPartialHydrationDirectives:Ha,processStaticDirectives:Xa,generatePartialHydrationCSS:Va,generateIslandManifest:Ja,createIslandRegistry:za,hydrateIsland:Ua,hydrateByStrategy:Wa,hydrateAll:qa,isHydrated:Ga,onHydrated:Ka};
391
+ export{za,Ha,Va,Ua,Wa,qa,Ga,Ka,Xa,Ja,Jl};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ea,Bl,Ta,$a,Fl,zl}from"./chunk-mn7a5b55.js";import"./chunk-r4wqh5fd.js";import"./chunk-dnqq1ze0.js";import"./chunk-wzjf33es.js";import"./chunk-6xsm53pz.js";import"./chunk-3cnwstra.js";import"./chunk-bhf9yt2w.js";import"./chunk-td5100fz.js";import"./chunk-x8q5przn.js";import"./chunk-06wv8qwy.js";import"./chunk-bsy8v1xj.js";import"./chunk-sswjv8p9.js";import"./chunk-azpkje69.js";import"./chunk-rmv35cx0.js";export{zl as applySlots,Fl as extractSlotContent,Bl as parseSlotElement,Ea as parseSlots,$a as processSlots,Ta as renderSlot};
@@ -1,12 +1,12 @@
1
1
  // @bun
2
- function o(t,i){let n=t[i],e=i+1;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===n)return e+1;e++}return t.length}function b(t,i){let n=i+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=Li(t,n+2),n<t.length)n++;continue}n++}return t.length}function Li(t,i){let n=1,e=i,r="{",f="";while(e<t.length){let l=t[e];if(l==="\\"){e+=2;continue}if(l==='"'||l==="'"){e=o(t,e),r=h,f="";continue}if(l==="`"){e=b(t,e),r=h,f="";continue}if(l==="/"&&t[e+1]==="/"){while(e<t.length&&t[e]!==`
2
+ function o(t,i){let n=t[i],e=i+1;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===n)return e+1;e++}return t.length}function b(t,i){let n=i+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=ji(t,n+2),n<t.length)n++;continue}n++}return t.length}function ji(t,i){let n=1,e=i,r="{",f="";while(e<t.length){let l=t[e];if(l==="\\"){e+=2;continue}if(l==='"'||l==="'"){e=o(t,e),r=h,f="";continue}if(l==="`"){e=b(t,e),r=h,f="";continue}if(l==="/"&&t[e+1]==="/"){while(e<t.length&&t[e]!==`
3
3
  `)e++;continue}if(l==="/"&&t[e+1]==="*"){e+=2;while(e<t.length&&t.slice(e,e+2)!=="*/")e++;e+=2;continue}if(l==="/"&&a(r,f)){let u=w(t,e);if(u!==-1){e=u,r=h,f="";continue}}if(l==="{")n++;else if(l==="}"){if(n--,n===0)return e}if(/[\w$]/.test(l))f=/[\w$]/.test(r)?f+l:l,r=l;else if(!/\s/.test(l))r=l,f="";e++}return t.length}var m=new Set(["return","typeof","instanceof","in","of","new","delete","void","throw","case","do","else","yield","await"]);function a(t,i){if(i)return m.has(i);return!(t===")"||t==="]"||t===h)}var h="\x00";function w(t,i){let n=i+1,e=!1;while(n<t.length){let r=t[n];if(r===`
4
4
  `)return-1;if(r==="\\"){n+=2;continue}if(r==="[")e=!0;else if(r==="]")e=!1;else if(r==="/"&&!e){n++;while(n<t.length&&/[a-z]/i.test(t[n]))n++;return n}n++}return-1}function s(t){let i="",n=0,e="",r="";while(n<t.length){let f=t.slice(n,n+2);if(f==="//"){while(n<t.length&&t[n]!==`
5
5
  `)i+=" ",n++;continue}if(f==="/*"){while(n<t.length&&t.slice(n,n+2)!=="*/")i+=t[n]===`
6
6
  `?`
7
7
  `:" ",n++;i+=" ",n+=2;continue}let l=t[n];if(l==='"'||l==="'"){let u=l;i+=" ",n++;while(n<t.length&&t[n]!==u){if(t[n]==="\\"){i+=" ",n+=2;continue}i+=t[n]===`
8
8
  `?`
9
- `:" ",n++}i+=" ",n++,e=h,r="";continue}if(l==="/"&&a(e,r)){let u=w(t,n);if(u!==-1){i+=`/${" ".repeat(u-n-2)}/`,n=u,e=h,r="";continue}}if(l==="`"){i+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){i+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let u=n+2,g=Li(t,u);if(i+=" ",i+=s(t.slice(u,g)),g<t.length)i+=" ";n=g+1;continue}i+=t[n]===`
9
+ `:" ",n++}i+=" ",n++,e=h,r="";continue}if(l==="/"&&a(e,r)){let u=w(t,n);if(u!==-1){i+=`/${" ".repeat(u-n-2)}/`,n=u,e=h,r="";continue}}if(l==="`"){i+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){i+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let u=n+2,g=ji(t,u);if(i+=" ",i+=s(t.slice(u,g)),g<t.length)i+=" ";n=g+1;continue}i+=t[n]===`
10
10
  `?`
11
- `:" ",n++}i+=" ",n++,e=h,r="";continue}if(i+=l,n++,/[\w$]/.test(l))r=/[\w$]/.test(e)?r+l:l,e=l;else if(!/\s/.test(l))e=l,r=""}return i}function Ee(t){let i=new Uint16Array(t.length),n=0,e=!0;for(let r=0;r<t.length;r++){let f=t[r];if(f===")"||f==="]"||f==="}")if(n===0)e=!1;else n--;if(i[r]=n,f==="("||f==="["||f==="{")n++}return{depths:i,balanced:e&&n===0}}
12
- export{Li,s,Ee};
11
+ `:" ",n++}i+=" ",n++,e=h,r="";continue}if(i+=l,n++,/[\w$]/.test(l))r=/[\w$]/.test(e)?r+l:l,e=l;else if(!/\s/.test(l))e=l,r=""}return i}function Te(t){let i=new Uint16Array(t.length),n=0,e=!0;for(let r=0;r<t.length;r++){let f=t[r];if(f===")"||f==="]"||f==="}")if(n===0)e=!1;else n--;if(i[r]=n,f==="("||f==="["||f==="{")n++}return{depths:i,balanced:e&&n===0}}
12
+ export{ji,s,Te};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{nu,ru}from"./chunk-vw62fjpv.js";export{ru as ensureTeleportTargets,nu as processTeleportDirectives};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ei,ti,ni,oc,ic}from"./chunk-tydv84gj.js";export{ti as auditBuildOutput,ei as auditConfig,ni as calculateAuditResult,ic as formatAuditResult,oc as runPwaAudit};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{va,ko,xl,wa,xa,Sl,kl}from"./chunk-w67rrd1f.js";import"./chunk-htf3z9et.js";import"./chunk-y6gj9jq8.js";import"./chunk-vhajhs44.js";import"./chunk-s4pjf2pc.js";import{Ye,Pc}from"./chunk-r4wqh5fd.js";import"./chunk-dnqq1ze0.js";import"./chunk-wzjf33es.js";import"./chunk-6xsm53pz.js";import"./chunk-3cnwstra.js";import"./chunk-bhf9yt2w.js";import"./chunk-td5100fz.js";import"./chunk-x8q5przn.js";import"./chunk-06wv8qwy.js";import"./chunk-bsy8v1xj.js";import"./chunk-sswjv8p9.js";import"./chunk-azpkje69.js";import"./chunk-rmv35cx0.js";export{va as buildVirtualSource,Ye as extractScriptBlocks,Pc as extractTemplateExpressions,wa as findRuntimeTypeDeclarations,xa as findStxModuleDeclarations,kl as formatTypecheckDiagnostics,xl as sourcePathFor,Sl as typecheckStxFiles,ko as virtualPathFor};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{tc}from"./chunk-efy3038a.js";export{tc as rewriteImagesWithSiblings};
@@ -1,7 +1,7 @@
1
1
  // @bun
2
- import{jt,C}from"./chunk-48s1nprc.js";import m from"fs";import e from"path";async function _n(r,o,i){if(r.__stx_runtime_config)return;let n=jt();if(n||i){r.__stx_runtime_config=n??C(i);return}let t=e.dirname(e.resolve(o));while(!0){if(["stx.config.ts","stx.config.js",".config/stx.config.ts",".config/stx.config.js"].some((f)=>m.existsSync(e.join(t,f)))){let{loadStxConfig:f}=await import("./chunk-zg0pnh4w.js"),c=await f(t);if(c.runtimeConfig)r.__stx_runtime_config=C(c.runtimeConfig);return}let s=e.dirname(t);if(s===t)return;t=s}}async function Fs(r,o){function i(n){if(n===null)return"null";if(Array.isArray(n))return`Array<${n.length?[...new Set(n.map(i))].join(" | "):"unknown"}>`;if(typeof n==="object")return`{ ${Object.entries(n).map(([t,s])=>`readonly ${JSON.stringify(t)}: ${i(s)}`).join("; ")} }`;return typeof n}await Bun.write(e.join(r,".stx/runtime-config.d.ts"),`import '@stacksjs/stx/runtime-config'
2
+ import{Bt,C}from"./chunk-bhf9yt2w.js";import m from"fs";import e from"path";async function En(r,o,i){if(r.__stx_runtime_config)return;let n=Bt();if(n||i){r.__stx_runtime_config=n??C(i);return}let t=e.dirname(e.resolve(o));while(!0){if(["stx.config.ts","stx.config.js",".config/stx.config.ts",".config/stx.config.js"].some((f)=>m.existsSync(e.join(t,f)))){let{loadStxConfig:f}=await import("./chunk-3ttnn4t3.js"),c=await f(t);if(c.runtimeConfig)r.__stx_runtime_config=C(c.runtimeConfig);return}let s=e.dirname(t);if(s===t)return;t=s}}async function zs(r,o){function i(n){if(n===null)return"null";if(Array.isArray(n))return`Array<${n.length?[...new Set(n.map(i))].join(" | "):"unknown"}>`;if(typeof n==="object")return`{ ${Object.entries(n).map(([t,s])=>`readonly ${JSON.stringify(t)}: ${i(s)}`).join("; ")} }`;return typeof n}await Bun.write(e.join(r,".stx/runtime-config.d.ts"),`import '@stacksjs/stx/runtime-config'
3
3
  declare module '@stacksjs/stx/runtime-config' { interface PublicRuntimeConfig ${i(o.public??{})} }
4
4
  `),await Bun.write(e.join(r,".stx/runtime-config-server.d.ts"),`import '@stacksjs/stx/runtime-config-server'
5
5
  declare module '@stacksjs/stx/runtime-config-server' { interface PrivateRuntimeConfig ${i(o.private??{})} }
6
6
  `)}
7
- export{_n,Fs};
7
+ export{En,zs};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{nr,bc,Xu,vc,Ju,wc,rr,b,Ot,ke,xc,ys,Sc,Yu,X,kc,Zu,x,Qu}from"./chunk-r4wqh5fd.js";import"./chunk-dnqq1ze0.js";import"./chunk-wzjf33es.js";import"./chunk-6xsm53pz.js";import"./chunk-3cnwstra.js";import"./chunk-bhf9yt2w.js";import"./chunk-td5100fz.js";import"./chunk-x8q5przn.js";import"./chunk-06wv8qwy.js";import"./chunk-bsy8v1xj.js";import"./chunk-sswjv8p9.js";import"./chunk-azpkje69.js";import"./chunk-rmv35cx0.js";export{kc as applyFilters,Ju as clearCustomFilters,xc as clientLoopScopes,nr as defaultFilters,b as escapeHtml,Ot as escapeHtmlValue,x as evaluateExpression,wc as findMustacheEnd,vc as getAllFilters,Sc as interpolateScriptAttributes,ys as interpolateScriptExpressions,Yu as interpolateScriptsInTemplate,X as processExpressions,bc as registerFilter,Xu as registerFilters,rr as replaceInterpolations,Zu as resetRejectedExpressionWarnings,Qu as unescapeHtml,ke as usesSignalsInScript};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{A,el,js,o,P,yd,bd}from"./chunk-r4wqh5fd.js";import"./chunk-dnqq1ze0.js";import"./chunk-wzjf33es.js";import"./chunk-6xsm53pz.js";import"./chunk-3cnwstra.js";import"./chunk-bhf9yt2w.js";import"./chunk-td5100fz.js";import"./chunk-x8q5przn.js";import"./chunk-06wv8qwy.js";import"./chunk-bsy8v1xj.js";import"./chunk-sswjv8p9.js";import"./chunk-azpkje69.js";import"./chunk-rmv35cx0.js";export{P as config,A as defaultConfig,yd as defineStxConfig,js as discoverConfig,o as loadStxConfig,el as resolveStxDirectories,bd as validateConfig};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{mu,hu,yu,bu,vu}from"./chunk-mvwcf4xy.js";export{hu as defineAsyncComponent,bu as generateAsyncComponentCSS,vu as generateAsyncComponentRuntime,yu as isAsyncComponent,mu as processAsyncDirectives};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{B,F,z,Kt,Q,ce,Kn,_a,Be,wt,Xt,Jt,Yt,H,Zt,Qt,Xn}from"./chunk-m95zjk91.js";import"./chunk-yzj55rfs.js";export{F as DEFAULT_FORMATS,z as DEFAULT_QUALITY,B as DEFAULT_WIDTHS,Xn as ImageProcessingError,Qt as formatSize,wt as generateSizes,Be as generateSrcSet,Xt as getFallbackVariant,Kn as getImageMetadata,H as getMimeType,Zt as getTotalSize,Jt as groupVariantsByFormat,Q as isImageBackendAvailable,Yt as isImageFile,Kt as isSharpAvailable,ce as processImage,_a as resizeAndConvert};