@stacksjs/stx 0.2.713 → 0.2.715

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 (216) hide show
  1. package/dist/{chunk-vstvadc2.js → chunk-05qf3e2p.js} +3 -3
  2. package/dist/chunk-0ea32p9a.js +2 -0
  3. package/dist/{chunk-cpyc6t0d.js → chunk-0es09zhs.js} +1 -1
  4. package/dist/chunk-0g9a1kks.js +2 -0
  5. package/dist/chunk-0hbr71zw.js +2 -0
  6. package/dist/chunk-0jg61rty.js +2 -0
  7. package/dist/chunk-0raaa32s.js +2 -0
  8. package/dist/{chunk-39073rh9.js → chunk-0v7w578w.js} +39 -39
  9. package/dist/{chunk-hcve898s.js → chunk-203w5096.js} +4 -4
  10. package/dist/{chunk-3ps07041.js → chunk-2mqzpzy7.js} +4 -4
  11. package/dist/{chunk-wbfg7p3k.js → chunk-2t00wxz0.js} +1 -1
  12. package/dist/{chunk-46bd866e.js → chunk-2yhy3b9h.js} +3 -3
  13. package/dist/chunk-336t7zzz.js +2 -0
  14. package/dist/chunk-362sjw8c.js +2 -0
  15. package/dist/{chunk-dxqvv686.js → chunk-39nkd53v.js} +2 -2
  16. package/dist/{chunk-yw66yks2.js → chunk-3e40sm05.js} +4 -4
  17. package/dist/{chunk-zjw6j2x0.js → chunk-3fwdxxh1.js} +4 -4
  18. package/dist/{chunk-vcpynqvy.js → chunk-3g12ehgs.js} +3 -3
  19. package/dist/chunk-3j8x8mhx.js +2 -0
  20. package/dist/chunk-3nbvr34s.js +2 -0
  21. package/dist/{chunk-cc2ss77r.js → chunk-3pc7vgbz.js} +6 -6
  22. package/dist/chunk-3ssdfr6t.js +2 -0
  23. package/dist/{chunk-zav8yrtp.js → chunk-3xyvc3g1.js} +5 -5
  24. package/dist/{chunk-0sg7zzmr.js → chunk-44hfa3g1.js} +5 -5
  25. package/dist/{chunk-stvw8y3c.js → chunk-4c86wr9a.js} +2 -2
  26. package/dist/chunk-4ee5msma.js +2 -0
  27. package/dist/{chunk-tnmz1t1p.js → chunk-4gsxgxxy.js} +5 -5
  28. package/dist/chunk-5d1c504j.js +2 -0
  29. package/dist/chunk-5gd4dvnf.js +2 -0
  30. package/dist/chunk-5wpgbwap.js +2 -0
  31. package/dist/{chunk-qa9t9k6z.js → chunk-62awa752.js} +1 -1
  32. package/dist/{chunk-mr3r8crk.js → chunk-630yrhzv.js} +2 -2
  33. package/dist/{chunk-kxf8z7vp.js → chunk-6fx89gvg.js} +2 -2
  34. package/dist/chunk-6h1qa3hw.js +2 -0
  35. package/dist/chunk-6jn0p1a9.js +2 -0
  36. package/dist/{chunk-ckrmrdjp.js → chunk-72hfqwvk.js} +5 -5
  37. package/dist/{chunk-cwhzk2n3.js → chunk-74fepz6h.js} +2 -2
  38. package/dist/{chunk-42w6snem.js → chunk-78x8qfvt.js} +4 -4
  39. package/dist/chunk-79sjdpfy.js +2 -0
  40. package/dist/chunk-8428g1wb.js +2 -0
  41. package/dist/{chunk-zecgd1wz.js → chunk-88rftjjk.js} +4 -4
  42. package/dist/chunk-8dfq934n.js +2 -0
  43. package/dist/{chunk-t6ayy0t5.js → chunk-8fazd6fr.js} +2 -2
  44. package/dist/chunk-8w1ep4w3.js +2 -0
  45. package/dist/chunk-918xy0ra.js +2 -0
  46. package/dist/chunk-991f1a9r.js +2 -0
  47. package/dist/{chunk-h54w4fg6.js → chunk-9cak38bg.js} +5 -5
  48. package/dist/{chunk-tvcr9sct.js → chunk-9chqvq23.js} +3 -3
  49. package/dist/{chunk-gecdjyb5.js → chunk-9gxgef2a.js} +8 -8
  50. package/dist/{chunk-067sgh2j.js → chunk-9nev9akt.js} +76 -76
  51. package/dist/{chunk-vapj4s7f.js → chunk-9s9ckhp9.js} +6 -6
  52. package/dist/chunk-9tzn44nx.js +2 -0
  53. package/dist/{chunk-5ctdwyq1.js → chunk-9x3tvgjq.js} +6 -6
  54. package/dist/chunk-a49at1ah.js +2 -0
  55. package/dist/{chunk-qd6s902s.js → chunk-a6ntnyea.js} +5 -5
  56. package/dist/{chunk-xjge15am.js → chunk-aaw2466e.js} +6 -6
  57. package/dist/chunk-agjysd2b.js +2 -0
  58. package/dist/chunk-ak04tgvw.js +2 -0
  59. package/dist/{chunk-w246aa0j.js → chunk-aw7ypr6k.js} +4 -4
  60. package/dist/chunk-azatpcm0.js +2 -0
  61. package/dist/chunk-c1481efw.js +2 -0
  62. package/dist/chunk-c8yrvpr7.js +2 -0
  63. package/dist/chunk-cbbjepfk.js +2 -0
  64. package/dist/{chunk-6cz1sbb1.js → chunk-d9hw6n2d.js} +3 -3
  65. package/dist/{chunk-zjaw79zp.js → chunk-dhy6n39n.js} +2 -2
  66. package/dist/{chunk-edka95zp.js → chunk-dmnncw90.js} +3 -3
  67. package/dist/{chunk-b7j48bq9.js → chunk-dnqzrktd.js} +2 -2
  68. package/dist/{chunk-13z9b912.js → chunk-dr32we87.js} +18 -18
  69. package/dist/{chunk-e6ky15dr.js → chunk-ez35607j.js} +2 -2
  70. package/dist/{chunk-768evhvm.js → chunk-f2c3t1ky.js} +2 -2
  71. package/dist/{chunk-x2gxx8eg.js → chunk-f4gqzg1y.js} +2 -2
  72. package/dist/{chunk-t413xatv.js → chunk-fqfbsr8n.js} +10 -10
  73. package/dist/{chunk-029qng4p.js → chunk-fsz9k5k0.js} +5 -5
  74. package/dist/{chunk-0tay8xjs.js → chunk-ftvh9y2v.js} +1 -1
  75. package/dist/{chunk-42rw3f1h.js → chunk-gmqr249g.js} +2 -2
  76. package/dist/chunk-gv2e2dw6.js +2 -0
  77. package/dist/{chunk-an387127.js → chunk-h16qbyjd.js} +2 -2
  78. package/dist/{chunk-t63f15yh.js → chunk-hez09ssh.js} +2 -2
  79. package/dist/{chunk-c1fjdp7s.js → chunk-hfneeen7.js} +1 -1
  80. package/dist/{chunk-2aarvd3a.js → chunk-hnqpqtk2.js} +6 -6
  81. package/dist/chunk-hrb9fmq0.js +2 -0
  82. package/dist/chunk-j1wkfq9k.js +2 -0
  83. package/dist/{chunk-fcbd7kwj.js → chunk-j28r2d0q.js} +2 -2
  84. package/dist/chunk-j7he9ya7.js +2 -0
  85. package/dist/chunk-jbah8afv.js +2 -0
  86. package/dist/chunk-jjnqj9b8.js +2 -0
  87. package/dist/chunk-jresy8fn.js +2 -0
  88. package/dist/{chunk-s3ms09rt.js → chunk-jtpq7f7m.js} +5 -5
  89. package/dist/{chunk-x45dv67k.js → chunk-jwjv4r9b.js} +4 -4
  90. package/dist/chunk-k4mkhmrf.js +2 -0
  91. package/dist/{chunk-mj8c8949.js → chunk-k93mp66m.js} +4 -4
  92. package/dist/chunk-ke7qeztn.js +2 -0
  93. package/dist/{chunk-aa6fa3x4.js → chunk-krea4v7q.js} +4 -4
  94. package/dist/chunk-m340wbwd.js +2 -0
  95. package/dist/{chunk-8v2vbc4y.js → chunk-m5nzpjej.js} +1 -1
  96. package/dist/chunk-m6d2bq3y.js +2 -0
  97. package/dist/chunk-mjkmjx2r.js +2 -0
  98. package/dist/{chunk-mzfbpcy0.js → chunk-mvkmfg9c.js} +2 -2
  99. package/dist/{chunk-s9b6abkb.js → chunk-mwxbdpb1.js} +2 -2
  100. package/dist/{chunk-y083wv0f.js → chunk-my2szvtn.js} +13 -13
  101. package/dist/{chunk-83p5k4eb.js → chunk-narz7105.js} +2 -2
  102. package/dist/chunk-nnwtgp6d.js +2 -0
  103. package/dist/{chunk-khrckvwn.js → chunk-nqfpvejh.js} +1 -1
  104. package/dist/chunk-nvtp22qp.js +2 -0
  105. package/dist/{chunk-rt7q8dfs.js → chunk-p5gnb4kg.js} +9 -9
  106. package/dist/{chunk-4ckxs446.js → chunk-pd89jnqk.js} +3 -3
  107. package/dist/chunk-pqn771t1.js +3 -0
  108. package/dist/{chunk-3t3p2c1t.js → chunk-q7fh1xka.js} +6 -6
  109. package/dist/chunk-qagygnn5.js +2 -0
  110. package/dist/{chunk-5n4qg8za.js → chunk-qc93ce5h.js} +2 -2
  111. package/dist/{chunk-3457kk19.js → chunk-qf2aa8qe.js} +6 -6
  112. package/dist/{chunk-jb5sftzz.js → chunk-r3hden6p.js} +2 -2
  113. package/dist/{chunk-7dc3n69c.js → chunk-r3j4m04w.js} +2 -2
  114. package/dist/chunk-r5re2zj0.js +2 -0
  115. package/dist/{chunk-wp6q0geg.js → chunk-rbmt5w9v.js} +2 -2
  116. package/dist/chunk-rgv7rjrs.js +2 -0
  117. package/dist/{chunk-67abad76.js → chunk-rj4j7qcj.js} +1 -1
  118. package/dist/{chunk-ak09a5v6.js → chunk-rz7ykdee.js} +2 -2
  119. package/dist/{chunk-f8fekg2d.js → chunk-s8zf6n06.js} +22 -22
  120. package/dist/{chunk-g1tq4xdb.js → chunk-serrx31a.js} +2 -2
  121. package/dist/chunk-sx1aer4p.js +2 -0
  122. package/dist/chunk-t9h236ee.js +2 -0
  123. package/dist/{chunk-p3dkhz9v.js → chunk-tdrcn1mn.js} +30 -30
  124. package/dist/chunk-tdvmf3ge.js +2 -0
  125. package/dist/chunk-tgaan6d3.js +2 -0
  126. package/dist/{chunk-9dg5ja4w.js → chunk-v402swbm.js} +1 -1
  127. package/dist/chunk-v5emywex.js +2 -0
  128. package/dist/{chunk-max3smha.js → chunk-vhf72t9f.js} +2 -2
  129. package/dist/chunk-wb4kgm9x.js +2 -0
  130. package/dist/{chunk-b6318vv3.js → chunk-wk50m71x.js} +1 -1
  131. package/dist/chunk-wygve6ph.js +2 -0
  132. package/dist/chunk-x453pvrb.js +1101 -0
  133. package/dist/{chunk-rb2a1qxb.js → chunk-x5dc06p5.js} +6 -6
  134. package/dist/{chunk-ap30qs8p.js → chunk-x9wwd2ee.js} +2 -2
  135. package/dist/{chunk-ncs2j5kc.js → chunk-xaddgvkx.js} +2 -2
  136. package/dist/chunk-xva90gg3.js +2 -0
  137. package/dist/{chunk-af7av42v.js → chunk-y123wnsy.js} +3 -3
  138. package/dist/{chunk-6n11z33h.js → chunk-y3w2rc1y.js} +5 -5
  139. package/dist/chunk-yg5swp1n.js +2 -0
  140. package/dist/{chunk-bjejmqk4.js → chunk-yyj7mtfg.js} +2 -2
  141. package/dist/chunk-zdg9mx9v.js +2 -0
  142. package/dist/{chunk-vh879axx.js → chunk-zem7j2p1.js} +7 -7
  143. package/dist/{chunk-xyyt8v1r.js → chunk-zkx2m308.js} +12 -12
  144. package/dist/cli.js +19 -19
  145. package/dist/craft-bridge.d.ts +0 -18
  146. package/dist/craft-bridge.js +12 -7
  147. package/dist/craft-components.d.ts +0 -20
  148. package/dist/craft-components.js +5 -13
  149. package/dist/craft-entry.js +2 -2
  150. package/dist/craft.js +2 -2
  151. package/dist/document-injection.d.ts +2 -0
  152. package/dist/document-injection.js +8 -0
  153. package/dist/native-build.js +2 -1
  154. package/dist/native-signing.js +20 -0
  155. package/dist/pwa.js +3 -3
  156. package/dist/ssg.js +15 -15
  157. package/package.json +5 -5
  158. package/dist/chunk-07sc6jtz.js +0 -2
  159. package/dist/chunk-0kjac48x.js +0 -2
  160. package/dist/chunk-0wtqxs6s.js +0 -2
  161. package/dist/chunk-12vjp2gr.js +0 -2
  162. package/dist/chunk-18fr730w.js +0 -2
  163. package/dist/chunk-1hzf9rcy.js +0 -2
  164. package/dist/chunk-29sapda2.js +0 -2
  165. package/dist/chunk-2qf6kd9r.js +0 -2
  166. package/dist/chunk-2snfd93r.js +0 -2
  167. package/dist/chunk-4c1fbthr.js +0 -2
  168. package/dist/chunk-4fxg20je.js +0 -2
  169. package/dist/chunk-58v34kba.js +0 -2
  170. package/dist/chunk-5fjc7402.js +0 -2
  171. package/dist/chunk-5wrgzs4c.js +0 -2
  172. package/dist/chunk-5x6y26y1.js +0 -2
  173. package/dist/chunk-6q2647s6.js +0 -2
  174. package/dist/chunk-77msvbad.js +0 -3033
  175. package/dist/chunk-8s4rxgs8.js +0 -2
  176. package/dist/chunk-9736003n.js +0 -2
  177. package/dist/chunk-97r557ws.js +0 -2
  178. package/dist/chunk-bcr8sq50.js +0 -2
  179. package/dist/chunk-ccv7dw6h.js +0 -2
  180. package/dist/chunk-cx1xn3j3.js +0 -2
  181. package/dist/chunk-d9ryb159.js +0 -2
  182. package/dist/chunk-dhdt7e54.js +0 -2
  183. package/dist/chunk-et83qyc2.js +0 -2
  184. package/dist/chunk-faa56mhz.js +0 -2
  185. package/dist/chunk-fphxtr18.js +0 -2
  186. package/dist/chunk-fvk1xr5a.js +0 -2
  187. package/dist/chunk-g6wd49b5.js +0 -2
  188. package/dist/chunk-gk0nq2ky.js +0 -2
  189. package/dist/chunk-h8kbcz9t.js +0 -2
  190. package/dist/chunk-hava1caf.js +0 -3
  191. package/dist/chunk-hsthpqed.js +0 -2
  192. package/dist/chunk-jyz9frny.js +0 -2
  193. package/dist/chunk-kyymkayr.js +0 -2
  194. package/dist/chunk-mzwa2478.js +0 -2
  195. package/dist/chunk-n3z0cek6.js +0 -2
  196. package/dist/chunk-nbew0ttz.js +0 -2
  197. package/dist/chunk-nefv911a.js +0 -2
  198. package/dist/chunk-p41knx6v.js +0 -2
  199. package/dist/chunk-qcx9yp5x.js +0 -2
  200. package/dist/chunk-r6bc2q44.js +0 -2
  201. package/dist/chunk-rdj74dqc.js +0 -2
  202. package/dist/chunk-rtbkjq0y.js +0 -2
  203. package/dist/chunk-rwjgpmrw.js +0 -2
  204. package/dist/chunk-s4ks8rjm.js +0 -2
  205. package/dist/chunk-s9vfypaf.js +0 -2
  206. package/dist/chunk-sy1btryy.js +0 -2
  207. package/dist/chunk-t7mbaf69.js +0 -2
  208. package/dist/chunk-w2h6nn70.js +0 -2
  209. package/dist/chunk-wrv0tf80.js +0 -2
  210. package/dist/chunk-x5h95nnq.js +0 -2
  211. package/dist/chunk-xferp2q8.js +0 -2
  212. package/dist/chunk-xge355wc.js +0 -2
  213. package/dist/chunk-xn1hv092.js +0 -2
  214. package/dist/chunk-yd199exa.js +0 -2
  215. package/dist/chunk-ykmcnk3x.js +0 -2
  216. package/dist/chunk-z05dbey1.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{t,c}from"./chunk-xyyt8v1r.js";import{r,hn,h}from"./chunk-067sgh2j.js";import{Qe}from"./chunk-3ps07041.js";import{ds,ps}from"./chunk-3t3p2c1t.js";import{sc,Mo,ls,us}from"./chunk-zjw6j2x0.js";import{tc,nc}from"./chunk-af7av42v.js";import{vt}from"./chunk-am4wadh7.js";import{an,uc,pr,fr}from"./chunk-5n4qg8za.js";import{g}from"./chunk-0dve54ne.js";import{Vs}from"./chunk-zjaw79zp.js";import Q from"fs";import N from"path";import{loadConfigWithResult as Ht}from"bunfig";var B={duration:300,delay:0,ease:"ease",direction:"both"};function nt(e,s={}){let{duration:i,delay:o,ease:n,direction:l,custom:d}={...B,...s};if(e==="custom"&&d)return d;switch(e){case"fade":return`${l==="in"?"opacity: 0; animation: fadeIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"opacity: 1; animation: fadeOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"opacity: 1; transition: opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
2
+ import{t,c}from"./chunk-zkx2m308.js";import{r,hn,h}from"./chunk-9nev9akt.js";import{Qe}from"./chunk-2mqzpzy7.js";import{ps,gs}from"./chunk-q7fh1xka.js";import{oc,Lo,us,ds}from"./chunk-3fwdxxh1.js";import{nc,rc}from"./chunk-y123wnsy.js";import{vt}from"./chunk-am4wadh7.js";import{an,dc,pr,fr}from"./chunk-qc93ce5h.js";import{g}from"./chunk-0dve54ne.js";import{Us}from"./chunk-dhy6n39n.js";import Q from"fs";import N from"path";import{loadConfigWithResult as Ht}from"bunfig";var B={duration:300,delay:0,ease:"ease",direction:"both"};function nt(e,s={}){let{duration:i,delay:o,ease:n,direction:l,custom:d}={...B,...s};if(e==="custom"&&d)return d;switch(e){case"fade":return`${l==="in"?"opacity: 0; animation: fadeIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"opacity: 1; animation: fadeOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"opacity: 1; transition: opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
3
3
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
4
4
  @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }`;case"slide":return`${l==="in"?"transform: translateY(20px); opacity: 0; animation: slideIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"transform: translateY(0); opacity: 1; animation: slideOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"transform: translateY(0); opacity: 1; transition: transform var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms), opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
5
5
  @keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@@ -234,7 +234,7 @@ else {
234
234
  </script>
235
235
  `}var De={name:"transition",handler:(e,s,i,o)=>{if(s.length<1)return`<div class="stx-error">@transition directive requires at least a transition type</div>${e}`;let n=s[0],l=s.length>1?Number.parseInt(s[1],10)||B.duration:B.duration,d=s.length>2?s[2]||B.ease:B.ease,p=s.length>3?Number.parseInt(s[3],10)||B.delay:B.delay,u=s.length>4?s[4]||B.direction:B.direction,m=`stx-transition-${Math.random().toString(36).substr(2,9)}`,y=nt(n,{duration:l,delay:p,ease:d,direction:u}),f="stx-transition",v="";if(n==="fade")v="stx-fade";else if(n==="slide")v="stx-slide";else if(n==="scale")v="stx-scale";else if(n==="flip")v="stx-flip";else if(n==="rotate")v="stx-rotate";return`<div id="${m}" class="${f} ${v} ${u==="out"?"stx-out":""}"
236
236
  style="--stx-transition-duration: ${l}ms; --stx-transition-ease: ${d}; --stx-transition-delay: ${p}ms;">${e}</div>`},hasEndTag:!0,description:"Applies transition effects to an element"},Pe={name:"scrollAnimate",handler:(e,s,i,o)=>{if(s.length<1)return`<div class="stx-error">@scrollAnimate directive requires at least an animation type</div>${e}`;let n=s[0],l=s.length>1?Number.parseInt(s[1],10)||300:300,d=s.length>2?s[2]||"ease":"ease",p=s.length>3?Number.parseFloat(s[3])||0.2:0.2,u=s.length>4?Number.parseInt(s[4],10)||0:0,m=`stx-scroll-${Math.random().toString(36).substr(2,9)}`,y=`--stx-transition-duration: ${l}ms; --stx-transition-ease: ${d}; --stx-transition-delay: ${u}ms; will-change: opacity, transform;`,f="stx-transition stx-observe stx-out";if(n==="fade")f+=" stx-fade";else if(n==="slide-up"||n==="slide")f+=" stx-from-bottom";else if(n==="slide-down")f+=" stx-from-top";else if(n==="slide-left")f+=" stx-from-right";else if(n==="slide-right")f+=" stx-from-left";else if(n==="scale")f+=" stx-scale";else if(n.includes("-"))f+=` stx-${n}`;else f+=` stx-${n}`;return`<div id="${m}" class="${f}" style="${y}" data-threshold="${p}">${e}</div>`},hasEndTag:!0,description:"Applies animations that trigger when scrolled into view"},ke={name:"animationGroup",handler:(e,s,i,o)=>{if(s.length<2)return`<div class="stx-error">@animationGroup directive requires a group name and at least one element selector</div>${e}`;let n=s[0],l=s.slice(1).map((m)=>m.startsWith("#")||m.startsWith(".")?m:`#${m}`),d=i.staggerDelay||50,p=i.sequence||!0,u=ct(n,l,{staggerDelay:d,sequence:p});return`${e}
237
- ${u}`},hasEndTag:!1,description:"Coordinates multiple animations together as a group"},Ae={name:"motion",handler:(e,s,i,o)=>{let n=s.length>0?s[0].toLowerCase()==="true":!0,l=it();return`<div data-animate="${n?"auto":"true"}">${e}</div>${l}`},hasEndTag:!0,description:"Controls motion and animation preferences"};function Xa(e,s,i,o){let n=e;if(o.animation?.enabled===!1)return n;let l=i.includes("test")&&i.includes("animation");if(!at(n)&&!l)return n;if(!n.includes('<style id="stx-animation-base">')){let p=lt();n=n.replace("</head>",`${p}
237
+ ${u}`},hasEndTag:!1,description:"Coordinates multiple animations together as a group"},Ae={name:"motion",handler:(e,s,i,o)=>{let n=s.length>0?s[0].toLowerCase()==="true":!0,l=it();return`<div data-animate="${n?"auto":"true"}">${e}</div>${l}`},hasEndTag:!0,description:"Controls motion and animation preferences"};function Ja(e,s,i,o){let n=e;if(o.animation?.enabled===!1)return n;let l=i.includes("test")&&i.includes("animation");if(!at(n)&&!l)return n;if(!n.includes('<style id="stx-animation-base">')){let p=lt();n=n.replace("</head>",`${p}
238
238
  </head>`)}if(n.includes("stx-observe")){if(!n.includes("Intersection Observer for scroll animations")){let u=ot(),m=n.lastIndexOf("</body>");if(m!==-1)n=n.slice(0,m)+u+`
239
239
  `+n.slice(m)}}return n}async function dt(e,s,i,o){let n=s[0]?.replace(/['"]/g,"")||"main",l=Qe();if(n!=="main")l=l.replace("container:'main'",`container:'${n}'`);return`<script data-stx-router>${l}</script>`}var _e={name:"stxRouter",handler:dt,hasEndTag:!1,description:"Inject the STX SPA router script for client-side navigation"};var ut={enabled:!1,trackMouse:!0,trackClicks:!0,trackScroll:!0,samplingRate:100,honorDnt:!0,batchSize:50,maxDataPoints:1000,sessionTimeout:30,persistData:!1,storagePrefix:"stx_heatmap",captureAttributes:["data-heatmap-id","data-track"],ignoreSelectors:["[data-heatmap-ignore]",".heatmap-ignore"],debugOverlay:!1};function Re(e){let s=e.heatmap;if(!s?.enabled)return"";let i={...ut,...s};return`
240
240
  <!-- stx Heatmap - Privacy-Compliant Tracking -->
@@ -619,7 +619,7 @@ else {
619
619
  };
620
620
  })();
621
621
  </script>
622
- `}function Ja(e,s){let i=Re(s);if(!i)return e;let o=e.lastIndexOf("</body>");if(o!==-1)return e.slice(0,o)+i+e.slice(o);return e+i}var Oe={name:"heatmap",hasEndTag:!1,description:"Inject privacy-compliant heatmap tracking script",handler:async(e,s,i,o)=>{let n=i.__stx_config||{};if(s.length>0){let l=pt(s.join(" "));n.heatmap={...n.heatmap,...l,enabled:!0}}return Re(n)}};function pt(e){let s={},i=e.match(/(\w+)=["']?([^"'\s]+)["']?/g)||[];for(let o of i){let[n,l]=o.split("="),d=l?.replace(/["']/g,"");switch(n){case"endpoint":s.endpoint=d;break;case"samplingRate":s.samplingRate=Number.parseInt(d,10);break;case"batchSize":s.batchSize=Number.parseInt(d,10);break;case"trackMouse":s.trackMouse=d==="true";break;case"trackClicks":s.trackClicks=d==="true";break;case"trackScroll":s.trackScroll=d==="true";break;case"honorDnt":s.honorDnt=d==="true";break;case"debugOverlay":s.debugOverlay=d==="true";break}}return s}function J(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Ee(e){let s=e.trim().toLowerCase();return!s.startsWith("javascript:")&&!s.startsWith("vbscript:")&&!s.startsWith("data:text/html")}function cr(e){let s=/^---\r?\n([\s\S]*?)\r?\n---\r?\n/,i=e.match(s);if(!i)return{data:{},content:e.trim()};let o=i[1],n=e.slice(i[0].length),l={};for(let d of o.split(`
622
+ `}function Ya(e,s){let i=Re(s);if(!i)return e;let o=e.lastIndexOf("</body>");if(o!==-1)return e.slice(0,o)+i+e.slice(o);return e+i}var Oe={name:"heatmap",hasEndTag:!1,description:"Inject privacy-compliant heatmap tracking script",handler:async(e,s,i,o)=>{let n=i.__stx_config||{};if(s.length>0){let l=pt(s.join(" "));n.heatmap={...n.heatmap,...l,enabled:!0}}return Re(n)}};function pt(e){let s={},i=e.match(/(\w+)=["']?([^"'\s]+)["']?/g)||[];for(let o of i){let[n,l]=o.split("="),d=l?.replace(/["']/g,"");switch(n){case"endpoint":s.endpoint=d;break;case"samplingRate":s.samplingRate=Number.parseInt(d,10);break;case"batchSize":s.batchSize=Number.parseInt(d,10);break;case"trackMouse":s.trackMouse=d==="true";break;case"trackClicks":s.trackClicks=d==="true";break;case"trackScroll":s.trackScroll=d==="true";break;case"honorDnt":s.honorDnt=d==="true";break;case"debugOverlay":s.debugOverlay=d==="true";break}}return s}function J(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Ee(e){let s=e.trim().toLowerCase();return!s.startsWith("javascript:")&&!s.startsWith("vbscript:")&&!s.startsWith("data:text/html")}function cr(e){let s=/^---\r?\n([\s\S]*?)\r?\n---\r?\n/,i=e.match(s);if(!i)return{data:{},content:e.trim()};let o=i[1],n=e.slice(i[0].length),l={};for(let d of o.split(`
623
623
  `)){let p=d.trim();if(!p||p.startsWith("#"))continue;let u=p.indexOf(":");if(u===-1)continue;let m=p.slice(0,u).trim(),y=p.slice(u+1).trim();if(typeof y==="string"){if(y.startsWith('"')&&y.endsWith('"')||y.startsWith("'")&&y.endsWith("'"))y=y.slice(1,-1);else if(y.startsWith("[")&&y.endsWith("]"))try{y=JSON.parse(y)}catch{}else if(y==="true")y=!0;else if(y==="false")y=!1;else if(/^-?\d+(?:\.\d+)?$/.test(y))y=Number(y)}l[m]=y}return{data:l,content:n.trim()}}function Ye(e,s={}){let{gfm:i=!0,breaks:o=!1}=s,n=e,l=[];if(n=n.replace(/```(\w*)\n([\s\S]*?)```/g,(y,f,v)=>{let b=l.length,x=f?` class="language-${J(f)}"`:"";return l.push(`<pre><code${x}>${J(v.trim())}</code></pre>`),`\x00CODEBLOCK${b}\x00`}),n=n.replace(/`([^`]*)`/g,(y,f)=>`<code>${J(f)}</code>`),n=n.replace(/^######\s+(.*)$/gm,"<h6>$1</h6>"),n=n.replace(/^#####\s+(.*)$/gm,"<h5>$1</h5>"),n=n.replace(/^####\s+(.*)$/gm,"<h4>$1</h4>"),n=n.replace(/^###\s+(.*)$/gm,"<h3>$1</h3>"),n=n.replace(/^##\s+(.*)$/gm,"<h2>$1</h2>"),n=n.replace(/^#\s+(.*)$/gm,"<h1>$1</h1>"),n=n.replace(/\*\*\*(.+?)\*\*\*/g,"<strong><em>$1</em></strong>"),n=n.replace(/___(.+?)___/g,"<strong><em>$1</em></strong>"),n=n.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),n=n.replace(/__(.+?)__/g,"<strong>$1</strong>"),n=n.replace(/\*(.+?)\*/g,"<em>$1</em>"),n=n.replace(/(?<![a-zA-Z0-9])_(.+?)_(?![a-zA-Z0-9])/g,"<em>$1</em>"),i)n=n.replace(/~~(.+?)~~/g,"<del>$1</del>");if(n=n.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(y,f,v)=>`<img src="${Ee(v)?J(v):""}" alt="${J(f)}" />`),n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(y,f,v)=>`<a href="${Ee(v)?J(v):""}">${f}</a>`),n=n.replace(/^(?:---|\*\*\*|___)\s*$/gm,"<hr />"),n=n.replace(/^>\s+(.*)$/gm,"<blockquote>$1</blockquote>"),n=n.replace(/<\/blockquote>\n<blockquote>/g,`
624
624
  `),n=n.replace(/^[*\-+]\s+(.*)$/gm,"<li data-ul>$1</li>"),n=n.replace(/(<li data-ul>.*<\/li>\n?)+/g,"<ul>$&</ul>"),n=n.replace(/<\/ul>\n<ul>/g,""),n=n.replace(/^\d+\.\s+(.*)$/gm,"<li data-ol>$1</li>"),n=n.replace(/(<li data-ol>.*<\/li>\n?)+/g,"<ol>$&</ol>"),n=n.replace(/<\/ol>\n<ol>/g,""),n=n.replace(/<li data-ul>/g,"<li>"),n=n.replace(/<li data-ol>/g,"<li>"),i)n=n.replace(/^\|(.+)\|\s*\n\|[-:\s|]+\|\s*\n((?:\|.+\|\s*\n)*)/gm,(y,f,v)=>{let x=`<tr>${f.split("|").map((S)=>S.trim()).filter(Boolean).map((S)=>`<th>${J(S)}</th>`).join("")}</tr>`,k=v.trim().split(`
625
625
  `).map((S)=>`<tr>${S.split("|").map((A)=>A.trim()).filter(Boolean).map((A)=>`<td>${J(A)}</td>`).join("")}</tr>`).join(`
@@ -637,7 +637,7 @@ ${k}
637
637
  `:`
638
638
  `)}</p>`);if(n=p.join(`
639
639
  `),o)n=n.replace(/\n/g,`<br />
640
- `);for(let y=0;y<l.length;y++)n=n.replace(`\x00CODEBLOCK${y}\x00`,l[y]);return n=n.replace(/<p>\s*<\/p>/g,""),n.trim()}async function Ya(e,s,i=""){let o=e,n=[],l=/@markdown(?:\([^)]*\))?/g,d;while((d=l.exec(e))!==null){let p=d.index,u=d[0].match(/@markdown\(([^)]*)\)/),m=u?u[1]:"",y=p+d[0].length,f=1,v=y,b=-1;while(f>0&&v<e.length){let S=e.indexOf("@markdown",v),_=e.indexOf("@endmarkdown",v);if(_===-1)break;if(S!==-1&&S<_&&S!==p){let A=e[S+9];if(A==="("||A===`
640
+ `);for(let y=0;y<l.length;y++)n=n.replace(`\x00CODEBLOCK${y}\x00`,l[y]);return n=n.replace(/<p>\s*<\/p>/g,""),n.trim()}async function Za(e,s,i=""){let o=e,n=[],l=/@markdown(?:\([^)]*\))?/g,d;while((d=l.exec(e))!==null){let p=d.index,u=d[0].match(/@markdown\(([^)]*)\)/),m=u?u[1]:"",y=p+d[0].length,f=1,v=y,b=-1;while(f>0&&v<e.length){let S=e.indexOf("@markdown",v),_=e.indexOf("@endmarkdown",v);if(_===-1)break;if(S!==-1&&S<_&&S!==p){let A=e[S+9];if(A==="("||A===`
641
641
  `||A==="\r"||A===" "||A===void 0)f++;v=S+9}else{if(f--,f===0){b=_;break}v=_+12}}if(b===-1)continue;let x=e.slice(y,b),k=e.slice(p,b+12);n.push({fullMatch:k,options:m,content:x,index:p}),l.lastIndex=b+12}for(let{fullMatch:p,options:u,content:m,index:y}of n)try{let f={};if(u)u.split(",").forEach((x)=>{let k=x.trim();if(k)f[k]=!0});let v={gfm:f.gfm??!0,breaks:f.breaks??!1},b=Ye(m.trim(),v);o=o.split(p).join(b)}catch(f){let v=f instanceof Error?f.message:String(f),b=h("Markdown Directive",`Error processing markdown: ${v}`,i,e,y,p);o=o.split(p).join(b)}return o}async function Ie(e,s,i,o){let n={gfm:!0,breaks:!1};return s.forEach((l)=>{let d=l.trim().replace(/['"]/g,"");if(d==="breaks")n.breaks=!0;if(d==="no-gfm")n.gfm=!1}),Ye(e.trim(),n)}var Z=[320,480,640,768,1024,1280,1536,1920,2560],mt=[1,1.5,2,3],te=["avif","webp","jpeg"],gt={avif:"image/avif",webp:"image/webp",jpeg:"image/jpeg",png:"image/png",gif:"image/gif"};function pe(e,s=Z,i={},o){return s.sort((n,l)=>n-l).map((n)=>`${re(e,{...i,w:n,fm:o})} ${n}w`).join(", ")}function Te(e,s,i=mt,o={},n){return i.sort((l,d)=>l-d).map((l)=>{let d=Math.round(s*l);return`${re(e,{...o,w:d,dpr:l,fm:n})} ${l}x`}).join(", ")}function me(e,s="100vw"){if(!e||Object.keys(e).length===0)return s;let o=Object.entries(e).map(([n,l])=>{let d=/^\d+$/.test(n)?`${n}px`:n;return{bp:d,size:l,numericBp:Number.parseInt(d)||0}}).sort((n,l)=>n.numericBp-l.numericBp).map(({bp:n,size:l})=>`(max-width: ${n}) ${l}`);return o.push(s),o.join(", ")}function re(e,s={}){let i=Object.entries(s).filter(([,l])=>l!==void 0&&l!==null).map(([l,d])=>{if(Array.isArray(d))return[l,d.join(",")];return[l,String(d)]});if(i.length===0)return e;let o=i.map(([l,d])=>`${l}=${encodeURIComponent(d)}`).join("&"),n=e.includes("?")?"&":"?";return`${e}${n}${o}`}function ge(e){return gt[e]||"application/octet-stream"}var ft={strategy:"thumbhash",width:20,quality:50,blurLevel:40,transitionDuration:300,easing:"ease-out"},he=`
642
642
  .stx-img-placeholder {
643
643
  position: relative;
@@ -684,18 +684,18 @@ ${k}
684
684
  #${e}.stx-img-loaded img {
685
685
  opacity: 1;
686
686
  }
687
- `.trim()}var fe=new Map;async function Ne(e,s={}){let i=`${e}:${JSON.stringify(s)}`;if(fe.has(i))return fe.get(i);let o=await yt(e,s);return fe.set(i,o),o}async function wt(){try{return await import("./chunk-z05dbey1.js")}catch(e){if(!je)console.warn("[stx-media] Image processor not available, some features disabled:",e),je=!0;return null}}var je=!1,ye=80,oe="async",le="lazy",Ve=!1;async function ae(e,s={}){let i=s,o=e;if(o.process&&!o.skipOptimization){if(i.tsImagesConfig?.enabled&&!i.isDev)return Dt(o,i)}if(i.processedResult?.processed)return xe(e,i.processedResult,s);if(i.responsiveVariants)return We(e,i.responsiveVariants,s);let{src:n,alt:l,width:d,height:p,sizes:u,widths:m=Z,dpr:y,formats:f=te,quality:v=ye,params:b={},placeholder:x="none",placeholderOptions:k={},lazy:S=!0,priority:_=!1,loading:A=_?"eager":le,decoding:E=oe,fetchpriority:I,objectFit:w,objectPosition:C,crossorigin:D,referrerpolicy:z}=e,{class:W,style:T,id:j}=e,R=e.data||{},{isDev:V=!1,baseUrl:G=""}=s;if(V&&!s.optimize)return Ct(e);let F,O,H=j||`stx-img-${Math.random().toString(36).slice(2,8)}`;if(x!=="none"&&!_)try{F=await Ne(n,{strategy:x,...k}),O=Me(H,F,k)}catch{}let ne=y!==void 0&&d!==void 0,X;if(ne)X=St(e,H,F,s);else X=await $t(e,H,F,s);let ee;if(_){let Ce=f.includes("webp")?"webp":f[0],rt=pe(n,m,{...b,q:v},Ce),st=typeof u==="object"?me(u):u||"100vw";ee=`<link rel="preload" as="image" imagesrcset="${rt}" imagesizes="${st}" />`}let ie=[];if(!Ve&&x!=="none")ie.push(he),Ve=!0;if(O)ie.push(O);let tt=S?Le(H):void 0;return{html:X,preloadLink:ee,css:ie.length>0?ie.join(`
688
- `):void 0,script:tt}}async function $t(e,s,i,o){let{src:n,alt:l,width:d,height:p,sizes:u,widths:m=Z,formats:y=te,quality:f=ye,params:v={},lazy:b=!0,priority:x=!1,loading:k=x?"eager":le,decoding:S=oe,fetchpriority:_,objectFit:A,objectPosition:E,crossorigin:I,referrerpolicy:w}=e,{class:C,style:D}=e,z=e.data||{},W=typeof u==="object"?me(u):u||"100vw",T=[];for(let V of y){let G=pe(n,m,{...v,q:f},V),F=ge(V);if(b&&!x)T.push(` <source type="${F}" data-srcset="${G}" data-sizes="${W}" />`);else T.push(` <source type="${F}" srcset="${G}" sizes="${W}" />`)}let j=ve({src:re(n,{...v,q:f}),alt:l,width:d,height:p,loading:x?void 0:k,decoding:S,fetchpriority:x?"high":_,objectFit:A,objectPosition:E,crossorigin:I,referrerpolicy:w,className:ze(C,i),style:be(D,A,E,i),lazy:b&&!x,data:z}),R;if(i){let V=`background-image: url('${i.dataURL}'); background-size: cover; background-position: center;`;R=`<div id="${s}" class="stx-img-placeholder" style="${V}">
687
+ `.trim()}var fe=new Map;async function Ne(e,s={}){let i=`${e}:${JSON.stringify(s)}`;if(fe.has(i))return fe.get(i);let o=await yt(e,s);return fe.set(i,o),o}async function wt(){try{return await import("./chunk-tdvmf3ge.js")}catch(e){if(!je)console.warn("[stx-media] Image processor not available, some features disabled:",e),je=!0;return null}}var je=!1,ye=80,oe="async",le="lazy",Ve=!1;async function ae(e,s={}){let i=s,o=e;if(o.process&&!o.skipOptimization){if(i.tsImagesConfig?.enabled&&!i.isDev)return Dt(o,i)}if(i.processedResult?.processed)return xe(e,i.processedResult,s);if(i.responsiveVariants)return We(e,i.responsiveVariants,s);let{src:n,alt:l,width:d,height:p,sizes:u,widths:m=Z,dpr:y,formats:f=te,quality:v=ye,params:b={},placeholder:x="none",placeholderOptions:k={},lazy:S=!0,priority:_=!1,loading:A=_?"eager":le,decoding:E=oe,fetchpriority:I,objectFit:w,objectPosition:C,crossorigin:D,referrerpolicy:L}=e,{class:W,style:T,id:V}=e,R=e.data||{},{isDev:z=!1,baseUrl:G=""}=s;if(z&&!s.optimize)return Ct(e);let F,O,H=V||`stx-img-${Math.random().toString(36).slice(2,8)}`;if(x!=="none"&&!_)try{F=await Ne(n,{strategy:x,...k}),O=Me(H,F,k)}catch{}let ne=y!==void 0&&d!==void 0,X;if(ne)X=St(e,H,F,s);else X=await $t(e,H,F,s);let ee;if(_){let Ce=f.includes("webp")?"webp":f[0],rt=pe(n,m,{...b,q:v},Ce),st=typeof u==="object"?me(u):u||"100vw";ee=`<link rel="preload" as="image" imagesrcset="${rt}" imagesizes="${st}" />`}let ie=[];if(!Ve&&x!=="none")ie.push(he),Ve=!0;if(O)ie.push(O);let tt=S?Le(H):void 0;return{html:X,preloadLink:ee,css:ie.length>0?ie.join(`
688
+ `):void 0,script:tt}}async function $t(e,s,i,o){let{src:n,alt:l,width:d,height:p,sizes:u,widths:m=Z,formats:y=te,quality:f=ye,params:v={},lazy:b=!0,priority:x=!1,loading:k=x?"eager":le,decoding:S=oe,fetchpriority:_,objectFit:A,objectPosition:E,crossorigin:I,referrerpolicy:w}=e,{class:C,style:D}=e,L=e.data||{},W=typeof u==="object"?me(u):u||"100vw",T=[];for(let z of y){let G=pe(n,m,{...v,q:f},z),F=ge(z);if(b&&!x)T.push(` <source type="${F}" data-srcset="${G}" data-sizes="${W}" />`);else T.push(` <source type="${F}" srcset="${G}" sizes="${W}" />`)}let V=ve({src:re(n,{...v,q:f}),alt:l,width:d,height:p,loading:x?void 0:k,decoding:S,fetchpriority:x?"high":_,objectFit:A,objectPosition:E,crossorigin:I,referrerpolicy:w,className:ze(C,i),style:be(D,A,E,i),lazy:b&&!x,data:L}),R;if(i){let z=`background-image: url('${i.dataURL}'); background-size: cover; background-position: center;`;R=`<div id="${s}" class="stx-img-placeholder" style="${z}">
689
689
  <picture>
690
690
  ${T.join(`
691
691
  `)}
692
- <img ${j} />
692
+ <img ${V} />
693
693
  </picture>
694
694
  </div>`}else R=`<picture${s?` id="${s}"`:""}>
695
695
  ${T.join(`
696
696
  `)}
697
- <img ${j} />
698
- </picture>`;return R}function St(e,s,i,o){let{src:n,alt:l,width:d,height:p,dpr:u=[1,2,3],quality:m=ye,params:y={},lazy:f=!0,priority:v=!1,loading:b=v?"eager":le,decoding:x=oe,fetchpriority:k,objectFit:S,objectPosition:_,crossorigin:A,referrerpolicy:E}=e,{class:I,style:w}=e,C=e.data||{},D=typeof d==="number"?d:Number.parseInt(String(d),10),z=Te(n,D,u,{...y,q:m}),W=ve({src:re(n,{...y,w:D,q:m}),alt:l,width:d,height:p,loading:v?void 0:b,decoding:x,fetchpriority:v?"high":k,objectFit:S,objectPosition:_,crossorigin:A,referrerpolicy:E,className:ze(I,i),style:be(w,S,_,i),lazy:f&&!v,data:C}),T=f&&!v?`data-srcset="${z}"`:`srcset="${z}"`;if(i){let j=`background-image: url('${i.dataURL}'); background-size: cover; background-position: center;`;return`<div id="${s}" class="stx-img-placeholder" style="${j}">
697
+ <img ${V} />
698
+ </picture>`;return R}function St(e,s,i,o){let{src:n,alt:l,width:d,height:p,dpr:u=[1,2,3],quality:m=ye,params:y={},lazy:f=!0,priority:v=!1,loading:b=v?"eager":le,decoding:x=oe,fetchpriority:k,objectFit:S,objectPosition:_,crossorigin:A,referrerpolicy:E}=e,{class:I,style:w}=e,C=e.data||{},D=typeof d==="number"?d:Number.parseInt(String(d),10),L=Te(n,D,u,{...y,q:m}),W=ve({src:re(n,{...y,w:D,q:m}),alt:l,width:d,height:p,loading:v?void 0:b,decoding:x,fetchpriority:v?"high":k,objectFit:S,objectPosition:_,crossorigin:A,referrerpolicy:E,className:ze(I,i),style:be(w,S,_,i),lazy:f&&!v,data:C}),T=f&&!v?`data-srcset="${L}"`:`srcset="${L}"`;if(i){let V=`background-image: url('${i.dataURL}'); background-size: cover; background-position: center;`;return`<div id="${s}" class="stx-img-placeholder" style="${V}">
699
699
  <img ${W} ${T} />
700
700
  </div>`}return`<img ${s?`id="${s}" `:""}${W} ${T} />`}function Ct(e){let{src:s,alt:i,width:o,height:n,loading:l=le,decoding:d=oe,fetchpriority:p,objectFit:u,objectPosition:m,crossorigin:y,referrerpolicy:f,priority:v=!1}=e,{class:b,style:x,id:k}=e,S=e.data||{};return{html:`<img ${ve({src:s,alt:i,width:o,height:n,loading:v?"eager":l,decoding:d,fetchpriority:v?"high":p,objectFit:u,objectPosition:m,crossorigin:y,referrerpolicy:f,className:b,style:be(x,u,m),id:k,data:S})} />`}}function ve(e){let s=[];if(e.lazy)s.push(`data-src="${U(e.src)}"`),s.push('src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"');else s.push(`src="${U(e.src)}"`);if(s.push(`alt="${U(e.alt)}"`),e.width)s.push(`width="${e.width}"`);if(e.height)s.push(`height="${e.height}"`);if(e.loading)s.push(`loading="${e.loading}"`);if(e.decoding)s.push(`decoding="${e.decoding}"`);if(e.fetchpriority)s.push(`fetchpriority="${e.fetchpriority}"`);if(e.crossorigin)s.push(`crossorigin="${e.crossorigin}"`);if(e.referrerpolicy)s.push(`referrerpolicy="${e.referrerpolicy}"`);if(e.className)s.push(`class="${U(e.className)}"`);if(e.style)s.push(`style="${U(e.style)}"`);if(e.id)s.push(`id="${U(e.id)}"`);if(e.data)for(let[i,o]of Object.entries(e.data))s.push(`data-${i}="${U(o)}"`);if(e.lazy)s.push("data-stx-lazy");return s.join(" ")}function ze(e,s){let i=[];if(e)i.push(e);if(s)i.push("stx-img-blur");return i.join(" ")||""}function be(e,s,i,o){let n=[];if(s)n.push(`object-fit: ${s}`);if(i)n.push(`object-position: ${i}`);if(o)n.push("opacity: 0; transition: opacity 300ms ease-out");if(e)n.push(e);return n.join("; ")}function U(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Le(e){return`
701
701
  (function() {
@@ -734,7 +734,7 @@ ${T.join(`
734
734
 
735
735
  observer.observe(container);
736
736
  })();
737
- `.trim()}async function Dt(e,s){let i=await wt();if(!i)return ae({...e,process:!1},s);let o=s.tsImagesConfig;if(e.responsiveWidths&&e.responsiveWidths.length>0||e.widths&&e.widths.length>0||!e.width&&!e.dpr){let l=await i.generateResponsiveVariants(e.src,e,o);if(l)return We(e,l,s)}else{let l=await i.processImage(e.src,e,o);if(l.processed)return xe(e,l,s)}return ae({...e,process:!1},s)}async function xe(e,s,i){let{alt:o,width:n,height:l,lazy:d=!0,priority:p=!1,objectFit:u,objectPosition:m,crossorigin:y,referrerpolicy:f}=e,{class:v,style:b}=e,x=e.id||`stx-img-${Math.random().toString(36).slice(2,8)}`,k=e.data||{},S=s.variants||[],_=S.find((O)=>O.format==="jpeg")||S.find((O)=>O.format==="webp")||S[0],A=_?.url||e.src,E=S.filter((O)=>O.format===(_?.format||"jpeg")).map((O)=>`${O.url} ${O.width}w`).join(", "),I=new Map;for(let O of S){if(!I.has(O.format))I.set(O.format,[]);I.get(O.format).push(O)}let w=[],C=["avif","webp","jpeg","png"];for(let O of C){let H=I.get(O);if(H&&H.length>0){let ne=H.map((ee)=>`${ee.url} ${ee.width}w`).join(", "),X=ge(O);if(d&&!p)w.push(` <source type="${X}" data-srcset="${ne}" />`);else w.push(` <source type="${X}" srcset="${ne}" />`)}}let D=[];if(d&&!p){if(D.push(`data-src="${U(A)}"`),D.push('src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"'),E)D.push(`data-srcset="${E}"`)}else if(D.push(`src="${U(A)}"`),E)D.push(`srcset="${E}"`);D.push(`alt="${U(o)}"`);let z=n||s.originalWidth,W=l||s.originalHeight;if(z)D.push(`width="${z}"`);if(W)D.push(`height="${W}"`);if(!p)D.push(`loading="${d?"lazy":"eager"}"`);if(D.push('decoding="async"'),p)D.push('fetchpriority="high"');if(y)D.push(`crossorigin="${y}"`);if(f)D.push(`referrerpolicy="${f}"`);let T=[];if(u)T.push(`object-fit: ${u}`);if(m)T.push(`object-position: ${m}`);if(s.placeholder&&d)T.push("opacity: 0; transition: opacity 300ms ease-out");if(b)T.push(b);if(T.length>0)D.push(`style="${T.join("; ")}"`);let j=[];if(v)j.push(v);if(s.placeholder)j.push("stx-img-blur");if(j.length>0)D.push(`class="${j.join(" ")}"`);if(d&&!p)D.push("data-stx-lazy");for(let[O,H]of Object.entries(k))D.push(`data-${O}="${U(H)}"`);let R;if(s.placeholder||s.dominantColor&&e.useDominantColor){let O=s.placeholder?`background-image: url('${s.placeholder}'); background-size: cover; background-position: center;`:`background-color: ${s.dominantColor};`;R=`<div id="${x}" class="stx-img-placeholder" style="${O}">
737
+ `.trim()}async function Dt(e,s){let i=await wt();if(!i)return ae({...e,process:!1},s);let o=s.tsImagesConfig;if(e.responsiveWidths&&e.responsiveWidths.length>0||e.widths&&e.widths.length>0||!e.width&&!e.dpr){let l=await i.generateResponsiveVariants(e.src,e,o);if(l)return We(e,l,s)}else{let l=await i.processImage(e.src,e,o);if(l.processed)return xe(e,l,s)}return ae({...e,process:!1},s)}async function xe(e,s,i){let{alt:o,width:n,height:l,lazy:d=!0,priority:p=!1,objectFit:u,objectPosition:m,crossorigin:y,referrerpolicy:f}=e,{class:v,style:b}=e,x=e.id||`stx-img-${Math.random().toString(36).slice(2,8)}`,k=e.data||{},S=s.variants||[],_=S.find((O)=>O.format==="jpeg")||S.find((O)=>O.format==="webp")||S[0],A=_?.url||e.src,E=S.filter((O)=>O.format===(_?.format||"jpeg")).map((O)=>`${O.url} ${O.width}w`).join(", "),I=new Map;for(let O of S){if(!I.has(O.format))I.set(O.format,[]);I.get(O.format).push(O)}let w=[],C=["avif","webp","jpeg","png"];for(let O of C){let H=I.get(O);if(H&&H.length>0){let ne=H.map((ee)=>`${ee.url} ${ee.width}w`).join(", "),X=ge(O);if(d&&!p)w.push(` <source type="${X}" data-srcset="${ne}" />`);else w.push(` <source type="${X}" srcset="${ne}" />`)}}let D=[];if(d&&!p){if(D.push(`data-src="${U(A)}"`),D.push('src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"'),E)D.push(`data-srcset="${E}"`)}else if(D.push(`src="${U(A)}"`),E)D.push(`srcset="${E}"`);D.push(`alt="${U(o)}"`);let L=n||s.originalWidth,W=l||s.originalHeight;if(L)D.push(`width="${L}"`);if(W)D.push(`height="${W}"`);if(!p)D.push(`loading="${d?"lazy":"eager"}"`);if(D.push('decoding="async"'),p)D.push('fetchpriority="high"');if(y)D.push(`crossorigin="${y}"`);if(f)D.push(`referrerpolicy="${f}"`);let T=[];if(u)T.push(`object-fit: ${u}`);if(m)T.push(`object-position: ${m}`);if(s.placeholder&&d)T.push("opacity: 0; transition: opacity 300ms ease-out");if(b)T.push(b);if(T.length>0)D.push(`style="${T.join("; ")}"`);let V=[];if(v)V.push(v);if(s.placeholder)V.push("stx-img-blur");if(V.length>0)D.push(`class="${V.join(" ")}"`);if(d&&!p)D.push("data-stx-lazy");for(let[O,H]of Object.entries(k))D.push(`data-${O}="${U(H)}"`);let R;if(s.placeholder||s.dominantColor&&e.useDominantColor){let O=s.placeholder?`background-image: url('${s.placeholder}'); background-size: cover; background-position: center;`:`background-color: ${s.dominantColor};`;R=`<div id="${x}" class="stx-img-placeholder" style="${O}">
738
738
  <picture>
739
739
  ${w.join(`
740
740
  `)}
@@ -744,13 +744,13 @@ ${w.join(`
744
744
  ${w.join(`
745
745
  `)}
746
746
  <img ${D.join(" ")} />
747
- </picture>`;let V=[];if(s.placeholder)V.push(he);let G=d?Le(x):void 0,F;if(p&&E)F=`<link rel="preload" as="image" imagesrcset="${E}" />`;return{html:R,preloadLink:F,css:V.length>0?V.join(`
747
+ </picture>`;let z=[];if(s.placeholder)z.push(he);let G=d?Le(x):void 0,F;if(p&&E)F=`<link rel="preload" as="image" imagesrcset="${E}" />`;return{html:R,preloadLink:F,css:z.length>0?z.join(`
748
748
  `):void 0,script:G}}async function We(e,s,i){let o={src:s.src,processed:!0,variants:[],placeholder:s.placeholder?.dataURL,originalWidth:s.placeholder?.width,originalHeight:s.placeholder?.height};for(let[n,l]of Object.entries(s.byFormat))if(l)o.variants.push(...l);return xe(e,o,i)}function Pt(){return vt({name:"img",hasEndTag:!1,description:"Render an optimized responsive image with srcset and lazy loading",transform:async(e,s,i,o)=>{let{src:n,alt:l,options:d}=kt(e,s,i);if(!n)return console.warn("@img directive: missing src argument"),"<!-- @img: missing src -->";let p={src:n,alt:l||"",widths:d.widths||Z,formats:d.formats||te,quality:d.quality,sizes:d.sizes,dpr:d.dpr,params:d.params,placeholder:d.placeholder,placeholderOptions:d.placeholderOptions,lazy:d.lazy!==!1,priority:d.priority||!1,loading:d.loading,decoding:d.decoding,fetchpriority:d.fetchpriority,objectFit:d.objectFit,objectPosition:d.objectPosition,class:d.class,style:d.style,id:d.id,width:d.width,height:d.height},u=i.__isDev||!1,m=await ae(p,{isDev:u}),y=m.html;if(m.preloadLink)y=m.preloadLink+`
749
749
  `+y;if(m.css)y+=`
750
750
  <style>${m.css}</style>`;if(m.script)y+=`
751
- <script>${m.script}</script>`;return y},defaults:{src:"",alt:"",options:{lazy:!0,placeholder:"none"}}})}function kt(e,s,i){if(s.src)return{src:String(s.src),alt:String(s.alt||""),options:s.options||{}};let o=e.trim();if(o.startsWith("@img(")||o.startsWith("("))o=o.replace(/^@img\(/,"").replace(/^\(/,"").replace(/\)$/,"");let n=At(o),l=we(n[0],i)||"",d=we(n[1],i)||"",p={};if(n[2]){let u=we(n[2],i);if(typeof u==="object"&&u!==null)p=u;else if(typeof n[2]==="string")try{p=JSON.parse(n[2])}catch{}}return{src:l,alt:d,options:p}}function At(e){let s=[],i="",o=!1,n="",l=0,d=0;for(let p=0;p<e.length;p++){let u=e[p],m=p>0?e[p-1]:"";if((u==='"'||u==="'"||u==="`")&&m!=="\\"){if(!o)o=!0,n=u;else if(u===n)o=!1,n="";else i+=u;continue}if(!o){if(u==="{")l++;if(u==="}")l--;if(u==="[")d++;if(u==="]")d--;if(u===","&&l===0&&d===0){s.push(i.trim()),i="";continue}}i+=u}if(i.trim())s.push(i.trim());return s}function we(e,s){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=s[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var Fe=Pt();async function He(){try{return await import("./chunk-97r557ws.js")}catch(e){if(!qe)console.warn("[stx-media] Video processor not available, some features disabled:",e),qe=!0;return null}}var qe=!1,Ue=!0,Be="metadata",_t="https://cdn.jsdelivr.net/npm/ts-video-player@latest/dist/index.min.js";async function ce(e,s={}){let i=s,o=e;if(o.process&&!o.skipProcessing){if(i.tsVideosConfig?.enabled&&!i.isDev)return Tt(o,i)}if(i.processedResult?.processed)return Ke(e,i.processedResult,s);let n;if(o.generatePoster&&o.src&&!e.poster)n=await Mt(o,i);let{src:l,sources:d=[],poster:p,posterPlaceholder:u,controls:m=Ue,autoplay:y=!1,muted:f=!1,loop:v=!1,preload:b=Be,playsinline:x=!0,lazy:k=!0,player:S="native",type:_,width:A,height:E,crossorigin:I,disablePictureInPicture:w=!1,disableRemotePlayback:C=!1}=e,D=n||p,{class:z,style:W}=e,T=e.id||`stx-video-${Math.random().toString(36).slice(2,8)}`;if(S==="ts-video")return Ot(e,s);if(_&&_!=="video")return Rt(l||"",_,e);let j=d.length>0?d:l?[{src:l,type:Je(l)}]:[],R=[`id="${T}"`];if(m)R.push("controls");if(y)R.push("autoplay");if(f)R.push("muted");if(v)R.push("loop");if(x)R.push("playsinline");if(w)R.push("disablepictureinpicture");if(C)R.push("disableremoteplayback");if(I)R.push(`crossorigin="${I}"`);if(k){if(R.push(`data-preload="${b}"`),R.push('preload="none"'),D)R.push(`data-poster="${M(D)}"`);R.push("data-stx-lazy")}else if(R.push(`preload="${b}"`),D)R.push(`poster="${M(D)}"`);if(A)R.push(`width="${A}"`);if(E)R.push(`height="${E}"`);if(z)R.push(`class="${M(z)}"`);if(W)R.push(`style="${M(W)}"`);let V=j.map((O)=>` <source ${k?`data-src="${M(O.src)}"`:`src="${M(O.src)}"`} type="${O.type}"${O.media?` media="${O.media}"`:""} />`).join(`
751
+ <script>${m.script}</script>`;return y},defaults:{src:"",alt:"",options:{lazy:!0,placeholder:"none"}}})}function kt(e,s,i){if(s.src)return{src:String(s.src),alt:String(s.alt||""),options:s.options||{}};let o=e.trim();if(o.startsWith("@img(")||o.startsWith("("))o=o.replace(/^@img\(/,"").replace(/^\(/,"").replace(/\)$/,"");let n=At(o),l=we(n[0],i)||"",d=we(n[1],i)||"",p={};if(n[2]){let u=we(n[2],i);if(typeof u==="object"&&u!==null)p=u;else if(typeof n[2]==="string")try{p=JSON.parse(n[2])}catch{}}return{src:l,alt:d,options:p}}function At(e){let s=[],i="",o=!1,n="",l=0,d=0;for(let p=0;p<e.length;p++){let u=e[p],m=p>0?e[p-1]:"";if((u==='"'||u==="'"||u==="`")&&m!=="\\"){if(!o)o=!0,n=u;else if(u===n)o=!1,n="";else i+=u;continue}if(!o){if(u==="{")l++;if(u==="}")l--;if(u==="[")d++;if(u==="]")d--;if(u===","&&l===0&&d===0){s.push(i.trim()),i="";continue}}i+=u}if(i.trim())s.push(i.trim());return s}function we(e,s){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=s[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var Fe=Pt();async function He(){try{return await import("./chunk-jresy8fn.js")}catch(e){if(!qe)console.warn("[stx-media] Video processor not available, some features disabled:",e),qe=!0;return null}}var qe=!1,Ue=!0,Be="metadata",_t="https://cdn.jsdelivr.net/npm/ts-video-player@latest/dist/index.min.js";async function ce(e,s={}){let i=s,o=e;if(o.process&&!o.skipProcessing){if(i.tsVideosConfig?.enabled&&!i.isDev)return Tt(o,i)}if(i.processedResult?.processed)return Ke(e,i.processedResult,s);let n;if(o.generatePoster&&o.src&&!e.poster)n=await Mt(o,i);let{src:l,sources:d=[],poster:p,posterPlaceholder:u,controls:m=Ue,autoplay:y=!1,muted:f=!1,loop:v=!1,preload:b=Be,playsinline:x=!0,lazy:k=!0,player:S="native",type:_,width:A,height:E,crossorigin:I,disablePictureInPicture:w=!1,disableRemotePlayback:C=!1}=e,D=n||p,{class:L,style:W}=e,T=e.id||`stx-video-${Math.random().toString(36).slice(2,8)}`;if(S==="ts-video")return Ot(e,s);if(_&&_!=="video")return Rt(l||"",_,e);let V=d.length>0?d:l?[{src:l,type:Je(l)}]:[],R=[`id="${T}"`];if(m)R.push("controls");if(y)R.push("autoplay");if(f)R.push("muted");if(v)R.push("loop");if(x)R.push("playsinline");if(w)R.push("disablepictureinpicture");if(C)R.push("disableremoteplayback");if(I)R.push(`crossorigin="${I}"`);if(k){if(R.push(`data-preload="${b}"`),R.push('preload="none"'),D)R.push(`data-poster="${M(D)}"`);R.push("data-stx-lazy")}else if(R.push(`preload="${b}"`),D)R.push(`poster="${M(D)}"`);if(A)R.push(`width="${A}"`);if(E)R.push(`height="${E}"`);if(L)R.push(`class="${M(L)}"`);if(W)R.push(`style="${M(W)}"`);let z=V.map((O)=>` <source ${k?`data-src="${M(O.src)}"`:`src="${M(O.src)}"`} type="${O.type}"${O.media?` media="${O.media}"`:""} />`).join(`
752
752
  `),G=`<video ${R.join(" ")}>
753
- ${V}
753
+ ${z}
754
754
  Your browser does not support the video tag.
755
755
  </video>`,F;if(k)F=`
756
756
  (function() {
@@ -956,11 +956,11 @@ else {
956
956
  .ts-video-player__play-button svg {
957
957
  margin-left: 4px;
958
958
  }
959
- `.trim();return{html:E,script:I,css:w}}function Je(e){switch(e.split(".").pop()?.toLowerCase()){case"mp4":return"video/mp4";case"webm":return"video/webm";case"ogg":case"ogv":return"video/ogg";case"mov":return"video/quicktime";case"avi":return"video/x-msvideo";case"mkv":return"video/x-matroska";case"m3u8":return"application/x-mpegURL";default:return"video/mp4"}}function Et(e){let s=[/youtube\.com\/watch\?v=([^&]+)/,/youtube\.com\/embed\/([^?]+)/,/youtu\.be\/([^?]+)/,/youtube\.com\/v\/([^?]+)/];for(let i of s){let o=e.match(i);if(o)return o[1]}return null}function It(e){let s=e.match(/vimeo\.com\/(\d+)/);return s?s[1]:null}function M(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}async function Tt(e,s){let i=await He();if(!i)return ce({...e,process:!1},s);let o=s.tsVideosConfig,n=await i.processVideo(e.src,e,o,e.onProcessProgress);if(n.processed)return Ke(e,n,s);return ce({...e,process:!1},s)}async function Mt(e,s){let i=await He();if(!i||!e.src)return;let o=typeof e.generatePoster==="object"?e.generatePoster:{timestamp:0},n=s.tsVideosConfig||{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos"};return(await i.generatePoster(e.src,o,n.outputDir,n.baseUrl||"/videos"))?.url}function Ke(e,s,i){let{controls:o=Ue,autoplay:n=!1,muted:l=!1,loop:d=!1,preload:p=Be,playsinline:u=!0,lazy:m=!0,width:y,height:f,crossorigin:v,disablePictureInPicture:b=!1,disableRemotePlayback:x=!1}=e,{class:k,style:S}=e,_=e.id||`stx-video-${Math.random().toString(36).slice(2,8)}`,A=e.src,E=Je(A);if(s.transcoded)A=s.transcoded.url,E="video/mp4";let I=s.streaming?.hls||s.streaming?.dash;if(I){if(s.streaming?.hls)A=s.streaming.hls.manifestUrl,E="application/x-mpegURL";else if(s.streaming?.dash)A=s.streaming.dash.manifestUrl,E="application/dash+xml"}let w=s.poster?.url||e.poster,C=[`id="${_}"`];if(o)C.push("controls");if(n)C.push("autoplay");if(l)C.push("muted");if(d)C.push("loop");if(u)C.push("playsinline");if(b)C.push("disablepictureinpicture");if(x)C.push("disableremoteplayback");if(v)C.push(`crossorigin="${v}"`);if(m){if(C.push(`data-preload="${p}"`),C.push('preload="none"'),w)C.push(`data-poster="${M(w)}"`);C.push("data-stx-lazy")}else if(C.push(`preload="${p}"`),w)C.push(`poster="${M(w)}"`);let D=y||s.metadata?.width,z=f||s.metadata?.height;if(D)C.push(`width="${D}"`);if(z)C.push(`height="${z}"`);if(k)C.push(`class="${M(k)}"`);if(S)C.push(`style="${M(S)}"`);let T=` <source ${m?`data-src="${M(A)}"`:`src="${M(A)}"`} type="${E}" />`,j=`<video ${C.join(" ")}>
959
+ `.trim();return{html:E,script:I,css:w}}function Je(e){switch(e.split(".").pop()?.toLowerCase()){case"mp4":return"video/mp4";case"webm":return"video/webm";case"ogg":case"ogv":return"video/ogg";case"mov":return"video/quicktime";case"avi":return"video/x-msvideo";case"mkv":return"video/x-matroska";case"m3u8":return"application/x-mpegURL";default:return"video/mp4"}}function Et(e){let s=[/youtube\.com\/watch\?v=([^&]+)/,/youtube\.com\/embed\/([^?]+)/,/youtu\.be\/([^?]+)/,/youtube\.com\/v\/([^?]+)/];for(let i of s){let o=e.match(i);if(o)return o[1]}return null}function It(e){let s=e.match(/vimeo\.com\/(\d+)/);return s?s[1]:null}function M(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}async function Tt(e,s){let i=await He();if(!i)return ce({...e,process:!1},s);let o=s.tsVideosConfig,n=await i.processVideo(e.src,e,o,e.onProcessProgress);if(n.processed)return Ke(e,n,s);return ce({...e,process:!1},s)}async function Mt(e,s){let i=await He();if(!i||!e.src)return;let o=typeof e.generatePoster==="object"?e.generatePoster:{timestamp:0},n=s.tsVideosConfig||{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos"};return(await i.generatePoster(e.src,o,n.outputDir,n.baseUrl||"/videos"))?.url}function Ke(e,s,i){let{controls:o=Ue,autoplay:n=!1,muted:l=!1,loop:d=!1,preload:p=Be,playsinline:u=!0,lazy:m=!0,width:y,height:f,crossorigin:v,disablePictureInPicture:b=!1,disableRemotePlayback:x=!1}=e,{class:k,style:S}=e,_=e.id||`stx-video-${Math.random().toString(36).slice(2,8)}`,A=e.src,E=Je(A);if(s.transcoded)A=s.transcoded.url,E="video/mp4";let I=s.streaming?.hls||s.streaming?.dash;if(I){if(s.streaming?.hls)A=s.streaming.hls.manifestUrl,E="application/x-mpegURL";else if(s.streaming?.dash)A=s.streaming.dash.manifestUrl,E="application/dash+xml"}let w=s.poster?.url||e.poster,C=[`id="${_}"`];if(o)C.push("controls");if(n)C.push("autoplay");if(l)C.push("muted");if(d)C.push("loop");if(u)C.push("playsinline");if(b)C.push("disablepictureinpicture");if(x)C.push("disableremoteplayback");if(v)C.push(`crossorigin="${v}"`);if(m){if(C.push(`data-preload="${p}"`),C.push('preload="none"'),w)C.push(`data-poster="${M(w)}"`);C.push("data-stx-lazy")}else if(C.push(`preload="${p}"`),w)C.push(`poster="${M(w)}"`);let D=y||s.metadata?.width,L=f||s.metadata?.height;if(D)C.push(`width="${D}"`);if(L)C.push(`height="${L}"`);if(k)C.push(`class="${M(k)}"`);if(S)C.push(`style="${M(S)}"`);let T=` <source ${m?`data-src="${M(A)}"`:`src="${M(A)}"`} type="${E}" />`,V=`<video ${C.join(" ")}>
960
960
  ${T}
961
961
  Your browser does not support the video tag.
962
- </video>`;if(s.spriteSheet)j=`<div class="stx-video-wrapper" data-sprite-sheet="${M(s.spriteSheet.url)}" data-sprite-cols="${s.spriteSheet.columns}" data-sprite-interval="${s.spriteSheet.interval}">
963
- ${j}
962
+ </video>`;if(s.spriteSheet)V=`<div class="stx-video-wrapper" data-sprite-sheet="${M(s.spriteSheet.url)}" data-sprite-cols="${s.spriteSheet.columns}" data-sprite-interval="${s.spriteSheet.interval}">
963
+ ${V}
964
964
  </div>`;let R;if(m)R=`
965
965
  (function() {
966
966
  var video = document.getElementById('${_}');
@@ -996,7 +996,7 @@ ${j}
996
996
 
997
997
  observer.observe(video);
998
998
  })();
999
- `.trim();let V;if(I)V=`
999
+ `.trim();let z;if(I)z=`
1000
1000
  .stx-video-wrapper {
1001
1001
  position: relative;
1002
1002
  width: 100%;
@@ -1005,9 +1005,9 @@ ${j}
1005
1005
  width: 100%;
1006
1006
  height: auto;
1007
1007
  }
1008
- `.trim();return{html:j,script:R,css:V}}function Ge(){return vt({name:"video",hasEndTag:!1,description:"Render a video with optional ts-videos processing, streaming, and poster generation",transform:async(e,s,i,o)=>{let{src:n,options:l}=Nt(e,s,i);if(!n)return console.warn("@video directive: missing src argument"),"<!-- @video: missing src -->";let d={src:n,poster:l.poster,controls:l.controls!==!1,autoplay:l.autoplay||!1,muted:l.muted||!1,loop:l.loop||!1,preload:l.preload||"metadata",playsinline:l.playsinline!==!1,lazy:l.lazy!==!1,player:l.player||"native",type:l.type,width:l.width,height:l.height,class:l.class,style:l.style,id:l.id,crossorigin:l.crossorigin,disablePictureInPicture:l.disablePictureInPicture,disableRemotePlayback:l.disableRemotePlayback,title:l.title,quality:l.quality,platform:l.platform,process:l.process,generatePoster:l.generatePoster,streaming:l.streaming,transcode:l.transcode,spriteSheet:l.spriteSheet,waveform:l.waveform},u={isDev:i.__isDev||!1,tsVideosConfig:i.__tsVideosConfig},m=await ce(d,u),y=m.html;if(m.css)y+=`
1008
+ `.trim();return{html:V,script:R,css:z}}function Ge(){return vt({name:"video",hasEndTag:!1,description:"Render a video with optional ts-videos processing, streaming, and poster generation",transform:async(e,s,i,o)=>{let{src:n,options:l}=Nt(e,s,i);if(!n)return console.warn("@video directive: missing src argument"),"<!-- @video: missing src -->";let d={src:n,poster:l.poster,controls:l.controls!==!1,autoplay:l.autoplay||!1,muted:l.muted||!1,loop:l.loop||!1,preload:l.preload||"metadata",playsinline:l.playsinline!==!1,lazy:l.lazy!==!1,player:l.player||"native",type:l.type,width:l.width,height:l.height,class:l.class,style:l.style,id:l.id,crossorigin:l.crossorigin,disablePictureInPicture:l.disablePictureInPicture,disableRemotePlayback:l.disableRemotePlayback,title:l.title,quality:l.quality,platform:l.platform,process:l.process,generatePoster:l.generatePoster,streaming:l.streaming,transcode:l.transcode,spriteSheet:l.spriteSheet,waveform:l.waveform},u={isDev:i.__isDev||!1,tsVideosConfig:i.__tsVideosConfig},m=await ce(d,u),y=m.html;if(m.css)y+=`
1009
1009
  <style>${m.css}</style>`;if(m.script)y+=`
1010
- <script>${m.script}</script>`;return y},defaults:{src:"",options:{controls:!0,lazy:!0,preload:"metadata"}}})}function Nt(e,s,i){if(s.src)return{src:String(s.src),options:s.options||{}};let o=e.trim();if(o.startsWith("@video(")||o.startsWith("("))o=o.replace(/^@video\(/,"").replace(/^\(/,"").replace(/\)$/,"");let n=jt(o),l=Xe(n[0],i)||"",d={};if(n[1]){let p=Xe(n[1],i);if(typeof p==="object"&&p!==null)d=p;else if(typeof n[1]==="string")try{d=JSON.parse(n[1])}catch{}}return{src:l,options:d}}function jt(e){let s=[],i="",o=!1,n="",l=0,d=0;for(let p=0;p<e.length;p++){let u=e[p],m=p>0?e[p-1]:"";if((u==='"'||u==="'"||u==="`")&&m!=="\\"){if(!o)o=!0,n=u;else if(u===n)o=!1,n="";else i+=u;continue}if(!o){if(u==="{")l++;if(u==="}")l--;if(u==="[")d++;if(u==="]")d--;if(u===","&&l===0&&d===0){s.push(i.trim()),i="";continue}}i+=u}if(i.trim())s.push(i.trim());return s}function Xe(e,s){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=s[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var $e=Ge();import Vt from"fs";import q from"path";async function cs(e,s){if(!e.webComponents?.enabled)return[];let i=e.webComponents.components||[],o=[];if(i.length>0){if(e.debug)console.log(`Building ${i.length} web components...`);for(let n of i)try{let l=await zt(n,e,s);if(l)o.push(l)}catch(l){if(console.error(`Error building web component ${n.name}:`,l),e.debug)throw l}}return o}async function zt(e,s,i){let{name:o,file:n,tag:l,extends:d}=e;if(!o||!n||!l)return console.error("Invalid web component configuration, missing required fields:",e),null;let p=null;if(q.isAbsolute(n)&&await r(n))p=n;else if(s.componentsDir){let k=q.join(s.componentsDir,n);if(await r(k))p=k}if(!p)p=await hn(n,process.cwd(),s,i);if(!p)return console.error(`Web component source file not found: ${n}`),null;let u=await Bun.file(p).text();i.add(p);let y=(e.outputFormat||"js")==="ts",f=y?Wt({name:o,tag:l,baseElement:d,source:u,shadowDOM:e.shadowDOM??!0,template:e.template??!0,styleSource:e.styleSource,attributes:e.attributes||[],attributeTypes:e.attributeTypes||{}}):Lt({name:o,tag:l,baseElement:d,source:u,shadowDOM:e.shadowDOM??!0,template:e.template??!0,styleSource:e.styleSource,attributes:e.attributes||[]}),v=s.webComponents?.outputDir||"dist/web-components";await Vt.promises.mkdir(v,{recursive:!0});let b=y?"ts":"js",x=q.join(v,`${l}.${b}`);if(await Bun.write(x,f),s.debug)console.log(`Built web component ${o} -> ${x}`);return x}function Lt(e){let{name:s,tag:i,baseElement:o="HTMLElement",source:n,shadowDOM:l,template:d,styleSource:p,attributes:u=[]}=e,m=n.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").trim();if(!l)m=m.replace(/<slot\s+name=["']([^"']+)["']\s*>([\s\S]*?)<\/slot>/gi,'<div data-slot="$1">$2</div>'),m=m.replace(/<slot\s+name=["']([^"']+)["']\s*\/>/gi,'<div data-slot="$1"></div>'),m=m.replace(/<slot\s*>([\s\S]*?)<\/slot>/gi,"<div data-default-slot>$1</div>"),m=m.replace(/<slot\s*\/>/gi,"<div data-default-slot></div>");let y="";if(p)y=`<link rel="stylesheet" href="${p}">`;return`/**
1010
+ <script>${m.script}</script>`;return y},defaults:{src:"",options:{controls:!0,lazy:!0,preload:"metadata"}}})}function Nt(e,s,i){if(s.src)return{src:String(s.src),options:s.options||{}};let o=e.trim();if(o.startsWith("@video(")||o.startsWith("("))o=o.replace(/^@video\(/,"").replace(/^\(/,"").replace(/\)$/,"");let n=jt(o),l=Xe(n[0],i)||"",d={};if(n[1]){let p=Xe(n[1],i);if(typeof p==="object"&&p!==null)d=p;else if(typeof n[1]==="string")try{d=JSON.parse(n[1])}catch{}}return{src:l,options:d}}function jt(e){let s=[],i="",o=!1,n="",l=0,d=0;for(let p=0;p<e.length;p++){let u=e[p],m=p>0?e[p-1]:"";if((u==='"'||u==="'"||u==="`")&&m!=="\\"){if(!o)o=!0,n=u;else if(u===n)o=!1,n="";else i+=u;continue}if(!o){if(u==="{")l++;if(u==="}")l--;if(u==="[")d++;if(u==="]")d--;if(u===","&&l===0&&d===0){s.push(i.trim()),i="";continue}}i+=u}if(i.trim())s.push(i.trim());return s}function Xe(e,s){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=s[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var $e=Ge();import Vt from"fs";import q from"path";async function ls(e,s){if(!e.webComponents?.enabled)return[];let i=e.webComponents.components||[],o=[];if(i.length>0){if(e.debug)console.log(`Building ${i.length} web components...`);for(let n of i)try{let l=await zt(n,e,s);if(l)o.push(l)}catch(l){if(console.error(`Error building web component ${n.name}:`,l),e.debug)throw l}}return o}async function zt(e,s,i){let{name:o,file:n,tag:l,extends:d}=e;if(!o||!n||!l)return console.error("Invalid web component configuration, missing required fields:",e),null;let p=null;if(q.isAbsolute(n)&&await r(n))p=n;else if(s.componentsDir){let k=q.join(s.componentsDir,n);if(await r(k))p=k}if(!p)p=await hn(n,process.cwd(),s,i);if(!p)return console.error(`Web component source file not found: ${n}`),null;let u=await Bun.file(p).text();i.add(p);let y=(e.outputFormat||"js")==="ts",f=y?Wt({name:o,tag:l,baseElement:d,source:u,shadowDOM:e.shadowDOM??!0,template:e.template??!0,styleSource:e.styleSource,attributes:e.attributes||[],attributeTypes:e.attributeTypes||{}}):Lt({name:o,tag:l,baseElement:d,source:u,shadowDOM:e.shadowDOM??!0,template:e.template??!0,styleSource:e.styleSource,attributes:e.attributes||[]}),v=s.webComponents?.outputDir||"dist/web-components";await Vt.promises.mkdir(v,{recursive:!0});let b=y?"ts":"js",x=q.join(v,`${l}.${b}`);if(await Bun.write(x,f),s.debug)console.log(`Built web component ${o} -> ${x}`);return x}function Lt(e){let{name:s,tag:i,baseElement:o="HTMLElement",source:n,shadowDOM:l,template:d,styleSource:p,attributes:u=[]}=e,m=n.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").trim();if(!l)m=m.replace(/<slot\s+name=["']([^"']+)["']\s*>([\s\S]*?)<\/slot>/gi,'<div data-slot="$1">$2</div>'),m=m.replace(/<slot\s+name=["']([^"']+)["']\s*\/>/gi,'<div data-slot="$1"></div>'),m=m.replace(/<slot\s*>([\s\S]*?)<\/slot>/gi,"<div data-default-slot>$1</div>"),m=m.replace(/<slot\s*\/>/gi,"<div data-default-slot></div>");let y="";if(p)y=`<link rel="stylesheet" href="${p}">`;return`/**
1011
1011
  * ${s} Web Component
1012
1012
  * Auto-generated from stx component
1013
1013
  */
@@ -1307,6 +1307,6 @@ ${y}
1307
1307
  customElements.define('${s}', ${d});
1308
1308
  `}async function Ze(e,s,i,o){if(s.length<1)return c("WebComponent","@webcomponent directive requires at least the tag name parameter",t.INVALID_DIRECTIVE_SYNTAX);let n=s[0].replace(/['"]/g,""),d=(i.__stx_options||{}).componentsDir||"components",p=q.isAbsolute(d)?[q.join(d,`${n}.stx`),q.join(q.dirname(o),`${n}.stx`)]:[q.join(q.dirname(o),d,`${n}.stx`),q.join(process.cwd(),d,`${n}.stx`),q.join(q.dirname(o),`${n}.stx`)],u=null;for(let f of p)if(await r(f)){u=await Bun.file(f).text();break}if(!u)return c("WebComponent",`Component file not found: ${n}.stx`,t.FILE_NOT_FOUND);let m=Ft(u,n);return`<script type="module">
1309
1309
  ${qt(m)}
1310
- </script>`}var L={enabled:!0,ssr:!1,partialsDir:"partials",componentsDir:"components",layoutsDir:"layouts",defaultLayout:"default",debug:!1,cache:!0,stateDir:an,cachePath:".stx/cache",cacheVersion:"1.0.0",componentRenderCacheBytes:33554432,build:{pagesDir:"pages",outputDir:"dist",baseUrl:"/",sitemap:!0,minify:!0,cache:!0,cacheDir:".stx/ssg-cache",concurrency:10,generate404:!0,publicDir:"public",trailingSlash:!1,cleanOutput:!0},customDirectives:[{name:"markdown",handler:Ie,hasEndTag:!0,description:"Render markdown content to HTML"},{name:"webcomponent",handler:Ze,hasEndTag:!1,description:"Include a web component in the template"},tc,nc,ds,ps,De,ke,Ae,Pe,_e,Oe,Fe,$e,...Vs],middleware:[],i18n:{defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},webComponents:{enabled:!1,outputDir:"dist/web-components",components:[]},docs:{enabled:!1,outputDir:"docs",format:"markdown",components:!0,templates:!0,directives:!0},streaming:{enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},hydration:{enabled:!1,mode:"islands",clientEntry:"src/client.ts",autoMarkers:!0,preload:"lazy"},router:{enabled:!0,container:"main",linkSelector:"a[href]",viewTransitions:!0,scrollToTop:!0,scrollRestoration:!0,prefetch:!0,cache:!0,cacheTTL:300000,skipSelectors:'[data-no-router], [target="_blank"]',viewTransitionCSS:{oldRoot:"fade-out 0.15s ease-in",newRoot:"fade-in 0.2s ease-out",oldContent:"slide-out 0.2s ease-in",newContent:"slide-in 0.25s ease-out"}},a11y:{enabled:!0,addSrOnlyStyles:!0,level:"AA",autoFix:!1,ignoreChecks:[]},seo:{enabled:!0,socialPreview:!0,defaultConfig:{title:"stx Project",description:"A website built with stx templating engine"}},animation:{enabled:!0,defaultDuration:300,defaultEase:"ease",respectMotionPreferences:!0,staggerDelay:50},markdown:{enabled:!0,syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0,additionalThemes:["light-plus","one-dark-pro","dracula","monokai","solarized-light","nord","github-dark"]}},loops:{maxWhileIterations:1000,useAltLoopVariable:!1},story:{enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],port:6006},pwa:{enabled:!1,manifest:{name:"stx App",shortName:"stx",description:"A Progressive Web App built with stx",startUrl:"/",display:"standalone",orientation:"any",themeColor:"#000000",backgroundColor:"#ffffff",scope:"/"},icons:{src:"public/icon.png",sizes:[72,96,128,144,152,192,384,512],generateWebP:!0,generateAppleIcons:!0,outputDir:"pwa-icons",purpose:["any","maskable"]},routes:[{pattern:"/",strategy:"network-first"},{pattern:"/static/*",strategy:"cache-first",maxAgeSeconds:2592000},{pattern:"/api/*",strategy:"network-only"},{pattern:"*.js",strategy:"stale-while-revalidate"},{pattern:"*.css",strategy:"stale-while-revalidate"},{pattern:"*.png",strategy:"cache-first"},{pattern:"*.jpg",strategy:"cache-first"},{pattern:"*.webp",strategy:"cache-first"},{pattern:"*.svg",strategy:"cache-first"}],offline:{enabled:!0,fallbackTitle:"You are offline",fallbackMessage:"Please check your internet connection and try again.",precacheAssets:[]},serviceWorker:{fileName:"sw.js",cacheVersion:"1.0.0",skipWaiting:!0,clientsClaim:!0,navigationPreload:!1,excludeRoutes:["/api/auth/*"],cacheFileTypes:["html","css","js","png","jpg","jpeg","webp","svg","woff","woff2"],useWorkbox:!1},autoInject:!0,push:{enabled:!1,defaultOptions:{vibrate:[100,50,100],requireInteraction:!1}},backgroundSync:{enabled:!1,queueName:"stx-sync-queue",maxRetentionMinutes:1440,maxRetries:3,minInterval:1000,forms:[],endpoints:[]},shareTarget:{enabled:!1,action:"/share-target",method:"POST",enctype:"multipart/form-data",params:{title:"title",text:"text",url:"url"}},fileHandlers:{enabled:!1},protocolHandlers:[],cacheStorage:{maxSize:100,maxEntries:500,maxAge:30,purgeStrategy:"lru"},updates:{enabled:!0,promptUser:!0,autoReload:!1,message:"A new version is available. Reload to update?"},precache:{enabled:!0,includeHtml:!0,includeJs:!0,includeCss:!0,includeImages:!0,includeFonts:!0,include:[],exclude:["*.map","*.LICENSE.txt"],maxFileSizeKB:500}},media:{enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3],tsImages:{enabled:!0,outputDir:"dist/images",baseUrl:"/images",formatQuality:{jpeg:{quality:85,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4,lossless:!1}},breakpoints:[320,480,640,768,1024,1280,1536,1920],batchOptions:{concurrency:4,optimizationPreset:"web"}}},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0,tsVideos:{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos",defaultQuality:"high",streaming:{enabled:!0,format:"hls",segmentDuration:6,defaultQualities:[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000}]},thumbnails:{enabled:!0,count:10,format:"webp",width:320},transcoding:{defaultCodec:"h264",defaultAudioCodec:"aac",speedPreset:"medium"}}},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}},broadcasting:{enabled:!1,driver:"bun",host:"0.0.0.0",port:6001,scheme:"ws",verbose:!1}};function Ut(e,s,i){let o=s||"pages";if(e)return{root:e,pagesDir:o};let n=i||process.cwd(),l=N.join(n,"resources","views"),d=N.join(n,"resources","layouts");if(Q.existsSync(l)&&Q.existsSync(d))return{root:"resources",pagesDir:"views"};let p=N.join(n,"resources","views","pages");if(Q.existsSync(p))return{root:"resources/views",pagesDir:o};return{root:".",pagesDir:o}}var et=new Set,ue=["partialsDir","componentsDir","layoutsDir"],Se=new WeakMap;function Bt(e,s){let i=s.replace(/[\\/]+$/,"");if(!i||i===".")return!0;let o=e.replace(/\\/g,"/"),n=i.replace(/\\/g,"/");return o===n||o.startsWith(`${n}/`)}function wf(e,s){let i=!e.root,o=Ut(e.root,e.pagesDir,s);if(e.root=o.root,e.pagesDir=o.pagesDir,i&&o.root!=="."){let n=`${s}::${o.root}`;if(!et.has(n))et.add(n),console.warn(`[stx] No "root" in config \u2014 inferred "${o.root}" from the project layout. Template directories are resolved under it; set root explicitly to pin this.`)}if(!Se.has(e)){let n={};for(let l of ue){let d=e[l];if(typeof d==="string"&&d)n[l]=d}Se.set(e,n)}if(e.root&&e.root!=="."){let n=e.root;for(let l of ue){let d=e[l];if(typeof d!=="string"||!d)continue;if(N.isAbsolute(d)||Bt(d,n))continue;e[l]=N.join(n,d)}}for(let n of ue){let l=e[n];if(typeof l!=="string"||!l||N.isAbsolute(l))continue;e[n]=N.resolve(s,l)}return e}function Jt(e,s){let i=Se.get(e);for(let o of ue){let n=e[o];if(typeof n!=="string"||!n)continue;let l=N.isAbsolute(n)?n:N.join(s,n);if(Q.existsSync(l))continue;let d=i?.[o]??n,p=e.root,u=!!p&&p!==".";console.warn(`[stx] ${String(o)} resolves to "${l}", which does not exist. Configured as "${d}"`+(u?`, resolved under root "${p}".`:"."))}}function Kt(e){if(e.customDirectives)e.customDirectives=[...e.customDirectives];if(e.middleware)e.middleware=[...e.middleware];if(e.apiRoutes)e.apiRoutes={...e.apiRoutes}}function Gt(e){if(uc(e.stateDir),e.stateDir=pr(),e.cachePath=fr(e.cachePath),e.build)e.build.cacheDir=fr(e.build.cacheDir);if(e.media?.cache)e.media.cache.directory=fr(e.media.cache.directory);if(e.story)e.story.outDir=fr(e.story.outDir)}var K=null,Y=new Map,de=new Map,se=null;async function No(e,s=Ht){try{return await s(e)}catch(i){if(i instanceof Error&&i.name==="ConfigNotFoundError")return{config:e.defaultConfig};throw i}}async function a(e){let s=e?N.resolve(e):process.cwd(),i=de.get(s);if(i&&i.signature!==ls(i.graph)){let l=Y.get(s);if(Y.delete(s),de.delete(s),!e)K=null,se=null;let{clearComponentCache:d}=await import("./chunk-5wrgzs4c.js"),{partialsCache:p}=await import("./chunk-0wtqxs6s.js");if(d(),p.clear(),l&&i.configSignature===us(i.graph)){let u=l.then(async(m)=>{let y={...i.graph};await Mo(y,s),de.set(s,{graph:y,signature:ls(y),configSignature:us(y)});let f={...m,_layerGraph:y};if(!e)K=f;return f});return Y.set(s,u),u}}if(!e){if(K)return K;if(se)return se}let o=Y.get(s);if(o)return o;let n=(async()=>{let l=[".ts",".js",".mjs",".cjs",".json"],d=l.some((v)=>Q.existsSync(N.join(s,`stx.config${v}`))),p=l.some((v)=>Q.existsSync(N.join(s,"config",`ui${v}`))),u;if(d&&p){let v=await No({name:"ui",cwd:N.join(s,"config"),defaultConfig:L,errorPolicy:"throw",verbose:!1});u=(await No({name:"stx",alias:"ui",cwd:s,defaultConfig:v.config,errorPolicy:"throw",verbose:!1})).config}else u=(await No({name:"stx",alias:"ui",cwd:s,defaultConfig:L,errorPolicy:"throw",verbose:!1})).config;if(u.extends!==void 0||i){let v=await sc(s,L);u=v.config,de.set(s,{graph:v.graph,signature:ls(v.graph),configSignature:us(v.graph)})}if(u.runtimeConfig){let{resolveRuntimeConfig:v}=await import("./chunk-2snfd93r.js");v(u.runtimeConfig,{});let{generateRuntimeConfigTypes:b}=await import("./chunk-faa56mhz.js");await b(s,u.runtimeConfig)}Kt(u),Gt(u),wf(u,s),Jt(u,s);let m=[],y=new Set((u.plugins??[]).map((v)=>typeof v==="string"?v:v[0]));for(let v of u.componentPackages??["@stacksjs/components"]){let b=`${v}/stx-plugin`;if(y.has(b)||y.has(v))continue;try{g.resolve(b,{paths:[s]}),m.push(b)}catch{}}let f=[...u.plugins??[],...m];if(f.length>0){let{pluginManager:v}=await import("./chunk-sy1btryy.js"),b=[],x=[];for(let k of f){let S=typeof k==="string"?k:k[0],_=typeof k==="string"?{}:k[1]||{};try{let A,E;try{let w=g.resolve(S,{paths:[s]});A=await import(w),E=N.dirname(w)}catch{let w=N.resolve(s,S);A=await import(w),E=N.dirname(w)}let I=A.default||A;if(!v.has(I.name))await v.register(I,u);if(I.components){let w=Array.isArray(I.components)?I.components:[I.components];for(let C of w)b.push(N.resolve(E,C))}if(I.pages){let w=N.resolve(E,I.pages),C=_.path||"/";x.push({dir:w,prefix:C})}if(I.setup){let w={addDirective:(C)=>{u.customDirectives=u.customDirectives||[],u.customDirectives.push(C)},addRoute:(C,D)=>{u.apiRoutes=u.apiRoutes||{},u.apiRoutes[C]=D},addMiddleware:(C)=>{u.middleware=u.middleware||[],u.middleware.push(C)},pluginDir:E,config:u};await I.setup(_,w)}process.stderr.write(`[stx] Plugin loaded: ${I.name||S}
1311
- `)}catch(A){console.warn(`[stx] Failed to load plugin ${S}:`,A.message)}}u._pluginComponentDirs=b,u._pluginPageDirs=x}return u})();if(Y.set(s,n),n.catch(()=>{if(Y.get(s)===n)Y.delete(s)}),!e)se=n,n.then((l)=>{K=l}).catch(()=>{});return n}var P=new Proxy(L,{get(e,s){if(K&&s in K)return K[s];if(!se)a().catch((i)=>{console.warn("[stx] Failed to load config file:",i?.message||i)});return e[s]}});function ph(e){return e}function fh(e){let s=[],i=[];if(e.partialsDir!==void 0&&typeof e.partialsDir!=="string")s.push({path:"partialsDir",message:"partialsDir must be a string",severity:"error"});if(e.componentsDir!==void 0&&typeof e.componentsDir!=="string")s.push({path:"componentsDir",message:"componentsDir must be a string",severity:"error"});if(e.cache!==void 0&&typeof e.cache!=="boolean")s.push({path:"cache",message:"cache must be a boolean",severity:"error"});if(e.debug!==void 0&&typeof e.debug!=="boolean")s.push({path:"debug",message:"debug must be a boolean",severity:"error"});if(e.streaming){if(e.streaming.bufferSize!==void 0){if(typeof e.streaming.bufferSize!=="number"||e.streaming.bufferSize<=0)s.push({path:"streaming.bufferSize",message:"streaming.bufferSize must be a positive number",severity:"error"})}if(e.streaming.timeout!==void 0){if(typeof e.streaming.timeout!=="number"||e.streaming.timeout<=0)s.push({path:"streaming.timeout",message:"streaming.timeout must be a positive number",severity:"error"})}if(e.streaming.strategy!==void 0){let o=["auto","manual","sections"];if(!o.includes(e.streaming.strategy))s.push({path:"streaming.strategy",message:`streaming.strategy must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.i18n){if(e.i18n.format!==void 0){let o=["json","yaml","yml","js"];if(!o.includes(e.i18n.format))s.push({path:"i18n.format",message:`i18n.format must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.animation){if(e.animation.defaultDuration!==void 0){if(typeof e.animation.defaultDuration!=="number"||e.animation.defaultDuration<0)s.push({path:"animation.defaultDuration",message:"animation.defaultDuration must be a non-negative number",severity:"error"})}if(e.animation.staggerDelay!==void 0){if(typeof e.animation.staggerDelay!=="number"||e.animation.staggerDelay<0)s.push({path:"animation.staggerDelay",message:"animation.staggerDelay must be a non-negative number",severity:"error"})}}if(e.a11y){if(e.a11y.level!==void 0){let o=["AA","AAA"];if(!o.includes(e.a11y.level))s.push({path:"a11y.level",message:`a11y.level must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.hydration){if(e.hydration.mode!==void 0){let o=["progressive","islands"];if(!o.includes(e.hydration.mode))s.push({path:"hydration.mode",message:`hydration.mode must be one of: ${o.join(", ")}`,severity:"error"})}if(e.hydration.preload!==void 0){let o=["none","eager","lazy"];if(!o.includes(e.hydration.preload))s.push({path:"hydration.preload",message:`hydration.preload must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.customDirectives)if(!Array.isArray(e.customDirectives))s.push({path:"customDirectives",message:"customDirectives must be an array",severity:"error"});else e.customDirectives.forEach((o,n)=>{if(!o.name||typeof o.name!=="string")s.push({path:`customDirectives[${n}].name`,message:"Custom directive must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")s.push({path:`customDirectives[${n}].handler`,message:"Custom directive must have a handler function",severity:"error"})});if(e.middleware)if(!Array.isArray(e.middleware))s.push({path:"middleware",message:"middleware must be an array",severity:"error"});else e.middleware.forEach((o,n)=>{if(!o.name||typeof o.name!=="string")s.push({path:`middleware[${n}].name`,message:"Middleware must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")s.push({path:`middleware[${n}].handler`,message:"Middleware must have a handler function",severity:"error"});if(!o.timing||!["before","after"].includes(o.timing))s.push({path:`middleware[${n}].timing`,message:'Middleware timing must be "before" or "after"',severity:"error"})});if(e.debug===!0&&e.cache===!0)i.push({path:"debug+cache",message:"Debug mode with caching enabled may show stale content during development",severity:"warning"});if(e.seo?.enabled===!0&&!e.seo?.defaultConfig?.title)i.push({path:"seo.defaultConfig.title",message:"SEO is enabled but no default title is set",severity:"warning"});if(e.pwa){if(e.pwa.enabled===!0&&!e.pwa.manifest?.name)s.push({path:"pwa.manifest.name",message:"PWA manifest name is required when PWA is enabled",severity:"error"});if(e.pwa.manifest?.display!==void 0){let o=["fullscreen","standalone","minimal-ui","browser"];if(!o.includes(e.pwa.manifest.display))s.push({path:"pwa.manifest.display",message:`PWA display must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.manifest?.orientation!==void 0){let o=["portrait","landscape","any","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"];if(!o.includes(e.pwa.manifest.orientation))s.push({path:"pwa.manifest.orientation",message:`PWA orientation must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.routes){let o=["cache-first","network-first","stale-while-revalidate","network-only","cache-only"];e.pwa.routes.forEach((n,l)=>{if(!n.pattern||typeof n.pattern!=="string")s.push({path:`pwa.routes[${l}].pattern`,message:"PWA route must have a pattern string",severity:"error"});if(!o.includes(n.strategy))s.push({path:`pwa.routes[${l}].strategy`,message:`PWA route strategy must be one of: ${o.join(", ")}`,severity:"error"});if(n.maxAgeSeconds!==void 0&&(typeof n.maxAgeSeconds!=="number"||n.maxAgeSeconds<0))s.push({path:`pwa.routes[${l}].maxAgeSeconds`,message:"PWA route maxAgeSeconds must be a non-negative number",severity:"error"});if(n.maxEntries!==void 0&&(typeof n.maxEntries!=="number"||n.maxEntries<1))s.push({path:`pwa.routes[${l}].maxEntries`,message:"PWA route maxEntries must be a positive number",severity:"error"})})}if(e.pwa.icons?.sizes){if(!Array.isArray(e.pwa.icons.sizes))s.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be an array of numbers",severity:"error"});else if(e.pwa.icons.sizes.filter((n)=>typeof n!=="number"||n<16||n>1024).length>0)s.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be numbers between 16 and 1024",severity:"error"})}if(e.pwa.icons?.purpose){let o=["any","maskable","monochrome"];if(e.pwa.icons.purpose.filter((l)=>!o.includes(l)).length>0)s.push({path:"pwa.icons.purpose",message:`PWA icon purpose must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.enabled===!0&&!e.pwa.icons?.src)i.push({path:"pwa.icons.src",message:"PWA is enabled but no icon source specified. Provide a 512x512 PNG for best results.",severity:"warning"});if(e.pwa.enabled===!0&&!e.pwa.manifest?.themeColor)i.push({path:"pwa.manifest.themeColor",message:"PWA theme color not set, defaulting to black",severity:"warning"})}return{valid:s.length===0,errors:s,warnings:i}}
1312
- export{Xa,Ja,cr,Ye,Ya,cs,L,wf,No,a,P,ph,fh};
1310
+ </script>`}var j={enabled:!0,ssr:!1,partialsDir:"partials",componentsDir:"components",layoutsDir:"layouts",defaultLayout:"default",debug:!1,cache:!0,stateDir:an,cachePath:".stx/cache",cacheVersion:"1.0.0",componentRenderCacheBytes:33554432,build:{pagesDir:"pages",outputDir:"dist",baseUrl:"/",sitemap:!0,minify:!0,cache:!0,cacheDir:".stx/ssg-cache",concurrency:10,generate404:!0,publicDir:"public",trailingSlash:!1,cleanOutput:!0},customDirectives:[{name:"markdown",handler:Ie,hasEndTag:!0,description:"Render markdown content to HTML"},{name:"webcomponent",handler:Ze,hasEndTag:!1,description:"Include a web component in the template"},nc,rc,ps,gs,De,ke,Ae,Pe,_e,Oe,Fe,$e,...Us],middleware:[],i18n:{defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},webComponents:{enabled:!1,outputDir:"dist/web-components",components:[]},docs:{enabled:!1,outputDir:"docs",format:"markdown",components:!0,templates:!0,directives:!0},streaming:{enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},hydration:{enabled:!1,mode:"islands",clientEntry:"src/client.ts",autoMarkers:!0,preload:"lazy"},router:{enabled:!0,container:"main",linkSelector:"a[href]",viewTransitions:!0,scrollToTop:!0,scrollRestoration:!0,prefetch:!0,cache:!0,cacheTTL:300000,skipSelectors:'[data-no-router], [target="_blank"]',viewTransitionCSS:{oldRoot:"fade-out 0.15s ease-in",newRoot:"fade-in 0.2s ease-out",oldContent:"slide-out 0.2s ease-in",newContent:"slide-in 0.25s ease-out"}},a11y:{enabled:!0,addSrOnlyStyles:!0,level:"AA",autoFix:!1,ignoreChecks:[]},seo:{enabled:!0,socialPreview:!0,defaultConfig:{title:"stx Project",description:"A website built with stx templating engine"}},animation:{enabled:!0,defaultDuration:300,defaultEase:"ease",respectMotionPreferences:!0,staggerDelay:50},markdown:{enabled:!0,syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0,additionalThemes:["light-plus","one-dark-pro","dracula","monokai","solarized-light","nord","github-dark"]}},loops:{maxWhileIterations:1000,useAltLoopVariable:!1},story:{enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],port:6006},pwa:{enabled:!1,manifest:{name:"stx App",shortName:"stx",description:"A Progressive Web App built with stx",startUrl:"/",display:"standalone",orientation:"any",themeColor:"#000000",backgroundColor:"#ffffff",scope:"/"},icons:{src:"public/icon.png",sizes:[72,96,128,144,152,192,384,512],generateWebP:!0,generateAppleIcons:!0,outputDir:"pwa-icons",purpose:["any","maskable"]},routes:[{pattern:"/",strategy:"network-first"},{pattern:"/static/*",strategy:"cache-first",maxAgeSeconds:2592000},{pattern:"/api/*",strategy:"network-only"},{pattern:"*.js",strategy:"stale-while-revalidate"},{pattern:"*.css",strategy:"stale-while-revalidate"},{pattern:"*.png",strategy:"cache-first"},{pattern:"*.jpg",strategy:"cache-first"},{pattern:"*.webp",strategy:"cache-first"},{pattern:"*.svg",strategy:"cache-first"}],offline:{enabled:!0,fallbackTitle:"You are offline",fallbackMessage:"Please check your internet connection and try again.",precacheAssets:[]},serviceWorker:{fileName:"sw.js",cacheVersion:"1.0.0",skipWaiting:!0,clientsClaim:!0,navigationPreload:!1,excludeRoutes:["/api/auth/*"],cacheFileTypes:["html","css","js","png","jpg","jpeg","webp","svg","woff","woff2"],useWorkbox:!1},autoInject:!0,push:{enabled:!1,defaultOptions:{vibrate:[100,50,100],requireInteraction:!1}},backgroundSync:{enabled:!1,queueName:"stx-sync-queue",maxRetentionMinutes:1440,maxRetries:3,minInterval:1000,forms:[],endpoints:[]},shareTarget:{enabled:!1,action:"/share-target",method:"POST",enctype:"multipart/form-data",params:{title:"title",text:"text",url:"url"}},fileHandlers:{enabled:!1},protocolHandlers:[],cacheStorage:{maxSize:100,maxEntries:500,maxAge:30,purgeStrategy:"lru"},updates:{enabled:!0,promptUser:!0,autoReload:!1,message:"A new version is available. Reload to update?"},precache:{enabled:!0,includeHtml:!0,includeJs:!0,includeCss:!0,includeImages:!0,includeFonts:!0,include:[],exclude:["*.map","*.LICENSE.txt"],maxFileSizeKB:500}},media:{enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3],tsImages:{enabled:!0,outputDir:"dist/images",baseUrl:"/images",formatQuality:{jpeg:{quality:85,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4,lossless:!1}},breakpoints:[320,480,640,768,1024,1280,1536,1920],batchOptions:{concurrency:4,optimizationPreset:"web"}}},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0,tsVideos:{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos",defaultQuality:"high",streaming:{enabled:!0,format:"hls",segmentDuration:6,defaultQualities:[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000}]},thumbnails:{enabled:!0,count:10,format:"webp",width:320},transcoding:{defaultCodec:"h264",defaultAudioCodec:"aac",speedPreset:"medium"}}},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}},broadcasting:{enabled:!1,driver:"bun",host:"0.0.0.0",port:6001,scheme:"ws",verbose:!1}};function Ut(e,s,i){let o=s||"pages";if(e)return{root:e,pagesDir:o};let n=i||process.cwd(),l=N.join(n,"resources","views"),d=N.join(n,"resources","layouts");if(Q.existsSync(l)&&Q.existsSync(d))return{root:"resources",pagesDir:"views"};let p=N.join(n,"resources","views","pages");if(Q.existsSync(p))return{root:"resources/views",pagesDir:o};return{root:".",pagesDir:o}}var et=new Set,ue=["partialsDir","componentsDir","layoutsDir"],Se=new WeakMap;function Bt(e,s){let i=s.replace(/[\\/]+$/,"");if(!i||i===".")return!0;let o=e.replace(/\\/g,"/"),n=i.replace(/\\/g,"/");return o===n||o.startsWith(`${n}/`)}function Sf(e,s){let i=!e.root,o=Ut(e.root,e.pagesDir,s);if(e.root=o.root,e.pagesDir=o.pagesDir,i&&o.root!=="."){let n=`${s}::${o.root}`;if(!et.has(n))et.add(n),console.warn(`[stx] No "root" in config \u2014 inferred "${o.root}" from the project layout. Template directories are resolved under it; set root explicitly to pin this.`)}if(!Se.has(e)){let n={};for(let l of ue){let d=e[l];if(typeof d==="string"&&d)n[l]=d}Se.set(e,n)}if(e.root&&e.root!=="."){let n=e.root;for(let l of ue){let d=e[l];if(typeof d!=="string"||!d)continue;if(N.isAbsolute(d)||Bt(d,n))continue;e[l]=N.join(n,d)}}for(let n of ue){let l=e[n];if(typeof l!=="string"||!l||N.isAbsolute(l))continue;e[n]=N.resolve(s,l)}return e}function Jt(e,s){let i=Se.get(e);for(let o of ue){let n=e[o];if(typeof n!=="string"||!n)continue;let l=N.isAbsolute(n)?n:N.join(s,n);if(Q.existsSync(l))continue;let d=i?.[o]??n,p=e.root,u=!!p&&p!==".";console.warn(`[stx] ${String(o)} resolves to "${l}", which does not exist. Configured as "${d}"`+(u?`, resolved under root "${p}".`:"."))}}function Kt(e){if(e.customDirectives)e.customDirectives=[...e.customDirectives];if(e.middleware)e.middleware=[...e.middleware];if(e.apiRoutes)e.apiRoutes={...e.apiRoutes}}function Gt(e){if(dc(e.stateDir),e.stateDir=pr(),e.cachePath=fr(e.cachePath),e.build)e.build.cacheDir=fr(e.build.cacheDir);if(e.media?.cache)e.media.cache.directory=fr(e.media.cache.directory);if(e.story)e.story.outDir=fr(e.story.outDir)}var K=null,Y=new Map,de=new Map,se=null;async function Do(e,s=Ht){try{return await s(e)}catch(i){if(i instanceof Error&&i.name==="ConfigNotFoundError")return{config:e.defaultConfig};throw i}}async function a(e){let s=e?N.resolve(e):process.cwd(),i=de.get(s);if(i&&i.signature!==us(i.graph)){let l=Y.get(s);if(Y.delete(s),de.delete(s),!e)K=null,se=null;let{clearComponentCache:d}=await import("./chunk-t9h236ee.js"),{partialsCache:p}=await import("./chunk-k4mkhmrf.js");if(d(),p.clear(),l&&i.configSignature===ds(i.graph)){let u=l.then(async(m)=>{let y={...i.graph};await Lo(y,s),de.set(s,{graph:y,signature:us(y),configSignature:ds(y)});let f={...m,_layerGraph:y};if(!e)K=f;return f});return Y.set(s,u),u}}if(!e){if(K)return K;if(se)return se}let o=Y.get(s);if(o)return o;let n=(async()=>{let l=[".ts",".js",".mjs",".cjs",".json"],d=l.some((v)=>Q.existsSync(N.join(s,`stx.config${v}`))),p=l.some((v)=>Q.existsSync(N.join(s,"config",`ui${v}`))),u;if(d&&p){let v=await Do({name:"ui",cwd:N.join(s,"config"),defaultConfig:j,errorPolicy:"throw",verbose:!1});u=(await Do({name:"stx",alias:"ui",cwd:s,defaultConfig:v.config,errorPolicy:"throw",verbose:!1})).config}else u=(await Do({name:"stx",alias:"ui",cwd:s,defaultConfig:j,errorPolicy:"throw",verbose:!1})).config;if(u.extends!==void 0||i){let v=await oc(s,j);u=v.config,de.set(s,{graph:v.graph,signature:us(v.graph),configSignature:ds(v.graph)})}if(u.runtimeConfig){let{resolveRuntimeConfig:v}=await import("./chunk-5wpgbwap.js");v(u.runtimeConfig,{});let{generateRuntimeConfigTypes:b}=await import("./chunk-mjkmjx2r.js");await b(s,u.runtimeConfig)}Kt(u),Gt(u),Sf(u,s),Jt(u,s);let m=[],y=new Set((u.plugins??[]).map((v)=>typeof v==="string"?v:v[0]));for(let v of u.componentPackages??["@stacksjs/components"]){let b=`${v}/stx-plugin`;if(y.has(b)||y.has(v))continue;try{g.resolve(b,{paths:[s]}),m.push(b)}catch{}}let f=[...u.plugins??[],...m];if(f.length>0){let{pluginManager:v}=await import("./chunk-362sjw8c.js"),b=[],x=[];for(let k of f){let S=typeof k==="string"?k:k[0],_=typeof k==="string"?{}:k[1]||{};try{let A,E;try{let w=g.resolve(S,{paths:[s]});A=await import(w),E=N.dirname(w)}catch{let w=N.resolve(s,S);A=await import(w),E=N.dirname(w)}let I=A.default||A;if(!v.has(I.name))await v.register(I,u);if(I.components){let w=Array.isArray(I.components)?I.components:[I.components];for(let C of w)b.push(N.resolve(E,C))}if(I.pages){let w=N.resolve(E,I.pages),C=_.path||"/";x.push({dir:w,prefix:C})}if(I.setup){let w={addDirective:(C)=>{u.customDirectives=u.customDirectives||[],u.customDirectives.push(C)},addRoute:(C,D)=>{u.apiRoutes=u.apiRoutes||{},u.apiRoutes[C]=D},addMiddleware:(C)=>{u.middleware=u.middleware||[],u.middleware.push(C)},pluginDir:E,config:u};await I.setup(_,w)}process.stderr.write(`[stx] Plugin loaded: ${I.name||S}
1311
+ `)}catch(A){console.warn(`[stx] Failed to load plugin ${S}:`,A.message)}}u._pluginComponentDirs=b,u._pluginPageDirs=x}return u})();if(Y.set(s,n),n.catch(()=>{if(Y.get(s)===n)Y.delete(s)}),!e)se=n,n.then((l)=>{K=l}).catch(()=>{});return n}var P=new Proxy(j,{get(e,s){if(K&&s in K)return K[s];if(!se)a().catch((i)=>{console.warn("[stx] Failed to load config file:",i?.message||i)});return e[s]}});function ph(e){return e}function fh(e){let s=[],i=[];if(e.partialsDir!==void 0&&typeof e.partialsDir!=="string")s.push({path:"partialsDir",message:"partialsDir must be a string",severity:"error"});if(e.componentsDir!==void 0&&typeof e.componentsDir!=="string")s.push({path:"componentsDir",message:"componentsDir must be a string",severity:"error"});if(e.cache!==void 0&&typeof e.cache!=="boolean")s.push({path:"cache",message:"cache must be a boolean",severity:"error"});if(e.debug!==void 0&&typeof e.debug!=="boolean")s.push({path:"debug",message:"debug must be a boolean",severity:"error"});if(e.streaming){if(e.streaming.bufferSize!==void 0){if(typeof e.streaming.bufferSize!=="number"||e.streaming.bufferSize<=0)s.push({path:"streaming.bufferSize",message:"streaming.bufferSize must be a positive number",severity:"error"})}if(e.streaming.timeout!==void 0){if(typeof e.streaming.timeout!=="number"||e.streaming.timeout<=0)s.push({path:"streaming.timeout",message:"streaming.timeout must be a positive number",severity:"error"})}if(e.streaming.strategy!==void 0){let o=["auto","manual","sections"];if(!o.includes(e.streaming.strategy))s.push({path:"streaming.strategy",message:`streaming.strategy must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.i18n){if(e.i18n.format!==void 0){let o=["json","yaml","yml","js"];if(!o.includes(e.i18n.format))s.push({path:"i18n.format",message:`i18n.format must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.animation){if(e.animation.defaultDuration!==void 0){if(typeof e.animation.defaultDuration!=="number"||e.animation.defaultDuration<0)s.push({path:"animation.defaultDuration",message:"animation.defaultDuration must be a non-negative number",severity:"error"})}if(e.animation.staggerDelay!==void 0){if(typeof e.animation.staggerDelay!=="number"||e.animation.staggerDelay<0)s.push({path:"animation.staggerDelay",message:"animation.staggerDelay must be a non-negative number",severity:"error"})}}if(e.a11y){if(e.a11y.level!==void 0){let o=["AA","AAA"];if(!o.includes(e.a11y.level))s.push({path:"a11y.level",message:`a11y.level must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.hydration){if(e.hydration.mode!==void 0){let o=["progressive","islands"];if(!o.includes(e.hydration.mode))s.push({path:"hydration.mode",message:`hydration.mode must be one of: ${o.join(", ")}`,severity:"error"})}if(e.hydration.preload!==void 0){let o=["none","eager","lazy"];if(!o.includes(e.hydration.preload))s.push({path:"hydration.preload",message:`hydration.preload must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.customDirectives)if(!Array.isArray(e.customDirectives))s.push({path:"customDirectives",message:"customDirectives must be an array",severity:"error"});else e.customDirectives.forEach((o,n)=>{if(!o.name||typeof o.name!=="string")s.push({path:`customDirectives[${n}].name`,message:"Custom directive must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")s.push({path:`customDirectives[${n}].handler`,message:"Custom directive must have a handler function",severity:"error"})});if(e.middleware)if(!Array.isArray(e.middleware))s.push({path:"middleware",message:"middleware must be an array",severity:"error"});else e.middleware.forEach((o,n)=>{if(!o.name||typeof o.name!=="string")s.push({path:`middleware[${n}].name`,message:"Middleware must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")s.push({path:`middleware[${n}].handler`,message:"Middleware must have a handler function",severity:"error"});if(!o.timing||!["before","after"].includes(o.timing))s.push({path:`middleware[${n}].timing`,message:'Middleware timing must be "before" or "after"',severity:"error"})});if(e.debug===!0&&e.cache===!0)i.push({path:"debug+cache",message:"Debug mode with caching enabled may show stale content during development",severity:"warning"});if(e.seo?.enabled===!0&&!e.seo?.defaultConfig?.title)i.push({path:"seo.defaultConfig.title",message:"SEO is enabled but no default title is set",severity:"warning"});if(e.pwa){if(e.pwa.enabled===!0&&!e.pwa.manifest?.name)s.push({path:"pwa.manifest.name",message:"PWA manifest name is required when PWA is enabled",severity:"error"});if(e.pwa.manifest?.display!==void 0){let o=["fullscreen","standalone","minimal-ui","browser"];if(!o.includes(e.pwa.manifest.display))s.push({path:"pwa.manifest.display",message:`PWA display must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.manifest?.orientation!==void 0){let o=["portrait","landscape","any","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"];if(!o.includes(e.pwa.manifest.orientation))s.push({path:"pwa.manifest.orientation",message:`PWA orientation must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.routes){let o=["cache-first","network-first","stale-while-revalidate","network-only","cache-only"];e.pwa.routes.forEach((n,l)=>{if(!n.pattern||typeof n.pattern!=="string")s.push({path:`pwa.routes[${l}].pattern`,message:"PWA route must have a pattern string",severity:"error"});if(!o.includes(n.strategy))s.push({path:`pwa.routes[${l}].strategy`,message:`PWA route strategy must be one of: ${o.join(", ")}`,severity:"error"});if(n.maxAgeSeconds!==void 0&&(typeof n.maxAgeSeconds!=="number"||n.maxAgeSeconds<0))s.push({path:`pwa.routes[${l}].maxAgeSeconds`,message:"PWA route maxAgeSeconds must be a non-negative number",severity:"error"});if(n.maxEntries!==void 0&&(typeof n.maxEntries!=="number"||n.maxEntries<1))s.push({path:`pwa.routes[${l}].maxEntries`,message:"PWA route maxEntries must be a positive number",severity:"error"})})}if(e.pwa.icons?.sizes){if(!Array.isArray(e.pwa.icons.sizes))s.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be an array of numbers",severity:"error"});else if(e.pwa.icons.sizes.filter((n)=>typeof n!=="number"||n<16||n>1024).length>0)s.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be numbers between 16 and 1024",severity:"error"})}if(e.pwa.icons?.purpose){let o=["any","maskable","monochrome"];if(e.pwa.icons.purpose.filter((l)=>!o.includes(l)).length>0)s.push({path:"pwa.icons.purpose",message:`PWA icon purpose must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.enabled===!0&&!e.pwa.icons?.src)i.push({path:"pwa.icons.src",message:"PWA is enabled but no icon source specified. Provide a 512x512 PNG for best results.",severity:"warning"});if(e.pwa.enabled===!0&&!e.pwa.manifest?.themeColor)i.push({path:"pwa.manifest.themeColor",message:"PWA theme color not set, defaulting to black",severity:"warning"})}return{valid:s.length===0,errors:s,warnings:i}}
1312
+ export{Ja,Ya,cr,Ye,Za,ls,j,Sf,Do,a,P,ph,fh};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{ne}from"./chunk-dxqvv686.js";import R from"fs";import g from"path";import C from"crypto";var S=new Set(["webp","avif","jpeg","png"]),T=new Set(["cover","contain","fill","inside","outside"]),q=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),k=4096,D=80,U="cover";async function Zi(e,t){let r=t.routePath??"/_stx/img",h=new URL(e.url);if(h.pathname!==r)return null;let a=A(h,t);if(!a.ok)return new Response(a.error,{status:a.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:n,srcUrl:d,width:l,height:i,format:s,quality:u,fit:c}=a,m;try{m=R.statSync(n)}catch{return new Response(`Source image not found: ${d}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!m.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let w=t.cacheDir??".stx/cache/img";await R.promises.mkdir(w,{recursive:!0});let b=`${n}:${m.mtimeMs}:${m.size}`,I=`${l}x${i}:${s}:${u}:${c}`,f=C.createHash("sha256").update(`${b}|${I}`).digest("hex").slice(0,16),o=g.join(w,`${f}.${s}`),p={"Content-Type":ne(s),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${f}"`,"X-Stx-Image-Cache":"HIT"};if(e.headers.get("if-none-match")===`"${f}"`)return new Response(null,{status:304,headers:p});let v=Bun.file(o);if(await v.exists())return new Response(v,{headers:p});try{let x=Buffer.from(await Bun.file(n).arrayBuffer()),{resizeAndConvert:P}=await L(),F=await P(x,{width:l,height:i,format:s,quality:u,fit:c});return await Bun.write(o,F),p["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(F),{headers:p})}catch(x){let P=x.message;return new Response(`Image processing failed: ${P}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function Sl(e){return async(t)=>await Zi(t,e)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}function A(e,t){let r=e.searchParams.get("src");if(!r)return{ok:!1,error:"Missing required param: src",status:400};if(!r.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(r.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let h=g.extname(r).toLowerCase();if(!q.has(h))return{ok:!1,error:`Unsupported source extension: ${h}`,status:400};let a=g.resolve(t.publicDir),n=g.resolve(a,r.slice(1));if(!n.startsWith(`${a}${g.sep}`)&&n!==a)return{ok:!1,error:"src is outside publicDir",status:400};let d=t.maxWidth??k,l=t.maxHeight??k,i=e.searchParams.get("w"),s=e.searchParams.get("h"),u=i?Number.parseInt(i,10):0,c=s?Number.parseInt(s,10):0;if(i&&(!Number.isFinite(u)||u<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(s&&(!Number.isFinite(c)||c<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!i&&!s)return{ok:!1,error:"At least one of w or h is required",status:400};let m=Math.min(u||d,d),w=Math.min(c||l,l),b=e.searchParams.get("f")||"webp";if(!S.has(b))return{ok:!1,error:`Invalid f (must be one of: ${[...S].join(", ")})`,status:400};let I=b,f=e.searchParams.get("q"),o=f?Number.parseInt(f,10):t.defaultQuality??D;if(!Number.isFinite(o)||o<1||o>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let y=e.searchParams.get("fit")||t.defaultFit||U;if(!T.has(y))return{ok:!1,error:`Invalid fit (must be one of: ${[...T].join(", ")})`,status:400};return{ok:!0,srcFsPath:n,srcUrl:r,width:m,height:w,format:I,quality:o,fit:y}}async function L(){return await import("./chunk-b6318vv3.js")}
3
- export{Zi,Sl};
2
+ import{ne}from"./chunk-39nkd53v.js";import R from"fs";import g from"path";import C from"crypto";var S=new Set(["webp","avif","jpeg","png"]),T=new Set(["cover","contain","fill","inside","outside"]),q=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),k=4096,D=80,U="cover";async function Qi(e,t){let r=t.routePath??"/_stx/img",h=new URL(e.url);if(h.pathname!==r)return null;let a=A(h,t);if(!a.ok)return new Response(a.error,{status:a.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:n,srcUrl:d,width:l,height:i,format:s,quality:u,fit:c}=a,m;try{m=R.statSync(n)}catch{return new Response(`Source image not found: ${d}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!m.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let w=t.cacheDir??".stx/cache/img";await R.promises.mkdir(w,{recursive:!0});let b=`${n}:${m.mtimeMs}:${m.size}`,I=`${l}x${i}:${s}:${u}:${c}`,f=C.createHash("sha256").update(`${b}|${I}`).digest("hex").slice(0,16),o=g.join(w,`${f}.${s}`),p={"Content-Type":ne(s),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${f}"`,"X-Stx-Image-Cache":"HIT"};if(e.headers.get("if-none-match")===`"${f}"`)return new Response(null,{status:304,headers:p});let v=Bun.file(o);if(await v.exists())return new Response(v,{headers:p});try{let x=Buffer.from(await Bun.file(n).arrayBuffer()),{resizeAndConvert:P}=await L(),F=await P(x,{width:l,height:i,format:s,quality:u,fit:c});return await Bun.write(o,F),p["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(F),{headers:p})}catch(x){let P=x.message;return new Response(`Image processing failed: ${P}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function kl(e){return async(t)=>await Qi(t,e)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}function A(e,t){let r=e.searchParams.get("src");if(!r)return{ok:!1,error:"Missing required param: src",status:400};if(!r.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(r.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let h=g.extname(r).toLowerCase();if(!q.has(h))return{ok:!1,error:`Unsupported source extension: ${h}`,status:400};let a=g.resolve(t.publicDir),n=g.resolve(a,r.slice(1));if(!n.startsWith(`${a}${g.sep}`)&&n!==a)return{ok:!1,error:"src is outside publicDir",status:400};let d=t.maxWidth??k,l=t.maxHeight??k,i=e.searchParams.get("w"),s=e.searchParams.get("h"),u=i?Number.parseInt(i,10):0,c=s?Number.parseInt(s,10):0;if(i&&(!Number.isFinite(u)||u<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(s&&(!Number.isFinite(c)||c<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!i&&!s)return{ok:!1,error:"At least one of w or h is required",status:400};let m=Math.min(u||d,d),w=Math.min(c||l,l),b=e.searchParams.get("f")||"webp";if(!S.has(b))return{ok:!1,error:`Invalid f (must be one of: ${[...S].join(", ")})`,status:400};let I=b,f=e.searchParams.get("q"),o=f?Number.parseInt(f,10):t.defaultQuality??D;if(!Number.isFinite(o)||o<1||o>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let y=e.searchParams.get("fit")||t.defaultFit||U;if(!T.has(y))return{ok:!1,error:`Invalid fit (must be one of: ${[...T].join(", ")})`,status:400};return{ok:!0,srcFsPath:n,srcUrl:r,width:m,height:w,format:I,quality:o,fit:y}}async function L(){return await import("./chunk-wk50m71x.js")}
3
+ export{Qi,kl};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{lm,um,dm,pm,fm,gm}from"./chunk-fsz9k5k0.js";export{pm as generateTransitionCSS,fm as generateTransitionRuntime,lm as performEnter,um as performLeave,gm as processTransitionAttributes,dm as processTransitionDirectives};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{m,ei,Rc,Ac,Hf,Vf,Uf,Wf,qf,Is,Kf,Le,Y,je,Gf,wr,Xf,Oc,si,Be,r,hn,Nc,h,fe,wh}from"./chunk-9nev9akt.js";import"./chunk-yyj7mtfg.js";import"./chunk-rbmt5w9v.js";import"./chunk-zkx2m308.js";import"./chunk-zn3c0ew5.js";import"./chunk-ez35607j.js";export{fe as clearComponentCache,si as componentClientSignalNames,ei as convertToCommonJS,h as createDetailedErrorMessage,qf as extractDirectiveNames,Rc as extractScriptFromTemplate,m as extractVariables,r as fileExists,wh as getComponentCacheStats,Vf as getPositionInfo,Y as getSharedTranspiler,Nc as getSourceLineInfo,Wf as hasDirectives,Ac as hasVariables,Xf as isHydrateTrigger,Kf as isJavaScriptScript,Be as renderComponentWithSlot,hn as resolveTemplatePath,Gf as scopeOnRootElement,Is as scopeSequenceKey,Le as shouldTranspileTypeScript,Oc as slotContentHasExpressions,je as transpileTypeScript,wr as userComponentFileExists,Uf as validateDirective,Hf as validateTemplate};