@stacksjs/stx 0.2.859 → 0.2.862

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 (288) hide show
  1. package/dist/analytics.js +3 -2
  2. package/dist/animation.js +3 -3
  3. package/dist/app-shell.js +4 -3
  4. package/dist/{chunk-14cvwsy1.js → chunk-01c16zw4.js} +2 -2
  5. package/dist/chunk-0bfgsv31.js +2 -0
  6. package/dist/chunk-0c9c9v03.js +14 -0
  7. package/dist/{chunk-wjamjgx6.js → chunk-0fh47gp0.js} +2 -2
  8. package/dist/chunk-0fpx3ctt.js +2 -0
  9. package/dist/chunk-0twkeh31.js +2 -0
  10. package/dist/chunk-0xtda6aw.js +2 -0
  11. package/dist/chunk-12sv6b9c.js +2 -0
  12. package/dist/chunk-194t5qat.js +2 -0
  13. package/dist/chunk-1crn4fv0.js +2 -0
  14. package/dist/chunk-1d3swbqw.js +2 -0
  15. package/dist/{chunk-4yfbd8ny.js → chunk-1mqcttg3.js} +6 -6
  16. package/dist/chunk-1qf07v41.js +2 -0
  17. package/dist/chunk-24hq8mka.js +3 -0
  18. package/dist/chunk-2asyyky3.js +2 -0
  19. package/dist/chunk-2dpessnc.js +54 -0
  20. package/dist/{chunk-ews9yzr7.js → chunk-2jgtfjyr.js} +5 -5
  21. package/dist/chunk-2kfayg4t.js +712 -0
  22. package/dist/chunk-2rff5mbj.js +4 -0
  23. package/dist/chunk-2s7rmn9r.js +3 -0
  24. package/dist/{chunk-v9h7s8ce.js → chunk-2srjavsn.js} +2 -2
  25. package/dist/chunk-2zqh7xct.js +2 -0
  26. package/dist/chunk-321fbxnm.js +1327 -0
  27. package/dist/chunk-3gk1e2b1.js +2 -0
  28. package/dist/chunk-3ryp43f3.js +2 -0
  29. package/dist/{chunk-12r22pf0.js → chunk-3z1mmar2.js} +2 -2
  30. package/dist/{chunk-zhxdpzga.js → chunk-46ddesnf.js} +3 -3
  31. package/dist/chunk-46pxmpeb.js +3 -0
  32. package/dist/chunk-4pr29yrx.js +2 -0
  33. package/dist/{chunk-wfd9e224.js → chunk-4xanjv22.js} +125 -126
  34. package/dist/chunk-4ykgjewy.js +16 -0
  35. package/dist/{chunk-ftwdjgzd.js → chunk-55zq2ha8.js} +5 -5
  36. package/dist/{chunk-9a3rv0rj.js → chunk-5a0d3048.js} +3 -3
  37. package/dist/chunk-5ertqfs3.js +2 -0
  38. package/dist/chunk-627hzzs3.js +2 -0
  39. package/dist/chunk-64ebysb4.js +2 -0
  40. package/dist/{chunk-k8pzk8v9.js → chunk-669b2bya.js} +4 -4
  41. package/dist/{chunk-ktnb1j54.js → chunk-67dgp45w.js} +2 -2
  42. package/dist/chunk-6fstz73t.js +2 -0
  43. package/dist/{chunk-gndxakrh.js → chunk-6ftee542.js} +2 -2
  44. package/dist/{chunk-5wr1qqz3.js → chunk-6k4ac74t.js} +2 -2
  45. package/dist/{chunk-astcp7bc.js → chunk-6m63rc7m.js} +8 -8
  46. package/dist/{chunk-q3cyycnh.js → chunk-6m6y9bbx.js} +1 -1
  47. package/dist/chunk-6pczzq5f.js +2 -0
  48. package/dist/{chunk-6t0xy3wk.js → chunk-7ayvybdy.js} +3 -3
  49. package/dist/chunk-7mjf144y.js +2 -0
  50. package/dist/{chunk-9qe4qsc7.js → chunk-7mpqfg98.js} +21 -21
  51. package/dist/chunk-7q5h2cve.js +2 -0
  52. package/dist/chunk-7wqevtks.js +2 -0
  53. package/dist/chunk-84ztb43k.js +2 -0
  54. package/dist/{chunk-6e44f8w8.js → chunk-8502xb4n.js} +39 -39
  55. package/dist/{chunk-ywk6t76q.js → chunk-85j9qh7v.js} +45 -46
  56. package/dist/{chunk-cxpq2zna.js → chunk-8arfg8kp.js} +3 -3
  57. package/dist/{chunk-33x46g87.js → chunk-8hhhmscy.js} +2 -2
  58. package/dist/{chunk-x9c4njvx.js → chunk-8me8hamk.js} +2 -2
  59. package/dist/{chunk-pb09xy77.js → chunk-8s6s6nd0.js} +2 -2
  60. package/dist/chunk-8v1zpdef.js +2 -0
  61. package/dist/chunk-94mpe1ny.js +3 -0
  62. package/dist/chunk-94wnfxnd.js +2 -0
  63. package/dist/chunk-9jxs8sw2.js +2 -0
  64. package/dist/{chunk-2w7csg0c.js → chunk-9y9jecky.js} +1 -1
  65. package/dist/{chunk-mzes9ds7.js → chunk-9zrvh3pz.js} +2 -2
  66. package/dist/{chunk-hf9pvmq2.js → chunk-adb045wf.js} +3 -3
  67. package/dist/{chunk-fpkp0bqf.js → chunk-adqh1gp1.js} +1 -1
  68. package/dist/chunk-az5xw3w8.js +2 -0
  69. package/dist/chunk-ba91r7q9.js +2 -0
  70. package/dist/{chunk-qkcn0exq.js → chunk-brzjass3.js} +6 -6
  71. package/dist/chunk-bv7g3b3b.js +2 -0
  72. package/dist/chunk-bwdbj60y.js +3 -0
  73. package/dist/chunk-bwz2ehq9.js +33 -0
  74. package/dist/{chunk-ts4t2n6b.js → chunk-bx5d87xx.js} +6 -7
  75. package/dist/chunk-bz6dg4k8.js +3 -0
  76. package/dist/chunk-c34qn4k8.js +16 -0
  77. package/dist/{chunk-0es47pwe.js → chunk-cqhwzd9y.js} +5 -5
  78. package/dist/chunk-cvgbtmxp.js +2 -0
  79. package/dist/chunk-czpn3n1p.js +2 -0
  80. package/dist/chunk-dhnw2qwq.js +25 -0
  81. package/dist/{chunk-3w3fxcyx.js → chunk-dpmayc2w.js} +2 -2
  82. package/dist/{chunk-6mza6zr3.js → chunk-dtarm8x9.js} +9 -9
  83. package/dist/chunk-dydy9zrq.js +3 -0
  84. package/dist/chunk-eafqxbr0.js +2 -0
  85. package/dist/{chunk-52b6czss.js → chunk-eeq8k81z.js} +155 -157
  86. package/dist/{chunk-26jt4jvh.js → chunk-ew5cey88.js} +1 -1
  87. package/dist/chunk-fa97kz5j.js +2 -0
  88. package/dist/{chunk-xppm4cs4.js → chunk-farh4p7f.js} +3 -3
  89. package/dist/{chunk-3248qphb.js → chunk-fnxg6134.js} +10 -10
  90. package/dist/chunk-g075cc67.js +2 -0
  91. package/dist/{chunk-618t6hxp.js → chunk-g5xth2yx.js} +6 -6
  92. package/dist/{chunk-xpg52hsz.js → chunk-gbtbfg7e.js} +3 -3
  93. package/dist/{chunk-xytq7q8j.js → chunk-gd56arnm.js} +2 -2
  94. package/dist/chunk-gmm3kffd.js +2 -0
  95. package/dist/{chunk-dbm963p9.js → chunk-gp8hgpt9.js} +4 -4
  96. package/dist/chunk-h2qgqjkn.js +2 -0
  97. package/dist/chunk-h65shwe9.js +2 -0
  98. package/dist/chunk-hdjn7nw9.js +20 -0
  99. package/dist/{chunk-yd6ej23e.js → chunk-hev4t4d5.js} +6 -6
  100. package/dist/chunk-hf5fj7pr.js +2 -0
  101. package/dist/{chunk-cj9rev2p.js → chunk-hmdkf6c6.js} +2 -2
  102. package/dist/chunk-hsp9h3jn.js +2 -0
  103. package/dist/{chunk-p9jfn4yh.js → chunk-j1efsjsb.js} +5 -5
  104. package/dist/chunk-j4zrq17p.js +2 -0
  105. package/dist/chunk-jx5mss16.js +2 -0
  106. package/dist/chunk-jz84z19v.js +2 -0
  107. package/dist/{chunk-5rxks14t.js → chunk-k32q90b2.js} +2 -2
  108. package/dist/{chunk-4a0x737h.js → chunk-kbdz4762.js} +8 -8
  109. package/dist/chunk-kw11yydy.js +2 -0
  110. package/dist/{chunk-v4rrgphj.js → chunk-kwk3kxrx.js} +3 -3
  111. package/dist/chunk-kyer53x3.js +2 -0
  112. package/dist/chunk-m9cperj4.js +2 -0
  113. package/dist/{chunk-fxxh149b.js → chunk-mcnwvh06.js} +6 -6
  114. package/dist/chunk-meqsd5bt.js +2 -0
  115. package/dist/{chunk-s4592dy0.js → chunk-mfa07erx.js} +16 -16
  116. package/dist/chunk-mj4wbrw7.js +2 -0
  117. package/dist/{chunk-0yw86e75.js → chunk-mjy98ppb.js} +9 -9
  118. package/dist/{chunk-jh2v1vvb.js → chunk-mrh08821.js} +3 -3
  119. package/dist/{chunk-gq9h36jf.js → chunk-n058hznh.js} +5 -5
  120. package/dist/{chunk-9n8t7v78.js → chunk-n3jw3xpj.js} +2 -2
  121. package/dist/chunk-nz9z3ct9.js +2 -0
  122. package/dist/chunk-p0tkhd12.js +2 -0
  123. package/dist/chunk-p2etn78y.js +2 -0
  124. package/dist/{chunk-1nankvf6.js → chunk-pbakxcv8.js} +2 -2
  125. package/dist/{chunk-t5q31st4.js → chunk-q1wxgw5s.js} +2 -2
  126. package/dist/chunk-qa5y30sy.js +72 -0
  127. package/dist/{chunk-m1qqqc2j.js → chunk-qbghf76y.js} +4 -4
  128. package/dist/{chunk-a9c3gndq.js → chunk-qcxrcypb.js} +2 -2
  129. package/dist/{chunk-fkh4xece.js → chunk-qjey0jk6.js} +2 -2
  130. package/dist/chunk-rqa92xm4.js +2 -0
  131. package/dist/chunk-rvhrtnv3.js +12 -0
  132. package/dist/{chunk-7m17m22p.js → chunk-s0sad753.js} +2 -2
  133. package/dist/chunk-s92j8k4z.js +2 -0
  134. package/dist/chunk-s9df8srx.js +6 -0
  135. package/dist/{chunk-rgjjt1mb.js → chunk-sb8n32rn.js} +1 -1
  136. package/dist/chunk-snz2cxqv.js +2 -0
  137. package/dist/{chunk-14h4n1sj.js → chunk-srgnevws.js} +2 -2
  138. package/dist/chunk-srgpz94e.js +42 -0
  139. package/dist/{chunk-2sq9pdg3.js → chunk-tnp2ta5q.js} +2 -2
  140. package/dist/{chunk-5t1k0dxm.js → chunk-v37zmez0.js} +2 -2
  141. package/dist/chunk-v408qsze.js +2 -0
  142. package/dist/{chunk-qgxwf9xr.js → chunk-v4xes880.js} +3 -3
  143. package/dist/chunk-vfx1p83g.js +33 -0
  144. package/dist/chunk-vk98r75z.js +2 -0
  145. package/dist/{chunk-ypgegzh2.js → chunk-vvzys1x7.js} +3 -3
  146. package/dist/{chunk-f1vvhbmw.js → chunk-w6pzkcjp.js} +2 -2
  147. package/dist/chunk-x0s68p47.js +2 -0
  148. package/dist/{chunk-g17q4y5k.js → chunk-x512h2gv.js} +4 -4
  149. package/dist/{chunk-shke1fcm.js → chunk-x7redxyd.js} +4 -4
  150. package/dist/chunk-xjxcwrqs.js +2 -0
  151. package/dist/chunk-xsq2jf96.js +2 -0
  152. package/dist/chunk-xymr4ys9.js +3 -0
  153. package/dist/{chunk-wdcz6d20.js → chunk-y3qg95wa.js} +8 -8
  154. package/dist/chunk-y7f2x57s.js +2 -0
  155. package/dist/chunk-ymdw4fhd.js +3 -0
  156. package/dist/chunk-ymjjn9pw.js +20 -0
  157. package/dist/chunk-ynkbv9jq.js +4 -0
  158. package/dist/{chunk-49j3cn9h.js → chunk-ysfeg3cn.js} +2 -2
  159. package/dist/chunk-ytzzth34.js +2 -0
  160. package/dist/chunk-yxpjj003.js +2 -0
  161. package/dist/chunk-z1rs6b4x.js +2 -0
  162. package/dist/{chunk-yehdcjn1.js → chunk-z512gt4v.js} +3 -3
  163. package/dist/chunk-z6ntmv5x.js +2 -0
  164. package/dist/{chunk-5n7m8vqx.js → chunk-zbvfjm4a.js} +2 -2
  165. package/dist/chunk-zsnmk5me.js +2 -0
  166. package/dist/cli.js +35 -35
  167. package/dist/craft-entry.js +2 -2
  168. package/dist/craft.js +2 -2
  169. package/dist/dev-server/serve-app.js +3 -2
  170. package/dist/dev-server/serve-multi.js +3 -4
  171. package/dist/dev-server/ts-css.js +4 -5
  172. package/dist/document-shell.js +4 -3
  173. package/dist/document-tags.d.ts +8 -0
  174. package/dist/document-tags.js +37 -0
  175. package/dist/events.js +2 -1
  176. package/dist/head-injection.js +2 -1
  177. package/dist/heatmap.js +2 -1
  178. package/dist/hot-reload.js +3 -1
  179. package/dist/index.d.ts +1 -0
  180. package/dist/index.js +1 -0
  181. package/dist/native-build.js +3 -3
  182. package/dist/process.js +5 -6
  183. package/dist/production-build.js +3 -3
  184. package/dist/pwa/inject.js +3 -3
  185. package/dist/pwa.js +3 -3
  186. package/dist/reactive-bindings.js +2 -1
  187. package/dist/reactive.js +2 -1
  188. package/dist/render.js +2 -6
  189. package/dist/runtime-injection.js +6 -6
  190. package/dist/serve.js +2 -6
  191. package/dist/site-builder/build.js +2 -2
  192. package/dist/site-builder/i18n.js +2 -2
  193. package/dist/site-builder/router.js +2 -5
  194. package/dist/site-builder/theme.js +2 -2
  195. package/dist/ssg.js +30 -31
  196. package/dist/template-hydrator.js +2 -1
  197. package/dist/web-components/css-scoping.js +3 -3
  198. package/dist/x-element.js +2 -1
  199. package/package.json +5 -5
  200. package/dist/chunk-13fe3avf.js +0 -2
  201. package/dist/chunk-1hebvmaj.js +0 -2
  202. package/dist/chunk-1p47cg0g.js +0 -2
  203. package/dist/chunk-1v95w26e.js +0 -20
  204. package/dist/chunk-1z46g29d.js +0 -2
  205. package/dist/chunk-228cbw2p.js +0 -2
  206. package/dist/chunk-2bggrzv0.js +0 -2
  207. package/dist/chunk-2dnd2s2a.js +0 -3
  208. package/dist/chunk-2kc0vsnb.js +0 -54
  209. package/dist/chunk-34rh88vd.js +0 -2
  210. package/dist/chunk-3cqp0m62.js +0 -2
  211. package/dist/chunk-3dtzcc9j.js +0 -2
  212. package/dist/chunk-3rgqrs3c.js +0 -2
  213. package/dist/chunk-403a4pqm.js +0 -25
  214. package/dist/chunk-51kb36f7.js +0 -2
  215. package/dist/chunk-53ezn1tw.js +0 -2
  216. package/dist/chunk-5va6c7jf.js +0 -14
  217. package/dist/chunk-636j1nmd.js +0 -2
  218. package/dist/chunk-6w5a5ns4.js +0 -18
  219. package/dist/chunk-756rpwn0.js +0 -2
  220. package/dist/chunk-7pq02v7n.js +0 -2
  221. package/dist/chunk-7sht1rkv.js +0 -2
  222. package/dist/chunk-7trdtz0c.js +0 -3
  223. package/dist/chunk-7ycmnsh5.js +0 -2
  224. package/dist/chunk-8mdhencj.js +0 -42
  225. package/dist/chunk-9nh48zvm.js +0 -72
  226. package/dist/chunk-9rgp005c.js +0 -2
  227. package/dist/chunk-9xr628ew.js +0 -3
  228. package/dist/chunk-aq8r4rbs.js +0 -3
  229. package/dist/chunk-azvx5gaa.js +0 -2
  230. package/dist/chunk-b1kc0ka1.js +0 -712
  231. package/dist/chunk-ebk1723c.js +0 -2
  232. package/dist/chunk-emc7zqry.js +0 -2
  233. package/dist/chunk-eppv6knk.js +0 -2
  234. package/dist/chunk-f18rxz70.js +0 -2
  235. package/dist/chunk-f935fec7.js +0 -2
  236. package/dist/chunk-g0v1shhr.js +0 -2
  237. package/dist/chunk-g5pg0pg1.js +0 -2
  238. package/dist/chunk-g8x32bq2.js +0 -2
  239. package/dist/chunk-g978f9qg.js +0 -18
  240. package/dist/chunk-hk7vjyqa.js +0 -2
  241. package/dist/chunk-jd4dr23j.js +0 -3
  242. package/dist/chunk-jhm1228j.js +0 -4
  243. package/dist/chunk-jmaw2cdt.js +0 -2
  244. package/dist/chunk-jw75rmpw.js +0 -2
  245. package/dist/chunk-kgrvvtcy.js +0 -3
  246. package/dist/chunk-kpsxhm4x.js +0 -33
  247. package/dist/chunk-kvc9cwvx.js +0 -12
  248. package/dist/chunk-m3fq72f8.js +0 -2
  249. package/dist/chunk-n54twtm7.js +0 -2
  250. package/dist/chunk-np6y9evb.js +0 -2
  251. package/dist/chunk-p95fsnbk.js +0 -2
  252. package/dist/chunk-pk0mxjxw.js +0 -2
  253. package/dist/chunk-q87hkwfg.js +0 -3
  254. package/dist/chunk-q9r13taa.js +0 -2
  255. package/dist/chunk-qd87dk1d.js +0 -1329
  256. package/dist/chunk-qe6631me.js +0 -2
  257. package/dist/chunk-qqjhq0hb.js +0 -2
  258. package/dist/chunk-qsjkewah.js +0 -2
  259. package/dist/chunk-qttq8cje.js +0 -2
  260. package/dist/chunk-qw80eta1.js +0 -2
  261. package/dist/chunk-r51bfc2y.js +0 -2
  262. package/dist/chunk-rbrvepr3.js +0 -2
  263. package/dist/chunk-rwxg4m3h.js +0 -3
  264. package/dist/chunk-se4ny3q0.js +0 -2
  265. package/dist/chunk-shy2hkvj.js +0 -2
  266. package/dist/chunk-sxvv9w8t.js +0 -2
  267. package/dist/chunk-sy703233.js +0 -2
  268. package/dist/chunk-syzn6mq5.js +0 -2
  269. package/dist/chunk-t2nhr2tc.js +0 -2
  270. package/dist/chunk-tc31my2p.js +0 -20
  271. package/dist/chunk-v3r1wwec.js +0 -2
  272. package/dist/chunk-vd5d1yb9.js +0 -2
  273. package/dist/chunk-vj1bwnvs.js +0 -4
  274. package/dist/chunk-vmdsj8r5.js +0 -2
  275. package/dist/chunk-vmg3f76h.js +0 -2
  276. package/dist/chunk-w1d8t47c.js +0 -33
  277. package/dist/chunk-w1stsxm3.js +0 -3
  278. package/dist/chunk-w63c96ce.js +0 -2
  279. package/dist/chunk-wcgca1q6.js +0 -2
  280. package/dist/chunk-wv8qmwqp.js +0 -2
  281. package/dist/chunk-x90f7h2g.js +0 -2
  282. package/dist/chunk-xhnpgey5.js +0 -2
  283. package/dist/chunk-y54pj23g.js +0 -2
  284. package/dist/chunk-yhrkqcqd.js +0 -2
  285. package/dist/chunk-ykxpzjgy.js +0 -2
  286. package/dist/chunk-zhyrhxdp.js +0 -2
  287. package/dist/chunk-zn5tewws.js +0 -2
  288. package/dist/chunk-zvra3bmk.js +0 -2
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import"./chunk-9nh48zvm.js";import{no,ji,$l}from"./chunk-fkh4xece.js";import"./chunk-xppm4cs4.js";import"./chunk-b1kc0ka1.js";import"./chunk-5rxks14t.js";import"./chunk-wjamjgx6.js";import"./chunk-2sq9pdg3.js";import"./chunk-g17q4y5k.js";import{_s,a}from"./chunk-wfd9e224.js";import"./chunk-s4592dy0.js";import"./chunk-k8pzk8v9.js";import"./chunk-w1stsxm3.js";import{xt,Je,we,dn,Ie,ir,ar,Ye}from"./chunk-6w5a5ns4.js";import{i}from"./chunk-qd87dk1d.js";import"./chunk-8mdhencj.js";import"./chunk-2kc0vsnb.js";import{xs}from"./chunk-3248qphb.js";import"./chunk-403a4pqm.js";import"./chunk-t5q31st4.js";import{wt}from"./chunk-9qe4qsc7.js";import"./chunk-mzes9ds7.js";import"./chunk-gq9h36jf.js";import{cs}from"./chunk-tc31my2p.js";import{Hr}from"./chunk-6t0xy3wk.js";import{zr,co,lo}from"./chunk-618t6hxp.js";import"./chunk-2dnd2s2a.js";import"./chunk-rwxg4m3h.js";import"./chunk-5va6c7jf.js";import"./chunk-1hebvmaj.js";import"./chunk-hf9pvmq2.js";import{existsSync as Me,mkdirSync as Ki,readFileSync as Ji}from"fs";import G from"path";import{existsSync as Wn,mkdirSync as $n,realpathSync as $i,rmSync as jn}from"fs";import H from"path";import le from"path";var zn="data-stx-b",vt=new Set(ji),Un=new Set(no);function De(e){if(e==="ref"||e==="data-stx-ref")return"ref";if(e.startsWith("::"))return null;if(e.startsWith("@bind:")||e.startsWith("x-bind:"))return"attr";if(e.startsWith("@")||e.startsWith(":")){let t=e.slice(1).split(".")[0];if(vt.has(t))return t==="if"?"if":t;if(t==="for"||t==="else"||t==="else-if"||t==="elseif")return"for";if($l(t))return"event";if(e.startsWith("@"))return"event";return"attr"}if(e.startsWith("x-")){let t=e.split(".")[0];if(!Un.has(t))return"attr";let n=t.slice(2);if(n==="cloak"||n==="data"||n==="bind")return null;if(n==="tooltip"||n==="tooltip-position")return null;return vt.has(n)?n==="if"?"if":n:"attr"}return null}function Hn(e){let t=[];for(let[n,r]of e){let s=De(n);if(s)t.push({name:n,value:r,kind:s})}return t}var qn=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,Be=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function St(e){let t=[],n=0;return{html:e.replace(qn,(s,o,l)=>{if(!l||!/[:@]|x-/.test(l))return s;let u=[];Be.lastIndex=0;for(let y=Be.exec(l);y;y=Be.exec(l))u.push([y[1],y[2]??y[3]??y[4]??""]);let d=Hn(u);if(!d.length)return s;let f={id:n++,bindings:d};if(d.some((y)=>y.kind==="for"))f.template=!0;t.push(f);let g=s.endsWith("/>");return`${s.slice(0,g?-2:-1).trimEnd()} ${zn}="${f.id}"${g?"/>":">"}`}),manifest:{entries:t}}}function he(e){let t=e&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(e.trim());if(!t)return;let n=Number(t[1])*(t[2]==="rem"?16:1);return Number.isFinite(n)?n:void 0}function Le(e,t){if(!we[e])return;return he(t?.get(dn(e))??we[e].value)}function $e(e,t){let n=ir[e];if(!n)return;return he(t?.get(Ye(n))??Ie[n]?.value)}function je(e,t){let n=ar[e];if(!n)return;let r=he(t?.get(Ye(n.size))??Ie[n.size]?.value),s=he(t?.get(Ye(n.leading))??Ie[n.leading]?.value);if(r===void 0||s===void 0)return;return{fontSize:r,lineHeight:s}}var Gn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Tt=We({}),Nt,kt=null;function ce(){let e=globalThis.__stxNativeStyleConfig;if(!e)return Tt;if(e!==Nt)Nt=e,kt=We(e);return kt}function At(e,t=new Map,n=""){for(let[r,s]of Object.entries(e??{})){let o=r==="DEFAULT"?n.replace(/-$/,""):`${n}${r}`;if(typeof s==="string")t.set(o,s);else if(s&&typeof s==="object")At(s,t,`${o}-`)}return t}function _t(e){let t={};for(let[n,r]of Object.entries(e??{})){let s=typeof r==="number"?r:Number.parseFloat(String(r));if(Number.isFinite(s))t[n]=s}return t}function We(e){return{shortcuts:new Map(Object.entries(e.shortcuts??{}).filter(([,t])=>typeof t==="string")),colors:At(e.colors),fontFamily:new Map(Object.entries(e.fontFamily??{}).map(([t,n])=>[t,Array.isArray(n)?n.join(", "):n])),breakpoints:new Map(Object.entries({...Gn,..._t(e.breakpoints)}))}}var Ve={};function Et(){return ce()}function Rt(e){Ve=e??{},Tt=We(Ve)}async function Ct(e,t){let n=Ve;Rt(e);try{return await t()}finally{Rt(n)}}function Ot(e){if(!e)return{};let t=e.theme??{},n=Object.fromEntries(Object.entries(e.shortcuts??{}).filter(([,r])=>typeof r==="string"));return{...Object.keys(n).length?{shortcuts:n}:{},...t.fontFamily?{fontFamily:JSON.parse(JSON.stringify(t.fontFamily))}:{},...t.colors?{colors:JSON.parse(JSON.stringify(t.colors))}:{},...t.screens?{breakpoints:_t(t.screens)}:{}}}function It(e){return ce().shortcuts.get(e)}function Pt(e){return ce().colors.get(e)}function Fe(e){return ce().breakpoints.get(e)}function me(e){return ce().fontFamily.get(e)}var Bt=/^--[\w\u0080-\uFFFF-]+$/u;function Xe(e,t){if(!/var\(/i.test(e))return e;let n="",r="",s=!1;for(let o=0;o<e.length;o++){let l=e[o];if(l==="\\"){n+=e.slice(o,o+2),o++;continue}if(r){if(n+=l,l===r)r="";continue}if(l==='"'||l==="'"){r=l,n+=l;continue}if(e.slice(o,o+4).toLowerCase()!=="var("||o>0&&/[\w-]/.test(e[o-1])){n+=l;continue}let u=1,d=-1,f="",g=o+4;for(;g<e.length;g++){let m=e[g];if(m==="\\"){g++;continue}if(f){if(m===f)f="";continue}if(m==='"'||m==="'"){f=m;continue}if(m==="(")u++;if(m===")"&&--u===0)break;if(m===","&&u===1&&d===-1)d=g}if(u!==0)return;let h=e.slice(o+4,d===-1?g:d).trim();if(!Bt.test(h))return;let y=t(h,d===-1?void 0:e.slice(d+1,g).trim());if(y===void 0||n.length+y.length>65536)return;n+=y,s=!0,o=g}return s&&n.length>65536?void 0:n}var Mt=new Map;function Kn(e){for(let t=0;t<e.length;t++){let n=e[t][0];if(typeof n==="string"&&n.trim().startsWith("--"))return!0}return!1}function te(e,t){if(!e.length||!Kn(e)){let v=new Set,c=(b,p=0)=>p>64?void 0:Xe(b,(N,S)=>(v.add(N),t?.get(N)??(S===void 0?void 0:c(S,p+1))));return{resolve:c,used:v,computed:()=>t??Mt}}let n=new Map,r=new Set;for(let[v,c]of e){let b=v.trim();if(!Bt.test(b))continue;if(typeof c==="string"||typeof c==="number"&&Number.isFinite(c))n.set(b,String(c).trim())}let s=new Map,o=new Set;for(let[v,c]of n){let b=new Set,p=(N,S=0)=>S>64?void 0:Xe(N,(R,w)=>(b.add(R),w===void 0?"":p(w,S+1)));if(p(c)===void 0)o.add(v);s.set(v,b)}let l=new Map,u=new Map,d=[],f=new Set,g=0;function h(v,c=0){if(c>64){o.add(v);return}l.set(v,g),u.set(v,g++),d.push(v),f.add(v);for(let N of s.get(v)??[]){if(!n.has(N))continue;if(!l.has(N)){if(h(N,c+1),u.has(N))u.set(v,Math.min(u.get(v),u.get(N)))}else if(f.has(N))u.set(v,Math.min(u.get(v),l.get(N)))}if(u.get(v)!==l.get(v))return;let b=[],p;do p=d.pop(),f.delete(p),b.push(p);while(p!==v);if(b.length>1||s.get(v)?.has(v))b.forEach((N)=>o.add(N))}for(let v of n.keys())if(!l.has(v))h(v);let y=new Map;function m(v,c){if(r.add(v),y.has(v))return y.get(v);let b=n.get(v),p=b===void 0||/^(?:inherit|unset)$/i.test(b)?t?.get(v):o.has(v)||/^(?:initial|revert|revert-layer)$/i.test(b)?void 0:x(b,c+1);return y.set(v,p),p}function x(v,c=0){if(c>64)return;return Xe(v,(b,p)=>m(b,c)??(p===void 0?void 0:x(p,c+1)))}return{resolve:x,used:r,computed(){if(!n.size)return t??Mt;let v=new Map(t);for(let c of n.keys())v.set(c,m(c,0));return v}}}function ze(e){if(e.display==="flex"&&e.flexDirection==null)return{...e,flexDirection:"row"};return e}var $t=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","objectPosition","tintColor","transform","overflow","pointerEvents","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),Jn=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"]),Dt=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"]),Lt=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,Yn=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,Qn=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),Zn=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function er(e){if(typeof e!=="string")return e;let t=Yn.exec(e);return t?Number(t[1])*(/^r?em$/i.test(t[2]||"")?16:1):e}function se(e){return typeof e==="number"&&Number.isFinite(e)}function tr(e,t){if(e==="shadowOffset"&&t&&typeof t==="object"&&!Array.isArray(t)){let{width:n,height:r}=t;return se(n)&&se(r)?{width:n,height:r}:void 0}if(e==="transform"&&Array.isArray(t)){let n=[];for(let r of t){if(!r||typeof r!=="object"||Array.isArray(r)||Object.keys(r).length!==1)return;let[s,o]=Object.entries(r)[0];if(Zn.has(s)&&se(o))n.push({[s]:o});else if(Qn.has(s)&&typeof o==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(o))n.push({[s]:o});else return}return n}return}function jt(e){let t=[],n=0,r=0,s="";for(let o=0;o<=e.length;o++){let l=e[o];if(l==="\\"){o++;continue}if(s){if(l===s)s="";continue}if(l==='"'||l==="'"){s=l;continue}if(l==="(")r++;if(l===")")r=Math.max(0,r-1);if(o!==e.length&&(l!==";"||r))continue;let u=e.slice(n,o),d=u.indexOf(":");if(d!==-1)t.push([u.slice(0,d).trim(),u.slice(d+1).trim()]);n=o+1}return t}var ye=new Map;function nr(e,t){if(typeof e==="string"){let n=ye.get(e);if(n)return n;let r=rr(e,t);if(r){if(ye.size>=2000)ye.clear();return ye.set(e,r),r}return[]}return sr(e,t)}function rr(e,t){let n=e.trim();if(!n)return[];try{n=JSON.parse(n)}catch{}if(typeof n==="string")return jt(n);if(n&&typeof n==="object"&&!Array.isArray(n))return Object.entries(n);if(n!=null&&n!==!1)t({kind:"non-numeric-style",name:"style"});return null}function sr(e,t){let n;if(typeof e==="string"){if(e=e.trim(),!e)return[];try{e=JSON.parse(e)}catch{}}if(typeof e==="string")n=jt(e);else if(e&&typeof e==="object"&&!Array.isArray(e))n=Object.entries(e);else{if(e!=null&&e!==!1)t({kind:"non-numeric-style",name:"style"});return[]}return n}function be(e,t=()=>{},n={}){let r=nr(e,t),s=te(r,n.inheritedVariables);return n.onVariables?.(s.computed()),lr(r,s,t)}var ss=Symbol("invalid native structured style");function or(e){return $t.has(e)||e.trim().startsWith("--")?e:e.trim().toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function lr(e,t,n){let r={},s=[];for(let[o,l]of e){if(o.trim().startsWith("--")){s.push(o.trim());continue}let u=or(o);if(!$t.has(u)){n({kind:"unknown-style",name:u});continue}if(l==null||l==="")continue;let d=typeof l==="string"?t.resolve(l.trim()):l;if(d===void 0){n({kind:"non-numeric-style",name:u});continue}if(d==="")continue;if(u==="pointerEvents"){if(typeof d==="string"&&["auto","none","box-none","box-only"].includes(d))r.pointerEvents=d;else n({kind:"unknown-style",name:`pointerEvents:${String(d)}`});continue}if(u==="objectFit"){let g=typeof d==="string"?d.trim().toLowerCase():"";if(["fill","contain","cover","none","scale-down"].includes(g))r.objectFit=g;else n({kind:"unknown-style",name:`objectFit:${String(d)}`});continue}if(u==="objectPosition"){let g=typeof d==="string"?d.trim().toLowerCase().replace(/\s+/g," "):"",h=g.split(" ");if(h.length===1)h.push("center");if(["top","bottom"].includes(h[0])||["left","right"].includes(h[1]))h.reverse();let y=(m)=>m.endsWith("%")&&Lt.test(m.slice(0,-1))&&Number.isFinite(Number(m.slice(0,-1)));if(h.length===2&&(["left","center","right"].includes(h[0])||y(h[0]))&&(["top","center","bottom"].includes(h[1])||y(h[1])))r.objectPosition=g;else n({kind:"unknown-style",name:`objectPosition:${String(d)}`});continue}let f;if(Jn.has(u)||Dt.has(u)){if(f=er(d),!se(f)&&!(Dt.has(u)&&typeof f==="string"&&f.endsWith("%")&&Lt.test(f.slice(0,-1))&&Number.isFinite(Number(f.slice(0,-1)))))f=void 0}else if(u==="display"&&d==="inline-flex")f="flex";else if(u==="shadowOffset"||u==="transform")f=tr(u,d);else if(u==="gridTemplateColumns"||u==="gridTemplateRows")f=se(d)||typeof d==="string"?d:void 0;else if(u==="fontWeight"&&se(d))f=String(d);else if(typeof d==="string")f=d;if(f===void 0)n({kind:"non-numeric-style",name:u});else r[u]=f}for(let o of s)if(!t.used.has(o))n({kind:"unknown-style",name:o});return r}var cr={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"}},qe={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},Vt={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},Wt={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function ne(e){let t=e.lastIndexOf("/");if(t>0&&(!e.endsWith("]")||/\/\[[\d.]+%?\]$/.test(e))){let r=ne(e.slice(0,t)),s=e.slice(t+1),o=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!r||!Number.isFinite(o))return;return ur(r,o/100)}if(e==="transparent")return"transparent";if(e==="current")return"currentColor";if(e==="black")return"#000000";if(e==="white")return"#ffffff";let n=e.split("-");if(n.length===2){let[r,s]=n,o=cr[r];if(o&&typeof o==="object")return o[s]}if(e.startsWith("[")&&e.endsWith("]")){let r=e.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(r)?r:void 0}return}function Ge(e){return ne(e.trim())}function ur(e,t){if(e==="transparent")return e;let n=e.startsWith("#")?e.slice(1):"";if(n.length===3)n=n.split("").map((s)=>s+s).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,t))*255);return`#${n}${r.toString(16).padStart(2,"0")}`}function He(e,t=16){if(!e.startsWith("[")||!e.endsWith("]"))return;let n=e.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*t;return r}function X(e){if(e.startsWith("[")&&e.endsWith("]")){let t=e.slice(1,-1);if(t.endsWith("%"))return;let n=t.endsWith("rem")?Number.parseFloat(t)*16:Number.parseFloat(t);return Number.isFinite(n)?n:void 0}return qe[e]??$e(e)}function Ne(e){let t=/^\[(-?\d*\.?\d+)%\]$/.exec(e);if(t)return`${Number.parseFloat(t[1])}%`;return X(e)}var dr={flex:(e,t)=>(t.display="flex",!0),block:(e,t)=>(t.display="flex",!0),hidden:(e,t)=>(t.display="none",!0),grid:(e,t)=>(t.display="grid",!0),"flex-row":(e,t)=>(t.flexDirection="row",!0),"flex-col":(e,t)=>(t.flexDirection="column",!0),"flex-row-reverse":(e,t)=>(t.flexDirection="row-reverse",!0),"flex-col-reverse":(e,t)=>(t.flexDirection="column-reverse",!0),"flex-wrap":(e,t)=>(t.flexWrap="wrap",!0),"flex-nowrap":(e,t)=>(t.flexWrap="nowrap",!0),"flex-wrap-reverse":(e,t)=>(t.flexWrap="wrap-reverse",!0),"flex-1":(e,t)=>(t.flex=1,t.flexGrow=1,t.flexShrink=1,t.flexBasis=0,!0),"flex-auto":(e,t)=>(t.flexGrow=1,t.flexShrink=1,!0),"flex-initial":(e,t)=>(t.flexGrow=0,t.flexShrink=1,!0),"flex-none":(e,t)=>(t.flexGrow=0,t.flexShrink=0,!0),grow:(e,t)=>(t.flexGrow=1,!0),"grow-0":(e,t)=>(t.flexGrow=0,!0),shrink:(e,t)=>(t.flexShrink=1,!0),"shrink-0":(e,t)=>(t.flexShrink=0,!0),"order-first":(e,t)=>(t.order=-9999,!0),"order-last":(e,t)=>(t.order=9999,!0),"order-none":(e,t)=>(t.order=0,!0),"justify-start":(e,t)=>(t.justifyContent="flex-start",!0),"justify-center":(e,t)=>(t.justifyContent="center",!0),"justify-end":(e,t)=>(t.justifyContent="flex-end",!0),"justify-between":(e,t)=>(t.justifyContent="space-between",!0),"justify-around":(e,t)=>(t.justifyContent="space-around",!0),"justify-evenly":(e,t)=>(t.justifyContent="space-evenly",!0),"items-start":(e,t)=>(t.alignItems="flex-start",!0),"items-center":(e,t)=>(t.alignItems="center",!0),"items-end":(e,t)=>(t.alignItems="flex-end",!0),"items-stretch":(e,t)=>(t.alignItems="stretch",!0),"items-baseline":(e,t)=>(t.alignItems="baseline",!0),"self-auto":(e,t)=>(t.alignSelf="auto",!0),"self-start":(e,t)=>(t.alignSelf="flex-start",!0),"self-center":(e,t)=>(t.alignSelf="center",!0),"self-end":(e,t)=>(t.alignSelf="flex-end",!0),"self-stretch":(e,t)=>(t.alignSelf="stretch",!0),"self-baseline":(e,t)=>(t.alignSelf="baseline",!0),"min-w-0":(e,t)=>(t.minWidth=0,!0),"aspect-square":(e,t)=>(t.aspectRatio=1,!0),"aspect-video":(e,t)=>(t.aspectRatio=1.7777777777777777,!0),"border-solid":(e,t)=>(t.borderStyle="solid",!0),"border-dashed":(e,t)=>(t.borderStyle="dashed",!0),"border-dotted":(e,t)=>(t.borderStyle="dotted",!0),group:()=>!0,peer:()=>!0,"inset-0":(e,t)=>(t.top=0,t.right=0,t.bottom=0,t.left=0,!0),"mx-auto":(e,t)=>(t.alignSelf="center",!0),fixed:(e,t)=>(t.position="absolute",!0),sticky:()=>!0,"sr-only":(e,t)=>(t.position="absolute",t.width=1,t.height=1,t.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":(e,t)=>(t.letterSpacing=-0.8,!0),"tracking-tight":(e,t)=>(t.letterSpacing=-0.4,!0),"tracking-normal":(e,t)=>(t.letterSpacing=0,!0),"tracking-wide":(e,t)=>(t.letterSpacing=0.4,!0),"tracking-wider":(e,t)=>(t.letterSpacing=0.8,!0),"tracking-widest":(e,t)=>(t.letterSpacing=1.6,!0),"tabular-nums":()=>!0,"inline-flex":(e,t)=>(t.display="flex",!0),truncate:()=>!0,relative:(e,t)=>(t.position="relative",!0),absolute:(e,t)=>(t.position="absolute",!0),"pointer-events-none":(e,t)=>(t.pointerEvents="none",!0),"pointer-events-auto":(e,t)=>(t.pointerEvents="auto",!0),"overflow-visible":(e,t)=>(t.overflow="visible",!0),"overflow-hidden":(e,t)=>(t.overflow="hidden",!0),"overflow-scroll":(e,t)=>(t.overflow="scroll",!0),"overflow-x-auto":()=>!0,"overflow-x-scroll":()=>!0,"overflow-y-auto":()=>!0,"overflow-y-scroll":()=>!0,"font-sans":(e,t)=>(t.fontFamily=me("sans")??"sans-serif",!0),"font-serif":(e,t)=>(t.fontFamily=me("serif")??"serif",!0),"font-mono":(e,t)=>(t.fontFamily=me("mono")??"monospace",!0),"font-thin":(e,t)=>(t.fontWeight="100",!0),"font-extralight":(e,t)=>(t.fontWeight="200",!0),"font-light":(e,t)=>(t.fontWeight="300",!0),"font-normal":(e,t)=>(t.fontWeight="400",!0),"font-medium":(e,t)=>(t.fontWeight="500",!0),"font-semibold":(e,t)=>(t.fontWeight="600",!0),"font-bold":(e,t)=>(t.fontWeight="bold",!0),"font-extrabold":(e,t)=>(t.fontWeight="800",!0),"font-black":(e,t)=>(t.fontWeight="900",!0),italic:(e,t)=>(t.fontStyle="italic",!0),"not-italic":(e,t)=>(t.fontStyle="normal",!0),"text-left":(e,t)=>(t.textAlign="left",!0),"text-center":(e,t)=>(t.textAlign="center",!0),"text-right":(e,t)=>(t.textAlign="right",!0),"text-justify":(e,t)=>(t.textAlign="justify",!0),uppercase:(e,t)=>(t.textTransform="uppercase",!0),lowercase:(e,t)=>(t.textTransform="lowercase",!0),capitalize:(e,t)=>(t.textTransform="capitalize",!0),"normal-case":(e,t)=>(t.textTransform="none",!0),underline:(e,t)=>(t.textDecorationLine="underline",!0),"line-through":(e,t)=>(t.textDecorationLine="line-through",!0),"no-underline":(e,t)=>(t.textDecorationLine="none",!0)};function fr(e,t){if(!e.startsWith("bg-"))return!1;let n=e.slice(3),r=ne(n);if(r)return t.backgroundColor=r,!0;return!1}function Ft(e,t){if(!e.startsWith("text-"))return!1;let n=e.slice(5),r=je(n);if(r)return Object.assign(t,r),!0;if(Vt[n])return t.fontSize=Vt[n],!0;if(n.startsWith("[")&&n.endsWith("]")){let o=n.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(o)){let l=o.endsWith("rem")||o.endsWith("em")?Number.parseFloat(o)*16:Number.parseFloat(o);if(Number.isFinite(l))return t.fontSize=l,!0}}let s=ne(n);if(s)return t.color=s,!0;return!1}var pr=new Set(["t","tr","r","br","b","bl","l","tl"]);function gr(e,t){let n=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(e);if(n&&pr.has(n[1]))return t.gradientDirection=`to-${n[1]}`,!0;let r=/^(from|via|to)-(.+)$/.exec(e);if(!r)return!1;let s=ne(r[2]);if(!s)return!1;if(r[1]==="from")t.gradientFrom=s;else if(r[1]==="via")t.gradientVia=s;else t.gradientTo=s;return!0}function hr(e,t){for(let n of["fill","stroke"]){let r=`${n}-`;if(!e.startsWith(r))continue;let s=e.slice(r.length);if(s==="none")return t[n]="none",!0;if(n==="stroke"&&/^\d+(?:\.\d+)?$/.test(s))return t.strokeWidth=Number.parseFloat(s),!0;if(n==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(s))return t.strokeWidth=Number.parseFloat(s.slice(1)),!0;let o=ne(s);if(o)return t[n]=o,!0}return!1}function mr(e,t){if(e.startsWith("p-")){let n=X(e.slice(2));if(n!==void 0)return t.padding=n,!0}if(e.startsWith("px-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingHorizontal=n,!0}if(e.startsWith("py-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingVertical=n,!0}if(e.startsWith("pt-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingTop=n,!0}if(e.startsWith("pr-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingRight=n,!0}if(e.startsWith("pb-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingBottom=n,!0}if(e.startsWith("pl-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingLeft=n,!0}return!1}function Ht(e,t){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(e)){let n={};if(!Ht(e.slice(1),n))return!1;let r=Object.entries(n);if(r.some(([,s])=>typeof s!=="number"))return!1;for(let[s,o]of r)t[s]=-o;return!0}if(e.startsWith("m-")){let n=X(e.slice(2));if(n!==void 0)return t.margin=n,!0}if(e.startsWith("mx-")){let n=X(e.slice(3));if(n!==void 0)return t.marginHorizontal=n,!0}if(e.startsWith("my-")){let n=X(e.slice(3));if(n!==void 0)return t.marginVertical=n,!0}if(e.startsWith("mt-")){let n=X(e.slice(3));if(n!==void 0)return t.marginTop=n,!0}if(e.startsWith("mr-")){let n=X(e.slice(3));if(n!==void 0)return t.marginRight=n,!0}if(e.startsWith("mb-")){let n=X(e.slice(3));if(n!==void 0)return t.marginBottom=n,!0}if(e.startsWith("ml-")){let n=X(e.slice(3));if(n!==void 0)return t.marginLeft=n,!0}return!1}function yr(e,t){if(!e.startsWith("w-"))return!1;let n=e.slice(2);if(n==="full")return t.width="100%",!0;if(n==="screen")return t.width="100%",!0;if(n==="auto")return t.width="auto",!0;if(n.includes("/")){let[s,o]=n.split("/"),l=Number.parseInt(s)/Number.parseInt(o)*100;return t.width=`${l}%`,!0}let r=Ne(n);if(r!==void 0)return t.width=r,!0;return!1}function br(e,t){if(!e.startsWith("h-"))return!1;let n=e.slice(2);if(n==="full")return t.height="100%",!0;if(n==="screen")return t.height="100%",!0;if(n==="auto")return t.height="auto",!0;let r=Ne(n);if(r!==void 0)return t.height=r,!0;return!1}function vr(e,t){if(e==="rounded")return t.borderRadius=Wt.DEFAULT,!0;if(!e.startsWith("rounded-"))return!1;let n=e.slice(8);if(n==="")return!1;let r=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(n),s=Wt[r[2]]??Le(r[2])??He(r[2]);if(s===void 0)return!1;let o={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]?o[r[1]]:["borderRadius"])t[l]=s;return!0}function Sr(e,t){let n=/^border(?:-([trblxy]))?(?:-(\d+|\[[^\]]+\]))?$/.exec(e);if(!n)return!1;let[,r="",s]=n,o=s===void 0?1:Number(s);if(s?.startsWith("[")){let u=/^\[(\d+(?:\.\d+)?|\.\d+)(px|rem)?\]$/.exec(s);if(!u)return!1;o=Number(u[1])*(u[2]==="rem"?16:1)}if(!Number.isFinite(o)||o<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])t[u]=o;return!0}function wr(e,t){if(!e.startsWith("border-"))return!1;let n=e.slice(7),r=ne(n);if(r)return t.borderColor=r,!0;return!1}function Nr(e,t){if(!e.startsWith("opacity-"))return!1;let n=Number.parseInt(e.slice(8));if(!Number.isNaN(n))return t.opacity=n/100,!0;return!1}function xr(e,t,n){if(e.startsWith("tracking-[")){let r=He(e.slice(9),n);if(r===void 0)return!1;return t.letterSpacing=r,!0}if(e.startsWith("leading-")){let r=e.slice(8),s=n,o={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},l=r.startsWith("[")?/^\[[\d.]+\]$/.test(r)?Number.parseFloat(r.slice(1,-1))*s:He(r,s):o[r]!==void 0?o[r]*s:qe[r];if(l===void 0||!Number.isFinite(l))return!1;return t.lineHeight=l,!0}return!1}function kr(e,t){let n=/^(-?)(inset-x|inset-y|inset|top|right|bottom|left)-(.+)$/.exec(e);if(!n)return!1;let r=n[3],s=/^\[(-?[\d.]+)px\]$/.exec(r),o=s?Number(s[1]):qe[r];if(o===void 0||!Number.isFinite(o))return!1;let l=n[1]?-o:o,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)t[d]=l;return!0}function Rr(e,t){let n=/^grid-cols-\[(.+)\]$/.exec(e);if(n)return t.gridColumns=n[1].split("_").filter(Boolean).length,!0;let r=/^grid-cols-(\d+)$/.exec(e);if(!r)return!1;return t.gridColumns=Number(r[1]),!0}function Tr(e,t){if(!e.startsWith("size-"))return!1;let n=e.slice(5),r=n==="full"?"100%":Ne(n);if(r===void 0)return!1;return t.width=r,t.height=r,!0}var Ar={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function _r(e,t){let n=/^(min|max)-(w|h)-(.+)$/.exec(e);if(!n)return!1;let[,r,s,o]=n,l=o==="full"||o==="screen"?"100%":o==="none"?void 0:s==="w"&&r==="max"&&Ar[o]||Ne(o);if(l===void 0&&o!=="none")return!1;let u=`${r}${s==="w"?"Width":"Height"}`;if(l===void 0)delete t[u];else t[u]=l;return!0}function Er(e,t){let n=/^(-?)(top|right|bottom|left)-(.+)$/.exec(e);if(!n)return!1;let r=n[3]==="full"?"100%":X(n[3]);if(r===void 0)return!1;return t[n[2]]=typeof r==="number"&&n[1]?-r:r,!0}function Cr(e,t){let n=/^(-?)translate-(x|y)-(.+)$/.exec(e);if(!n)return!1;let r=n[3],s;if(r.startsWith("[")){let u=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(r);if(!u)return!1;s=Number(u[1])*(u[2]?.endsWith("em")?16:1)}else s=X(r);if(s===void 0||!Number.isFinite(s))return!1;if(n[1])s=-s;let o=n[2]==="x"?"translateX":"translateY",l=o==="translateX"?{translateX:s}:{translateY:s};return t.transform=[...(t.transform??[]).filter((u)=>!(o in u)),l],!0}function Or(e,t){let n=/^space-(x|y)-(.+)$/.exec(e);if(!n)return!1;let r=X(n[2]);if(r===void 0)return!1;return t.gap=r,!0}function Ir(e,t){if(e.startsWith("gap-")){let n=X(e.slice(4));if(n!==void 0)return t.gap=n,!0}if(e.startsWith("gap-x-")){let n=X(e.slice(6));if(n!==void 0)return t.columnGap=n,!0}if(e.startsWith("gap-y-")){let n=X(e.slice(6));if(n!==void 0)return t.rowGap=n,!0}return!1}function Pr(e,t){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]}[e];if(!r)return!1;let[s,o,l,u]=r;return Object.assign(t,{shadowColor:"#000000",shadowOpacity:l,shadowRadius:s,shadowOffset:{width:0,height:o},elevation:u}),!0}function Mr(e){let t=/^divide-(?:(y|x)(?:-(.+))?|(.+))$/.exec(e);if(!t)return null;if(t[2]==="reverse")return"";if(t[1])return`border-${t[1]==="y"?"t":"l"}${t[2]?`-${t[2]}`:""}`;return`border-${t[3]}`}var qt=new Set(["aria-selected","aria-pressed","aria-checked","aria-expanded"]),Br=new Set(["hover","group-hover","peer-hover","active","group-active","visited","placeholder","selection","print","motion-safe"]),Xt=/^(?: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 Gt(e){let t=[],n=0,r=0;for(let s=0;s<e.length;s++){let o=e[s];if(o==="[")n++;else if(o==="]")n=Math.max(0,n-1);else if(o===":"&&n===0)t.push(e.slice(r,s)),r=s+1}return t.push(e.slice(r)),t}function Kt(e,t=new Set){let n=Gt(e),r=n[n.length-1],s=t.has(r)?void 0:It(r);if(s===void 0)return[e];let o=n.slice(0,-1).map((u)=>`${u}:`).join(""),l=new Set(t).add(r);return s.split(/\s+/).filter(Boolean).flatMap((u)=>Kt(`${o}${u}`,l))}function Ue(e){if(/^transition(?:-(?:all|colors|opacity|shadow|transform))?$/.test(e))return 150;if(e==="transition-none")return 0;let t=/^duration-(\d+)$/.exec(e);return t?Number(t[1]):void 0}var zt=new WeakMap,ve={};function Dr(e,t){let n=Et(),r=zt.get(n);if(!r)zt.set(n,r=new WeakMap);let s=r.get(e??ve);if(!s)r.set(e??ve,s=new WeakMap);let o=s.get(t??ve);if(!o)s.set(t??ve,o=new Map);return o}function xe(e,t={}){return`${t.focus?1:0}${t.focusWithin?1:0}${t.pointer?1:0}${t.appearance??""}|${e}`}function re(e,t,n={}){let r=Dr(t,n.rules),s=xe(e,n),o=r.get(s);if(!o){if(r.size>=4096)r.clear();r.set(s,o=Lr(e,t,n))}return o}function Lr(e,t,n){let r=new Map,s,o,l=(c,b)=>{if(!r.has(c))r.set(c,{...b,classes:[],authored:new Map});return r.get(c)};l("base",{});let u=[],d=[],f=e.split(/\s+/).filter(Boolean);if(n.rules){let c=new Set(f);for(let b of Object.keys(n.rules))if(b.includes(".")&&b.split(".").every((p)=>c.has(p)))d.push(b);d.sort((b,p)=>b.split(".").length-p.split(".").length)}for(let c of f){if(n.rules&&Object.hasOwn(n.rules,c)){u.push(c);continue}for(let b of Kt(c)){let p=Gt(b),N=p.pop(),S=p.some((k)=>k.startsWith("focus"));if(p.some((k)=>/^(?:group-|peer-)?focus(?:-visible|-within)?$/.test(k))&&/^(?:ring|outline)(?:-|$)/.test(N))continue;if(n.pointer&&p.length===0&&Ue(N)!==void 0){if(N.startsWith("duration-"))o=Ue(N);else s=Ue(N);continue}let R=p.filter((k)=>k!=="dark"),w=n.pointer&&R.length===1&&p.length-R.length<=1&&(R[0]==="hover"||R[0]==="active")?R[0]:void 0;if(w&&!Xt.test(N)){let k=l(`pointer:${w}`,{pointerState:w}),T=p.includes("dark")?`dark:${N}`:N;if(k.classes.push(T),!k.authored.has(T))k.authored.set(T,c===b?b:`${c} (${b})`);continue}if(Xt.test(N)||!S&&p.some((k)=>Br.has(k)))continue;let A,I,D=!1,_,L=[];for(let k of p){let T=Fe(k),E=k.startsWith("max-")?Fe(k.slice(4)):void 0;if(T!==void 0&&A===void 0)A=T;else if(E!==void 0&&I===void 0)I=E-0.02;else if(k==="disabled"&&!D)D=!0;else if(qt.has(k)&&_===void 0)_=k;else L.push(k)}let V=[...L,N].join(":"),C=A!==void 0||I!==void 0,O=D?l("disabled",{disabled:!0}):_?l(`state:${_}`,{state:_}):C?l(`range:${A??0}:${I??""}`,{min:A??0,max:I}):r.get("base");if((D||_)&&(C||D&&_)){r.get("base").authored.set(b,c),r.get("base").classes.push(b);continue}if(O.classes.push(V),!O.authored.has(V))O.authored.set(V,c===b?b:`${c} (${b})`)}}let g=[...u,...d],h=(c,b)=>b.map((p)=>c.authored.get(p)??p),y=r.get("base"),m=Se(y.classes.join(" "),t,n),x=new Map;if(g.length){let c=(N)=>N?be(N,()=>{},{inheritedVariables:t}):{},b={},p={};for(let N of g){let S=n.rules[N];b={...b,...c(S.light)},p={...p,...c(S.dark)};for(let R of S.responsive??[]){let w=`${R.min}:${R.max??""}`,A=x.get(w)??{min:R.min,...R.max===void 0?{}:{max:R.max},style:{}};if(A.style={...A.style,...c(R.light)},R.dark)A.dark={...A.dark,...c(R.dark)};x.set(w,A)}}if(m.style={...b,...m.style},Object.keys(p).length)m.dark={...p,...m.dark}}m.unknown=h(y,m.unknown);let v=[];for(let c of r.values()){if(c===y)continue;let b=Se(c.classes.join(" "),t,{appearance:n.appearance});m.unknown=[...new Set([...m.unknown,...h(c,b.unknown)])];let p={style:b.style,...b.dark?{dark:b.dark}:{}};if(c.pointerState)(m.pointer??={})[c.pointerState]=p;else if(c.disabled)m.disabled=p;else if(c.state)(m.states??={})[c.state]=p;else v.push({min:c.min??0,...c.max===void 0?{}:{max:c.max},...p})}for(let c of x.values()){let b=v.find((p)=>p.min===c.min&&p.max===c.max);if(b){if(b.style={...c.style,...b.style},c.dark||b.dark)b.dark={...c.dark,...b.dark}}else v.push(c)}if(v.length)m.responsive=v.sort((c,b)=>c.min-b.min||(c.max??1/0)-(b.max??1/0));if(s!==void 0&&s>0)m.style={...m.style,transitionDuration:o??s};return m}function Se(e,t,n={}){let r=[],s=[],o=[],l=[],u={focus:{classes:[],originals:new Map},focusWithin:{classes:[],originals:new Map}},d=new Map;function f(p,N){let S=/^(bg|text|border(?:-[trblxy])?|from|via|to|fill|stroke|divide|decoration|caret|accent)-(.+?)(\/[^\s]+)?$/.exec(p),R=S&&Pt(S[2]);if(S&&R){let _=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+?)\s*)?\)$/.exec(R),L=_?t?.get(_[1])??_[2]:R;if(L&&/^(?:#[0-9a-f]{3,8}|rgba?\(.+\)|hsla?\(.+\))$/i.test(L))return[`${S[1]}-[${L.replace(/\s+/g,"")}]${S[3]||""}`]}let w=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(p),A=w&&xt[w[2]];if(A){let _=t?.get(Je(w[2]));return[`${w[1]}-${_===void 0?A[N]:`[${_}]`}${w[3]||""}`]}let I=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(p);if(I&&we[I[2]]){let _=Le(I[2],t);return _===void 0?void 0:[`rounded-${I[1]?`${I[1]}-`:""}[${_}px]`]}let D=p.startsWith("text-")?p.slice(5):"";if(ar[D]){let _=je(D,t);return _&&[`text-[${_.fontSize}px]`,`leading-[${_.lineHeight}px]`]}for(let _ of Object.keys(ir)){if(!p.endsWith(`-${_}`))continue;let L=$e(_,t);return L===void 0?void 0:[`${p.slice(0,-_.length)}[${L}px]`]}return[p]}function g(p,N){if(!d.has(p))d.set(p,new Set);return d.get(p).add(N),p}let h=[],y=new Map;for(let p of e.split(/\s+/).filter(Boolean)){let N=p.startsWith("dark:")?p.slice(5):p,S=Mr(N);if(S!==null){let A=S&&`${p===N?"":"dark:"}${S}`;if(A)h.push(A),y.set(A,p);continue}let R=/^(dark:)?(focus|focus-within):(dark:)?(.+)$/.exec(p),w=R?.[2]==="focus"?"focus":"focusWithin";if(R&&n[w]&&!(R[1]&&R[3])){let A=`${R[1]||R[3]?"dark:":""}${R[4]}`,I=u[w];I.classes.push(A),I.originals.set(A,[...I.originals.get(A)??[],p]);continue}if(p.startsWith("dark:")){let A=f(p.slice(5),"dark");if(!A)l.push(p);else s.push(...A.map((I)=>g(I,p)))}else if(!p.includes(":")||p.startsWith("[")){let A=f(p,n.appearance??"light"),I=f(p,"dark");if(!A||!I){l.push(p);continue}if(r.push(...A.map((D)=>g(D,p))),I.join(" ")!==A.join(" "))o.push(...I.map((D)=>g(D,p)))}else l.push(p)}let m=[],x=Ut(r,m),v={style:x,unknown:m},c=[...n.appearance===void 0?o:[],...s];if(c.length)v.dark=Ut(c,m);if(x.transform&&v.dark?.transform){let p=new Set(v.dark.transform.flatMap((N)=>Object.keys(N)));v.dark.transform=[...x.transform.filter((N)=>!Object.keys(N).some((S)=>p.has(S))),...v.dark.transform]}for(let p of r){if(p==="truncate"||p==="whitespace-nowrap")v.numberOfLines=1;let N=/^object-(cover|contain|fill)$/.exec(p);if(N)v.resizeMode=N[1]==="fill"?"stretch":N[1];let S=/^line-clamp-(\d+)$/.exec(p);if(S)v.numberOfLines=Number(S[1]);if(!v.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(p))v.icon=p}let b=m.flatMap((p)=>[...d.get(p)??[p]]);if(v.unknown=[...new Set([...b.filter((p)=>!/^line-clamp-\d+$/.test(p)),...l])],h.length){let p=Se(h.join(" "),t,{appearance:n.appearance});v.divide={style:p.style,...p.dark?{dark:p.dark}:{}},v.unknown=[...new Set([...v.unknown,...p.unknown.map((N)=>y.get(N)??N)])]}for(let p of["focus","focusWithin"]){let N=u[p];if(!N.classes.length)continue;let S=Se(N.classes.join(" "),t,{appearance:n.appearance});v[p]={style:S.style,dark:S.dark},v.unknown=[...new Set([...v.unknown,...S.unknown.flatMap((R)=>N.originals.get(R)??[R])])];for(let R of N.classes)if(/^(?:dark:)?(?:truncate|line-clamp-\d+|i-[a-z0-9]+-.+)$/.test(R))v.unknown.push(...N.originals.get(R))}return v}function Ut(e,t){let n={},r=Array.isArray(e)?e:e.split(/\s+/).filter(Boolean),s={};for(let l of r)if(l.startsWith("text-"))Ft(l,s);let o=typeof s.fontSize==="number"?s.fontSize:16;for(let l of r){if(/^i-[a-z0-9]+-/.test(l))continue;let u=dr[l];if(u){u("",n);continue}if(Pr(l,n))continue;if(gr(l,n))continue;if(fr(l,n))continue;if(hr(l,n))continue;if(Ft(l,n))continue;if(mr(l,n))continue;if(Ht(l,n))continue;if(yr(l,n))continue;if(br(l,n))continue;if(vr(l,n))continue;if(Sr(l,n))continue;if(wr(l,n))continue;if(Nr(l,n))continue;if(Ir(l,n))continue;if(xr(l,n,o))continue;if(Tr(l,n))continue;if(_r(l,n))continue;if(Rr(l,n))continue;let d=/^aspect-\[(\d+(?:\.\d+)?)\/(\d+(?:\.\d+)?)\]$/.exec(l);if(d&&Number(d[2])>0){n.aspectRatio=Number(d[1])/Number(d[2]);continue}let f=/^z-\[(-?\d+)\]$/.exec(l)??/^z-(\d+)$/.exec(l);if(f){n.zIndex=Number(f[1]);continue}if(l==="z-auto")continue;if(kr(l,n))continue;let g=/^order-\[(-?\d+)\]$/.exec(l)??/^order-(-?\d+)$/.exec(l);if(g){n.order=Number(g[1]);continue}if(Er(l,n))continue;if(Cr(l,n))continue;if(Or(l,n))continue;if(t?.push(l),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${l}`)}return n}function Jt(e){let t=new Map,n=(d)=>{if(typeof d==="string")return;if(d._classes)t.set(d._classes,t.get(d._classes)===!0||d.type==="TextInput");for(let f of d.children)n(f)};if(n(e),!t.size)return;let r=[],s=new Map,o=(d)=>{let f=JSON.stringify(d),g=s.get(f);if(g===void 0)g=r.push(d)-1,s.set(f,g);return g},l={entries:r,plain:{},light:{},dark:{}};for(let d of t.keys())l.plain[xe(d)]=o(re(d));let u=e._stylesheetRules;for(let d of["light","dark"]){let f=te(e._stylesheetTheme?.[d]??[]).computed();for(let[g,h]of t){let y=`${g} `;for(let m of[{focus:h,focusWithin:!0,appearance:d,pointer:!1},{focus:h,focusWithin:!0,appearance:d,pointer:!0},{focus:h,focusWithin:!0}])l[d][xe(y,m)]=o(re(y,f,{...m,rules:u}))}}return l}import $r from"path";var Yt=new Map;function Qt(e,t){if(!e)return;let n=e.trim(),r=n.lastIndexOf("-"),s=r===-1?t[n]:t[n.slice(0,r)],o=r===-1?s:s?.[n.slice(r+1)];if(typeof o==="string"&&/^#[\da-f]{3,8}$/i.test(o))return o;return Ge(n)??Ge(`[${n}]`)}function jr(e){let t=e.roles??{},n=e.shapes??{},r=e.density??{},s={...e.theme?.colors,...e.theme?.extend?.colors},o=[],l=[];for(let[u,d]of Object.entries(t)){if(!xt[u])continue;let f=Qt(typeof d==="string"?d:d?.light,s),g=Qt(typeof d==="string"?d:d?.dark,s);if(f)o.push(`${Je(u)}: ${f};`);if(g)l.push(`${Je(u)}: ${g};`)}for(let[u,d]of Object.entries(n))if(we[u])o.push(`${dn(u)}: ${d};`);for(let[u,d]of Object.entries(r))if(Ie[u])o.push(`${Ye(u)}: ${d};`);return[o.length?`:root { ${o.join(" ")} }`:"",l.length?`.dark { ${l.join(" ")} }`:""].filter(Boolean).join(`
3
- `)}async function Vr(e){let{resolveUserCssConfig:t}=await import("./chunk-jmaw2cdt.js"),n=await t(e);return n?jr(n):""}function Zt(e){let t=$r.resolve(e),n=Yt.get(t);if(!n)n=Vr(t).catch(()=>""),Yt.set(t,n);return n}var tn={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},en={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 Ke(e){return e==="role"||e==="aria-label"||e==="aria-valuetext"||e in tn}function Wr(e,t){if(t===void 0||t===null)return;let n=String(t).trim().toLowerCase();if(n==="mixed")return e==="aria-checked"?"mixed":!0;if(n==="undefined")return;return n===""||n==="true"}function Fr(e){if(e===void 0||e===null)return null;for(let t of String(e).trim().toLowerCase().split(/\s+/))if(en[t])return en[t];return null}function Xr(e,t,n){if(e==="aria-label")return{accessibilityLabel:t===void 0||t===null||t===""?null:String(t)};if(e==="aria-valuetext")return{accessibilityValue:t===void 0||t===null||t===""?null:String(t)};if(e==="role")return{accessibilityRole:Fr(t)};let r=tn[e];if(!r)return;let s=n.accessibilityState,o=s&&typeof s==="object"?{...s}:{},l=Wr(e,t);if(l===void 0)delete o[r];else o[r]=l;return{accessibilityState:Object.keys(o).length?o:null}}function Ur(e){let t=e.accessibilityState&&typeof e.accessibilityState==="object"?e.accessibilityState:void 0,n={};for(let[s,o]of Object.entries(e)){if(!Ke(s))continue;let l=Xr(s,o,n);if(l)Object.assign(n,l)}for(let s of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(e[s]===void 0&&n[s]!==void 0&&n[s]!==null)e[s]=n[s];let r=n.accessibilityState;if(r)e.accessibilityState={...r,...t}}var ue=["accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue"];function Qe(e,t){let n=t==="Image";if(!n){let s=Object.keys(e);for(let o=0;o<s.length&&!n;o++)n=Ke(s[o])||ue.includes(s[o])}if(!n)return{};let r={...e};if(Ur(r),t==="Image"&&r.accessibilityLabel===void 0&&e.alt!=null&&e.alt!=="")r.accessibilityLabel=String(e.alt);return Object.fromEntries(ue.filter((s)=>(s in r)).map((s)=>[s,r[s]]))}var rn=["keyboardType","secureTextEntry","returnKeyType","autoCapitalize","autoCorrect","editable","autoComplete"],qr=new Set(["type","inputmode","inputMode","enterkeyhint","enterKeyHint","autoCapitalize","autoCorrect","spellcheck","readonly","readOnly","disabled",...rn]),Gr={numeric:"number-pad",decimal:"decimal-pad",tel:"phone-pad",email:"email-address",url:"url",search:"web-search",text:"default"},Kr={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}},Jr={enter:"default",done:"done",go:"go",next:"next",previous:"default",search:"search",send:"send"};function oe(e){return e===void 0||e===null?"":String(e).trim().toLowerCase()}function nn(e){if(e===void 0||e===null||e===!1)return!1;return oe(e)!=="false"}function Ze(e,...t){for(let n of t)if(e[n]!==void 0&&e[n]!==null)return e[n];return}function sn(e,t){if(e!=="TextInput")return{};let n={},r=oe(t.type),s=Kr[r]??{},o=oe(Ze(t,"inputmode","inputMode")),l=Gr[o]??s.keyboardType;if(l&&l!=="default")n.keyboardType=l;if(s.secure)n.secureTextEntry=!0;let u=oe(Ze(t,"enterkeyhint","enterKeyHint")),d=Jr[u]??s.returnKeyType;if(d&&d!=="default")n.returnKeyType=d;let f=oe(t.autoCapitalize);if(f==="off"||f==="none")n.autoCapitalize="none";else if(f==="on")n.autoCapitalize="sentences";else if(!f&&s.verbatim)n.autoCapitalize="none";let g=t.autoCorrect;if(g==="off"||g==="false"||oe(t.spellcheck)==="false"||g===void 0&&s.verbatim)n.autoCorrect=!1;else if(g==="on"||g==="true")n.autoCorrect=!0;if(nn(Ze(t,"readonly","readOnly"))||nn(t.disabled))n.editable=!1;if(s.autoComplete)n.autoComplete=s.autoComplete;return Object.fromEntries(Object.entries(n).filter(([h])=>t[h]===void 0||Yr(h,t[h])))}function Yr(e,t){if(e==="autoCapitalize")return t==="off"||t==="on";if(e==="autoCorrect")return typeof t==="string";return!1}function on(e){let t=sn(e.type,e.props);if(!Object.keys(t).length)return;e._textEntrySource=Object.fromEntries(rn.filter((n)=>(n in e.props)).map((n)=>[n,e.props[n]])),Object.assign(e.props,t)}var ke={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut","long-press":"onLongPress",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","accept-completion":"onAcceptCompletion",acceptcompletion:"onAcceptCompletion","selection-change":"onSelectionChange",selectionchange:"onSelectionChange","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","page-selected":"onPageSelected",pageselected:"onPageSelected",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",dragstart:"onDragStart","drag-start":"onDragStart",dragover:"onDragOver","drag-over":"onDragOver",dragleave:"onDragLeave","drag-leave":"onDragLeave",drop:"onDrop",dragend:"onDragEnd","drag-end":"onDragEnd","hover-change":"onHoverChange",hoverchange:"onHoverChange",keydown:"onKeyPress",keypress:"onKeyPress"};var tt={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText",animate:"Animate"},nt=new Set(Object.values(tt));var cn=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),un=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight","attributeName","keyTimes","repeatCount"];function z(e){let t=typeof e==="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function Z(e){return Math.round(e*1000)/1000}function rt(e){if(Array.isArray(e)&&e.length===4&&e.every((n)=>Number.isFinite(Number(n))))return e.map(Number);let t=String(e??"").trim().split(/[\s,]+/).map(Number);if(t.length!==4||t.some((n)=>!Number.isFinite(n))||t[2]<=0||t[3]<=0)return null;return t}function Qr(e){let t=String(e??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return t.length%2?t.slice(0,-1):t}var an=/[MLHVCSQTAZ]/i,et=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Zr(e){let t=[],n=e,r=an.exec(n);while(r){let s=r.index;n=n.slice(s);let o=n[0];n=n.slice(1);let l=an.exec(n),u=l?n.slice(0,l.index):n,d;if(o==="A"||o==="a"){d=[];let f=0,g=u.trim(),h=0;while(h<g.length){let y=f%7,m=g.slice(h).replace(/^[\s,]+/,"");if(h=g.length-m.length,!m)break;if(y===3||y===4)d.push(m[0]==="1"?1:0),h+=1;else{et.lastIndex=0;let x=et.exec(m);if(!x||x.index!==0)break;d.push(Number.parseFloat(x[0])),h+=x[0].length}f++}}else d=(u.match(et)||[]).map(Number.parseFloat);t.push({command:o,args:d}),r=l}return t}function ei(e,t,n,r,s,o,l,u,d){if(e===u&&t===d)return[];let f=Math.abs(n),g=Math.abs(r);if(!f||!g)return[1,u,d];let h=s*Math.PI/180,y=Math.cos(h),m=Math.sin(h),x=(e-u)/2,v=(t-d)/2,c=y*x+m*v,b=-m*x+y*v,p=c*c/(f*f)+b*b/(g*g);if(p>1)f*=Math.sqrt(p),g*=Math.sqrt(p);let N=f*f*g*g-f*f*b*b-g*g*c*c,S=f*f*b*b+g*g*c*c,R=Math.sqrt(Math.max(0,N/S));if(o===l)R=-R;let w=R*(f*b)/g,A=R*-(g*c)/f,I=y*w-m*A+(e+u)/2,D=m*w+y*A+(t+d)/2,_=(B,W,P,j)=>{let Y=B*j-W*P<0?-1:1,Q=(B*P+W*j)/(Math.hypot(B,W)*Math.hypot(P,j));return Y*Math.acos(Math.min(1,Math.max(-1,Q)))},L=_(1,0,(c-w)/f,(b-A)/g),V=_((c-w)/f,(b-A)/g,(-c-w)/f,(-b-A)/g);if(!l&&V>0)V-=2*Math.PI;if(l&&V<0)V+=2*Math.PI;let C=Math.max(1,Math.ceil(Math.abs(V)/(Math.PI/2))),O=V/C,k=1.3333333333333333*Math.tan(O/4),T=[],E=(B)=>{let W=f*Math.cos(B),P=g*Math.sin(B);return[y*W-m*P+I,m*W+y*P+D]},M=(B)=>{let W=-f*Math.sin(B),P=g*Math.cos(B);return[y*W-m*P,m*W+y*P]},F=L;for(let B=0;B<C;B++){let W=F+O,[P,j]=E(F),[Y,Q]=M(F),[U,K]=E(W),[ee,q]=M(W);T.push(2,P+k*Y,j+k*Q,U-k*ee,K-k*q,B===C-1?u:U,B===C-1?d:K),F=W}return T}function fn(e){let t=[],n=0,r=0,s=0,o=0,l=0,u=0,d=0,f=0,g="";for(let{command:h,args:y}of Zr(String(e??""))){let m=h===h.toLowerCase(),x=h.toUpperCase(),v=()=>m?n:0,c=()=>m?r:0,b=0,p=(S)=>{if(b+S>y.length)return null;let R=y.slice(b,b+S);return b+=S,R};if(x==="Z"){t.push(4),n=s,r=o,g="Z";continue}let N=!0;while(b<y.length||N&&x==="Z"){switch(x){case"M":{let S=p(2);if(!S)return t;if(n=S[0]+v(),r=S[1]+c(),N)t.push(0,n,r),s=n,o=r;else t.push(1,n,r);g=N?"M":"L";break}case"L":{let S=p(2);if(!S)return t;n=S[0]+v(),r=S[1]+c(),t.push(1,n,r),g="L";break}case"H":{let S=p(1);if(!S)return t;n=S[0]+v(),t.push(1,n,r),g="L";break}case"V":{let S=p(1);if(!S)return t;r=S[0]+c(),t.push(1,n,r),g="L";break}case"C":{let S=p(6);if(!S)return t;let R=S[0]+v(),w=S[1]+c();l=S[2]+v(),u=S[3]+c(),n=S[4]+v(),r=S[5]+c(),t.push(2,R,w,l,u,n,r),g="C";break}case"S":{let S=p(4);if(!S)return t;let R=g==="C"?2*n-l:n,w=g==="C"?2*r-u:r;l=S[0]+v(),u=S[1]+c(),n=S[2]+v(),r=S[3]+c(),t.push(2,R,w,l,u,n,r),g="C";break}case"Q":{let S=p(4);if(!S)return t;d=S[0]+v(),f=S[1]+c(),n=S[2]+v(),r=S[3]+c(),t.push(3,d,f,n,r),g="Q";break}case"T":{let S=p(2);if(!S)return t;d=g==="Q"?2*n-d:n,f=g==="Q"?2*r-f:r,n=S[0]+v(),r=S[1]+c(),t.push(3,d,f,n,r),g="Q";break}case"A":{let S=p(7);if(!S)return t;let R=S[5]+v(),w=S[6]+c();t.push(...ei(n,r,S[0],S[1],S[2],S[3],S[4],R,w)),n=R,r=w,g="A";break}default:return t}N=!1}}return t.map((h)=>Z(h))}function ln(e,t,n,r){if(n<=0||r<=0)return[];let s=0.5522847498;return[0,e+n,t,2,e+n,t+s*r,e+s*n,t+r,e,t+r,2,e-s*n,t+r,e-n,t+s*r,e-n,t,2,e-n,t-s*r,e-s*n,t-r,e,t-r,2,e+s*n,t-r,e+n,t-s*r,e+n,t,4].map(Z)}function it(e,t){switch(e){case"Path":return fn(String(t.d??""));case"Line":return[0,z(t.x1),z(t.y1),1,z(t.x2),z(t.y2)].map(Z);case"Rect":{let n=z(t.x),r=z(t.y),s=z(t.width),o=z(t.height);if(s<=0||o<=0)return[];let l=t.rx===void 0?z(t.ry):z(t.rx),u=t.ry===void 0?l:z(t.ry);if(l=Math.min(Math.max(0,l),s/2),u=Math.min(Math.max(0,u),o/2),!l||!u)return[0,n,r,1,n+s,r,1,n+s,r+o,1,n,r+o,4].map(Z);let d=0.5522847498;return[0,n+l,r,1,n+s-l,r,2,n+s-l+d*l,r,n+s,r+u-d*u,n+s,r+u,1,n+s,r+o-u,2,n+s,r+o-u+d*u,n+s-l+d*l,r+o,n+s-l,r+o,1,n+l,r+o,2,n+l-d*l,r+o,n,r+o-u+d*u,n,r+o-u,1,n,r+u,2,n,r+u-d*u,n+l-d*l,r,n+l,r,4].map(Z)}case"Circle":return ln(z(t.cx),z(t.cy),z(t.r),z(t.r));case"Ellipse":return ln(z(t.cx),z(t.cy),z(t.rx),z(t.ry));case"Polyline":case"Polygon":{let n=Qr(t.points);if(n.length<4)return[];let r=[0,n[0],n[1]];for(let s=2;s<n.length;s+=2)r.push(1,n[s],n[s+1]);if(e==="Polygon")r.push(4);return r.map(Z)}default:return null}}function ti(e){let t=/^\s*(\d+(?:\.\d+)?|\.\d+)\s*(ms|s)?\s*$/.exec(String(e??""));if(!t)return null;let n=Number(t[1])/(t[2]==="ms"?1000:1);return n>0?n:null}function ni(e){if(e.attributeName!=="d")return null;let t=ti(e.dur),n=String(e.values??"").split(";").map((u)=>u.trim()).filter(Boolean);if(t===null||n.length<2)return null;let r=n.map(fn);if(r.some((u)=>!u.length))return null;let s=String(e.keyTimes??"").split(";").map((u)=>u.trim()).filter(Boolean).map(Number),l=s.length===r.length&&s[0]===0&&s[s.length-1]===1&&s.every((u,d)=>Number.isFinite(u)&&(d===0||u>=s[d-1]))?s.map(Z):r.map((u,d)=>Z(d/(r.length-1)));return{frames:r,frameTimes:l,duration:t}}function st(e){let t=ni(e),n={frames:t?.frames??null,frameTimes:t?.frameTimes??null,duration:t?.duration??null};for(let[r,s]of Object.entries(n))if(s===null)delete e[r];else e[r]=s;return n}var ri=[...un,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","barStyle","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","objectFit","objectPosition","onEndReachedThreshold","pageIndex","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","ghostText","rowHeight","labelFontSize","pictureInPicture","transitionID","dragData","dragURL","dropTypes","dropInside","selectTextOnFocus"],pn=new Set(["alwaysBounceHorizontal","alwaysBounceVertical","animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","draggable","dropInside","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"]),ii=new Map(ri.map((e)=>[gn(e),e]));function gn(e){return e.replace(/[-_]/g,"").toLowerCase()}var Re=new Map;function ot(e,t){if((t==="Image"||t==="Video")&&e.toLowerCase()==="src")return"source";let n=Re.get(e);if(n===void 0){if(n=ii.get(gn(e))??e,Re.size>=2000)Re.clear();Re.set(e,n)}return n}var si={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",webview:"WebView",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 hn(e){return si[e.toLowerCase()]||e}var oi={"circle-pause":"pause.circle","cloud-alert":"exclamationmark.icloud","key-round":"key",paperclip:"paperclip","rotate-cw":"arrow.clockwise","route-off":"location.slash",syringe:"syringe","volume-1":"speaker.wave.1",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-question-mark":"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"},mn={lucide:oi,hugeicons:{"workout-run":"figure.run"}};function de(e,t=!1){let n=String(e??"").trim();if(!n)return{symbol:"questionmark.square.dashed",known:!1};if(t)return{symbol:n,known:!0};let r=/^i-([a-z0-9]+)-(.+)$/.exec(n)??/^([a-z0-9]+):(.+)$/.exec(n),s=r?r[1]:"lucide",o=r?r[2]:n,l=Object.hasOwn(mn,s)?mn[s]:void 0;if(l&&Object.hasOwn(l,o))return{symbol:l[o],iconify:`i-${s}-${o}`,known:!0};if(!r&&n.includes("."))return{symbol:n,known:!0};return{symbol:"questionmark.square.dashed",iconify:r?n:`i-lucide-${o}`,known:!1}}function at(e){return e.split(/\s+/).find((t)=>/^i-[a-z0-9]+-[a-z0-9-]+$/.test(t))}import{generate as Te,parse as ai}from"@stacksjs/ts-css/parse";var li=/^(?::hover|:active|:visited|:focus|:focus-visible|:focus-within)$/;function ci(e){let t=e.replace(/\s+/g,"").toLowerCase();if(!t||t==="all"||t==="screen")return{};if(/^(?:screenand)?\(prefers-color-scheme:dark\)$/.test(t))return{dark:!0};if(/^(?:screenand)?\(prefers-color-scheme:light\)$/.test(t))return{};if(/prefers-reduced-motion|\(hover|\(pointer|print|forced-colors|prefers-contrast/.test(t))return"skip";let n=t.replace(/^screenand/,"").split("and"),r={};for(let s of n){let o=/^\((min|max)-width:([\d.]+)(px|rem|em)\)$/.exec(s);if(!o)return;r[o[1]]=Number(o[2])*(o[3]==="px"?1:16)}return r}async function yn(e,t){let n={},r=new Set,s=(f)=>{if(r.has(f))return;r.add(f),t(f,[...f.matchAll(/\.(-?[a-z_][\w-]*)/gi)].map((g)=>g[1]))},o=(f,g,h)=>{if(!g.trim())return;let y=n[f]??={},m=h.dark?"dark":"light";if(h.min===void 0&&h.max===void 0){y[m]=y[m]?`${y[m]};${g}`:g;return}let x=y.responsive??=[],v=h.min??0,c=x.find((b)=>b.min===v&&b.max===h.max);if(!c)x.push(c={min:v,...h.max===void 0?{}:{max:h.max}});c[m]=c[m]?`${c[m]};${g}`:g};function l(f,g){for(let h of f){if(h.type==="Atrule"){let x=h.name.toLowerCase();if(["font-face","keyframes","-webkit-keyframes","import","charset","property","page","layer"].includes(x)){if(x==="layer"&&h.block)l(h.block.children,g);continue}if(x!=="media"||!h.block){s(`@${x}`);continue}let v=h.prelude?Te(h.prelude):"",c=ci(v);if(c==="skip")continue;if(!c){s(`@media ${v}`);continue}l(h.block.children,{dark:g.dark||c.dark,min:c.min??g.min,max:c.max??g.max});continue}if(h.type!=="Rule"||h.block.type!=="Block")continue;let y=[...h.block.children].filter((x)=>x.type==="Declaration").map((x)=>Te(x)).join(";"),m=h.prelude.type==="SelectorList"?[...h.prelude.children].map(Te):[Te(h.prelude)];for(let x of m){let v=/^(?:(?:html|:root)?\.dark\s+)?((?:\.-?[a-z_][\w-]*)+)((?::{1,2}[a-z-]+)*)$/i.exec(x.trim());if(!v){if(!/^(?:html|:root|body|\*|::?[a-z-]+)/i.test(x.trim()))s(x.trim());continue}let c=v[2];if(c){if(!li.test(c))s(x.trim());continue}let b=g.dark||/^(?:(?:html|:root)?\.dark\s+)/i.test(x.trim());o(v[1].slice(1),y,{dark:b,min:g.min,max:g.max})}}}let u="",d=!0;await new HTMLRewriter().on("style",{element(f){u="";let g=f.getAttribute("type");d=!g||g.toLowerCase()==="text/css",f.onEndTag(()=>{if(!d)return;try{let h=ai(u);if(h.type==="StyleSheet")l(h.children,{})}catch{s("invalid stylesheet")}})},text(f){u+=f.text}}).transform(new Response(e)).text();for(let f of Object.values(n))f.responsive?.sort((g,h)=>g.min-h.min||(g.max??1/0)-(h.max??1/0));return n}import{generate as fe,parse as bn}from"@stacksjs/ts-css/parse";async function vn(e,t){let n={light:new Map,dark:new Map},r=new Set,s=(h)=>{if(!r.has(h))r.add(h),t(h)},o=(h,y,m)=>{for(let x of m){let v=n[x].get(h);if(!v||Number(y.important)>Number(v.important)||y.important===v.important&&y.specificity>=v.specificity)n[x].set(h,y)}},l=(h)=>{if(h.type==="Declaration")return h.property.startsWith("--");if(h.type==="Rule"||h.type==="Atrule")return!!h.block&&[...h.block.children].some(l);return!1},u=(h)=>{let y=h.replace(/\s+/g,"").toLowerCase();if(!y||y==="all"||y==="screen")return["light","dark"];let m=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(y);return m?[m[1]]:void 0};function d(h,y){for(let m of h){if(!l(m))continue;if(m.type==="Atrule"){let v=m.prelude?fe(m.prelude):"",c=m.name.toLowerCase()==="media"?u(v):void 0;if(!c){s(`@${m.name} ${v}`.trim());continue}d(m.block.children,y.filter((b)=>c.includes(b)));continue}if(m.type!=="Rule")continue;let x=m.prelude.type==="SelectorList"?[...m.prelude.children].map(fe):[fe(m.prelude)];for(let v of x){let c=/^(html|:root)?(?:\.(dark|light))?$/.exec(v.trim());if(!c||!c[1]&&!c[2]){s(v);continue}let b=(c[1]===":root"?10:c[1]?1:0)+(c[2]?10:0);for(let p of m.block.children){if(p.type!=="Declaration"){if(l(p))s(`nested rule in ${v}`);continue}if(!p.property.startsWith("--"))continue;let N={value:fe(p.value),important:!!p.important,specificity:b};o(p.property,N,y.filter((S)=>!c[2]||c[2]===S))}}}}let f="",g;return await new HTMLRewriter().on("html",{element(h){let y=h.getAttribute("style");if(!y)return;try{let m=bn(y,{context:"declarationList"});if(m.type!=="DeclarationList")return;for(let x of m.children)if(x.type==="Declaration"&&x.property.startsWith("--"))o(x.property,{value:fe(x.value),important:!!x.important,specificity:1000},["light","dark"])}catch{s("invalid document inline theme")}}}).on("style",{element(h){f="";let y=h.getAttribute("type");g=!y||y.toLowerCase()==="text/css"?u(h.getAttribute("media")??""):void 0,h.onEndTag(()=>{try{let m=bn(f);if(m.type!=="StyleSheet")return;if(!g){if([...m.children].some(l))s("style type/media");return}d(m.children,g)}catch{s("invalid stylesheet")}})},text(h){f+=h.text}}).transform(new Response(e)).text(),{light:[...n.light].map(([h,y])=>[h,y.value]),dark:[...n.dark].map(([h,y])=>[h,y.value])}}function J(e,t={},n={},r={},s=[]){return{type:e,props:t,style:n,events:r,children:s}}function Sn(e,t,n={}){return{version:"1.0.0",root:e,script:t,meta:{source:n.source||"unknown",compiledAt:n.compiledAt||Date.now(),headwindConfig:n.headwindConfig}}}var ui=/^(?: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)$/,wn=new Set(["script","style","head","meta","link","title","base","noscript"]),Nn=new Set(["template","body","html","main","fragment"]),Ae=new Set,di=new Set(["onBlur","onChange","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onPageSelected","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onDragEnd","onDragLeave","onDragOver","onDragStart","onDrop","onHoverChange","onKeyPress","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),_e=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","Link","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","WebView","Map","MapPolyline","MapPolygon","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","SegmentedControl","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...nt]),fi=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"]]),xn=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),pi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function ie(e){return e.replace(/&(#x?[0-9a-f]+|\w+);/gi,(t,n)=>{let r=pi[n.toLowerCase()];if(r!==void 0)return r;if(n[0]==="#"){let s=n[1]==="x"||n[1]==="X"?Number.parseInt(n.slice(2),16):Number.parseInt(n.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):t}return t})}function lt(e){if(!e.includes("{{"))return null;let t=[],n=0;for(let r of e.matchAll(/\{\{([\s\S]+?)\}\}/g)){if(r.index>n)t.push(JSON.stringify(e.slice(n,r.index)));t.push(`(${r[1].trim()})`),n=r.index+r[0].length}if(!t.some((r)=>r.startsWith("(")))return null;if(n<e.length)t.push(JSON.stringify(e.slice(n)));if(t.length===1)return t[0].slice(1,-1);return`[${t.join(", ")}].map(__stxPart => __stxPart == null ? '' : __stxPart).join('')`}function kn(e,t,n,r={}){let s=r.inheritedVariables,o={},l={},u={},d=[],f="",g={};for(let[x,v]of t){let c=x.toLowerCase();if(c==="class"||c==="classname"){f=f?`${f} ${v}`:v;continue}if(c==="style"){g={...g,...gi(e,v,n,{...r,onVariables(S){s=S,r.onVariables?.(S)}})};continue}if(c.startsWith(":")||c.startsWith("x-")&&c!=="x-cloak"){u[c.startsWith(":")?c.slice(1):c.slice(2)]=ie(v);continue}if(c==="x-cloak")continue;if(c.startsWith("@")||c.startsWith("v-on:")){let S=c.startsWith("@")?c.slice(1):c.slice(5),[R]=S.split("."),w=ke[R]??ke[R.replaceAll("-","")]??(R.startsWith("on")?R:""),A=w==="onKeyPress"&&S!==R;if(!w||!di.has(w)||A){if(ui.test(R)||/\./.test(S))n.push({kind:"unread-event",tag:e,name:x});continue}l[w]=ie(v);continue}if(c==="key"){o.key=v;continue}let b=ie(v),p=lt(b);if(p){u[c]=p,d.push(c);continue}let N=ot(x);if(b===""&&pn.has(N)){o[N]=!0;continue}try{o[N]=JSON.parse(b)}catch{o[N]=b}}let h=o["data-native"]?o["data-native"]==="TextInput":e==="textarea"||e==="input"&&!["checkbox","radio","hidden"].includes(String(o.type??"text").toLowerCase()),y=f?re(f,s,{focus:h,focusWithin:!0,rules:r.rules}):void 0;for(let x of new Set(y?.unknown??[]))n.push({kind:"unknown-class",tag:e,name:x});let m=ze({...y?.style,...g});return{props:o,style:m,events:l,bindings:u,classes:f,inline:g,templated:d}}function gi(e,t,n,r){return be(ie(t),(s)=>n.push({...s,tag:e}),r)}function ct(e){return e.children.map((t)=>typeof t==="string"?t:ct(t)).join("").replace(/\s+/g," ").trim()}function hi(e,t){let n=e.node;if(n.props["data-stx-native-template"])return n.children=n.children.map((o)=>typeof o==="string"?J("Text",{},{},{},[o]):o),n;let r=n.children.filter((o)=>typeof o!=="string"),s=n.children.filter((o)=>typeof o==="string").join("").trim();if(e.tag==="button"&&n.type==="Button"&&!e.declaredNative&&r.length>0)return n.type="Pressable",n.props.role??="button",n.children=n.children.flatMap((o)=>typeof o==="string"?o.trim()?[J("Text",{},{},{},[o.trim()])]:[]:[o]),n;if(n.type==="Button"&&r.length===0)return n.children=s?[s]:[],n;if(n.type==="Svg"||n.type==="G")return n.children=r,n;if(n.type==="SvgText"){let o=ct(n);return n.children=o?[o]:[],n}if(xn.has(n.type)&&r.length===0&&s)return n.type="Text",n.children=[s],n;if(n.type==="Text"&&!s&&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"?J("Text",{},{},{},[u]):u),n;let l=ct(n);return t.push({kind:"flattened-text",tag:e.tag}),n.children=l?[l]:[],n}if(xn.has(n.type)&&r.length>0)n.children=r;return n}async function mi(e,t={}){e=await pe(e);let n=[],r=await vn(e,(c)=>n.push({kind:"unsupported-theme-rule",tag:"style",name:c})),s=te(r.light).computed(),o=new Set([...e.matchAll(/\sclass(?:name)?\s*=\s*"([^"]*)"/gi)].flatMap((c)=>c[1].split(/\s+/))),l=await yn(e,(c,b)=>{if(!b.length||b.some((p)=>o.has(p)))n.push({kind:"unsupported-style-rule",tag:"style",name:c})}),u=[],d=[],f=new Set;function g(c){let b=d[d.length-1];if(!b)u.push(c);else if(!b.dropped)b.node.children.push(c)}function h(c){let b=c.node.style.fontFamily,p=(S)=>{if(c.tag!=="html"&&c.node._styleSource)S._styleAncestors=[c.node._styleSource,...S._styleAncestors??[]];if(b&&S.style.fontFamily===void 0)S._layoutDefaults={...S._layoutDefaults,fontFamily:b},S.style={fontFamily:b,...S.style}};if(c.node.bindings&&Object.keys(c.node.bindings).length>0){let S=c.node.children,R=S.filter((A)=>typeof A!=="string"),w=R.length===1&&R.length===S.length?R[0]:J("View",{},{},{},S);if(w.bindings={...c.node.bindings,...w.bindings},w.bindingId===void 0&&c.node.bindingId!==void 0)w.bindingId=c.node.bindingId;p(w),g(w);return}let N=d[d.length-1];for(let S of c.node.children){if(typeof S==="string"){if(N&&!N.dropped)N.node.children.push(S);continue}if(p(S),!N)u.push(S);else if(!N.dropped)N.node.children.push(S)}}function y(c,b){let p=d[d.length-1];if(c==="svg"||p?.svg)return m(c,b,p);let N=wn.has(c)&&!Ae.has(c),S=d[d.length-1]?.dropped??!1,R=p?.variables??s,{props:w,style:A,events:I,bindings:D,classes:_,inline:L,templated:V}=N||S?{props:{},style:{},events:{},bindings:{},classes:"",inline:{},templated:[]}:kn(c,b,n,{inheritedVariables:R,onVariables:(M)=>{R=M},rules:l});if(c==="html")R=s;let C=w["data-native"],O=c==="template"&&b.some(([M])=>[":for","x-for","@for"].includes(M)),k;if(O)k="View",w["data-stx-native-template"]=!0;else if(typeof C==="string"&&_e.has(C))k=C,delete w["data-native"];else{if(k=Ae.has(c)?"View":hn(c),(c==="i"||c==="span")&&/(?:^|\s)i-[a-z0-9]+-[a-z0-9-]+(?:\s|$)/.test(_))k="Icon";else if(c==="i"&&b.some(([M])=>/^(?::|x-)class$/i.test(M)))k="Icon";if(c==="input"){let M=String(w.type??"text").toLowerCase();if(M==="checkbox")k="Checkbox",w.formValue=w.value??"on",w.checked=w.checked===""||w.checked===!0||w.checked==="true",w.value=w.checked;else if(M==="hidden")k="View",A.display="none",L.display="none";else if(M==="radio")k="View",w.accessibilityRole="radio",n.push({kind:"unsupported-control",tag:c,name:"input:radio"})}}if(!S&&k===c&&!_e.has(k)&&!wn.has(c)&&!Nn.has(c)&&!f.has(c))f.add(c),n.push({kind:"unmapped-tag",tag:c});if((N||Ae.has(c))&&!f.has(`drop:${c}`))f.add(`drop:${c}`),n.push({kind:"dropped-subtree",tag:c});if(k==="View"&&/(?:^|\s)overflow-x-(?:auto|scroll)(?:\s|$)/.test(_))k="ScrollView",w.horizontal=!0,w.showsHorizontalScrollIndicator??=!1;else if(k==="View"&&/(?:^|\s)overflow-y-(?:auto|scroll)(?:\s|$)/.test(_))k="ScrollView";if(c==="form")w["data-stx-form"]=!0;if(c==="button"&&w.type===void 0)w.type="submit";if(c==="textarea"&&k==="TextInput")w.multiline??=!0;if((k==="Video"||k==="Image")&&w.source===void 0&&w.src!==void 0)w.source=w.src,delete w.src;if(k==="Icon"){let M=re(_).icon,F=String(w.symbol||w.name||M||""),B=de(F,Boolean(w.symbol));if(F.trim()&&!B.known)n.push({kind:"unknown-icon",tag:c,name:F});if(w.symbol=B.symbol,B.iconify)w.iconify=B.iconify}if(k==="FlatList"||k==="SectionList"){let M=new Set([...Object.keys(w),...Object.keys(D)].map((F)=>F.toLowerCase()));for(let[F,B]of fi)if(M.has(F))n.push({kind:"unsupported-list-prop",tag:k,name:B})}let T=J(k,w,A,I);T._inlineStyle=L,T._styleSource=ie(b.find(([M])=>M==="style")?.[1]??"");let E=w["data-stx-b"];if(typeof E==="number"&&Number.isInteger(E))T.bindingId=E;if(delete w["data-stx-b"],_)T._classes=_;if(Object.keys(D).length>0)T.bindings=D;if(V.length>0)T._templated=V;if(typeof w.key==="string")T.key=w.key,delete w.key;return{tag:c,node:T,variables:R,declaredNative:typeof C==="string"&&_e.has(C),dropped:N||S||Ae.has(c)||k==="Video",discard:N||S,unwrap:Nn.has(c)&&!O&&k!=="ScrollView"&&!(typeof C==="string"&&_e.has(C))}}function m(c,b,p){let N=p?.dropped??!1,S=tt[c];if(N||!S){if(!N&&!f.has(`drop:${c}`))f.add(`drop:${c}`),n.push({kind:cn.has(c)?"dropped-subtree":"unmapped-tag",tag:c});return{tag:c,node:J("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let R=p?.variables??s,{props:w,style:A,events:I,bindings:D,classes:_,inline:L,templated:V}=kn(c,b,n,{inheritedVariables:R,onVariables:(T)=>{R=T},rules:l});if(S==="Svg"){let T=rt(w.viewBox);if(T)w.viewBox=T;else delete w.viewBox;for(let E of["width","height"]){if(typeof w[E]==="number"&&A[E]===void 0)A[E]=w[E];delete w[E]}}if(typeof w.strokeDasharray==="string"||typeof w.strokeDasharray==="number"){let T=String(w.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);w.strokeDasharray=T}let C=it(S,w);if(C)w.geometry=C;if(S==="Animate")st(w);let O=J(S,w,A,I);O._inlineStyle=L,O._styleSource=ie(b.find(([T])=>T==="style")?.[1]??"");let k=w["data-stx-b"];if(typeof k==="number"&&Number.isInteger(k))O.bindingId=k;if(delete w["data-stx-b"],_)O._classes=_;if(Object.keys(D).length>0)O.bindings=D;if(V.length>0)O._templated=V;if(typeof w.key==="string")O.key=w.key,delete w.key;return{tag:c,node:O,variables:R,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(c){let b=c.tagName.toLowerCase(),p=y(b,[...c.attributes]),N=!0;try{c.onEndTag(()=>{if(d.pop(),p.discard)return;if(p.unwrap)h(p);else g(hi(p,n))})}catch{N=!1}if(N)d.push(p);else if(!p.discard)g(p.node)},text(c){let b=d[d.length-1];if(!b||b.dropped)return;let p=yi(ie(c.text),b.inMustache===!0);b.inMustache=p.inside;let N=p.text;if(!N.trim())return;b.node.children.push(N)}}).transform(new Response(e)).text(),u.length===0)throw Error(`No element to translate in the rendered output of ${t.source??"unknown"}`);let x=u.length===1?u[0]:J("View",{},{},{},u);if(r.light.length||r.dark.length)x._stylesheetTheme=r;if(Object.keys(l).length)x._stylesheetRules=l;let v=(c)=>{bi(c);let b=Qe(c.props,c.type);if(Object.keys(b).length)c._accessibilitySource=Object.fromEntries(ue.filter((p)=>(p in c.props)).map((p)=>[p,c.props[p]])),Object.assign(c.props,b);on(c);for(let p of c.children)if(typeof p!=="string")v(p)};return v(x),Rn(x),{root:x,diagnostics:n}}function Rn(e,t=!1){if(["ScrollView","FlatList","SectionList"].includes(e.type))return!e.props.horizontal&&(Number(e.style.flex)>0||Number(e.style.flexGrow)>0);let n=e.style.flexDirection==="row"||e.style.display==="flex"&&e.style.flexDirection==null;if(!e.children.map((s)=>typeof s==="string"?!1:Rn(s,n)).some(Boolean)||!["View","SafeAreaView","KeyboardAvoidingView"].includes(e.type))return!1;if(e.style.height!==void 0||e.style.maxHeight!==void 0)return!1;if(e.style.flex===0||e.style.flexGrow===0||e.style.flexShrink===0)return!1;if(t)return!0;if(e.style.flex===void 0&&e.style.flexGrow===void 0)e._layoutDefaults={flex:1,flexGrow:1,flexShrink:1,flexBasis:0},e.style={...e._layoutDefaults,...e.style};return!0}function yi(e,t){let n="",r=0;while(r<e.length){if(!t&&e.startsWith("{{",r)){t=!0,n+="{{",r+=2;continue}if(t&&e.startsWith("}}",r)){t=!1,n+="}}",r+=2;continue}let s=e[r];if(!t&&/\s/.test(s)){if(!n.endsWith(" "))n+=" ";while(r<e.length&&/\s/.test(e[r]))r++;continue}n+=s,r++}return{text:n,inside:t}}function bi(e){if(e.props["data-stx-native-template"])return;if(e.bindings?.text||e.children.length===0)return;let t=e.children.filter((r)=>typeof r==="string");if(t.length<e.children.length){let r=e.type==="Button"||e.type==="Text"?null:lt(t.join(""));if(!r)return;e.bindings={...e.bindings,text:r},e._templated=[...e._templated??[],"text"],e.children=e.children.filter((s)=>typeof s!=="string");return}let n=lt(e.children.join(""));if(!n)return;if(e.type!=="Button")e.bindings={...e.bindings,text:n},e._templated=[...e._templated??[],"text"],e.children=[];else{e.type="Pressable",e.props.role??="button";let r=J("Text",{},{},{},[]);r.bindings={text:n},r._templated=["text"],e.children=[r]}}async function Tn(e,t={}){let{root:n,diagnostics:r}=await mi(e,t),s=t.script??{exports:{},functions:[],code:""};return{document:Sn(n,s,{source:t.source??"unknown"}),diagnostics:r}}function vi(e){let t="",n=0;for(let r=e.indexOf("<");r!==-1;r=e.indexOf("<",r+1)){if(!/[a-z]/i.test(e[r+1]??""))continue;let s=r+1,o="";for(;s<e.length;s++){let u=e[s];if(o){if(u===o)o="";continue}if(u==='"'||u==="'")o=u;else if(u===">"||u==="<")break}if(e[s]!==">"||e[s-1]!=="/")continue;let l=e.slice(r,s+1).replace(/"[^"]*"|'[^']*'/g,'""');if(!/\sdata-native-exclude(?=[\s=/>])/i.test(l))continue;t+=e.slice(n,r),n=s+1,r=s}return n?t+e.slice(n):e}async function pe(e){if(!/\bdata-native-exclude\b/i.test(e))return e;if(e=vi(e),!/\bdata-native-exclude\b/i.test(e))return e;return new HTMLRewriter().on("[data-native-exclude]",{element(t){t.remove()}}).transform(new Response(e)).text()}var An=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Si=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,wi=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,_n=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function ut(e){let t=[];An.lastIndex=0;for(let o of e.matchAll(An)){let l=o[1]??"";if(/\bserver\b/.test(l))continue;t.push(o[2].trim())}let n=t.filter(Boolean).join(`
2
+ import"./chunk-qa5y30sy.js";import{oo,zi,Il}from"./chunk-qjey0jk6.js";import"./chunk-farh4p7f.js";import"./chunk-2kfayg4t.js";import"./chunk-k32q90b2.js";import"./chunk-0fh47gp0.js";import"./chunk-tnp2ta5q.js";import"./chunk-x512h2gv.js";import{Ts,a}from"./chunk-4xanjv22.js";import"./chunk-mfa07erx.js";import"./chunk-669b2bya.js";import"./chunk-2s7rmn9r.js";import{_t,Qe,Se,gn,Me,lr,ur,et}from"./chunk-4ykgjewy.js";import{i}from"./chunk-321fbxnm.js";import"./chunk-srgpz94e.js";import"./chunk-2dpessnc.js";import{_s}from"./chunk-fnxg6134.js";import"./chunk-dhnw2qwq.js";import"./chunk-q1wxgw5s.js";import{St}from"./chunk-7mpqfg98.js";import"./chunk-9zrvh3pz.js";import"./chunk-n058hznh.js";import{ds}from"./chunk-hdjn7nw9.js";import{Wr}from"./chunk-7ayvybdy.js";import{Ur,po,fo}from"./chunk-g5xth2yx.js";import"./chunk-24hq8mka.js";import"./chunk-xymr4ys9.js";import"./chunk-0c9c9v03.js";import"./chunk-zsnmk5me.js";import"./chunk-adb045wf.js";import{existsSync as Pe,mkdirSync as Ki,readFileSync as Ji}from"fs";import G from"path";import{existsSync as Wn,mkdirSync as $n,realpathSync as $i,rmSync as jn}from"fs";import H from"path";import le from"path";var zn="data-stx-b",vt=new Set(zi),Un=new Set(oo);function De(e){if(e==="ref"||e==="data-stx-ref")return"ref";if(e.startsWith("::"))return null;if(e.startsWith("@bind:")||e.startsWith("x-bind:"))return"attr";if(e.startsWith("@")||e.startsWith(":")){let t=e.slice(1).split(".")[0];if(vt.has(t))return t==="if"?"if":t;if(t==="for"||t==="else"||t==="else-if"||t==="elseif")return"for";if(Il(t))return"event";if(e.startsWith("@"))return"event";return"attr"}if(e.startsWith("x-")){let t=e.split(".")[0];if(!Un.has(t))return"attr";let n=t.slice(2);if(n==="cloak"||n==="data"||n==="bind")return null;if(n==="tooltip"||n==="tooltip-position")return null;return vt.has(n)?n==="if"?"if":n:"attr"}return null}function Hn(e){let t=[];for(let[n,r]of e){let s=De(n);if(s)t.push({name:n,value:r,kind:s})}return t}var qn=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,Be=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function wt(e){let t=[],n=0;return{html:e.replace(qn,(s,o,l)=>{if(!l||!/[:@]|x-/.test(l))return s;let u=[];Be.lastIndex=0;for(let y=Be.exec(l);y;y=Be.exec(l))u.push([y[1],y[2]??y[3]??y[4]??""]);let d=Hn(u);if(!d.length)return s;let f={id:n++,bindings:d};if(d.some((y)=>y.kind==="for"))f.template=!0;t.push(f);let g=s.endsWith("/>");return`${s.slice(0,g?-2:-1).trimEnd()} ${zn}="${f.id}"${g?"/>":">"}`}),manifest:{entries:t}}}function he(e){let t=e&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(e.trim());if(!t)return;let n=Number(t[1])*(t[2]==="rem"?16:1);return Number.isFinite(n)?n:void 0}function Le(e,t){if(!Se[e])return;return he(t?.get(gn(e))??Se[e].value)}function $e(e,t){let n=lr[e];if(!n)return;return he(t?.get(et(n))??Me[n]?.value)}function je(e,t){let n=ur[e];if(!n)return;let r=he(t?.get(et(n.size))??Me[n.size]?.value),s=he(t?.get(et(n.leading))??Me[n.leading]?.value);if(r===void 0||s===void 0)return;return{fontSize:r,lineHeight:s}}var Gn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Rt=We({}),Nt,xt=null;function ce(){let e=globalThis.__stxNativeStyleConfig;if(!e)return Rt;if(e!==Nt)Nt=e,xt=We(e);return xt}function Tt(e,t=new Map,n=""){for(let[r,s]of Object.entries(e??{})){let o=r==="DEFAULT"?n.replace(/-$/,""):`${n}${r}`;if(typeof s==="string")t.set(o,s);else if(s&&typeof s==="object")Tt(s,t,`${o}-`)}return t}function At(e){let t={};for(let[n,r]of Object.entries(e??{})){let s=typeof r==="number"?r:Number.parseFloat(String(r));if(Number.isFinite(s))t[n]=s}return t}function We(e){return{shortcuts:new Map(Object.entries(e.shortcuts??{}).filter(([,t])=>typeof t==="string")),colors:Tt(e.colors),fontFamily:new Map(Object.entries(e.fontFamily??{}).map(([t,n])=>[t,Array.isArray(n)?n.join(", "):n])),breakpoints:new Map(Object.entries({...Gn,...At(e.breakpoints)}))}}var Ve={};function Et(){return ce()}function kt(e){Ve=e??{},Rt=We(Ve)}async function Ct(e,t){let n=Ve;kt(e);try{return await t()}finally{kt(n)}}function Ot(e){if(!e)return{};let t=e.theme??{},n=Object.fromEntries(Object.entries(e.shortcuts??{}).filter(([,r])=>typeof r==="string"));return{...Object.keys(n).length?{shortcuts:n}:{},...t.fontFamily?{fontFamily:JSON.parse(JSON.stringify(t.fontFamily))}:{},...t.colors?{colors:JSON.parse(JSON.stringify(t.colors))}:{},...t.screens?{breakpoints:At(t.screens)}:{}}}function It(e){return ce().shortcuts.get(e)}function Pt(e){return ce().colors.get(e)}function Fe(e){return ce().breakpoints.get(e)}function me(e){return ce().fontFamily.get(e)}var Bt=/^--[\w\u0080-\uFFFF-]+$/u;function Xe(e,t){if(!/var\(/i.test(e))return e;let n="",r="",s=!1;for(let o=0;o<e.length;o++){let l=e[o];if(l==="\\"){n+=e.slice(o,o+2),o++;continue}if(r){if(n+=l,l===r)r="";continue}if(l==='"'||l==="'"){r=l,n+=l;continue}if(e.slice(o,o+4).toLowerCase()!=="var("||o>0&&/[\w-]/.test(e[o-1])){n+=l;continue}let u=1,d=-1,f="",g=o+4;for(;g<e.length;g++){let m=e[g];if(m==="\\"){g++;continue}if(f){if(m===f)f="";continue}if(m==='"'||m==="'"){f=m;continue}if(m==="(")u++;if(m===")"&&--u===0)break;if(m===","&&u===1&&d===-1)d=g}if(u!==0)return;let h=e.slice(o+4,d===-1?g:d).trim();if(!Bt.test(h))return;let y=t(h,d===-1?void 0:e.slice(d+1,g).trim());if(y===void 0||n.length+y.length>65536)return;n+=y,s=!0,o=g}return s&&n.length>65536?void 0:n}var Mt=new Map;function Kn(e){for(let t=0;t<e.length;t++){let n=e[t][0];if(typeof n==="string"&&n.trim().startsWith("--"))return!0}return!1}function te(e,t){if(!e.length||!Kn(e)){let v=new Set,c=(b,p=0)=>p>64?void 0:Xe(b,(N,S)=>(v.add(N),t?.get(N)??(S===void 0?void 0:c(S,p+1))));return{resolve:c,used:v,computed:()=>t??Mt}}let n=new Map,r=new Set;for(let[v,c]of e){let b=v.trim();if(!Bt.test(b))continue;if(typeof c==="string"||typeof c==="number"&&Number.isFinite(c))n.set(b,String(c).trim())}let s=new Map,o=new Set;for(let[v,c]of n){let b=new Set,p=(N,S=0)=>S>64?void 0:Xe(N,(R,w)=>(b.add(R),w===void 0?"":p(w,S+1)));if(p(c)===void 0)o.add(v);s.set(v,b)}let l=new Map,u=new Map,d=[],f=new Set,g=0;function h(v,c=0){if(c>64){o.add(v);return}l.set(v,g),u.set(v,g++),d.push(v),f.add(v);for(let N of s.get(v)??[]){if(!n.has(N))continue;if(!l.has(N)){if(h(N,c+1),u.has(N))u.set(v,Math.min(u.get(v),u.get(N)))}else if(f.has(N))u.set(v,Math.min(u.get(v),l.get(N)))}if(u.get(v)!==l.get(v))return;let b=[],p;do p=d.pop(),f.delete(p),b.push(p);while(p!==v);if(b.length>1||s.get(v)?.has(v))b.forEach((N)=>o.add(N))}for(let v of n.keys())if(!l.has(v))h(v);let y=new Map;function m(v,c){if(r.add(v),y.has(v))return y.get(v);let b=n.get(v),p=b===void 0||/^(?:inherit|unset)$/i.test(b)?t?.get(v):o.has(v)||/^(?:initial|revert|revert-layer)$/i.test(b)?void 0:x(b,c+1);return y.set(v,p),p}function x(v,c=0){if(c>64)return;return Xe(v,(b,p)=>m(b,c)??(p===void 0?void 0:x(p,c+1)))}return{resolve:x,used:r,computed(){if(!n.size)return t??Mt;let v=new Map(t);for(let c of n.keys())v.set(c,m(c,0));return v}}}function ze(e){if(e.display==="flex"&&e.flexDirection==null)return{...e,flexDirection:"row"};return e}var $t=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","objectPosition","tintColor","transform","overflow","pointerEvents","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),Jn=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"]),Dt=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"]),Lt=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,Yn=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,Qn=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),Zn=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function er(e){if(typeof e!=="string")return e;let t=Yn.exec(e);return t?Number(t[1])*(/^r?em$/i.test(t[2]||"")?16:1):e}function se(e){return typeof e==="number"&&Number.isFinite(e)}function tr(e,t){if(e==="shadowOffset"&&t&&typeof t==="object"&&!Array.isArray(t)){let{width:n,height:r}=t;return se(n)&&se(r)?{width:n,height:r}:void 0}if(e==="transform"&&Array.isArray(t)){let n=[];for(let r of t){if(!r||typeof r!=="object"||Array.isArray(r)||Object.keys(r).length!==1)return;let[s,o]=Object.entries(r)[0];if(Zn.has(s)&&se(o))n.push({[s]:o});else if(Qn.has(s)&&typeof o==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(o))n.push({[s]:o});else return}return n}return}function jt(e){let t=[],n=0,r=0,s="";for(let o=0;o<=e.length;o++){let l=e[o];if(l==="\\"){o++;continue}if(s){if(l===s)s="";continue}if(l==='"'||l==="'"){s=l;continue}if(l==="(")r++;if(l===")")r=Math.max(0,r-1);if(o!==e.length&&(l!==";"||r))continue;let u=e.slice(n,o),d=u.indexOf(":");if(d!==-1)t.push([u.slice(0,d).trim(),u.slice(d+1).trim()]);n=o+1}return t}var ye=new Map;function nr(e,t){if(typeof e==="string"){let n=ye.get(e);if(n)return n;let r=rr(e,t);if(r){if(ye.size>=2000)ye.clear();return ye.set(e,r),r}return[]}return ir(e,t)}function rr(e,t){let n=e.trim();if(!n)return[];try{n=JSON.parse(n)}catch{}if(typeof n==="string")return jt(n);if(n&&typeof n==="object"&&!Array.isArray(n))return Object.entries(n);if(n!=null&&n!==!1)t({kind:"non-numeric-style",name:"style"});return null}function ir(e,t){let n;if(typeof e==="string"){if(e=e.trim(),!e)return[];try{e=JSON.parse(e)}catch{}}if(typeof e==="string")n=jt(e);else if(e&&typeof e==="object"&&!Array.isArray(e))n=Object.entries(e);else{if(e!=null&&e!==!1)t({kind:"non-numeric-style",name:"style"});return[]}return n}function be(e,t=()=>{},n={}){let r=nr(e,t),s=te(r,n.inheritedVariables);return n.onVariables?.(s.computed()),or(r,s,t)}var ss=Symbol("invalid native structured style");function sr(e){return $t.has(e)||e.trim().startsWith("--")?e:e.trim().toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function or(e,t,n){let r={},s=[];for(let[o,l]of e){if(o.trim().startsWith("--")){s.push(o.trim());continue}let u=sr(o);if(!$t.has(u)){n({kind:"unknown-style",name:u});continue}if(l==null||l==="")continue;let d=typeof l==="string"?t.resolve(l.trim()):l;if(d===void 0){n({kind:"non-numeric-style",name:u});continue}if(d==="")continue;if(u==="pointerEvents"){if(typeof d==="string"&&["auto","none","box-none","box-only"].includes(d))r.pointerEvents=d;else n({kind:"unknown-style",name:`pointerEvents:${String(d)}`});continue}if(u==="objectFit"){let g=typeof d==="string"?d.trim().toLowerCase():"";if(["fill","contain","cover","none","scale-down"].includes(g))r.objectFit=g;else n({kind:"unknown-style",name:`objectFit:${String(d)}`});continue}if(u==="objectPosition"){let g=typeof d==="string"?d.trim().toLowerCase().replace(/\s+/g," "):"",h=g.split(" ");if(h.length===1)h.push("center");if(["top","bottom"].includes(h[0])||["left","right"].includes(h[1]))h.reverse();let y=(m)=>m.endsWith("%")&&Lt.test(m.slice(0,-1))&&Number.isFinite(Number(m.slice(0,-1)));if(h.length===2&&(["left","center","right"].includes(h[0])||y(h[0]))&&(["top","center","bottom"].includes(h[1])||y(h[1])))r.objectPosition=g;else n({kind:"unknown-style",name:`objectPosition:${String(d)}`});continue}let f;if(Jn.has(u)||Dt.has(u)){if(f=er(d),!se(f)&&!(Dt.has(u)&&typeof f==="string"&&f.endsWith("%")&&Lt.test(f.slice(0,-1))&&Number.isFinite(Number(f.slice(0,-1)))))f=void 0}else if(u==="display"&&d==="inline-flex")f="flex";else if(u==="shadowOffset"||u==="transform")f=tr(u,d);else if(u==="gridTemplateColumns"||u==="gridTemplateRows")f=se(d)||typeof d==="string"?d:void 0;else if(u==="fontWeight"&&se(d))f=String(d);else if(typeof d==="string")f=d;if(f===void 0)n({kind:"non-numeric-style",name:u});else r[u]=f}for(let o of s)if(!t.used.has(o))n({kind:"unknown-style",name:o});return r}var ar={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"}},qe={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},Vt={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},Wt={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function ne(e){let t=e.lastIndexOf("/");if(t>0&&(!e.endsWith("]")||/\/\[[\d.]+%?\]$/.test(e))){let r=ne(e.slice(0,t)),s=e.slice(t+1),o=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!r||!Number.isFinite(o))return;return cr(r,o/100)}if(e==="transparent")return"transparent";if(e==="current")return"currentColor";if(e==="black")return"#000000";if(e==="white")return"#ffffff";let n=e.split("-");if(n.length===2){let[r,s]=n,o=ar[r];if(o&&typeof o==="object")return o[s]}if(e.startsWith("[")&&e.endsWith("]")){let r=e.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(r)?r:void 0}return}function Ge(e){return ne(e.trim())}function cr(e,t){if(e==="transparent")return e;let n=e.startsWith("#")?e.slice(1):"";if(n.length===3)n=n.split("").map((s)=>s+s).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,t))*255);return`#${n}${r.toString(16).padStart(2,"0")}`}function He(e,t=16){if(!e.startsWith("[")||!e.endsWith("]"))return;let n=e.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*t;return r}function X(e){if(e.startsWith("[")&&e.endsWith("]")){let t=e.slice(1,-1);if(t.endsWith("%"))return;let n=t.endsWith("rem")?Number.parseFloat(t)*16:Number.parseFloat(t);return Number.isFinite(n)?n:void 0}return qe[e]??$e(e)}function Ne(e){let t=/^\[(-?\d*\.?\d+)%\]$/.exec(e);if(t)return`${Number.parseFloat(t[1])}%`;return X(e)}var dr={flex:(e,t)=>(t.display="flex",!0),block:(e,t)=>(t.display="flex",!0),hidden:(e,t)=>(t.display="none",!0),grid:(e,t)=>(t.display="grid",!0),"flex-row":(e,t)=>(t.flexDirection="row",!0),"flex-col":(e,t)=>(t.flexDirection="column",!0),"flex-row-reverse":(e,t)=>(t.flexDirection="row-reverse",!0),"flex-col-reverse":(e,t)=>(t.flexDirection="column-reverse",!0),"flex-wrap":(e,t)=>(t.flexWrap="wrap",!0),"flex-nowrap":(e,t)=>(t.flexWrap="nowrap",!0),"flex-wrap-reverse":(e,t)=>(t.flexWrap="wrap-reverse",!0),"flex-1":(e,t)=>(t.flex=1,t.flexGrow=1,t.flexShrink=1,t.flexBasis=0,!0),"flex-auto":(e,t)=>(t.flexGrow=1,t.flexShrink=1,!0),"flex-initial":(e,t)=>(t.flexGrow=0,t.flexShrink=1,!0),"flex-none":(e,t)=>(t.flexGrow=0,t.flexShrink=0,!0),grow:(e,t)=>(t.flexGrow=1,!0),"grow-0":(e,t)=>(t.flexGrow=0,!0),shrink:(e,t)=>(t.flexShrink=1,!0),"shrink-0":(e,t)=>(t.flexShrink=0,!0),"order-first":(e,t)=>(t.order=-9999,!0),"order-last":(e,t)=>(t.order=9999,!0),"order-none":(e,t)=>(t.order=0,!0),"justify-start":(e,t)=>(t.justifyContent="flex-start",!0),"justify-center":(e,t)=>(t.justifyContent="center",!0),"justify-end":(e,t)=>(t.justifyContent="flex-end",!0),"justify-between":(e,t)=>(t.justifyContent="space-between",!0),"justify-around":(e,t)=>(t.justifyContent="space-around",!0),"justify-evenly":(e,t)=>(t.justifyContent="space-evenly",!0),"items-start":(e,t)=>(t.alignItems="flex-start",!0),"items-center":(e,t)=>(t.alignItems="center",!0),"items-end":(e,t)=>(t.alignItems="flex-end",!0),"items-stretch":(e,t)=>(t.alignItems="stretch",!0),"items-baseline":(e,t)=>(t.alignItems="baseline",!0),"self-auto":(e,t)=>(t.alignSelf="auto",!0),"self-start":(e,t)=>(t.alignSelf="flex-start",!0),"self-center":(e,t)=>(t.alignSelf="center",!0),"self-end":(e,t)=>(t.alignSelf="flex-end",!0),"self-stretch":(e,t)=>(t.alignSelf="stretch",!0),"self-baseline":(e,t)=>(t.alignSelf="baseline",!0),"min-w-0":(e,t)=>(t.minWidth=0,!0),"aspect-square":(e,t)=>(t.aspectRatio=1,!0),"aspect-video":(e,t)=>(t.aspectRatio=1.7777777777777777,!0),"border-solid":(e,t)=>(t.borderStyle="solid",!0),"border-dashed":(e,t)=>(t.borderStyle="dashed",!0),"border-dotted":(e,t)=>(t.borderStyle="dotted",!0),group:()=>!0,peer:()=>!0,"inset-0":(e,t)=>(t.top=0,t.right=0,t.bottom=0,t.left=0,!0),"mx-auto":(e,t)=>(t.alignSelf="center",!0),fixed:(e,t)=>(t.position="absolute",!0),sticky:()=>!0,"sr-only":(e,t)=>(t.position="absolute",t.width=1,t.height=1,t.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":(e,t)=>(t.letterSpacing=-0.8,!0),"tracking-tight":(e,t)=>(t.letterSpacing=-0.4,!0),"tracking-normal":(e,t)=>(t.letterSpacing=0,!0),"tracking-wide":(e,t)=>(t.letterSpacing=0.4,!0),"tracking-wider":(e,t)=>(t.letterSpacing=0.8,!0),"tracking-widest":(e,t)=>(t.letterSpacing=1.6,!0),"tabular-nums":()=>!0,"inline-flex":(e,t)=>(t.display="flex",!0),truncate:()=>!0,relative:(e,t)=>(t.position="relative",!0),absolute:(e,t)=>(t.position="absolute",!0),"pointer-events-none":(e,t)=>(t.pointerEvents="none",!0),"pointer-events-auto":(e,t)=>(t.pointerEvents="auto",!0),"overflow-visible":(e,t)=>(t.overflow="visible",!0),"overflow-hidden":(e,t)=>(t.overflow="hidden",!0),"overflow-scroll":(e,t)=>(t.overflow="scroll",!0),"overflow-x-auto":()=>!0,"overflow-x-scroll":()=>!0,"overflow-y-auto":()=>!0,"overflow-y-scroll":()=>!0,"font-sans":(e,t)=>(t.fontFamily=me("sans")??"sans-serif",!0),"font-serif":(e,t)=>(t.fontFamily=me("serif")??"serif",!0),"font-mono":(e,t)=>(t.fontFamily=me("mono")??"monospace",!0),"font-thin":(e,t)=>(t.fontWeight="100",!0),"font-extralight":(e,t)=>(t.fontWeight="200",!0),"font-light":(e,t)=>(t.fontWeight="300",!0),"font-normal":(e,t)=>(t.fontWeight="400",!0),"font-medium":(e,t)=>(t.fontWeight="500",!0),"font-semibold":(e,t)=>(t.fontWeight="600",!0),"font-bold":(e,t)=>(t.fontWeight="bold",!0),"font-extrabold":(e,t)=>(t.fontWeight="800",!0),"font-black":(e,t)=>(t.fontWeight="900",!0),italic:(e,t)=>(t.fontStyle="italic",!0),"not-italic":(e,t)=>(t.fontStyle="normal",!0),"text-left":(e,t)=>(t.textAlign="left",!0),"text-center":(e,t)=>(t.textAlign="center",!0),"text-right":(e,t)=>(t.textAlign="right",!0),"text-justify":(e,t)=>(t.textAlign="justify",!0),uppercase:(e,t)=>(t.textTransform="uppercase",!0),lowercase:(e,t)=>(t.textTransform="lowercase",!0),capitalize:(e,t)=>(t.textTransform="capitalize",!0),"normal-case":(e,t)=>(t.textTransform="none",!0),underline:(e,t)=>(t.textDecorationLine="underline",!0),"line-through":(e,t)=>(t.textDecorationLine="line-through",!0),"no-underline":(e,t)=>(t.textDecorationLine="none",!0)};function fr(e,t){if(!e.startsWith("bg-"))return!1;let n=e.slice(3),r=ne(n);if(r)return t.backgroundColor=r,!0;return!1}function Ft(e,t){if(!e.startsWith("text-"))return!1;let n=e.slice(5),r=je(n);if(r)return Object.assign(t,r),!0;if(Vt[n])return t.fontSize=Vt[n],!0;if(n.startsWith("[")&&n.endsWith("]")){let o=n.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(o)){let l=o.endsWith("rem")||o.endsWith("em")?Number.parseFloat(o)*16:Number.parseFloat(o);if(Number.isFinite(l))return t.fontSize=l,!0}}let s=ne(n);if(s)return t.color=s,!0;return!1}var pr=new Set(["t","tr","r","br","b","bl","l","tl"]);function gr(e,t){let n=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(e);if(n&&pr.has(n[1]))return t.gradientDirection=`to-${n[1]}`,!0;let r=/^(from|via|to)-(.+)$/.exec(e);if(!r)return!1;let s=ne(r[2]);if(!s)return!1;if(r[1]==="from")t.gradientFrom=s;else if(r[1]==="via")t.gradientVia=s;else t.gradientTo=s;return!0}function hr(e,t){for(let n of["fill","stroke"]){let r=`${n}-`;if(!e.startsWith(r))continue;let s=e.slice(r.length);if(s==="none")return t[n]="none",!0;if(n==="stroke"&&/^\d+(?:\.\d+)?$/.test(s))return t.strokeWidth=Number.parseFloat(s),!0;if(n==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(s))return t.strokeWidth=Number.parseFloat(s.slice(1)),!0;let o=ne(s);if(o)return t[n]=o,!0}return!1}function mr(e,t){if(e.startsWith("p-")){let n=X(e.slice(2));if(n!==void 0)return t.padding=n,!0}if(e.startsWith("px-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingHorizontal=n,!0}if(e.startsWith("py-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingVertical=n,!0}if(e.startsWith("pt-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingTop=n,!0}if(e.startsWith("pr-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingRight=n,!0}if(e.startsWith("pb-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingBottom=n,!0}if(e.startsWith("pl-")){let n=X(e.slice(3));if(n!==void 0)return t.paddingLeft=n,!0}return!1}function Ht(e,t){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(e)){let n={};if(!Ht(e.slice(1),n))return!1;let r=Object.entries(n);if(r.some(([,s])=>typeof s!=="number"))return!1;for(let[s,o]of r)t[s]=-o;return!0}if(e.startsWith("m-")){let n=X(e.slice(2));if(n!==void 0)return t.margin=n,!0}if(e.startsWith("mx-")){let n=X(e.slice(3));if(n!==void 0)return t.marginHorizontal=n,!0}if(e.startsWith("my-")){let n=X(e.slice(3));if(n!==void 0)return t.marginVertical=n,!0}if(e.startsWith("mt-")){let n=X(e.slice(3));if(n!==void 0)return t.marginTop=n,!0}if(e.startsWith("mr-")){let n=X(e.slice(3));if(n!==void 0)return t.marginRight=n,!0}if(e.startsWith("mb-")){let n=X(e.slice(3));if(n!==void 0)return t.marginBottom=n,!0}if(e.startsWith("ml-")){let n=X(e.slice(3));if(n!==void 0)return t.marginLeft=n,!0}return!1}function yr(e,t){if(!e.startsWith("w-"))return!1;let n=e.slice(2);if(n==="full")return t.width="100%",!0;if(n==="screen")return t.width="100%",!0;if(n==="auto")return t.width="auto",!0;if(n.includes("/")){let[s,o]=n.split("/"),l=Number.parseInt(s)/Number.parseInt(o)*100;return t.width=`${l}%`,!0}let r=Ne(n);if(r!==void 0)return t.width=r,!0;return!1}function br(e,t){if(!e.startsWith("h-"))return!1;let n=e.slice(2);if(n==="full")return t.height="100%",!0;if(n==="screen")return t.height="100%",!0;if(n==="auto")return t.height="auto",!0;let r=Ne(n);if(r!==void 0)return t.height=r,!0;return!1}function vr(e,t){if(e==="rounded")return t.borderRadius=Wt.DEFAULT,!0;if(!e.startsWith("rounded-"))return!1;let n=e.slice(8);if(n==="")return!1;let r=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(n),s=Wt[r[2]]??Le(r[2])??He(r[2]);if(s===void 0)return!1;let o={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]?o[r[1]]:["borderRadius"])t[l]=s;return!0}function Sr(e,t){let n=/^border(?:-([trblxy]))?(?:-(\d+|\[[^\]]+\]))?$/.exec(e);if(!n)return!1;let[,r="",s]=n,o=s===void 0?1:Number(s);if(s?.startsWith("[")){let u=/^\[(\d+(?:\.\d+)?|\.\d+)(px|rem)?\]$/.exec(s);if(!u)return!1;o=Number(u[1])*(u[2]==="rem"?16:1)}if(!Number.isFinite(o)||o<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])t[u]=o;return!0}function wr(e,t){if(!e.startsWith("border-"))return!1;let n=e.slice(7),r=ne(n);if(r)return t.borderColor=r,!0;return!1}function Nr(e,t){if(!e.startsWith("opacity-"))return!1;let n=Number.parseInt(e.slice(8));if(!Number.isNaN(n))return t.opacity=n/100,!0;return!1}function xr(e,t,n){if(e.startsWith("tracking-[")){let r=He(e.slice(9),n);if(r===void 0)return!1;return t.letterSpacing=r,!0}if(e.startsWith("leading-")){let r=e.slice(8),s=n,o={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},l=r.startsWith("[")?/^\[[\d.]+\]$/.test(r)?Number.parseFloat(r.slice(1,-1))*s:He(r,s):o[r]!==void 0?o[r]*s:qe[r];if(l===void 0||!Number.isFinite(l))return!1;return t.lineHeight=l,!0}return!1}function kr(e,t){let n=/^(-?)(inset-x|inset-y|inset|top|right|bottom|left)-(.+)$/.exec(e);if(!n)return!1;let r=n[3],s=/^\[(-?[\d.]+)px\]$/.exec(r),o=s?Number(s[1]):qe[r];if(o===void 0||!Number.isFinite(o))return!1;let l=n[1]?-o:o,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)t[d]=l;return!0}function Rr(e,t){let n=/^grid-cols-\[(.+)\]$/.exec(e);if(n)return t.gridColumns=n[1].split("_").filter(Boolean).length,!0;let r=/^grid-cols-(\d+)$/.exec(e);if(!r)return!1;return t.gridColumns=Number(r[1]),!0}function Tr(e,t){if(!e.startsWith("size-"))return!1;let n=e.slice(5),r=n==="full"?"100%":Ne(n);if(r===void 0)return!1;return t.width=r,t.height=r,!0}var Ar={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function _r(e,t){let n=/^(min|max)-(w|h)-(.+)$/.exec(e);if(!n)return!1;let[,r,s,o]=n,l=o==="full"||o==="screen"?"100%":o==="none"?void 0:s==="w"&&r==="max"&&Ar[o]||Ne(o);if(l===void 0&&o!=="none")return!1;let u=`${r}${s==="w"?"Width":"Height"}`;if(l===void 0)delete t[u];else t[u]=l;return!0}function Er(e,t){let n=/^(-?)(top|right|bottom|left)-(.+)$/.exec(e);if(!n)return!1;let r=n[3]==="full"?"100%":X(n[3]);if(r===void 0)return!1;return t[n[2]]=typeof r==="number"&&n[1]?-r:r,!0}function Cr(e,t){let n=/^(-?)translate-(x|y)-(.+)$/.exec(e);if(!n)return!1;let r=n[3],s;if(r.startsWith("[")){let u=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(r);if(!u)return!1;s=Number(u[1])*(u[2]?.endsWith("em")?16:1)}else s=X(r);if(s===void 0||!Number.isFinite(s))return!1;if(n[1])s=-s;let o=n[2]==="x"?"translateX":"translateY",l=o==="translateX"?{translateX:s}:{translateY:s};return t.transform=[...(t.transform??[]).filter((u)=>!(o in u)),l],!0}function Or(e,t){let n=/^space-(x|y)-(.+)$/.exec(e);if(!n)return!1;let r=X(n[2]);if(r===void 0)return!1;return t.gap=r,!0}function Ir(e,t){if(e.startsWith("gap-")){let n=X(e.slice(4));if(n!==void 0)return t.gap=n,!0}if(e.startsWith("gap-x-")){let n=X(e.slice(6));if(n!==void 0)return t.columnGap=n,!0}if(e.startsWith("gap-y-")){let n=X(e.slice(6));if(n!==void 0)return t.rowGap=n,!0}return!1}function Pr(e,t){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]}[e];if(!r)return!1;let[s,o,l,u]=r;return Object.assign(t,{shadowColor:"#000000",shadowOpacity:l,shadowRadius:s,shadowOffset:{width:0,height:o},elevation:u}),!0}function Mr(e){let t=/^divide-(?:(y|x)(?:-(.+))?|(.+))$/.exec(e);if(!t)return null;if(t[2]==="reverse")return"";if(t[1])return`border-${t[1]==="y"?"t":"l"}${t[2]?`-${t[2]}`:""}`;return`border-${t[3]}`}var qt=new Set(["aria-selected","aria-pressed","aria-checked","aria-expanded"]),Br=new Set(["hover","group-hover","peer-hover","active","group-active","visited","placeholder","selection","print","motion-safe"]),Xt=/^(?: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 Gt(e){let t=[],n=0,r=0;for(let s=0;s<e.length;s++){let o=e[s];if(o==="[")n++;else if(o==="]")n=Math.max(0,n-1);else if(o===":"&&n===0)t.push(e.slice(r,s)),r=s+1}return t.push(e.slice(r)),t}function Kt(e,t=new Set){let n=Gt(e),r=n[n.length-1],s=t.has(r)?void 0:It(r);if(s===void 0)return[e];let o=n.slice(0,-1).map((u)=>`${u}:`).join(""),l=new Set(t).add(r);return s.split(/\s+/).filter(Boolean).flatMap((u)=>Kt(`${o}${u}`,l))}function Ue(e){if(/^transition(?:-(?:all|colors|opacity|shadow|transform))?$/.test(e))return 150;if(e==="transition-none")return 0;let t=/^duration-(\d+)$/.exec(e);return t?Number(t[1]):void 0}var zt=new WeakMap,ve={};function Dr(e,t){let n=Et(),r=zt.get(n);if(!r)zt.set(n,r=new WeakMap);let s=r.get(e??ve);if(!s)r.set(e??ve,s=new WeakMap);let o=s.get(t??ve);if(!o)s.set(t??ve,o=new Map);return o}function xe(e,t={}){return`${t.focus?1:0}${t.focusWithin?1:0}${t.pointer?1:0}${t.appearance??""}|${e}`}function re(e,t,n={}){let r=Dr(t,n.rules),s=xe(e,n),o=r.get(s);if(!o){if(r.size>=4096)r.clear();r.set(s,o=Lr(e,t,n))}return o}function Lr(e,t,n){let r=new Map,s,o,l=(c,b)=>{if(!r.has(c))r.set(c,{...b,classes:[],authored:new Map});return r.get(c)};l("base",{});let u=[],d=[],f=e.split(/\s+/).filter(Boolean);if(n.rules){let c=new Set(f);for(let b of Object.keys(n.rules))if(b.includes(".")&&b.split(".").every((p)=>c.has(p)))d.push(b);d.sort((b,p)=>b.split(".").length-p.split(".").length)}for(let c of f){if(n.rules&&Object.hasOwn(n.rules,c)){u.push(c);continue}for(let b of Kt(c)){let p=Gt(b),N=p.pop(),S=p.some((k)=>k.startsWith("focus"));if(p.some((k)=>/^(?:group-|peer-)?focus(?:-visible|-within)?$/.test(k))&&/^(?:ring|outline)(?:-|$)/.test(N))continue;if(n.pointer&&p.length===0&&Ue(N)!==void 0){if(N.startsWith("duration-"))o=Ue(N);else s=Ue(N);continue}let R=p.filter((k)=>k!=="dark"),w=n.pointer&&R.length===1&&p.length-R.length<=1&&(R[0]==="hover"||R[0]==="active")?R[0]:void 0;if(w&&!Xt.test(N)){let k=l(`pointer:${w}`,{pointerState:w}),T=p.includes("dark")?`dark:${N}`:N;if(k.classes.push(T),!k.authored.has(T))k.authored.set(T,c===b?b:`${c} (${b})`);continue}if(Xt.test(N)||!S&&p.some((k)=>Br.has(k)))continue;let A,I,D=!1,_,L=[];for(let k of p){let T=Fe(k),E=k.startsWith("max-")?Fe(k.slice(4)):void 0;if(T!==void 0&&A===void 0)A=T;else if(E!==void 0&&I===void 0)I=E-0.02;else if(k==="disabled"&&!D)D=!0;else if(qt.has(k)&&_===void 0)_=k;else L.push(k)}let V=[...L,N].join(":"),C=A!==void 0||I!==void 0,O=D?l("disabled",{disabled:!0}):_?l(`state:${_}`,{state:_}):C?l(`range:${A??0}:${I??""}`,{min:A??0,max:I}):r.get("base");if((D||_)&&(C||D&&_)){r.get("base").authored.set(b,c),r.get("base").classes.push(b);continue}if(O.classes.push(V),!O.authored.has(V))O.authored.set(V,c===b?b:`${c} (${b})`)}}let g=[...u,...d],h=(c,b)=>b.map((p)=>c.authored.get(p)??p),y=r.get("base"),m=we(y.classes.join(" "),t,n),x=new Map;if(g.length){let c=(N)=>N?be(N,()=>{},{inheritedVariables:t}):{},b={},p={};for(let N of g){let S=n.rules[N];b={...b,...c(S.light)},p={...p,...c(S.dark)};for(let R of S.responsive??[]){let w=`${R.min}:${R.max??""}`,A=x.get(w)??{min:R.min,...R.max===void 0?{}:{max:R.max},style:{}};if(A.style={...A.style,...c(R.light)},R.dark)A.dark={...A.dark,...c(R.dark)};x.set(w,A)}}if(m.style={...b,...m.style},Object.keys(p).length)m.dark={...p,...m.dark}}m.unknown=h(y,m.unknown);let v=[];for(let c of r.values()){if(c===y)continue;let b=we(c.classes.join(" "),t,{appearance:n.appearance});m.unknown=[...new Set([...m.unknown,...h(c,b.unknown)])];let p={style:b.style,...b.dark?{dark:b.dark}:{}};if(c.pointerState)(m.pointer??={})[c.pointerState]=p;else if(c.disabled)m.disabled=p;else if(c.state)(m.states??={})[c.state]=p;else v.push({min:c.min??0,...c.max===void 0?{}:{max:c.max},...p})}for(let c of x.values()){let b=v.find((p)=>p.min===c.min&&p.max===c.max);if(b){if(b.style={...c.style,...b.style},c.dark||b.dark)b.dark={...c.dark,...b.dark}}else v.push(c)}if(v.length)m.responsive=v.sort((c,b)=>c.min-b.min||(c.max??1/0)-(b.max??1/0));if(s!==void 0&&s>0)m.style={...m.style,transitionDuration:o??s};return m}function we(e,t,n={}){let r=[],s=[],o=[],l=[],u={focus:{classes:[],originals:new Map},focusWithin:{classes:[],originals:new Map}},d=new Map;function f(p,N){let S=/^(bg|text|border(?:-[trblxy])?|from|via|to|fill|stroke|divide|decoration|caret|accent)-(.+?)(\/[^\s]+)?$/.exec(p),R=S&&Pt(S[2]);if(S&&R){let _=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+?)\s*)?\)$/.exec(R),L=_?t?.get(_[1])??_[2]:R;if(L&&/^(?:#[0-9a-f]{3,8}|rgba?\(.+\)|hsla?\(.+\))$/i.test(L))return[`${S[1]}-[${L.replace(/\s+/g,"")}]${S[3]||""}`]}let w=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(p),A=w&&_t[w[2]];if(A){let _=t?.get(Qe(w[2]));return[`${w[1]}-${_===void 0?A[N]:`[${_}]`}${w[3]||""}`]}let I=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(p);if(I&&Se[I[2]]){let _=Le(I[2],t);return _===void 0?void 0:[`rounded-${I[1]?`${I[1]}-`:""}[${_}px]`]}let D=p.startsWith("text-")?p.slice(5):"";if(ur[D]){let _=je(D,t);return _&&[`text-[${_.fontSize}px]`,`leading-[${_.lineHeight}px]`]}for(let _ of Object.keys(lr)){if(!p.endsWith(`-${_}`))continue;let L=$e(_,t);return L===void 0?void 0:[`${p.slice(0,-_.length)}[${L}px]`]}return[p]}function g(p,N){if(!d.has(p))d.set(p,new Set);return d.get(p).add(N),p}let h=[],y=new Map;for(let p of e.split(/\s+/).filter(Boolean)){let N=p.startsWith("dark:")?p.slice(5):p,S=Mr(N);if(S!==null){let A=S&&`${p===N?"":"dark:"}${S}`;if(A)h.push(A),y.set(A,p);continue}let R=/^(dark:)?(focus|focus-within):(dark:)?(.+)$/.exec(p),w=R?.[2]==="focus"?"focus":"focusWithin";if(R&&n[w]&&!(R[1]&&R[3])){let A=`${R[1]||R[3]?"dark:":""}${R[4]}`,I=u[w];I.classes.push(A),I.originals.set(A,[...I.originals.get(A)??[],p]);continue}if(p.startsWith("dark:")){let A=f(p.slice(5),"dark");if(!A)l.push(p);else s.push(...A.map((I)=>g(I,p)))}else if(!p.includes(":")||p.startsWith("[")){let A=f(p,n.appearance??"light"),I=f(p,"dark");if(!A||!I){l.push(p);continue}if(r.push(...A.map((D)=>g(D,p))),I.join(" ")!==A.join(" "))o.push(...I.map((D)=>g(D,p)))}else l.push(p)}let m=[],x=Ut(r,m),v={style:x,unknown:m},c=[...n.appearance===void 0?o:[],...s];if(c.length)v.dark=Ut(c,m);if(x.transform&&v.dark?.transform){let p=new Set(v.dark.transform.flatMap((N)=>Object.keys(N)));v.dark.transform=[...x.transform.filter((N)=>!Object.keys(N).some((S)=>p.has(S))),...v.dark.transform]}for(let p of r){if(p==="truncate"||p==="whitespace-nowrap")v.numberOfLines=1;let N=/^object-(cover|contain|fill)$/.exec(p);if(N)v.resizeMode=N[1]==="fill"?"stretch":N[1];let S=/^line-clamp-(\d+)$/.exec(p);if(S)v.numberOfLines=Number(S[1]);if(!v.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(p))v.icon=p}let b=m.flatMap((p)=>[...d.get(p)??[p]]);if(v.unknown=[...new Set([...b.filter((p)=>!/^line-clamp-\d+$/.test(p)),...l])],h.length){let p=we(h.join(" "),t,{appearance:n.appearance});v.divide={style:p.style,...p.dark?{dark:p.dark}:{}},v.unknown=[...new Set([...v.unknown,...p.unknown.map((N)=>y.get(N)??N)])]}for(let p of["focus","focusWithin"]){let N=u[p];if(!N.classes.length)continue;let S=we(N.classes.join(" "),t,{appearance:n.appearance});v[p]={style:S.style,dark:S.dark},v.unknown=[...new Set([...v.unknown,...S.unknown.flatMap((R)=>N.originals.get(R)??[R])])];for(let R of N.classes)if(/^(?:dark:)?(?:truncate|line-clamp-\d+|i-[a-z0-9]+-.+)$/.test(R))v.unknown.push(...N.originals.get(R))}return v}function Ut(e,t){let n={},r=Array.isArray(e)?e:e.split(/\s+/).filter(Boolean),s={};for(let l of r)if(l.startsWith("text-"))Ft(l,s);let o=typeof s.fontSize==="number"?s.fontSize:16;for(let l of r){if(/^i-[a-z0-9]+-/.test(l))continue;let u=dr[l];if(u){u("",n);continue}if(Pr(l,n))continue;if(gr(l,n))continue;if(fr(l,n))continue;if(hr(l,n))continue;if(Ft(l,n))continue;if(mr(l,n))continue;if(Ht(l,n))continue;if(yr(l,n))continue;if(br(l,n))continue;if(vr(l,n))continue;if(Sr(l,n))continue;if(wr(l,n))continue;if(Nr(l,n))continue;if(Ir(l,n))continue;if(xr(l,n,o))continue;if(Tr(l,n))continue;if(_r(l,n))continue;if(Rr(l,n))continue;let d=/^aspect-\[(\d+(?:\.\d+)?)\/(\d+(?:\.\d+)?)\]$/.exec(l);if(d&&Number(d[2])>0){n.aspectRatio=Number(d[1])/Number(d[2]);continue}let f=/^z-\[(-?\d+)\]$/.exec(l)??/^z-(\d+)$/.exec(l);if(f){n.zIndex=Number(f[1]);continue}if(l==="z-auto")continue;if(kr(l,n))continue;let g=/^order-\[(-?\d+)\]$/.exec(l)??/^order-(-?\d+)$/.exec(l);if(g){n.order=Number(g[1]);continue}if(Er(l,n))continue;if(Cr(l,n))continue;if(Or(l,n))continue;if(t?.push(l),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${l}`)}return n}function Jt(e){let t=new Map,n=(d)=>{if(typeof d==="string")return;if(d._classes)t.set(d._classes,t.get(d._classes)===!0||d.type==="TextInput");for(let f of d.children)n(f)};if(n(e),!t.size)return;let r=[],s=new Map,o=(d)=>{let f=JSON.stringify(d),g=s.get(f);if(g===void 0)g=r.push(d)-1,s.set(f,g);return g},l={entries:r,plain:{},light:{},dark:{}};for(let d of t.keys())l.plain[xe(d)]=o(re(d));let u=e._stylesheetRules;for(let d of["light","dark"]){let f=te(e._stylesheetTheme?.[d]??[]).computed();for(let[g,h]of t){let y=`${g} `;for(let m of[{focus:h,focusWithin:!0,appearance:d,pointer:!1},{focus:h,focusWithin:!0,appearance:d,pointer:!0},{focus:h,focusWithin:!0}])l[d][xe(y,m)]=o(re(y,f,{...m,rules:u}))}}return l}import $r from"path";var Yt=new Map;function Qt(e,t){if(!e)return;let n=e.trim(),r=n.lastIndexOf("-"),s=r===-1?t[n]:t[n.slice(0,r)],o=r===-1?s:s?.[n.slice(r+1)];if(typeof o==="string"&&/^#[\da-f]{3,8}$/i.test(o))return o;return Ge(n)??Ge(`[${n}]`)}function jr(e){let t=e.roles??{},n=e.shapes??{},r=e.density??{},s={...e.theme?.colors,...e.theme?.extend?.colors},o=[],l=[];for(let[u,d]of Object.entries(t)){if(!_t[u])continue;let f=Qt(typeof d==="string"?d:d?.light,s),g=Qt(typeof d==="string"?d:d?.dark,s);if(f)o.push(`${Qe(u)}: ${f};`);if(g)l.push(`${Qe(u)}: ${g};`)}for(let[u,d]of Object.entries(n))if(Se[u])o.push(`${gn(u)}: ${d};`);for(let[u,d]of Object.entries(r))if(Me[u])o.push(`${et(u)}: ${d};`);return[o.length?`:root { ${o.join(" ")} }`:"",l.length?`.dark { ${l.join(" ")} }`:""].filter(Boolean).join(`
3
+ `)}async function Vr(e){let{resolveUserCssConfig:t}=await import("./chunk-gmm3kffd.js"),n=await t(e);return n?jr(n):""}function Zt(e){let t=$r.resolve(e),n=Yt.get(t);if(!n)n=Vr(t).catch(()=>""),Yt.set(t,n);return n}var tn={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},en={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 Ke(e){return e==="role"||e==="aria-label"||e==="aria-valuetext"||e in tn}function Fr(e,t){if(t===void 0||t===null)return;let n=String(t).trim().toLowerCase();if(n==="mixed")return e==="aria-checked"?"mixed":!0;if(n==="undefined")return;return n===""||n==="true"}function Xr(e){if(e===void 0||e===null)return null;for(let t of String(e).trim().toLowerCase().split(/\s+/))if(en[t])return en[t];return null}function zr(e,t,n){if(e==="aria-label")return{accessibilityLabel:t===void 0||t===null||t===""?null:String(t)};if(e==="aria-valuetext")return{accessibilityValue:t===void 0||t===null||t===""?null:String(t)};if(e==="role")return{accessibilityRole:Xr(t)};let r=tn[e];if(!r)return;let s=n.accessibilityState,o=s&&typeof s==="object"?{...s}:{},l=Fr(e,t);if(l===void 0)delete o[r];else o[r]=l;return{accessibilityState:Object.keys(o).length?o:null}}function Hr(e){let t=e.accessibilityState&&typeof e.accessibilityState==="object"?e.accessibilityState:void 0,n={};for(let[s,o]of Object.entries(e)){if(!Ke(s))continue;let l=zr(s,o,n);if(l)Object.assign(n,l)}for(let s of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(e[s]===void 0&&n[s]!==void 0&&n[s]!==null)e[s]=n[s];let r=n.accessibilityState;if(r)e.accessibilityState={...r,...t}}var ue=["accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue"];function Je(e,t){let n=t==="Image";if(!n){let s=Object.keys(e);for(let o=0;o<s.length&&!n;o++)n=Ke(s[o])||ue.includes(s[o])}if(!n)return{};let r={...e};if(Hr(r),t==="Image"&&r.accessibilityLabel===void 0&&e.alt!=null&&e.alt!=="")r.accessibilityLabel=String(e.alt);return Object.fromEntries(ue.filter((s)=>(s in r)).map((s)=>[s,r[s]]))}var rn=["keyboardType","secureTextEntry","returnKeyType","autoCapitalize","autoCorrect","editable","autoComplete"],qr=new Set(["type","inputmode","inputMode","enterkeyhint","enterKeyHint","autoCapitalize","autoCorrect","spellcheck","readonly","readOnly","disabled",...rn]),Gr={numeric:"number-pad",decimal:"decimal-pad",tel:"phone-pad",email:"email-address",url:"url",search:"web-search",text:"default"},Kr={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}},Jr={enter:"default",done:"done",go:"go",next:"next",previous:"default",search:"search",send:"send"};function oe(e){return e===void 0||e===null?"":String(e).trim().toLowerCase()}function nn(e){if(e===void 0||e===null||e===!1)return!1;return oe(e)!=="false"}function Ye(e,...t){for(let n of t)if(e[n]!==void 0&&e[n]!==null)return e[n];return}function sn(e,t){if(e!=="TextInput")return{};let n={},r=oe(t.type),s=Kr[r]??{},o=oe(Ye(t,"inputmode","inputMode")),l=Gr[o]??s.keyboardType;if(l&&l!=="default")n.keyboardType=l;if(s.secure)n.secureTextEntry=!0;let u=oe(Ye(t,"enterkeyhint","enterKeyHint")),d=Jr[u]??s.returnKeyType;if(d&&d!=="default")n.returnKeyType=d;let f=oe(t.autoCapitalize);if(f==="off"||f==="none")n.autoCapitalize="none";else if(f==="on")n.autoCapitalize="sentences";else if(!f&&s.verbatim)n.autoCapitalize="none";let g=t.autoCorrect;if(g==="off"||g==="false"||oe(t.spellcheck)==="false"||g===void 0&&s.verbatim)n.autoCorrect=!1;else if(g==="on"||g==="true")n.autoCorrect=!0;if(nn(Ye(t,"readonly","readOnly"))||nn(t.disabled))n.editable=!1;if(s.autoComplete)n.autoComplete=s.autoComplete;return Object.fromEntries(Object.entries(n).filter(([h])=>t[h]===void 0||Yr(h,t[h])))}function Yr(e,t){if(e==="autoCapitalize")return t==="off"||t==="on";if(e==="autoCorrect")return typeof t==="string";return!1}function on(e){let t=sn(e.type,e.props);if(!Object.keys(t).length)return;e._textEntrySource=Object.fromEntries(rn.filter((n)=>(n in e.props)).map((n)=>[n,e.props[n]])),Object.assign(e.props,t)}var ke={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut","long-press":"onLongPress",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","accept-completion":"onAcceptCompletion",acceptcompletion:"onAcceptCompletion","selection-change":"onSelectionChange",selectionchange:"onSelectionChange","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","page-selected":"onPageSelected",pageselected:"onPageSelected",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",dragstart:"onDragStart","drag-start":"onDragStart",dragover:"onDragOver","drag-over":"onDragOver",dragleave:"onDragLeave","drag-leave":"onDragLeave",drop:"onDrop",dragend:"onDragEnd","drag-end":"onDragEnd","hover-change":"onHoverChange",hoverchange:"onHoverChange",keydown:"onKeyPress",keypress:"onKeyPress"};var tt={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText",animate:"Animate"},nt=new Set(Object.values(tt));var cn=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),un=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight","attributeName","keyTimes","repeatCount"];function z(e){let t=typeof e==="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function Z(e){return Math.round(e*1000)/1000}function rt(e){if(Array.isArray(e)&&e.length===4&&e.every((n)=>Number.isFinite(Number(n))))return e.map(Number);let t=String(e??"").trim().split(/[\s,]+/).map(Number);if(t.length!==4||t.some((n)=>!Number.isFinite(n))||t[2]<=0||t[3]<=0)return null;return t}function Qr(e){let t=String(e??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return t.length%2?t.slice(0,-1):t}var an=/[MLHVCSQTAZ]/i,Ze=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Zr(e){let t=[],n=e,r=an.exec(n);while(r){let s=r.index;n=n.slice(s);let o=n[0];n=n.slice(1);let l=an.exec(n),u=l?n.slice(0,l.index):n,d;if(o==="A"||o==="a"){d=[];let f=0,g=u.trim(),h=0;while(h<g.length){let y=f%7,m=g.slice(h).replace(/^[\s,]+/,"");if(h=g.length-m.length,!m)break;if(y===3||y===4)d.push(m[0]==="1"?1:0),h+=1;else{Ze.lastIndex=0;let x=Ze.exec(m);if(!x||x.index!==0)break;d.push(Number.parseFloat(x[0])),h+=x[0].length}f++}}else d=(u.match(Ze)||[]).map(Number.parseFloat);t.push({command:o,args:d}),r=l}return t}function ei(e,t,n,r,s,o,l,u,d){if(e===u&&t===d)return[];let f=Math.abs(n),g=Math.abs(r);if(!f||!g)return[1,u,d];let h=s*Math.PI/180,y=Math.cos(h),m=Math.sin(h),x=(e-u)/2,v=(t-d)/2,c=y*x+m*v,b=-m*x+y*v,p=c*c/(f*f)+b*b/(g*g);if(p>1)f*=Math.sqrt(p),g*=Math.sqrt(p);let N=f*f*g*g-f*f*b*b-g*g*c*c,S=f*f*b*b+g*g*c*c,R=Math.sqrt(Math.max(0,N/S));if(o===l)R=-R;let w=R*(f*b)/g,A=R*-(g*c)/f,I=y*w-m*A+(e+u)/2,D=m*w+y*A+(t+d)/2,_=(B,W,P,j)=>{let Y=B*j-W*P<0?-1:1,Q=(B*P+W*j)/(Math.hypot(B,W)*Math.hypot(P,j));return Y*Math.acos(Math.min(1,Math.max(-1,Q)))},L=_(1,0,(c-w)/f,(b-A)/g),V=_((c-w)/f,(b-A)/g,(-c-w)/f,(-b-A)/g);if(!l&&V>0)V-=2*Math.PI;if(l&&V<0)V+=2*Math.PI;let C=Math.max(1,Math.ceil(Math.abs(V)/(Math.PI/2))),O=V/C,k=1.3333333333333333*Math.tan(O/4),T=[],E=(B)=>{let W=f*Math.cos(B),P=g*Math.sin(B);return[y*W-m*P+I,m*W+y*P+D]},M=(B)=>{let W=-f*Math.sin(B),P=g*Math.cos(B);return[y*W-m*P,m*W+y*P]},F=L;for(let B=0;B<C;B++){let W=F+O,[P,j]=E(F),[Y,Q]=M(F),[U,K]=E(W),[ee,q]=M(W);T.push(2,P+k*Y,j+k*Q,U-k*ee,K-k*q,B===C-1?u:U,B===C-1?d:K),F=W}return T}function dn(e){let t=[],n=0,r=0,s=0,o=0,l=0,u=0,d=0,f=0,g="";for(let{command:h,args:y}of Zr(String(e??""))){let m=h===h.toLowerCase(),x=h.toUpperCase(),v=()=>m?n:0,c=()=>m?r:0,b=0,p=(S)=>{if(b+S>y.length)return null;let R=y.slice(b,b+S);return b+=S,R};if(x==="Z"){t.push(4),n=s,r=o,g="Z";continue}let N=!0;while(b<y.length||N&&x==="Z"){switch(x){case"M":{let S=p(2);if(!S)return t;if(n=S[0]+v(),r=S[1]+c(),N)t.push(0,n,r),s=n,o=r;else t.push(1,n,r);g=N?"M":"L";break}case"L":{let S=p(2);if(!S)return t;n=S[0]+v(),r=S[1]+c(),t.push(1,n,r),g="L";break}case"H":{let S=p(1);if(!S)return t;n=S[0]+v(),t.push(1,n,r),g="L";break}case"V":{let S=p(1);if(!S)return t;r=S[0]+c(),t.push(1,n,r),g="L";break}case"C":{let S=p(6);if(!S)return t;let R=S[0]+v(),w=S[1]+c();l=S[2]+v(),u=S[3]+c(),n=S[4]+v(),r=S[5]+c(),t.push(2,R,w,l,u,n,r),g="C";break}case"S":{let S=p(4);if(!S)return t;let R=g==="C"?2*n-l:n,w=g==="C"?2*r-u:r;l=S[0]+v(),u=S[1]+c(),n=S[2]+v(),r=S[3]+c(),t.push(2,R,w,l,u,n,r),g="C";break}case"Q":{let S=p(4);if(!S)return t;d=S[0]+v(),f=S[1]+c(),n=S[2]+v(),r=S[3]+c(),t.push(3,d,f,n,r),g="Q";break}case"T":{let S=p(2);if(!S)return t;d=g==="Q"?2*n-d:n,f=g==="Q"?2*r-f:r,n=S[0]+v(),r=S[1]+c(),t.push(3,d,f,n,r),g="Q";break}case"A":{let S=p(7);if(!S)return t;let R=S[5]+v(),w=S[6]+c();t.push(...ei(n,r,S[0],S[1],S[2],S[3],S[4],R,w)),n=R,r=w,g="A";break}default:return t}N=!1}}return t.map((h)=>Z(h))}function ln(e,t,n,r){if(n<=0||r<=0)return[];let s=0.5522847498;return[0,e+n,t,2,e+n,t+s*r,e+s*n,t+r,e,t+r,2,e-s*n,t+r,e-n,t+s*r,e-n,t,2,e-n,t-s*r,e-s*n,t-r,e,t-r,2,e+s*n,t-r,e+n,t-s*r,e+n,t,4].map(Z)}function it(e,t){switch(e){case"Path":return dn(String(t.d??""));case"Line":return[0,z(t.x1),z(t.y1),1,z(t.x2),z(t.y2)].map(Z);case"Rect":{let n=z(t.x),r=z(t.y),s=z(t.width),o=z(t.height);if(s<=0||o<=0)return[];let l=t.rx===void 0?z(t.ry):z(t.rx),u=t.ry===void 0?l:z(t.ry);if(l=Math.min(Math.max(0,l),s/2),u=Math.min(Math.max(0,u),o/2),!l||!u)return[0,n,r,1,n+s,r,1,n+s,r+o,1,n,r+o,4].map(Z);let d=0.5522847498;return[0,n+l,r,1,n+s-l,r,2,n+s-l+d*l,r,n+s,r+u-d*u,n+s,r+u,1,n+s,r+o-u,2,n+s,r+o-u+d*u,n+s-l+d*l,r+o,n+s-l,r+o,1,n+l,r+o,2,n+l-d*l,r+o,n,r+o-u+d*u,n,r+o-u,1,n,r+u,2,n,r+u-d*u,n+l-d*l,r,n+l,r,4].map(Z)}case"Circle":return ln(z(t.cx),z(t.cy),z(t.r),z(t.r));case"Ellipse":return ln(z(t.cx),z(t.cy),z(t.rx),z(t.ry));case"Polyline":case"Polygon":{let n=Qr(t.points);if(n.length<4)return[];let r=[0,n[0],n[1]];for(let s=2;s<n.length;s+=2)r.push(1,n[s],n[s+1]);if(e==="Polygon")r.push(4);return r.map(Z)}default:return null}}function ti(e){let t=/^\s*(\d+(?:\.\d+)?|\.\d+)\s*(ms|s)?\s*$/.exec(String(e??""));if(!t)return null;let n=Number(t[1])/(t[2]==="ms"?1000:1);return n>0?n:null}function ni(e){if(e.attributeName!=="d")return null;let t=ti(e.dur),n=String(e.values??"").split(";").map((u)=>u.trim()).filter(Boolean);if(t===null||n.length<2)return null;let r=n.map(dn);if(r.some((u)=>!u.length))return null;let s=String(e.keyTimes??"").split(";").map((u)=>u.trim()).filter(Boolean).map(Number),l=s.length===r.length&&s[0]===0&&s[s.length-1]===1&&s.every((u,d)=>Number.isFinite(u)&&(d===0||u>=s[d-1]))?s.map(Z):r.map((u,d)=>Z(d/(r.length-1)));return{frames:r,frameTimes:l,duration:t}}function st(e){let t=ni(e),n={frames:t?.frames??null,frameTimes:t?.frameTimes??null,duration:t?.duration??null};for(let[r,s]of Object.entries(n))if(s===null)delete e[r];else e[r]=s;return n}var ri=[...un,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","barStyle","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","objectFit","objectPosition","onEndReachedThreshold","pageIndex","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","ghostText","rowHeight","labelFontSize","pictureInPicture","transitionID","dragData","dragURL","dropTypes","dropInside","selectTextOnFocus"],fn=new Set(["alwaysBounceHorizontal","alwaysBounceVertical","animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","draggable","dropInside","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"]),ii=new Map(ri.map((e)=>[pn(e),e]));function pn(e){return e.replace(/[-_]/g,"").toLowerCase()}var Re=new Map;function ot(e,t){if((t==="Image"||t==="Video")&&e.toLowerCase()==="src")return"source";let n=Re.get(e);if(n===void 0){if(n=ii.get(pn(e))??e,Re.size>=2000)Re.clear();Re.set(e,n)}return n}var si={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",webview:"WebView",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 hn(e){return si[e.toLowerCase()]||e}var oi={"circle-pause":"pause.circle","cloud-alert":"exclamationmark.icloud","key-round":"key",paperclip:"paperclip","rotate-cw":"arrow.clockwise","route-off":"location.slash",syringe:"syringe","volume-1":"speaker.wave.1",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-question-mark":"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"},mn={lucide:oi,hugeicons:{"workout-run":"figure.run"}};function de(e,t=!1){let n=String(e??"").trim();if(!n)return{symbol:"questionmark.square.dashed",known:!1};if(t)return{symbol:n,known:!0};let r=/^i-([a-z0-9]+)-(.+)$/.exec(n)??/^([a-z0-9]+):(.+)$/.exec(n),s=r?r[1]:"lucide",o=r?r[2]:n,l=Object.hasOwn(mn,s)?mn[s]:void 0;if(l&&Object.hasOwn(l,o))return{symbol:l[o],iconify:`i-${s}-${o}`,known:!0};if(!r&&n.includes("."))return{symbol:n,known:!0};return{symbol:"questionmark.square.dashed",iconify:r?n:`i-lucide-${o}`,known:!1}}function at(e){return e.split(/\s+/).find((t)=>/^i-[a-z0-9]+-[a-z0-9-]+$/.test(t))}import{generate as Te,parse as ai}from"@stacksjs/ts-css/parse";var li=/^(?::hover|:active|:visited|:focus|:focus-visible|:focus-within)$/;function ci(e){let t=e.replace(/\s+/g,"").toLowerCase();if(!t||t==="all"||t==="screen")return{};if(/^(?:screenand)?\(prefers-color-scheme:dark\)$/.test(t))return{dark:!0};if(/^(?:screenand)?\(prefers-color-scheme:light\)$/.test(t))return{};if(/prefers-reduced-motion|\(hover|\(pointer|print|forced-colors|prefers-contrast/.test(t))return"skip";let n=t.replace(/^screenand/,"").split("and"),r={};for(let s of n){let o=/^\((min|max)-width:([\d.]+)(px|rem|em)\)$/.exec(s);if(!o)return;r[o[1]]=Number(o[2])*(o[3]==="px"?1:16)}return r}async function yn(e,t){let n={},r=new Set,s=(f)=>{if(r.has(f))return;r.add(f),t(f,[...f.matchAll(/\.(-?[a-z_][\w-]*)/gi)].map((g)=>g[1]))},o=(f,g,h)=>{if(!g.trim())return;let y=n[f]??={},m=h.dark?"dark":"light";if(h.min===void 0&&h.max===void 0){y[m]=y[m]?`${y[m]};${g}`:g;return}let x=y.responsive??=[],v=h.min??0,c=x.find((b)=>b.min===v&&b.max===h.max);if(!c)x.push(c={min:v,...h.max===void 0?{}:{max:h.max}});c[m]=c[m]?`${c[m]};${g}`:g};function l(f,g){for(let h of f){if(h.type==="Atrule"){let x=h.name.toLowerCase();if(["font-face","keyframes","-webkit-keyframes","import","charset","property","page","layer"].includes(x)){if(x==="layer"&&h.block)l(h.block.children,g);continue}if(x!=="media"||!h.block){s(`@${x}`);continue}let v=h.prelude?Te(h.prelude):"",c=ci(v);if(c==="skip")continue;if(!c){s(`@media ${v}`);continue}l(h.block.children,{dark:g.dark||c.dark,min:c.min??g.min,max:c.max??g.max});continue}if(h.type!=="Rule"||h.block.type!=="Block")continue;let y=[...h.block.children].filter((x)=>x.type==="Declaration").map((x)=>Te(x)).join(";"),m=h.prelude.type==="SelectorList"?[...h.prelude.children].map(Te):[Te(h.prelude)];for(let x of m){let v=/^(?:(?:html|:root)?\.dark\s+)?((?:\.-?[a-z_][\w-]*)+)((?::{1,2}[a-z-]+)*)$/i.exec(x.trim());if(!v){if(!/^(?:html|:root|body|\*|::?[a-z-]+)/i.test(x.trim()))s(x.trim());continue}let c=v[2];if(c){if(!li.test(c))s(x.trim());continue}let b=g.dark||/^(?:(?:html|:root)?\.dark\s+)/i.test(x.trim());o(v[1].slice(1),y,{dark:b,min:g.min,max:g.max})}}}let u="",d=!0;await new HTMLRewriter().on("style",{element(f){u="";let g=f.getAttribute("type");d=!g||g.toLowerCase()==="text/css",f.onEndTag(()=>{if(!d)return;try{let h=ai(u);if(h.type==="StyleSheet")l(h.children,{})}catch{s("invalid stylesheet")}})},text(f){u+=f.text}}).transform(new Response(e)).text();for(let f of Object.values(n))f.responsive?.sort((g,h)=>g.min-h.min||(g.max??1/0)-(h.max??1/0));return n}import{generate as fe,parse as bn}from"@stacksjs/ts-css/parse";async function vn(e,t){let n={light:new Map,dark:new Map},r=new Set,s=(h)=>{if(!r.has(h))r.add(h),t(h)},o=(h,y,m)=>{for(let x of m){let v=n[x].get(h);if(!v||Number(y.important)>Number(v.important)||y.important===v.important&&y.specificity>=v.specificity)n[x].set(h,y)}},l=(h)=>{if(h.type==="Declaration")return h.property.startsWith("--");if(h.type==="Rule"||h.type==="Atrule")return!!h.block&&[...h.block.children].some(l);return!1},u=(h)=>{let y=h.replace(/\s+/g,"").toLowerCase();if(!y||y==="all"||y==="screen")return["light","dark"];let m=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(y);return m?[m[1]]:void 0};function d(h,y){for(let m of h){if(!l(m))continue;if(m.type==="Atrule"){let v=m.prelude?fe(m.prelude):"",c=m.name.toLowerCase()==="media"?u(v):void 0;if(!c){s(`@${m.name} ${v}`.trim());continue}d(m.block.children,y.filter((b)=>c.includes(b)));continue}if(m.type!=="Rule")continue;let x=m.prelude.type==="SelectorList"?[...m.prelude.children].map(fe):[fe(m.prelude)];for(let v of x){let c=/^(html|:root)?(?:\.(dark|light))?$/.exec(v.trim());if(!c||!c[1]&&!c[2]){s(v);continue}let b=(c[1]===":root"?10:c[1]?1:0)+(c[2]?10:0);for(let p of m.block.children){if(p.type!=="Declaration"){if(l(p))s(`nested rule in ${v}`);continue}if(!p.property.startsWith("--"))continue;let N={value:fe(p.value),important:!!p.important,specificity:b};o(p.property,N,y.filter((S)=>!c[2]||c[2]===S))}}}}let f="",g;return await new HTMLRewriter().on("html",{element(h){let y=h.getAttribute("style");if(!y)return;try{let m=bn(y,{context:"declarationList"});if(m.type!=="DeclarationList")return;for(let x of m.children)if(x.type==="Declaration"&&x.property.startsWith("--"))o(x.property,{value:fe(x.value),important:!!x.important,specificity:1000},["light","dark"])}catch{s("invalid document inline theme")}}}).on("style",{element(h){f="";let y=h.getAttribute("type");g=!y||y.toLowerCase()==="text/css"?u(h.getAttribute("media")??""):void 0,h.onEndTag(()=>{try{let m=bn(f);if(m.type!=="StyleSheet")return;if(!g){if([...m.children].some(l))s("style type/media");return}d(m.children,g)}catch{s("invalid stylesheet")}})},text(h){f+=h.text}}).transform(new Response(e)).text(),{light:[...n.light].map(([h,y])=>[h,y.value]),dark:[...n.dark].map(([h,y])=>[h,y.value])}}function J(e,t={},n={},r={},s=[]){return{type:e,props:t,style:n,events:r,children:s}}function Sn(e,t,n={}){return{version:"1.0.0",root:e,script:t,meta:{source:n.source||"unknown",compiledAt:n.compiledAt||Date.now(),headwindConfig:n.headwindConfig}}}var ui=/^(?: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)$/,wn=new Set(["script","style","head","meta","link","title","base","noscript"]),Nn=new Set(["template","body","html","main","fragment"]),Ae=new Set,di=new Set(["onBlur","onChange","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onPageSelected","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onDragEnd","onDragLeave","onDragOver","onDragStart","onDrop","onHoverChange","onKeyPress","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),_e=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","Link","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","WebView","Map","MapPolyline","MapPolygon","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","SegmentedControl","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...nt]),fi=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"]]),xn=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),pi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function ie(e){return e.replace(/&(#x?[0-9a-f]+|\w+);/gi,(t,n)=>{let r=pi[n.toLowerCase()];if(r!==void 0)return r;if(n[0]==="#"){let s=n[1]==="x"||n[1]==="X"?Number.parseInt(n.slice(2),16):Number.parseInt(n.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):t}return t})}function lt(e){if(!e.includes("{{"))return null;let t=[],n=0;for(let r of e.matchAll(/\{\{([\s\S]+?)\}\}/g)){if(r.index>n)t.push(JSON.stringify(e.slice(n,r.index)));t.push(`(${r[1].trim()})`),n=r.index+r[0].length}if(!t.some((r)=>r.startsWith("(")))return null;if(n<e.length)t.push(JSON.stringify(e.slice(n)));if(t.length===1)return t[0].slice(1,-1);return`[${t.join(", ")}].map(__stxPart => __stxPart == null ? '' : __stxPart).join('')`}function kn(e,t,n,r={}){let s=r.inheritedVariables,o={},l={},u={},d=[],f="",g={};for(let[x,v]of t){let c=x.toLowerCase();if(c==="class"||c==="classname"){f=f?`${f} ${v}`:v;continue}if(c==="style"){g={...g,...gi(e,v,n,{...r,onVariables(S){s=S,r.onVariables?.(S)}})};continue}if(c.startsWith(":")||c.startsWith("x-")&&c!=="x-cloak"){u[c.startsWith(":")?c.slice(1):c.slice(2)]=ie(v);continue}if(c==="x-cloak")continue;if(c.startsWith("@")||c.startsWith("v-on:")){let S=c.startsWith("@")?c.slice(1):c.slice(5),[R]=S.split("."),w=ke[R]??ke[R.replaceAll("-","")]??(R.startsWith("on")?R:""),A=w==="onKeyPress"&&S!==R;if(!w||!di.has(w)||A){if(ui.test(R)||/\./.test(S))n.push({kind:"unread-event",tag:e,name:x});continue}l[w]=ie(v);continue}if(c==="key"){o.key=v;continue}let b=ie(v),p=lt(b);if(p){u[c]=p,d.push(c);continue}let N=ot(x);if(b===""&&fn.has(N)){o[N]=!0;continue}try{o[N]=JSON.parse(b)}catch{o[N]=b}}let h=o["data-native"]?o["data-native"]==="TextInput":e==="textarea"||e==="input"&&!["checkbox","radio","hidden"].includes(String(o.type??"text").toLowerCase()),y=f?re(f,s,{focus:h,focusWithin:!0,rules:r.rules}):void 0;for(let x of new Set(y?.unknown??[]))n.push({kind:"unknown-class",tag:e,name:x});let m=ze({...y?.style,...g});return{props:o,style:m,events:l,bindings:u,classes:f,inline:g,templated:d}}function gi(e,t,n,r){return be(ie(t),(s)=>n.push({...s,tag:e}),r)}function ct(e){return e.children.map((t)=>typeof t==="string"?t:ct(t)).join("").replace(/\s+/g," ").trim()}function hi(e,t){let n=e.node;if(n.props["data-stx-native-template"])return n.children=n.children.map((o)=>typeof o==="string"?J("Text",{},{},{},[o]):o),n;let r=n.children.filter((o)=>typeof o!=="string"),s=n.children.filter((o)=>typeof o==="string").join("").trim();if(e.tag==="button"&&n.type==="Button"&&!e.declaredNative&&r.length>0)return n.type="Pressable",n.props.role??="button",n.children=n.children.flatMap((o)=>typeof o==="string"?o.trim()?[J("Text",{},{},{},[o.trim()])]:[]:[o]),n;if(n.type==="Button"&&r.length===0)return n.children=s?[s]:[],n;if(n.type==="Svg"||n.type==="G")return n.children=r,n;if(n.type==="SvgText"){let o=ct(n);return n.children=o?[o]:[],n}if(xn.has(n.type)&&r.length===0&&s)return n.type="Text",n.children=[s],n;if(n.type==="Text"&&!s&&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"?J("Text",{},{},{},[u]):u),n;let l=ct(n);return t.push({kind:"flattened-text",tag:e.tag}),n.children=l?[l]:[],n}if(xn.has(n.type)&&r.length>0)n.children=r;return n}async function mi(e,t={}){e=await pe(e);let n=[],r=await vn(e,(c)=>n.push({kind:"unsupported-theme-rule",tag:"style",name:c})),s=te(r.light).computed(),o=new Set([...e.matchAll(/\sclass(?:name)?\s*=\s*"([^"]*)"/gi)].flatMap((c)=>c[1].split(/\s+/))),l=await yn(e,(c,b)=>{if(!b.length||b.some((p)=>o.has(p)))n.push({kind:"unsupported-style-rule",tag:"style",name:c})}),u=[],d=[],f=new Set;function g(c){let b=d[d.length-1];if(!b)u.push(c);else if(!b.dropped)b.node.children.push(c)}function h(c){let b=c.node.style.fontFamily,p=(S)=>{if(c.tag!=="html"&&c.node._styleSource)S._styleAncestors=[c.node._styleSource,...S._styleAncestors??[]];if(b&&S.style.fontFamily===void 0)S._layoutDefaults={...S._layoutDefaults,fontFamily:b},S.style={fontFamily:b,...S.style}};if(c.node.bindings&&Object.keys(c.node.bindings).length>0){let S=c.node.children,R=S.filter((A)=>typeof A!=="string"),w=R.length===1&&R.length===S.length?R[0]:J("View",{},{},{},S);if(w.bindings={...c.node.bindings,...w.bindings},w.bindingId===void 0&&c.node.bindingId!==void 0)w.bindingId=c.node.bindingId;p(w),g(w);return}let N=d[d.length-1];for(let S of c.node.children){if(typeof S==="string"){if(N&&!N.dropped)N.node.children.push(S);continue}if(p(S),!N)u.push(S);else if(!N.dropped)N.node.children.push(S)}}function y(c,b){let p=d[d.length-1];if(c==="svg"||p?.svg)return m(c,b,p);let N=wn.has(c)&&!Ae.has(c),S=d[d.length-1]?.dropped??!1,R=p?.variables??s,{props:w,style:A,events:I,bindings:D,classes:_,inline:L,templated:V}=N||S?{props:{},style:{},events:{},bindings:{},classes:"",inline:{},templated:[]}:kn(c,b,n,{inheritedVariables:R,onVariables:(M)=>{R=M},rules:l});if(c==="html")R=s;let C=w["data-native"],O=c==="template"&&b.some(([M])=>[":for","x-for","@for"].includes(M)),k;if(O)k="View",w["data-stx-native-template"]=!0;else if(typeof C==="string"&&_e.has(C))k=C,delete w["data-native"];else{if(k=Ae.has(c)?"View":hn(c),(c==="i"||c==="span")&&/(?:^|\s)i-[a-z0-9]+-[a-z0-9-]+(?:\s|$)/.test(_))k="Icon";else if(c==="i"&&b.some(([M])=>/^(?::|x-)class$/i.test(M)))k="Icon";if(c==="input"){let M=String(w.type??"text").toLowerCase();if(M==="checkbox")k="Checkbox",w.formValue=w.value??"on",w.checked=w.checked===""||w.checked===!0||w.checked==="true",w.value=w.checked;else if(M==="hidden")k="View",A.display="none",L.display="none";else if(M==="radio")k="View",w.accessibilityRole="radio",n.push({kind:"unsupported-control",tag:c,name:"input:radio"})}}if(!S&&k===c&&!_e.has(k)&&!wn.has(c)&&!Nn.has(c)&&!f.has(c))f.add(c),n.push({kind:"unmapped-tag",tag:c});if((N||Ae.has(c))&&!f.has(`drop:${c}`))f.add(`drop:${c}`),n.push({kind:"dropped-subtree",tag:c});if(k==="View"&&/(?:^|\s)overflow-x-(?:auto|scroll)(?:\s|$)/.test(_))k="ScrollView",w.horizontal=!0,w.showsHorizontalScrollIndicator??=!1;else if(k==="View"&&/(?:^|\s)overflow-y-(?:auto|scroll)(?:\s|$)/.test(_))k="ScrollView";if(c==="form")w["data-stx-form"]=!0;if(c==="button"&&w.type===void 0)w.type="submit";if(c==="textarea"&&k==="TextInput")w.multiline??=!0;if((k==="Video"||k==="Image")&&w.source===void 0&&w.src!==void 0)w.source=w.src,delete w.src;if(k==="Icon"){let M=re(_).icon,F=String(w.symbol||w.name||M||""),B=de(F,Boolean(w.symbol));if(F.trim()&&!B.known)n.push({kind:"unknown-icon",tag:c,name:F});if(w.symbol=B.symbol,B.iconify)w.iconify=B.iconify}if(k==="FlatList"||k==="SectionList"){let M=new Set([...Object.keys(w),...Object.keys(D)].map((F)=>F.toLowerCase()));for(let[F,B]of fi)if(M.has(F))n.push({kind:"unsupported-list-prop",tag:k,name:B})}let T=J(k,w,A,I);T._inlineStyle=L,T._styleSource=ie(b.find(([M])=>M==="style")?.[1]??"");let E=w["data-stx-b"];if(typeof E==="number"&&Number.isInteger(E))T.bindingId=E;if(delete w["data-stx-b"],_)T._classes=_;if(Object.keys(D).length>0)T.bindings=D;if(V.length>0)T._templated=V;if(typeof w.key==="string")T.key=w.key,delete w.key;return{tag:c,node:T,variables:R,declaredNative:typeof C==="string"&&_e.has(C),dropped:N||S||Ae.has(c)||k==="Video",discard:N||S,unwrap:Nn.has(c)&&!O&&k!=="ScrollView"&&!(typeof C==="string"&&_e.has(C))}}function m(c,b,p){let N=p?.dropped??!1,S=tt[c];if(N||!S){if(!N&&!f.has(`drop:${c}`))f.add(`drop:${c}`),n.push({kind:cn.has(c)?"dropped-subtree":"unmapped-tag",tag:c});return{tag:c,node:J("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let R=p?.variables??s,{props:w,style:A,events:I,bindings:D,classes:_,inline:L,templated:V}=kn(c,b,n,{inheritedVariables:R,onVariables:(T)=>{R=T},rules:l});if(S==="Svg"){let T=rt(w.viewBox);if(T)w.viewBox=T;else delete w.viewBox;for(let E of["width","height"]){if(typeof w[E]==="number"&&A[E]===void 0)A[E]=w[E];delete w[E]}}if(typeof w.strokeDasharray==="string"||typeof w.strokeDasharray==="number"){let T=String(w.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);w.strokeDasharray=T}let C=it(S,w);if(C)w.geometry=C;if(S==="Animate")st(w);let O=J(S,w,A,I);O._inlineStyle=L,O._styleSource=ie(b.find(([T])=>T==="style")?.[1]??"");let k=w["data-stx-b"];if(typeof k==="number"&&Number.isInteger(k))O.bindingId=k;if(delete w["data-stx-b"],_)O._classes=_;if(Object.keys(D).length>0)O.bindings=D;if(V.length>0)O._templated=V;if(typeof w.key==="string")O.key=w.key,delete w.key;return{tag:c,node:O,variables:R,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(c){let b=c.tagName.toLowerCase(),p=y(b,[...c.attributes]),N=!0;try{c.onEndTag(()=>{if(d.pop(),p.discard)return;if(p.unwrap)h(p);else g(hi(p,n))})}catch{N=!1}if(N)d.push(p);else if(!p.discard)g(p.node)},text(c){let b=d[d.length-1];if(!b||b.dropped)return;let p=yi(ie(c.text),b.inMustache===!0);b.inMustache=p.inside;let N=p.text;if(!N.trim())return;b.node.children.push(N)}}).transform(new Response(e)).text(),u.length===0)throw Error(`No element to translate in the rendered output of ${t.source??"unknown"}`);let x=u.length===1?u[0]:J("View",{},{},{},u);if(r.light.length||r.dark.length)x._stylesheetTheme=r;if(Object.keys(l).length)x._stylesheetRules=l;let v=(c)=>{bi(c);let b=Je(c.props,c.type);if(Object.keys(b).length)c._accessibilitySource=Object.fromEntries(ue.filter((p)=>(p in c.props)).map((p)=>[p,c.props[p]])),Object.assign(c.props,b);on(c);for(let p of c.children)if(typeof p!=="string")v(p)};return v(x),Rn(x),{root:x,diagnostics:n}}function Rn(e,t=!1){if(["ScrollView","FlatList","SectionList"].includes(e.type))return!e.props.horizontal&&(Number(e.style.flex)>0||Number(e.style.flexGrow)>0);let n=e.style.flexDirection==="row"||e.style.display==="flex"&&e.style.flexDirection==null;if(!e.children.map((s)=>typeof s==="string"?!1:Rn(s,n)).some(Boolean)||!["View","SafeAreaView","KeyboardAvoidingView"].includes(e.type))return!1;if(e.style.height!==void 0||e.style.maxHeight!==void 0)return!1;if(e.style.flex===0||e.style.flexGrow===0||e.style.flexShrink===0)return!1;if(t)return!0;if(e.style.flex===void 0&&e.style.flexGrow===void 0)e._layoutDefaults={flex:1,flexGrow:1,flexShrink:1,flexBasis:0},e.style={...e._layoutDefaults,...e.style};return!0}function yi(e,t){let n="",r=0;while(r<e.length){if(!t&&e.startsWith("{{",r)){t=!0,n+="{{",r+=2;continue}if(t&&e.startsWith("}}",r)){t=!1,n+="}}",r+=2;continue}let s=e[r];if(!t&&/\s/.test(s)){if(!n.endsWith(" "))n+=" ";while(r<e.length&&/\s/.test(e[r]))r++;continue}n+=s,r++}return{text:n,inside:t}}function bi(e){if(e.props["data-stx-native-template"])return;if(e.bindings?.text||e.children.length===0)return;let t=e.children.filter((r)=>typeof r==="string");if(t.length<e.children.length){let r=e.type==="Button"||e.type==="Text"?null:lt(t.join(""));if(!r)return;e.bindings={...e.bindings,text:r},e._templated=[...e._templated??[],"text"],e.children=e.children.filter((s)=>typeof s!=="string");return}let n=lt(e.children.join(""));if(!n)return;if(e.type!=="Button")e.bindings={...e.bindings,text:n},e._templated=[...e._templated??[],"text"],e.children=[];else{e.type="Pressable",e.props.role??="button";let r=J("Text",{},{},{},[]);r.bindings={text:n},r._templated=["text"],e.children=[r]}}async function Tn(e,t={}){let{root:n,diagnostics:r}=await mi(e,t),s=t.script??{exports:{},functions:[],code:""};return{document:Sn(n,s,{source:t.source??"unknown"}),diagnostics:r}}function vi(e){let t="",n=0;for(let r=e.indexOf("<");r!==-1;r=e.indexOf("<",r+1)){if(!/[a-z]/i.test(e[r+1]??""))continue;let s=r+1,o="";for(;s<e.length;s++){let u=e[s];if(o){if(u===o)o="";continue}if(u==='"'||u==="'")o=u;else if(u===">"||u==="<")break}if(e[s]!==">"||e[s-1]!=="/")continue;let l=e.slice(r,s+1).replace(/"[^"]*"|'[^']*'/g,'""');if(!/\sdata-native-exclude(?=[\s=/>])/i.test(l))continue;t+=e.slice(n,r),n=s+1,r=s}return n?t+e.slice(n):e}async function pe(e){if(!/\bdata-native-exclude\b/i.test(e))return e;if(e=vi(e),!/\bdata-native-exclude\b/i.test(e))return e;return new HTMLRewriter().on("[data-native-exclude]",{element(t){t.remove()}}).transform(new Response(e)).text()}var An=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Si=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,wi=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,_n=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function ut(e){let t=[];An.lastIndex=0;for(let o of e.matchAll(An)){let l=o[1]??"";if(/\bserver\b/.test(l))continue;t.push(o[2].trim())}let n=t.filter(Boolean).join(`
4
4
 
5
5
  `),r=[];for(let o of[Si,wi]){o.lastIndex=0;for(let l of n.matchAll(o))if(!r.includes(l[1]))r.push(l[1])}let s={};_n.lastIndex=0;for(let o of n.matchAll(_n)){let l=o[2];try{s[o[1]]=JSON.parse(l.replace(/^'(.*)'$/,'"$1"'))}catch{s[o[1]]=l}}return{exports:s,functions:r,code:n}}var ae="[data-native-chrome]";function Ni(e){let t=(e??"").trim().toLowerCase();return t==="tabs"||t==="bar"?t:""}function En(e,t){let n=de(e);if(!n.known&&/^i-|:/.test(e))t?.(e);return n.known||/^i-|:/.test(e)?n.symbol:e}function xi(e){let t=(e??"").trim();if(!t.startsWith("/")||t.startsWith("//"))return null;return t}function Cn(e){return e.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 On(e,t){if(!/\bdata-native-chrome\b/i.test(e))return{html:e,chrome:null};let n=[],r=[],s=new Set,o=[],l=[],u=null,d=null,f=!1;if(await new HTMLRewriter().on(ae,{element(y){f=!0;let m=y.getAttribute("data-stx-scope");if(m)s.add(m);n.push(Ni(y.getAttribute("data-native-chrome"))),y.onEndTag(()=>{n.pop()})}}).on("[data-stx-component-wrapper]",{element(y){let m={scope:y.getAttribute("data-stx-scope")??"",children:0,chrome:0};o.push(m),y.onEndTag(()=>{if(o.pop(),m.scope&&m.children>0&&m.chrome===m.children)s.add(m.scope)})}}).on("[data-stx-component-wrapper] > *",{element(y){let m=o[o.length-1];if(!m)return;if(m.children++,y.hasAttribute("data-native-chrome"))m.chrome++}}).on(`${ae} [data-stx-scope]`,{element(y){let m=y.getAttribute("data-stx-scope");if(m)s.add(m)}}).on(`${ae} script[data-stx-component-factories]`,{element(y){let m=[...y.attributes].map(([x,v])=>v===""?x:`${x}="${v.replace(/"/g,"&quot;")}"`).join(" ");u="",y.onEndTag(()=>{l.push(`<script ${m}>${u}</script>`),u=null})},text(y){if(u!==null)u+=y.text}}).on(`${ae} a`,{element(y){let m=xi(y.getAttribute("href")),x=n[n.length-1]??"";if(!m||!x)return;let v=y.getAttribute("data-native-icon")||at(y.getAttribute("class")??""),c={path:m,title:"",region:x,label:y.getAttribute("aria-label")||y.getAttribute("title")||"",...v?{symbol:En(v,t)}:{}};d=c,y.onEndTag(()=>{if(c.title=Cn(c.title)||Cn(c.label),r.push(c),d===c)d=null})},text(y){if(d)d.title+=y.text}}).on(`${ae} a *`,{element(y){if(!d||d.symbol)return;let m=y.getAttribute("data-native-icon")||at(y.getAttribute("class")??"");if(m)d.symbol=En(m,t)}}).transform(new Response(e)).text(),!f)return{html:e,chrome:null};let g=await new HTMLRewriter().on(ae,{element(y){y.remove()}}).on("script[data-stx-owner]",{element(y){if(s.has(y.getAttribute("data-stx-owner")??""))y.remove()}}).transform(new Response(e)).text(),h=(y)=>r.filter((m)=>m.region===y).map(({path:m,title:x,symbol:v})=>({path:m,title:x,...v?{symbol:v}:{}}));return{html:l.join(`
6
- `)+g,chrome:{tabs:h("tabs"),bar:h("bar")}}}var Ee=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,In=/function\s+(__stx_setup_[\w$]+)\s*\(/,ki=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function dt(e){Ee.lastIndex=0;for(let t of e.matchAll(Ee)){let n=t[2].trim(),r=In.exec(n)?.[1];if(r)return{name:r,code:n}}return null}function Pn(e){let t=[];Ee.lastIndex=0;for(let n of e.matchAll(Ee)){let r=n[1],s=n[2].trim(),o=ki.exec(r)?.[1],l=/\bdata-stx-component-factories\b/i.test(r);if(!s||!o&&!l&&!In.test(s))continue;t.push(o?{code:s,owner:o}:{code:s})}return t}async function Ri(e,t,n={}){e=await pe(e);let r=n.root??le.dirname(t),s=await a(r),o=typeof s.root==="string"&&s.root?le.resolve(r,s.root):r,l=(C,O)=>C?le.isAbsolute(C)?C:le.resolve(o,C):le.join(o,O),u={root:r,layoutsDir:l(s.layoutsDir,"layouts"),partialsDir:l(s.partialsDir,"partials"),storesDir:l(s.storesDir,"stores"),componentsDir:n.componentsDir??(s.componentsDir?l(s.componentsDir,"components"):le.join(o,"components")),buildMode:"serve",cache:!1,_targetComponentDirs:[_s()],_targetComponentFallbackNames:["Button","Checkbox","Switch","TextInput","Image","Video"],_nativeHostAttrs:!0,skipEventDirectives:!0,_pluginComponentDirs:s._pluginComponentDirs??[],_componentPackageDirs:s._componentPackageDirs??[]},d={...n.context??{},__stx_inject_css:!1,__stx_native_screen:!0},f=new Set([t]),g=await i(e,d,t,u,f),h=[],{html:y,chrome:m}=await On(await pe(g),(C)=>{h.push({kind:"unknown-icon",tag:"data-native-chrome",name:C})}),{html:x,manifest:v}=St(await pe(y)),c=await Zt(r),{document:b,diagnostics:p}=await Tn(c?`<style>${c}</style>${x}`:x,{source:t,script:ut(e)});p.unshift(...h),Ti(b.root,v);let N=Jt(b.root);if(N)b.root._classTable=N;let S=d.__stx_runtime_head;if(typeof S?.title==="string"&&S.title.trim())b.title=S.title.trim();if(m)b.chrome=m;let R=dt(x),w=Pn(x);if(ut(e).code.trim()){let C=await xs(e,t,n.context,{forceClientSetup:!0}),O=dt(C.setupCode??"");if(R=O??R,O&&!w.some((k)=>k.code===O.code))w.push({code:O.code})}let{buildModuleRegistryScript:A,registeredModuleIdsIn:I,registeredModuleNamesIn:D}=await import("./chunk-g5pg0pg1.js"),_=async()=>{let C=[],O=w.map((T)=>T.code),k=await A(I(...O),{collectInputs:C,names:D(...O)});for(let T of C)f.add(T);return k},L=await _();if([...w.map((C)=>C.code),L??""].some((C)=>/\buseStore\s*\(/.test(C))&&/<script\b[^>]*\bdata-stx-stores\b/i.test(x)){let{getStoreScriptFor:C}=await import("./chunk-f935fec7.js"),O=[...w],k="";for(let T=0;T<8;T++){let E=await C(u.storesDir,[...O.map((M)=>M.code),L],{sharedModules:!0});if(!E)break;if(E.stores.join()===k)break;k=E.stores.join(),w.splice(0,w.length,{code:E.code,...E.functions?{stores:E.functions}:{}},...O);for(let M of new Bun.Glob("*.ts").scanSync({cwd:u.storesDir,absolute:!0}))f.add(M);L=await _()}}if(L)w.unshift({code:L,registry:!0});return{document:b,manifest:v,setup:R,scripts:w,diagnostics:p,html:x,dependencies:[...f]}}function Ti(e,t){let n=new Map(t.entries.map((o)=>[o.id,o])),r=t.entries.reduce((o,l)=>Math.max(o,l.id),-1)+1,s=(o)=>{if(o._templated?.length&&o.bindings){if(o.bindingId===void 0||!n.has(o.bindingId)){let u={id:o.bindingId??r++,bindings:[]};o.bindingId=u.id,n.set(u.id,u),t.entries.push(u)}let l=n.get(o.bindingId);for(let u of o._templated){let d=`:${u}`,f=De(d);if(f&&!l.bindings.some((g)=>g.name===d))l.bindings.push({name:d,value:o.bindings[u],kind:f})}}for(let l of o.children)if(typeof l!=="string")s(l)};s(e)}async function Ce(e,t={}){return Ri(await Bun.file(e).text(),e,t)}var Eo=Symbol("stx.nativeWebStorage.raw");var ge="__app";var Ci=(e)=>Bun.hash(e).toString(36);var Oi=/^ {2}try \{ factories\[("[0-9a-f]+")\] = factories\[\1\] \|\| /gm,Ii=/^\(function\(__scopeId\) \{([\s\S]*)\}\)\("([^"\\]+)"\);\s*$/;function ft(e){if(!e.startsWith(`(function() {
6
+ `)+g,chrome:{tabs:h("tabs"),bar:h("bar")}}}var Ee=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,In=/function\s+(__stx_setup_[\w$]+)\s*\(/,ki=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function dt(e){Ee.lastIndex=0;for(let t of e.matchAll(Ee)){let n=t[2].trim(),r=In.exec(n)?.[1];if(r)return{name:r,code:n}}return null}function Pn(e){let t=[];Ee.lastIndex=0;for(let n of e.matchAll(Ee)){let r=n[1],s=n[2].trim(),o=ki.exec(r)?.[1],l=/\bdata-stx-component-factories\b/i.test(r);if(!s||!o&&!l&&!In.test(s))continue;t.push(o?{code:s,owner:o}:{code:s})}return t}async function Ri(e,t,n={}){e=await pe(e);let r=n.root??le.dirname(t),s=await a(r),o=typeof s.root==="string"&&s.root?le.resolve(r,s.root):r,l=(C,O)=>C?le.isAbsolute(C)?C:le.resolve(o,C):le.join(o,O),u={root:r,layoutsDir:l(s.layoutsDir,"layouts"),partialsDir:l(s.partialsDir,"partials"),storesDir:l(s.storesDir,"stores"),componentsDir:n.componentsDir??(s.componentsDir?l(s.componentsDir,"components"):le.join(o,"components")),buildMode:"serve",cache:!1,_targetComponentDirs:[Ts()],_targetComponentFallbackNames:["Button","Checkbox","Switch","TextInput","Image","Video"],_nativeHostAttrs:!0,skipEventDirectives:!0,_pluginComponentDirs:s._pluginComponentDirs??[],_componentPackageDirs:s._componentPackageDirs??[]},d={...n.context??{},__stx_inject_css:!1,__stx_native_screen:!0},f=new Set([t]),g=await i(e,d,t,u,f),h=[],{html:y,chrome:m}=await On(await pe(g),(C)=>{h.push({kind:"unknown-icon",tag:"data-native-chrome",name:C})}),{html:x,manifest:v}=wt(await pe(y)),c=await Zt(r),{document:b,diagnostics:p}=await Tn(c?`<style>${c}</style>${x}`:x,{source:t,script:ut(e)});p.unshift(...h),Ti(b.root,v);let N=Jt(b.root);if(N)b.root._classTable=N;let S=d.__stx_runtime_head;if(typeof S?.title==="string"&&S.title.trim())b.title=S.title.trim();if(m)b.chrome=m;let R=dt(x),w=Pn(x);if(ut(e).code.trim()){let C=await _s(e,t,n.context,{forceClientSetup:!0}),O=dt(C.setupCode??"");if(R=O??R,O&&!w.some((k)=>k.code===O.code))w.push({code:O.code})}let{buildModuleRegistryScript:A,registeredModuleIdsIn:I,registeredModuleNamesIn:D}=await import("./chunk-fa97kz5j.js"),_=async()=>{let C=[],O=w.map((T)=>T.code),k=await A(I(...O),{collectInputs:C,names:D(...O)});for(let T of C)f.add(T);return k},L=await _();if([...w.map((C)=>C.code),L??""].some((C)=>/\buseStore\s*\(/.test(C))&&/<script\b[^>]*\bdata-stx-stores\b/i.test(x)){let{getStoreScriptFor:C}=await import("./chunk-bv7g3b3b.js"),O=[...w],k="";for(let T=0;T<8;T++){let E=await C(u.storesDir,[...O.map((M)=>M.code),L],{sharedModules:!0});if(!E)break;if(E.stores.join()===k)break;k=E.stores.join(),w.splice(0,w.length,{code:E.code,...E.functions?{stores:E.functions}:{}},...O);for(let M of new Bun.Glob("*.ts").scanSync({cwd:u.storesDir,absolute:!0}))f.add(M);L=await _()}}if(L)w.unshift({code:L,registry:!0});return{document:b,manifest:v,setup:R,scripts:w,diagnostics:p,html:x,dependencies:[...f]}}function Ti(e,t){let n=new Map(t.entries.map((o)=>[o.id,o])),r=t.entries.reduce((o,l)=>Math.max(o,l.id),-1)+1,s=(o)=>{if(o._templated?.length&&o.bindings){if(o.bindingId===void 0||!n.has(o.bindingId)){let u={id:o.bindingId??r++,bindings:[]};o.bindingId=u.id,n.set(u.id,u),t.entries.push(u)}let l=n.get(o.bindingId);for(let u of o._templated){let d=`:${u}`,f=De(d);if(f&&!l.bindings.some((g)=>g.name===d))l.bindings.push({name:d,value:o.bindings[u],kind:f})}}for(let l of o.children)if(typeof l!=="string")s(l)};s(e)}async function Ce(e,t={}){return Ri(await Bun.file(e).text(),e,t)}var Eo=Symbol("stx.nativeWebStorage.raw");var ge="__app";var Ci=(e)=>Bun.hash(e).toString(36);var Oi=/^ {2}try \{ factories\[("[0-9a-f]+")\] = factories\[\1\] \|\| /gm,Ii=/^\(function\(__scopeId\) \{([\s\S]*)\}\)\("([^"\\]+)"\);\s*$/;function ft(e){if(!e.startsWith(`(function() {
7
7
  const factories = window.__stxComponentFactories = window.__stxComponentFactories || {};
8
8
  `)||!e.endsWith(`
9
9
  })();`))return null;let t=[...e.matchAll(Oi)];if(t.length===0)return null;let n=[],r=105;for(let[s,o]of t.entries()){if(o.index!==r)return null;let l=JSON.parse(o[1]),u=o.index+o[0].length,d=`; }
@@ -16,9 +16,9 @@ ${v.map((b)=>`${b.text}
16
16
  })();`}}if(h.stores?.some(l)){for(let x of h.stores.filter(l))u.set(n(x),x);return{code:`;(function() {
17
17
  ${h.stores.map((x)=>l(x)?`runtime.components[${JSON.stringify(n(x))}]();`:`(${x})();`).join(`
18
18
  `)}
19
- })();`}}let m=s(h);if(m&&l(m.body))return u.set(n(m.body),m.body),{...h,code:`runtime.components[${JSON.stringify(n(m.body))}](${JSON.stringify(m.scope)});`};return h}));return{bodies:u,screens:d}}var Pi=[["props",()=>({})],["style",()=>({})],["events",()=>({})],["children",()=>[]],["_inlineStyle",()=>({})],["_styleSource",()=>""]];var Mi=new Set(["text","html","show","if","for","model","class","style","ref"]);function Bi(e){if(e.startsWith("@"))return"event";if(e.startsWith(":")&&Mi.has(e.slice(1)))return e.slice(1);return"attr"}function Di(e,t){if(typeof t==="string")return e==="";if(Array.isArray(t))return Array.isArray(e)&&e.length===0;return!!e&&typeof e==="object"&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length===0}class pt extends Error{}function Bn(e){let t={...e};if(Object.prototype.hasOwnProperty.call(t,"~"))throw new pt;let n=0;if(Pi.forEach(([r,s],o)=>{if(!Object.prototype.hasOwnProperty.call(t,r))n|=1<<o;else if(Di(t[r],s()))delete t[r]}),Array.isArray(t.children))t.children=t.children.map((r)=>typeof r==="string"?r:Bn(r));if(n)t["~"]=n;return t}function Dn(e){try{return{...e,root:Bn(e.root)}}catch(t){if(t instanceof pt)return null;throw t}}var Li=["kind","name","value"].join();function Ln(e){if(Object.keys(e).some((n)=>n!=="entries"))return null;let t=[];for(let n of e.entries){if(Object.keys(n).some((s)=>s!=="id"&&s!=="bindings"&&!(s==="template"&&n.template===!0)))return null;let r=[];for(let s of n.bindings){if(Object.keys(s).sort().join()!==Li||typeof s.value!=="string")return null;r.push(s.kind===Bi(s.name)?[s.name,s.value]:[s.name,s.value,s.kind])}t.push(n.template?[n.id,r,1]:[n.id,r])}return t}async function Vi(e){try{let{loadCssEngineConfig:t}=await import("./chunk-jmaw2cdt.js");return Ot(await t(e))}catch{return{}}}var Oe="__runtime",Wi="__messages";function Pe(e){let n=[H.join(import.meta.dir,"..","runtime",`${e}.ts`),H.join(import.meta.dir,"..","runtime",`${e}.js`),H.join(import.meta.dir,"native","runtime",`${e}.js`)].find((r)=>Wn(r));if(!n)throw Error(`Native runtime module ${e} is missing`);return n}async function gt(e,t,n,r,s){let o={name:"stx-screen-inputs",setup(u){u.onLoad({filter:/.*/,namespace:"file"},({path:d})=>{r.add(d);let f=s?.get(d);return f===void 0?void 0:{contents:f,loader:"js"}})}},l=await Bun.build({entrypoints:[e],target:"browser",format:"iife",minify:n,plugins:[o,...t],define:{"process.env.NODE_ENV":JSON.stringify(n?"production":"development")}});if(!l.success){let u=l.logs.map((d)=>String(d.message??d)).join(`
19
+ })();`}}let m=s(h);if(m&&l(m.body))return u.set(n(m.body),m.body),{...h,code:`runtime.components[${JSON.stringify(n(m.body))}](${JSON.stringify(m.scope)});`};return h}));return{bodies:u,screens:d}}var Pi=[["props",()=>({})],["style",()=>({})],["events",()=>({})],["children",()=>[]],["_inlineStyle",()=>({})],["_styleSource",()=>""]];var Mi=new Set(["text","html","show","if","for","model","class","style","ref"]);function Bi(e){if(e.startsWith("@"))return"event";if(e.startsWith(":")&&Mi.has(e.slice(1)))return e.slice(1);return"attr"}function Di(e,t){if(typeof t==="string")return e==="";if(Array.isArray(t))return Array.isArray(e)&&e.length===0;return!!e&&typeof e==="object"&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length===0}class pt extends Error{}function Bn(e){let t={...e};if(Object.prototype.hasOwnProperty.call(t,"~"))throw new pt;let n=0;if(Pi.forEach(([r,s],o)=>{if(!Object.prototype.hasOwnProperty.call(t,r))n|=1<<o;else if(Di(t[r],s()))delete t[r]}),Array.isArray(t.children))t.children=t.children.map((r)=>typeof r==="string"?r:Bn(r));if(n)t["~"]=n;return t}function Dn(e){try{return{...e,root:Bn(e.root)}}catch(t){if(t instanceof pt)return null;throw t}}var Li=["kind","name","value"].join();function Ln(e){if(Object.keys(e).some((n)=>n!=="entries"))return null;let t=[];for(let n of e.entries){if(Object.keys(n).some((s)=>s!=="id"&&s!=="bindings"&&!(s==="template"&&n.template===!0)))return null;let r=[];for(let s of n.bindings){if(Object.keys(s).sort().join()!==Li||typeof s.value!=="string")return null;r.push(s.kind===Bi(s.name)?[s.name,s.value]:[s.name,s.value,s.kind])}t.push(n.template?[n.id,r,1]:[n.id,r])}return t}async function ji(e){try{let{loadCssEngineConfig:t}=await import("./chunk-gmm3kffd.js");return Ot(await t(e))}catch{return{}}}var Oe="__runtime",Vi="__messages";function Ie(e){let n=[H.join(import.meta.dir,"..","runtime",`${e}.ts`),H.join(import.meta.dir,"..","runtime",`${e}.js`),H.join(import.meta.dir,"native","runtime",`${e}.js`)].find((r)=>Wn(r));if(!n)throw Error(`Native runtime module ${e} is missing`);return n}async function gt(e,t,n,r,s){let o={name:"stx-screen-inputs",setup(u){u.onLoad({filter:/.*/,namespace:"file"},({path:d})=>{r.add(d);let f=s?.get(d);return f===void 0?void 0:{contents:f,loader:"js"}})}},l=await Bun.build({entrypoints:[e],target:"browser",format:"iife",minify:n,plugins:[o,...t],define:{"process.env.NODE_ENV":JSON.stringify(n?"production":"development")}});if(!l.success){let u=l.logs.map((d)=>String(d.message??d)).join(`
20
20
  `);throw Error(`Could not bundle ${e}:
21
- ${u}`)}return(await l.outputs[0].text()).trim()}function Fi(e,t){return Hr(e,t)}function Xi(e,t){return`export default globalThis.__stxNativeRuntime.messages(${JSON.stringify(e)}, ${JSON.stringify(t)});`}function zi(e){let t=new Map;for(let[n,{language:r,area:s}]of e.files){let o=Xi(r,s);t.set(n,o),t.set($i(n),o)}return t}function Vn(e){let t=new Set;for(let n of e.matchAll(/__stxNativeRuntime\.messages\(\s*"[\w-]+"\s*,\s*"([\w/-]+)"\s*\)/g))t.add(n[1]);return[...t].sort()}function Ui(e,t){let n=H.isAbsolute(e.meta.source)?H.relative(t,e.meta.source).split(H.sep).join("/"):e.meta.source;return{...e,script:{exports:e.script.exports,functions:[],code:""},meta:{...e.meta,source:n,compiledAt:0}}}function Hi(e){let t=new Map,n=e.flatMap(({name:u,document:d})=>{let{_stylesheetRules:f,_stylesheetTheme:g}=d.root;return f===void 0&&g===void 0?[]:[{name:u,rules:f??{},theme:g}]});for(let{rules:u}of n)for(let[d,f]of Object.entries(u)){let g=JSON.stringify(f),h=t.get(d)??new Map,y=h.get(g);if(y)y.count++;else h.set(g,{value:f,count:1});t.set(d,h)}let r={},s=new Map;for(let[u,d]of t){let[f,g]=[...d].sort(([,h],[,y])=>y.count-h.count)[0];r[u]=g.value,s.set(u,f)}let o={},l=new Map;for(let{name:u,rules:d,theme:f}of n){let g={};for(let[y,m]of Object.entries(d))if(JSON.stringify(m)!==s.get(y))g[y]=m;let h=null;if(f!==void 0)h=Bun.hash(JSON.stringify(f)).toString(36),o[h]=f;l.set(u,{order:Object.keys(d),own:g,theme:h})}return{rules:r,themes:o,screens:l}}function qi(e){let{_stylesheetRules:t,_stylesheetTheme:n,...r}=e.root;return{...e,root:r}}async function ht(e){let t=Object.keys(e.screens);if(t.length===0)throw Error("screens must name at least one .stx file");let n=e.routed??!0,r=e.initialScreen??t[0];if(!e.screens[r])throw Error(`Initial screen ${r} is not in screens`);let s=H.resolve(e.root??process.cwd());if(e.messages&&!e.routesDir)throw Error("messages ship a language at a time beside route files: they need routesDir");if(e.sharedRuntime&&!e.routesDir)throw Error("sharedRuntime is the route files' runtime: it needs routesDir");if(e.messages&&!e.sharedRuntime)throw Error("messages are read by the shared runtime: they need sharedRuntime");if(e.messages&&e.outFile)throw Error("messages leave the languages out of the screens' code, which the one-file bundle cannot read: build it without messages");let o=e.messages?await Fi(s,e.messages):null,l=e.styleConfig??await Vi(s),u=o?zi(o):null,d=[],f=async()=>{for(let k of t){let T=H.resolve(s,e.screens[k]);if(!T.endsWith(".stx"))throw Error(`Screen ${k} must name a .stx file`);d.push({name:k,file:T,compiled:await Ce(T,{root:s})})}};await Ct(l,()=>u?cs(u,f):f());let g=Pe("jsc-globals"),h=Pe("shared-screen"),y=e.app?H.resolve(s,e.app):null;if(y&&!Wn(y))throw Error(`The app script ${e.app} does not exist`);if(y&&!n)throw Error("An app script needs a routed bundle");if(y&&e.screens[ge])throw Error(`${ge} is the app script's route, not a screen name`);let m=e.browser;if(e.screens[Oe])throw Error(`${Oe} is the runtime prelude's file, not a screen name`);let x=wt({native:!0});if(m&&e.routesDir)throw Error("A browser screen is one route; routesDir is for device hosts");let v=new Set(d.flatMap(({compiled:k})=>k.dependencies)),c=null;if(e.routesDir&&e.sharedRuntime&&e.shareModules!==!1&&process.env.STX_NATIVE_SHARE_MODULES!=="0"){let k=[],T=d.map(({name:M,compiled:F})=>{let B=F.scripts.filter((W)=>!W.registry).map((W)=>W.code);return{name:M,ids:zr(...B),names:co(...B)}}),E=()=>lo(T,{collectInputs:k});if(c=await(u?cs(u,E):E()),c)for(let M of k)v.add(M)}let b=c,p=e.routesDir&&e.sharedRuntime&&e.shareModules!==!1&&process.env.STX_NATIVE_SHARE_MODULES!=="0"?Mn(d.map(({name:k,compiled:T})=>({name:k,scripts:T.scripts}))):null,N=Hi(d.map(({name:k,compiled:T})=>({name:k,document:T.document}))),S=(k,T,E)=>{let M=n?`var routeName = g.__stxNativeRoute || ${JSON.stringify(r)};
21
+ ${u}`)}return(await l.outputs[0].text()).trim()}function Wi(e,t){return Wr(e,t)}function Fi(e,t){return`export default globalThis.__stxNativeRuntime.messages(${JSON.stringify(e)}, ${JSON.stringify(t)});`}function Xi(e){let t=new Map;for(let[n,{language:r,area:s}]of e.files){let o=Fi(r,s);t.set(n,o),t.set($i(n),o)}return t}function Vn(e){let t=new Set;for(let n of e.matchAll(/__stxNativeRuntime\.messages\(\s*"[\w-]+"\s*,\s*"([\w/-]+)"\s*\)/g))t.add(n[1]);return[...t].sort()}function Ui(e,t){let n=H.isAbsolute(e.meta.source)?H.relative(t,e.meta.source).split(H.sep).join("/"):e.meta.source;return{...e,script:{exports:e.script.exports,functions:[],code:""},meta:{...e.meta,source:n,compiledAt:0}}}function Hi(e){let t=new Map,n=e.flatMap(({name:u,document:d})=>{let{_stylesheetRules:f,_stylesheetTheme:g}=d.root;return f===void 0&&g===void 0?[]:[{name:u,rules:f??{},theme:g}]});for(let{rules:u}of n)for(let[d,f]of Object.entries(u)){let g=JSON.stringify(f),h=t.get(d)??new Map,y=h.get(g);if(y)y.count++;else h.set(g,{value:f,count:1});t.set(d,h)}let r={},s=new Map;for(let[u,d]of t){let[f,g]=[...d].sort(([,h],[,y])=>y.count-h.count)[0];r[u]=g.value,s.set(u,f)}let o={},l=new Map;for(let{name:u,rules:d,theme:f}of n){let g={};for(let[y,m]of Object.entries(d))if(JSON.stringify(m)!==s.get(y))g[y]=m;let h=null;if(f!==void 0)h=Bun.hash(JSON.stringify(f)).toString(36),o[h]=f;l.set(u,{order:Object.keys(d),own:g,theme:h})}return{rules:r,themes:o,screens:l}}function qi(e){let{_stylesheetRules:t,_stylesheetTheme:n,...r}=e.root;return{...e,root:r}}async function ht(e){let t=Object.keys(e.screens);if(t.length===0)throw Error("screens must name at least one .stx file");let n=e.routed??!0,r=e.initialScreen??t[0];if(!e.screens[r])throw Error(`Initial screen ${r} is not in screens`);let s=H.resolve(e.root??process.cwd());if(e.messages&&!e.routesDir)throw Error("messages ship a language at a time beside route files: they need routesDir");if(e.sharedRuntime&&!e.routesDir)throw Error("sharedRuntime is the route files' runtime: it needs routesDir");if(e.messages&&!e.sharedRuntime)throw Error("messages are read by the shared runtime: they need sharedRuntime");if(e.messages&&e.outFile)throw Error("messages leave the languages out of the screens' code, which the one-file bundle cannot read: build it without messages");let o=e.messages?await Wi(s,e.messages):null,l=e.styleConfig??await ji(s),u=o?Xi(o):null,d=[],f=async()=>{for(let k of t){let T=H.resolve(s,e.screens[k]);if(!T.endsWith(".stx"))throw Error(`Screen ${k} must name a .stx file`);d.push({name:k,file:T,compiled:await Ce(T,{root:s})})}};await Ct(l,()=>u?ds(u,f):f());let g=Ie("jsc-globals"),h=Ie("shared-screen"),y=e.app?H.resolve(s,e.app):null;if(y&&!Wn(y))throw Error(`The app script ${e.app} does not exist`);if(y&&!n)throw Error("An app script needs a routed bundle");if(y&&e.screens[ge])throw Error(`${ge} is the app script's route, not a screen name`);let m=e.browser;if(e.screens[Oe])throw Error(`${Oe} is the runtime prelude's file, not a screen name`);let x=St({native:!0});if(m&&e.routesDir)throw Error("A browser screen is one route; routesDir is for device hosts");let v=new Set(d.flatMap(({compiled:k})=>k.dependencies)),c=null;if(e.routesDir&&e.sharedRuntime&&e.shareModules!==!1&&process.env.STX_NATIVE_SHARE_MODULES!=="0"){let k=[],T=d.map(({name:M,compiled:F})=>{let B=F.scripts.filter((W)=>!W.registry).map((W)=>W.code);return{name:M,ids:Ur(...B),names:po(...B)}}),E=()=>fo(T,{collectInputs:k});if(c=await(u?ds(u,E):E()),c)for(let M of k)v.add(M)}let b=c,p=e.routesDir&&e.sharedRuntime&&e.shareModules!==!1&&process.env.STX_NATIVE_SHARE_MODULES!=="0"?Mn(d.map(({name:k,compiled:T})=>({name:k,scripts:T.scripts}))):null,N=Hi(d.map(({name:k,compiled:T})=>({name:k,document:T.document}))),S=(k,T,E)=>{let M=n?`var routeName = g.__stxNativeRoute || ${JSON.stringify(r)};
22
22
  var isApp = ${y?`routeName === ${JSON.stringify(ge)}`:"false"};
23
23
  if (!isApp && routeNames.indexOf(routeName) === -1) throw new Error(['Unknown native screen:', routeName].join(' '));
24
24
  if (isApp ? ${!T} : ${JSON.stringify(k.map(({name:U})=>U))}.indexOf(routeName) === -1) throw new Error(['This bundle does not hold the native screen', routeName].join(' '));`:`var routeName = 'main';
@@ -41,7 +41,7 @@ ${q.code}
41
41
  finally { g.__STX_SETUP_ROOT__ = null; }`:q.code).join(`
42
42
  `)}
43
43
  }`).join(`
44
- `),W=T&&y,P=m?Pe("browser-screen"):null,j=m?Bun.resolveSync(m.platformModule,s):null;return`
44
+ `),W=T&&y,P=m?Ie("browser-screen"):null,j=m?Bun.resolveSync(m.platformModule,s):null;return`
45
45
  ${E?`var runtime = globalThis.__stxNativeRuntime;
46
46
  if (!runtime || runtime.version !== ${JSON.stringify(E)}) throw new Error('This screen needs the stx native runtime it was built with: evaluate ${Oe}.js from the same build first');
47
47
  var installJSCGlobals = runtime.installJSCGlobals;
@@ -101,7 +101,7 @@ g.addEventListener('pagehide', function(event) { if (!event.persisted) g.__stxNa
101
101
  `},R=(k)=>({name:"stx-native-shared-screens",setup(T){T.onResolve({filter:/^stx:native-shared-screens$/},()=>({path:"entry",namespace:"stx-native-shared-screens"})),T.onLoad({filter:/.*/,namespace:"stx-native-shared-screens"},()=>({contents:k,loader:"js"}))}}),w=d.flatMap(({compiled:k})=>k.diagnostics).map((k)=>({level:"warning",message:[k.kind,k.tag,k.name].filter(Boolean).join(": ")})),A=d.filter(({compiled:k})=>k.document.chrome),I=A.length?{chrome:Object.fromEntries(A.map(({name:k,compiled:T})=>[k,T.document.chrome]))}:{},D=e.minify??!1,_,L,V;if(e.routesDir){let k=H.resolve(s,e.routesDir);$n(k,{recursive:!0});let T=`
102
102
  import { installJSCGlobals } from ${JSON.stringify(g)};
103
103
  import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(h)};
104
- ${e.sharedRuntime?`import { expandDocument, expandManifest } from ${JSON.stringify(Pe("compact-document"))};`:"var expandDocument = null, expandManifest = null;"}
104
+ ${e.sharedRuntime?`import { expandDocument, expandManifest } from ${JSON.stringify(Ie("compact-document"))};`:"var expandDocument = null, expandManifest = null;"}
105
105
  globalThis.__stxNativeRuntime = {
106
106
  version: '__STX_NATIVE_RUNTIME_VERSION__',
107
107
  // What every route of this build shares, held once instead of in each
@@ -174,4 +174,4 @@ ${x}
174
174
  });
175
175
  },
176
176
  };
177
- `,E,M=H.join(k,`${Oe}.js`);if(e.sharedRuntime){let P=await gt("stx:native-shared-screens",[R(T)],D,v);E=Bun.hash(P).toString(36),L=M,await Bun.write(L,P.replace("__STX_NATIVE_RUNTIME_VERSION__",E))}else jn(M,{force:!0});let F=H.join(k,Wi);jn(F,{recursive:!0,force:!0});let B={},W=[...d.map((P)=>({name:P.name,screens:[P],app:!1})),...y?[{name:ge,screens:[],app:!0}]:[]];_={};for(let P=0;P<W.length;P+=6)await Promise.all(W.slice(P,P+6).map(async(j)=>{let Y=H.join(k,`${j.name}.js`),Q=await gt("stx:native-shared-screens",[R(S(j.screens,j.app,E))],D,v,u??void 0);if(await Bun.write(Y,Q),_[j.name]=Y,o){let U=new Set(Vn(Q));for(let K of b?.reads.get(j.name)??[])for(let ee of Vn(b?.chunks.get(K)??""))U.add(ee);B[j.name]=[...U].sort()}}));if(o){for(let[j,Y]of o.data)for(let[Q,U]of Y)await Bun.write(H.join(F,j,`${Q}.json`),U);let P=Object.fromEntries(Object.keys(B).sort().map((j)=>[j,B[j]]));await Bun.write(H.join(F,"routes.json"),JSON.stringify(P));for(let j of o.files.keys())v.add(j);V={dir:F,languages:[...o.data.keys()],routes:P}}if(!e.outFile)return{code:"",routes:_,runtime:L,...V?{messages:V}:{},...I,diagnostics:w,dependencies:[...v]}}let C=await gt("stx:native-shared-screens",[R(S(d,!0))],D,v);if(!e.outFile)return{code:C,...I,diagnostics:w,dependencies:[...v]};let O=H.resolve(s,e.outFile);return $n(H.dirname(O),{recursive:!0}),await Bun.write(O,C),{code:C,outFile:O,..._?{routes:_,runtime:L}:{},...V?{messages:V}:{},...I,diagnostics:w,dependencies:[...v]}}async function Gi(e,t={}){return ht({...t,screens:{main:e},routed:!1})}function Fn(e,t={}){return Gi(e,t)}var Xn=["native.config.json","stx-native.config.json"];function Yi(e=process.cwd(),t){let n=t?G.resolve(e,t):Xn.map((d)=>G.join(e,d)).find((d)=>Me(d));if(!n)return null;if(!Me(n))throw Error(`Native config not found: ${n}`);let r=JSON.parse(Ji(n,"utf8")),s=Object.entries(r.screens??{});if(s.length===0)throw Error(`${G.basename(n)} must name at least one screen in "screens"`);let o={};for(let[d,f]of s){if(!/^[A-Z][\w-]*$/i.test(d))throw Error(`Invalid native screen name: ${d}`);if(typeof f!=="string"||!f.endsWith(".stx"))throw Error(`Screen ${d} must name a .stx file`);if(o[d]=G.resolve(G.dirname(n),f),!Me(o[d]))throw Error(`Screen ${d} not found: ${o[d]}`)}let l=r.initialScreen||s[0][0];if(!o[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?G.resolve(G.dirname(n),r.app):void 0;if(u&&!Me(u))throw Error(`App script not found: ${u}`);return{initialScreen:l,screens:o,file:n,...u?{app:u}:{}}}async function yl(e,t={}){let n=G.resolve(t.cwd??process.cwd()),r=t.format??"ir";if(r!=="ir"&&r!=="bundle")throw Error(`Unknown compile format: ${r}. Expected ir or bundle.`);let s=e?null:Yi(n,t.config);if(!e&&!s)throw Error(`Please specify an input file: stx native compile <file.stx>, or add ${Xn[0]}`);let o,l=[];if(r==="bundle"){let d=s?await ht({screens:s.screens,initialScreen:s.initialScreen,minify:t.minify,root:n,...s.app?{app:s.app}:{}}):await Fn(G.resolve(n,e),{minify:t.minify});o=d.code,l=d.diagnostics}else{let d=async(g)=>{let h=await Ce(g);return l.push(...h.diagnostics.map((y)=>({level:"warning",message:[y.kind,y.tag,y.name].filter(Boolean).join(": ")}))),h.document},f=s?{initialScreen:s.initialScreen,screens:Object.fromEntries(await Promise.all(Object.entries(s.screens).map(async([g,h])=>[g,await d(h)])))}:await d(G.resolve(n,e));o=JSON.stringify(f,null,2)}if(!t.output)return{output:o,diagnostics:l};let u=G.resolve(n,t.output);return Ki(G.dirname(u),{recursive:!0}),await Bun.write(u,o),{output:o,written:u,diagnostics:l}}export{yl as runNativeCompile};
177
+ `,E,M=H.join(k,`${Oe}.js`);if(e.sharedRuntime){let P=await gt("stx:native-shared-screens",[R(T)],D,v);E=Bun.hash(P).toString(36),L=M,await Bun.write(L,P.replace("__STX_NATIVE_RUNTIME_VERSION__",E))}else jn(M,{force:!0});let F=H.join(k,Vi);jn(F,{recursive:!0,force:!0});let B={},W=[...d.map((P)=>({name:P.name,screens:[P],app:!1})),...y?[{name:ge,screens:[],app:!0}]:[]];_={};for(let P=0;P<W.length;P+=6)await Promise.all(W.slice(P,P+6).map(async(j)=>{let Y=H.join(k,`${j.name}.js`),Q=await gt("stx:native-shared-screens",[R(S(j.screens,j.app,E))],D,v,u??void 0);if(await Bun.write(Y,Q),_[j.name]=Y,o){let U=new Set(Vn(Q));for(let K of b?.reads.get(j.name)??[])for(let ee of Vn(b?.chunks.get(K)??""))U.add(ee);B[j.name]=[...U].sort()}}));if(o){for(let[j,Y]of o.data)for(let[Q,U]of Y)await Bun.write(H.join(F,j,`${Q}.json`),U);let P=Object.fromEntries(Object.keys(B).sort().map((j)=>[j,B[j]]));await Bun.write(H.join(F,"routes.json"),JSON.stringify(P));for(let j of o.files.keys())v.add(j);V={dir:F,languages:[...o.data.keys()],routes:P}}if(!e.outFile)return{code:"",routes:_,runtime:L,...V?{messages:V}:{},...I,diagnostics:w,dependencies:[...v]}}let C=await gt("stx:native-shared-screens",[R(S(d,!0))],D,v);if(!e.outFile)return{code:C,...I,diagnostics:w,dependencies:[...v]};let O=H.resolve(s,e.outFile);return $n(H.dirname(O),{recursive:!0}),await Bun.write(O,C),{code:C,outFile:O,..._?{routes:_,runtime:L}:{},...V?{messages:V}:{},...I,diagnostics:w,dependencies:[...v]}}async function Gi(e,t={}){return ht({...t,screens:{main:e},routed:!1})}function Fn(e,t={}){return Gi(e,t)}var Xn=["native.config.json","stx-native.config.json"];function Yi(e=process.cwd(),t){let n=t?G.resolve(e,t):Xn.map((d)=>G.join(e,d)).find((d)=>Pe(d));if(!n)return null;if(!Pe(n))throw Error(`Native config not found: ${n}`);let r=JSON.parse(Ji(n,"utf8")),s=Object.entries(r.screens??{});if(s.length===0)throw Error(`${G.basename(n)} must name at least one screen in "screens"`);let o={};for(let[d,f]of s){if(!/^[A-Z][\w-]*$/i.test(d))throw Error(`Invalid native screen name: ${d}`);if(typeof f!=="string"||!f.endsWith(".stx"))throw Error(`Screen ${d} must name a .stx file`);if(o[d]=G.resolve(G.dirname(n),f),!Pe(o[d]))throw Error(`Screen ${d} not found: ${o[d]}`)}let l=r.initialScreen||s[0][0];if(!o[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?G.resolve(G.dirname(n),r.app):void 0;if(u&&!Pe(u))throw Error(`App script not found: ${u}`);return{initialScreen:l,screens:o,file:n,...u?{app:u}:{}}}async function yl(e,t={}){let n=G.resolve(t.cwd??process.cwd()),r=t.format??"ir";if(r!=="ir"&&r!=="bundle")throw Error(`Unknown compile format: ${r}. Expected ir or bundle.`);let s=e?null:Yi(n,t.config);if(!e&&!s)throw Error(`Please specify an input file: stx native compile <file.stx>, or add ${Xn[0]}`);let o,l=[];if(r==="bundle"){let d=s?await ht({screens:s.screens,initialScreen:s.initialScreen,minify:t.minify,root:n,...s.app?{app:s.app}:{}}):await Fn(G.resolve(n,e),{minify:t.minify});o=d.code,l=d.diagnostics}else{let d=async(g)=>{let h=await Ce(g);return l.push(...h.diagnostics.map((y)=>({level:"warning",message:[y.kind,y.tag,y.name].filter(Boolean).join(": ")}))),h.document},f=s?{initialScreen:s.initialScreen,screens:Object.fromEntries(await Promise.all(Object.entries(s.screens).map(async([g,h])=>[g,await d(h)])))}:await d(G.resolve(n,e));o=JSON.stringify(f,null,2)}if(!t.output)return{output:o,diagnostics:l};let u=G.resolve(n,t.output);return Ki(G.dirname(u),{recursive:!0}),await Bun.write(u,o),{output:o,written:u,diagnostics:l}}export{yl as runNativeCompile};