@stacksjs/stx 0.2.674 → 0.2.676

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 (244) hide show
  1. package/dist/{chunk-szevd7d5.js → chunk-028e9fty.js} +2 -2
  2. package/dist/{chunk-rr527jt6.js → chunk-078qg8r5.js} +2 -2
  3. package/dist/chunk-0gk78x3r.js +2 -0
  4. package/dist/{chunk-fw413k9q.js → chunk-1b9thkg5.js} +2 -2
  5. package/dist/chunk-1e73whqh.js +2 -0
  6. package/dist/chunk-1rztwjdj.js +130 -0
  7. package/dist/{chunk-srq9fqq8.js → chunk-245sas8r.js} +38 -38
  8. package/dist/chunk-248a88mc.js +2 -0
  9. package/dist/chunk-2nqtmp8c.js +2 -0
  10. package/dist/chunk-2pga7zzb.js +4 -0
  11. package/dist/{chunk-bkkpq8dx.js → chunk-304dbbsw.js} +10 -10
  12. package/dist/{chunk-z22zy22p.js → chunk-34e8e8te.js} +2 -2
  13. package/dist/{chunk-md2jn67b.js → chunk-374nhgyf.js} +2 -2
  14. package/dist/chunk-3bfegbpw.js +2 -0
  15. package/dist/chunk-3gdt16xa.js +2 -0
  16. package/dist/chunk-3wsm9g9c.js +2 -0
  17. package/dist/chunk-3xx9d934.js +2 -0
  18. package/dist/{chunk-ham5x7ts.js → chunk-4fhbh04h.js} +4 -4
  19. package/dist/{chunk-5vt48yce.js → chunk-4jnv2v5e.js} +9 -9
  20. package/dist/chunk-4rk5qnqf.js +24 -0
  21. package/dist/chunk-526mf3fr.js +4 -0
  22. package/dist/chunk-54zkkxmb.js +2 -0
  23. package/dist/{chunk-kdebh22m.js → chunk-551s7ha0.js} +10 -10
  24. package/dist/chunk-5v7vm8cv.js +14 -0
  25. package/dist/{chunk-rdr09efy.js → chunk-5z0q3qv3.js} +5 -5
  26. package/dist/{chunk-6sjtyd0k.js → chunk-5z8mq37c.js} +4 -4
  27. package/dist/{chunk-ce6zddpf.js → chunk-6beg47t4.js} +2 -2
  28. package/dist/{chunk-trz8z4j4.js → chunk-6bwca55g.js} +37 -37
  29. package/dist/chunk-6kam8r5y.js +2 -0
  30. package/dist/{chunk-tddnb5bv.js → chunk-6ycyaf5g.js} +2 -2
  31. package/dist/chunk-707sx5sk.js +20 -0
  32. package/dist/chunk-78d5tn4r.js +2 -0
  33. package/dist/{chunk-pb6erpj3.js → chunk-78x52gz3.js} +5 -5
  34. package/dist/{chunk-zp79zkkd.js → chunk-78yjmbbs.js} +2 -2
  35. package/dist/{chunk-v21bhhjb.js → chunk-7j7h1eg3.js} +1 -1
  36. package/dist/{chunk-zmg1peyg.js → chunk-8aq07a1j.js} +3 -3
  37. package/dist/chunk-8p92r2sc.js +2 -0
  38. package/dist/chunk-909ymsjz.js +2 -0
  39. package/dist/{chunk-r7fdw2v5.js → chunk-97h9ga3b.js} +3 -3
  40. package/dist/chunk-9859r1d5.js +2 -0
  41. package/dist/{chunk-25zmy8q6.js → chunk-9wdd7eq6.js} +2 -2
  42. package/dist/{chunk-p6qd7ad0.js → chunk-a2zb5fgg.js} +2 -2
  43. package/dist/chunk-arh1qgmp.js +2 -0
  44. package/dist/chunk-b18x0v21.js +2 -0
  45. package/dist/chunk-b23vscaq.js +2 -0
  46. package/dist/{chunk-4b9s7wgy.js → chunk-be2rswkw.js} +2 -2
  47. package/dist/{chunk-qz5b8ed4.js → chunk-bh19ezq0.js} +5 -5
  48. package/dist/chunk-bm42rsaa.js +2 -0
  49. package/dist/{chunk-cbjabv1w.js → chunk-bpj387yx.js} +6 -6
  50. package/dist/chunk-c4enpsj8.js +2 -0
  51. package/dist/chunk-cdbaanmx.js +2 -0
  52. package/dist/chunk-cfm6a679.js +2 -0
  53. package/dist/chunk-cs8wq7nv.js +2 -0
  54. package/dist/{chunk-hegfgw27.js → chunk-cxgremn0.js} +5 -5
  55. package/dist/chunk-d2xf5hh9.js +2 -0
  56. package/dist/{chunk-rym0309c.js → chunk-d4ch6exz.js} +3 -3
  57. package/dist/chunk-dda8pdya.js +2 -0
  58. package/dist/{chunk-7adznted.js → chunk-dera8fmc.js} +2 -2
  59. package/dist/chunk-dmd7mgjw.js +3 -0
  60. package/dist/chunk-ds91e0fe.js +2 -0
  61. package/dist/{chunk-hgry3mjd.js → chunk-dxh45gve.js} +1 -1
  62. package/dist/chunk-e492je6q.js +2 -0
  63. package/dist/{chunk-7j1zgrnf.js → chunk-ehzd1yc6.js} +9 -9
  64. package/dist/chunk-etz2dmec.js +2 -0
  65. package/dist/{chunk-4s8zacxg.js → chunk-f26n6y9p.js} +4 -4
  66. package/dist/{chunk-4w6baw62.js → chunk-fbrgz3s8.js} +2 -2
  67. package/dist/chunk-fd72t30s.js +2 -0
  68. package/dist/{chunk-sqn3y9qt.js → chunk-fdvfzknd.js} +2 -2
  69. package/dist/chunk-ft3f9nj0.js +2 -0
  70. package/dist/{chunk-dgc1a3yt.js → chunk-fzc98qgn.js} +7 -7
  71. package/dist/{chunk-s0vtjyyj.js → chunk-g12ht81a.js} +2 -2
  72. package/dist/chunk-g6gqja52.js +2 -0
  73. package/dist/{chunk-hb3edeq9.js → chunk-ga5kjf9b.js} +6 -6
  74. package/dist/chunk-ggwvnpwj.js +2 -0
  75. package/dist/{chunk-hsmcbh0p.js → chunk-ghm9f13q.js} +5 -5
  76. package/dist/chunk-gx6wxmbv.js +2 -0
  77. package/dist/chunk-gz5rvwgx.js +2 -0
  78. package/dist/chunk-hamk3dky.js +2 -0
  79. package/dist/{chunk-vayhx642.js → chunk-haz2ezyk.js} +2 -2
  80. package/dist/chunk-hh58k0nh.js +3 -0
  81. package/dist/chunk-hqj28381.js +3 -0
  82. package/dist/chunk-j60jye3e.js +25 -0
  83. package/dist/chunk-jjet6qxq.js +2 -0
  84. package/dist/chunk-jk7chxkt.js +2 -0
  85. package/dist/{chunk-d09q93yf.js → chunk-jv021x8e.js} +2 -2
  86. package/dist/{chunk-pg2v1pb5.js → chunk-k06n5bjp.js} +3 -3
  87. package/dist/{chunk-35ezh7de.js → chunk-k72jqz6a.js} +3 -3
  88. package/dist/chunk-kn34esxw.js +2 -0
  89. package/dist/chunk-kqbpkg8n.js +2 -0
  90. package/dist/{chunk-aet1pgw7.js → chunk-krcd3039.js} +74 -74
  91. package/dist/{chunk-asezs2n3.js → chunk-kxj8e1gd.js} +6 -6
  92. package/dist/{chunk-5zhp87wv.js → chunk-mabja59q.js} +2 -2
  93. package/dist/chunk-mf19qxgv.js +3 -0
  94. package/dist/chunk-mjsebtg6.js +2 -0
  95. package/dist/{chunk-fd49fahd.js → chunk-mn47s2ef.js} +5 -5
  96. package/dist/{chunk-nj343mw2.js → chunk-mq915g3j.js} +5 -5
  97. package/dist/chunk-n63r9b4f.js +2 -0
  98. package/dist/{chunk-j6m8xqh3.js → chunk-n8wvqnfc.js} +2 -2
  99. package/dist/chunk-n94ts3t9.js +21 -0
  100. package/dist/{chunk-w7t2cfgy.js → chunk-p27ptd9f.js} +65 -65
  101. package/dist/{chunk-t0k16vqv.js → chunk-p9az13b2.js} +2 -2
  102. package/dist/chunk-pwn0j1vq.js +2 -0
  103. package/dist/chunk-q1jcf6vm.js +2 -0
  104. package/dist/{chunk-am2w363p.js → chunk-q3gactm1.js} +4 -4
  105. package/dist/chunk-q3nnaxf9.js +2 -0
  106. package/dist/{chunk-w3d98907.js → chunk-q4rejyd2.js} +2 -2
  107. package/dist/{chunk-hz4x7h0n.js → chunk-qbzqary0.js} +5 -5
  108. package/dist/{chunk-a4p18ybc.js → chunk-qr7a378v.js} +3 -3
  109. package/dist/{chunk-bsajk82t.js → chunk-qwdcts9w.js} +19 -19
  110. package/dist/chunk-rc79yyqx.js +2 -0
  111. package/dist/{chunk-yx3dpdwc.js → chunk-rfc5pdv2.js} +3 -3
  112. package/dist/chunk-rnws0dh3.js +2 -0
  113. package/dist/chunk-rxxajm31.js +31 -0
  114. package/dist/{chunk-thceyzj6.js → chunk-rza1p6e4.js} +2 -2
  115. package/dist/chunk-s73z8zss.js +11 -0
  116. package/dist/chunk-s8qe247r.js +2 -0
  117. package/dist/{chunk-d1a86qx8.js → chunk-sptewgky.js} +1 -1
  118. package/dist/{chunk-mwnhdsbp.js → chunk-sqh3tvtw.js} +2 -2
  119. package/dist/{chunk-6s7tvmqp.js → chunk-sr3hmrah.js} +2 -2
  120. package/dist/chunk-sswy3tfc.js +2 -0
  121. package/dist/chunk-swxznm5v.js +2 -0
  122. package/dist/{chunk-9dtbvjpp.js → chunk-tmqrbs98.js} +31 -20
  123. package/dist/chunk-tst8p27s.js +12 -0
  124. package/dist/chunk-tz09earb.js +2 -0
  125. package/dist/{chunk-fbmth6xv.js → chunk-vay5v6sj.js} +13 -13
  126. package/dist/{chunk-ck2e3e47.js → chunk-vd5w1jaz.js} +3 -3
  127. package/dist/chunk-vewt3464.js +2 -0
  128. package/dist/{chunk-xghcsg3f.js → chunk-vg1pg6yt.js} +1 -1
  129. package/dist/{chunk-s2wptfm1.js → chunk-wav0xbnb.js} +2 -2
  130. package/dist/chunk-whzvx5w5.js +2 -0
  131. package/dist/chunk-wk1gt95z.js +2 -0
  132. package/dist/{chunk-t9kxhe46.js → chunk-wr1gm35v.js} +1 -1
  133. package/dist/{chunk-faakv1p6.js → chunk-wscnjtss.js} +2 -2
  134. package/dist/{chunk-t79jfpv6.js → chunk-x4q4bx3q.js} +2 -2
  135. package/dist/chunk-x63f2ywm.js +2 -0
  136. package/dist/{chunk-y1pcdeg9.js → chunk-x7wr720m.js} +5 -5
  137. package/dist/chunk-xk7cp691.js +2 -0
  138. package/dist/chunk-xna6b7km.js +2 -0
  139. package/dist/{chunk-v6peecfp.js → chunk-xnx06qqt.js} +2 -2
  140. package/dist/chunk-xw4rm5zj.js +2 -0
  141. package/dist/{chunk-5qtthtg3.js → chunk-y34tyrpb.js} +7 -7
  142. package/dist/chunk-yar7fwrb.js +2 -0
  143. package/dist/{chunk-2zzc7006.js → chunk-yn9kvsk1.js} +2 -2
  144. package/dist/chunk-yt33wzqk.js +2 -0
  145. package/dist/chunk-z35ftpqp.js +421 -0
  146. package/dist/{chunk-4bgjrrvz.js → chunk-z7ghjs7w.js} +1 -1
  147. package/dist/chunk-zq7xbc1k.js +2 -0
  148. package/dist/cli.js +22 -22
  149. package/dist/client/signals-for-runtime.js +16 -5
  150. package/dist/craft-entry.js +2 -2
  151. package/dist/craft.js +2 -2
  152. package/dist/native/compiler/headwind-to-style.js +13 -1
  153. package/dist/native/compiler/html-to-ir.d.ts +2 -0
  154. package/dist/native/compiler/html-to-ir.js +9 -0
  155. package/dist/native/compiler/ir.d.ts +1 -0
  156. package/dist/native/compiler/render-screen.js +4 -3
  157. package/dist/native/compiler/style-config.d.ts +3 -0
  158. package/dist/native/compiler/style-config.js +5 -0
  159. package/dist/native/components/primitives.d.ts +2 -0
  160. package/dist/native/event-names.js +2 -0
  161. package/dist/native/prop-names.js +1 -0
  162. package/dist/native/runtime/craft-bridge.js +15 -8
  163. package/dist/pwa.js +3 -3
  164. package/dist/signal-processing.js +75 -16
  165. package/dist/ssg-static-paths.d.ts +12 -0
  166. package/dist/ssg-static-paths.js +62 -0
  167. package/dist/ssg.d.ts +2 -4
  168. package/dist/ssg.js +43 -47
  169. package/dist/utils.js +1 -1
  170. package/package.json +2 -2
  171. package/dist/chunk-0jwdcqj8.js +0 -2
  172. package/dist/chunk-0mwdq478.js +0 -2
  173. package/dist/chunk-0nfqgv4n.js +0 -4
  174. package/dist/chunk-1y6egkty.js +0 -2
  175. package/dist/chunk-280p4q7a.js +0 -2
  176. package/dist/chunk-2881tcqt.js +0 -2
  177. package/dist/chunk-2a775q7x.js +0 -2
  178. package/dist/chunk-2asdbd5e.js +0 -2
  179. package/dist/chunk-34yj93hh.js +0 -2
  180. package/dist/chunk-40tswfe7.js +0 -21
  181. package/dist/chunk-41de209e.js +0 -2
  182. package/dist/chunk-506mv7hb.js +0 -3
  183. package/dist/chunk-5s1ay9mv.js +0 -2
  184. package/dist/chunk-7kznee1g.js +0 -2
  185. package/dist/chunk-7mvz972c.js +0 -12
  186. package/dist/chunk-80zgyaqe.js +0 -2
  187. package/dist/chunk-84tqb1rn.js +0 -2
  188. package/dist/chunk-8azm7nha.js +0 -2
  189. package/dist/chunk-902qnyg0.js +0 -2
  190. package/dist/chunk-9n6jwcpb.js +0 -2
  191. package/dist/chunk-a6y8td0d.js +0 -2
  192. package/dist/chunk-a7kt1ts4.js +0 -2
  193. package/dist/chunk-a81y8g40.js +0 -2
  194. package/dist/chunk-aft1zc84.js +0 -2
  195. package/dist/chunk-bawq4fqy.js +0 -31
  196. package/dist/chunk-bdp2r0v4.js +0 -2
  197. package/dist/chunk-brtvm8mb.js +0 -2
  198. package/dist/chunk-bvzr9zqt.js +0 -2
  199. package/dist/chunk-cbvgtf3m.js +0 -2
  200. package/dist/chunk-cfydbaeq.js +0 -2
  201. package/dist/chunk-dq8c3h4n.js +0 -2
  202. package/dist/chunk-e36pne7n.js +0 -2
  203. package/dist/chunk-e62qfexp.js +0 -2
  204. package/dist/chunk-eq5jzaj5.js +0 -2
  205. package/dist/chunk-f9zyf9n6.js +0 -421
  206. package/dist/chunk-fb7t1nn9.js +0 -24
  207. package/dist/chunk-fr39emcz.js +0 -2
  208. package/dist/chunk-fsq13amm.js +0 -2
  209. package/dist/chunk-fxh12vqd.js +0 -2
  210. package/dist/chunk-gcc9fa33.js +0 -2
  211. package/dist/chunk-h6t2ney6.js +0 -2
  212. package/dist/chunk-hvtzw1jh.js +0 -2
  213. package/dist/chunk-j8g5cvvm.js +0 -2
  214. package/dist/chunk-jzjpyyw2.js +0 -2
  215. package/dist/chunk-k1b8x73j.js +0 -2
  216. package/dist/chunk-nw9bdk2n.js +0 -2
  217. package/dist/chunk-p4jkswz8.js +0 -2
  218. package/dist/chunk-p4r90vqf.js +0 -2
  219. package/dist/chunk-p8bgy5tt.js +0 -2
  220. package/dist/chunk-pqqe2b6m.js +0 -11
  221. package/dist/chunk-q6nwcav4.js +0 -2
  222. package/dist/chunk-qmqavdz2.js +0 -2
  223. package/dist/chunk-qpw72bty.js +0 -2
  224. package/dist/chunk-qwnh1kj6.js +0 -2
  225. package/dist/chunk-qy9m6qdn.js +0 -2
  226. package/dist/chunk-qychcdsm.js +0 -2
  227. package/dist/chunk-rj3w1ama.js +0 -2
  228. package/dist/chunk-rv39s5az.js +0 -20
  229. package/dist/chunk-sf0r963g.js +0 -2
  230. package/dist/chunk-ss820yys.js +0 -2
  231. package/dist/chunk-t4j9g2vh.js +0 -2
  232. package/dist/chunk-trh7s6k3.js +0 -130
  233. package/dist/chunk-ttemwrbx.js +0 -2
  234. package/dist/chunk-twqzn21x.js +0 -14
  235. package/dist/chunk-v14rq8b4.js +0 -3
  236. package/dist/chunk-vdxg7e1y.js +0 -4
  237. package/dist/chunk-vq513cxx.js +0 -2
  238. package/dist/chunk-vvq8xe3n.js +0 -2
  239. package/dist/chunk-w8t31bn9.js +0 -2
  240. package/dist/chunk-x1kz4d7j.js +0 -2
  241. package/dist/chunk-xaa36b0x.js +0 -3
  242. package/dist/chunk-xcsyqwxf.js +0 -25
  243. package/dist/chunk-xn9jrjzh.js +0 -2
  244. package/dist/chunk-z97bwx8m.js +0 -2
@@ -1,130 +0,0 @@
1
- // @bun
2
- import"./chunk-bsajk82t.js";import{Cs,Xo,mc}from"./chunk-zp79zkkd.js";import"./chunk-ce6zddpf.js";import"./chunk-f9zyf9n6.js";import"./chunk-25zmy8q6.js";import"./chunk-mwnhdsbp.js";import"./chunk-7adznted.js";import"./chunk-4s8zacxg.js";import{o}from"./chunk-srq9fqq8.js";import"./chunk-5qtthtg3.js";import"./chunk-am2w363p.js";import"./chunk-4b9s7wgy.js";import{mt,Ue,ge,Qt,$e,Vn,Un,We}from"./chunk-kdebh22m.js";import{s}from"./chunk-aet1pgw7.js";import"./chunk-7j1zgrnf.js";import"./chunk-bkkpq8dx.js";import{Ur}from"./chunk-40tswfe7.js";import"./chunk-xcsyqwxf.js";import"./chunk-rr527jt6.js";import{ft}from"./chunk-9dtbvjpp.js";import"./chunk-md2jn67b.js";import"./chunk-hz4x7h0n.js";import{Gs}from"./chunk-rv39s5az.js";import"./chunk-v6peecfp.js";import"./chunk-twqzn21x.js";import"./chunk-hgry3mjd.js";import"./chunk-rym0309c.js";import{existsSync as ve,mkdirSync as fi,readFileSync as pi}from"fs";import U from"path";import{existsSync as et,mkdirSync as un,realpathSync as ti,rmSync as dn}from"fs";import D from"path";import{existsSync as Gr}from"fs";import K from"path";var mn="data-stx-b",it=new Set(Xo),yn=new Set(Cs);function we(t){if(t==="ref"||t==="data-stx-ref")return"ref";if(t.startsWith("::"))return null;if(t.startsWith("@bind:")||t.startsWith("x-bind:"))return"attr";if(t.startsWith("@")||t.startsWith(":")){let e=t.slice(1).split(".")[0];if(it.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(mc(e))return"event";if(t.startsWith("@"))return"event";return"attr"}if(t.startsWith("x-")){let e=t.split(".")[0];if(!yn.has(e))return"attr";let n=e.slice(2);if(n==="cloak"||n==="data"||n==="bind")return null;if(n==="tooltip"||n==="tooltip-position")return null;return it.has(n)?n==="if"?"if":n:"attr"}return null}function bn(t){let e=[];for(let[n,r]of t){let i=we(n);if(i)e.push({name:n,value:r,kind:i})}return e}var vn=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,Se=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function st(t){let e=[],n=0;return{html:t.replace(vn,(i,a,l)=>{if(!l||!/[:@]|x-/.test(l))return i;let u=[];Se.lastIndex=0;for(let y=Se.exec(l);y;y=Se.exec(l))u.push([y[1],y[2]??y[3]??y[4]??""]);let d=bn(u);if(!d.length)return i;let h={id:n++,bindings:d};if(d.some((y)=>y.kind==="for"))h.template=!0;e.push(h);let m=i.endsWith("/>");return`${i.slice(0,m?-2:-1).trimEnd()} ${mn}="${h.id}"${m?"/>":">"}`}),manifest:{entries:e}}}import cr from"path";function ae(t){let e=t&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(t.trim());if(!e)return;let n=Number(e[1])*(e[2]==="rem"?16:1);return Number.isFinite(n)?n:void 0}function xe(t,e){if(!ge[t])return;return ae(e?.get(Qt(t))??ge[t].value)}function Ne(t,e){let n=Vn[t];if(!n)return;return ae(e?.get(We(n))??$e[n]?.value)}function ke(t,e){let n=Un[t];if(!n)return;let r=ae(e?.get(We(n.size))??$e[n.size]?.value),i=ae(e?.get(We(n.leading))??$e[n.leading]?.value);if(r===void 0||i===void 0)return;return{fontSize:r,lineHeight:i}}var Sn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},lt=_e({}),ot,at=null;function Re(){let t=globalThis.__stxNativeStyleConfig;if(!t)return lt;if(t!==ot)ot=t,at=_e(t);return at}function ut(t,e=new Map,n=""){for(let[r,i]of Object.entries(t??{})){let a=r==="DEFAULT"?n.replace(/-$/,""):`${n}${r}`;if(typeof i==="string")e.set(a,i);else if(i&&typeof i==="object")ut(i,e,`${a}-`)}return e}function dt(t){let e={};for(let[n,r]of Object.entries(t??{})){let i=typeof r==="number"?r:Number.parseFloat(String(r));if(Number.isFinite(i))e[n]=i}return e}function _e(t){return{shortcuts:new Map(Object.entries(t.shortcuts??{}).filter(([,e])=>typeof e==="string")),colors:ut(t.colors),breakpoints:new Map(Object.entries({...Sn,...dt(t.breakpoints)}))}}var Te={};function ct(t){Te=t??{},lt=_e(Te)}async function pt(t,e){let n=Te;ct(t);try{return await e()}finally{ct(n)}}function gt(t){if(!t)return{};let e=t.theme??{},n=Object.fromEntries(Object.entries(t.shortcuts??{}).filter(([,r])=>typeof r==="string"));return{...Object.keys(n).length?{shortcuts:n}:{},...e.colors?{colors:JSON.parse(JSON.stringify(e.colors))}:{},...e.screens?{breakpoints:dt(e.screens)}:{}}}function ht(t){return Re().shortcuts.get(t)}function yt(t){return Re().colors.get(t)}function Ae(t){return Re().breakpoints.get(t)}var vt=/^--[\w\u0080-\uFFFF-]+$/u;function bt(t,e){if(!/var\(/i.test(t))return t;let n="",r="",i=!1;for(let a=0;a<t.length;a++){let l=t[a];if(l==="\\"){n+=t.slice(a,a+2),a++;continue}if(r){if(n+=l,l===r)r="";continue}if(l==='"'||l==="'"){r=l,n+=l;continue}if(t.slice(a,a+4).toLowerCase()!=="var("||a>0&&/[\w-]/.test(t[a-1])){n+=l;continue}let u=1,d=-1,h="",m=a+4;for(;m<t.length;m++){let S=t[m];if(S==="\\"){m++;continue}if(h){if(S===h)h="";continue}if(S==='"'||S==="'"){h=S;continue}if(S==="(")u++;if(S===")"&&--u===0)break;if(S===","&&u===1&&d===-1)d=m}if(u!==0)return;let p=t.slice(a+4,d===-1?m:d).trim();if(!vt.test(p))return;let y=e(p,d===-1?void 0:t.slice(d+1,m).trim());if(y===void 0||n.length+y.length>65536)return;n+=y,i=!0,a=m}return i&&n.length>65536?void 0:n}function re(t,e){let n=new Map,r=new Set;for(let[f,c]of t){let x=f.trim();if(!vt.test(x))continue;if(typeof c==="string"||typeof c==="number"&&Number.isFinite(c))n.set(x,String(c).trim())}let i=new Map,a=new Set;for(let[f,c]of n){let x=new Set,g=(N,v=0)=>v>64?void 0:bt(N,(k,w)=>(x.add(k),w===void 0?"":g(w,v+1)));if(g(c)===void 0)a.add(f);i.set(f,x)}let l=new Map,u=new Map,d=[],h=new Set,m=0;function p(f,c=0){if(c>64){a.add(f);return}l.set(f,m),u.set(f,m++),d.push(f),h.add(f);for(let N of i.get(f)??[]){if(!n.has(N))continue;if(!l.has(N)){if(p(N,c+1),u.has(N))u.set(f,Math.min(u.get(f),u.get(N)))}else if(h.has(N))u.set(f,Math.min(u.get(f),l.get(N)))}if(u.get(f)!==l.get(f))return;let x=[],g;do g=d.pop(),h.delete(g),x.push(g);while(g!==f);if(x.length>1||i.get(f)?.has(f))x.forEach((N)=>a.add(N))}for(let f of n.keys())if(!l.has(f))p(f);let y=new Map;function S(f,c){if(r.add(f),y.has(f))return y.get(f);let x=n.get(f),g=x===void 0||/^(?:inherit|unset)$/i.test(x)?e?.get(f):a.has(f)||/^(?:initial|revert|revert-layer)$/i.test(x)?void 0:b(x,c+1);return y.set(f,g),g}function b(f,c=0){if(c>64)return;return bt(f,(x,g)=>S(x,c)??(g===void 0?void 0:b(g,c+1)))}return{resolve:b,used:r,computed(){let f=new Map(e);for(let c of n.keys())f.set(c,S(c,0));return f}}}function Ee(t){if(t.display==="flex"&&t.flexDirection==null)return{...t,flexDirection:"row"};return t}var St=new Set(["display","gridColumns","gridTemplateColumns","gridTemplateRows","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","order","justifyContent","alignItems","alignSelf","alignContent","position","top","right","bottom","left","zIndex","width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle","backgroundColor","backgroundImage","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","color","fontSize","fontWeight","fontStyle","fontFamily","lineHeight","letterSpacing","textAlign","textDecorationLine","textDecorationColor","textTransform","resizeMode","objectFit","tintColor","transform","overflow","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),wn=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","order","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing","strokeWidth"]),wt=new Set(["top","right","bottom","left","width","height","minWidth","maxWidth","minHeight","maxHeight","flexBasis","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical"]),xn=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,Nn=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,kn=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),Tn=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function Rn(t){if(typeof t!=="string")return t;let e=Nn.exec(t);return e?Number(e[1])*(/^r?em$/i.test(e[2]||"")?16:1):t}function ee(t){return typeof t==="number"&&Number.isFinite(t)}function _n(t,e){if(t==="shadowOffset"&&e&&typeof e==="object"&&!Array.isArray(e)){let{width:n,height:r}=e;return ee(n)&&ee(r)?{width:n,height:r}:void 0}if(t==="transform"&&Array.isArray(e)){let n=[];for(let r of e){if(!r||typeof r!=="object"||Array.isArray(r)||Object.keys(r).length!==1)return;let[i,a]=Object.entries(r)[0];if(Tn.has(i)&&ee(a))n.push({[i]:a});else if(kn.has(i)&&typeof a==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(a))n.push({[i]:a});else return}return n}return}function An(t){let e=[],n=0,r=0,i="";for(let a=0;a<=t.length;a++){let l=t[a];if(l==="\\"){a++;continue}if(i){if(l===i)i="";continue}if(l==='"'||l==="'"){i=l;continue}if(l==="(")r++;if(l===")")r=Math.max(0,r-1);if(a!==t.length&&(l!==";"||r))continue;let u=t.slice(n,a),d=u.indexOf(":");if(d!==-1)e.push([u.slice(0,d).trim(),u.slice(d+1).trim()]);n=a+1}return e}function En(t,e){let n;if(typeof t==="string"){if(t=t.trim(),!t)return[];try{t=JSON.parse(t)}catch{}}if(typeof t==="string")n=An(t);else if(t&&typeof t==="object"&&!Array.isArray(t))n=Object.entries(t);else{if(t!=null&&t!==!1)e({kind:"non-numeric-style",name:"style"});return[]}return n}function ce(t,e=()=>{},n={}){let r=En(t,e),i=re(r,n.inheritedVariables);return n.onVariables?.(i.computed()),In(r,i,e)}function In(t,e,n){let r={},i=[];for(let[a,l]of t){if(a.trim().startsWith("--")){i.push(a.trim());continue}let u=St.has(a)||a.trim().startsWith("--")?a:a.trim().toLowerCase().replace(/-([a-z])/g,(m,p)=>p.toUpperCase());if(!St.has(u)){n({kind:"unknown-style",name:u});continue}if(l==null||l==="")continue;let d=typeof l==="string"?e.resolve(l.trim()):l;if(d===void 0){n({kind:"non-numeric-style",name:u});continue}if(d==="")continue;if(u==="objectFit"){let m=typeof d==="string"?d.trim().toLowerCase():"";if(m==="cover"||m==="contain")r.resizeMode=m;else if(m==="fill")r.resizeMode="stretch";else if(m==="none")r.resizeMode="center";else n({kind:"unknown-style",name:`objectFit:${String(d)}`});continue}let h;if(wn.has(u)||wt.has(u)){if(h=Rn(d),!ee(h)&&!(wt.has(u)&&typeof h==="string"&&h.endsWith("%")&&xn.test(h.slice(0,-1))&&Number.isFinite(Number(h.slice(0,-1)))))h=void 0}else if(u==="display"&&d==="inline-flex")h="flex";else if(u==="shadowOffset"||u==="transform")h=_n(u,d);else if(u==="gridTemplateColumns"||u==="gridTemplateRows")h=ee(d)||typeof d==="string"?d:void 0;else if(u==="fontWeight"&&ee(d))h=String(d);else if(typeof d==="string")h=d;if(h===void 0)n({kind:"non-numeric-style",name:u});else r[u]=h}for(let a of i)if(!e.used.has(a))n({kind:"unknown-style",name:a});return r}var Cn={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},Ce={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},xt={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},Nt={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function Q(t){let e=t.lastIndexOf("/");if(e>0&&(!t.endsWith("]")||/\/\[[\d.]+%?\]$/.test(t))){let r=Q(t.slice(0,e)),i=t.slice(e+1),a=/^\[(.+)\]$/.test(i)?Number.parseFloat(i.slice(1,-1))*(i.includes("%")?1:100):Number.parseFloat(i);if(!r||!Number.isFinite(a))return;return On(r,a/100)}if(t==="transparent")return"transparent";if(t==="current")return"currentColor";if(t==="black")return"#000000";if(t==="white")return"#ffffff";let n=t.split("-");if(n.length===2){let[r,i]=n,a=Cn[r];if(a&&typeof a==="object")return a[i]}if(t.startsWith("[")&&t.endsWith("]")){let r=t.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(r)?r:void 0}return}function Oe(t){return Q(t.trim())}function On(t,e){if(t==="transparent")return t;let n=t.startsWith("#")?t.slice(1):"";if(n.length===3)n=n.split("").map((i)=>i+i).join("");if(n.length===8)n=n.slice(0,6);if(n.length!==6)return;let r=Math.round(Math.min(1,Math.max(0,e))*255);return`#${n}${r.toString(16).padStart(2,"0")}`}function Ie(t,e=16){if(!t.startsWith("[")||!t.endsWith("]"))return;let n=t.slice(1,-1),r=Number.parseFloat(n);if(!Number.isFinite(r))return;if(n.endsWith("rem"))return r*16;if(n.endsWith("em"))return r*e;return r}function V(t){if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1);if(e.endsWith("%"))return;let n=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(n)?n:void 0}return Ce[t]??Ne(t)}function ue(t){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(t);if(e)return`${Number.parseFloat(e[1])}%`;return V(t)}var Pn={flex:(t,e)=>(e.display="flex",!0),block:(t,e)=>(e.display="flex",!0),hidden:(t,e)=>(e.display="none",!0),grid:(t,e)=>(e.display="grid",!0),"flex-row":(t,e)=>(e.flexDirection="row",!0),"flex-col":(t,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(t,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(t,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(t,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(t,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(t,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(t,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(t,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(t,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(t,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(t,e)=>(e.flexGrow=1,!0),"grow-0":(t,e)=>(e.flexGrow=0,!0),shrink:(t,e)=>(e.flexShrink=1,!0),"shrink-0":(t,e)=>(e.flexShrink=0,!0),"order-first":(t,e)=>(e.order=-9999,!0),"order-last":(t,e)=>(e.order=9999,!0),"order-none":(t,e)=>(e.order=0,!0),"justify-start":(t,e)=>(e.justifyContent="flex-start",!0),"justify-center":(t,e)=>(e.justifyContent="center",!0),"justify-end":(t,e)=>(e.justifyContent="flex-end",!0),"justify-between":(t,e)=>(e.justifyContent="space-between",!0),"justify-around":(t,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(t,e)=>(e.justifyContent="space-evenly",!0),"items-start":(t,e)=>(e.alignItems="flex-start",!0),"items-center":(t,e)=>(e.alignItems="center",!0),"items-end":(t,e)=>(e.alignItems="flex-end",!0),"items-stretch":(t,e)=>(e.alignItems="stretch",!0),"items-baseline":(t,e)=>(e.alignItems="baseline",!0),"self-auto":(t,e)=>(e.alignSelf="auto",!0),"self-start":(t,e)=>(e.alignSelf="flex-start",!0),"self-center":(t,e)=>(e.alignSelf="center",!0),"self-end":(t,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(t,e)=>(e.alignSelf="stretch",!0),"self-baseline":(t,e)=>(e.alignSelf="baseline",!0),"min-w-0":(t,e)=>(e.minWidth=0,!0),"aspect-square":(t,e)=>(e.aspectRatio=1,!0),"aspect-video":(t,e)=>(e.aspectRatio=1.7777777777777777,!0),"border-solid":(t,e)=>(e.borderStyle="solid",!0),"border-dashed":(t,e)=>(e.borderStyle="dashed",!0),"border-dotted":(t,e)=>(e.borderStyle="dotted",!0),group:()=>!0,peer:()=>!0,"inset-0":(t,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"mx-auto":(t,e)=>(e.alignSelf="center",!0),fixed:(t,e)=>(e.position="absolute",!0),sticky:()=>!0,"sr-only":(t,e)=>(e.position="absolute",e.width=1,e.height=1,e.overflow="hidden",!0),inline:()=>!0,"inline-block":()=>!0,contents:()=>!0,"align-top":()=>!0,"align-middle":()=>!0,"align-bottom":()=>!0,"align-baseline":()=>!0,"align-text-top":()=>!0,"whitespace-normal":()=>!0,"whitespace-pre":()=>!0,"whitespace-pre-line":()=>!0,"whitespace-pre-wrap":()=>!0,"whitespace-nowrap":()=>!0,"break-words":()=>!0,"break-all":()=>!0,"break-normal":()=>!0,"object-cover":()=>!0,"object-contain":()=>!0,"object-fill":()=>!0,"object-center":()=>!0,"tracking-tighter":(t,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(t,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(t,e)=>(e.letterSpacing=0,!0),"tracking-wide":(t,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(t,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(t,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,"inline-flex":(t,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(t,e)=>(e.position="relative",!0),absolute:(t,e)=>(e.position="absolute",!0),"overflow-visible":(t,e)=>(e.overflow="visible",!0),"overflow-hidden":(t,e)=>(e.overflow="hidden",!0),"overflow-scroll":(t,e)=>(e.overflow="scroll",!0),"overflow-x-auto":()=>!0,"overflow-x-scroll":()=>!0,"overflow-y-auto":()=>!0,"overflow-y-scroll":()=>!0,"font-thin":(t,e)=>(e.fontWeight="100",!0),"font-extralight":(t,e)=>(e.fontWeight="200",!0),"font-light":(t,e)=>(e.fontWeight="300",!0),"font-normal":(t,e)=>(e.fontWeight="400",!0),"font-medium":(t,e)=>(e.fontWeight="500",!0),"font-semibold":(t,e)=>(e.fontWeight="600",!0),"font-bold":(t,e)=>(e.fontWeight="bold",!0),"font-extrabold":(t,e)=>(e.fontWeight="800",!0),"font-black":(t,e)=>(e.fontWeight="900",!0),italic:(t,e)=>(e.fontStyle="italic",!0),"not-italic":(t,e)=>(e.fontStyle="normal",!0),"text-left":(t,e)=>(e.textAlign="left",!0),"text-center":(t,e)=>(e.textAlign="center",!0),"text-right":(t,e)=>(e.textAlign="right",!0),"text-justify":(t,e)=>(e.textAlign="justify",!0),uppercase:(t,e)=>(e.textTransform="uppercase",!0),lowercase:(t,e)=>(e.textTransform="lowercase",!0),capitalize:(t,e)=>(e.textTransform="capitalize",!0),"normal-case":(t,e)=>(e.textTransform="none",!0),underline:(t,e)=>(e.textDecorationLine="underline",!0),"line-through":(t,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(t,e)=>(e.textDecorationLine="none",!0)};function Mn(t,e){if(!t.startsWith("bg-"))return!1;let n=t.slice(3),r=Q(n);if(r)return e.backgroundColor=r,!0;return!1}function Bn(t,e){if(!t.startsWith("text-"))return!1;let n=t.slice(5),r=ke(n);if(r)return Object.assign(e,r),!0;if(xt[n])return e.fontSize=xt[n],!0;if(n.startsWith("[")&&n.endsWith("]")){let a=n.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(a)){let l=a.endsWith("rem")||a.endsWith("em")?Number.parseFloat(a)*16:Number.parseFloat(a);if(Number.isFinite(l))return e.fontSize=l,!0}}let i=Q(n);if(i)return e.color=i,!0;return!1}var Ln=new Set(["t","tr","r","br","b","bl","l","tl"]);function Dn(t,e){let n=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(t);if(n&&Ln.has(n[1]))return e.gradientDirection=`to-${n[1]}`,!0;let r=/^(from|via|to)-(.+)$/.exec(t);if(!r)return!1;let i=Q(r[2]);if(!i)return!1;if(r[1]==="from")e.gradientFrom=i;else if(r[1]==="via")e.gradientVia=i;else e.gradientTo=i;return!0}function $n(t,e){for(let n of["fill","stroke"]){let r=`${n}-`;if(!t.startsWith(r))continue;let i=t.slice(r.length);if(i==="none")return e[n]="none",!0;if(n==="stroke"&&/^\d+(?:\.\d+)?$/.test(i))return e.strokeWidth=Number.parseFloat(i),!0;if(n==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(i))return e.strokeWidth=Number.parseFloat(i.slice(1)),!0;let a=Q(i);if(a)return e[n]=a,!0}return!1}function jn(t,e){if(t.startsWith("p-")){let n=V(t.slice(2));if(n!==void 0)return e.padding=n,!0}if(t.startsWith("px-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingHorizontal=n,!0}if(t.startsWith("py-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingVertical=n,!0}if(t.startsWith("pt-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingTop=n,!0}if(t.startsWith("pr-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingRight=n,!0}if(t.startsWith("pb-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingBottom=n,!0}if(t.startsWith("pl-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingLeft=n,!0}return!1}function Tt(t,e){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(t)){let n={};if(!Tt(t.slice(1),n))return!1;let r=Object.entries(n);if(r.some(([,i])=>typeof i!=="number"))return!1;for(let[i,a]of r)e[i]=-a;return!0}if(t.startsWith("m-")){let n=V(t.slice(2));if(n!==void 0)return e.margin=n,!0}if(t.startsWith("mx-")){let n=V(t.slice(3));if(n!==void 0)return e.marginHorizontal=n,!0}if(t.startsWith("my-")){let n=V(t.slice(3));if(n!==void 0)return e.marginVertical=n,!0}if(t.startsWith("mt-")){let n=V(t.slice(3));if(n!==void 0)return e.marginTop=n,!0}if(t.startsWith("mr-")){let n=V(t.slice(3));if(n!==void 0)return e.marginRight=n,!0}if(t.startsWith("mb-")){let n=V(t.slice(3));if(n!==void 0)return e.marginBottom=n,!0}if(t.startsWith("ml-")){let n=V(t.slice(3));if(n!==void 0)return e.marginLeft=n,!0}return!1}function Wn(t,e){if(!t.startsWith("w-"))return!1;let n=t.slice(2);if(n==="full")return e.width="100%",!0;if(n==="screen")return e.width="100%",!0;if(n==="auto")return e.width="auto",!0;if(n.includes("/")){let[i,a]=n.split("/"),l=Number.parseInt(i)/Number.parseInt(a)*100;return e.width=`${l}%`,!0}let r=ue(n);if(r!==void 0)return e.width=r,!0;return!1}function Fn(t,e){if(!t.startsWith("h-"))return!1;let n=t.slice(2);if(n==="full")return e.height="100%",!0;if(n==="screen")return e.height="100%",!0;if(n==="auto")return e.height="auto",!0;let r=ue(n);if(r!==void 0)return e.height=r,!0;return!1}function zn(t,e){if(t==="rounded")return e.borderRadius=Nt.DEFAULT,!0;if(!t.startsWith("rounded-"))return!1;let n=t.slice(8);if(n==="")return!1;let r=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(n),i=Nt[r[2]]??xe(r[2])??Ie(r[2]);if(i===void 0)return!1;let a={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],tl:["borderTopLeftRadius"],tr:["borderTopRightRadius"],bl:["borderBottomLeftRadius"],br:["borderBottomRightRadius"]};for(let l of r[1]?a[r[1]]:["borderRadius"])e[l]=i;return!0}function Xn(t,e){let n=/^border(?:-([trblxy]))?(?:-(\d+|\[[^\]]+\]))?$/.exec(t);if(!n)return!1;let[,r="",i]=n,a=i===void 0?1:Number(i);if(i?.startsWith("[")){let u=/^\[(\d+(?:\.\d+)?|\.\d+)(px|rem)?\]$/.exec(i);if(!u)return!1;a=Number(u[1])*(u[2]==="rem"?16:1)}if(!Number.isFinite(a)||a<0)return!1;let l={"":["borderWidth"],t:["borderTopWidth"],r:["borderRightWidth"],b:["borderBottomWidth"],l:["borderLeftWidth"],x:["borderLeftWidth","borderRightWidth"],y:["borderTopWidth","borderBottomWidth"]};for(let u of l[r])e[u]=a;return!0}function Hn(t,e){if(!t.startsWith("border-"))return!1;let n=t.slice(7),r=Q(n);if(r)return e.borderColor=r,!0;return!1}function qn(t,e){if(!t.startsWith("opacity-"))return!1;let n=Number.parseInt(t.slice(8));if(!Number.isNaN(n))return e.opacity=n/100,!0;return!1}function Gn(t,e){if(t.startsWith("tracking-[")){let n=Ie(t.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(n===void 0)return!1;return e.letterSpacing=n,!0}if(t.startsWith("leading-")){let n=t.slice(8),r=typeof e.fontSize==="number"?e.fontSize:16,i={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=n.startsWith("[")?/^\[[\d.]+\]$/.test(n)?Number.parseFloat(n.slice(1,-1))*r:Ie(n,r):i[n]!==void 0?i[n]*r:Ce[n];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function Kn(t,e){let n=/^(-?)(inset-x|inset-y|inset|top|right|bottom|left)-(.+)$/.exec(t);if(!n)return!1;let r=n[3],i=/^\[(-?[\d.]+)px\]$/.exec(r),a=i?Number(i[1]):Ce[r];if(a===void 0||!Number.isFinite(a))return!1;let l=n[1]?-a:a,u=n[2]==="inset"?["top","right","bottom","left"]:n[2]==="inset-x"?["left","right"]:n[2]==="inset-y"?["top","bottom"]:[n[2]];for(let d of u)e[d]=l;return!0}function Jn(t,e){let n=/^grid-cols-\[(.+)\]$/.exec(t);if(n)return e.gridColumns=n[1].split("_").filter(Boolean).length,!0;let r=/^grid-cols-(\d+)$/.exec(t);if(!r)return!1;return e.gridColumns=Number(r[1]),!0}function Yn(t,e){if(!t.startsWith("size-"))return!1;let n=t.slice(5),r=n==="full"?"100%":ue(n);if(r===void 0)return!1;return e.width=r,e.height=r,!0}var Qn={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function Zn(t,e){let n=/^(min|max)-(w|h)-(.+)$/.exec(t);if(!n)return!1;let[,r,i,a]=n,l=a==="full"||a==="screen"?"100%":a==="none"?void 0:i==="w"&&r==="max"&&Qn[a]||ue(a);if(l===void 0&&a!=="none")return!1;let u=`${r}${i==="w"?"Width":"Height"}`;if(l===void 0)delete e[u];else e[u]=l;return!0}function er(t,e){let n=/^(-?)(top|right|bottom|left)-(.+)$/.exec(t);if(!n)return!1;let r=n[3]==="full"?"100%":V(n[3]);if(r===void 0)return!1;return e[n[2]]=typeof r==="number"&&n[1]?-r:r,!0}function tr(t,e){let n=/^(-?)translate-(x|y)-(.+)$/.exec(t);if(!n)return!1;let r=n[3],i;if(r.startsWith("[")){let u=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(r);if(!u)return!1;i=Number(u[1])*(u[2]?.endsWith("em")?16:1)}else i=V(r);if(i===void 0||!Number.isFinite(i))return!1;if(n[1])i=-i;let a=n[2]==="x"?"translateX":"translateY",l=a==="translateX"?{translateX:i}:{translateY:i};return e.transform=[...(e.transform??[]).filter((u)=>!(a in u)),l],!0}function nr(t,e){let n=/^space-(x|y)-(.+)$/.exec(t);if(!n)return!1;let r=V(n[2]);if(r===void 0)return!1;return e.gap=r,!0}function rr(t,e){if(t.startsWith("gap-")){let n=V(t.slice(4));if(n!==void 0)return e.gap=n,!0}if(t.startsWith("gap-x-")){let n=V(t.slice(6));if(n!==void 0)return e.columnGap=n,!0}if(t.startsWith("gap-y-")){let n=V(t.slice(6));if(n!==void 0)return e.rowGap=n,!0}return!1}function ir(t,e){let r={"shadow-none":[0,0,0,0],"shadow-xs":[1,1,0.05,1],"shadow-sm":[2,1,0.1,2],shadow:[3,2,0.12,3],"shadow-md":[6,4,0.15,4],"shadow-lg":[10,6,0.18,8],"shadow-xl":[16,10,0.2,12],"shadow-2xl":[24,16,0.25,18]}[t];if(!r)return!1;let[i,a,l,u]=r;return Object.assign(e,{shadowColor:"#000000",shadowOpacity:l,shadowRadius:i,shadowOffset:{width:0,height:a},elevation:u}),!0}function sr(t){let e=/^divide-(?:(y|x)(?:-(.+))?|(.+))$/.exec(t);if(!e)return null;if(e[2]==="reverse")return"";if(e[1])return`border-${e[1]==="y"?"t":"l"}${e[2]?`-${e[2]}`:""}`;return`border-${e[3]}`}var Rt=new Set(["aria-selected","aria-pressed","aria-checked","aria-expanded"]),or=new Set(["hover","group-hover","peer-hover","active","group-active","visited","placeholder","selection","print","motion-safe"]),ar=/^(?:transition(?:-[a-z]+)?|animate-\S+|scroll-[mp][trblxyse]?-\S+|snap-\S+|overscroll-\S+|duration-\S+|ease-\S+|delay-\S+|will-change-\S+|cursor-\S+|select-(?:none|text|all|auto)|outline-none|outline-0|appearance-none|scroll-smooth|scroll-auto|antialiased|subpixel-antialiased|touch-\S+|resize(?:-\S+)?|backdrop-blur(?:-\S+)?|isolate|contain-\S+)$/;function _t(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let a=t[i];if(a==="[")n++;else if(a==="]")n=Math.max(0,n-1);else if(a===":"&&n===0)e.push(t.slice(r,i)),r=i+1}return e.push(t.slice(r)),e}function At(t,e=new Set){let n=_t(t),r=n[n.length-1],i=e.has(r)?void 0:ht(r);if(i===void 0)return[t];let a=n.slice(0,-1).map((u)=>`${u}:`).join(""),l=new Set(e).add(r);return i.split(/\s+/).filter(Boolean).flatMap((u)=>At(`${a}${u}`,l))}function de(t,e,n={}){let r=new Map,i=(b,f)=>{if(!r.has(b))r.set(b,{...f,classes:[],authored:new Map});return r.get(b)};i("base",{});let a=[],l=[],u=t.split(/\s+/).filter(Boolean);if(n.rules){let b=new Set(u);for(let f of Object.keys(n.rules))if(f.includes(".")&&f.split(".").every((c)=>b.has(c)))l.push(f);l.sort((f,c)=>f.split(".").length-c.split(".").length)}for(let b of u){if(n.rules&&Object.hasOwn(n.rules,b)){a.push(b);continue}for(let f of At(b)){let c=_t(f),x=c.pop(),g=c.some((T)=>T.startsWith("focus"));if(c.some((T)=>/^(?:group-|peer-)?focus(?:-visible|-within)?$/.test(T))&&/^(?:ring|outline)(?:-|$)/.test(x))continue;if(ar.test(x)||!g&&c.some((T)=>or.has(T)))continue;let N,v,k=!1,w,_=[];for(let T of c){let E=Ae(T),P=T.startsWith("max-")?Ae(T.slice(4)):void 0;if(E!==void 0&&N===void 0)N=E;else if(P!==void 0&&v===void 0)v=P-0.02;else if(T==="disabled"&&!k)k=!0;else if(Rt.has(T)&&w===void 0)w=T;else _.push(T)}let I=[..._,x].join(":"),B=N!==void 0||v!==void 0,R=k?i("disabled",{disabled:!0}):w?i(`state:${w}`,{state:w}):B?i(`range:${N??0}:${v??""}`,{min:N??0,max:v}):r.get("base");if((k||w)&&(B||k&&w)){r.get("base").authored.set(f,b),r.get("base").classes.push(f);continue}if(R.classes.push(I),!R.authored.has(I))R.authored.set(I,b===f?f:`${b} (${f})`)}}let d=[...a,...l],h=(b,f)=>f.map((c)=>b.authored.get(c)??c),m=r.get("base"),p=le(m.classes.join(" "),e,n),y=new Map;if(d.length){let b=(x)=>x?ce(x,()=>{},{inheritedVariables:e}):{},f={},c={};for(let x of d){let g=n.rules[x];f={...f,...b(g.light)},c={...c,...b(g.dark)};for(let N of g.responsive??[]){let v=`${N.min}:${N.max??""}`,k=y.get(v)??{min:N.min,...N.max===void 0?{}:{max:N.max},style:{}};if(k.style={...k.style,...b(N.light)},N.dark)k.dark={...k.dark,...b(N.dark)};y.set(v,k)}}if(p.style={...f,...p.style},Object.keys(c).length)p.dark={...c,...p.dark}}p.unknown=h(m,p.unknown);let S=[];for(let b of r.values()){if(b===m)continue;let f=le(b.classes.join(" "),e,{appearance:n.appearance});p.unknown=[...new Set([...p.unknown,...h(b,f.unknown)])];let c={style:f.style,...f.dark?{dark:f.dark}:{}};if(b.disabled)p.disabled=c;else if(b.state)(p.states??={})[b.state]=c;else S.push({min:b.min??0,...b.max===void 0?{}:{max:b.max},...c})}for(let b of y.values()){let f=S.find((c)=>c.min===b.min&&c.max===b.max);if(f){if(f.style={...b.style,...f.style},b.dark||f.dark)f.dark={...b.dark,...f.dark}}else S.push(b)}if(S.length)p.responsive=S.sort((b,f)=>b.min-f.min||(b.max??1/0)-(f.max??1/0));return p}function le(t,e,n={}){let r=[],i=[],a=[],l=[],u={focus:{classes:[],originals:new Map},focusWithin:{classes:[],originals:new Map}},d=new Map;function h(g,N){let v=/^(bg|text|border(?:-[trblxy])?|from|via|to|fill|stroke|divide|decoration|caret|accent)-(.+?)(\/[^\s]+)?$/.exec(g),k=v&&yt(v[2]);if(v&&k){let R=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+?)\s*)?\)$/.exec(k),T=R?e?.get(R[1])??R[2]:k;if(T&&/^(?:#[0-9a-f]{3,8}|rgba?\(.+\)|hsla?\(.+\))$/i.test(T))return[`${v[1]}-[${T.replace(/\s+/g,"")}]${v[3]||""}`]}let w=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(g),_=w&&mt[w[2]];if(_){let R=e?.get(Ue(w[2]));return[`${w[1]}-${R===void 0?_[N]:`[${R}]`}${w[3]||""}`]}let I=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(g);if(I&&ge[I[2]]){let R=xe(I[2],e);return R===void 0?void 0:[`rounded-${I[1]?`${I[1]}-`:""}[${R}px]`]}let B=g.startsWith("text-")?g.slice(5):"";if(Un[B]){let R=ke(B,e);return R&&[`text-[${R.fontSize}px]`,`leading-[${R.lineHeight}px]`]}for(let R of Object.keys(Vn)){if(!g.endsWith(`-${R}`))continue;let T=Ne(R,e);return T===void 0?void 0:[`${g.slice(0,-R.length)}[${T}px]`]}return[g]}function m(g,N){if(!d.has(g))d.set(g,new Set);return d.get(g).add(N),g}let p=[],y=new Map;for(let g of t.split(/\s+/).filter(Boolean)){let N=g.startsWith("dark:")?g.slice(5):g,v=sr(N);if(v!==null){let _=v&&`${g===N?"":"dark:"}${v}`;if(_)p.push(_),y.set(_,g);continue}let k=/^(dark:)?(focus|focus-within):(dark:)?(.+)$/.exec(g),w=k?.[2]==="focus"?"focus":"focusWithin";if(k&&n[w]&&!(k[1]&&k[3])){let _=`${k[1]||k[3]?"dark:":""}${k[4]}`,I=u[w];I.classes.push(_),I.originals.set(_,[...I.originals.get(_)??[],g]);continue}if(g.startsWith("dark:")){let _=h(g.slice(5),"dark");if(!_)l.push(g);else i.push(..._.map((I)=>m(I,g)))}else if(!g.includes(":")||g.startsWith("[")){let _=h(g,n.appearance??"light"),I=h(g,"dark");if(!_||!I){l.push(g);continue}if(r.push(..._.map((B)=>m(B,g))),I.join(" ")!==_.join(" "))a.push(...I.map((B)=>m(B,g)))}else l.push(g)}let S=[],b=kt(r,S),f={style:b,unknown:S},c=[...n.appearance===void 0?a:[],...i];if(c.length)f.dark=kt(c,S);if(b.transform&&f.dark?.transform){let g=new Set(f.dark.transform.flatMap((N)=>Object.keys(N)));f.dark.transform=[...b.transform.filter((N)=>!Object.keys(N).some((v)=>g.has(v))),...f.dark.transform]}for(let g of r){if(g==="truncate"||g==="whitespace-nowrap")f.numberOfLines=1;let N=/^object-(cover|contain|fill)$/.exec(g);if(N)f.resizeMode=N[1]==="fill"?"stretch":N[1];let v=/^line-clamp-(\d+)$/.exec(g);if(v)f.numberOfLines=Number(v[1]);if(!f.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(g))f.icon=g}let x=S.flatMap((g)=>[...d.get(g)??[g]]);if(f.unknown=[...new Set([...x.filter((g)=>!/^line-clamp-\d+$/.test(g)),...l])],p.length){let g=le(p.join(" "),e,{appearance:n.appearance});f.divide={style:g.style,...g.dark?{dark:g.dark}:{}},f.unknown=[...new Set([...f.unknown,...g.unknown.map((N)=>y.get(N)??N)])]}for(let g of["focus","focusWithin"]){let N=u[g];if(!N.classes.length)continue;let v=le(N.classes.join(" "),e,{appearance:n.appearance});f[g]={style:v.style,dark:v.dark},f.unknown=[...new Set([...f.unknown,...v.unknown.flatMap((k)=>N.originals.get(k)??[k])])];for(let k of N.classes)if(/^(?:dark:)?(?:truncate|line-clamp-\d+|i-[a-z0-9]+-.+)$/.test(k))f.unknown.push(...N.originals.get(k))}return f}function kt(t,e){let n={},r=Array.isArray(t)?t:t.split(/\s+/).filter(Boolean);for(let i of r){if(/^i-[a-z0-9]+-/.test(i))continue;let a=Pn[i];if(a){a("",n);continue}if(ir(i,n))continue;if(Dn(i,n))continue;if(Mn(i,n))continue;if($n(i,n))continue;if(Bn(i,n))continue;if(jn(i,n))continue;if(Tt(i,n))continue;if(Wn(i,n))continue;if(Fn(i,n))continue;if(zn(i,n))continue;if(Xn(i,n))continue;if(Hn(i,n))continue;if(qn(i,n))continue;if(rr(i,n))continue;if(Gn(i,n))continue;if(Yn(i,n))continue;if(Zn(i,n))continue;if(Jn(i,n))continue;let l=/^aspect-\[(\d+(?:\.\d+)?)\/(\d+(?:\.\d+)?)\]$/.exec(i);if(l&&Number(l[2])>0){n.aspectRatio=Number(l[1])/Number(l[2]);continue}let u=/^z-\[(-?\d+)\]$/.exec(i)??/^z-(\d+)$/.exec(i);if(u){n.zIndex=Number(u[1]);continue}if(i==="z-auto")continue;if(Kn(i,n))continue;let d=/^order-\[(-?\d+)\]$/.exec(i)??/^order-(-?\d+)$/.exec(i);if(d){n.order=Number(d[1]);continue}if(er(i,n))continue;if(tr(i,n))continue;if(nr(i,n))continue;if(e?.push(i),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${i}`)}return n}var Et=new Map;function It(t,e){if(!t)return;let n=t.trim(),r=n.lastIndexOf("-"),i=r===-1?e[n]:e[n.slice(0,r)],a=r===-1?i:i?.[n.slice(r+1)];if(typeof a==="string"&&/^#[\da-f]{3,8}$/i.test(a))return a;return Oe(n)??Oe(`[${n}]`)}function lr(t){let e=t.roles??{},n=t.shapes??{},r=t.density??{},i={...t.theme?.colors,...t.theme?.extend?.colors},a=[],l=[];for(let[u,d]of Object.entries(e)){if(!mt[u])continue;let h=It(typeof d==="string"?d:d?.light,i),m=It(typeof d==="string"?d:d?.dark,i);if(h)a.push(`${Ue(u)}: ${h};`);if(m)l.push(`${Ue(u)}: ${m};`)}for(let[u,d]of Object.entries(n))if(ge[u])a.push(`${Qt(u)}: ${d};`);for(let[u,d]of Object.entries(r))if($e[u])a.push(`${We(u)}: ${d};`);return[a.length?`:root { ${a.join(" ")} }`:"",l.length?`.dark { ${l.join(" ")} }`:""].filter(Boolean).join(`
3
- `)}async function ur(t){let{resolveUserCssConfig:e}=await import("./chunk-5s1ay9mv.js"),n=await e(t);return n?lr(n):""}function Ct(t){let e=cr.resolve(t),n=Et.get(e);if(!n)n=ur(e).catch(()=>""),Et.set(e,n);return n}var Pt={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},Ot={alert:"alert",button:"button",checkbox:"checkbox",combobox:"combobox",header:"header",heading:"header",image:"image",img:"image",link:"link",menu:"menu",menubar:"menubar",menuitem:"menuitem",none:"none",presentation:"none",progressbar:"progressbar",radio:"radio",scrollbar:"scrollbar",search:"search",searchbox:"search",slider:"adjustable",spinbutton:"spinbutton",switch:"switch",tab:"tab",tablist:"tablist",timer:"timer",toolbar:"toolbar"};function dr(t){return t==="role"||t==="aria-label"||t==="aria-valuetext"||t in Pt}function fr(t,e){if(e===void 0||e===null)return;let n=String(e).trim().toLowerCase();if(n==="mixed")return t==="aria-checked"?"mixed":!0;if(n==="undefined")return;return n===""||n==="true"}function pr(t){if(t===void 0||t===null)return null;for(let e of String(t).trim().toLowerCase().split(/\s+/))if(Ot[e])return Ot[e];return null}function gr(t,e,n){if(t==="aria-label")return{accessibilityLabel:e===void 0||e===null||e===""?null:String(e)};if(t==="aria-valuetext")return{accessibilityValue:e===void 0||e===null||e===""?null:String(e)};if(t==="role")return{accessibilityRole:pr(e)};let r=Pt[t];if(!r)return;let i=n.accessibilityState,a=i&&typeof i==="object"?{...i}:{},l=fr(t,e);if(l===void 0)delete a[r];else a[r]=l;return{accessibilityState:Object.keys(a).length?a:null}}function hr(t){let e=t.accessibilityState&&typeof t.accessibilityState==="object"?t.accessibilityState:void 0,n={};for(let[i,a]of Object.entries(t)){if(!dr(i))continue;let l=gr(i,a,n);if(l)Object.assign(n,l)}for(let i of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(t[i]===void 0&&n[i]!==void 0&&n[i]!==null)t[i]=n[i];let r=n.accessibilityState;if(r)t.accessibilityState={...r,...e}}var Pe=["accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue"];function Me(t){let e={...t};return hr(e),Object.fromEntries(Pe.filter((n)=>(n in e)).map((n)=>[n,e[n]]))}var Bt=["keyboardType","secureTextEntry","returnKeyType","autoCapitalize","autoCorrect","editable","autoComplete"],mr=new Set(["type","inputmode","inputMode","enterkeyhint","enterKeyHint","autoCapitalize","autoCorrect","spellcheck","readonly","readOnly","disabled",...Bt]),yr={numeric:"number-pad",decimal:"decimal-pad",tel:"phone-pad",email:"email-address",url:"url",search:"web-search",text:"default"},br={email:{keyboardType:"email-address",verbatim:!0,autoComplete:"email"},tel:{keyboardType:"phone-pad",autoComplete:"tel"},url:{keyboardType:"url",verbatim:!0,autoComplete:"url"},number:{keyboardType:"decimal-pad"},search:{keyboardType:"web-search",returnKeyType:"search"},password:{secure:!0,verbatim:!0}},vr={enter:"default",done:"done",go:"go",next:"next",previous:"default",search:"search",send:"send"};function te(t){return t===void 0||t===null?"":String(t).trim().toLowerCase()}function Mt(t){if(t===void 0||t===null||t===!1)return!1;return te(t)!=="false"}function Be(t,...e){for(let n of e)if(t[n]!==void 0&&t[n]!==null)return t[n];return}function Lt(t,e){if(t!=="TextInput")return{};let n={},r=te(e.type),i=br[r]??{},a=te(Be(e,"inputmode","inputMode")),l=yr[a]??i.keyboardType;if(l&&l!=="default")n.keyboardType=l;if(i.secure)n.secureTextEntry=!0;let u=te(Be(e,"enterkeyhint","enterKeyHint")),d=vr[u]??i.returnKeyType;if(d&&d!=="default")n.returnKeyType=d;let h=te(e.autoCapitalize);if(h==="off"||h==="none")n.autoCapitalize="none";else if(h==="on")n.autoCapitalize="sentences";else if(!h&&i.verbatim)n.autoCapitalize="none";let m=e.autoCorrect;if(m==="off"||m==="false"||te(e.spellcheck)==="false"||m===void 0&&i.verbatim)n.autoCorrect=!1;else if(m==="on"||m==="true")n.autoCorrect=!0;if(Mt(Be(e,"readonly","readOnly"))||Mt(e.disabled))n.editable=!1;if(i.autoComplete)n.autoComplete=i.autoComplete;return Object.fromEntries(Object.entries(n).filter(([p])=>e[p]===void 0||Sr(p,e[p])))}function Sr(t,e){if(t==="autoCapitalize")return e==="off"||e==="on";if(t==="autoCorrect")return typeof e==="string";return!1}function Dt(t){let e=Lt(t.type,t.props);if(!Object.keys(e).length)return;t._textEntrySource=Object.fromEntries(Bt.filter((n)=>(n in t.props)).map((n)=>[n,t.props[n]])),Object.assign(t.props,e)}var Le={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",onchange:"onChange",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll","scroll-begin-drag":"onScrollBeginDrag",scrollbegindrag:"onScrollBeginDrag","scroll-end-drag":"onScrollEndDrag",scrollenddrag:"onScrollEndDrag","momentum-scroll-begin":"onMomentumScrollBegin",momentumscrollbegin:"onMomentumScrollBegin","momentum-scroll-end":"onMomentumScrollEnd",momentumscrollend:"onMomentumScrollEnd",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError",play:"onPlay",playing:"onPlay",pause:"onPause",ended:"onEnd",end:"onEnd",timeupdate:"onProgress",progress:"onProgress",loadedmetadata:"onLoad",enterpictureinpicture:"onPictureInPictureStart",leavepictureinpicture:"onPictureInPictureStop"};var Ve={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText",animate:"Animate"},je=new Set(Object.values(Ve));var jt=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),Wt=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight","attributeName","keyTimes","repeatCount"];function z(t){let e=typeof t==="number"?t:Number.parseFloat(String(t??""));return Number.isFinite(e)?e:0}function J(t){return Math.round(t*1000)/1000}function Fe(t){if(Array.isArray(t)&&t.length===4&&t.every((n)=>Number.isFinite(Number(n))))return t.map(Number);let e=String(t??"").trim().split(/[\s,]+/).map(Number);if(e.length!==4||e.some((n)=>!Number.isFinite(n))||e[2]<=0||e[3]<=0)return null;return e}function wr(t){let e=String(t??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return e.length%2?e.slice(0,-1):e}var $t=/[MLHVCSQTAZ]/i,De=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function xr(t){let e=[],n=t,r=$t.exec(n);while(r){let i=r.index;n=n.slice(i);let a=n[0];n=n.slice(1);let l=$t.exec(n),u=l?n.slice(0,l.index):n,d;if(a==="A"||a==="a"){d=[];let h=0,m=u.trim(),p=0;while(p<m.length){let y=h%7,S=m.slice(p).replace(/^[\s,]+/,"");if(p=m.length-S.length,!S)break;if(y===3||y===4)d.push(S[0]==="1"?1:0),p+=1;else{De.lastIndex=0;let b=De.exec(S);if(!b||b.index!==0)break;d.push(Number.parseFloat(b[0])),p+=b[0].length}h++}}else d=(u.match(De)||[]).map(Number.parseFloat);e.push({command:a,args:d}),r=l}return e}function Nr(t,e,n,r,i,a,l,u,d){if(t===u&&e===d)return[];let h=Math.abs(n),m=Math.abs(r);if(!h||!m)return[1,u,d];let p=i*Math.PI/180,y=Math.cos(p),S=Math.sin(p),b=(t-u)/2,f=(e-d)/2,c=y*b+S*f,x=-S*b+y*f,g=c*c/(h*h)+x*x/(m*m);if(g>1)h*=Math.sqrt(g),m*=Math.sqrt(g);let N=h*h*m*m-h*h*x*x-m*m*c*c,v=h*h*x*x+m*m*c*c,k=Math.sqrt(Math.max(0,N/v));if(a===l)k=-k;let w=k*(h*x)/m,_=k*-(m*c)/h,I=y*w-S*_+(t+u)/2,B=S*w+y*_+(e+d)/2,R=(L,W,F,q)=>{let Y=L*q-W*F<0?-1:1,G=(L*F+W*q)/(Math.hypot(L,W)*Math.hypot(F,q));return Y*Math.acos(Math.min(1,Math.max(-1,G)))},T=R(1,0,(c-w)/h,(x-_)/m),E=R((c-w)/h,(x-_)/m,(-c-w)/h,(-x-_)/m);if(!l&&E>0)E-=2*Math.PI;if(l&&E<0)E+=2*Math.PI;let P=Math.max(1,Math.ceil(Math.abs(E)/(Math.PI/2))),j=E/P,A=1.3333333333333333*Math.tan(j/4),M=[],X=(L)=>{let W=h*Math.cos(L),F=m*Math.sin(L);return[y*W-S*F+I,S*W+y*F+B]},C=(L)=>{let W=-h*Math.sin(L),F=m*Math.cos(L);return[y*W-S*F,S*W+y*F]},O=T;for(let L=0;L<P;L++){let W=O+j,[F,q]=X(O),[Y,G]=C(O),[nt,rt]=X(W),[gn,hn]=C(W);M.push(2,F+A*Y,q+A*G,nt-A*gn,rt-A*hn,L===P-1?u:nt,L===P-1?d:rt),O=W}return M}function Ft(t){let e=[],n=0,r=0,i=0,a=0,l=0,u=0,d=0,h=0,m="";for(let{command:p,args:y}of xr(String(t??""))){let S=p===p.toLowerCase(),b=p.toUpperCase(),f=()=>S?n:0,c=()=>S?r:0,x=0,g=(v)=>{if(x+v>y.length)return null;let k=y.slice(x,x+v);return x+=v,k};if(b==="Z"){e.push(4),n=i,r=a,m="Z";continue}let N=!0;while(x<y.length||N&&b==="Z"){switch(b){case"M":{let v=g(2);if(!v)return e;if(n=v[0]+f(),r=v[1]+c(),N)e.push(0,n,r),i=n,a=r;else e.push(1,n,r);m=N?"M":"L";break}case"L":{let v=g(2);if(!v)return e;n=v[0]+f(),r=v[1]+c(),e.push(1,n,r),m="L";break}case"H":{let v=g(1);if(!v)return e;n=v[0]+f(),e.push(1,n,r),m="L";break}case"V":{let v=g(1);if(!v)return e;r=v[0]+c(),e.push(1,n,r),m="L";break}case"C":{let v=g(6);if(!v)return e;let k=v[0]+f(),w=v[1]+c();l=v[2]+f(),u=v[3]+c(),n=v[4]+f(),r=v[5]+c(),e.push(2,k,w,l,u,n,r),m="C";break}case"S":{let v=g(4);if(!v)return e;let k=m==="C"?2*n-l:n,w=m==="C"?2*r-u:r;l=v[0]+f(),u=v[1]+c(),n=v[2]+f(),r=v[3]+c(),e.push(2,k,w,l,u,n,r),m="C";break}case"Q":{let v=g(4);if(!v)return e;d=v[0]+f(),h=v[1]+c(),n=v[2]+f(),r=v[3]+c(),e.push(3,d,h,n,r),m="Q";break}case"T":{let v=g(2);if(!v)return e;d=m==="Q"?2*n-d:n,h=m==="Q"?2*r-h:r,n=v[0]+f(),r=v[1]+c(),e.push(3,d,h,n,r),m="Q";break}case"A":{let v=g(7);if(!v)return e;let k=v[5]+f(),w=v[6]+c();e.push(...Nr(n,r,v[0],v[1],v[2],v[3],v[4],k,w)),n=k,r=w,m="A";break}default:return e}N=!1}}return e.map((p)=>J(p))}function Vt(t,e,n,r){if(n<=0||r<=0)return[];let i=0.5522847498;return[0,t+n,e,2,t+n,e+i*r,t+i*n,e+r,t,e+r,2,t-i*n,e+r,t-n,e+i*r,t-n,e,2,t-n,e-i*r,t-i*n,e-r,t,e-r,2,t+i*n,e-r,t+n,e-i*r,t+n,e,4].map(J)}function ze(t,e){switch(t){case"Path":return Ft(String(e.d??""));case"Line":return[0,z(e.x1),z(e.y1),1,z(e.x2),z(e.y2)].map(J);case"Rect":{let n=z(e.x),r=z(e.y),i=z(e.width),a=z(e.height);if(i<=0||a<=0)return[];let l=e.rx===void 0?z(e.ry):z(e.rx),u=e.ry===void 0?l:z(e.ry);if(l=Math.min(Math.max(0,l),i/2),u=Math.min(Math.max(0,u),a/2),!l||!u)return[0,n,r,1,n+i,r,1,n+i,r+a,1,n,r+a,4].map(J);let d=0.5522847498;return[0,n+l,r,1,n+i-l,r,2,n+i-l+d*l,r,n+i,r+u-d*u,n+i,r+u,1,n+i,r+a-u,2,n+i,r+a-u+d*u,n+i-l+d*l,r+a,n+i-l,r+a,1,n+l,r+a,2,n+l-d*l,r+a,n,r+a-u+d*u,n,r+a-u,1,n,r+u,2,n,r+u-d*u,n+l-d*l,r,n+l,r,4].map(J)}case"Circle":return Vt(z(e.cx),z(e.cy),z(e.r),z(e.r));case"Ellipse":return Vt(z(e.cx),z(e.cy),z(e.rx),z(e.ry));case"Polyline":case"Polygon":{let n=wr(e.points);if(n.length<4)return[];let r=[0,n[0],n[1]];for(let i=2;i<n.length;i+=2)r.push(1,n[i],n[i+1]);if(t==="Polygon")r.push(4);return r.map(J)}default:return null}}function kr(t){let e=/^\s*(\d+(?:\.\d+)?|\.\d+)\s*(ms|s)?\s*$/.exec(String(t??""));if(!e)return null;let n=Number(e[1])/(e[2]==="ms"?1000:1);return n>0?n:null}function Tr(t){if(t.attributeName!=="d")return null;let e=kr(t.dur),n=String(t.values??"").split(";").map((u)=>u.trim()).filter(Boolean);if(e===null||n.length<2)return null;let r=n.map(Ft);if(r.some((u)=>!u.length))return null;let i=String(t.keyTimes??"").split(";").map((u)=>u.trim()).filter(Boolean).map(Number),l=i.length===r.length&&i[0]===0&&i[i.length-1]===1&&i.every((u,d)=>Number.isFinite(u)&&(d===0||u>=i[d-1]))?i.map(J):r.map((u,d)=>J(d/(r.length-1)));return{frames:r,frameTimes:l,duration:e}}function Xe(t){let e=Tr(t),n={frames:e?.frames??null,frameTimes:e?.frameTimes??null,duration:e?.duration??null};for(let[r,i]of Object.entries(n))if(i===null)delete t[r];else t[r]=i;return n}var Rr=[...Wt,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","contentContainerStyle","currentTime","defaultSource","defaultValue","ellipsizeMode","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","ios_backgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","listRole","maxLength","mostRecentEventCount","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","sheetDetents","selectedDetent","grabberVisible","tintColor","clearButtonMode","nonModal","dismissOnOutsideTap","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","initialRegion","tileOverlay","edgePadding","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","mapType","fillColor","strokeColor","pinColor","showsCompass","showsScale","cameraPitch","cameraHeading","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],zt=new Set(["alwaysBounceHorizontal","alwaysBounceVertical","animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","nonModal","dismissOnOutsideTap","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","showsCompass","showsScale","pictureInPicture","grabberVisible"]),_r=new Map(Rr.map((t)=>[Xt(t),t]));function Xt(t){return t.replace(/[-_]/g,"").toLowerCase()}function He(t,e){if((e==="Image"||e==="Video")&&t.toLowerCase()==="src")return"source";return _r.get(Xt(t))??t}var Ar={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",map:"Map",mappolyline:"MapPolyline",mappolygon:"MapPolygon",mapmarker:"MapMarker",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",checkbox:"Checkbox",slider:"Slider",picker:"Picker",segmentedcontrol:"SegmentedControl",nativesegmentedcontrol:"SegmentedControl",select:"Picker",loading:"ActivityIndicator",spinner:"ActivityIndicator",div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",a:"TouchableOpacity",section:"View",article:"View",header:"SafeAreaView",footer:"View",main:"View",nav:"View",aside:"View",form:"View",label:"Text",fieldset:"View",legend:"Text",option:"Text",dialog:"Modal",figure:"View",figcaption:"Text",picture:"View",hr:"View",ul:"View",ol:"View",li:"View",dl:"View",dt:"Text",dd:"Text",table:"View",thead:"View",tbody:"View",tfoot:"View",tr:"View",th:"Text",td:"Text",caption:"Text",strong:"Text",b:"Text",em:"Text",i:"Text",u:"Text",s:"Text",small:"Text",mark:"Text",abbr:"Text",time:"Text",code:"Text",kbd:"Text",samp:"Text",pre:"Text",blockquote:"Text",cite:"Text",q:"Text",sub:"Text",sup:"Text"};function Ut(t){return Ar[t.toLowerCase()]||t}var Er={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",apple:"leaf",archive:"archivebox",armchair:"sofa","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette",backpack:"backpack","badge-check":"checkmark.seal","badge-x":"xmark.seal",ban:"nosign","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100","battery-charging":"battery.100.bolt",bean:"leaf",bed:"bed.double",beef:"fork.knife",bell:"bell","bell-off":"bell.slash","bell-ring":"bell.and.waves.left.and.right",bike:"figure.outdoor.cycle",blocks:"square.grid.2x2",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",box:"shippingbox",brain:"brain",building:"building","building-2":"building.2",cable:"cable.connector","cake-slice":"birthday.cake",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-minus":"calendar.badge.minus","calendar-minus-2":"calendar.badge.minus","calendar-off":"calendar.badge.exclamationmark","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath","calendar-x":"calendar.badge.exclamationmark","calendar-x-2":"calendar.badge.exclamationmark",camera:"camera",carrot:"carrot","chart-bar":"chart.bar","chart-column":"chart.bar","chart-line":"chart.xyaxis.line","chart-no-axes-gantt":"chart.bar.doc.horizontal",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-arrow-out-up-left":"arrow.uturn.backward.circle","circle-minus":"minus.circle","circle-arrow-down":"arrow.down.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-dot":"smallcircle.filled.circle","circle-help":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock","clock-12":"clock","clock-2":"clock","clock-3":"clock","clock-4":"clock","clock-8":"clock","clock-alert":"clock.badge.exclamationmark",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",cookie:"birthday.cake",copy:"doc.on.doc","credit-card":"creditcard","cup-soda":"takeoutbag.and.cup.and.straw",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",drumstick:"fork.knife",dumbbell:"dumbbell",edit:"pencil",egg:"frying.pan","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",fish:"fish",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift","glass-water":"waterbottle",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal",hamburger:"takeoutbag.and.cup.and.straw","hand-fist":"hand.raised",heart:"heart","heart-off":"heart.slash","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house","id-card":"person.text.rectangle",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-dashboard":"rectangle.3.group","layout-grid":"square.grid.2x2",leaf:"leaf",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",megaphone:"megaphone",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble","messages-square":"bubble.left.and.bubble.right",mic:"mic",milk:"waterbottle",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",nut:"leaf",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","rectangle-horizontal":"rectangle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",salad:"leaf",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass","scan-line":"barcode.viewfinder",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart",shuffle:"shuffle","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",soup:"mug",sparkles:"sparkles",sprout:"leaf",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront","stretch-horizontal":"rectangle.split.1x2",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis","triangle-alert":"exclamationmark.triangle",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-check":"person.crop.circle.badge.checkmark","user-minus":"person.badge.minus","user-plus":"person.badge.plus","user-round":"person","user-round-check":"person.crop.circle.badge.checkmark","user-round-minus":"person.crop.circle.badge.minus","user-round-plus":"person.crop.circle.badge.plus","user-round-x":"person.crop.circle.badge.xmark","user-x":"person.crop.circle.badge.xmark",users:"person.2","users-round":"person.2",utensils:"fork.knife",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wheat:"laurel.leading",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",wine:"wineglass",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function ie(t,e=!1){let n=String(t??"").trim();if(!n)return{symbol:"circle",known:!1};if(e)return{symbol:n,known:!0};let r=/^i-([a-z0-9]+)-(.+)$/.exec(n)??/^([a-z0-9]+):(.+)$/.exec(n),i=r?r[1]:"lucide",a=r?r[2]:n;if(i==="lucide"){let l=Er[a];if(l)return{symbol:l,iconify:`i-lucide-${a}`,known:!0};if(!r&&n.includes("."))return{symbol:n,known:!0}}return{symbol:"circle",iconify:r?n:`i-lucide-${a}`,known:!1}}function qe(t){return t.split(/\s+/).find((e)=>/^i-[a-z0-9]+-[a-z0-9-]+$/.test(e))}import{generate as fe,parse as Ir}from"@stacksjs/ts-css/parse";var Cr=/^(?::hover|:active|:visited|:focus|:focus-visible|:focus-within)$/;function Or(t){let e=t.replace(/\s+/g,"").toLowerCase();if(!e||e==="all"||e==="screen")return{};if(/^(?:screenand)?\(prefers-color-scheme:dark\)$/.test(e))return{dark:!0};if(/^(?:screenand)?\(prefers-color-scheme:light\)$/.test(e))return{};if(/prefers-reduced-motion|\(hover|\(pointer|print|forced-colors|prefers-contrast/.test(e))return"skip";let n=e.replace(/^screenand/,"").split("and"),r={};for(let i of n){let a=/^\((min|max)-width:([\d.]+)(px|rem|em)\)$/.exec(i);if(!a)return;r[a[1]]=Number(a[2])*(a[3]==="px"?1:16)}return r}async function Ht(t,e){let n={},r=new Set,i=(h)=>{if(r.has(h))return;r.add(h),e(h,[...h.matchAll(/\.(-?[a-z_][\w-]*)/gi)].map((m)=>m[1]))},a=(h,m,p)=>{if(!m.trim())return;let y=n[h]??={},S=p.dark?"dark":"light";if(p.min===void 0&&p.max===void 0){y[S]=y[S]?`${y[S]};${m}`:m;return}let b=y.responsive??=[],f=p.min??0,c=b.find((x)=>x.min===f&&x.max===p.max);if(!c)b.push(c={min:f,...p.max===void 0?{}:{max:p.max}});c[S]=c[S]?`${c[S]};${m}`:m};function l(h,m){for(let p of h){if(p.type==="Atrule"){let b=p.name.toLowerCase();if(["font-face","keyframes","-webkit-keyframes","import","charset","property","page","layer"].includes(b)){if(b==="layer"&&p.block)l(p.block.children,m);continue}if(b!=="media"||!p.block){i(`@${b}`);continue}let f=p.prelude?fe(p.prelude):"",c=Or(f);if(c==="skip")continue;if(!c){i(`@media ${f}`);continue}l(p.block.children,{dark:m.dark||c.dark,min:c.min??m.min,max:c.max??m.max});continue}if(p.type!=="Rule"||p.block.type!=="Block")continue;let y=[...p.block.children].filter((b)=>b.type==="Declaration").map((b)=>fe(b)).join(";"),S=p.prelude.type==="SelectorList"?[...p.prelude.children].map(fe):[fe(p.prelude)];for(let b of S){let f=/^(?:(?:html|:root)?\.dark\s+)?((?:\.-?[a-z_][\w-]*)+)((?::{1,2}[a-z-]+)*)$/i.exec(b.trim());if(!f){if(!/^(?:html|:root|body|\*|::?[a-z-]+)/i.test(b.trim()))i(b.trim());continue}let c=f[2];if(c){if(!Cr.test(c))i(b.trim());continue}let x=m.dark||/^(?:(?:html|:root)?\.dark\s+)/i.test(b.trim());a(f[1].slice(1),y,{dark:x,min:m.min,max:m.max})}}}let u="",d=!0;await new HTMLRewriter().on("style",{element(h){u="";let m=h.getAttribute("type");d=!m||m.toLowerCase()==="text/css",h.onEndTag(()=>{if(!d)return;try{let p=Ir(u);if(p.type==="StyleSheet")l(p.children,{})}catch{i("invalid stylesheet")}})},text(h){u+=h.text}}).transform(new Response(t)).text();for(let h of Object.values(n))h.responsive?.sort((m,p)=>m.min-p.min||(m.max??1/0)-(p.max??1/0));return n}import{generate as se,parse as qt}from"@stacksjs/ts-css/parse";async function Gt(t,e){let n={light:new Map,dark:new Map},r=new Set,i=(p)=>{if(!r.has(p))r.add(p),e(p)},a=(p,y,S)=>{for(let b of S){let f=n[b].get(p);if(!f||Number(y.important)>Number(f.important)||y.important===f.important&&y.specificity>=f.specificity)n[b].set(p,y)}},l=(p)=>{if(p.type==="Declaration")return p.property.startsWith("--");if(p.type==="Rule"||p.type==="Atrule")return!!p.block&&[...p.block.children].some(l);return!1},u=(p)=>{let y=p.replace(/\s+/g,"").toLowerCase();if(!y||y==="all"||y==="screen")return["light","dark"];let S=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(y);return S?[S[1]]:void 0};function d(p,y){for(let S of p){if(!l(S))continue;if(S.type==="Atrule"){let f=S.prelude?se(S.prelude):"",c=S.name.toLowerCase()==="media"?u(f):void 0;if(!c){i(`@${S.name} ${f}`.trim());continue}d(S.block.children,y.filter((x)=>c.includes(x)));continue}if(S.type!=="Rule")continue;let b=S.prelude.type==="SelectorList"?[...S.prelude.children].map(se):[se(S.prelude)];for(let f of b){let c=/^(html|:root)?(?:\.(dark|light))?$/.exec(f.trim());if(!c||!c[1]&&!c[2]){i(f);continue}let x=(c[1]===":root"?10:c[1]?1:0)+(c[2]?10:0);for(let g of S.block.children){if(g.type!=="Declaration"){if(l(g))i(`nested rule in ${f}`);continue}if(!g.property.startsWith("--"))continue;let N={value:se(g.value),important:!!g.important,specificity:x};a(g.property,N,y.filter((v)=>!c[2]||c[2]===v))}}}}let h="",m;return await new HTMLRewriter().on("html",{element(p){let y=p.getAttribute("style");if(!y)return;try{let S=qt(y,{context:"declarationList"});if(S.type!=="DeclarationList")return;for(let b of S.children)if(b.type==="Declaration"&&b.property.startsWith("--"))a(b.property,{value:se(b.value),important:!!b.important,specificity:1000},["light","dark"])}catch{i("invalid document inline theme")}}}).on("style",{element(p){h="";let y=p.getAttribute("type");m=!y||y.toLowerCase()==="text/css"?u(p.getAttribute("media")??""):void 0,p.onEndTag(()=>{try{let S=qt(h);if(S.type!=="StyleSheet")return;if(!m){if([...S.children].some(l))i("style type/media");return}d(S.children,m)}catch{i("invalid stylesheet")}})},text(p){h+=p.text}}).transform(new Response(t)).text(),{light:[...n.light].map(([p,y])=>[p,y.value]),dark:[...n.dark].map(([p,y])=>[p,y.value])}}function H(t,e={},n={},r={},i=[]){return{type:t,props:e,style:n,events:r,children:i}}function Kt(t,e,n={}){return{version:"1.0.0",root:t,script:e,meta:{source:n.source||"unknown",compiledAt:n.compiledAt||Date.now(),headwindConfig:n.headwindConfig}}}var Pr=/^(?:key(?:down|up|press)|mouse[a-z]+|pointer[a-z]+|dbl(?:click)?|contextmenu|wheel|drag[a-z]*|drop|copy|cut|paste|beforeinput|compositionstart|compositionupdate|compositionend|animation[a-z]+|transition[a-z]+|resize|hashchange|popstate|beforeunload|unload|visibilitychange|selectionchange|selectstart|auxclick)$/,Jt=new Set(["script","style","head","meta","link","title","base","noscript"]),Yt=new Set(["template","body","html","main","fragment"]),pe=new Set,Mr=new Set(["onBlur","onChange","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),he=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","Link","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapPolygon","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","SegmentedControl","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...je]),Br=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"]]),Zt=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Lr={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function Z(t){return t.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,n)=>{let r=Lr[n.toLowerCase()];if(r!==void 0)return r;if(n[0]==="#"){let i=n[1]==="x"||n[1]==="X"?Number.parseInt(n.slice(2),16):Number.parseInt(n.slice(1),10);return Number.isFinite(i)?String.fromCodePoint(i):e}return e})}function Ge(t){if(!t.includes("{{"))return null;let e=[],n=0;for(let r of t.matchAll(/\{\{([\s\S]+?)\}\}/g)){if(r.index>n)e.push(JSON.stringify(t.slice(n,r.index)));e.push(`(${r[1].trim()})`),n=r.index+r[0].length}if(!e.some((r)=>r.startsWith("(")))return null;if(n<t.length)e.push(JSON.stringify(t.slice(n)));if(e.length===1)return e[0].slice(1,-1);return`[${e.join(", ")}].map(__stxPart => __stxPart == null ? '' : __stxPart).join('')`}function en(t,e,n,r={}){let i=r.inheritedVariables,a={},l={},u={},d=[],h="",m={};for(let[b,f]of e){let c=b.toLowerCase();if(c==="class"||c==="classname"){h=h?`${h} ${f}`:f;continue}if(c==="style"){m={...m,...Dr(t,f,n,{...r,onVariables(v){i=v,r.onVariables?.(v)}})};continue}if(c.startsWith(":")||c.startsWith("x-")&&c!=="x-cloak"){u[c.startsWith(":")?c.slice(1):c.slice(2)]=Z(f);continue}if(c==="x-cloak")continue;if(c.startsWith("@")||c.startsWith("v-on:")){let v=c.startsWith("@")?c.slice(1):c.slice(5),[k]=v.split("."),w=Le[k]??(k.startsWith("on")?k:"");if(!w||!Mr.has(w)){if(Pr.test(k)||/\./.test(v))n.push({kind:"unread-event",tag:t,name:b});continue}l[w]=Z(f);continue}if(c==="key"){a.key=f;continue}let x=Z(f),g=Ge(x);if(g){u[c]=g,d.push(c);continue}let N=He(b);if(x===""&&zt.has(N)){a[N]=!0;continue}try{a[N]=JSON.parse(x)}catch{a[N]=x}}let p=a["data-native"]?a["data-native"]==="TextInput":t==="textarea"||t==="input"&&!["checkbox","radio","hidden"].includes(String(a.type??"text").toLowerCase()),y=h?de(h,i,{focus:p,focusWithin:!0,rules:r.rules}):void 0;for(let b of new Set(y?.unknown??[]))n.push({kind:"unknown-class",tag:t,name:b});let S=Ee({...y?.style,...m});return{props:a,style:S,events:l,bindings:u,classes:h,inline:m,templated:d}}function Dr(t,e,n,r){return ce(Z(e),(i)=>n.push({...i,tag:t}),r)}function Ke(t){return t.children.map((e)=>typeof e==="string"?e:Ke(e)).join("").replace(/\s+/g," ").trim()}function $r(t,e){let n=t.node;if(n.props["data-stx-native-template"])return n.children=n.children.map((a)=>typeof a==="string"?H("Text",{},{},{},[a]):a),n;let r=n.children.filter((a)=>typeof a!=="string"),i=n.children.filter((a)=>typeof a==="string").join("").trim();if(t.tag==="button"&&n.type==="Button"&&!t.declaredNative&&r.length>0)return n.type="Pressable",n.props.role??="button",n.children=n.children.flatMap((a)=>typeof a==="string"?a.trim()?[H("Text",{},{},{},[a.trim()])]:[]:[a]),n;if(n.type==="Button"&&r.length===0)return n.children=i?[i]:[],n;if(n.type==="Svg"||n.type==="G")return n.children=r,n;if(n.type==="SvgText"){let a=Ke(n);return n.children=a?[a]:[],n}if(Zt.has(n.type)&&r.length===0&&i)return n.type="Text",n.children=[i],n;if(n.type==="Text"&&!i&&r.length===0&&typeof n.props.text==="string")return n.children=n.props.text?[n.props.text]:[],delete n.props.text,n;if(n.type==="Text"&&r.length>0){if(/(?:^|\s)(?:inline-)?(?:flex|grid)(?:\s|$)/.test(n._classes??"")||r.some((u)=>u.type!=="Text"))return n.type="View",n.children=n.children.map((u)=>typeof u==="string"?H("Text",{},{},{},[u]):u),n;let l=Ke(n);return e.push({kind:"flattened-text",tag:t.tag}),n.children=l?[l]:[],n}if(Zt.has(n.type)&&r.length>0)n.children=r;return n}async function Vr(t,e={}){let n=[],r=await Gt(t,(c)=>n.push({kind:"unsupported-theme-rule",tag:"style",name:c})),i=re(r.light).computed(),a=new Set([...t.matchAll(/\sclass(?:name)?\s*=\s*"([^"]*)"/gi)].flatMap((c)=>c[1].split(/\s+/))),l=await Ht(t,(c,x)=>{if(!x.length||x.some((g)=>a.has(g)))n.push({kind:"unsupported-style-rule",tag:"style",name:c})}),u=[],d=[],h=new Set;function m(c){let x=d[d.length-1];if(!x)u.push(c);else if(!x.dropped)x.node.children.push(c)}function p(c){let x=(N)=>{if(c.tag!=="html"&&c.node._styleSource)N._styleAncestors=[c.node._styleSource,...N._styleAncestors??[]]};if(c.node.bindings&&Object.keys(c.node.bindings).length>0){let N=c.node.children,v=N.filter((w)=>typeof w!=="string"),k=v.length===1&&v.length===N.length?v[0]:H("View",{},{},{},N);if(k.bindings={...c.node.bindings,...k.bindings},k.bindingId===void 0&&c.node.bindingId!==void 0)k.bindingId=c.node.bindingId;x(k),m(k);return}let g=d[d.length-1];for(let N of c.node.children){if(typeof N==="string"){if(g&&!g.dropped)g.node.children.push(N);continue}if(x(N),!g)u.push(N);else if(!g.dropped)g.node.children.push(N)}}function y(c,x){let g=d[d.length-1];if(c==="svg"||g?.svg)return S(c,x,g);let N=Jt.has(c)&&!pe.has(c),v=d[d.length-1]?.dropped??!1,k=g?.variables??i,{props:w,style:_,events:I,bindings:B,classes:R,inline:T,templated:E}=N||v?{props:{},style:{},events:{},bindings:{},classes:"",inline:{},templated:[]}:en(c,x,n,{inheritedVariables:k,onVariables:(C)=>{k=C},rules:l});if(c==="html")k=i;let P=w["data-native"],j=c==="template"&&x.some(([C])=>[":for","x-for","@for"].includes(C)),A;if(j)A="View",w["data-stx-native-template"]=!0;else if(typeof P==="string"&&he.has(P))A=P,delete w["data-native"];else{if(A=pe.has(c)?"View":Ut(c),(c==="i"||c==="span")&&/(?:^|\s)i-[a-z0-9]+-[a-z0-9-]+(?:\s|$)/.test(R))A="Icon";else if(c==="i"&&x.some(([C])=>/^(?::|x-)class$/i.test(C)))A="Icon";if(c==="input"){let C=String(w.type??"text").toLowerCase();if(C==="checkbox")A="Checkbox",w.formValue=w.value??"on",w.checked=w.checked===""||w.checked===!0||w.checked==="true",w.value=w.checked;else if(C==="hidden")A="View",_.display="none",T.display="none";else if(C==="radio")A="View",w.accessibilityRole="radio",n.push({kind:"unsupported-control",tag:c,name:"input:radio"})}}if(!v&&A===c&&!he.has(A)&&!Jt.has(c)&&!Yt.has(c)&&!h.has(c))h.add(c),n.push({kind:"unmapped-tag",tag:c});if((N||pe.has(c))&&!h.has(`drop:${c}`))h.add(`drop:${c}`),n.push({kind:"dropped-subtree",tag:c});if(A==="View"&&/(?:^|\s)overflow-x-(?:auto|scroll)(?:\s|$)/.test(R))A="ScrollView",w.horizontal=!0,w.showsHorizontalScrollIndicator??=!1;else if(A==="View"&&/(?:^|\s)overflow-y-(?:auto|scroll)(?:\s|$)/.test(R))A="ScrollView";if(c==="form")w["data-stx-form"]=!0;if(c==="button"&&w.type===void 0)w.type="submit";if((A==="Video"||A==="Image")&&w.source===void 0&&w.src!==void 0)w.source=w.src,delete w.src;if(A==="Icon"){let C=de(R).icon,O=ie(String(w.symbol||w.name||C||""),Boolean(w.symbol));if(w.symbol=O.symbol,O.iconify)w.iconify=O.iconify}if(A==="FlatList"||A==="SectionList"){let C=new Set([...Object.keys(w),...Object.keys(B)].map((O)=>O.toLowerCase()));for(let[O,L]of Br)if(C.has(O))n.push({kind:"unsupported-list-prop",tag:A,name:L})}let M=H(A,w,_,I);M._inlineStyle=T,M._styleSource=Z(x.find(([C])=>C==="style")?.[1]??"");let X=w["data-stx-b"];if(typeof X==="number"&&Number.isInteger(X))M.bindingId=X;if(delete w["data-stx-b"],R)M._classes=R;if(Object.keys(B).length>0)M.bindings=B;if(E.length>0)M._templated=E;if(typeof w.key==="string")M.key=w.key,delete w.key;return{tag:c,node:M,variables:k,declaredNative:typeof P==="string"&&he.has(P),dropped:N||v||pe.has(c)||A==="Video",discard:N||v,unwrap:Yt.has(c)&&!j&&A!=="ScrollView"&&!(typeof P==="string"&&he.has(P))}}function S(c,x,g){let N=g?.dropped??!1,v=Ve[c];if(N||!v){if(!N&&!h.has(`drop:${c}`))h.add(`drop:${c}`),n.push({kind:jt.has(c)?"dropped-subtree":"unmapped-tag",tag:c});return{tag:c,node:H("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let k=g?.variables??i,{props:w,style:_,events:I,bindings:B,classes:R,inline:T,templated:E}=en(c,x,n,{inheritedVariables:k,onVariables:(M)=>{k=M},rules:l});if(v==="Svg"){let M=Fe(w.viewBox);if(M)w.viewBox=M;else delete w.viewBox;for(let X of["width","height"]){if(typeof w[X]==="number"&&_[X]===void 0)_[X]=w[X];delete w[X]}}if(typeof w.strokeDasharray==="string"||typeof w.strokeDasharray==="number"){let M=String(w.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);w.strokeDasharray=M}let P=ze(v,w);if(P)w.geometry=P;if(v==="Animate")Xe(w);let j=H(v,w,_,I);j._inlineStyle=T,j._styleSource=Z(x.find(([M])=>M==="style")?.[1]??"");let A=w["data-stx-b"];if(typeof A==="number"&&Number.isInteger(A))j.bindingId=A;if(delete w["data-stx-b"],R)j._classes=R;if(Object.keys(B).length>0)j.bindings=B;if(E.length>0)j._templated=E;if(typeof w.key==="string")j.key=w.key,delete w.key;return{tag:c,node:j,variables:k,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(c){let x=c.tagName.toLowerCase(),g=y(x,[...c.attributes]),N=!0;try{c.onEndTag(()=>{if(d.pop(),g.discard)return;if(g.unwrap)p(g);else m($r(g,n))})}catch{N=!1}if(N)d.push(g);else if(!g.discard)m(g.node)},text(c){let x=d[d.length-1];if(!x||x.dropped)return;let g=jr(Z(c.text),x.inMustache===!0);x.inMustache=g.inside;let N=g.text;if(!N.trim())return;x.node.children.push(N)}}).transform(new Response(t)).text(),u.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);let b=u.length===1?u[0]:H("View",{},{},{},u);if(r.light.length||r.dark.length)b._stylesheetTheme=r;if(Object.keys(l).length)b._stylesheetRules=l;let f=(c)=>{Wr(c);let x=Me(c.props);if(Object.keys(x).length)c._accessibilitySource=Object.fromEntries(Pe.filter((g)=>(g in c.props)).map((g)=>[g,c.props[g]])),Object.assign(c.props,x);Dt(c);for(let g of c.children)if(typeof g!=="string")f(g)};return f(b),{root:b,diagnostics:n}}function jr(t,e){let n="",r=0;while(r<t.length){if(!e&&t.startsWith("{{",r)){e=!0,n+="{{",r+=2;continue}if(e&&t.startsWith("}}",r)){e=!1,n+="}}",r+=2;continue}let i=t[r];if(!e&&/\s/.test(i)){if(!n.endsWith(" "))n+=" ";while(r<t.length&&/\s/.test(t[r]))r++;continue}n+=i,r++}return{text:n,inside:e}}function Wr(t){if(t.props["data-stx-native-template"])return;if(t.bindings?.text||t.children.length===0)return;let e=t.children.filter((r)=>typeof r==="string");if(e.length<t.children.length){let r=t.type==="Button"||t.type==="Text"?null:Ge(e.join(""));if(!r)return;t.bindings={...t.bindings,text:r},t._templated=[...t._templated??[],"text"],t.children=t.children.filter((i)=>typeof i!=="string");return}let n=Ge(t.children.join(""));if(!n)return;if(t.type!=="Button")t.bindings={...t.bindings,text:n},t._templated=[...t._templated??[],"text"],t.children=[];else{t.type="Pressable",t.props.role??="button";let r=H("Text",{},{},{},[]);r.bindings={text:n},r._templated=["text"],t.children=[r]}}async function tn(t,e={}){let{root:n,diagnostics:r}=await Vr(t,e),i=e.script??{exports:{},functions:[],code:""};return{document:Kt(n,i,{source:e.source??"unknown"}),diagnostics:r}}var nn=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Fr=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,zr=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,rn=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function Je(t){let e=[];nn.lastIndex=0;for(let a of t.matchAll(nn)){let l=a[1]??"";if(/\bserver\b/.test(l))continue;e.push(a[2].trim())}let n=e.filter(Boolean).join(`
4
-
5
- `),r=[];for(let a of[Fr,zr]){a.lastIndex=0;for(let l of n.matchAll(a))if(!r.includes(l[1]))r.push(l[1])}let i={};rn.lastIndex=0;for(let a of n.matchAll(rn)){let l=a[2];try{i[a[1]]=JSON.parse(l.replace(/^'(.*)'$/,'"$1"'))}catch{i[a[1]]=l}}return{exports:i,functions:r,code:n}}var ne="[data-native-chrome]";function Xr(t){let e=(t??"").trim().toLowerCase();return e==="tabs"||e==="bar"?e:""}function sn(t){let e=ie(t);return e.known||/^i-|:/.test(t)?e.symbol:t}function Hr(t){let e=(t??"").trim();if(!e.startsWith("/")||e.startsWith("//"))return null;return e}function on(t){return t.replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#0?39;/g,"'").replace(/\s+/g," ").trim()}async function an(t){if(!/\bdata-native-chrome\b/i.test(t))return{html:t,chrome:null};let e=[],n=[],r=new Set,i=[],a=[],l=null,u=null,d=!1;if(await new HTMLRewriter().on(ne,{element(p){d=!0;let y=p.getAttribute("data-stx-scope");if(y)r.add(y);e.push(Xr(p.getAttribute("data-native-chrome"))),p.onEndTag(()=>{e.pop()})}}).on("[data-stx-component-wrapper]",{element(p){let y={scope:p.getAttribute("data-stx-scope")??"",children:0,chrome:0};i.push(y),p.onEndTag(()=>{if(i.pop(),y.scope&&y.children>0&&y.chrome===y.children)r.add(y.scope)})}}).on("[data-stx-component-wrapper] > *",{element(p){let y=i[i.length-1];if(!y)return;if(y.children++,p.hasAttribute("data-native-chrome"))y.chrome++}}).on(`${ne} [data-stx-scope]`,{element(p){let y=p.getAttribute("data-stx-scope");if(y)r.add(y)}}).on(`${ne} script[data-stx-component-factories]`,{element(p){let y=[...p.attributes].map(([S,b])=>b===""?S:`${S}="${b.replace(/"/g,"&quot;")}"`).join(" ");l="",p.onEndTag(()=>{a.push(`<script ${y}>${l}</script>`),l=null})},text(p){if(l!==null)l+=p.text}}).on(`${ne} a`,{element(p){let y=Hr(p.getAttribute("href")),S=e[e.length-1]??"";if(!y||!S)return;let b=p.getAttribute("data-native-icon")||qe(p.getAttribute("class")??""),f={path:y,title:"",region:S,label:p.getAttribute("aria-label")||p.getAttribute("title")||"",...b?{symbol:sn(b)}:{}};u=f,p.onEndTag(()=>{if(f.title=on(f.title)||on(f.label),n.push(f),u===f)u=null})},text(p){if(u)u.title+=p.text}}).on(`${ne} a *`,{element(p){if(!u||u.symbol)return;let y=p.getAttribute("data-native-icon")||qe(p.getAttribute("class")??"");if(y)u.symbol=sn(y)}}).transform(new Response(t)).text(),!d)return{html:t,chrome:null};let h=await new HTMLRewriter().on(ne,{element(p){p.remove()}}).on("script[data-stx-owner]",{element(p){if(r.has(p.getAttribute("data-stx-owner")??""))p.remove()}}).transform(new Response(t)).text(),m=(p)=>n.filter((y)=>y.region===p).map(({path:y,title:S,symbol:b})=>({path:y,title:S,...b?{symbol:b}:{}}));return{html:a.join(`
6
- `)+h,chrome:{tabs:m("tabs"),bar:m("bar")}}}var me=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,cn=/function\s+(__stx_setup_[\w$]+)\s*\(/,qr=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function Ye(t){me.lastIndex=0;for(let e of t.matchAll(me)){let n=e[2].trim(),r=cn.exec(n)?.[1];if(r)return{name:r,code:n}}return null}function ln(t){let e=[];me.lastIndex=0;for(let n of t.matchAll(me)){let r=n[1],i=n[2].trim(),a=qr.exec(r)?.[1],l=/\bdata-stx-component-factories\b/i.test(r);if(!i||!a&&!l&&!cn.test(i))continue;e.push(a?{code:i,owner:a}:{code:i})}return e}function Kr(){let t=[K.join(import.meta.dir,"..","primitives"),K.join(import.meta.dir,"native","primitives")];for(let e of t)if(Gr(K.join(e,"View.stx")))return e;return t[0]}async function Jr(t,e,n={}){let r=n.root??K.dirname(e),i=await o(r),a=typeof i.root==="string"&&i.root?K.resolve(r,i.root):r,l=(R,T)=>R?K.isAbsolute(R)?R:K.resolve(a,R):K.join(a,T),u={root:r,layoutsDir:l(i.layoutsDir,"layouts"),partialsDir:l(i.partialsDir,"partials"),storesDir:l(i.storesDir,"stores"),componentsDir:n.componentsDir??(i.componentsDir?l(i.componentsDir,"components"):K.join(a,"components")),buildMode:"serve",cache:!1,_targetComponentDirs:[Kr()],_targetComponentFallbackNames:["Button","Checkbox","Switch","TextInput"],_nativeHostAttrs:!0,skipEventDirectives:!0,_pluginComponentDirs:i._pluginComponentDirs??[]},d={...n.context??{},__stx_inject_css:!1,__stx_native_screen:!0},h=new Set([e]),m=await s(t,d,e,u,h),{html:p,chrome:y}=await an(m),{html:S,manifest:b}=st(p),f=await Ct(r),{document:c,diagnostics:x}=await tn(f?`<style>${f}</style>${S}`:S,{source:e,script:Je(t)});Yr(c.root,b);let g=d.__stx_runtime_head;if(typeof g?.title==="string"&&g.title.trim())c.title=g.title.trim();if(y)c.chrome=y;let N=Ye(S),v=ln(S);if(Je(t).code.trim()){let R=await Ur(t,e,n.context,{forceClientSetup:!0}),T=Ye(R.setupCode??"");if(N=T??N,T&&!v.some((E)=>E.code===T.code))v.push({code:T.code})}let{buildModuleRegistryScript:k,registeredModuleIdsIn:w}=await import("./chunk-d1a86qx8.js"),_=async()=>{let R=[],T=await k(w(...v.map((E)=>E.code)),{collectInputs:R});for(let E of R)h.add(E);return T},I=await _();if([...v.map((R)=>R.code),I??""].some((R)=>/\buseStore\s*\(/.test(R))&&/<script\b[^>]*\bdata-stx-stores\b/i.test(S)){let{getStoreScript:R}=await import("./chunk-cfydbaeq.js"),T=await R(u.storesDir);if(T){v.unshift({code:T});for(let E of new Bun.Glob("*.ts").scanSync({cwd:u.storesDir,absolute:!0}))h.add(E);I=await _()}}if(I)v.unshift({code:I});return{document:c,manifest:b,setup:N,scripts:v,diagnostics:x,html:S,dependencies:[...h]}}function Yr(t,e){let n=new Map(e.entries.map((a)=>[a.id,a])),r=e.entries.reduce((a,l)=>Math.max(a,l.id),-1)+1,i=(a)=>{if(a._templated?.length&&a.bindings){if(a.bindingId===void 0||!n.has(a.bindingId)){let u={id:a.bindingId??r++,bindings:[]};a.bindingId=u.id,n.set(u.id,u),e.entries.push(u)}let l=n.get(a.bindingId);for(let u of a._templated){let d=`:${u}`,h=we(d);if(h&&!l.bindings.some((m)=>m.name===d))l.bindings.push({name:d,value:a.bindings[u],kind:h})}}for(let l of a.children)if(typeof l!=="string")i(l)};i(t)}async function ye(t,e={}){return Jr(await Bun.file(t).text(),t,e)}var Es=Symbol("stx.nativeWebStorage.raw");var oe="__app";async function ni(t){try{let{loadCssEngineConfig:e}=await import("./chunk-5s1ay9mv.js");return gt(await e(t))}catch{return{}}}var be="__runtime",ri="__messages";function Qe(t){let n=[D.join(import.meta.dir,"..","runtime",`${t}.ts`),D.join(import.meta.dir,"..","runtime",`${t}.js`),D.join(import.meta.dir,"native","runtime",`${t}.js`)].find((r)=>et(r));if(!n)throw Error(`Native runtime module ${t} is missing`);return n}async function Ze(t,e,n,r,i){let a={name:"stx-screen-inputs",setup(u){u.onLoad({filter:/.*/,namespace:"file"},({path:d})=>{r.add(d);let h=i?.get(d);return h===void 0?void 0:{contents:h,loader:"js"}})}},l=await Bun.build({entrypoints:[t],target:"browser",format:"iife",minify:n,plugins:[a,...e],define:{"process.env.NODE_ENV":JSON.stringify(n?"production":"development")}});if(!l.success){let u=l.logs.map((d)=>String(d.message??d)).join(`
7
- `);throw Error(`Could not bundle ${t}:
8
- ${u}`)}return(await l.outputs[0].text()).trim()}var ii=/^[\w-]+(?:\/[\w-]+)*$/,si=/^[\w-]+$/;async function oi(t,e){let n=D.resolve(t,e.dir);if(!e.languages?.length)throw Error("messages.languages must name at least one language");let r=new Map,i=new Map;for(let a of e.languages){if(!si.test(a))throw Error(`messages: "${a}" is not a language directory name`);let l=D.join(n,a);if(!et(l))throw Error(`messages: ${D.relative(t,l)} does not exist`);let u=new Map;for(let d of[...new Bun.Glob("**/*.{ts,js,mjs,json}").scanSync({cwd:l})].sort()){if(/\.(?:test|spec|d)\.[^.]+$/.test(d))continue;let h=d.replace(/\.[^./]+$/,"").split(D.sep).join("/");if(!ii.test(h))throw Error(`messages: ${a}/${d} is not an area name`);if(u.has(h))throw Error(`messages: ${a}/${h} is defined twice`);let m=D.join(l,d),p=await import(m),y=Object.keys(p).filter((f)=>f!=="default");if(y.length)throw Error(`messages: ${a}/${d} exports ${y.join(", ")}; a message module exports its messages as default, and nothing else`);let S=p.default,b=S!==null&&typeof S==="object"&&!Array.isArray(S)?JSON.stringify(S):void 0;if(b===void 0||!Bun.deepEquals(JSON.parse(b),S,!0))throw Error(`messages: ${a}/${d} must export plain data (an object JSON can hold) as default`);u.set(h,b),r.set(m,{language:a,area:h})}i.set(a,u)}return{files:r,data:i}}function ai(t,e){return`export default globalThis.__stxNativeRuntime.messages(${JSON.stringify(t)}, ${JSON.stringify(e)});`}function ci(t){let e=new Map;for(let[n,{language:r,area:i}]of t.files){let a=ai(r,i);e.set(n,a),e.set(ti(n),a)}return e}function li(t){let e=new Set;for(let n of t.matchAll(/__stxNativeRuntime\.messages\(\s*"[\w-]+"\s*,\s*"([\w/-]+)"\s*\)/g))e.add(n[1]);return[...e].sort()}function ui(t,e){let n=D.isAbsolute(t.meta.source)?D.relative(e,t.meta.source).split(D.sep).join("/"):t.meta.source;return{...t,script:{exports:t.script.exports,functions:[],code:""},meta:{...t.meta,source:n,compiledAt:0}}}async function tt(t){let e=Object.keys(t.screens);if(e.length===0)throw Error("screens must name at least one .stx file");let n=t.routed??!0,r=t.initialScreen??e[0];if(!t.screens[r])throw Error(`Initial screen ${r} is not in screens`);let i=D.resolve(t.root??process.cwd());if(t.messages&&!t.routesDir)throw Error("messages ship a language at a time beside route files: they need routesDir");if(t.sharedRuntime&&!t.routesDir)throw Error("sharedRuntime is the route files' runtime: it needs routesDir");if(t.messages&&!t.sharedRuntime)throw Error("messages are read by the shared runtime: they need sharedRuntime");if(t.messages&&t.outFile)throw Error("messages leave the languages out of the screens' code, which the one-file bundle cannot read: build it without messages");let a=t.messages?await oi(i,t.messages):null,l=t.styleConfig??await ni(i),u=a?ci(a):null,d=[],h=async()=>{for(let T of e){let E=D.resolve(i,t.screens[T]);if(!E.endsWith(".stx"))throw Error(`Screen ${T} must name a .stx file`);d.push({name:T,file:E,compiled:await ye(E,{root:i})})}};await pt(l,()=>u?Gs(u,h):h());let m=Qe("jsc-globals"),p=Qe("shared-screen"),y=t.app?D.resolve(i,t.app):null;if(y&&!et(y))throw Error(`The app script ${t.app} does not exist`);if(y&&!n)throw Error("An app script needs a routed bundle");if(y&&t.screens[oe])throw Error(`${oe} is the app script's route, not a screen name`);let S=t.browser;if(t.screens[be])throw Error(`${be} is the runtime prelude's file, not a screen name`);let b=ft();if(S&&t.routesDir)throw Error("A browser screen is one route; routesDir is for device hosts");let f=(T,E,P)=>{let j=n?`var routeName = g.__stxNativeRoute || ${JSON.stringify(r)};
9
- var isApp = ${y?`routeName === ${JSON.stringify(oe)}`:"false"};
10
- if (!isApp && routeNames.indexOf(routeName) === -1) throw new Error(['Unknown native screen:', routeName].join(' '));
11
- if (isApp ? ${!E} : ${JSON.stringify(T.map(({name:F})=>F))}.indexOf(routeName) === -1) throw new Error(['This bundle does not hold the native screen', routeName].join(' '));`:`var routeName = 'main';
12
- var isApp = false;`,A=T.map(({name:F,compiled:q},Y)=>`${Y===0?"if":"else if"} (routeName === ${JSON.stringify(n?F:"main")}) {
13
- nativeDocument = ${JSON.stringify(ui(q.document,i))};
14
- manifest = ${JSON.stringify(q.manifest)};
15
- }`).join(`
16
- `),M=T.map(({name:F,compiled:q},Y)=>`${Y===0?"if":"else if"} (routeName === ${JSON.stringify(n?F:"main")}) {
17
- g.__stx_latestSetup = null;
18
- ${q.scripts.map((G)=>G.owner?` g.__stx_componentSetups = g.__stx_componentSetups || {};
19
- // Kept by id as well as run once: a :for or :if clone of this component
20
- // has no script to copy, and is set up from this (component hydration).
21
- g.__stx_componentSetups[${JSON.stringify(G.owner)}] = function() {
22
- ${G.code}
23
- };
24
- g.__STX_SETUP_ROOT__ = screen && screen.scopeRoot(${JSON.stringify(G.owner)});
25
- try { g.__stx_componentSetups[${JSON.stringify(G.owner)}](); }
26
- finally { g.__STX_SETUP_ROOT__ = null; }`:G.code).join(`
27
- `)}
28
- }`).join(`
29
- `),X=E&&y,C=S?Qe("browser-screen"):null,O=S?Bun.resolveSync(S.platformModule,i):null;return`
30
- ${P?`var runtime = globalThis.__stxNativeRuntime;
31
- if (!runtime || runtime.version !== ${JSON.stringify(P)}) throw new Error('This screen needs the stx native runtime it was built with: evaluate ${be}.js from the same build first');
32
- var installJSCGlobals = runtime.installJSCGlobals;
33
- var prepareNativeApp = runtime.prepareNativeApp;
34
- var prepareSharedNativeScreen = runtime.prepareSharedNativeScreen;`:`import { installJSCGlobals } from ${JSON.stringify(m)};
35
- import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(p)};`}
36
- ${S?`import { createBrowserScreenBridge } from ${JSON.stringify(C)};
37
- import { createBrowserPlatform } from ${JSON.stringify(O)};`:""}
38
- ${X?`import * as nativeAppModule from ${JSON.stringify(y)};`:"var nativeAppModule = null;"}
39
- ${S?"(async function() {":""}
40
- var g = globalThis;
41
- installJSCGlobals(g);
42
- g.__stxNativeStyleConfig = ${JSON.stringify(l)};
43
- ${S?`var browserPlatform = await createBrowserPlatform(${JSON.stringify(S.platformOptions??{})});
44
- var browserBridge = createBrowserScreenBridge(browserPlatform, ${JSON.stringify(S)});
45
- var bridge = browserBridge;
46
- g.__stxNativeRoute = ${JSON.stringify(r)};`:"var bridge = g.__stxNativeBridge;"}
47
- if (!bridge) throw new Error('Missing __stxNativeBridge');
48
- var routeNames = ${JSON.stringify(n?e:["main"])};
49
- var shareStorage = ${JSON.stringify(t.shareStorage??{})};
50
- ${j}
51
- g.__stxNativeRoute = routeName;
52
- var nativeDocument;
53
- var manifest;
54
- ${A}
55
- var screen = null;
56
- var app = null;
57
- if (isApp) {
58
- app = prepareNativeApp(bridge, { routeName: routeName, routeNames: routeNames, shareStorage: shareStorage });
59
- g.__stxNativeUnmount = function() { app.unmount(); };
60
- }
61
- else {
62
- screen = prepareSharedNativeScreen(nativeDocument, manifest, bridge, { routeName: routeName, routeNames: routeNames, shareStorage: shareStorage });
63
- g.__stx_host = screen.host;
64
- g.__stxNativeUnmount = function() { screen.unmount(); };
65
- }
66
- ${P?"runtime.startSignals();":b}
67
- var pageSetup = g.__stx_latestSetup;
68
- var pageRuntimeSetup = g.stx && g.stx._latestSetup;
69
- ${M}
70
- // The screen's setup is the native host's to run. A screen script publishes
71
- // it where a page's document runtime adopts its own, and in a browser that
72
- // runtime's DOMContentLoaded and stx:load ran it a second time: another copy
73
- // of the screen, mounted beside this one. Take it, and hand the page back
74
- // whatever setup it had.
75
- var screenSetup = g.__stx_latestSetup || null;
76
- g.__stx_latestSetup = pageSetup;
77
- if (g.stx) g.stx._latestSetup = pageRuntimeSetup || null;
78
- if (isApp) app.start(nativeAppModule);
79
- else screen.mount(g.stx, screenSetup);
80
- ${S?`var stopApp = nativeAppModule && typeof nativeAppModule.default === 'function' ? nativeAppModule.default(g.craft) : null;
81
- var unmount = g.__stxNativeUnmount;
82
- var ended = false;
83
- g.__stxNativeUnmount = function() { if (ended) return; ended = true; if (typeof stopApp === 'function') stopApp(); unmount(); browserBridge.dispose(); };
84
- g.addEventListener('pagehide', function(event) { if (!event.persisted) g.__stxNativeUnmount(); });
85
- })().catch(function(error) { console.error('[stx browser screen]', error); var node = document.querySelector(${JSON.stringify(S.container)}); if (node) { node.textContent = 'This screen could not start. Reload to try again.'; node.setAttribute('role', 'alert'); } });`:""}
86
- `},c=(T)=>({name:"stx-native-shared-screens",setup(E){E.onResolve({filter:/^stx:native-shared-screens$/},()=>({path:"entry",namespace:"stx-native-shared-screens"})),E.onLoad({filter:/.*/,namespace:"stx-native-shared-screens"},()=>({contents:T,loader:"js"}))}}),x=new Set(d.flatMap(({compiled:T})=>T.dependencies)),g=d.flatMap(({compiled:T})=>T.diagnostics).map((T)=>({level:"warning",message:[T.kind,T.tag,T.name].filter(Boolean).join(": ")})),N=d.filter(({compiled:T})=>T.document.chrome),v=N.length?{chrome:Object.fromEntries(N.map(({name:T,compiled:E})=>[T,E.document.chrome]))}:{},k=t.minify??!1,w,_,I;if(t.routesDir){let T=D.resolve(i,t.routesDir);un(T,{recursive:!0});let E=`
87
- import { installJSCGlobals } from ${JSON.stringify(m)};
88
- import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(p)};
89
- globalThis.__stxNativeRuntime = {
90
- version: '__STX_NATIVE_RUNTIME_VERSION__',
91
- installJSCGlobals: installJSCGlobals,
92
- prepareNativeApp: prepareNativeApp,
93
- prepareSharedNativeScreen: prepareSharedNativeScreen,
94
- // Each screen starts its own signals runtime, after its host is in place.
95
- startSignals: function() {
96
- ${b}
97
- },
98
- // A language's messages for an area (the compile's \`messages\`), read the
99
- // first time they are looked into: a screen never parses a language it
100
- // is not shown in, nor an area it does not use.
101
- messages: function(language, area) {
102
- var g = globalThis;
103
- var loaded = g.__stxNativeMessages || (g.__stxNativeMessages = {});
104
- function table() {
105
- var forLanguage = loaded[language] || (loaded[language] = {});
106
- if (Object.prototype.hasOwnProperty.call(forLanguage, area)) return forLanguage[area];
107
- var value = null;
108
- if (typeof g.__stxNativeReadMessages === 'function') {
109
- try {
110
- var text = g.__stxNativeReadMessages(language, area);
111
- if (typeof text === 'string') value = JSON.parse(text);
112
- }
113
- catch (error) { console.error('[stx native] could not read the ' + language + ' messages for ' + area, error); }
114
- }
115
- forLanguage[area] = value;
116
- return value;
117
- }
118
- var own = Object.prototype.hasOwnProperty;
119
- return new Proxy({}, {
120
- get: function(target, name) { var messages = table(); return messages && own.call(messages, name) ? messages[name] : undefined; },
121
- has: function(target, name) { var messages = table(); return !!messages && own.call(messages, name); },
122
- ownKeys: function() { var messages = table(); return messages ? Object.keys(messages) : []; },
123
- getOwnPropertyDescriptor: function(target, name) {
124
- var messages = table();
125
- return messages && own.call(messages, name) ? { value: messages[name], writable: false, enumerable: true, configurable: true } : undefined;
126
- },
127
- });
128
- },
129
- };
130
- `,P,j=D.join(T,`${be}.js`);if(t.sharedRuntime){let C=await Ze("stx:native-shared-screens",[c(E)],k,x);P=Bun.hash(C).toString(36),_=j,await Bun.write(_,C.replace("__STX_NATIVE_RUNTIME_VERSION__",P))}else dn(j,{force:!0});let A=D.join(T,ri);dn(A,{recursive:!0,force:!0});let M={},X=[...d.map((C)=>({name:C.name,screens:[C],app:!1})),...y?[{name:oe,screens:[],app:!0}]:[]];w={};for(let C=0;C<X.length;C+=6)await Promise.all(X.slice(C,C+6).map(async(O)=>{let L=D.join(T,`${O.name}.js`),W=await Ze("stx:native-shared-screens",[c(f(O.screens,O.app,P))],k,x,u??void 0);if(await Bun.write(L,W),w[O.name]=L,a)M[O.name]=li(W)}));if(a){for(let[O,L]of a.data)for(let[W,F]of L)await Bun.write(D.join(A,O,`${W}.json`),F);let C=Object.fromEntries(Object.keys(M).sort().map((O)=>[O,M[O]]));await Bun.write(D.join(A,"routes.json"),JSON.stringify(C));for(let O of a.files.keys())x.add(O);I={dir:A,languages:[...a.data.keys()],routes:C}}if(!t.outFile)return{code:"",routes:w,runtime:_,...I?{messages:I}:{},...v,diagnostics:g,dependencies:[...x]}}let B=await Ze("stx:native-shared-screens",[c(f(d,!0))],k,x);if(!t.outFile)return{code:B,...v,diagnostics:g,dependencies:[...x]};let R=D.resolve(i,t.outFile);return un(D.dirname(R),{recursive:!0}),await Bun.write(R,B),{code:B,outFile:R,...w?{routes:w,runtime:_}:{},...I?{messages:I}:{},...v,diagnostics:g,dependencies:[...x]}}async function di(t,e={}){return tt({...e,screens:{main:t},routed:!1})}function fn(t,e={}){return di(t,e)}var pn=["native.config.json","stx-native.config.json"];function gi(t=process.cwd(),e){let n=e?U.resolve(t,e):pn.map((d)=>U.join(t,d)).find((d)=>ve(d));if(!n)return null;if(!ve(n))throw Error(`Native config not found: ${n}`);let r=JSON.parse(pi(n,"utf8")),i=Object.entries(r.screens??{});if(i.length===0)throw Error(`${U.basename(n)} must name at least one screen in "screens"`);let a={};for(let[d,h]of i){if(!/^[A-Z][\w-]*$/i.test(d))throw Error(`Invalid native screen name: ${d}`);if(typeof h!=="string"||!h.endsWith(".stx"))throw Error(`Screen ${d} must name a .stx file`);if(a[d]=U.resolve(U.dirname(n),h),!ve(a[d]))throw Error(`Screen ${d} not found: ${a[d]}`)}let l=r.initialScreen||i[0][0];if(!a[l])throw Error(`Initial screen ${l} is not in screens`);if(r.app!==void 0&&typeof r.app!=="string")throw Error(`"app" must name the app script's file`);let u=r.app?U.resolve(U.dirname(n),r.app):void 0;if(u&&!ve(u))throw Error(`App script not found: ${u}`);return{initialScreen:l,screens:a,file:n,...u?{app:u}:{}}}async function na(t,e={}){let n=U.resolve(e.cwd??process.cwd()),r=e.format??"ir";if(r!=="ir"&&r!=="bundle")throw Error(`Unknown compile format: ${r}. Expected ir or bundle.`);let i=t?null:gi(n,e.config);if(!t&&!i)throw Error(`Please specify an input file: stx native compile <file.stx>, or add ${pn[0]}`);let a,l=[];if(r==="bundle"){let d=i?await tt({screens:i.screens,initialScreen:i.initialScreen,minify:e.minify,root:n,...i.app?{app:i.app}:{}}):await fn(U.resolve(n,t),{minify:e.minify});a=d.code,l=d.diagnostics}else{let d=async(m)=>{let p=await ye(m);return l.push(...p.diagnostics.map((y)=>({level:"warning",message:[y.kind,y.tag,y.name].filter(Boolean).join(": ")}))),p.document},h=i?{initialScreen:i.initialScreen,screens:Object.fromEntries(await Promise.all(Object.entries(i.screens).map(async([m,p])=>[m,await d(p)])))}:await d(U.resolve(n,t));a=JSON.stringify(h,null,2)}if(!e.output)return{output:a,diagnostics:l};let u=U.resolve(n,e.output);return fi(U.dirname(u),{recursive:!0}),await Bun.write(u,a),{output:a,written:u,diagnostics:l}}export{na as runNativeCompile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{je,mn,bs,Fo,A,Ot}from"./chunk-25zmy8q6.js";export{mn as currentRuntimeConfig,Ot as injectRuntimeConfig,A as resolveRuntimeConfig,Fo as useRuntimeConfig,bs as useServerRuntimeConfig,je as withRuntimeConfig};
@@ -1,14 +0,0 @@
1
- // @bun
2
- import{er}from"./chunk-4s8zacxg.js";import{pr}from"./chunk-bsajk82t.js";import{o}from"./chunk-srq9fqq8.js";import{W,Ge}from"./chunk-p6qd7ad0.js";import{ua}from"./chunk-vayhx642.js";var p=/<style\b[^>]*>/iy,x=/<\/style>/gi,R=/<script\b[^>]*>/iy,b=/<template(?=[\s>/])[^>]*>/iy,S=/<\/template\s*>/iy;function Kn(e){let r=0,t=0,s=-1;while(r<e.length){let n=e.indexOf("<",r);if(n===-1)return-1;if(e.startsWith("<!--",n)){let d=e.indexOf("-->",n+4);r=d===-1?e.length:d+3;continue}p.lastIndex=n;let u=p.exec(e);if(u){x.lastIndex=n+u[0].length;let d=x.exec(e);r=d===null?e.length:d.index+8;continue}b.lastIndex=n;let c=b.exec(e);if(c){if(t===0)s=n;t++,r=n+c[0].length;continue}S.lastIndex=n;let a=S.exec(e);if(a){if(t>0)t--;r=n+a[0].length;continue}if(R.lastIndex=n,R.test(e))return t>0?s:n;r=n+1}return-1}function U(e,r={}){return new er(e,r).routes}import w from"path";var T=new Map;async function y(e,r){let t=e,s=r;if(!t||!s)try{let a=await o();t||=a?.pagesDir||"pages",s||=a?.root||"."}catch{t||="pages",s||="."}let n=w.isAbsolute(t)?t:w.join(s,t),u=T.get(n);if(u)return u;let c=[];try{c=U(".",{pagesDir:n,emit:!1}).map((a)=>a.regex.source).filter(Boolean)}catch{c=[]}return T.set(n,c),c}function O(e){return e.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function l(e){return O(JSON.stringify(e))}function me(e){return e.includes("data-stx-runtime")}function ca(e){let r=/window\.stx\s*\.\s*[A-Za-z_$]|\}\s*=\s*window\.stx\s*;/g;for(let t=r.exec(e);t!==null;t=r.exec(e)){let s=e.slice(Math.max(0,t.index-80),t.index);if(/if\s*\(\s*window\.stx\s*\)|window\.stx\s*&&/.test(s))continue;return!0}return!1}function f(e,r){let t=Kn(e),s=e.search(/<!doctype\b/i);if(t!==-1&&(s===-1||t>s))return e.slice(0,t)+r+`
3
- `+e.slice(t);let n=pr(e);if(n!==null)return`${e.slice(0,n)}
4
- ${r}${e.slice(n)}`;if(e.includes("</head>")){let c=e.indexOf("</head>");return e.slice(0,c)+r+`
5
- `+e.slice(c)}if(W(e))return Ge(e,(c)=>`${c}
6
- ${r}`);return`${r}
7
- ${e}`}async function Xn(e,r){if(e.includes("data-stx-runtime")||e.includes("window.stx.state")||e.includes("STX Signals Runtime"))return e;if(r.buildMode==="serve"){let{getServeClientAsset:n}=await import("./chunk-34yj93hh.js"),{url:u}=await n("runtime",r.debug===!0);return f(e,`<script data-stx-runtime src="${u}"></script>`)}if(r.buildMode==="compile")return f(e,'<script data-stx-runtime src="/__stx/runtime.__STX_HASH__.js"></script>');let{getCachedSignalsRuntime:t}=await import("./chunk-34yj93hh.js"),s=await t(r.debug);return f(e,`<script data-stx-scoped data-stx-runtime>${s}</script>`)}function m(e){return/<[a-z][^>]*?\sx-tooltip\s*=/i.test(e)}function la(e){if(e.includes("data-stx-tooltip-runtime")||!m(e))return e;let r=`<script data-stx-scoped data-stx-tooltip-runtime>${ua()}</script>`,t=e.lastIndexOf("</body>");if(t===-1)return`${e}
8
- ${r}`;return`${e.slice(0,t)}${r}
9
- ${e.slice(t)}`}var E=/<script\b[^>]*\sdata-stx-router(?=[\s=>])/i;function C(e){return E.test(e)||e.includes("__stxRouter)return")||e.includes("__stxRouter=true")}async function he(e,r){if(!e.includes("</body>"))return e;if(C(e))return e;let t=r?.router,s="",n="";{let i={};if(t){if(t.container)i.container=t.container;if(t.interceptAllLinks!==void 0)i.interceptAllLinks=t.interceptAllLinks;if(t.progress!==void 0)i.progress=t.progress;if(t.viewTransitions!==void 0)i.viewTransitions=t.viewTransitions;if(t.viewTransitionDuration!==void 0)i.viewTransitionDuration=t.viewTransitionDuration;if(t.viewTransitionEasing!==void 0)i.viewTransitionEasing=t.viewTransitionEasing;if(t.scrollToTop!==void 0)i.scrollToTop=t.scrollToTop;if(t.scrollRestoration!==void 0)i.scrollRestoration=t.scrollRestoration;if(t.prefetch!==void 0)i.prefetch=t.prefetch;if(t.cache!==void 0)i.cache=t.cache;if(t.progressColor!==void 0)i.progressColor=t.progressColor;if(t.progressHeight!==void 0)i.progressHeight=t.progressHeight;if(t.prefetchVisible!==void 0)i.prefetchVisible=t.prefetchVisible;if(t.prefetchVisibleMax!==void 0)i.prefetchVisibleMax=t.prefetchVisibleMax;if(t.keepOpening!==void 0)i.keepOpening=t.keepOpening}try{let g=await y(r?.pagesDir,r?.root);if(g.length>0)if(r?.buildMode==="serve"){let{registerServeModuleBundle:h}=await import("./chunk-34yj93hh.js");n=`<script data-stx-owned-routes src="${h(`(window.__stxRouterConfig=window.__stxRouterConfig||{}).ownedRoutes=${l(g)};
10
- `)}"></script>
11
- `}else i.ownedRoutes=g}catch{}if(Object.keys(i).length>0)s=`<script>window.__stxRouterConfig=${l(i)};</script>
12
- `}let{getCachedRouterScript:u,getServeClientAsset:c}=await import("./chunk-34yj93hh.js"),a=r?.buildMode==="compile"?'<script data-stx-router src="/__stx/router.__STX_HASH__.js"></script>':r?.buildMode==="serve"?`<script data-stx-router src="${(await c("router")).url}"></script>`:`<script data-stx-router>${await u()}</script>`,d=e.lastIndexOf("</body>");return e.slice(0,d)+s+n+a+`
13
- </body>`+e.slice(d+7)}
14
- export{Kn,U,me,ca,Xn,la,he};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import i from"path";var nn=".stx",o="STX_DIR",e=null;function Ea(t){e=t?.trim()||null}function nr(){return process.env[o]?.trim()||e||nn}function c(t=process.cwd(),...n){let r=nr();return i.isAbsolute(r)?i.join(r,...n):i.join(t,r,...n)}function rr(t){if(!t||i.isAbsolute(t))return t;let n=t.replace(/\\/g,"/");if(n!==nn&&!n.startsWith(`${nn}/`))return t;let r=n.slice(nn.length+1);return r?i.join(nr(),r):nr()}
3
- export{nn,Ea,nr,c,rr};
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{Ye}from"./chunk-4s8zacxg.js";import{ft,On}from"./chunk-9dtbvjpp.js";import{Ie,cn,Ja,Ya}from"./chunk-f9zyf9n6.js";import{fr,gr,mr,yr,xe}from"./chunk-bsajk82t.js";import{A}from"./chunk-25zmy8q6.js";import{Bo}from"./chunk-mwnhdsbp.js";import{h}from"./chunk-kdebh22m.js";import{s}from"./chunk-aet1pgw7.js";import{N,o}from"./chunk-srq9fqq8.js";import{xa}from"./chunk-am2w363p.js";import{He,ke,Ri,Ai,kn}from"./chunk-bawq4fqy.js";import{Zt,Xs}from"./chunk-hz4x7h0n.js";import{_n}from"./chunk-s2wptfm1.js";import{qt,jn,Bn}from"./chunk-xaa36b0x.js";import{U}from"./chunk-twqzn21x.js";import m from"fs";import c from"path";import{createHash as Q}from"crypto";function W(i){return Q("sha256").update(i).digest("hex").slice(0,8)}function J(i=!1){let l=i?On():ft(),a=W(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function V(){let i=Ye(),l=W(i);return{content:i,filename:`router.${l}.js`,hash:l}}import q from"path";import{createHash as ee}from"crypto";function te(i={}){let l=new Set;return{context:new Proxy(i,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(i,l,a={}){let r=q.resolve(i),e=await Bun.file(r).text(),S=ee("sha256").update(e).digest("hex").slice(0,16);Ja();let _={};try{_=await o(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,f;while((f=d.exec(e))!==null){let R=f[1];if(/\bserver\b/.test(R))y.push(f[2])}let u=new Set(y.flatMap((R)=>Ie(R))),{context:D}=te({__filename:r,__dirname:q.dirname(r),__stx_serverDeclared:u}),w=new Set,j={...N,..._,...a,buildMode:"compile",strict:!1},b=await s(e,D,r,j,w),C=He(b),P=Ya();return{route:l,sourceFile:i,html:b,fragment:C,placeholders:P,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(w),contentHash:S,status:cn(e),streamTemplates:D.__streamTemplates}}var re=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(i,l){let a=0,r=0;if(!m.existsSync(i))return{copied:a,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,_){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(re.has(d.name))continue;let f=c.join(S,d.name),u=c.join(_,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(f,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(f,u),a++,r+=m.statSync(u).size}}}return e(i,l),{copied:a,bytes:r}}async function Lu(i={}){let l=Date.now(),a=c.resolve(i.root||process.cwd()),r=c.resolve(a,i.outputDir||".output");console.log("[stx build] Starting production build...");let e=await o(a),S=c.resolve(a,i.componentsDir??e.componentsDir??"components"),_=c.resolve(a,i.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,i.layoutsDir??e.layoutsDir??"layouts"),d=i.publicDir??e.publicDir??"public",f=xe(e.app?.head,{known:yr,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",w=i.routeRules??e.routeRules??{},j=_n(w),b=i.serverApi??e.serverApi,C=typeof b==="object"?b:{};if(b)Zt(a,C);if(e.runtimeConfig)A(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let P=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let n of P)m.mkdirSync(n,{recursive:!0});console.log("[stx build] Discovering routes...");let R=U(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],B=R.filter((n)=>!Y.some((g)=>n.pattern.startsWith(`/${g}/`)||n.pattern===`/${g}`));console.log(`[stx build] Found ${B.length} page routes (${R.length-B.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=J(i.debug),x=V();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let M=[],k=[];for(let n of B){let g=j(n.pattern),O=g.rendering==="prerender";if(O&&(n.pattern.includes(":")||n.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${n.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(n.filePath,n.pattern,{configDir:a,componentsDir:S,partialsDir:_,layoutsDir:y,debug:i.debug});if(M.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=mr(t.html,f,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=fr(t.html,u);if(f.htmlAttrs)t.html=gr(t.html,f.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let I=p[1];t.html=t.html.replace(" "+I,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${I}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await h(t.html),O){let p=await kn(t,{params:{},request:new Request(`http://stx.build${n.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${n.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=ke(t.html,D);let L=n.pattern==="/"?"index":n.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),z=c.join("server","pages",`${L}.compiled.json`),G=c.join("server","fragments",`${L}.html`);await Bun.write(c.join(r,z),JSON.stringify(t,null,2)),await Bun.write(c.join(r,G),t.fragment),k.push({pattern:n.pattern,compiledPath:z,fragmentPath:G,isDynamic:t.hasServerScripts,hasParams:n.pattern.includes(":")||n.pattern.includes("["),prerendered:O}),console.log(`[stx build] \u2713 ${n.pattern}`)}catch(t){if(Object.keys(g).length)throw t;console.error(`[stx build] \u2717 ${n.pattern}:`,t instanceof Error?t.message:t)}}let E=c.resolve(a,d);if(m.existsSync(E)){let{copied:n,bytes:g}=Z(E,c.join(r,"public"));if(n>0)console.log(`[stx build] Copied ${n} public asset${n===1?"":"s"} (${(g/1024).toFixed(1)}KB) from ${d}/`)}let H=Bn(a);if(H){let{copied:n,bytes:g}=Z(H,c.join(r,"public",jn));if(n>0)console.log(`[stx build] Copied ${n} asset${n===1?"":"s"} (${(g/1024).toFixed(1)}KB) from ${qt}/`)}let F={runtime:v.filename,router:x.filename},T=Ri(k,F,r);if(T.routeRules=w,T.routerContainer=D,b)T.apiRoutes=await Xs(a,r,C);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Bo(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(xa(e._layerGraph),null,2));Ai(T,r);let K=Date.now()-l;return console.log(`
3
- [stx build] Done in ${K}ms \u2014 ${M.length} pages compiled`),{pageCount:M.length,assets:F,outputDir:r,duration:K}}
4
- export{Lu};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kd,_d,Cd,Ed,Td}from"./chunk-pb6erpj3.js";export{_d as createSSRSuspense,Ed as generateSuspenseCSS,Td as generateSuspenseRuntime,kd as processSuspenseDirectives,Cd as renderSSRSuspense};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Li,nl,Pn,nd,rl,sl,ol,rd}from"./chunk-yx3dpdwc.js";import"./chunk-f9zyf9n6.js";import"./chunk-mwnhdsbp.js";import"./chunk-25zmy8q6.js";import"./chunk-bsajk82t.js";import"./chunk-ce6zddpf.js";import"./chunk-zp79zkkd.js";export{Pn as Validator,nl as defineForm,rl as processErrorDirective,sl as processErrorsDirective,rd as processFormValidationDirectives,ol as processHasErrorsDirective,Li as useForm,nd as v};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{be,Oo,No,Xl,Pt,qa,Do,Ga,Rp,Oe,dn,Ne}from"./chunk-f9zyf9n6.js";import{Qa,i}from"./chunk-7mvz972c.js";import"./chunk-mwnhdsbp.js";import"./chunk-25zmy8q6.js";import"./chunk-bsajk82t.js";import"./chunk-ce6zddpf.js";import"./chunk-zp79zkkd.js";export{be as BROWSER_CORE_IMPORTS,Xl as STX_AUTO_IMPORTS,Oo as extractAndStripCssImports,Oe as extractBridgeData,Qa as findInterpolationEnd,Ga as generateAutoImportDestructuring,Rp as generateBrowserAutoImportDestructuring,dn as generateServerDataBridge,Pt as injectBrowserCoreAutoImports,Ne as processClientScript,Do as referencesName,No as renderVendorStyleTags,i as stripCommentsAndLiterals,qa as transformAutoImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{hc,yc,bc,uu,du}from"./chunk-d09q93yf.js";export{yc as auditBuildOutput,hc as auditConfig,bc as calculateAuditResult,du as formatAuditResult,uu as runPwaAudit};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import t from"fs";import r from"path";var qt="resources/assets",jn="assets";function Bn(o=process.cwd()){let s=r.resolve(o,qt);return t.existsSync(s)&&t.statSync(s).isDirectory()?s:null}
3
- export{qt,jn,Bn};
@@ -1,25 +0,0 @@
1
- // @bun
2
- import{zo,ws,l,p,E,tt,u,xs,t,a,w}from"./chunk-bsajk82t.js";import{ye,Tt,K,F,It,J,k}from"./chunk-f9zyf9n6.js";import{Gn}from"./chunk-40tswfe7.js";import{ne}from"./chunk-v6peecfp.js";import{Wr}from"./chunk-hgry3mjd.js";var de=1000,pe=!1;function he(n,r){let c=/@(include|partial)\s*\(\s*(['"])([^'"]+)\2\s*,\s*/g,e="",o=0,i;while((i=c.exec(n))!==null){let g=i.index+i[0].length,x=i.index+i[0].indexOf("("),b=w(n,"(",")",x);if(b===-1)continue;let d=n.slice(g,b).trim();if(!d)continue;if(!Object.keys(r).some((f)=>new RegExp(`(?:^|[^\\w$.])${f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`).test(d)))continue;let m;try{let f=E(d,r);if(!f||typeof f!=="object")continue;m=JSON.stringify(f)}catch{continue}e+=n.slice(o,g)+m,o=b,c.lastIndex=b}return o===0?n:e+n.slice(o)}function me(n,r){let c=/@component\s*\(/g,e=n,o,i=[];while((o=c.exec(e))!==null){let g=o.index,x=g+o[0].length-1,b=1,d=x+1;while(d<e.length&&b>0){if(e[d]==="(")b++;else if(e[d]===")"){if(b--,b===0)break}d++}if(b!==0)continue;let s=e.substring(x+1,d),m=d+1,f=s.match(/^\s*['"]([^'"]+)['"]/);if(!f)continue;let y=f[1],h=s.slice(f[0].length),R=h.match(/^\s*,\s*/);if(!R)continue;let I=h.slice(R[0].length).trim();if(!I)continue;try{let v=E(I,r),W=JSON.stringify(v),S=`@component('${y}', ${W})`;i.push({start:g,end:m,replacement:S})}catch{continue}}for(let g=i.length-1;g>=0;g--){let{start:x,end:b,replacement:d}=i[g];e=e.substring(0,x)+d+e.substring(b)}return e}function oe(n,r,c){let e=n,o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\(`),i;while((i=o.exec(e))!==null){let g=i.index,x=g+i[0].length-1,b=1,d=x+1,s=null,m=!1;while(d<e.length&&b>0){let h=e[d];if(m){m=!1,d++;continue}if(h==="\\"&&s){m=!0,d++;continue}if(s){if(h===s)s=null;d++;continue}if(h==='"'||h==="'"||h==="`"){s=h,d++;continue}if(h==="(")b++;else if(h===")"){if(b--,b===0)break}d++}if(b!==0)break;let f=e.substring(x+1,d),y=c(f);e=e.substring(0,g)+y+e.substring(d+1)}return e}function be(n,r){let c=n;return c=c.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)(?=\s+[^=]|\s*\/?>|\s*$)/g,(e,o)=>{if(o in r)return`:${o}="${o}"`;return e}),c=c.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,(e,o,i)=>{try{if(F(i,r.__stx_client_signal_names||[]))return e;let g=Object.keys(r),x=Object.values(r);zo(i);let b=!1,s=u(i,g,()=>{b=!0})(...x);if(b)return e;let m=JSON.stringify(s);if(m===void 0){if(!tt(i).some((h)=>!(h in r)))return"";return e}let f=Buffer.from(m,"utf8").toString("base64");return`__stx_${o}="${f}"`}catch(g){return e}}),c}var ee="<!--__STX_BREAK__-->",te="<!--__STX_CONTINUE__-->";function le(n,r){let c=/\{\{\{?|\{!!|@(break|continue)(?![\w$])/g,e="",o=0;for(let i=c.exec(n);i;i=c.exec(n)){if(!i[1]){let d=i[0].length===3&&i[0]==="{{{"?3:2,s=i[0]==="{!!"?n.indexOf("!!}",c.lastIndex):ye(n,i.index,d);if(s<0)break;c.lastIndex=s+(i[0]==="{!!"?3:d);continue}let g=c.lastIndex,x=!0,b=/^\s*\(/.exec(n.slice(g));if(b){let d=g+b[0].length-1,s=w(n,"(",")",d);if(s<0)break;g=s+1;try{let m=`!!(${n.slice(d+1,s).trim()})`;x=p(m)?Boolean(u(m,Object.keys(r))(...Object.values(r))):Boolean(l(m,r))}catch{x=!1}}if(e+=n.slice(o,i.index),x)return e+(i[1]==="break"?ee:te);o=g,c.lastIndex=g}return e+n.slice(o)}function ae(n){let r=(o)=>o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),c="",e=0;return It(n,(o,i,g)=>(c+=ie(r(n.slice(e,g))),c+=`\${__stxRenderLoopValue(${g}, (${i}), ${o.length})}`,e=g+o.length,o)),c+ie(r(n.slice(e)))}function ue(n,r,c,e){return J(n,r,c==null?"":String(c),!1,e)}function ie(n){let r=n;return r=oe(r,"@break",(c)=>{let e=c.trim();if(!xs(e))return"";return`\`; if (${e}) { break; } result += \``}),r=oe(r,"@continue",(c)=>{let e=c.trim();if(!xs(e))return"";return`\`; if (${e}) { continue; } result += \``}),r=r.replace(/@break(?!\()/g,"`; break; result += `"),r=r.replace(/@continue(?!\()/g,"`; continue; result += `"),r}function xe(n){let r=/@forelse\s*\(/g,c,e=[],o=/@foreach\s*\(/g,i=/@endforeach/g,g;while((g=o.exec(n))!==null)e.push({pos:g.index,delta:1});while((g=i.exec(n))!==null)e.push({pos:g.index,delta:-1});e.sort((s,m)=>s.pos-m.pos);let x=[],b=0;for(let s of e)b+=s.delta,x.push({pos:s.pos,depth:b});function d(s){let m=0,f=x.length-1,y=0;while(m<=f){let h=m+f>>1;if(x[h].pos<=s)y=x[h].depth,m=h+1;else f=h-1}return y}while((c=r.exec(n))!==null){if(d(c.index)>0)continue;let s=c.index,m=c.index+c[0].length-1,f=1,y=m+1,h=-1;while(y<n.length&&f>0){if(n[y]==="(")f++;else if(n[y]===")"){if(f--,f===0){h=y;break}}y++}if(h===-1)continue;let R=n.substring(m+1,h),I=Tt(R);if(!I)continue;let{arrayExpr:v,itemVar:W}=I,S=h+1,A=1,B=S,D=/@forelse\s*\(/g,L=/@endforelse/g,V=-1;while(A>0&&B<n.length){D.lastIndex=B,L.lastIndex=B;let P=D.exec(n),_=L.exec(n);if(!_)break;if(P&&P.index<_.index)A++,B=P.index+P[0].length;else{if(A--,A===0){V=_.index;break}B=_.index+11}}if(V===-1)continue;let O=n.substring(S,V),Z=V+11,U=-1,z=0,N=0;while(N<O.length){let P=O.indexOf("@",N);if(P===-1)break;let _=O.substring(P);if(/^@forelse\s*\(/.test(_))z++,N=P+1;else if(_.startsWith("@endforelse"))z--,N=P+11;else if(z===0&&_.startsWith("@empty")){if(O.length<=P+6||!/[a-z]/i.test(O[P+6])){U=P;break}N=P+1}else N=P+1}if(U===-1)continue;return{start:s,end:Z,arrayExpr:v,itemVar:W,foreachContent:O.substring(0,U),emptyContent:O.substring(U+6)}}return null}function ce(n,r){let c=n;while(!0){let e=xe(c);if(!e)break;let{start:o,end:i,arrayExpr:g,itemVar:x,foreachContent:b,emptyContent:d}=e;try{let s;if(p(g))s=u(g,Object.keys(r))(...Object.values(r));else s=l(g,r);let m;if(!Array.isArray(s)||s.length===0)m=d;else m=`@foreach (${g} as ${x})${b}@endforeach`;c=c.substring(0,o)+m+c.substring(i)}catch(s){let m=s instanceof Error?s.message:String(s),f=a("Forelse",`Error in @forelse(${g} as ${x}): ${m}`,t.EVALUATION_ERROR);c=c.substring(0,o)+f+c.substring(i)}}return c}var fe="<!--stx:foreach-not-iterable:",Ee=/<!--stx:foreach-not-iterable:([^|>]*)\|([^>]*?)-->/g;function _e(n,r){return`${fe}${encodeURIComponent(n)}|${encodeURIComponent(r)}-->`}function $e(n,r){console.warn(`[stx] @foreach(${n}) in ${r}: ${n} is not iterable server-side, so the loop rendered nothing. `+"Values a server loop reads must come from <script server> or the page context \u2014 "+"a plain <script> runs in the browser.")}function Dr(n){if(!n.includes(fe))return n;return n.replace(Ee,(r,c,e)=>($e(decodeURIComponent(c),decodeURIComponent(e)),""))}function qn(n,r,c,e,o=!1){let i=n,g=new Set(r.__stx_client_signal_names||[]);for(let s of Gn(n))g.add(s);if(g.size)r={...r,__stx_client_signal_names:[...g]};i=ce(i,r);function x(s){let m=/@foreach\s*\(/g,f;while((f=m.exec(s))!==null){let y=f.index,h=f.index+f[0].length-1,R=1,I=h+1,v=-1;while(I<s.length&&R>0){if(s[I]==="(")R++;else if(s[I]===")"){if(R--,R===0){v=I;break}}I++}if(v===-1)continue;let W=s.substring(h+1,v),S=Tt(W);if(!S)continue;let A=y,{arrayExpr:B,itemVar:D}=S,L=v+1,V=1,O=L,Z=/@foreach\s*\(/g,U=/@endforeach/g;while(V>0&&O<s.length){Z.lastIndex=O,U.lastIndex=O;let z=Z.exec(s),N=U.exec(s);if(!N)break;if(z&&z.index<N.index)V++,O=z.index+z[0].length;else{if(V--,V===0){let P=s.substring(L,N.index),_=N.index+11;return{start:A,end:_,arrayExpr:B,itemVar:D,content:P}}O=N.index+11}}}return null}function b(s,m){let f=s;while(!0){let y=x(f);if(!y)break;let{start:h,end:R,arrayExpr:I,itemVar:v,content:W}=y;try{let S=I.trim(),A;if(p(S))A=u(S,Object.keys(m))(...Object.values(m));else A=l(S,m);let B=!1;if(!Array.isArray(A))if(A instanceof Map)A=Array.from(A),B=!0;else if(A instanceof Set)A=Array.from(A);else if(typeof A==="string")A=Array.from(A);else if(A&&typeof A==="object"&&!(A instanceof Date)&&!(A instanceof RegExp))A=Object.entries(A),B=!0;else{let _=_e(S,c)+a("Foreach",`Error in @foreach: ${S} is not iterable`,t.TYPE_ERROR);f=f.substring(0,h)+_+f.substring(R);continue}let D=e?.loops?.useAltLoopVariable??pe,L=v.trim(),V=null,O,Z=!1;if(L.includes("=>")){let _=L.split("=>").map((j)=>j.trim());if(_.length===2&&_[0]&&_[1])V=_[0],O=_[1];else O=L}else if(!L.startsWith("[")&&!L.startsWith("{")&&L.includes(",")){let _=L.split(",").map((j)=>j.trim());if(_.length===2&&_[0]&&_[1])O=_[0],V=_[1],Z=!0;else O=L}else O=L;let U="",z=new Set(K(`${I} as ${v}`)),N=A,P=m[ws]??new WeakMap;for(let _=0;_<N.length;_++){let j=N[_],re={index:_,iteration:_+1,first:_===0,last:_===N.length-1,count:N.length},M={...m,loop:re,$loop:re,[ws]:P};if(Array.isArray(m.__stx_client_signal_names))M.__stx_client_signal_names=m.__stx_client_signal_names.filter((H)=>!z.has(H));if(O.startsWith("[")&&O.endsWith("]")){let H=O.slice(1,-1).split(",").map((T)=>T.trim());if(Array.isArray(j))H.forEach((T,X)=>{if(T)M[T]=j[X]});else M[O]=j}else if(O.startsWith("{")&&O.endsWith("}")){let H=O.slice(1,-1).split(",").map((T)=>T.trim()).filter(Boolean);if(j!==null&&typeof j==="object")H.forEach((T)=>{let X=T.indexOf(":"),Q=(X===-1?T:T.slice(0,X)).trim(),se=X===-1?Q:T.slice(X+1).trim();if(Q&&se)M[se]=j[Q]});else M[O]=j}else M[O]=j;if(V)if(!Z&&B&&Array.isArray(j)&&j.length===2)M[V]=j[0],M[O]=j[1];else M[V]=_;let C=ce(W,M);C=qn(C,M,c,e,!0),C=ne(C,M,c),C=le(C,M);let q=C.indexOf(ee),G=C.indexOf(te),Y=q<0?G:G<0?q:Math.min(q,G);if(Y>=0)C=C.slice(0,Y);if(C=k(C,M,c),C=be(C,M),C=me(C,M),C=he(C,M),U+=C,Y>=0&&Y===q)break}f=f.substring(0,h)+U+f.substring(R)}catch(S){let A=a("Foreach",`Error in @foreach(${I.trim()} as ${v.trim()}): ${S instanceof Error?S.message:String(S)}`,t.EVALUATION_ERROR);f=f.substring(0,h)+A+f.substring(R)}}return f}i=b(i,r),i=Ae(i,r,c,e);let d=e?.loops?.maxWhileIterations??de;return i=Oe(i,r,d),o?i:Dr(i)}function Sl(n){let r=/^(\s*)([A-Za-z_$][\w$]*|\[[^\]]*\]|\{[^}]*\})(\s+(?:of|in)\s)/.exec(n);if(!r||/^(?:const|let|var)$/.test(r[2]))return n;return`${r[1]}let ${n.slice(r[1].length)}`}function ge(n){return xs(n)}function Ae(n,r,c,e){let o=n,i=!0;while(i){i=!1;let g=o.match(/@for\s*\(/);if(!g||g.index===void 0)break;let x=g.index,b=x+g[0].length-1,d=w(o,"(",")",b);if(d===-1)break;let s=Sl(o.slice(b+1,d)),m=d+1,f=Wr(o.slice(x),"for","endfor");if(f.length===0)break;let y=f[0].content,h=x+f[0].end;if(!ge(s)){let R=a("For",`Unsafe expression in @for: ${s}`,t.UNSAFE_EXPRESSION);o=o.substring(0,x)+R+o.substring(h),i=!0;continue}try{let R=Re(s),I=/@(?:for|foreach|if|unless)\s*\(/.test(y);if(R.length>0&&I){let D=we({forExpr:s,content:y,iterVarNames:R,context:r,filePath:c,options:e});o=o.substring(0,x)+D+o.substring(h),i=!0;continue}let v=Object.keys(r),W=Object.values(r),S=ae(y),B=Function(...v,"__stxRenderLoopValue",`
3
- let result = '';
4
- for (${s}) {
5
- result += \`${S}\`;
6
- }
7
- return result;
8
- `)(...W,(D,L,V)=>ue(y,D,L,V));o=o.substring(0,x)+B+o.substring(h),i=!0}catch(R){let I=a("For",`Error in @for(${s}): ${R instanceof Error?R.message:String(R)}`,t.EVALUATION_ERROR);o=o.substring(0,x)+I+o.substring(h),i=!0}}return o}function Re(n){let r=n.trim(),c=r.match(/^(?:const|let|var)\s+(\[[^\]]+\]|\{[^}]+\})\s+(?:of|in)\s+/);if(c){let i=c[1];return i.slice(1,-1).split(",").map((x)=>{let b=x.trim();if(!b)return"";let d=b.indexOf(":");if(d>=0&&i.startsWith("{")){let f=b.slice(d+1).trim(),y=f.indexOf("=");return(y>=0?f.slice(0,y):f).trim()}let s=b.indexOf("="),m=(s>=0?b.slice(0,s):b).trim();return/^[A-Za-z_$][\w$]*$/.test(m)?m:""}).filter(Boolean)}let e=r.match(/^(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s+(?:of|in)\s+/);if(e)return[e[1]];let o=r.match(/^(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=[^;]*;/);if(o)return[o[1]];return[]}function we(n){let{forExpr:r,content:c,iterVarNames:e,context:o,filePath:i,options:g}=n,x=Object.keys(o),b=Object.values(o),d=i??"inline.stx",s="";return Function(...x,"__renderIteration",`
9
- for (${r}) {
10
- if (!__renderIteration([${e.join(", ")}])) break;
11
- }
12
- `)(...b,(f)=>{let y={...o};e.forEach((W,S)=>{y[W]=f[S]});let h=qn(c,y,d,g,!0);h=ne(h,y,d),h=le(h,y);let R=h.indexOf(ee),I=h.indexOf(te),v=R<0?I:I<0?R:Math.min(R,I);if(v>=0)h=h.slice(0,v);return s+=k(h,y,d),v<0||v!==R}),s}function Oe(n,r,c){let e=n,o=!0;while(o){o=!1;let i=e.match(/@while\s*\(/);if(!i||i.index===void 0)break;let g=i.index,x=g+i[0].length-1,b=w(e,"(",")",x);if(b===-1)break;let d=e.slice(x+1,b),s=Wr(e.slice(g),"while","endwhile");if(s.length===0)break;let m=s[0].content,f=g+s[0].end;if(!ge(d)){let y=a("While",`Unsafe expression in @while: ${d}`,t.UNSAFE_EXPRESSION);e=e.substring(0,g)+y+e.substring(f),o=!0;continue}try{let y=Object.keys(r),h=Object.values(r),R=ae(m),v=Function(...y,"__stxRenderLoopValue",`
13
- let result = '';
14
- let maxIterations = ${c}; // Configurable safety limit
15
- let counter = 0;
16
- while (${d} && counter < maxIterations) {
17
- counter++;
18
- result += \`${R}\`;
19
- }
20
- if (counter > maxIterations) {
21
- result += '<!-- [While Error [1104]]: Maximum iterations (${c}) exceeded in while loop. Configure via options.loops.maxWhileIterations -->';
22
- }
23
- return result;
24
- `)(...h,(W,S,A)=>ue(m,W,S,A));e=e.substring(0,g)+v+e.substring(f),o=!0}catch(y){let h=a("While",`Error in @while(${d}): ${y instanceof Error?y.message:String(y)}`,t.EVALUATION_ERROR);e=e.substring(0,g)+h+e.substring(f),o=!0}}return e}
25
- export{Dr,qn,Sl};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Oi,Lc}from"./chunk-fw413k9q.js";import"./chunk-t79jfpv6.js";import"./chunk-a4p18ybc.js";export{Lc as createImageHandler,Oi as handleImageRequest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ye,ys,su,Pp,ou,Ip,It,d,z,J,fn,ve,iu,jo,au,Op,k,cu,Np,_,Dp}from"./chunk-f9zyf9n6.js";import"./chunk-mwnhdsbp.js";import"./chunk-25zmy8q6.js";import"./chunk-bsajk82t.js";import"./chunk-ce6zddpf.js";import"./chunk-zp79zkkd.js";export{cu as applyFilters,Ip as clearCustomFilters,iu as clientLoopScopes,ys as defaultFilters,fn as escapeAttributeValue,d as escapeHtml,z as escapeHtmlValue,J as escapeInterpolatedHtmlValue,_ as evaluateExpression,ye as findMustacheEnd,ou as getAllFilters,au as interpolateScriptAttributes,jo as interpolateScriptExpressions,Op as interpolateScriptsInTemplate,k as processExpressions,su as registerFilter,Pp as registerFilters,It as replaceInterpolations,Np as resetRejectedExpressionWarnings,Dp as unescapeHtml,ve as usesSignalsInScript};