@stacksjs/stx 0.2.861 → 0.2.863

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 (291) hide show
  1. package/dist/analytics.js +3 -2
  2. package/dist/animation.js +3 -3
  3. package/dist/app-shell.js +4 -3
  4. package/dist/{chunk-14cvwsy1.js → chunk-01c16zw4.js} +2 -2
  5. package/dist/chunk-021tjkd6.js +3 -0
  6. package/dist/chunk-0bfgsv31.js +2 -0
  7. package/dist/chunk-0twkeh31.js +2 -0
  8. package/dist/chunk-0xtda6aw.js +2 -0
  9. package/dist/chunk-15m7jnc0.js +33 -0
  10. package/dist/{chunk-7bajrfb1.js → chunk-1grdbpsk.js} +8 -8
  11. package/dist/{chunk-9syvkm5z.js → chunk-1mqcttg3.js} +6 -6
  12. package/dist/chunk-2asyyky3.js +2 -0
  13. package/dist/{chunk-eye156nv.js → chunk-2c18y094.js} +1 -1
  14. package/dist/chunk-2n932qtv.js +20 -0
  15. package/dist/{chunk-76360zky.js → chunk-32ty2zx6.js} +9 -9
  16. package/dist/chunk-36j129p1.js +2 -0
  17. package/dist/chunk-3gk1e2b1.js +2 -0
  18. package/dist/chunk-3ryp43f3.js +2 -0
  19. package/dist/{chunk-12r22pf0.js → chunk-3z1mmar2.js} +2 -2
  20. package/dist/{chunk-zhxdpzga.js → chunk-46ddesnf.js} +3 -3
  21. package/dist/chunk-46pxmpeb.js +3 -0
  22. package/dist/chunk-4pr29yrx.js +2 -0
  23. package/dist/{chunk-tjz3r7rj.js → chunk-55zq2ha8.js} +5 -5
  24. package/dist/{chunk-avp271q4.js → chunk-58sh82aj.js} +2 -2
  25. package/dist/{chunk-gggadrs4.js → chunk-5a0d3048.js} +3 -3
  26. package/dist/{chunk-121cgm3s.js → chunk-5p1k2h5q.js} +8 -8
  27. package/dist/chunk-5s1fb8z4.js +4 -0
  28. package/dist/{chunk-x69457q9.js → chunk-5zzrrxns.js} +8 -8
  29. package/dist/chunk-64ebysb4.js +2 -0
  30. package/dist/{chunk-4rrxrxp6.js → chunk-669b2bya.js} +4 -4
  31. package/dist/{chunk-38qp2pg2.js → chunk-67dgp45w.js} +2 -2
  32. package/dist/{chunk-5xdkmn39.js → chunk-6ftee542.js} +2 -2
  33. package/dist/{chunk-5wr1qqz3.js → chunk-6k4ac74t.js} +2 -2
  34. package/dist/{chunk-c2w4wc9f.js → chunk-6m6y9bbx.js} +1 -1
  35. package/dist/chunk-6pczzq5f.js +2 -0
  36. package/dist/{chunk-6tp0w6hf.js → chunk-7ayvybdy.js} +3 -3
  37. package/dist/chunk-7mjf144y.js +2 -0
  38. package/dist/chunk-7wqevtks.js +2 -0
  39. package/dist/{chunk-bag9q4m0.js → chunk-8502xb4n.js} +39 -39
  40. package/dist/chunk-85zmxbt0.js +33 -0
  41. package/dist/{chunk-cxpq2zna.js → chunk-8arfg8kp.js} +3 -3
  42. package/dist/{chunk-xmy6g81m.js → chunk-8hhhmscy.js} +2 -2
  43. package/dist/{chunk-fyfvqd2s.js → chunk-8me8hamk.js} +2 -2
  44. package/dist/{chunk-pb09xy77.js → chunk-8s6s6nd0.js} +2 -2
  45. package/dist/chunk-8v1zpdef.js +2 -0
  46. package/dist/chunk-94mpe1ny.js +3 -0
  47. package/dist/{chunk-mzes9ds7.js → chunk-9zrvh3pz.js} +2 -2
  48. package/dist/chunk-a4cn8rf4.js +2 -0
  49. package/dist/{chunk-fpkp0bqf.js → chunk-adqh1gp1.js} +1 -1
  50. package/dist/chunk-ap84eenm.js +2 -0
  51. package/dist/chunk-as2ffje6.js +2 -0
  52. package/dist/chunk-az5xw3w8.js +2 -0
  53. package/dist/chunk-b6w0f610.js +712 -0
  54. package/dist/chunk-ba91r7q9.js +2 -0
  55. package/dist/{chunk-qkcn0exq.js → chunk-brzjass3.js} +6 -6
  56. package/dist/chunk-bwdbj60y.js +3 -0
  57. package/dist/{chunk-3wg9kr5z.js → chunk-bx5d87xx.js} +6 -7
  58. package/dist/chunk-c0t2tdfk.js +2 -0
  59. package/dist/chunk-caxqwrnc.js +2 -0
  60. package/dist/{chunk-37tefp7s.js → chunk-cqhwzd9y.js} +5 -5
  61. package/dist/chunk-cvgbtmxp.js +2 -0
  62. package/dist/chunk-czca8yds.js +42 -0
  63. package/dist/chunk-d0afg5f7.js +2 -0
  64. package/dist/chunk-d9vzfbdp.js +2 -0
  65. package/dist/{chunk-65cbfx5x.js → chunk-dpmayc2w.js} +2 -2
  66. package/dist/{chunk-d6216bcw.js → chunk-dtarm8x9.js} +9 -9
  67. package/dist/chunk-e634vffz.js +3 -0
  68. package/dist/chunk-eafqxbr0.js +2 -0
  69. package/dist/{chunk-qjm23ma2.js → chunk-ew5cey88.js} +1 -1
  70. package/dist/{chunk-xppm4cs4.js → chunk-farh4p7f.js} +3 -3
  71. package/dist/chunk-fnv94wc6.js +2 -0
  72. package/dist/chunk-g4gcf4jn.js +2 -0
  73. package/dist/chunk-g65dptx2.js +2 -0
  74. package/dist/{chunk-q6w7a1vc.js → chunk-gbtbfg7e.js} +3 -3
  75. package/dist/{chunk-15jymk6t.js → chunk-gd56arnm.js} +2 -2
  76. package/dist/{chunk-5ka3h8dy.js → chunk-gjngg182.js} +45 -46
  77. package/dist/{chunk-8hck9qqm.js → chunk-gp8hgpt9.js} +4 -4
  78. package/dist/chunk-gw7t6a3t.js +2 -0
  79. package/dist/chunk-h2qgqjkn.js +2 -0
  80. package/dist/chunk-h65shwe9.js +2 -0
  81. package/dist/{chunk-zpkgs5d3.js → chunk-h816ta81.js} +6 -6
  82. package/dist/chunk-hc6111md.js +54 -0
  83. package/dist/{chunk-cq2hedwn.js → chunk-hev4t4d5.js} +6 -6
  84. package/dist/{chunk-7yhhwv07.js → chunk-hmdkf6c6.js} +2 -2
  85. package/dist/{chunk-vggtxttf.js → chunk-j1efsjsb.js} +5 -5
  86. package/dist/chunk-j4zrq17p.js +2 -0
  87. package/dist/chunk-jfmj0wsy.js +2 -0
  88. package/dist/{chunk-bg0ywp5w.js → chunk-jgra00m8.js} +2 -2
  89. package/dist/{chunk-5rxks14t.js → chunk-k32q90b2.js} +2 -2
  90. package/dist/{chunk-naj146zq.js → chunk-k7dxm48r.js} +2 -2
  91. package/dist/chunk-ks5p5w6z.js +25 -0
  92. package/dist/chunk-kw11yydy.js +2 -0
  93. package/dist/chunk-m9cperj4.js +2 -0
  94. package/dist/{chunk-zs4s9fcq.js → chunk-mcnwvh06.js} +6 -6
  95. package/dist/chunk-meqsd5bt.js +2 -0
  96. package/dist/{chunk-dba4bwkd.js → chunk-mfa07erx.js} +16 -16
  97. package/dist/{chunk-jh2v1vvb.js → chunk-mrh08821.js} +3 -3
  98. package/dist/{chunk-9n8t7v78.js → chunk-n3jw3xpj.js} +2 -2
  99. package/dist/chunk-ns04v3am.js +2 -0
  100. package/dist/chunk-ntbe5q5x.js +16 -0
  101. package/dist/chunk-nttsc0aw.js +14 -0
  102. package/dist/chunk-p0tkhd12.js +2 -0
  103. package/dist/chunk-p2etn78y.js +2 -0
  104. package/dist/{chunk-1nankvf6.js → chunk-pbakxcv8.js} +2 -2
  105. package/dist/{chunk-h4aqpf2r.js → chunk-prrvggcy.js} +5 -5
  106. package/dist/chunk-pyckafsb.js +12 -0
  107. package/dist/{chunk-t5q31st4.js → chunk-q1wxgw5s.js} +2 -2
  108. package/dist/chunk-qa5y30sy.js +72 -0
  109. package/dist/{chunk-m3p4hksq.js → chunk-qbghf76y.js} +4 -4
  110. package/dist/{chunk-a6d92kv6.js → chunk-qcxrcypb.js} +2 -2
  111. package/dist/{chunk-1jwcp2k0.js → chunk-qjey0jk6.js} +2 -2
  112. package/dist/chunk-qmkaqjba.js +2 -0
  113. package/dist/chunk-qxw9h564.js +2 -0
  114. package/dist/chunk-r23zq8yk.js +2 -0
  115. package/dist/{chunk-68w65mhs.js → chunk-r4v4vswq.js} +3 -3
  116. package/dist/chunk-reeaknf2.js +2 -0
  117. package/dist/chunk-rqa92xm4.js +2 -0
  118. package/dist/chunk-rqmb09ss.js +2 -0
  119. package/dist/chunk-s92j8k4z.js +2 -0
  120. package/dist/chunk-s9df8srx.js +6 -0
  121. package/dist/{chunk-dt73ww6m.js → chunk-sb8n32rn.js} +1 -1
  122. package/dist/{chunk-5neezkj1.js → chunk-sj3ry5ck.js} +33 -25
  123. package/dist/chunk-snz2cxqv.js +2 -0
  124. package/dist/{chunk-36vksrry.js → chunk-srgnevws.js} +2 -2
  125. package/dist/chunk-sz6d3v6b.js +2 -0
  126. package/dist/{chunk-9pyvc0dc.js → chunk-tnp2ta5q.js} +2 -2
  127. package/dist/{chunk-gx96hctv.js → chunk-v37zmez0.js} +2 -2
  128. package/dist/chunk-v408qsze.js +2 -0
  129. package/dist/{chunk-thdnk1kd.js → chunk-v4xes880.js} +3 -3
  130. package/dist/chunk-va07zs9v.js +2 -0
  131. package/dist/chunk-vc42mvjn.js +2 -0
  132. package/dist/chunk-vk98r75z.js +2 -0
  133. package/dist/{chunk-yj9nyt93.js → chunk-vvzys1x7.js} +3 -3
  134. package/dist/chunk-vwwpbhd2.js +3 -0
  135. package/dist/{chunk-hyea17hp.js → chunk-w468n41y.js} +155 -157
  136. package/dist/{chunk-f1vvhbmw.js → chunk-w6pzkcjp.js} +2 -2
  137. package/dist/{chunk-15rkvc0t.js → chunk-wk4wg6sn.js} +5 -5
  138. package/dist/chunk-wtfamngc.js +20 -0
  139. package/dist/chunk-x3p4emdp.js +2 -0
  140. package/dist/{chunk-3gfd9t8a.js → chunk-x512h2gv.js} +4 -4
  141. package/dist/{chunk-nwxjh1gv.js → chunk-x7redxyd.js} +4 -4
  142. package/dist/chunk-xcjvx6zt.js +2 -0
  143. package/dist/chunk-xfd3yqgj.js +1327 -0
  144. package/dist/chunk-xjxcwrqs.js +2 -0
  145. package/dist/chunk-xymr4ys9.js +3 -0
  146. package/dist/chunk-xzdkjkyp.js +2 -0
  147. package/dist/{chunk-b1tctqn5.js → chunk-y036cwc7.js} +10 -10
  148. package/dist/chunk-y190sh29.js +16 -0
  149. package/dist/{chunk-wrbhq1y2.js → chunk-yakdcak2.js} +3 -3
  150. package/dist/chunk-ybkwnscv.js +2 -0
  151. package/dist/{chunk-6nb49h13.js → chunk-yhc1c4tr.js} +125 -126
  152. package/dist/chunk-ymdw4fhd.js +3 -0
  153. package/dist/chunk-ynkbv9jq.js +4 -0
  154. package/dist/chunk-yr1zx78b.js +3 -0
  155. package/dist/{chunk-e8nzbz66.js → chunk-ysfeg3cn.js} +2 -2
  156. package/dist/chunk-ytzzth34.js +2 -0
  157. package/dist/chunk-yxpjj003.js +2 -0
  158. package/dist/chunk-z1rs6b4x.js +2 -0
  159. package/dist/chunk-z383x16t.js +2 -0
  160. package/dist/chunk-z3gz5fy4.js +2 -0
  161. package/dist/{chunk-tm201m9x.js → chunk-z512gt4v.js} +3 -3
  162. package/dist/{chunk-5n7m8vqx.js → chunk-zbvfjm4a.js} +2 -2
  163. package/dist/chunk-zr22gtpf.js +2 -0
  164. package/dist/chunk-zsnmk5me.js +2 -0
  165. package/dist/chunk-ztbexx3h.js +2 -0
  166. package/dist/cli.js +35 -35
  167. package/dist/client/signals-timer-runtime.js +12 -4
  168. package/dist/craft-entry.js +2 -2
  169. package/dist/craft.js +2 -2
  170. package/dist/dev-server/serve-app.js +3 -2
  171. package/dist/dev-server/serve-multi.js +3 -4
  172. package/dist/dev-server/ts-css.js +4 -5
  173. package/dist/document-shell.js +4 -3
  174. package/dist/document-tags.d.ts +8 -0
  175. package/dist/document-tags.js +37 -0
  176. package/dist/events.js +2 -1
  177. package/dist/head-injection.js +2 -1
  178. package/dist/heatmap.js +2 -1
  179. package/dist/hot-reload.js +3 -1
  180. package/dist/index.d.ts +1 -1
  181. package/dist/index.js +1 -1
  182. package/dist/native-build.js +3 -3
  183. package/dist/process.js +5 -6
  184. package/dist/production-build.js +3 -3
  185. package/dist/pwa/inject.js +3 -3
  186. package/dist/pwa.js +3 -3
  187. package/dist/reactive-bindings.js +2 -1
  188. package/dist/reactive.js +2 -1
  189. package/dist/render.js +1 -1
  190. package/dist/runtime-injection.js +6 -6
  191. package/dist/serve.js +1 -1
  192. package/dist/site-builder/build.js +1 -1
  193. package/dist/site-builder/i18n.js +2 -2
  194. package/dist/site-builder/router.js +1 -1
  195. package/dist/site-builder/theme.js +1 -1
  196. package/dist/ssg.js +30 -31
  197. package/dist/template-hydrator.js +2 -1
  198. package/dist/web-components/css-scoping.js +3 -3
  199. package/dist/x-element.js +2 -1
  200. package/package.json +5 -5
  201. package/dist/body-close.d.ts +0 -13
  202. package/dist/body-close.js +0 -8
  203. package/dist/chunk-02css3vk.js +0 -14
  204. package/dist/chunk-0hqr6bff.js +0 -2
  205. package/dist/chunk-15sgdvyd.js +0 -2
  206. package/dist/chunk-261t62q4.js +0 -712
  207. package/dist/chunk-2b4a8tbd.js +0 -3
  208. package/dist/chunk-2fw36w1x.js +0 -2
  209. package/dist/chunk-2jcxsw75.js +0 -2
  210. package/dist/chunk-2pbhdaka.js +0 -2
  211. package/dist/chunk-2wba5ypm.js +0 -2
  212. package/dist/chunk-353gnvfe.js +0 -2
  213. package/dist/chunk-3cr5y8v1.js +0 -2
  214. package/dist/chunk-3y7yp0ka.js +0 -2
  215. package/dist/chunk-41wwqw0q.js +0 -2
  216. package/dist/chunk-4a1y51fs.js +0 -2
  217. package/dist/chunk-4a751brg.js +0 -2
  218. package/dist/chunk-4jgcd4d9.js +0 -33
  219. package/dist/chunk-5awhm4na.js +0 -2
  220. package/dist/chunk-5fhp9hxd.js +0 -2
  221. package/dist/chunk-5mg443dw.js +0 -2
  222. package/dist/chunk-5q4tncfw.js +0 -18
  223. package/dist/chunk-5x9ajbq0.js +0 -2
  224. package/dist/chunk-6g7tkmty.js +0 -2
  225. package/dist/chunk-72bj7ea4.js +0 -2
  226. package/dist/chunk-74g64pzt.js +0 -20
  227. package/dist/chunk-7de5y29a.js +0 -54
  228. package/dist/chunk-7ycmnsh5.js +0 -2
  229. package/dist/chunk-811hh6vp.js +0 -2
  230. package/dist/chunk-830ej8d2.js +0 -72
  231. package/dist/chunk-8fkmxrat.js +0 -2
  232. package/dist/chunk-8p9npc8y.js +0 -2
  233. package/dist/chunk-9fz3h6sx.js +0 -2
  234. package/dist/chunk-9jr30fns.js +0 -2
  235. package/dist/chunk-9xr628ew.js +0 -3
  236. package/dist/chunk-a9m6ajd7.js +0 -2
  237. package/dist/chunk-aj6vqdf7.js +0 -25
  238. package/dist/chunk-asr5v51s.js +0 -2
  239. package/dist/chunk-b7nmgkwa.js +0 -42
  240. package/dist/chunk-bv14vry8.js +0 -3
  241. package/dist/chunk-byx82s10.js +0 -2
  242. package/dist/chunk-c9y1g61m.js +0 -2
  243. package/dist/chunk-ck5nzbbv.js +0 -2
  244. package/dist/chunk-cvdm0hgq.js +0 -2
  245. package/dist/chunk-e0fxgbcc.js +0 -2
  246. package/dist/chunk-ed2m6pjf.js +0 -2
  247. package/dist/chunk-ednwdhv0.js +0 -2
  248. package/dist/chunk-egtphftq.js +0 -2
  249. package/dist/chunk-f18rxz70.js +0 -2
  250. package/dist/chunk-fahqq7c4.js +0 -2
  251. package/dist/chunk-fcbpzdyz.js +0 -2
  252. package/dist/chunk-gc79s0wh.js +0 -20
  253. package/dist/chunk-gjnrmz2q.js +0 -4
  254. package/dist/chunk-gp1dt8b8.js +0 -33
  255. package/dist/chunk-h0dsxxz4.js +0 -2
  256. package/dist/chunk-h2cvfp9y.js +0 -2
  257. package/dist/chunk-jhm1228j.js +0 -4
  258. package/dist/chunk-k3yym9zg.js +0 -2
  259. package/dist/chunk-k9fsd6t3.js +0 -2
  260. package/dist/chunk-kepxsjfx.js +0 -2
  261. package/dist/chunk-kgrvvtcy.js +0 -3
  262. package/dist/chunk-kh01rvag.js +0 -2
  263. package/dist/chunk-kv40xq53.js +0 -1329
  264. package/dist/chunk-mad172af.js +0 -2
  265. package/dist/chunk-mjkdskeg.js +0 -12
  266. package/dist/chunk-npt0mdzb.js +0 -2
  267. package/dist/chunk-p95fsnbk.js +0 -2
  268. package/dist/chunk-ptc3yqn3.js +0 -2
  269. package/dist/chunk-pybm7c9p.js +0 -2
  270. package/dist/chunk-q87hkwfg.js +0 -3
  271. package/dist/chunk-qe6631me.js +0 -2
  272. package/dist/chunk-qnx71b17.js +0 -2
  273. package/dist/chunk-qx8cav4w.js +0 -2
  274. package/dist/chunk-rb7cwck6.js +0 -2
  275. package/dist/chunk-s1e0t3hv.js +0 -2
  276. package/dist/chunk-s7vfmasx.js +0 -2
  277. package/dist/chunk-scwbttvt.js +0 -3
  278. package/dist/chunk-shy2hkvj.js +0 -2
  279. package/dist/chunk-sxtvy0sm.js +0 -3
  280. package/dist/chunk-t7z67vf6.js +0 -2
  281. package/dist/chunk-tarvase5.js +0 -2
  282. package/dist/chunk-tqs9pcga.js +0 -2
  283. package/dist/chunk-twjfrywv.js +0 -2
  284. package/dist/chunk-v0wdgxga.js +0 -3
  285. package/dist/chunk-vyna2rsq.js +0 -2
  286. package/dist/chunk-w4gjx2zs.js +0 -18
  287. package/dist/chunk-xhe7pw6e.js +0 -2
  288. package/dist/chunk-y86mpnrg.js +0 -2
  289. package/dist/chunk-z99bf0q0.js +0 -3
  290. package/dist/chunk-zm0g7ntw.js +0 -2
  291. package/dist/chunk-zrm2x65c.js +0 -2
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{W}from"./chunk-261t62q4.js";function n(t){return W(t)}
3
- export{n};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Oa,Na,Ma,Da,Dh}from"./chunk-5ka3h8dy.js";import"./chunk-bag9q4m0.js";import"./chunk-w4gjx2zs.js";import"./chunk-yj9nyt93.js";import"./chunk-kv40xq53.js";import"./chunk-5q4tncfw.js";import"./chunk-7de5y29a.js";import"./chunk-t5q31st4.js";import"./chunk-b7nmgkwa.js";import"./chunk-2b4a8tbd.js";import"./chunk-aj6vqdf7.js";import"./chunk-v0wdgxga.js";import"./chunk-b1tctqn5.js";import"./chunk-02css3vk.js";import"./chunk-h2cvfp9y.js";import"./chunk-z99bf0q0.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{Oa as buildNative,Dh as default,Na as findCraftBinary,Da as getAvailableFormats,Ma as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{cm}from"./chunk-bv14vry8.js";import"./chunk-4jgcd4d9.js";import"./chunk-avp271q4.js";import"./chunk-15rkvc0t.js";import"./chunk-2b4a8tbd.js";import"./chunk-02css3vk.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{cm as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{te,ne,re,jn,ye,Re,Yr,tu,yt,Zt,Bn,Fn,zn,se,Hn,Vn,Zr}from"./chunk-fyfvqd2s.js";import"./chunk-yj9nyt93.js";export{ne as DEFAULT_FORMATS,re as DEFAULT_QUALITY,te as DEFAULT_WIDTHS,Zr as ImageProcessingError,Vn as formatSize,Zt as generateSizes,yt as generateSrcSet,Bn as getFallbackVariant,Yr as getImageMetadata,se as getMimeType,Hn as getTotalSize,Fn as groupVariantsByFormat,ye as isImageBackendAvailable,zn as isImageFile,jn as isSharpAvailable,Re as processImage,tu as resizeAndConvert};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{wn,pg,fg,gg,mg,hg,g,yg,xi,bg,nl,rl}from"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{wn as STX_ENGINE_BINDING_NAMES,xi as convertToCommonJS,nl as extractScriptFromTemplate,g as extractVariables,rl as hasVariables,yg as isCompleteImport,hg as isMissingBindingFailure,gg as isModuleResolutionFailure,mg as isSyntaxFailure,bg as splitDeclaration,pg as stripTypeScript,fg as withoutStxReferrer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Kh,Gh,qf,ms}from"./chunk-b7nmgkwa.js";import"./chunk-2b4a8tbd.js";import"./chunk-v0wdgxga.js";import"./chunk-h2cvfp9y.js";import{Tr}from"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import{at}from"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{at as freeIdentifiers,ms as processComponents,qf as processESImports,Tr as rendersAsElement,Kh as resetMarginStackWarnings,Gh as resetTemplateLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xa,Yl}from"./chunk-15jymk6t.js";import"./chunk-fyfvqd2s.js";import"./chunk-yj9nyt93.js";export{Yl as createImageHandler,xa as handleImageRequest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ko,kh,_h}from"./chunk-gp1dt8b8.js";import"./chunk-74g64pzt.js";import"./chunk-15rkvc0t.js";import"./chunk-mzes9ds7.js";import"./chunk-b1tctqn5.js";import"./chunk-02css3vk.js";import"./chunk-h2cvfp9y.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{_h as clearComposableCache,kh as getComposableScript,ko as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Lm,jm,Bm,Fm,zm,Hm,Vm}from"./chunk-tjz3r7rj.js";export{jm as createKeepAliveCache,Fm as generateKeepAliveCSS,zm as generateKeepAliveRuntime,Hm as onActivated,Vm as onDeactivated,Lm as processKeepAliveDirectives,Bm as shouldCacheComponent};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fa,pm,ga,fm,Gl,Xl,gm,mm}from"./chunk-gc79s0wh.js";import"./chunk-gp1dt8b8.js";import"./chunk-74g64pzt.js";import"./chunk-15rkvc0t.js";import"./chunk-mzes9ds7.js";import"./chunk-b1tctqn5.js";import"./chunk-02css3vk.js";import"./chunk-h2cvfp9y.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import{it,dg}from"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{fa as buildScriptVirtualFile,pm as buildVirtualSource,it as extractScriptBlocks,dg as extractTemplateExpressions,Gl as findRuntimeTypeDeclarations,Xl as findStxModuleDeclarations,mm as formatTypecheckDiagnostics,fm as sourcePathFor,gm as typecheckStxFiles,ga as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ri,si,oi,ii,$s,Rs,oy,iy,ay,cy,As,ly}from"./chunk-dba4bwkd.js";import"./chunk-830ej8d2.js";export{ly as generateDefaultRobotsTxt,As as generateRobotsTxt,iy as generateSitemap,ay as generateSitemapIndex,ii as injectSeoTags,$s as metaDirective,ri as processMetaDirectives,oi as processSeoDirective,si as processStructuredData,oy as registerSeoDirectives,cy as scanForSitemapEntries,Rs as structuredDataDirective};
@@ -1,33 +0,0 @@
1
- // @bun
2
- import{Tn}from"./chunk-830ej8d2.js";import{q,y,Dt,Lt,$r,g,dl,Ci,W,A}from"./chunk-261t62q4.js";import{rn}from"./chunk-avp271q4.js";import{n}from"./chunk-2b4a8tbd.js";import{G}from"./chunk-9xr628ew.js";var X=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function J(t){let s=[],e=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,r;while((r=e.exec(t))!==null)s.push({start:r.index,end:r.index+r[0].length});return s}function N(t,s){return s.some((e)=>t>=e.start&&t<e.end)}function K(t){let s=(t||"").trim();if(!s)return null;if(/[\s>+~,:]/.test(s))return null;let e={},r=s,i=r.match(/^[a-z][\w-]*/i);if(i)e.tag=i[0].toLowerCase(),r=r.slice(i[0].length);while(r.length>0){let o=r.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(o){if(e.attr=o[1],o[3]!==void 0&&o[3]!=="")e.attrValue=o[3];r=r.slice(o[0].length);continue}let c=r.match(/^#([\w-]+)/);if(c){e.id=c[1],r=r.slice(c[0].length);continue}let a=r.match(/^\.([\w-]+)/);if(a){e.className=a[1],r=r.slice(a[0].length);continue}return null}if(!e.tag&&!e.attr&&!e.id&&!e.className)return null;return e}function Y(t,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(t))return!1}if(s.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${s.id}\\s*\\1`,"i").test(t))return!1}if(s.className){let e=t.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!e)return!1;if(!e[2].split(/\s+/).includes(s.className))return!1}return!0}function P(t,s="main"){let e=K(s);if(!e)return null;let r=/<([a-z][\w-]*)\b([^>]*)>/gi,i=J(t),o;while((o=r.exec(t))!==null){if(N(o.index,i))continue;let c=o[1].toLowerCase(),a=o[2]||"";if(a.trimEnd().endsWith("/")||X.has(c))continue;if(e.tag&&e.tag!==c)continue;if(!Y(a,e))continue;let l=o[0],f=o.index+l.length,u=new RegExp(`<(/?)${c}\\b([^>]*)>`,"gi");u.lastIndex=f;let d=1,h;while((h=u.exec(t))!==null){if(N(h.index,i))continue;let S=h[1]==="/";if(!S&&(h[2]||"").trimEnd().endsWith("/"))continue;if(d+=S?-1:1,d===0)return{openTag:l,openIndex:o.index,start:f,end:h.index,tagName:c}}return null}return null}var ht="private, no-store";function Yt(t){return t.replace(/&#(\d+);/g,(s,e)=>F(Number(e),s)).replace(/&#x([0-9a-f]+);/gi,(s,e)=>F(Number.parseInt(e,16),s)).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")}function F(t,s){if(!Number.isInteger(t)||t<0||t>1114111)return s;try{return String.fromCodePoint(t)}catch{return s}}function Te(t){return t.headers.get("X-STX-Router")==="true"}function Z(t,s){if(!t)return s;return t.split(",").some((r)=>r.trim().toLowerCase()===s.toLowerCase())?t:`${t}, ${s}`}function j(t){return{Vary:Z(t,"X-STX-Router")}}function E(t){return t.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function D(t){let s=/<head\b[^>]*>([\s\S]*?)<\/head\s*>/i.exec(t)?.[1]??"",e=/<(meta|link)\b(?:[^>"']|"[^"]*"|'[^']*')*>|<title\b[^>]*>[\s\S]*?<\/title\s*>/giy;return y(s,(r,i)=>(e.lastIndex=i,e.exec(r)?e.lastIndex:-1)).map(({token:r})=>r)}function L(t){let s=Object.create(null),e=t.replace(/^<\w+\b|>$/g,"");for(let r of e.matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g)){let i=r[1].toLowerCase();if(!(i in s))s[i]=r[2]??r[3]??r[4]??""}return s}function Nn(t){let s=[];for(let e of D(t)){if(/^<title\b/i.test(e)){s.push(`<title>${E(e.replace(/^<title\b[^>]*>|<\/title\s*>$/gi,""))}</title>`);continue}let r=L(e);if(/^<meta\b/i.test(e)){let i=r.property?"property":"name",o=Yt(r[i]??"").toLowerCase();if(o==="description"||/^(?:og|twitter):[\w:]+$/.test(o))s.push(`<meta ${i}="${n(o)}" content="${E(r.content??"")}">`)}else{let i=Yt(r.rel??"").toLowerCase();if(i==="canonical"||i==="alternate"&&r.hreflang)s.push(`<link rel="${i}" href="${E(r.href??"")}"${i==="alternate"?` hreflang="${E(r.hreflang)}"`:""}>`)}}return`<template data-stx-page-head="1">${s.join("")}</template>
3
- `}var Q=["media","crossorigin","integrity"];function Mn(t){let s=[];for(let e of D(t)){if(!/^<link\b/i.test(e))continue;let r=L(e);if(Yt(r.rel??"").trim().toLowerCase()!=="stylesheet")continue;if(!r.href||"data-css"in r||"disabled"in r)continue;let i=Q.filter((o)=>(o in r)).map((o)=>` ${o}="${E(r[o])}"`).join("");s.push(`<link rel="stylesheet" href="${E(r.href)}"${i}>`)}return s.length?`<template data-stx-page-css="1">${s.join("")}</template>
4
- `:""}import T from"path";var tt="stx-page-head:",et=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,_={dev:null,prod:null};function nt(){let t=G()?"dev":"prod",s=_[t];if(s!==null)return s;try{let e=import.meta.require("./chunk-ptc3yqn3.js"),r=t==="dev"&&typeof e.getRouterScriptDev==="function"?e.getRouterScriptDev:e.getRouterScript;_[t]=`<script>${r()}</script>`}catch{_[t]=""}return _[t]}async function ma(t,s){if(s===!1)return null;if(s&&typeof s==="string"){let r=T.resolve(t,s);if(await Bun.file(r).exists())return r;return null}let e=T.join(t,"app.stx");if(await Bun.file(e).exists())return e;return null}async function wo(t,s){try{let e=await Bun.file(t).text(),r=e,i=e.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(i)r=i[1].trim();let o=rn(e),c=[...o.client.map((p)=>p.fullTag),...o.signals.map((p)=>p.fullTag)],a=[],l=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,f;while((f=l.exec(e))!==null)a.push(f[0]);let u=r;for(let p of o.server)u=u.replace(p.fullTag,"");for(let p of o.client)u=u.replace(p.fullTag,"");u=u.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let d="<!--__STX_PAGE_SLOT__-->";if(u=u.replace(/<slot\s*\/>/gi,d).replace(/<slot\s*>\s*<\/slot>/gi,d),!u.includes(d))return console.warn(`[stx] Shell ${t} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:h,extractVariables:S,defaultConfig:R,loadStxConfig:b}=await import("./chunk-ed2m6pjf.js"),k=await b(),m={__filename:t,__dirname:T.dirname(t)};for(let p of c){let C=p.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(C&&!p.includes("client")&&!p.includes('type="module"'))await S(C[1],m,t)}let x=await h(u,m,t,{...R,...k,...s},new Set),w=x.indexOf(d);if(w===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:x.substring(0,w),afterSlot:x.substring(w+d.length),filePath:t,shellScripts:c,shellStyles:a}}catch(e){return console.error(`[stx] Error processing shell ${t}:`,e),null}}function Jr(t,s,e){let r,i="",o=s.match(et);if(o){s=s.replace(o[0],"");try{let u=Buffer.from(o[1],"base64").toString("utf8"),d=u.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(d)r=d[1].trim();i=u.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let c=e||r||"stx App",a=nt(),l="<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>${c}</title>
10
- ${i?` ${i}
11
- `:""} ${t.shellStyles.join(`
12
- `)}
13
- </head>
14
- <body>
15
- ${t.beforeSlot}
16
- <div data-stx-content>${s}</div>
17
- ${t.afterSlot}
18
- ${t.shellScripts.filter((u)=>!u.includes("server")).join(`
19
- `)}
20
- ${l}
21
- ${a}
22
- </body>
23
- </html>`}function Ke(t,s={}){let e=t.trim();if(!Tn(e))return t;let r=[],i=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(i){let l=i[1],f=/<style\b[^>]*>[\s\S]*?<\/style>/gi,u;while((u=f.exec(l))!==null)r.push(u[0]);let d=l.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);if(d)r.push(d[0]);let h=l.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);if(h)r.push(h[0])}if(s.preserveHead&&i){let l=[],f=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,u;while((u=f.exec(i[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(u[0]))continue;l.push(u[0])}if(l.length>0)r.unshift(`<!--${tt}${Buffer.from(l.join(`
24
- `),"utf8").toString("base64")}-->`)}let o=e.match(/<body\b[^>]*>/i),c=e.lastIndexOf("</body>");if(o&&c!==-1){let l=o.index+o[0].length,f=e.slice(l,c).trim();if(r.length>0)return r.join(`
25
- `)+`
26
- `+f;return f}let a=e;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,r.join(`
27
- `));return a=a.replace(/<body\b[^>]*>/i,""),a=a.replace(/<\/body\s*>/i,""),a.trim()}var H=/^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;function V(t,s,e,r){if(!H.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 c=`data-stx-scope="${o}"`;for(let a=t.indexOf(c);a!==-1;a=t.indexOf(c,a+c.length))if(a>=e&&a<r)return!1;return!0}function ha(t){return Te(t)}function rt(t,s){let e=[],r=new Set;for(let i of y(t,q)){if(i.start>=s.start&&i.start<s.end)continue;let o=i.token.match(/^<script\b((?:"[^"]*"|'[^']*'|[^'">])*)>/i)?.[1]??"",c=new Map;for(let f of o.matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g))c.set(f[1].toLowerCase(),f[2]??f[3]??f[4]??"");let a=c.get("src")?.trim(),l=c.get("type")?.trim().toLowerCase();if(!a||c.has("server")||l&&!["module","text/javascript","application/javascript"].includes(l))continue;if(c.has("data-stx-runtime")||c.has("data-stx-router")||/^\/_stx\/(?:runtime|router)(?:\.[a-f0-9]{16})?\.js(?:[?#]|$)/i.test(a))continue;if(V(t,i.token,s.start,s.end)||r.has(i.token))continue;r.add(i.token),e.push(i.token)}return e}function Ge(t,s="main"){return!!P(t.trim(),s)}function $e(t,s="main",e=!1){let r=t.trim(),i=[],o=[],c=r.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(c){let x=c[1],w=/<style\b[^>]*>[\s\S]*?<\/style>/gi,p;while((p=w.exec(x))!==null)i.push(p[0]);let C=/<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;while((p=C.exec(x))!==null){if(H.test(p[0])||p[0].includes("__stx_early_mounts")||/^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(p[0]))continue;o.push(p[0])}}let a=P(r,s);if(!a)return(e?Nn(t)+Mn(t):"")+Ke(t);let l=rt(r,a),f=new Set(l),{tagName:u,start:d,end:h}=a,S=r.slice(d,h).trim(),R=[],b=r.match(/<body\b[^>]*>/i),k=r.lastIndexOf("</body>");if(b&&b.index!==void 0&&k!==-1){let w=[[b.index+b[0].length,a.openIndex],[h+`</${u}>`.length,k]],p=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[C,I]of w){if(C>=I)continue;let z=r.slice(C,I),v;p.lastIndex=0;while((v=p.exec(z))!==null){if(V(r,v[0],d,h))continue;R.push(v[0])}}}let m=[];if(e)m.push(Nn(t)+Mn(t));if(i.length>0)m.push(i.join(`
28
- `));if(l.length>0)m.push(l.join(`
29
- `));if(o.length>0)m.push(o.filter((x)=>!f.has(x)).join(`
30
- `));if(R.length>0)m.push(R.filter((x)=>!f.has(x)).join(`
31
- `));return m.push(S),m.join(`
32
- `)}import O from"fs";import B from"path";function ya(t,s,e){return{version:1,buildTime:new Date().toISOString(),routes:t,assets:s,outputDir:e}}function ba(t,s){let e=B.join(s,"manifest.json");O.writeFileSync(e,JSON.stringify(t,null,2))}function wa(t){let s=B.join(t,"manifest.json");if(!O.existsSync(s))return null;try{let e=O.readFileSync(s,"utf-8"),r=JSON.parse(e);if(r.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${r.version}`),null;return r}catch(e){return console.warn("[stx] Failed to load manifest:",e),null}}function M(t,s,e={}){let r=`${encodeURIComponent(t)}=${encodeURIComponent(s)}`;if(e.maxAge!==void 0)r+=`; Max-Age=${e.maxAge}`;if(e.expires)r+=`; Expires=${e.expires.toUTCString()}`;if(e.path)r+=`; Path=${e.path}`;if(e.domain)r+=`; Domain=${e.domain}`;if(e.secure)r+="; Secure";if(e.httpOnly)r+="; HttpOnly";if(e.sameSite)r+=`; SameSite=${e.sameSite}`;return r}async function st(t){let s=t.headers.get("content-type")||"",e={},r=(i,o)=>{let c=e[i];if(c===void 0)e[i]=o;else if(Array.isArray(c))c.push(o);else e[i]=[c,o]};if(s.includes("multipart/form-data")){let i=await t.formData();for(let[o,c]of i.entries())if(typeof c==="string")r(o,c);return e}if(s.includes("application/x-www-form-urlencoded")){for(let[i,o]of new URLSearchParams(await t.text()).entries())r(i,o);return e}return e}function vo(t){if(!t)return!1;let s=t.toUpperCase();return s!=="GET"&&s!=="HEAD"}async function U(t,s={}){let e=s.request,r=s.method??e?.method;if(!e||!vo(r))return{ran:!1};if(typeof t.action!=="function")return{ran:!1};let i={};try{i=await st(e)}catch{}let o=await t.action({request:e,form:i,params:s.params??{},query:t.query??{},cookies:s.cookies??{}});if(o&&typeof o==="object"){let c=o,a=it(c.cookies),l=c.redirect;if(typeof l==="string"&&l)return{redirect:l,ran:!0,...a.length>0?{cookies:a}:{}};let{cookies:f,redirect:u,...d}=c;if(Object.assign(t,d),a.length>0)return{ran:!0,cookies:a}}return{ran:!0}}function it(t){if(!t||typeof t!=="object"||Array.isArray(t))return[];let s=[];for(let[e,r]of Object.entries(t)){if(!e)continue;if(typeof r==="string"){s.push(M(e,r));continue}if(r&&typeof r==="object"){let i=r;if(typeof i.value!=="string")continue;s.push(M(e,i.value,i))}}return s}function va(t,s=[],e){let r=new Headers({Location:t,"Cache-Control":"no-store"});for(let i of s)r.append("Set-Cookie",i);for(let[i,o]of Object.entries(e??{}))if(i.toLowerCase()!=="location")r.set(i,o);return new Response(null,{status:303,headers:r})}async function Dn(t,s={}){let{html:e,context:r,redirect:i,cookies:o}=await ot(t,s),c=Dt(r),a=Lt(r);if(i)return{html:e,redirect:i,cookies:o,status:c,headers:a};let{extractStreamBoundaries:l}=await import("./chunk-ck5nzbbv.js"),f=l(r),u=t.streamTemplates;if(u&&Object.keys(u).length>0){let{processDirectives:d}=await import("./chunk-0hqr6bff.js"),{defaultConfig:h}=await import("./chunk-h0dsxxz4.js"),S=r.streamBoundaries||{},R={...h,autoShell:!1},b=Object.keys(u).map((m)=>({id:m,render:async()=>{let x=typeof S[m]==="function"?await S[m]():void 0;return d(u[m],{...r,$boundary:x},t.sourceFile,R,new Set)}})),k=new Set(b.map((m)=>m.id));f=[...(f||[]).filter((m)=>!k.has(m.id)),...b]}return{html:e,boundaries:f&&f.length>0?f:void 0,cookies:o,status:c,headers:a}}async function ot(t,s){let e={__filename:t.sourceFile,__dirname:t.sourceFile.replace(/[/\\][^/\\]+$/,""),...s};if(!t.hasServerScripts&&!Ci(t.html))return{html:t.html,context:e};for(let c of t.serverScriptContent)try{await g(c,e,t.sourceFile)}catch(a){if(s.__stx_strict_hydration)throw a;console.warn(`[stx] Server script error in ${t.sourceFile}:`,a)}let r=await U(e,{request:s.request,method:s.method,params:s.params??{},cookies:s.cookies??{}}),i=(c)=>{let a=c.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),l=$r(e);if(!l)return a;let f=a.indexOf("</head>");return f<0?l+a:a.slice(0,f)+l+a.slice(f)};if(r.redirect)return{html:t.html,context:e,redirect:r.redirect,cookies:r.cookies};if(!Ci(t.html))return{html:i(t.html),context:e,cookies:r.cookies};let o=new Map;for(let[c,a]of Object.entries(t.placeholders))if(a.expression)try{let l=A(a.expression,e);if(a.type==="raw")o.set(c,l!==void 0&&l!==null?String(l):"");else o.set(c,l!==void 0&&l!==null?W(String(l)):"")}catch(l){if(s.__stx_strict_hydration)throw l;o.set(c,"")}return{html:i(dl(t.html,o)),context:e,cookies:r.cookies}}
33
- export{ht,Yt,Te,j,Nn,Mn,ma,wo,Jr,Ke,ha,Ge,$e,ya,ba,wa,vo,va,Dn};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{wt,qn,Ch}from"./chunk-5neezkj1.js";import{de,Kn,Eh,Gn,_o,Qr,es,Th,$h,Rh,Xn,Jn,Co,ts,Ah}from"./chunk-38qp2pg2.js";import"./chunk-1jwcp2k0.js";export{_o as batch,Ch as default,Kn as derived,Gn as effect,wt as generateSignalsRuntime,qn as generateSignalsRuntimeDev,Jn as isDerived,Xn as isSignal,Eh as memo,es as onDestroy,Qr as onMount,ts as peek,Rh as pendingLifecycleCounts,$h as runDestroyCallbacks,Th as runMountCallbacks,de as state,Co as untrack,Ah as useOptimistic};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ff,gc,Fh,mc,zf,Hf,pn,cr,zh,Vf,Uf,Hh,b}from"./chunk-5q4tncfw.js";import"./chunk-z99bf0q0.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{pn as buildCss,Vf as extractClassNames,Hf as fingerprintConfig,Uf as generateCss,zh as getCachedCSS,Ff as getCssServeAsset,b as injectCss,gc as loadCssEngine,mc as loadCssEngineConfig,cr as rebuildCss,Fh as resetCssCache,zf as resolveUserCssConfig,Hh as withLinkedModuleBundles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ro,Bi,Lg,jg,Bg}from"./chunk-3wg9kr5z.js";import"./chunk-m3p4hksq.js";export{jg as generateManifestLink,ro as generatePwaTags,Lg as generateSwRegistrationScript,Bg as generateThemeColorMeta,Bi as injectPwaTags};
@@ -1,18 +0,0 @@
1
- // @bun
2
- import{w,S,wi,hn}from"./chunk-261t62q4.js";import{Qo}from"./chunk-z99bf0q0.js";import{c}from"./chunk-sxtvy0sm.js";import F from"fs";import d from"path";import{hasLocalConfig as he}from"bunfig";var xt={fg:{light:"neutral-900",dark:"neutral-100",description:"Primary text"},"fg-strong":{light:"neutral-700",dark:"neutral-300",description:"Labels, secondary headings"},"fg-muted":{light:"neutral-600",dark:"neutral-400",description:"Supporting text"},"fg-soft":{light:"neutral-500",dark:"neutral-400",description:"De-emphasised text"},"fg-subtle":{light:"neutral-400",dark:"neutral-500",description:"Recessive, non-essential text"},surface:{light:"neutral-50",dark:"neutral-800",description:"Page and panel background"},"surface-raised":{light:"neutral-100",dark:"neutral-700",description:"Cards, popovers"},"surface-sunken":{light:"neutral-200",dark:"neutral-700",description:"Wells, track backgrounds"},panel:{light:"white",dark:"neutral-800",description:"Card, menu, dialog surface"},field:{light:"white",dark:"neutral-700",description:"Form control surface"},page:{light:"neutral-50",dark:"neutral-900",description:"Page background, behind panels"},content:{light:"white",dark:"neutral-900",description:"Content area under a chrome header - a table or list body"},"surface-hover":{light:"neutral-100",dark:"neutral-700",description:"Row or item highlight on a page or panel"},"surface-raised-hover":{light:"neutral-200",dark:"neutral-600",description:"Raised surface, hovered"},"surface-sunken-hover":{light:"neutral-300",dark:"neutral-600",description:"Sunken surface, hovered"},"field-hover":{light:"neutral-50",dark:"neutral-600",description:"Form control surface, hovered"},link:{light:"blue-500",dark:"blue-400",description:"Hyperlink"},"link-hover":{light:"blue-600",dark:"blue-300",description:"Hyperlink, hovered"},inverse:{light:"neutral-900",dark:"neutral-700",description:"Tooltip bubble, inverted surface"},"inverse-ink":{light:"white",dark:"white",description:"Text on an inverted surface"},line:{light:"neutral-200",dark:"neutral-700",description:"Default border, divider"},"line-strong":{light:"neutral-300",dark:"neutral-600",description:"Input border, focus ring track"},"line-hover":{light:"neutral-400",dark:"neutral-500",description:"Border of a hovered control"},accent:{light:"blue-600",dark:"blue-400",description:"Primary action, selected state"},info:{light:"cyan-600",dark:"cyan-400",description:"Informational emphasis"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-600",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"blue-500",dark:"blue-600",description:"Primary button fill"},"info-solid":{light:"cyan-500",dark:"cyan-600",description:"Informational fill"},"danger-solid":{light:"red-500",dark:"red-600",description:"Destructive button fill"},"success-solid":{light:"green-500",dark:"green-600",description:"Confirmation fill"},"warning-solid":{light:"yellow-500",dark:"yellow-600",description:"Caution fill"},"accent-solid-hover":{light:"blue-600",dark:"blue-700",description:"Primary button fill, hovered"},"info-solid-hover":{light:"cyan-600",dark:"cyan-700",description:"Informational fill, hovered"},"danger-solid-hover":{light:"red-600",dark:"red-700",description:"Destructive fill, hovered"},"success-solid-hover":{light:"green-600",dark:"green-700",description:"Confirmation fill, hovered"},"warning-solid-hover":{light:"yellow-600",dark:"yellow-700",description:"Caution fill, hovered"},"accent-ink":{light:"white",dark:"white",description:"Text on a primary fill"},"info-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on an informational fill"},"danger-ink":{light:"white",dark:"white",description:"Text on a destructive fill"},"success-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a confirmation fill"},"warning-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a caution fill"},"accent-soft":{light:"blue-100",dark:"blue-900",description:"Tinted primary fill"},"accent-soft-ink":{light:"blue-800",dark:"blue-200",description:"Text on a tinted primary fill"},"info-soft":{light:"cyan-100",dark:"cyan-900",description:"Tinted informational fill"},"info-soft-ink":{light:"cyan-800",dark:"cyan-200",description:"Text on a tinted informational fill"},"danger-soft":{light:"red-100",dark:"red-900",description:"Tinted destructive fill"},"danger-soft-ink":{light:"red-800",dark:"red-200",description:"Text on a tinted destructive fill"},"success-soft":{light:"green-100",dark:"green-900",description:"Tinted confirmation fill"},"success-soft-ink":{light:"green-800",dark:"green-200",description:"Text on a tinted confirmation fill"},"warning-soft":{light:"yellow-100",dark:"yellow-900",description:"Tinted caution fill"},"warning-soft-ink":{light:"yellow-800",dark:"yellow-200",description:"Text on a tinted caution fill"},secondary:{light:"purple-600",dark:"purple-400",description:"Secondary emphasis"},"secondary-solid":{light:"purple-500",dark:"purple-600",description:"Secondary fill"},"secondary-solid-hover":{light:"purple-600",dark:"purple-700",description:"Secondary fill, hovered"},"secondary-ink":{light:"white",dark:"white",description:"Text on a secondary fill"},"secondary-soft":{light:"purple-100",dark:"purple-900",description:"Tinted secondary fill"},"secondary-soft-ink":{light:"purple-800",dark:"purple-200",description:"Text on a tinted secondary fill"},"danger-fg":{light:"red-900",dark:"red-300",description:"Text in a field with an error"},"danger-fg-subtle":{light:"red-300",dark:"red-500",description:"Recessive text in a field with an error"},"danger-line":{light:"red-300",dark:"red-600",description:"Border of a field with an error"},"danger-focus":{light:"red-500",dark:"red-400",description:"Focus ring of a field with an error"}};function Je(n){return`--stx-${n}`}function _(n,t){let s=t.lastIndexOf("-");if(s===-1)return typeof n[t]==="string"?n[t]:void 0;let r=n[t.slice(0,s)];if(!r||typeof r!=="object")return;let i=r[t.slice(s+1)];return typeof i==="string"?i:void 0}var be=/^(?:#[\da-f]{3,8}|(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|var)\(.*\)|white|black|transparent|currentcolor)$/i;function q(n,t){let s=t.trim();return _(n,s)??(be.test(s)?s:void 0)}function ee(n={}){return[...Object.keys(n.roles??{}).filter((t)=>!xt[t]).map((t)=>`roles.${t}`),...Object.keys(n.shapes??{}).filter((t)=>!we[t]).map((t)=>`shapes.${t}`),...Object.keys(n.density??{}).filter((t)=>!Ie[t]).map((t)=>`density.${t}`)]}function te(n){let t={};for(let[s,r]of Object.entries(xt)){let i=_(n,r.light);if(i===void 0)continue;t[s]=`var(${Je(s)}, ${i})`}return t}function ne(n,t={}){let s=[],r=[];for(let[i,l]of Object.entries(xt)){let a=t[i],g=typeof a==="string"?a:a?.light,o=typeof a==="string"?a:a?.dark,f=g&&q(n,g)||_(n,l.light),h=o&&q(n,o)||_(n,l.dark);if(f===void 0)continue;if(s.push(` ${Je(i)}: ${f};`),h!==void 0)r.push(` ${Je(i)}: ${h};`)}if(s.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...s,"}",".dark {",...r,"}",""].join(`
3
- `)}var we={control:{value:"0.375rem",description:"Buttons, inputs, selects \u2014 rounded-md"},panel:{value:"0.5rem",description:"Cards, dialogs, menus \u2014 rounded-lg"},pill:{value:"9999px",description:"Chips and badges, which are pill-shaped by intent"}};function dn(n){return`--stx-radius-${n}`}function se(){let n={};for(let[t,s]of Object.entries(we))n[t]=`var(${dn(t)}, ${s.value})`;return n}function re(n={}){return["/* stx shape tokens \u2014 a radius by what the thing is. */",":root {",...Object.entries(we).map(([t,s])=>` ${dn(t)}: ${n[t]??s.value};`),"}",""].join(`
4
- `)}var Ie={"control-px":{value:"1rem",description:"Inline padding of a md text control \u2014 px-4"},"control-py":{value:"0.5rem",description:"Block padding of a md text control \u2014 py-2"},"control-text":{value:"1rem",description:"Font size of a md text control \u2014 text-base"},"control-leading":{value:"1.5rem",description:"Line height of a md text control \u2014 text-base"},"cell-px":{value:"1.5rem",description:"Inline padding of every table cell, header or body \u2014 px-6"},"cell-py":{value:"1rem",description:"Block padding of a body cell \u2014 py-4"},"cell-text":{value:"0.875rem",description:"Font size of a body cell \u2014 text-sm"},"cell-leading":{value:"1.25rem",description:"Line height of a body cell \u2014 text-sm"},"cell-head-py":{value:"0.75rem",description:"Block padding of a header cell \u2014 py-3"},"cell-head-text":{value:"0.75rem",description:"Font size of a header cell \u2014 text-xs"},"cell-head-leading":{value:"1rem",description:"Line height of a header cell \u2014 text-xs"}},ir={"control-x":"control-px","control-y":"control-py","cell-x":"cell-px","cell-y":"cell-py","cell-head-y":"cell-head-py"},ar={control:{size:"control-text",leading:"control-leading"},cell:{size:"cell-text",leading:"cell-leading"},"cell-head":{size:"cell-head-text",leading:"cell-head-leading"}};function Ye(n){return`--stx-${n}`}function V(n){let t=Ie[n];if(!t)throw Error(`[stx] unknown density token "${n}"`);return`var(${Ye(n)}, ${t.value})`}function ie(){let n={};for(let[t,s]of Object.entries(ir))n[t]=V(s);return n}function oe(){let n={};for(let[t,{size:s,leading:r}]of Object.entries(ar))n[t]=[V(s),{lineHeight:V(r)}];return n}function ce(n={}){return["/* stx density tokens \u2014 how much room a control or a table cell takes. */",":root {",...Object.entries(Ie).map(([t,s])=>` ${Ye(t)}: ${n[t]??s.value};`),"}",""].join(`
5
- `)}function ae(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function W(n,t){let s={...n};for(let[r,i]of Object.entries(t))s[r]=ae(i)&&ae(s[r])?W(s[r],i):i;return s}function le(n,t){if(!t.fonts)return"";let s=new n({...t.config,fonts:t.fonts,cssVariables:!1}).toCSS(!1,t.minify);return s&&!t.minify?`${s}
6
- `:s}function de(n={},t={}){let s=n.theme||{},r=t.theme||{},{extend:i,...l}=r,{extend:a,...g}=s,o=g.colors||{};g.colors={...o,...te(o)};let f=g.borderRadius||{};g.borderRadius={...f,...se()};let h=g.spacing||{};g.spacing={...h,...ie()};let K=g.fontSize||{};g.fontSize={...K,...oe()};let R=W(g,l),m=W(a||{},i||{});if(Object.keys(m).length>0)R.extend=m;let P=[...n.safelist||[],...t.safelist||[]],M={...n.shortcuts||{},...t.shortcuts||{}},D=[...n.preflights||[],...t.preflights||[]],{fonts:U,...O}=n,{fonts:N,roles:T,shapes:I,density:y,...C}=t,u={roles:T,shapes:I,density:y},j=N??U;return{config:{...O,...C,theme:R,safelist:P,shortcuts:M,...D.length>0?{preflights:D}:{},content:[],output:""},safelist:P,shortcuts:M,includePreflight:t.preflight!==!1,minify:t.minify===!0,tokenCSS:ne({...o,...R.colors},T)+re(I)+ce(y),unknownRoles:ee(u),...j?{fonts:j}:{}}}var e={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};import B from"fs";import ve from"path";var $e=256,x=new Map,ge=(n)=>Bun.hash(n).toString(16).padStart(16,"0").slice(0,16),fe=(n)=>c(process.cwd(),"css-assets",`${n}.css`);function z(n,t){if(x.delete(n),x.set(n,t),x.size>$e)x.delete(x.keys().next().value)}function ue(n){let t=ge(n),s=fe(t);if(x.has(s))return z(s,n),t;let r;try{let i;try{i=B.readFileSync(s,"utf8")}catch{}if(i!==n)B.mkdirSync(ve.dirname(s),{recursive:!0}),r=`${s}.${process.pid}.${crypto.randomUUID()}.tmp`,B.writeFileSync(r,n,{flag:"wx"}),B.renameSync(r,s);return z(s,n),t}catch{return}finally{if(r)try{B.unlinkSync(r)}catch{}}}function Ff(n){if(!/^[a-f0-9]{16}$/.test(n))return;let t=fe(n),s=x.get(t);if(s!==void 0)return z(t,s),s;try{let r=B.readFileSync(t,"utf8");if(ge(r)!==n)return;return z(t,r),r}catch{return}}function pe(){x.clear()}var p=null,G="";function me(n){try{let t=n.startsWith("file:")?new URL(n).pathname:n;G=`${t}@${Math.trunc(F.statSync(t).mtimeMs)}`}catch{G=n}}var Y=!1,v=null,A="",E=!1,Re=256,k=new Map,L=null,Ce=null,H=new Map,ye=new Set;function X(n){return Bun.hash(n).toString(16).padStart(16,"0").slice(0,16)}function Q(n,t){if(k.has(n))k.delete(n);else if(k.size>=Re)k.delete(k.keys().next().value);k.set(n,t)}async function Te(n,t=L){if(!t)return null;try{let s=Bun.file(d.join(t,`cw-${X(n)}.css`));if(!await s.exists())return null;return await s.text()}catch{return null}}async function je(n,t,s=L){if(!s)return;try{if(!F.existsSync(s))F.mkdirSync(s,{recursive:!0});await Bun.write(d.join(s,`cw-${X(n)}.css`),t)}catch{}}async function xe(n){try{let t=await import(n);if(t&&t.CSSGenerator)return{CSSGenerator:t.CSSGenerator,config:t.config,build:t.build,defaultConfig:t.defaultConfig,extractClasses:t.extractClasses}}catch{}return null}var Be=[["@stacksjs","ts-css","dist","engine","index.js"],["@stacksjs","ts-css","src","engine","index.ts"]],Ee=["@stacksjs/ts-css/engine","@stacksjs/ts-css/dist/engine/index.js"];function Pe(){let n=[],t=process.cwd();while(t!==d.dirname(t)){for(let s of["node_modules","pantry"])for(let r of Be)n.push(d.join(t,s,...r));t=d.dirname(t)}return n}function De(){let n=[],t=process.env.HOME||process.env.USERPROFILE||"",s=[t&&d.join(t,"Code","Tools","ts-css"),t&&d.join(t,"Code","Tools","crosswind"),t&&d.join(t,"repos","stacks-org","ts-css"),t&&d.join(t,"repos","stacks-org","crosswind"),d.join(process.cwd(),"..","ts-css"),d.join(process.cwd(),"..","crosswind")].filter(Boolean);for(let r of s)n.push(d.join(r,"packages","toolkit","dist","engine","index.js")),n.push(d.join(r,"packages","toolkit","src","engine","index.ts"));if(t)n.push(d.join(t,"Code","Tools","stx","node_modules","@stacksjs","ts-css","dist","engine","index.js"));return n}async function gc(){if(Y)return p;Y=!0;try{let n=async(i)=>{for(let l of i){if(!await Bun.file(l).exists())continue;let a=await xe(l);if(a){if(me(l),!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} CSS engine loaded from ${d.dirname(d.dirname(l))}`);return a}}return null};if(process.env.CROSSWIND_SRC){let i=d.resolve(process.env.CROSSWIND_SRC),l=await n([i]);if(!l)throw Error(`CROSSWIND_SRC did not resolve to a Css module: ${i}`);return p=l,p}let t=await n(Pe());if(t)return p=t,p;let s=Ee;for(let i of s){let l=await xe(i);if(l){p=l;try{me(import.meta.resolve(i))}catch{G=i}if(!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} CSS engine loaded`);return p}}let r=await n(De());if(r)return p=r,p;throw Error("Css CSSGenerator not found in any location")}catch{return console.warn(`${e.yellow}[ts-css] CSS engine not available, Tailwind styles will not be generated${e.reset}`),console.warn(`${e.yellow}Run 'bun add @stacksjs/ts-css' to enable CSS generation${e.reset}`),null}}function Fh(){J.clear(),p=null,Y=!1,v=null,A="",k.clear(),pe(),Ce=null,H.clear()}var ke=!1;async function mc(n){try{let t=he({name:"css",cwd:n})?"css":he({name:"crosswind",cwd:n})?"crosswind":null;if(!t)return null;if(t==="crosswind"&&!process.env.STACKS_DEV_QUIET&&!ke)ke=!0,console.warn(`${e.yellow}[ts-css]${e.reset} Reading the CSS config from a \`crosswind\` file. Rename it to \`css\` (e.g. config/css.ts) \u2014 the old name is deprecated.`);let{loadConfigWithResult:s}=await import("bunfig"),r=await s({name:t,cwd:n,defaultConfig:{},checkEnv:!1,verbose:!1});if(!r?.path||!r.config||Object.keys(r.config).length===0)return null;let i=d.relative(n,r.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} Loaded config from ${i||r.path}`);return r.config}catch(t){if(t instanceof Error&&t.name==="ConfigNotFoundError")return null;return console.warn(`${e.yellow}[ts-css]${e.reset} Failed to load css config:`,t instanceof Error?t.message:t),null}}async function zf(n){let t=null;try{let{loadStxConfig:s}=await import("./chunk-h0dsxxz4.js"),r=await s(n);if(r.css)if(typeof r.css==="string"){let i=d.isAbsolute(r.css)?r.css:d.resolve(n,r.css);if(await Bun.file(i).exists()){let l=await import(i);t=l.default||l,console.log(`${e.green}[ts-css]${e.reset} Loaded config from stx.config.ts \u2192 ${r.css}`)}}else{if(t={...r.css,content:r.css.content||[],preflight:r.css.preflight??!0,minify:r.css.minify??!1},r.css.config){let i=d.isAbsolute(r.css.config)?r.css.config:d.resolve(n,r.css.config);if(await Bun.file(i).exists()){let l=await import(i);t={...l.default||l,...t}}}console.log(`${e.green}[ts-css]${e.reset} Using inline CSS config from stx.config.ts`)}}catch{}return t||await mc(n)}function Hf(n){try{let t=new WeakSet;return X(JSON.stringify(n??{},(s,r)=>{if(typeof r==="function")return`[fn]${String(r)}`;if(typeof r==="object"&&r!==null){if(t.has(r))return"[circular]";t.add(r)}return r})??"")}catch{return"unhashable"}}async function pn(n){if(E)return A;E=!0;try{let t=await gc();if(!t||!t.build)return E=!1,"";if(!v)v=await mc(n);if(!v)return E=!1,"";let s=t.defaultConfig?.theme||{},r=v.theme||{},i={...t.defaultConfig,...v,theme:{...s,...r,extend:{...s.extend||{},...r.extend||{}}}},l=performance.now(),a=await t.build(i),g=performance.now()-l;if(A=a.css,console.log(`${e.cyan}[ts-css]${e.reset} Built ${a.classes.size} classes in ${g.toFixed(1)}ms`),i.output){let o=d.isAbsolute(i.output)?i.output:d.join(n,i.output),f=d.dirname(o);if(!F.existsSync(f))F.mkdirSync(f,{recursive:!0});await Bun.write(o,a.css)}return E=!1,a.css}catch(t){return console.error(`${e.red}[ts-css]${e.reset} Build error:`,t),E=!1,A}}async function cr(n){v=null,await pn(n)}function zh(){return A}function Vf(n){let t=new Set,s=/class\s*=\s*["']([^"']+)["']/gi,r=s.exec(n);while(r!==null){for(let a of r[1].split(/\s+/))if(a.trim())t.add(a.trim());r=s.exec(n)}let i=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,l=i.exec(n);while(l!==null){let a=l[1].match(/'([^']+)'/g);if(a){for(let g of a)for(let o of g.slice(1,-1).split(/\s+/))if(o.trim())t.add(o.trim())}l=i.exec(n)}return t}var J=w(64);async function Uf(n,t){let s=()=>H.get(t?d.resolve(t):process.cwd())?.fingerprint??null,r=J.get(S(n,t,s()));if(r!==void 0)return r;let i=await Oe(n,t);if(i)J.set(S(n,t,s()),i);return i}function*Se(n){yield n;let t=new Set;for(let s of n.matchAll(/\/_stx\/modules\.([0-9a-f]{16})\.js/g)){let r=s[1];if(t.has(r))continue;t.add(r);let i=Qo(r);if(i)yield i}}function Hh(n){return[...Se(n)].join(`
7
- `)}async function Oe(n,t){try{let s=await gc();if(!s)return"";let r=new Set;for(let u of Se(n)){let j=typeof s.extractClasses==="function"?s.extractClasses(u):Vf(u);for(let Z of j)r.add(Z)}if(r.size===0)return"";let i=t?d.resolve(t):process.cwd(),l=c(i,"cache");if(!L)L=l;let a=H.get(i);if(!a){let u=await zf(i);a={config:u,fingerprint:Hf(u)},H.set(i,a),Ce=a.fingerprint}let g=[...r].sort().join(" "),o=`${G}::${a.fingerprint||"default"}::${g}`,f=k.get(o);if(f!==void 0)return Q(o,f),f;let h=await Te(o,l);if(h!==null)return Q(o,h),h;let K=s.defaultConfig||s.config,R=a.config||{},m=de(K,R),{safelist:P,includePreflight:M,minify:D,tokenCSS:U}=m;if(m.unknownRoles.length>0&&!ye.has(i))ye.add(i),console.warn(`${e.yellow}[ts-css]${e.reset} No stx role for ${m.unknownRoles.join(", ")} - these keep the stock value. Role names: semanticTokenNames() in @stacksjs/stx/theme-tokens.`);let O=m.config,N=new s.CSSGenerator(O),T=O.shortcuts||R.shortcuts||{},I=Object.keys(T).filter((u)=>r.has(u)||P.includes(u));for(let u of P)if(!T[u])N.generate(u);for(let u of r)if(!T[u])N.generate(u);let y="";if(I.length>0){let u=new s.CSSGenerator(O);for(let j of I)u.generate(j);if(y=u.toCSS(!1,D),y&&!y.endsWith(`
8
- `))y+=`
9
- `}let C=y+N.toCSS(M,D);return C=le(s.CSSGenerator,m)+U+C,Q(o,C),je(o,C,l),C}catch(s){return console.warn("Failed to generate Css CSS:",s),""}}async function b(n,t,s=!1,r=!1){let i=await Uf(n,t);if(!i)return r?hn(n):n;let l=s?ue(i):void 0,a=l?`<link data-css="generated" rel="stylesheet" href="/_stx/css.${l}.css">`:`<style data-css="generated">
10
- ${i}
11
- </style>`;if(r)return Ne(n,a);let g=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(g.test(n)){let o=!1;return n.replace(g,()=>{if(o)return"";return o=!0,a})}if(n.includes("</head>"))return n.replace("</head>",`${a}
12
- </head>`);if(n.includes("<body"))return n.replace(/<body([^>]*)>/,`<body$1>
13
- ${a}`);return a+n}function Ne(n,t){let s=wi(n).map((o)=>({...o,replacement:""})),r=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g,i=r.exec(n);if(i!==null){let o=!0;while(i!==null)s.push({start:i.index,end:i.index+i[0].length,replacement:o?t:""}),o=!1,i=r.exec(n)}else{let o=n.indexOf("</head>");if(o!==-1)s.push({start:o,end:o,replacement:`${t}
14
- `});else{let f=n.match(/<body([^>]*)>/);if(f?.index!==void 0)s.push({start:f.index,end:f.index+f[0].length,replacement:`${f[0]}
15
- ${t}`});else s.push({start:0,end:0,replacement:t})}}s.sort((o,f)=>o.start-f.start||o.end-f.end);for(let o=1;o<s.length;o++)if(s[o].start<s[o-1].end)return Ae(hn(n),t);let l=Array(s.length*2+1),a=0,g=0;for(let o of s)l[g++]=n.slice(a,o.start),l[g++]=o.replacement,a=o.end;return l[g]=n.slice(a),l.join("")}function Ae(n,t){let s=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(s.test(n)){let r=!1;return n.replace(s,()=>{if(r)return"";return r=!0,t})}if(n.includes("</head>"))return n.replace("</head>",`${t}
16
- </head>`);if(n.includes("<body"))return n.replace(/<body([^>]*)>/,`<body$1>
17
- ${t}`);return t+n}
18
- export{xt,Je,we,dn,Ie,ir,ar,Ye,e,Ff,gc,Fh,mc,zf,Hf,pn,cr,zh,Vf,Uf,Hh,b};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{bh,So,wh,vh,xh,Sh}from"./chunk-121cgm3s.js";import"./chunk-74g64pzt.js";import"./chunk-15rkvc0t.js";import"./chunk-mzes9ds7.js";import"./chunk-b1tctqn5.js";import"./chunk-02css3vk.js";import"./chunk-h2cvfp9y.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{Sh as clearStoreCache,bh as getStoreScript,xh as getStoreScriptFor,vh as pageStoresAll,So as storesRead,wh as storesReadInFiles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{sh}from"./chunk-a6d92kv6.js";export{sh as processDeferDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{im}from"./chunk-h4aqpf2r.js";import"./chunk-kv40xq53.js";import"./chunk-5q4tncfw.js";import"./chunk-7de5y29a.js";import"./chunk-t5q31st4.js";import"./chunk-b7nmgkwa.js";import"./chunk-2b4a8tbd.js";import"./chunk-aj6vqdf7.js";import"./chunk-v0wdgxga.js";import"./chunk-b1tctqn5.js";import"./chunk-02css3vk.js";import"./chunk-h2cvfp9y.js";import"./chunk-z99bf0q0.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{im as startInteractive};
@@ -1,20 +0,0 @@
1
- // @bun
2
- import{sr,Ae}from"./chunk-mzes9ds7.js";import{V,w,Sr,Fs,C}from"./chunk-261t62q4.js";import{a,O}from"./chunk-6nb49h13.js";import{Lo}from"./chunk-15rkvc0t.js";import{st}from"./chunk-9n8t7v78.js";import{c}from"./chunk-sxtvy0sm.js";import{r,he}from"./chunk-nwxjh1gv.js";import d from"path";import j from"fs";import{AsyncLocalStorage as at}from"async_hooks";import{randomUUID as bt}from"crypto";var $t=11;function X(t,e,n){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(d.basename(t))||Lo(t,e,n)}var lt=2;function Pf(t){let e=process.env.STX_BUNDLE_CACHE_DIR?.trim();return e?d.resolve(e):c(t,"bundle-cache")}function nt(t,e){let n=t;for(let i of wt(e))if(i!==d.sep)n=n.split(i).join("\x00root");return n}var rt=new Map;function wt(t){let e=d.resolve(t),n=rt.get(e);if(!n){let i=e;try{i=j.realpathSync(e)}catch{}n=[...new Set([e,i])].sort((l,p)=>p.length-l.length),rt.set(e,n)}return n}function St(t,e){try{let n=j.statSync(t),i=d.resolve(e),l=t.startsWith(`${i}${d.sep}`);return{path:l?d.relative(i,t):t,...l?{inRoot:!0}:{},mtimeMs:n.mtimeMs,size:n.size,hash:Bun.hash(j.readFileSync(t)).toString(36)}}catch{return null}}function ct(t,e){return t.inRoot?d.join(d.resolve(e),t.path):t.path}function vt(t,e){for(let n of t){let i=ct(n,e);try{let l=j.statSync(i);if(l.size!==n.size)return!1;if(l.mtimeMs!==n.mtimeMs&&Bun.hash(j.readFileSync(i)).toString(36)!==n.hash)return!1}catch{return!1}}return!0}var ut=new Map,Bt=100;function If(t=process.env){let e=Number(t.STX_BUNDLE_CACHE_LIMIT);return Number.isFinite(e)&&e>=1?Math.floor(e):2000}var H=new Map;async function jt(t){let e=H.get(t)??0;if(e>0&&e<Bt){H.set(t,e+1);return}H.set(t,1);try{let n=(await j.promises.readdir(t)).filter((o)=>o.endsWith(".js")),i=If();if(n.length<=i)return;let p=(await Promise.all(n.map(async(o)=>{try{return{name:o,at:(await j.promises.stat(d.join(t,o))).mtimeMs}}catch{return null}}))).filter((o)=>o!==null);p.sort((o,b)=>b.at-o.at);for(let o of p.slice(i)){let b=o.name.slice(0,-3);await j.promises.rm(d.join(t,`${b}.js`),{force:!0}),await j.promises.rm(d.join(t,`${b}.deps.json`),{force:!0})}A("pruned bundle cache to",i,"entries")}catch{}}function be(t){return ut.get(t)??[]}function Z(t,e){if(t)ut.set(t,e)}function Of(t=process.env){return t.STX_DEBUG==="true"||t.STX_DEBUG==="1"}function A(...t){if(Of())console.log("[stx:bundler]",...t)}var K=[];function lc(t,e,n){K.push({filePath:t||"<inline>",message:e,details:n})}function sn(){return K.slice()}function on(){K.length=0}var Q;function Lh(t){Q=t}function uc(){if(Q)return Q;try{let t=O.strict;return typeof t==="object"&&t!==null?t.bundlerFallback??"warn":"warn"}catch{return"warn"}}var Y=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function an(t){let e=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,n;while((n=e.exec(t))!==null){let l=n[1];if(!Y.some((o)=>o.test(l)))return A("detected user import:",l),!0}let i=/^[ \t]*import[ \t]*['"]([^'"]+)['"]/gm;while((n=i.exec(t))!==null){let l=n[1];if(/\.css(?:\?.*)?$/.test(l))continue;if(!Y.some((o)=>o.test(l)))return A("detected side-effect import:",l),!0}return!1}var rr="stx-module:",Et=/\.(?:[cm]?[jt]sx?|json)$/i;function Nf(t,e){return d.relative(t,e).split(d.sep).join("/")}function Mf(t,e){if(e.size===0)return t;return t.replace(/^([ \t]*import(?:(?:\s+|(?=[{*]))[^;"']*?\s*from\s*|\s*))(["'])([^"']+)\2/gm,(n,i,l,p)=>{let o=e.get(p);return o&&!p.startsWith(rr)?`${i}${l}${o}${l}`:n})}function Df(t,e){let n=0,i=(p)=>{let o=`__stxMod${n++}`,b=JSON.stringify(p);return e.push(`var ${o} = globalThis.__stxModules && globalThis.__stxModules[${b}];`,`if (${o} === undefined) throw new Error("[stx] module " + ${JSON.stringify(b)} + " is not registered on this page (#1957)");`),o},l=(p,o)=>{for(let b of p.split(",")){let I=b.trim();if(!I)continue;let M=I.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!M)continue;let S=M[1].startsWith('"')?JSON.parse(M[1]):M[1],f=M[2]??S;e.push(`var ${f} = ${o}[${JSON.stringify(S)}];`)}};return t=t.replace(/^[ \t]*import(?:\s+|(?=[{*]))([^;"']+?)\s*from\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(p,o,b)=>{let I=b.slice(rr.length),M=i(I),S=o.trim(),f=S.match(/^([\w$]+)\s*(?:,\s*|$)/);if(f&&!S.startsWith("{")&&!S.startsWith("*"))e.push(`var ${f[1]} = ${M}.default;`),S=S.slice(f[0].length).trim();let v=S.match(/^\*\s*as\s+([\w$]+)$/);if(v)e.push(`var ${v[1]} = ${M};`);else if(S.startsWith("{"))l(S.replace(/^\{|\}$/g,""),M);return""}),t=t.replace(/^[ \t]*import\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(p,o)=>(i(o.slice(rr.length)),"")),t}function it(t){let e=[t,`${t}.ts`,`${t}.tsx`,`${t}.js`,`${t}.mjs`,`${t}.jsx`,d.join(t,"index.ts"),d.join(t,"index.tsx"),d.join(t,"index.js"),d.join(t,"index.mjs")];for(let n of e)try{if(j.existsSync(n)&&j.statSync(n,{throwIfNoEntry:!1})?.isFile())return n}catch{}return}var G=new at;function cs(t,e){let n=new Bun.CryptoHasher("md5");for(let[i,l]of[...t].sort(([p],[o])=>p<o?-1:p>o?1:0))n.update(`${i}\x00${l}\x00`);return G.run({modules:t,key:n.digest("hex").slice(0,12)},e)}var dt=new at;function Lf(t){return dt.run(!0,t)}function jf(){return dt.getStore()===!0}function dc(t){if(!jf())return;throw Error(`The client script of ${t} needs bundling, and it is being rendered inside a Bun.build loader, where Bun never finishes a second build. Make the page an entrypoint of the build (bun-plugin-stx renders entrypoints before the bundler starts), or render it once outside the build so its bundle is cached.`)}function cn(){return G.getStore()?.key??""}function pt(t,e,n,i,l,p,o=new Map,b,I,M){let S=new Map([[n,i],...M??[]]),f=(B)=>B!==void 0&&S.has(B),v=(B,s,u)=>{if(X(s,t,b))return null;if(!p||!f(B)||!Et.test(s))return null;try{if(!j.statSync(s,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}l.add(s);let E=`${rr}${Nf(process.cwd(),s)}`;return o.set(u,E),{path:E,external:!0}},y=(B,s)=>{let u=f(B)?e:d.dirname(B),E=d.resolve(u,s);return it(E)??E};return{name:"stx-client-bundle",setup(B){if(B.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(s)=>({path:s.path,external:!0})),B.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(s)=>({path:s.path,external:!0})),B.onResolve({filter:/^\//},(s)=>{if(f(s.path))return{path:s.path};let u=it(s.path);if(u){let E=v(s.importer,u,s.path);if(E)return E;if(!f(u))l.add(u);return{path:u}}return{path:s.path,external:!0}}),B.onResolve({filter:/^\.\.?\//},(s)=>{let u=y(s.importer,s.path),E=v(s.importer,u,s.path);if(E)return E;return l.add(u),{path:u}}),B.onResolve({filter:/^[@~]\//},(s)=>{let u=d.resolve(t,s.path.slice(2)),E=[u,`${u}.ts`,`${u}.tsx`,`${u}.js`,`${u}.mjs`,`${u}.jsx`,d.join(u,"index.ts"),d.join(u,"index.tsx"),d.join(u,"index.js"),d.join(u,"index.mjs")];for(let h of E)if(j.existsSync(h)&&j.statSync(h,{throwIfNoEntry:!1})?.isFile()){let D=v(s.importer,h,s.path);if(D)return D;return A(`resolved ${s.path[0]}/ import:`,s.path,"\u2192",h),l.add(h),{path:h}}return console.warn(`[stx:bundler] could not resolve ${s.path[0]}/ import:`,s.path),{path:u}}),p)B.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(s)=>{if(!f(s.importer))return;let u=`${rr}npm:${s.path}`;return o.set(s.path,u),{path:u,external:!0}});B.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(s)=>{if(S.has(s.path))return{contents:S.get(s.path),loader:"ts"};if(X(s.path,t,b))throw Error(`Server-only API source cannot be imported by a client script: ${s.path}`);let u=d.extname(s.path).toLowerCase(),E=u===".json"?"json":u===".tsx"?"tsx":u===".jsx"?"jsx":u===".ts"||u===".mts"||u===".cts"?"ts":"js";if(!f(s.path))l.add(s.path);let h=I?.get(s.path);if(h!==void 0)return{contents:h,loader:"js"};return{contents:j.readFileSync(s.path,"utf8"),loader:E}})}}}var q=new Map,z=w(64),ot=Symbol.for("stx.client-bundle-build-queue");function Bf(t){let e=globalThis,i=(e[ot]??Promise.resolve()).then(t,t);return e[ot]=i.then(()=>{return},()=>{return}),i}async function ln(t,e,n={}){let i=n.projectRoot||process.cwd(),l=(await a(i)).serverApi,p=n.minify??!1,o=n.externalizeUserModules??!0,b=n.expose?.length?[...new Set(n.expose)].sort():void 0,I=n.cacheDir||Pf(i),M=G.getStore(),S=new Bun.CryptoHasher("md5");S.update(`${$t}\x00${st()}\x00${JSON.stringify(l??!1)}\x00${o?"registry":"inline"}\x00${b?b.join(","):"*"}\x00${p?"minified":"readable"}\x00${M?.key??""}\x00${nt(t,i)}\x00${nt(e,i)}`);let f=S.digest("hex").slice(0,12),v=d.join(I,`${f}.js`),y=z.get(v);if(y){if(Fs(y.files)&&y.files.every((h)=>!X(h.path,i,l))){A("memo hit:",f);let h=y.files.map((D)=>D.path);return Z(e,h),n.collectInputs?.push(...h),y.code}z.delete(v),A("memo invalidated by dep change:",f)}let B=d.join(I,`${f}.deps.json`),s=Bun.file(v);if(await s.exists()){let h=Bun.file(B),D=!1,N=null;if(await h.exists())try{let k=JSON.parse(await h.text());if(k.metadataVersion===lt&&Array.isArray(k.files)&&vt(k.files,i))N=Sr(k.files.map((g)=>ct(g,i))),D=N.length===k.files.length&&!N.some((g)=>X(g.path,i,l))}catch{D=!1}if(D){if(A("cache hit:",f),N)Z(e,N.map((U)=>U.path)),n.collectInputs?.push(...N.map((U)=>U.path));let k=await s.text(),g=new Date;if(j.promises.utimes(v,g,g).catch(()=>{}),N)z.set(v,{code:k,files:N});return k}A("cache invalidated by dep change:",f)}let u=q.get(f);if(u){let h=await u;if(n.collectInputs)n.collectInputs.push(...(z.get(v)?.files??[]).map((D)=>D.path));return h}dc(e);let E=Bf(()=>_t(t,e,{projectRoot:i,minify:p,cacheDir:I,hash:f,cachePath:v,depsPath:B,collectInputs:n.collectInputs,externalizeUserModules:o,serverApi:l,expose:b,throwOnFailure:n.throwOnFailure,substitutes:M?.modules}));q.set(f,E);try{return await E}finally{q.delete(f)}}function pc(t){return`${t}-${process.pid}-${bt()}`}async function jh(t,e){let{projectRoot:n}=e,i=pc(new Bun.CryptoHasher("md5").update([...t.keys()].join("\x00")).digest("hex").slice(0,12)),l=d.join(c(n,"bundle-tmp"),"out",i);j.mkdirSync(l,{recursive:!0});let p=new Map,o=new Map,b=0;for(let[f,v]of t){let y=d.join(n,`.stx-split-${i}-${b++}.ts`);p.set(y,v),o.set(d.basename(y).replace(/\.ts$/,""),f)}let[I,M]=[...p][0],S=new Set;dc(e.filePath);try{let f=await Bun.build({entrypoints:[...p.keys()],outdir:l,target:"browser",format:"esm",splitting:!0,minify:!1,naming:{entry:"[name].js",chunk:"chunk-[hash].js"},plugins:[pt(n,d.dirname(e.filePath),I,M,S,!1,new Map,void 0,G.getStore()?.modules,p)],define:{"process.env.NODE_ENV":'"development"',...C()},root:n});if(!f.success)throw Error(f.logs.filter((y)=>y.level==="error").map((y)=>y.message).join(", ")||"Unable to bundle the entries");let v={entries:new Map,chunks:new Map};for(let y of f.outputs){let B=d.basename(y.path);if(y.kind==="entry-point"){let s=o.get(B.replace(/\.js$/,""));if(s!==void 0)v.entries.set(s,await y.text())}else if(y.kind==="chunk")v.chunks.set(B.replace(/\.js$/,""),await y.text())}return e.collectInputs?.push(...S),v}finally{try{j.rmSync(l,{recursive:!0,force:!0})}catch{}}}async function _t(t,e,n){let{projectRoot:i,minify:l,cacheDir:p,hash:o,cachePath:b,depsPath:I,externalizeUserModules:M}=n,S=c(i,"bundle-tmp"),f=pc(o),v=d.join(i,`.stx-client-${f}.ts`),y=d.join(S,"out",f);j.mkdirSync(y,{recursive:!0});let B=d.dirname(e),s=new Set,u=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,E=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,h=r(t),{depths:D,balanced:N}=he(h),k=(R)=>!N||D[R]===0,g;while((g=u.exec(h))!==null){if(g[1])continue;if(!k(g.index))continue;if(g[2])g[2].split(",").forEach((R)=>{let m=Mt(R);if(m)s.add(m)});else if(g[3])s.add(g[3])}while((g=E.exec(h))!==null){if(g[1])continue;if(!k(g.index))continue;s.add(g[2])}let U=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((g=U.exec(h))!==null){if(!k(g.index))continue;let R=/^\s*['"]([^'"]+)['"]/.exec(t.slice(g.index+g[0].length))?.[1];if(R&&Y.some((m)=>m.test(R)))continue;if(g[1])s.add(g[1]);if(g[2])s.add(g[2]);for(let m of(g[3]??"").split(",")){let _=m.trim();if(!_||/^type\s/.test(_))continue;let L=/\bas\s+(\w+)\s*$/.exec(_)?.[1]??/^\w+$/.exec(_)?.[0];if(L)s.add(L)}}for(let R of h.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let m of R[1].split(",")){let _=/\bas\s+(\w+)\s*$/.exec(m)?.[1]??/^\s*(\w+)\s*$/.exec(m)?.[1];if(_)s.delete(_)}let ft=s.size>0?`
3
- export { ${[...s].join(", ")} }`:"";A("bundling:",o,"from:",d.basename(e));let tt=new Set,et=new Map;try{let R=await Bun.build({entrypoints:[v],outdir:y,target:"browser",format:"esm",minify:l?{whitespace:!1,identifiers:!0,syntax:!0}:!1,plugins:[pt(i,B,v,t+ft,tt,M,et,n.serverApi,n.substitutes)],define:{"process.env.NODE_ENV":l?'"production"':'"development"',...C()},root:i});if(!R.success){let F=R.logs.filter((T)=>T.level==="error").map((T)=>T.message).join(", ")||`Unable to bundle ${d.basename(e)}`,P=sr(R.logs,e||void 0);if(console.warn("[stx:bundler] build failed:",F),lc(e||"",F,P),n.throwOnFailure||uc()==="error")throw Error(F);return t}let m="";for(let x of R.outputs){m=await x.text();break}let _=[];for(let x of m.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let F of x[1].split(",")){let P=F.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(P){_.push([P[2],P[1]]);continue}let T=F.trim();if(/^[A-Za-z_$][\w$]*$/.test(T))_.push([T,T])}if(n.expose){let x=new Set(n.expose);for(let F=_.length-1;F>=0;F--)if(!x.has(_[F][0]))_.splice(F,1)}let L=[];m=Df(Mf(m,et),L);let mt=m.match(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm)||[];if(m=m.replace(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),l&&m)try{m=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(m)}catch{}let W=`__stxBundle_${o}`,gt=new Set(V(t,!0).split(",").map((x)=>x.trim())),ht=_.map(([x,F])=>`get ${JSON.stringify(x)}() { return ${F} }${gt.has(x)?`, set ${JSON.stringify(x)}(__stxValue_${F}) { ${F} = __stxValue_${F} }`:""}`).join(", "),xt=_.map(([x])=>`var ${x} = undefined;`).join(`
4
- `),yt=_.map(([x])=>`${x} = ${W}[${JSON.stringify(x)}];`).join(`
5
- `);if(m=`${mt.join(`
6
- `)}
7
- ${xt}
8
- var ${W} = (function() {
9
- ${L.join(`
10
- `)}
11
- ${m}
12
- return { ${ht} };
13
- })();
14
- ${yt}
15
- var __stxLiveBindings = typeof __stxLiveBindings === 'undefined' ? {} : __stxLiveBindings;
16
- Object.keys(${W}).forEach(function(name) {
17
- if (!Object.prototype.hasOwnProperty.call(__stxLiveBindings, name))
18
- Object.defineProperty(__stxLiveBindings, name, Object.getOwnPropertyDescriptor(${W}, name));
19
- });`.trim(),A("bundled:",o,"output:",m.length,"bytes"),s.size>0&&_.length===0)return console.warn(`[stx:bundler] dropped every binding for ${d.basename(e)} (${o}); serving the unbundled source and not caching this result`),t;j.mkdirSync(p,{recursive:!0}),await Bun.write(b,m);let J=Sr(tt);return await Bun.write(I,JSON.stringify({metadataVersion:lt,files:J.map((x)=>St(x.path,i)).filter((x)=>x!==null)})),Z(e,J.map((x)=>x.path)),n.collectInputs?.push(...J.map((x)=>x.path)),z.set(b,{code:m,files:J}),await jt(p),m}catch(R){let m=sr(R,e||void 0),_=Ae(R,e||void 0);if(console.warn(`[stx:bundler] error: ${_}`),lc(e||"",_,m),n.throwOnFailure||uc()==="error")throw R;return t}finally{try{j.rmSync(y,{recursive:!0,force:!0})}catch{}}}function Mt(t){let e=t.trim();if(!e)return null;let n=e.indexOf("=");if(n!==-1)e=e.slice(0,n).trim();let i=e.indexOf(":");if(i!==-1)e=e.slice(i+1).trim();if(e.startsWith("..."))e=e.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(e)?e:null}
20
- export{Pf,If,be,Of,lc,sn,on,Lh,uc,an,rr,Nf,Mf,Df,cs,Lf,jf,dc,cn,Bf,ln,pc,jh};
@@ -1,54 +0,0 @@
1
- // @bun
2
- import{R,u,f,P,d,K}from"./chunk-830ej8d2.js";import{V,Ms,Me,fe,Ot,Tr,Fe,ze,s,m,_e,E}from"./chunk-261t62q4.js";import{ut}from"./chunk-1jwcp2k0.js";import{I}from"./chunk-xppm4cs4.js";import{ie}from"./chunk-v0wdgxga.js";import{B,Qe}from"./chunk-pb09xy77.js";import{T,$n}from"./chunk-9xr628ew.js";import C from"path";import{existsSync as $e}from"fs";function ae(c,e){let a=0;for(let r=e;r<c.length;r++){let S=c[r];if(S==="("||S==="["||S==="{")a++;else if(S===")"||S==="]"||S==="}")a--;else if(S===","&&a===0)return r}return-1}function Ee(c,e,a){let r=c,S=new RegExp(`${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),n=S.exec(r);while(n){let g=n.index,t=g+n[0].length-1,D=1,W=t+1;while(W<r.length&&D>0){if(r[W]==="(")D++;else if(r[W]===")")D--;W++}if(D!==0)break;let re=r.substring(t+1,W-1),N=`${a}(${re})`;r=r.substring(0,g)+N+r.substring(W),S.lastIndex=g+N.length,n=S.exec(r)}return r}function ve(c){return/\b(state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(c)}function he(c){let e=c,a=[],r=new Set,S=0,n=0,g=e.length,t=(N)=>{n++;while(n<g){if(e[n]==="\\"){n+=2;continue}if(e[n]===N){n++;return}n++}},D=()=>{n++;while(n<g){if(e[n]==="\\"){n+=2;continue}if(e[n]==="`"){n++;return}if(e[n]==="$"&&e[n+1]==="{"){n+=2;let N=1;while(n<g&&N>0)if(e[n]==="{")N++,n++;else if(e[n]==="}")N--,n++;else if(e[n]==="'"||e[n]==='"')t(e[n]);else if(e[n]==="`")D();else n++;continue}n++}},W=()=>{if(e[n]==="/"&&e[n+1]==="/"){while(n<g&&e[n]!==`
3
- `)n++;return!0}if(e[n]==="/"&&e[n+1]==="*"){n+=2;while(n<g-1&&!(e[n]==="*"&&e[n+1]==="/"))n++;return n+=2,!0}return!1},re=()=>{if(S!==0)return;let N=e.slice(n).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(N){let Z=N[2];if(!r.has(Z))a.push(Z),r.add(Z);return}let te=e.slice(n).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(te){let Z=te[1];if(!r.has(Z))a.push(Z),r.add(Z);return}let Y=e.slice(n).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(Y){let Z=Y[1];if(!r.has(Z))a.push(Z),r.add(Z)}};while(n<g){if(W())continue;if(e[n]==="'"||e[n]==='"'){t(e[n]);continue}if(e[n]==="`"){D();continue}if(e[n]==="{"){S++,n++;continue}if(e[n]==="}"){S--,n++;continue}if(S===0&&/[a-z]/i.test(e[n])&&(n===0||/\s|[;{}()]/.test(e[n-1])))re();n++}return a.join(", ")}function Re(c,e=""){let a=he(c).split(",").map((r)=>r.trim()).filter(Boolean);return`
4
- (function() {
5
- ${ut("var",a)}
6
- var __destroyHooks = [];
7
- var __origOnDestroy = onDestroy;
8
- onDestroy = function(fn) { __origOnDestroy(fn); __destroyHooks.push(fn); };
9
-
10
- ${c}
11
- ${e}})();
12
- `}function ke(c,e){let r=he(c).split(",").map((g)=>g.trim()).filter(Boolean),S=new Set(V(c,!0).split(",").map((g)=>g.trim())),n=r.map((g)=>S.has(g)?` try { ${g}; Object.defineProperty(__scopeRegistration, ${JSON.stringify(g)}, ${Ms(g)}); } catch (e) { /* not actually top-level */ }`:` try { __scopeRegistration[${JSON.stringify(g)}] = ${g}; } catch (e) { /* not actually top-level */ }`).join(`
13
- `);return`
14
- // Register scope variables for STX runtime
15
- if (!window.stx._scopes) window.stx._scopes = {};
16
- var __scopeRegistration = window.stx._scopes['${e}'] || { __destroyCallbacks: __destroyHooks };
17
- ${n}
18
- // #1767: when the bundler renamed a component const that collided with an
19
- // inlined import (foo -> foo2), rebind the ORIGINAL template name to the
20
- // renamed declaration so it resolves to the component's value, not the
21
- // shadowing import. __stxScopeRenames is emitted by bundleClientScript.
22
- try { if (typeof __stxScopeRenames !== 'undefined' && __stxScopeRenames) { for (var __stxRK in __stxScopeRenames) __scopeRegistration[__stxRK] = __stxScopeRenames[__stxRK]; } } catch (e) { /* no renames */ }
23
- if (typeof __stxLiveBindings !== 'undefined') Object.defineProperties(__scopeRegistration, Object.getOwnPropertyDescriptors(__stxLiveBindings));
24
- window.stx._scopes['${e}'] = __scopeRegistration;
25
- `}function Ie(c,e){return c.replace(/<script data-stx-scoped data-stx-run="always" data-stx-owner="([^"]*)"/g,(a,r)=>r===e?a:'<script data-stx-scoped data-stx-run="always"')}function ge(c,e){let a=ke(c,e);return Te(Re(c,a),e)}function Te(c,e){let a=`
26
- (function() {
27
- var __stxScopeEl = (typeof document !== 'undefined') ? document.querySelector('[data-stx-scope="${e}"]') : null;
28
- var __stxPrevEl = (typeof window !== 'undefined') ? window.__STX_CURRENT_ELEMENT__ : undefined;
29
- if (__stxScopeEl && typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxScopeEl;
30
- if (__stxScopeEl && typeof window !== 'undefined' && window.stx) {
31
- if (!window.stx._scopes) window.stx._scopes = {};
32
- window.stx._scopes['${e}'] = {};
33
- }
34
- var __stxEndEffects = (typeof window !== 'undefined' && window.stx && window.stx._beginEffects) ? window.stx._beginEffects() : null;
35
- try {`,r=`
36
- } finally {
37
- // The body's effects end where its onDestroy callbacks run: with the scope
38
- // when the partial has a root, with the page when it has none.
39
- if (__stxEndEffects) {
40
- var __stxDisposeEffects = __stxEndEffects();
41
- var __stxRegistered = __stxScopeEl && window.stx._scopes && window.stx._scopes['${e}'];
42
- if (__stxRegistered) __stxRegistered.__disposeEffects = __stxDisposeEffects;
43
- else if (window.stx._destroyCallbacks) window.stx._destroyCallbacks.push(__stxDisposeEffects);
44
- }
45
- if (typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxPrevEl;
46
- }
47
- })();`;return a+c+r}function Ae(c,e){if(B(c)){let n=B(c).tag.match(/data-stx-scope="([^"]*)"/);if(n)return{html:c,mergedIntoExisting:n[1],stamped:!0,root:"body"};return{html:Qe(c,(g,t)=>`<body${t} data-stx-scope="${e}">`),mergedIntoExisting:null,stamped:!0,root:"body"}}let a=Ot(c),r=c.slice(a).match(/^(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*>|>)/s);if(r){let S=r[1]+r[2],n=r[1].slice(1),g=S.match(/data-stx-scope="([^"]*)"/);if(g)return{html:c,mergedIntoExisting:g[1],stamped:!0,root:n};let t=c.slice(0,a),D=r[1],W=r[2];return{html:`${t}${D} data-stx-scope="${e}"${W}${c.slice(a+r[0].length)}`,mergedIntoExisting:null,stamped:!0,root:n}}return{html:c,mergedIntoExisting:null,stamped:!1,root:null}}var Ce=0;function ue(c,e){let a=C.basename(c,".stx").replace(/[^a-zA-Z0-9]/g,"_"),r=e.__stx_scope_seq;return r?`stx_scope_${a}_${++r.n}_${r.key}`:`stx_scope_${a}_${++Ce}`}var le=new Set,pe=new Set;function Vh(){le.clear(),pe.clear()}var De=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Wf(c){let e=(t)=>t.replace(/[^\n]/g," "),a=c.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,e).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,e).replace(/<!--[\s\S]*?-->/g,e).replace(/\x00STX_HTML_COMMENT_\d+\x00/g,e).replace(/\{\{[\s\S]*?\}\}/g,e).replace(/\{!![\s\S]*?!!\}/g,e),r=[],S=0,n=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,g;while((g=n.exec(a))!==null){let t=g[1]==="/",D=g[2],W=g[3]==="/"||De.has(D.toLowerCase());if(t){S=Math.max(0,S-1);continue}if(S===0)r.push(D);if(!W)S++}return r}function me(c){return/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(c)}var Ze=new R(500),hc=new Set;function Uh(){hc.clear()}function Oe(c){if(c.__onceStore instanceof Set)return c.__onceStore;return hc}async function us(c,e,a,r,S,n=new Set){let g=r.partialsDir||C.join(C.dirname(a),"partials");if(g&&!C.isAbsolute(g))g=C.resolve(process.cwd(),g);let t=Ee(c,"@partial","@include"),D=Oe(e);t=t.replace(/@once([\s\S]*?)@endonce/g,(h,k,x)=>{let p=k.trim(),i=`${a}:${p}`;if(D.has(i))return"";return D.add(i),k});{let h=/@includeIf\s*\(/g,k;while((k=h.exec(t))!==null){let x=k.index,p=x+k[0].length-1,i=1,_=p+1;while(_<t.length&&i>0){if(t[_]==="(")i++;else if(t[_]===")")i--;_++}if(i!==0)break;let l=t.substring(p+1,_-1),o=l.match(/^\s*['"]([^'"]+)['"]/);if(!o){h.lastIndex=_;continue}let O=o[1],z=W(O,g,a),v="";if(z&&await Bun.file(z).exists())S.add(z),v=`@include(${l})`;t=t.substring(0,x)+v+t.substring(_),h.lastIndex=0}}for(let[h,k]of[["@includeWhen",!1],["@includeUnless",!0]]){let x=new RegExp(`${h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),p;while((p=x.exec(t))!==null){let i=p.index,_=i+p[0].length-1,l=1,o=_+1;while(o<t.length&&l>0){if(t[o]==="(")l++;else if(t[o]===")")l--;o++}if(l!==0)break;let O=t.substring(_+1,o-1),z=ae(O,0);if(z===-1){x.lastIndex=o;continue}let v=O.substring(0,z).trim(),H=O.substring(z+1).trim(),F=H.match(/^\s*['"]([^'"]+)['"]/);if(!F){x.lastIndex=o;continue}let w=F[1],J=H.substring(F[0].length),j,M=ae(J,0);if(M!==-1)j=J.substring(M+1).trim();try{let A=`Boolean(${v})`,L;if(f(A)){let oe=d(A,Object.keys(e));L=Boolean(oe(...Object.values(e)))}else L=Boolean(u(A,e));let ee=k?!L:L,ne="";if(ee){let oe=W(w,g,a);if(oe&&await Bun.file(oe).exists())S.add(oe);ne=`@include('${w}'${j?`, ${j}`:""})`}t=t.substring(0,i)+ne+t.substring(o),x.lastIndex=0}catch(A){let L=A instanceof Error?A.message:String(A),ee=m("Include",`Error evaluating ${h} condition: ${L}`,a,c,i);t=t.substring(0,i)+ee+t.substring(o),x.lastIndex=0}}}{let h=/@each\s*\(/g,k;while((k=h.exec(t))!==null){let x=k.index,p=x+k[0].length-1,i=1,_=p+1;while(_<t.length&&i>0){if(t[_]==="(")i++;else if(t[_]===")"){if(i--,i===0)break}_++}if(i!==0)break;let l=t.substring(p+1,_),o=t.substring(x,_+1),O=l.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!O){h.lastIndex=0,t=t.replace(o,"");continue}let[,z,v,H,F]=O;try{let w,J=v.trim();if(f(J))w=d(J,Object.keys(e))(...Object.values(e));else w=u(J,e);let j="";if(Array.isArray(w)&&w.length>0)for(let M of w){let A={...e,[H]:M},L=await te(z,A,c,x);j+=L}else if(F)j=await te(F,{},c,x);t=t.substring(0,x)+j+t.substring(_+1),h.lastIndex=0}catch(w){let J=w instanceof Error?w.message:String(w);t=t.substring(0,x)+m("Each",`Error in @each: ${J}`,a,c,x)+t.substring(_+1),h.lastIndex=0}}}{let h=/@includeFirst\s*\(/g,k;while((k=h.exec(t))!==null){let x=k.index,p=x+k[0].length-1,i=1,_=p+1;while(_<t.length&&i>0){if(t[_]==="(")i++;else if(t[_]===")"){if(i--,i===0)break}_++}if(i!==0)break;let l=t.substring(p+1,_),o=t.substring(x,_+1),O=l.match(/^\s*(\[[^\]]+\])/);if(!O){h.lastIndex=0,t=t.replace(o,"");continue}let z=O[1],v=l.slice(O[0].length),H,F=v.match(/^\s*,\s*\{/);if(F){v=v.slice(F[0].length-1);let j=1,M=1;while(M<v.length&&j>0){if(v[M]==="{")j++;else if(v[M]==="}"){if(j--,j===0)break}M++}H=v.substring(0,M+1),v=v.slice(M+1)}let w,J=v.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(J)w=J[1];try{let j=JSON.parse(z.replace(/'/g,'"')),M={};if(H)try{M=P(H,e)}catch(L){let ee=L instanceof Error?L.message:String(L);if(r.debug){let ne=m("Include",`Error parsing includeFirst variables: ${ee}`,a,c,x,o);t=t.replace(o,()=>ne)}else t=t.replace(o,()=>w||"");continue}let A=!1;for(let L of j){let ee=W(L,g,a);if(!ee)continue;if(await s(ee)){let ne=await te(L,M,c,x);t=t.replace(o,()=>ne),A=!0;break}}if(!A)if(w!==void 0)t=t.replace(o,()=>w);else if(r.debug){let L=m("Include",`None of the includeFirst paths exist: ${z}`,a,c,x,o);t=t.replace(o,()=>L)}else t=t.replace(o,"")}catch(j){let M=j instanceof Error?j.message:String(j),A=m("Include",`Error processing @includeFirst: ${M}`,a,c,x,o);t=t.replace(o,()=>A)}h.lastIndex=0}}function W(h,k,x){try{let p=h;if(!h.endsWith(".stx"))p=`${h}.stx`;let i=C.resolve(k),_=C.resolve(C.dirname(x)),l;if(!p.startsWith("./")&&!p.startsWith("../")){for(let F of r._layerPartialDirs??[]){let w=C.resolve(F,p);if(w.startsWith(`${C.resolve(F)}${C.sep}`)&&$e(w))return w}l=C.resolve(k,p)}else l=C.resolve(_,p);let o=C.normalize(l),O=o.startsWith(i+C.sep)||o===i,z=o.startsWith(_+C.sep)||o===_,v=!1,H=C.dirname(_);if(o.startsWith(H+C.sep)){if(!C.relative(H,o).split(C.sep).some((j)=>j.startsWith(".")&&j!=="."&&j!==".."))v=!0}if(!O&&!z&&!v)return console.error(`Security: Path traversal attempt blocked for include path: ${h}`),console.error(` Resolved to: ${o}`),console.error(` Allowed dirs: ${i}, ${_}`),null;return o}catch(p){return console.error(`Error resolving path ${h}: ${p}`),null}}let re=C.resolve(a);n.add(re);function N(h,k,x,p){return r.onIncludeError?.({includePath:h,templatePath:a,message:k,partialsDir:g}),m("Include",k,a,x,p)}async function te(h,k={},x,p){let i=W(h,g,a);if(!i)return N(h,`Could not resolve path for include: ${h}`,x,p);let _=C.resolve(i);if(n.has(_)){let l=[...n,_].map((o)=>C.basename(o)).join(" -> ");return N(h,`Circular include detected: ${l}`,x,p)}try{S.add(i);let l;if(!l)try{l=await Bun.file(i).text()}catch(y){let q=y instanceof Error?y.message:String(y);return N(h,`Error loading include file ${h}: ${q}`,x,p)}if(l)l=l.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(l&&l.includes("@stream")){let{processStreamDirectives:y}=await import("./chunk-ck5nzbbv.js");l=y(l,e)}if(l&&(r.debug||!T()&&!$n()))try{let{warnUnbalancedTags:y}=await import("./chunk-7ycmnsh5.js");y(l,i)}catch{}try{let{processESImports:y}=await import("./chunk-353gnvfe.js");l=await y(l,e,i,r,S)}catch(y){if(r.debug)console.warn(`[stx] partial ES import extraction skipped for ${i}:`,y instanceof Error?y.message:y)}let o=l,O=fe(o);if(O)o=O.content.trim();let v=l.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),H="";if(v)H=`<style${v[1]}>${v[2]}</style>`;let F=[];o=o.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,(y,q,b)=>{if(!me(q))return"";return F.push({attrs:q,body:b}),`__STX_DATA_BLOCK_${F.length-1}__`}),o=o.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let w={...e};w.__stx_signals_gate=_e(l,i);for(let[y,q]of Object.entries(k))w[y]=q;let J=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,j=[...l.matchAll(J)].sort((y,q)=>{let b=(y[1]||"").includes("server"),X=(q[1]||"").includes("server");return Number(X)-Number(b)}),M="",A=null,L=!1,ee=!1;for(let y of j){let q=y[1]||"",b=y[2]||"";if(me(q))continue;let X=q.includes("server"),Se=Fe(q);if(!X&&!/\bsrc\s*=/i.test(q))Me(b,i,r.strict);if(!X&&b.trim()){let{interpolateScriptExpressions:U}=await import("./chunk-zrm2x65c.js");b=U(b,w,h)}let ce="";try{let{extractAndStripCssImports:U,renderVendorStyleTags:Q}=await import("./chunk-tqs9pcga.js"),se=U(b,{filePath:i,projectRoot:process.cwd()});b=se.code,ce=Q(se.styles)}catch(U){if(r.debug)console.warn(`[stx] vendor-css extractor skipped for ${i}:`,U instanceof Error?U.message:U)}if(Se&&b.trim())b=ze(b);if(!X){try{let{injectBrowserCoreAutoImports:Q}=await import("./chunk-tqs9pcga.js");b=Q(b).code;let{hasUserImports:se,bundleClientScript:ye}=await import("./chunk-mad172af.js");if(se(b))b=await ye(b,i,{projectRoot:process.cwd()})}catch(Q){if(r.debug)console.warn(`[stx] bundler skipped for ${i}:`,Q instanceof Error?Q.message:Q)}let{stripStxRuntimeImports:U}=await import("./chunk-pybm7c9p.js");b=U(b)}let de=ve(b);if(!X){let{extractBridgeData:U,generateServerDataBridge:Q}=await import("./chunk-tqs9pcga.js"),se=Q(b,U(w));if(se)b=`${se}
48
- ${b}`}if(de&&!X){L=!0,A=ue(i,e);let U=I(b),Q=ge(U,A);M+=`${ce}<script data-stx-scoped data-stx-run="always" data-stx-owner="${A}">${Q}</script>
49
- `;continue}if(X)try{let{extractVariables:U}=await import("./chunk-2wba5ypm.js");await U(b,w,i)}catch(U){if(r.debug)console.warn(`Warning: Could not extract variables from server script in ${i}:`,U)}if(!X&&!de){let U=q.replace(/\bclient\b/i,"").trim();A=ue(i,e);let Q=I(b),se=ge(Q,A);if(/__scopeRegistration\["(?!__stx)[^"]+"\]\s*=|Object\.defineProperty\(__scopeRegistration, "(?!__stx)/.test(se))ee=!0;M+=`${ce}<script data-stx-scoped data-stx-run="always" data-stx-owner="${A}"${U?` ${U}`:""}>${se}</script>
50
- `}}if(F.length>0){let{interpolateScriptExpressions:y}=await import("./chunk-zrm2x65c.js");o=o.replace(/__STX_DATA_BLOCK_(\d+)__/g,(q,b)=>{let X=F[Number(b)];return`<script${X.attrs}>${y(X.body,w,h)}</script>`})}if(A){let y=Ae(o,A);if(o=y.html,y.mergedIntoExisting){let b=A,X=y.mergedIntoExisting;M=M.split(`'${b}'`).join(`'${X}'`).split(`"${b}"`).join(`"${X}"`),A=X}else if(!y.stamped&&L&&!le.has(i))le.add(i),console.warn(`[stx] ${C.relative(process.cwd(),i)} declares signals but has no element to scope them to, so nothing in it will hydrate. Wrap the partial's markup in a single root element.`);if(y.stamped&&y.root!=="body"&&(L||ee)&&!pe.has(i)){let b=Wf(o);if(b.length>1)pe.add(i),console.warn(`[stx] ${C.relative(process.cwd(),i)} declares ${L?"signals":"bindings"} and has ${b.length} top-level elements (${b.map((X)=>`<${X}>`).join(", ")}). Only the first is scoped, so bindings in the others cannot see what this partial's script declares. Wrap the partial's markup in a single root element.`)}let q=y.stamped&&y.root!==null&&Tr(y.root);M=Ie(M,q?A:null)}if(o.includes("@include")||o.includes("@partial"))o=await us(o,w,i,r,S,n);let{processLoops:ne,reportDeferredLoopWarnings:oe}=await import("./chunk-qnx71b17.js"),G=ne(o,w,i,void 0,!0);G=ie(G,w,i),G=oe(G);let{processMetaDirectives:xe,processSeoDirective:we,processStructuredData:be}=await import("./chunk-4a751brg.js");if(G=xe(G,w,i,r),G=be(G,w,i),G=we(G,w,i,r),G=E(G,w,i),H)G+=`
51
- `+H;if(M)G+=`
52
- `+M;return G}catch(l){if(l instanceof K)throw l;let o=l instanceof Error?l.message:String(l);return N(h,`Error processing include ${h}: ${o}`,x,p)}}let Y=/@include\s*\(/g,Z;while((Z=Y.exec(t))!==null){let h=Z.index,k=h+Z[0].length-1,x=1,p=k+1;while(p<t.length&&x>0){if(t[p]==="(")x++;else if(t[p]===")")x--;p++}if(x!==0)break;let i=t.substring(h,p),_=t.substring(k+1,p-1),l=_.match(/^\s*['"]([^'"]+)['"]/);if(!l){Y.lastIndex=p;continue}let o=l[1],O,z=_.substring(l[0].length),v=ae(z,0);if(v!==-1)O=z.substring(v+1).trim();let H={};if(O)try{H=P(O,e)}catch(w){let J=w instanceof Error?w.message:String(w);t=t.replace(i,m("Include",`Error parsing include variables for ${o}: ${J}`,a,c,h)),Y.lastIndex=0;continue}let F=await te(o,H,c,h);t=t.substring(0,h)+F+t.substring(p),Y.lastIndex=0}return t}function ds(c,e){let a=c;function r(S,n,g,t){let D=S,W=!0;while(W){W=!1;let re=new RegExp(`@${n}\\(['"]([^'"]+)['"]\\)`),N=D.match(re);if(!N||N.index===void 0)break;let te=N.index,Y=N[1],Z=te+N[0].length,h=new RegExp(`@${n}\\(`),k=new RegExp(`@${g}(?![a-z])`),x=1,p=Z,i=-1;while(x>0&&p<D.length){let l=D.slice(p),o=l.match(h),O=l.match(k),z=o?p+o.index:1/0,v=O?p+O.index:1/0;if(z<v)x++,p=z+(o[0].length||1);else if(v<1/0){if(x--,x===0){i=v;break}p=v+g.length+1}else break}if(i===-1)break;let _=D.slice(Z,i);if(!e[Y])e[Y]=[];if(t)e[Y].unshift(_);else e[Y].push(_);D=D.substring(0,te)+D.substring(i+`@${g}`.length),W=!0}return D}return a=r(a,"push","endpush",!1),a=r(a,"prepend","endprepend",!0),a}function ps(c,e){return c.replace(/@stack\(['"]([^'"]+)['"]\)/g,(a,r)=>{if(!e[r]||e[r].length===0)return"";return e[r].join(`
53
- `)})}
54
- export{Vh,Wf,Ze,hc,Uh,us,ds,ps};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Fo}from"./chunk-t5q31st4.js";export{Fo as warnUnbalancedTags};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cu,$o,Yn,Eu,Tu,$u,Ru,Au,Pu,Iu,Ou,Nu,Mu,Du,Lu,ju,Bu,Fu,zu,Hu,Vu,Uu,Wu,qu,Ku,Gu,Xu,Ju,Yu,Zu,Qu,ed,td,nd,rd,sd,od,id,ad,cd,ld,ud,dd,pd,fd,gd,md,hd,en,La,yd,bd,wd,ja,vd,xd,Sd,kd,_d,Cd,Ba,Ed,Td,$d,Rd,Ad,Pd,Id,Od,Nd,Zn,Md,Dd,Ld,jd,Bd,Fd,zd,Hd,Vd,Ud,Wd,qd,Ro,Kd,Gd,Xd,Jd,Yd,rs,ss,Zd,Qd,ep,tp,np,Fa,rp,sp,op,za,Ao,ip,ap,Ha,Va,os,Ua,cp,tn,lp,Wa,qa,Po,up,Io,dp,pp,fp,gp,mp,hp,yp,Ka,bp,wp,Ga,vp,xp,Sp,kp,_p,Cp,Ep,Tp,$p,Rp,Ap,Pp,Ip,Op,Np,Mp,Dp,Lp,jp,Bp,Fp,zp,Hp,Vp,Xa,Up,Wp,qp,Kp,Gp,Xp,Jp,Yp,Zp,Qp,ef,Qn,Ja,Ya,tf,er,nf,rf,sf,Za,Qa,is,as,of,Oo,af,cf,lf,uf,df,pf,ff,gf,mf,hf,yf,bf,wf,vf,xf,Sf,kf,_f,Cf,Ef,ec,Tf,$f,tc,nc,Rf,Af}from"./chunk-bag9q4m0.js";export{md as AVAILABLE_COMPONENTS,Fa as AutoUpdater,hd as COMPONENT_STYLES,is as DEFAULT_WATCH_INTERVAL_MS,Qa as MAX_WATCH_INTERVAL_MS,Za as MIN_WATCH_INTERVAL_MS,Cd as MODAL_STYLES,Nu as TOAST_STYLES,Id as TRAY_MENU_STYLES,Ha as UPDATE_MANIFEST_ASSET,xd as alert,Fp as appInfo,pf as appleScript,Af as applicationDataDirectory,df as audio,$f as backgroundDelay,Dp as battery,uf as biometric,Qp as bluetooth,yf as bonjour,tn as bundlePathForExecutable,up as caffeinate,rp as canReplaceBundle,sp as clearQuarantine,Tp as clipboard,_d as closeAllModals,qd as closeAllWindows,vd as confirm,Vp as contextMenu,kf as continuityCamera,Sf as coreml,tp as craftBinaryNotFoundMessage,Ro as craftWindowArguments,Qn as crashReporter,rd as createAccordion,Ju as createAutocomplete,zu as createAvatar,Fu as createBadge,Mu as createButton,Hu as createCard,ud as createChart,Lu as createCheckbox,Qu as createChip,dd as createCodeEditor,Ku as createColorPicker,ld as createDataGrid,Gu as createDatePicker,ss as createDiskImage,Uu as createDropdown,fd as createFileExplorer,cp as createGitHubUpdateManifest,Ua as createGitHubUpdater,Zu as createImageView,kp as createInterval,Yu as createLabel,id as createListView,pd as createMediaPlayer,Ed as createMenubar,od as createModalComponent,Rf as createNativeUpdateApi,nc as createPantrySelfUpdater,mp as createPreferences,Bu as createProgressBar,qu as createRadioButton,Wu as createRating,td as createScrollView,Po as createSelfUpdater,ju as createSlider,nd as createSplitView,sd as createStepper,Ba as createSystemTray,ad as createTable,Vu as createTabs,Du as createTextInput,Xu as createTimePicker,Sp as createTimer,ed as createTooltip,cd as createTreeView,gd as createWebView,Kd as createWindow,Xd as createWindowWithHTML,Io as decaffeinate,Mp as deepLinks,_p as delay,Pu as dismissAlertById,Iu as dismissAllAlerts,Op as dragOut,op as extractBundle,ff as fileAssociations,Oo as focus,cf as focusShortcutsReady,Ep as formatCompact,gp as formatDuration,fp as formatRemainingTime,bp as formatShortcut,Cp as formatTime,Rp as fs,za as generateUpdateManifest,Ou as getActiveAlertCount,kd as getActiveModalCount,Td as getActiveTrayInstances,Ud as getActiveWindowIds,pp as getCaffeinateStatus,Ef as getCapabilities,ec as getCapability,Hd as getDesktopConfig,Fd as getDialogBridgeScript,xp as getRegisteredHotkeys,Ad as getSimulatedTrayHTML,Pd as getTrayBridgeScript,$d as getTrayInstance,Wd as getWindow,Yd as getWindowBridgeScript,Va as githubLatestAssetUrl,os as githubReleaseAssetUrl,Pp as globalShortcuts,er as handoff,af as hasFocusShortcuts,tf as iap,yp as isAutoLaunchEnabled,Tf as isAvailable,dp as isCaffeinated,Np as isDragOutAvailable,Jd as isWebviewAvailable,qp as keychain,nf as liveActivities,lf as localServer,rf as location,hf as log,Zd as macOSRuntimeExecutablePath,Hp as menu,xf as midi,Xp as nativeAutoLaunch,Jp as nativeTray,Yp as nativeWindow,Lp as network,$p as notifications,Au as notify,Gd as openDevWindow,Qd as pack,ep as packageApp,tc as parsePantryUpdateManifest,Ka as parseShortcut,mf as pdf,Kp as permissions,Gp as printing,Sd as prompt,Wa as quitLauncher,Ao as readBundleIdentity,Ja as redactPII,wp as registerHotkey,qa as relaunchBundle,Cu as requestNotificationPermission,Vd as resetDesktopConfig,np as resolveCraftBinary,rs as resolveCraftExecutablePath,lp as runningBundleTeamId,Wp as screen,sf as screenCapture,as as screenSharing,Cf as serial,_f as serviceMenu,hp as setAutoLaunch,zd as setDesktopConfig,Ap as shell,$o as showAlert,Dd as showAlertDialog,Md as showColorPicker,Ld as showConfirmDialog,jd as showErrorDialog,bd as showErrorModal,Ru as showErrorToast,La as showInfoModal,Eu as showInfoToast,Zn as showMessageBox,en as showModal,Od as showOpenDialog,ja as showQuestionModal,Nd as showSaveDialog,wd as showSuccessModal,Tu as showSuccessToast,Yn as showToast,Bd as showWarningDialog,yd as showWarningModal,$u as showWarningToast,Xa as sidebar,Ya as signPayload,ef as speech,wf as speechRecognition,bf as spotlight,zp as standardMenus,ip as swapBundle,Up as system,gf as tags,Ip as theme,Zp as touchbar,Rd as triggerTrayAction,vp as unregisterAllHotkeys,Ga as unregisterHotkey,jp as updater,ap as verifyBundleTrust,vf as vision,of as watchScreenSharing,Bp as windowEvents};