@stacksjs/stx 0.2.645 → 0.2.647

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 (263) hide show
  1. package/dist/builtins/attrs.js +6 -6
  2. package/dist/builtins/escape.d.ts +0 -11
  3. package/dist/builtins/escape.js +2 -1
  4. package/dist/builtins/safe-image.js +1 -3
  5. package/dist/builtins/stx-image.js +1 -3
  6. package/dist/builtins/stx-link.d.ts +3 -0
  7. package/dist/builtins/stx-link.js +1 -3
  8. package/dist/{chunk-apeyn69a.js → chunk-04kg16qs.js} +4 -4
  9. package/dist/chunk-0jq3w712.js +65 -0
  10. package/dist/chunk-0ky1j84b.js +2 -0
  11. package/dist/chunk-0m08316b.js +2 -0
  12. package/dist/{chunk-c96f3eq5.js → chunk-0z5cc7qn.js} +8 -8
  13. package/dist/{chunk-hpggz2t4.js → chunk-120ze5ms.js} +3 -3
  14. package/dist/chunk-1c5p7ede.js +2 -0
  15. package/dist/chunk-1q6yvbdx.js +2 -0
  16. package/dist/chunk-1x4qn6fy.js +2 -0
  17. package/dist/chunk-20f1veqy.js +3 -0
  18. package/dist/chunk-2a4szpje.js +3 -0
  19. package/dist/chunk-2c3w367n.js +2 -0
  20. package/dist/chunk-2cxav9xe.js +2 -0
  21. package/dist/chunk-2f17h17f.js +2 -0
  22. package/dist/{chunk-ktvr45qg.js → chunk-2qbvsvwc.js} +2 -2
  23. package/dist/chunk-2v4s7xtx.js +2 -0
  24. package/dist/chunk-31714f76.js +2 -0
  25. package/dist/chunk-354jmw2k.js +3 -0
  26. package/dist/chunk-3e7haxwt.js +2 -0
  27. package/dist/{chunk-ph8dqgr5.js → chunk-3ghbxena.js} +14 -14
  28. package/dist/chunk-40y6mb8t.js +2 -0
  29. package/dist/chunk-42rghbqe.js +12 -0
  30. package/dist/chunk-4fz2eq7g.js +2 -0
  31. package/dist/{chunk-1t0m4pwg.js → chunk-4yf1w261.js} +2 -2
  32. package/dist/chunk-4yt8tg4j.js +2 -0
  33. package/dist/chunk-52gp2xxk.js +2 -0
  34. package/dist/chunk-55x799st.js +49 -0
  35. package/dist/chunk-5e20mvke.js +2 -0
  36. package/dist/chunk-5fzh8n52.js +2 -0
  37. package/dist/chunk-5gtpswnm.js +2 -0
  38. package/dist/{chunk-a0ygyftk.js → chunk-5t4qtxgr.js} +2 -2
  39. package/dist/chunk-5yg3tkth.js +2 -0
  40. package/dist/chunk-67kj14at.js +2 -0
  41. package/dist/{chunk-me1tdtzz.js → chunk-6ajahb2x.js} +3 -3
  42. package/dist/chunk-6vzktvyw.js +2 -0
  43. package/dist/chunk-70pmthc3.js +2 -0
  44. package/dist/chunk-74pej67a.js +18 -0
  45. package/dist/{chunk-r2seygb5.js → chunk-7rta163c.js} +2 -2
  46. package/dist/chunk-7s32fe6k.js +3 -0
  47. package/dist/chunk-84djpte6.js +3 -0
  48. package/dist/chunk-864qtx7y.js +2 -0
  49. package/dist/chunk-8ttg2d3m.js +2 -0
  50. package/dist/{chunk-9yk5rasj.js → chunk-9am6dsb1.js} +3 -3
  51. package/dist/{chunk-rmj0n3ss.js → chunk-9p6efb17.js} +1 -1
  52. package/dist/chunk-9qeg5trh.js +2 -0
  53. package/dist/chunk-9szxxgv5.js +2 -0
  54. package/dist/{chunk-bsts9pr5.js → chunk-9y2ncrnq.js} +2 -2
  55. package/dist/chunk-9z9jtwct.js +33 -0
  56. package/dist/{chunk-gvr10eqb.js → chunk-a3d0g4mr.js} +2 -2
  57. package/dist/{chunk-wpc04ygt.js → chunk-a8j91pqz.js} +11 -11
  58. package/dist/{chunk-mfd3fca7.js → chunk-aah6csjm.js} +11 -11
  59. package/dist/{chunk-dmg8dpah.js → chunk-ajv5xmjx.js} +169 -169
  60. package/dist/chunk-apgb7r22.js +2 -0
  61. package/dist/{chunk-v1mvbf82.js → chunk-aprhqxky.js} +5 -5
  62. package/dist/{chunk-kfq594fh.js → chunk-ar22s1e1.js} +2 -2
  63. package/dist/chunk-asqnaddf.js +3 -0
  64. package/dist/chunk-aze7k3a5.js +2 -0
  65. package/dist/chunk-b07djygp.js +18 -0
  66. package/dist/chunk-b0vhe6d4.js +4 -0
  67. package/dist/chunk-b4fd2dtk.js +2 -0
  68. package/dist/chunk-bk96wjaz.js +61 -0
  69. package/dist/chunk-c7fs96n6.js +4 -0
  70. package/dist/chunk-c9k40352.js +2 -0
  71. package/dist/{chunk-ahyq08mp.js → chunk-ce6zddpf.js} +3 -3
  72. package/dist/{chunk-392pj66x.js → chunk-cj2xj1v6.js} +29 -29
  73. package/dist/chunk-cs0dd5w8.js +2 -0
  74. package/dist/chunk-cwd65649.js +2 -0
  75. package/dist/{chunk-w9zxb26s.js → chunk-da7x7y7j.js} +1 -1
  76. package/dist/{chunk-9wbtj6tj.js → chunk-dgb4z4kw.js} +2 -2
  77. package/dist/chunk-dpjnjs09.js +888 -0
  78. package/dist/chunk-e7sg0fa0.js +2 -0
  79. package/dist/chunk-edz1h5f9.js +2 -0
  80. package/dist/chunk-egg54kd0.js +12 -0
  81. package/dist/chunk-ek2adv0n.js +2 -0
  82. package/dist/chunk-emaexvgz.js +2 -0
  83. package/dist/{chunk-pp6ycfay.js → chunk-ewcrsyr7.js} +2 -2
  84. package/dist/chunk-fcn71bq1.js +2 -0
  85. package/dist/{chunk-38ngmh6h.js → chunk-fg3jw17w.js} +48 -48
  86. package/dist/chunk-fygp3cs9.js +2 -0
  87. package/dist/chunk-g2jmwh7p.js +2 -0
  88. package/dist/chunk-g8r0km7g.js +106 -0
  89. package/dist/{chunk-kchphxkm.js → chunk-gc9ftf7r.js} +3 -3
  90. package/dist/chunk-ggwm8w5m.js +2 -0
  91. package/dist/chunk-h5zr710w.js +2 -0
  92. package/dist/chunk-hgy4c6mm.js +11 -0
  93. package/dist/chunk-hvtzw1jh.js +2 -0
  94. package/dist/{chunk-4n24jbfs.js → chunk-hvzzhkhr.js} +2 -2
  95. package/dist/chunk-j0v970k3.js +2 -0
  96. package/dist/chunk-jk41jwsc.js +2 -0
  97. package/dist/{chunk-6mnwvn9v.js → chunk-jkvr7e91.js} +2 -2
  98. package/dist/{chunk-3ns5k9nf.js → chunk-jsb4pvj1.js} +2 -2
  99. package/dist/{chunk-pf5s5gjp.js → chunk-jx3wpgv0.js} +2 -2
  100. package/dist/{chunk-2zcbx82x.js → chunk-jxda11cg.js} +2 -2
  101. package/dist/chunk-jyth1zjy.js +127 -0
  102. package/dist/chunk-k2pa44rf.js +2 -0
  103. package/dist/{chunk-kad2cp0z.js → chunk-k79x96ra.js} +37 -37
  104. package/dist/{chunk-75c46b62.js → chunk-kgfgb971.js} +4 -4
  105. package/dist/chunk-ma7d95f0.js +31 -0
  106. package/dist/chunk-mmm6mm16.js +3 -0
  107. package/dist/{chunk-r7haw6r7.js → chunk-mmwedr93.js} +5 -5
  108. package/dist/{chunk-dyg6sadv.js → chunk-mrrrngzd.js} +1 -1
  109. package/dist/{chunk-kvn23sz5.js → chunk-msr25dhc.js} +4 -4
  110. package/dist/chunk-myq3hrww.js +6 -0
  111. package/dist/{chunk-fk1rs7jb.js → chunk-n38yb274.js} +6 -6
  112. package/dist/chunk-n4cvg2sw.js +2 -0
  113. package/dist/chunk-nph4d1ff.js +42 -0
  114. package/dist/{chunk-7jgtphhg.js → chunk-nrvwejdw.js} +5 -5
  115. package/dist/{chunk-3cqxtkqv.js → chunk-p08x0z86.js} +7 -7
  116. package/dist/chunk-p22w6mwr.js +2 -0
  117. package/dist/{chunk-fb17t651.js → chunk-pdc9s7bg.js} +2 -2
  118. package/dist/chunk-pfk9ffbz.js +3 -0
  119. package/dist/{chunk-pvfx0dgz.js → chunk-prf164ct.js} +2 -2
  120. package/dist/chunk-pw9bhdaz.js +4 -0
  121. package/dist/chunk-qn63btbf.js +2 -0
  122. package/dist/{chunk-2bsrmqr8.js → chunk-qv6axke4.js} +2 -2
  123. package/dist/{chunk-n54c06wt.js → chunk-r3e6x87d.js} +3 -3
  124. package/dist/chunk-rb5xdcen.js +25 -0
  125. package/dist/{chunk-zm4s3n4p.js → chunk-rcadtv3x.js} +1 -1
  126. package/dist/{chunk-vbqts5sf.js → chunk-rjh2jwxx.js} +9 -9
  127. package/dist/chunk-rwrbdpdk.js +2 -0
  128. package/dist/chunk-sf0wsq74.js +2 -0
  129. package/dist/chunk-shkysa02.js +20 -0
  130. package/dist/chunk-shpc1ttk.js +2 -0
  131. package/dist/{chunk-22hdbqad.js → chunk-t2pzy3x1.js} +3 -3
  132. package/dist/chunk-t6yjxhn8.js +2 -0
  133. package/dist/chunk-tkkvvt26.js +2 -0
  134. package/dist/{chunk-g06qzkmp.js → chunk-tre98h62.js} +2 -2
  135. package/dist/chunk-vac56rgd.js +12 -0
  136. package/dist/chunk-vdxjy7j2.js +4 -0
  137. package/dist/{chunk-qa625vwc.js → chunk-vgt9f7ac.js} +4 -4
  138. package/dist/{chunk-xbdbn3bf.js → chunk-vmwdt8fr.js} +5 -5
  139. package/dist/chunk-vn3yx05b.js +2 -0
  140. package/dist/{chunk-fqg0espy.js → chunk-vqc4h16r.js} +2 -2
  141. package/dist/chunk-w1v1d7rq.js +406 -0
  142. package/dist/chunk-w2q32x72.js +2 -0
  143. package/dist/chunk-weqc0ssb.js +2 -0
  144. package/dist/{chunk-0zr1zxar.js → chunk-wpmrz872.js} +2 -2
  145. package/dist/chunk-wq712sw1.js +2 -0
  146. package/dist/chunk-wzgn9fv7.js +20 -0
  147. package/dist/{chunk-g2mcw1r4.js → chunk-x8k64g1e.js} +2 -2
  148. package/dist/chunk-xaa36b0x.js +3 -0
  149. package/dist/chunk-xnjf1zbn.js +21 -0
  150. package/dist/chunk-xyjn0rvj.js +3 -0
  151. package/dist/chunk-y3vget29.js +2 -0
  152. package/dist/chunk-y9x4pyp2.js +2 -0
  153. package/dist/chunk-yfrvbnc6.js +1312 -0
  154. package/dist/{chunk-febtq3xj.js → chunk-ym41ybz2.js} +6 -6
  155. package/dist/chunk-z8p6tk5z.js +2 -0
  156. package/dist/{chunk-4g8zase6.js → chunk-zevx9866.js} +2 -2
  157. package/dist/chunk-zhf01af3.js +3 -0
  158. package/dist/{chunk-jtvcxbwd.js → chunk-zqtbtqbq.js} +2 -2
  159. package/dist/chunk-ztbzktzg.js +2 -0
  160. package/dist/cli.js +62 -62
  161. package/dist/craft-entry.js +2 -2
  162. package/dist/craft.js +2 -2
  163. package/dist/expressions.d.ts +6 -21
  164. package/dist/expressions.js +12 -41
  165. package/dist/forms-validation.d.ts +0 -16
  166. package/dist/forms-validation.js +4 -2
  167. package/dist/forms.js +8 -6
  168. package/dist/i18n.js +6 -4
  169. package/dist/interpolation-context.js +69 -28
  170. package/dist/loops.js +70 -90
  171. package/dist/mustache-span.d.ts +21 -0
  172. package/dist/mustache-span.js +35 -0
  173. package/dist/process.js +4 -3
  174. package/dist/pwa.js +3 -3
  175. package/dist/server-bindings.js +12 -6
  176. package/dist/ssg.js +28 -28
  177. package/dist/utils.js +1 -2
  178. package/package.json +5 -5
  179. package/dist/chunk-1jgsst0v.js +0 -2
  180. package/dist/chunk-1vrqmdfe.js +0 -2
  181. package/dist/chunk-1vx1ha9v.js +0 -2
  182. package/dist/chunk-1y9jphbg.js +0 -2
  183. package/dist/chunk-22kgdhxy.js +0 -2
  184. package/dist/chunk-2etamr31.js +0 -4
  185. package/dist/chunk-2s49ggrz.js +0 -12
  186. package/dist/chunk-2zbnc6jq.js +0 -2
  187. package/dist/chunk-39beqd1g.js +0 -2
  188. package/dist/chunk-3q5yn5r0.js +0 -6
  189. package/dist/chunk-3tcy2hdt.js +0 -2
  190. package/dist/chunk-3ycbhpa2.js +0 -2
  191. package/dist/chunk-3yqs2ekt.js +0 -2
  192. package/dist/chunk-4mm9ttc7.js +0 -2
  193. package/dist/chunk-4q4vy4g6.js +0 -2
  194. package/dist/chunk-4zapx8zt.js +0 -20
  195. package/dist/chunk-5zkwems4.js +0 -2
  196. package/dist/chunk-6e4es31t.js +0 -3
  197. package/dist/chunk-6hmbzqt8.js +0 -2
  198. package/dist/chunk-7a3kffqy.js +0 -2
  199. package/dist/chunk-7mkw98cr.js +0 -3
  200. package/dist/chunk-7xks65hg.js +0 -3
  201. package/dist/chunk-8k38mddf.js +0 -2
  202. package/dist/chunk-8q05cxzd.js +0 -2
  203. package/dist/chunk-a7y0fk20.js +0 -12
  204. package/dist/chunk-abwxa3tj.js +0 -2
  205. package/dist/chunk-ayjje1hk.js +0 -2
  206. package/dist/chunk-c93291jk.js +0 -2
  207. package/dist/chunk-cf6d5kgb.js +0 -65
  208. package/dist/chunk-crahn5xa.js +0 -4
  209. package/dist/chunk-d1jyxxcm.js +0 -3
  210. package/dist/chunk-d365tseq.js +0 -20
  211. package/dist/chunk-d67qvrzc.js +0 -24
  212. package/dist/chunk-dwnvqy3f.js +0 -4
  213. package/dist/chunk-dxb7jw7g.js +0 -2
  214. package/dist/chunk-e8483tnk.js +0 -2
  215. package/dist/chunk-eaphbqqx.js +0 -2
  216. package/dist/chunk-em0chjea.js +0 -18
  217. package/dist/chunk-ercd4pqc.js +0 -2
  218. package/dist/chunk-ewj4gqwe.js +0 -31
  219. package/dist/chunk-f7bgg2e4.js +0 -2
  220. package/dist/chunk-g6s0xdgb.js +0 -4
  221. package/dist/chunk-jxsgky4v.js +0 -2
  222. package/dist/chunk-k90yzxwp.js +0 -2
  223. package/dist/chunk-kfx4cte8.js +0 -127
  224. package/dist/chunk-kxbw0e2f.js +0 -3
  225. package/dist/chunk-ky043mkv.js +0 -2
  226. package/dist/chunk-mbqqc20a.js +0 -2
  227. package/dist/chunk-mq2kpg6w.js +0 -2
  228. package/dist/chunk-n58ky78d.js +0 -2
  229. package/dist/chunk-n80wh9b5.js +0 -2
  230. package/dist/chunk-p7sfjgtm.js +0 -2
  231. package/dist/chunk-ps9htxmp.js +0 -2
  232. package/dist/chunk-qhaw7f32.js +0 -2
  233. package/dist/chunk-rh33ra9e.js +0 -2
  234. package/dist/chunk-rzs2hpqa.js +0 -2
  235. package/dist/chunk-s3sckkvv.js +0 -2
  236. package/dist/chunk-s89pq4v1.js +0 -2
  237. package/dist/chunk-sdqgmcbk.js +0 -2
  238. package/dist/chunk-srmm69d4.js +0 -2852
  239. package/dist/chunk-t00y30w3.js +0 -2
  240. package/dist/chunk-t1a39rpd.js +0 -2
  241. package/dist/chunk-tj4rzy69.js +0 -2
  242. package/dist/chunk-tme51pg1.js +0 -2
  243. package/dist/chunk-tv1qtqab.js +0 -3
  244. package/dist/chunk-twh5ck5w.js +0 -2
  245. package/dist/chunk-v4tt3t1y.js +0 -2
  246. package/dist/chunk-v5ekdsw0.js +0 -2
  247. package/dist/chunk-vdsrae92.js +0 -2
  248. package/dist/chunk-w88mpbxk.js +0 -11
  249. package/dist/chunk-wg6n7txf.js +0 -2
  250. package/dist/chunk-wj4rf7sb.js +0 -2
  251. package/dist/chunk-wrd5me1w.js +0 -33
  252. package/dist/chunk-xbevgwks.js +0 -2
  253. package/dist/chunk-y2k3ynr2.js +0 -2
  254. package/dist/chunk-y51ndrdb.js +0 -2
  255. package/dist/chunk-y9wqzvxt.js +0 -2
  256. package/dist/chunk-yn2d8x8m.js +0 -3
  257. package/dist/chunk-ysmt4jpn.js +0 -2
  258. package/dist/chunk-zmccfvbf.js +0 -2
  259. package/dist/chunk-ztpqxs72.js +0 -2
  260. package/dist/chunk-ztwnn466.js +0 -2
  261. package/dist/chunk-zx7v6a4g.js +0 -40
  262. package/dist/chunk-zx94g4pg.js +0 -2
  263. package/dist/chunk-zze1ez1c.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{de,Tt}from"./chunk-9yk5rasj.js";import{E}from"./chunk-7mkw98cr.js";function m(e){let t={"cache-first":{className:"CacheFirst",importFrom:"workbox-strategies"},"network-first":{className:"NetworkFirst",importFrom:"workbox-strategies"},"stale-while-revalidate":{className:"StaleWhileRevalidate",importFrom:"workbox-strategies"},"network-only":{className:"NetworkOnly",importFrom:"workbox-strategies"},"cache-only":{className:"CacheOnly",importFrom:"workbox-strategies"}};return t[e]||t["network-first"]}function g(e){return m(e).className}function d(e){let t=e.pwa;if(!t?.enabled)return"";let r=t.routes||[],n=t.cacheStorage,c=[];for(let a of r){let i=g(a.strategy),s=[];if(a.maxAgeSeconds||a.maxEntries||n?.maxEntries){let o=a.maxEntries||n?.maxEntries||100,u=a.maxAgeSeconds||(n?.maxAge?n.maxAge*24*60*60:void 0);s.push(`new ExpirationPlugin({
2
+ import{E}from"./chunk-354jmw2k.js";import{Be,wn}from"./chunk-9am6dsb1.js";function m(e){let t={"cache-first":{className:"CacheFirst",importFrom:"workbox-strategies"},"network-first":{className:"NetworkFirst",importFrom:"workbox-strategies"},"stale-while-revalidate":{className:"StaleWhileRevalidate",importFrom:"workbox-strategies"},"network-only":{className:"NetworkOnly",importFrom:"workbox-strategies"},"cache-only":{className:"CacheOnly",importFrom:"workbox-strategies"}};return t[e]||t["network-first"]}function g(e){return m(e).className}function d(e){let t=e.pwa;if(!t?.enabled)return"";let r=t.routes||[],n=t.cacheStorage,c=[];for(let a of r){let i=g(a.strategy),s=[];if(a.maxAgeSeconds||a.maxEntries||n?.maxEntries){let o=a.maxEntries||n?.maxEntries||100,u=a.maxAgeSeconds||(n?.maxAge?n.maxAge*24*60*60:void 0);s.push(`new ExpirationPlugin({
3
3
  maxEntries: ${o},
4
4
  ${u?`maxAgeSeconds: ${u},`:""}
5
5
  purgeOnQuotaError: true,
@@ -17,7 +17,7 @@ registerRoute(
17
17
  ],`:""}
18
18
  })
19
19
  );`)}return c.join(`
20
- `)}function p(e){if(e.startsWith("*.")){let t=e.slice(2);return`({ request }) => request.destination === '${f(t)}'`}if(e.endsWith("/**"))return`({ url }) => url.pathname.startsWith('${e.slice(0,-3)}')`;if(e.endsWith("/*")){let t=e.slice(0,-2);return`({ url }) => url.pathname.startsWith('${t}') && !url.pathname.slice(${t.length+1}).includes('/')`}if(e.includes("*")&&!e.startsWith("*")){let[t,r]=e.split("*");return`({ url }) => url.pathname.startsWith('${t}') && url.pathname.endsWith('${r}')`}if(e==="/"||!e.includes("*"))return`({ url }) => url.pathname === '${e}'`;return`new RegExp('${x(e).replace(/\\\*/g,".*")}')`}function f(e){return{js:"script",mjs:"script",css:"style",html:"document",htm:"document",png:"image",jpg:"image",jpeg:"image",gif:"image",svg:"image",webp:"image",avif:"image",ico:"image",woff:"font",woff2:"font",ttf:"font",eot:"font",otf:"font"}[e.toLowerCase()]||"empty"}function h(e){return"stx-"+e.replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase().slice(0,30)+"-cache"}function x(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(e,t){let r=e.pwa;if(!r?.enabled)return{mode:"generate",modules:[],skipWaiting:!0,clientsClaim:!0};let n=r.serviceWorker||{},c=r.routes||[],a=[{name:"workbox-precaching",exports:["precacheAndRoute","cleanupOutdatedCaches"]},{name:"workbox-routing",exports:["registerRoute","NavigationRoute","setDefaultHandler"]}],i=new Set;for(let o of c)i.add(g(o.strategy));if(i.size>0)a.push({name:"workbox-strategies",exports:Array.from(i)});if(c.some((o)=>o.maxAgeSeconds||o.maxEntries)||r.cacheStorage)a.push({name:"workbox-expiration",exports:["ExpirationPlugin"]});if(c.some((o)=>o.strategy==="network-first"||o.strategy==="stale-while-revalidate"))a.push({name:"workbox-cacheable-response",exports:["CacheableResponsePlugin"]});if(r.backgroundSync?.enabled)a.push({name:"workbox-background-sync",exports:["BackgroundSyncPlugin","Queue"]});if(n.navigationPreload)a.push({name:"workbox-navigation-preload",exports:["enable"]});let l=t?de(t,e):void 0;return{mode:"generate",modules:a,precacheManifest:l?.entries,skipWaiting:n.skipWaiting??!0,clientsClaim:n.clientsClaim??!0,offlineFallback:r.offline?.enabled?"/offline.html":void 0,navigationPreload:n.navigationPreload??!1,cacheVersion:n.cacheVersion||"1.0.0"}}function R(e,t){let r=e.pwa;if(!r?.enabled)return"";let n=b(e,t),c=r.serviceWorker||{},{push:a,backgroundSync:i}=r,s=t?de(t,e):null,l=s?Tt(s):"[]",o=k(n.modules),u=d(e);return`/**
20
+ `)}function p(e){if(e.startsWith("*.")){let t=e.slice(2);return`({ request }) => request.destination === '${f(t)}'`}if(e.endsWith("/**"))return`({ url }) => url.pathname.startsWith('${e.slice(0,-3)}')`;if(e.endsWith("/*")){let t=e.slice(0,-2);return`({ url }) => url.pathname.startsWith('${t}') && !url.pathname.slice(${t.length+1}).includes('/')`}if(e.includes("*")&&!e.startsWith("*")){let[t,r]=e.split("*");return`({ url }) => url.pathname.startsWith('${t}') && url.pathname.endsWith('${r}')`}if(e==="/"||!e.includes("*"))return`({ url }) => url.pathname === '${e}'`;return`new RegExp('${x(e).replace(/\\\*/g,".*")}')`}function f(e){return{js:"script",mjs:"script",css:"style",html:"document",htm:"document",png:"image",jpg:"image",jpeg:"image",gif:"image",svg:"image",webp:"image",avif:"image",ico:"image",woff:"font",woff2:"font",ttf:"font",eot:"font",otf:"font"}[e.toLowerCase()]||"empty"}function h(e){return"stx-"+e.replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase().slice(0,30)+"-cache"}function x(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(e,t){let r=e.pwa;if(!r?.enabled)return{mode:"generate",modules:[],skipWaiting:!0,clientsClaim:!0};let n=r.serviceWorker||{},c=r.routes||[],a=[{name:"workbox-precaching",exports:["precacheAndRoute","cleanupOutdatedCaches"]},{name:"workbox-routing",exports:["registerRoute","NavigationRoute","setDefaultHandler"]}],i=new Set;for(let o of c)i.add(g(o.strategy));if(i.size>0)a.push({name:"workbox-strategies",exports:Array.from(i)});if(c.some((o)=>o.maxAgeSeconds||o.maxEntries)||r.cacheStorage)a.push({name:"workbox-expiration",exports:["ExpirationPlugin"]});if(c.some((o)=>o.strategy==="network-first"||o.strategy==="stale-while-revalidate"))a.push({name:"workbox-cacheable-response",exports:["CacheableResponsePlugin"]});if(r.backgroundSync?.enabled)a.push({name:"workbox-background-sync",exports:["BackgroundSyncPlugin","Queue"]});if(n.navigationPreload)a.push({name:"workbox-navigation-preload",exports:["enable"]});let l=t?Be(t,e):void 0;return{mode:"generate",modules:a,precacheManifest:l?.entries,skipWaiting:n.skipWaiting??!0,clientsClaim:n.clientsClaim??!0,offlineFallback:r.offline?.enabled?"/offline.html":void 0,navigationPreload:n.navigationPreload??!1,cacheVersion:n.cacheVersion||"1.0.0"}}function R(e,t){let r=e.pwa;if(!r?.enabled)return"";let n=b(e,t),c=r.serviceWorker||{},{push:a,backgroundSync:i}=r,s=t?Be(t,e):null,l=s?wn(s):"[]",o=k(n.modules),u=d(e);return`/**
21
21
  * Service Worker - Generated by stx with Workbox
22
22
  * Cache Version: ${n.cacheVersion}
23
23
  *
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Broadcast as s,BroadcastServer as h}from"ts-broadcasting";import{channel as Hl}from"ts-broadcasting";import{Broadcast as Vl,BroadcastServer as Ul}from"ts-broadcasting";var e=null,u=[];function Nl(){return e}async function Dl(n){if(e)return e;let t=n.driver??"bun",r=n.host??"0.0.0.0",c=n.port??6001,l=n.scheme??"ws",a={verbose:n.verbose??!1,driver:t,default:t,connections:{[t]:{driver:t,host:r,port:c,scheme:l}}};return e=new h(a),s.setServer(e),await e.start(),e}async function Ml(){for(let n of u)clearInterval(n);if(u.length=0,!e)return;await e.stop(),e=null}async function Ll(n){let t=await import(n),r=t.default??t;if(typeof r!=="function")throw Error(`routes/channels.ts must export a default function, got ${typeof r}`);let c=0;return r({channel(a,o){if(c++,o.authorize&&e)e.channels.channel(a,o.authorize);if(o.interval&&o.data){let d=o.event??`${a}.updated`,p=o.data,v=setInterval(async()=>{try{let g=await p();Pa(a,d,g)}catch{}},o.interval);u.push(v)}}}),c}var f=!1;function i(){if(e)return!0;if(!f)f=!0,console.warn("[stx] broadcast() called before server started \u2014 messages will be sent once broadcasting is ready");return!1}function Pa(n,t,r){if(!i())return;s.send(n,t,r)}function jl(n,t,r){if(!i())return;s.toUser(n,t,r)}function Bl(n,t,r){if(!i())return;s.toUsers(n,t,r)}function Fl(n,t,r){if(!i())return;s.send(`private-${n}`,t,r)}function zl(n,t,r){if(!i())return;s.presence(n,t,r)}
3
- export{Nl,Dl,Ml,Ll,Pa,jl,Bl,Fl,zl,Hl,Vl,Ul};
2
+ import{Broadcast as s,BroadcastServer as h}from"ts-broadcasting";import{channel as Wu}from"ts-broadcasting";import{Broadcast as qu,BroadcastServer as Gu}from"ts-broadcasting";var e=null,u=[];function Lu(){return e}async function ju(n){if(e)return e;let t=n.driver??"bun",r=n.host??"0.0.0.0",c=n.port??6001,l=n.scheme??"ws",a={verbose:n.verbose??!1,driver:t,default:t,connections:{[t]:{driver:t,host:r,port:c,scheme:l}}};return e=new h(a),s.setServer(e),await e.start(),e}async function Bu(){for(let n of u)clearInterval(n);if(u.length=0,!e)return;await e.stop(),e=null}async function Fu(n){let t=await import(n),r=t.default??t;if(typeof r!=="function")throw Error(`routes/channels.ts must export a default function, got ${typeof r}`);let c=0;return r({channel(a,o){if(c++,o.authorize&&e)e.channels.channel(a,o.authorize);if(o.interval&&o.data){let d=o.event??`${a}.updated`,p=o.data,v=setInterval(async()=>{try{let g=await p();Dc(a,d,g)}catch{}},o.interval);u.push(v)}}}),c}var f=!1;function i(){if(e)return!0;if(!f)f=!0,console.warn("[stx] broadcast() called before server started \u2014 messages will be sent once broadcasting is ready");return!1}function Dc(n,t,r){if(!i())return;s.send(n,t,r)}function zu(n,t,r){if(!i())return;s.toUser(n,t,r)}function Hu(n,t,r){if(!i())return;s.toUsers(n,t,r)}function Vu(n,t,r){if(!i())return;s.send(`private-${n}`,t,r)}function Uu(n,t,r){if(!i())return;s.presence(n,t,r)}
3
+ export{Lu,ju,Bu,Fu,Dc,zu,Hu,Vu,Uu,Wu,qu,Gu};
@@ -0,0 +1,127 @@
1
+ // @bun
2
+ import"./chunk-bk96wjaz.js";import{_s,Ko,gc}from"./chunk-7rta163c.js";import"./chunk-ce6zddpf.js";import"./chunk-w1v1d7rq.js";import"./chunk-5t4qtxgr.js";import"./chunk-pdc9s7bg.js";import"./chunk-a3d0g4mr.js";import"./chunk-vgt9f7ac.js";import{i}from"./chunk-yfrvbnc6.js";import"./chunk-0jq3w712.js";import"./chunk-04kg16qs.js";import"./chunk-xyjn0rvj.js";import{gt,He,fe,Qt,Ee,Vn,Un,Ve}from"./chunk-74pej67a.js";import{s}from"./chunk-dpjnjs09.js";import"./chunk-nph4d1ff.js";import"./chunk-55x799st.js";import"./chunk-rb5xdcen.js";import{Vr}from"./chunk-xnjf1zbn.js";import"./chunk-prf164ct.js";import{pt}from"./chunk-fg3jw17w.js";import"./chunk-9y2ncrnq.js";import"./chunk-myq3hrww.js";import{qs}from"./chunk-wzgn9fv7.js";import"./chunk-asqnaddf.js";import"./chunk-vac56rgd.js";import"./chunk-3e7haxwt.js";import"./chunk-pw9bhdaz.js";import{existsSync as le,mkdirSync as fr,readFileSync as pr}from"fs";import X from"path";import{existsSync as $e,mkdirSync as Et,realpathSync as nr,rmSync as It}from"fs";import C from"path";import{existsSync as Yn}from"fs";import te from"path";var Mt="data-stx-b",Xe=new Set(Ko),Dt=new Set(_s);function Lt(n){if(n==="ref"||n==="data-stx-ref")return"ref";if(n.startsWith("::"))return null;if(n.startsWith("@bind:")||n.startsWith("x-bind:"))return"attr";if(n.startsWith("@")||n.startsWith(":")){let e=n.slice(1).split(".")[0];if(Xe.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(gc(e))return"event";if(n.startsWith("@"))return"event";return"attr"}if(n.startsWith("x-")){let e=n.split(".")[0];if(!Dt.has(e))return"attr";let t=e.slice(2);if(t==="cloak"||t==="data"||t==="bind")return null;if(t==="tooltip"||t==="tooltip-position")return null;return Xe.has(t)?t==="if"?"if":t:"attr"}return null}function Vt(n){let e=[];for(let[t,r]of n){let o=Lt(t);if(o)e.push({name:t,value:r,kind:o})}return e}var $t=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,pe=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function ze(n){let e=[],t=0;return{html:n.replace($t,(o,a,c)=>{if(!c||!/[:@]|x-/.test(c))return o;let u=[];pe.lastIndex=0;for(let b=pe.exec(c);b;b=pe.exec(c))u.push([b[1],b[2]??b[3]??b[4]??""]);let f=Vt(u);if(!f.length)return o;let h={id:t++,bindings:f};if(f.some((b)=>b.kind==="for"))h.template=!0;e.push(h);let S=o.endsWith("/>");return`${o.slice(0,S?-2:-1).trimEnd()} ${Mt}="${h.id}"${S?"/>":">"}`}),manifest:{entries:e}}}import pn from"path";function re(n){let e=n&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(n.trim());if(!e)return;let t=Number(e[1])*(e[2]==="rem"?16:1);return Number.isFinite(t)?t:void 0}function ge(n,e){if(!fe[n])return;return re(e?.get(Qt(n))??fe[n].value)}function he(n,e){let t=Vn[n];if(!t)return;return re(e?.get(Ve(t))??Ee[t]?.value)}function me(n,e){let t=Un[n];if(!t)return;let r=re(e?.get(Ve(t.size))??Ee[t.size]?.value),o=re(e?.get(Ve(t.leading))??Ee[t.leading]?.value);if(r===void 0||o===void 0)return;return{fontSize:r,lineHeight:o}}var jt={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"}},Je={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},Ue={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},qe={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function G(n){let e=n.lastIndexOf("/");if(e>0&&!n.endsWith("]")){let r=G(n.slice(0,e)),o=n.slice(e+1),a=/^\[(.+)\]$/.test(o)?Number.parseFloat(o.slice(1,-1))*(o.includes("%")?1:100):Number.parseFloat(o);if(!r||!Number.isFinite(a))return;return Wt(r,a/100)}if(n==="transparent")return"transparent";if(n==="current")return"currentColor";if(n==="black")return"#000000";if(n==="white")return"#ffffff";let t=n.split("-");if(t.length===2){let[r,o]=t,a=jt[r];if(a&&typeof a==="object")return a[o]}if(n.startsWith("[")&&n.endsWith("]")){let r=n.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(r)?r:void 0}return}function be(n){return G(n.trim())}function Wt(n,e){if(n==="transparent")return n;let t=n.startsWith("#")?n.slice(1):"";if(t.length===3)t=t.split("").map((o)=>o+o).join("");if(t.length===8)t=t.slice(0,6);if(t.length!==6)return;let r=Math.round(Math.min(1,Math.max(0,e))*255);return`#${t}${r.toString(16).padStart(2,"0")}`}function ye(n,e=16){if(!n.startsWith("[")||!n.endsWith("]"))return;let t=n.slice(1,-1),r=Number.parseFloat(t);if(!Number.isFinite(r))return;if(t.endsWith("rem"))return r*16;if(t.endsWith("em"))return r*e;return r}function O(n){if(n.startsWith("[")&&n.endsWith("]")){let e=n.slice(1,-1);if(e.endsWith("%"))return;let t=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(t)?t:void 0}return Je[n]??he(n)}function ie(n){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(n);if(e)return`${Number.parseFloat(e[1])}%`;return O(n)}var Ft={flex:(n,e)=>(e.display="flex",!0),hidden:(n,e)=>(e.display="none",!0),grid:(n,e)=>(e.display="grid",!0),"flex-row":(n,e)=>(e.flexDirection="row",!0),"flex-col":(n,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(n,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(n,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(n,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(n,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(n,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(n,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(n,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(n,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(n,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(n,e)=>(e.flexGrow=1,!0),"grow-0":(n,e)=>(e.flexGrow=0,!0),shrink:(n,e)=>(e.flexShrink=1,!0),"shrink-0":(n,e)=>(e.flexShrink=0,!0),"order-first":(n,e)=>(e.order=-9999,!0),"order-last":(n,e)=>(e.order=9999,!0),"order-none":(n,e)=>(e.order=0,!0),"justify-start":(n,e)=>(e.justifyContent="flex-start",!0),"justify-center":(n,e)=>(e.justifyContent="center",!0),"justify-end":(n,e)=>(e.justifyContent="flex-end",!0),"justify-between":(n,e)=>(e.justifyContent="space-between",!0),"justify-around":(n,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(n,e)=>(e.justifyContent="space-evenly",!0),"items-start":(n,e)=>(e.alignItems="flex-start",!0),"items-center":(n,e)=>(e.alignItems="center",!0),"items-end":(n,e)=>(e.alignItems="flex-end",!0),"items-stretch":(n,e)=>(e.alignItems="stretch",!0),"items-baseline":(n,e)=>(e.alignItems="baseline",!0),"self-auto":(n,e)=>(e.alignSelf="auto",!0),"self-start":(n,e)=>(e.alignSelf="flex-start",!0),"self-center":(n,e)=>(e.alignSelf="center",!0),"self-end":(n,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(n,e)=>(e.alignSelf="stretch",!0),"self-baseline":(n,e)=>(e.alignSelf="baseline",!0),"min-w-0":(n,e)=>(e.minWidth=0,!0),"aspect-square":(n,e)=>(e.aspectRatio=1,!0),"inset-0":(n,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"tracking-tighter":(n,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(n,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(n,e)=>(e.letterSpacing=0,!0),"tracking-wide":(n,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(n,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(n,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(n,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(n,e)=>(e.position="relative",!0),absolute:(n,e)=>(e.position="absolute",!0),"overflow-visible":(n,e)=>(e.overflow="visible",!0),"overflow-hidden":(n,e)=>(e.overflow="hidden",!0),"overflow-scroll":(n,e)=>(e.overflow="scroll",!0),"overflow-x-auto":()=>!0,"overflow-x-scroll":()=>!0,"overflow-y-auto":()=>!0,"overflow-y-scroll":()=>!0,"font-thin":(n,e)=>(e.fontWeight="100",!0),"font-extralight":(n,e)=>(e.fontWeight="200",!0),"font-light":(n,e)=>(e.fontWeight="300",!0),"font-normal":(n,e)=>(e.fontWeight="400",!0),"font-medium":(n,e)=>(e.fontWeight="500",!0),"font-semibold":(n,e)=>(e.fontWeight="600",!0),"font-bold":(n,e)=>(e.fontWeight="bold",!0),"font-extrabold":(n,e)=>(e.fontWeight="800",!0),"font-black":(n,e)=>(e.fontWeight="900",!0),italic:(n,e)=>(e.fontStyle="italic",!0),"not-italic":(n,e)=>(e.fontStyle="normal",!0),"text-left":(n,e)=>(e.textAlign="left",!0),"text-center":(n,e)=>(e.textAlign="center",!0),"text-right":(n,e)=>(e.textAlign="right",!0),"text-justify":(n,e)=>(e.textAlign="justify",!0),uppercase:(n,e)=>(e.textTransform="uppercase",!0),lowercase:(n,e)=>(e.textTransform="lowercase",!0),capitalize:(n,e)=>(e.textTransform="capitalize",!0),"normal-case":(n,e)=>(e.textTransform="none",!0),underline:(n,e)=>(e.textDecorationLine="underline",!0),"line-through":(n,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(n,e)=>(e.textDecorationLine="none",!0)};function Xt(n,e){if(!n.startsWith("bg-"))return!1;let t=n.slice(3),r=G(t);if(r)return e.backgroundColor=r,!0;return!1}function zt(n,e){if(!n.startsWith("text-"))return!1;let t=n.slice(5),r=me(t);if(r)return Object.assign(e,r),!0;if(Ue[t])return e.fontSize=Ue[t],!0;if(t.startsWith("[")&&t.endsWith("]")){let a=t.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(a)){let c=a.endsWith("rem")||a.endsWith("em")?Number.parseFloat(a)*16:Number.parseFloat(a);if(Number.isFinite(c))return e.fontSize=c,!0}}let o=G(t);if(o)return e.color=o,!0;return!1}var Ht=new Set(["t","tr","r","br","b","bl","l","tl"]);function Ut(n,e){let t=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(n);if(t&&Ht.has(t[1]))return e.gradientDirection=`to-${t[1]}`,!0;let r=/^(from|via|to)-(.+)$/.exec(n);if(!r)return!1;let o=G(r[2]);if(!o)return!1;if(r[1]==="from")e.gradientFrom=o;else if(r[1]==="via")e.gradientVia=o;else e.gradientTo=o;return!0}function qt(n,e){for(let t of["fill","stroke"]){let r=`${t}-`;if(!n.startsWith(r))continue;let o=n.slice(r.length);if(o==="none")return e[t]="none",!0;if(t==="stroke"&&/^\d+(?:\.\d+)?$/.test(o))return e.strokeWidth=Number.parseFloat(o),!0;if(t==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(o))return e.strokeWidth=Number.parseFloat(o.slice(1)),!0;let a=G(o);if(a)return e[t]=a,!0}return!1}function Gt(n,e){if(n.startsWith("p-")){let t=O(n.slice(2));if(t!==void 0)return e.padding=t,!0}if(n.startsWith("px-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingHorizontal=t,!0}if(n.startsWith("py-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingVertical=t,!0}if(n.startsWith("pt-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingTop=t,!0}if(n.startsWith("pr-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingRight=t,!0}if(n.startsWith("pb-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingBottom=t,!0}if(n.startsWith("pl-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingLeft=t,!0}return!1}function Ke(n,e){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(n)){let t={};if(!Ke(n.slice(1),t))return!1;let r=Object.entries(t);if(r.some(([,o])=>typeof o!=="number"))return!1;for(let[o,a]of r)e[o]=-a;return!0}if(n.startsWith("m-")){let t=O(n.slice(2));if(t!==void 0)return e.margin=t,!0}if(n.startsWith("mx-")){let t=O(n.slice(3));if(t!==void 0)return e.marginHorizontal=t,!0}if(n.startsWith("my-")){let t=O(n.slice(3));if(t!==void 0)return e.marginVertical=t,!0}if(n.startsWith("mt-")){let t=O(n.slice(3));if(t!==void 0)return e.marginTop=t,!0}if(n.startsWith("mr-")){let t=O(n.slice(3));if(t!==void 0)return e.marginRight=t,!0}if(n.startsWith("mb-")){let t=O(n.slice(3));if(t!==void 0)return e.marginBottom=t,!0}if(n.startsWith("ml-")){let t=O(n.slice(3));if(t!==void 0)return e.marginLeft=t,!0}return!1}function Jt(n,e){if(!n.startsWith("w-"))return!1;let t=n.slice(2);if(t==="full")return e.width="100%",!0;if(t==="screen")return e.width="100%",!0;if(t==="auto")return e.width="auto",!0;if(t.includes("/")){let[o,a]=t.split("/"),c=Number.parseInt(o)/Number.parseInt(a)*100;return e.width=`${c}%`,!0}let r=ie(t);if(r!==void 0)return e.width=r,!0;return!1}function Kt(n,e){if(!n.startsWith("h-"))return!1;let t=n.slice(2);if(t==="full")return e.height="100%",!0;if(t==="screen")return e.height="100%",!0;if(t==="auto")return e.height="auto",!0;let r=ie(t);if(r!==void 0)return e.height=r,!0;return!1}function Yt(n,e){if(n==="rounded")return e.borderRadius=qe.DEFAULT,!0;if(!n.startsWith("rounded-"))return!1;let t=n.slice(8);if(t==="")return!1;let r=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(t),o=qe[r[2]]??ge(r[2])??ye(r[2]);if(o===void 0)return!1;let a={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],tl:["borderTopLeftRadius"],tr:["borderTopRightRadius"],bl:["borderBottomLeftRadius"],br:["borderBottomRightRadius"]};for(let c of r[1]?a[r[1]]:["borderRadius"])e[c]=o;return!0}function Zt(n,e){let t=/^border(?:-([trblxy]))?(?:-(\d+|\[[^\]]+\]))?$/.exec(n);if(!t)return!1;let[,r="",o]=t,a=o===void 0?1:Number(o);if(o?.startsWith("[")){let u=/^\[(\d+(?:\.\d+)?|\.\d+)(px|rem)?\]$/.exec(o);if(!u)return!1;a=Number(u[1])*(u[2]==="rem"?16:1)}if(!Number.isFinite(a)||a<0)return!1;let c={"":["borderWidth"],t:["borderTopWidth"],r:["borderRightWidth"],b:["borderBottomWidth"],l:["borderLeftWidth"],x:["borderLeftWidth","borderRightWidth"],y:["borderTopWidth","borderBottomWidth"]};for(let u of c[r])e[u]=a;return!0}function en(n,e){if(!n.startsWith("border-"))return!1;let t=n.slice(7),r=G(t);if(r)return e.borderColor=r,!0;return!1}function tn(n,e){if(!n.startsWith("opacity-"))return!1;let t=Number.parseInt(n.slice(8));if(!Number.isNaN(t))return e.opacity=t/100,!0;return!1}function nn(n,e){if(n.startsWith("tracking-[")){let t=ye(n.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(t===void 0)return!1;return e.letterSpacing=t,!0}if(n.startsWith("leading-")){let t=n.slice(8),r=typeof e.fontSize==="number"?e.fontSize:16,o={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=t.startsWith("[")?/^\[[\d.]+\]$/.test(t)?Number.parseFloat(t.slice(1,-1))*r:ye(t,r):o[t]!==void 0?o[t]*r:Je[t];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function rn(n,e){let t=/^grid-cols-(\d+)$/.exec(n);if(!t)return!1;return e.gridColumns=Number(t[1]),!0}function sn(n,e){if(!n.startsWith("size-"))return!1;let t=n.slice(5),r=t==="full"?"100%":ie(t);if(r===void 0)return!1;return e.width=r,e.height=r,!0}var on={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function an(n,e){let t=/^(min|max)-(w|h)-(.+)$/.exec(n);if(!t)return!1;let[,r,o,a]=t,c=a==="full"||a==="screen"?"100%":a==="none"?void 0:o==="w"&&r==="max"&&on[a]||ie(a);if(c===void 0&&a!=="none")return!1;let u=`${r}${o==="w"?"Width":"Height"}`;if(c===void 0)delete e[u];else e[u]=c;return!0}function cn(n,e){let t=/^(-?)(top|right|bottom|left)-(.+)$/.exec(n);if(!t)return!1;let r=t[3]==="full"?"100%":O(t[3]);if(r===void 0)return!1;return e[t[2]]=typeof r==="number"&&t[1]?-r:r,!0}function ln(n,e){let t=/^(-?)translate-(x|y)-(.+)$/.exec(n);if(!t)return!1;let r=t[3],o;if(r.startsWith("[")){let u=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(r);if(!u)return!1;o=Number(u[1])*(u[2]?.endsWith("em")?16:1)}else o=O(r);if(o===void 0||!Number.isFinite(o))return!1;if(t[1])o=-o;let a=t[2]==="x"?"translateX":"translateY",c=a==="translateX"?{translateX:o}:{translateY:o};return e.transform=[...(e.transform??[]).filter((u)=>!(a in u)),c],!0}function un(n,e){let t=/^space-(x|y)-(.+)$/.exec(n);if(!t)return!1;let r=O(t[2]);if(r===void 0)return!1;return e.gap=r,!0}function dn(n,e){if(n.startsWith("gap-")){let t=O(n.slice(4));if(t!==void 0)return e.gap=t,!0}if(n.startsWith("gap-x-")){let t=O(n.slice(6));if(t!==void 0)return e.columnGap=t,!0}if(n.startsWith("gap-y-")){let t=O(n.slice(6));if(t!==void 0)return e.rowGap=t,!0}return!1}function fn(n,e){let r={"shadow-none":[0,0,0,0],"shadow-xs":[1,1,0.05,1],"shadow-sm":[2,1,0.1,2],shadow:[3,2,0.12,3],"shadow-md":[6,4,0.15,4],"shadow-lg":[10,6,0.18,8],"shadow-xl":[16,10,0.2,12],"shadow-2xl":[24,16,0.25,18]}[n];if(!r)return!1;let[o,a,c,u]=r;return Object.assign(e,{shadowColor:"#000000",shadowOpacity:c,shadowRadius:o,shadowOffset:{width:0,height:a},elevation:u}),!0}function Q(n,e,t={}){let r=[],o=[],a=[],c=[],u={focus:{classes:[],originals:new Map},focusWithin:{classes:[],originals:new Map}},f=new Map;function h(l,p){let y=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(l),w=y&&gt[y[2]];if(w){let x=e?.get(He(y[2]));return[`${y[1]}-${x===void 0?w[p]:`[${x}]`}${y[3]||""}`]}let N=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(l);if(N&&fe[N[2]]){let x=ge(N[2],e);return x===void 0?void 0:[`rounded-${N[1]?`${N[1]}-`:""}[${x}px]`]}let d=l.startsWith("text-")?l.slice(5):"";if(Un[d]){let x=me(d,e);return x&&[`text-[${x.fontSize}px]`,`leading-[${x.lineHeight}px]`]}for(let x of Object.keys(Vn)){if(!l.endsWith(`-${x}`))continue;let R=he(x,e);return R===void 0?void 0:[`${l.slice(0,-x.length)}[${R}px]`]}return[l]}function S(l,p){if(!f.has(l))f.set(l,new Set);return f.get(l).add(p),l}for(let l of n.split(/\s+/).filter(Boolean)){let p=/^(dark:)?(focus|focus-within):(dark:)?(.+)$/.exec(l),y=p?.[2]==="focus"?"focus":"focusWithin";if(p&&t[y]&&!(p[1]&&p[3])){let w=`${p[1]||p[3]?"dark:":""}${p[4]}`,N=u[y];N.classes.push(w),N.originals.set(w,[...N.originals.get(w)??[],l]);continue}if(l.startsWith("dark:")){let w=h(l.slice(5),"dark");if(!w)c.push(l);else o.push(...w.map((N)=>S(N,l)))}else if(!l.includes(":")||l.startsWith("[")){let w=h(l,"light"),N=h(l,"dark");if(!w||!N){c.push(l);continue}if(r.push(...w.map((d)=>S(d,l))),N.join(" ")!==w.join(" "))a.push(...N.map((d)=>S(d,l)))}else c.push(l)}let v=[],b=Ge(r,v),m={style:b,unknown:v};if(o.length||a.length)m.dark=Ge([...a,...o],v);if(b.transform&&m.dark?.transform){let l=new Set(m.dark.transform.flatMap((p)=>Object.keys(p)));m.dark.transform=[...b.transform.filter((p)=>!Object.keys(p).some((y)=>l.has(y))),...m.dark.transform]}for(let l of r){if(l==="truncate")m.numberOfLines=1;let p=/^line-clamp-(\d+)$/.exec(l);if(p)m.numberOfLines=Number(p[1]);if(!m.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(l))m.icon=l}let g=v.flatMap((l)=>[...f.get(l)??[l]]);m.unknown=[...new Set([...g.filter((l)=>!/^line-clamp-\d+$/.test(l)),...c])];for(let l of["focus","focusWithin"]){let p=u[l];if(!p.classes.length)continue;let y=Q(p.classes.join(" "),e);m[l]={style:y.style,dark:y.dark},m.unknown=[...new Set([...m.unknown,...y.unknown.flatMap((w)=>p.originals.get(w)??[w])])];for(let w of p.classes)if(/^(?:dark:)?(?:truncate|line-clamp-\d+|i-[a-z0-9]+-.+)$/.test(w))m.unknown.push(...p.originals.get(w))}return m}function Ge(n,e){let t={},r=Array.isArray(n)?n:n.split(/\s+/).filter(Boolean);for(let o of r){if(/^i-[a-z0-9]+-/.test(o))continue;let a=Ft[o];if(a){a("",t);continue}if(fn(o,t))continue;if(Ut(o,t))continue;if(Xt(o,t))continue;if(qt(o,t))continue;if(zt(o,t))continue;if(Gt(o,t))continue;if(Ke(o,t))continue;if(Jt(o,t))continue;if(Kt(o,t))continue;if(Yt(o,t))continue;if(Zt(o,t))continue;if(en(o,t))continue;if(tn(o,t))continue;if(dn(o,t))continue;if(nn(o,t))continue;if(sn(o,t))continue;if(an(o,t))continue;if(rn(o,t))continue;let c=/^order-\[(-?\d+)\]$/.exec(o)??/^order-(-?\d+)$/.exec(o);if(c){t.order=Number(c[1]);continue}if(cn(o,t))continue;if(ln(o,t))continue;if(un(o,t))continue;if(e?.push(o),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${o}`)}return t}var Ye=new Map;function Qe(n,e){if(!n)return;let t=n.trim(),r=t.lastIndexOf("-"),o=r===-1?e[t]:e[t.slice(0,r)],a=r===-1?o:o?.[t.slice(r+1)];if(typeof a==="string"&&/^#[\da-f]{3,8}$/i.test(a))return a;return be(t)??be(`[${t}]`)}function gn(n){let e=n.roles??{},t=n.shapes??{},r=n.density??{},o={...n.theme?.colors,...n.theme?.extend?.colors},a=[],c=[];for(let[u,f]of Object.entries(e)){if(!gt[u])continue;let h=Qe(typeof f==="string"?f:f?.light,o),S=Qe(typeof f==="string"?f:f?.dark,o);if(h)a.push(`${He(u)}: ${h};`);if(S)c.push(`${He(u)}: ${S};`)}for(let[u,f]of Object.entries(t))if(fe[u])a.push(`${Qt(u)}: ${f};`);for(let[u,f]of Object.entries(r))if(Ee[u])a.push(`${Ve(u)}: ${f};`);return[a.length?`:root { ${a.join(" ")} }`:"",c.length?`.dark { ${c.join(" ")} }`:""].filter(Boolean).join(`
3
+ `)}async function hn(n){let{resolveUserCssConfig:e}=await import("./chunk-emaexvgz.js"),t=await e(n);return t?gn(t):""}function Ze(n){let e=pn.resolve(n),t=Ye.get(e);if(!t)t=hn(e).catch(()=>""),Ye.set(e,t);return t}var tt={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},et={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 mn(n){return n==="role"||n==="aria-label"||n==="aria-valuetext"||n in tt}function yn(n,e){if(e===void 0||e===null)return;let t=String(e).trim().toLowerCase();if(t==="mixed")return n==="aria-checked"?"mixed":!0;if(t==="undefined")return;return t===""||t==="true"}function bn(n){if(n===void 0||n===null)return null;for(let e of String(n).trim().toLowerCase().split(/\s+/))if(et[e])return et[e];return null}function vn(n,e,t){if(n==="aria-label")return{accessibilityLabel:e===void 0||e===null||e===""?null:String(e)};if(n==="aria-valuetext")return{accessibilityValue:e===void 0||e===null||e===""?null:String(e)};if(n==="role")return{accessibilityRole:bn(e)};let r=tt[n];if(!r)return;let o=t.accessibilityState,a=o&&typeof o==="object"?{...o}:{},c=yn(n,e);if(c===void 0)delete a[r];else a[r]=c;return{accessibilityState:Object.keys(a).length?a:null}}function wn(n){let e=n.accessibilityState&&typeof n.accessibilityState==="object"?n.accessibilityState:void 0,t={};for(let[o,a]of Object.entries(n)){if(!mn(o))continue;let c=vn(o,a,t);if(c)Object.assign(t,c)}for(let o of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(n[o]===void 0&&t[o]!==void 0&&t[o]!==null)n[o]=t[o];let r=t.accessibilityState;if(r)n.accessibilityState={...r,...e}}var ve=["accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue"];function we(n){let e={...n};return wn(e),Object.fromEntries(ve.filter((t)=>(t in e)).map((t)=>[t,e[t]]))}var Se={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",onchange:"onChange",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll","scroll-begin-drag":"onScrollBeginDrag",scrollbegindrag:"onScrollBeginDrag","scroll-end-drag":"onScrollEndDrag",scrollenddrag:"onScrollEndDrag","momentum-scroll-begin":"onMomentumScrollBegin",momentumscrollbegin:"onMomentumScrollBegin","momentum-scroll-end":"onMomentumScrollEnd",momentumscrollend:"onMomentumScrollEnd",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError",play:"onPlay",playing:"onPlay",pause:"onPause",ended:"onEnd",end:"onEnd",timeupdate:"onProgress",progress:"onProgress",loadedmetadata:"onLoad",enterpictureinpicture:"onPictureInPictureStart",leavepictureinpicture:"onPictureInPictureStop"};var xe={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText",animate:"Animate"},ke=new Set(Object.values(xe));var it=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),st=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight","attributeName","keyTimes","repeatCount"];function D(n){let e=typeof n==="number"?n:Number.parseFloat(String(n??""));return Number.isFinite(e)?e:0}function q(n){return Math.round(n*1000)/1000}function Te(n){if(Array.isArray(n)&&n.length===4&&n.every((t)=>Number.isFinite(Number(t))))return n.map(Number);let e=String(n??"").trim().split(/[\s,]+/).map(Number);if(e.length!==4||e.some((t)=>!Number.isFinite(t))||e[2]<=0||e[3]<=0)return null;return e}function Sn(n){let e=String(n??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return e.length%2?e.slice(0,-1):e}var nt=/[MLHVCSQTAZ]/i,Ne=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Nn(n){let e=[],t=n,r=nt.exec(t);while(r){let o=r.index;t=t.slice(o);let a=t[0];t=t.slice(1);let c=nt.exec(t),u=c?t.slice(0,c.index):t,f;if(a==="A"||a==="a"){f=[];let h=0,S=u.trim(),v=0;while(v<S.length){let b=h%7,m=S.slice(v).replace(/^[\s,]+/,"");if(v=S.length-m.length,!m)break;if(b===3||b===4)f.push(m[0]==="1"?1:0),v+=1;else{Ne.lastIndex=0;let g=Ne.exec(m);if(!g||g.index!==0)break;f.push(Number.parseFloat(g[0])),v+=g[0].length}h++}}else f=(u.match(Ne)||[]).map(Number.parseFloat);e.push({command:a,args:f}),r=c}return e}function xn(n,e,t,r,o,a,c,u,f){if(n===u&&e===f)return[];let h=Math.abs(t),S=Math.abs(r);if(!h||!S)return[1,u,f];let v=o*Math.PI/180,b=Math.cos(v),m=Math.sin(v),g=(n-u)/2,l=(e-f)/2,p=b*g+m*l,y=-m*g+b*l,w=p*p/(h*h)+y*y/(S*S);if(w>1)h*=Math.sqrt(w),S*=Math.sqrt(w);let N=h*h*S*S-h*h*y*y-S*S*p*p,d=h*h*y*y+S*S*p*p,x=Math.sqrt(Math.max(0,N/d));if(a===c)x=-x;let R=x*(h*y)/S,W=x*-(S*p)/h,T=b*R-m*W+(n+u)/2,L=m*R+b*W+(e+f)/2,P=(M,j,V,Y)=>{let ue=M*Y-j*V<0?-1:1,de=(M*V+j*Y)/(Math.hypot(M,j)*Math.hypot(V,Y));return ue*Math.acos(Math.min(1,Math.max(-1,de)))},k=P(1,0,(p-R)/h,(y-W)/S),_=P((p-R)/h,(y-W)/S,(-p-R)/h,(-y-W)/S);if(!c&&_>0)_-=2*Math.PI;if(c&&_<0)_+=2*Math.PI;let I=Math.max(1,Math.ceil(Math.abs(_)/(Math.PI/2))),E=_/I,A=1.3333333333333333*Math.tan(E/4),B=[],H=(M)=>{let j=h*Math.cos(M),V=S*Math.sin(M);return[b*j-m*V+T,m*j+b*V+L]},U=(M)=>{let j=-h*Math.sin(M),V=S*Math.cos(M);return[b*j-m*V,m*j+b*V]},F=k;for(let M=0;M<I;M++){let j=F+E,[V,Y]=H(F),[ue,de]=U(F),[We,Fe]=H(j),[Pt,Bt]=U(j);B.push(2,V+A*ue,Y+A*de,We-A*Pt,Fe-A*Bt,M===I-1?u:We,M===I-1?f:Fe),F=j}return B}function ot(n){let e=[],t=0,r=0,o=0,a=0,c=0,u=0,f=0,h=0,S="";for(let{command:v,args:b}of Nn(String(n??""))){let m=v===v.toLowerCase(),g=v.toUpperCase(),l=()=>m?t:0,p=()=>m?r:0,y=0,w=(d)=>{if(y+d>b.length)return null;let x=b.slice(y,y+d);return y+=d,x};if(g==="Z"){e.push(4),t=o,r=a,S="Z";continue}let N=!0;while(y<b.length||N&&g==="Z"){switch(g){case"M":{let d=w(2);if(!d)return e;if(t=d[0]+l(),r=d[1]+p(),N)e.push(0,t,r),o=t,a=r;else e.push(1,t,r);S=N?"M":"L";break}case"L":{let d=w(2);if(!d)return e;t=d[0]+l(),r=d[1]+p(),e.push(1,t,r),S="L";break}case"H":{let d=w(1);if(!d)return e;t=d[0]+l(),e.push(1,t,r),S="L";break}case"V":{let d=w(1);if(!d)return e;r=d[0]+p(),e.push(1,t,r),S="L";break}case"C":{let d=w(6);if(!d)return e;let x=d[0]+l(),R=d[1]+p();c=d[2]+l(),u=d[3]+p(),t=d[4]+l(),r=d[5]+p(),e.push(2,x,R,c,u,t,r),S="C";break}case"S":{let d=w(4);if(!d)return e;let x=S==="C"?2*t-c:t,R=S==="C"?2*r-u:r;c=d[0]+l(),u=d[1]+p(),t=d[2]+l(),r=d[3]+p(),e.push(2,x,R,c,u,t,r),S="C";break}case"Q":{let d=w(4);if(!d)return e;f=d[0]+l(),h=d[1]+p(),t=d[2]+l(),r=d[3]+p(),e.push(3,f,h,t,r),S="Q";break}case"T":{let d=w(2);if(!d)return e;f=S==="Q"?2*t-f:t,h=S==="Q"?2*r-h:r,t=d[0]+l(),r=d[1]+p(),e.push(3,f,h,t,r),S="Q";break}case"A":{let d=w(7);if(!d)return e;let x=d[5]+l(),R=d[6]+p();e.push(...xn(t,r,d[0],d[1],d[2],d[3],d[4],x,R)),t=x,r=R,S="A";break}default:return e}N=!1}}return e.map((v)=>q(v))}function rt(n,e,t,r){if(t<=0||r<=0)return[];let o=0.5522847498;return[0,n+t,e,2,n+t,e+o*r,n+o*t,e+r,n,e+r,2,n-o*t,e+r,n-t,e+o*r,n-t,e,2,n-t,e-o*r,n-o*t,e-r,n,e-r,2,n+o*t,e-r,n+t,e-o*r,n+t,e,4].map(q)}function Re(n,e){switch(n){case"Path":return ot(String(e.d??""));case"Line":return[0,D(e.x1),D(e.y1),1,D(e.x2),D(e.y2)].map(q);case"Rect":{let t=D(e.x),r=D(e.y),o=D(e.width),a=D(e.height);if(o<=0||a<=0)return[];let c=e.rx===void 0?D(e.ry):D(e.rx),u=e.ry===void 0?c:D(e.ry);if(c=Math.min(Math.max(0,c),o/2),u=Math.min(Math.max(0,u),a/2),!c||!u)return[0,t,r,1,t+o,r,1,t+o,r+a,1,t,r+a,4].map(q);let f=0.5522847498;return[0,t+c,r,1,t+o-c,r,2,t+o-c+f*c,r,t+o,r+u-f*u,t+o,r+u,1,t+o,r+a-u,2,t+o,r+a-u+f*u,t+o-c+f*c,r+a,t+o-c,r+a,1,t+c,r+a,2,t+c-f*c,r+a,t,r+a-u+f*u,t,r+a-u,1,t,r+u,2,t,r+u-f*u,t+c-f*c,r,t+c,r,4].map(q)}case"Circle":return rt(D(e.cx),D(e.cy),D(e.r),D(e.r));case"Ellipse":return rt(D(e.cx),D(e.cy),D(e.rx),D(e.ry));case"Polyline":case"Polygon":{let t=Sn(e.points);if(t.length<4)return[];let r=[0,t[0],t[1]];for(let o=2;o<t.length;o+=2)r.push(1,t[o],t[o+1]);if(n==="Polygon")r.push(4);return r.map(q)}default:return null}}function kn(n){let e=/^\s*(\d+(?:\.\d+)?|\.\d+)\s*(ms|s)?\s*$/.exec(String(n??""));if(!e)return null;let t=Number(e[1])/(e[2]==="ms"?1000:1);return t>0?t:null}function Tn(n){if(n.attributeName!=="d")return null;let e=kn(n.dur),t=String(n.values??"").split(";").map((u)=>u.trim()).filter(Boolean);if(e===null||t.length<2)return null;let r=t.map(ot);if(r.some((u)=>!u.length))return null;let o=String(n.keyTimes??"").split(";").map((u)=>u.trim()).filter(Boolean).map(Number),c=o.length===r.length&&o[0]===0&&o[o.length-1]===1&&o.every((u,f)=>Number.isFinite(u)&&(f===0||u>=o[f-1]))?o.map(q):r.map((u,f)=>q(f/(r.length-1)));return{frames:r,frameTimes:c,duration:e}}function Ae(n){let e=Tn(n),t={frames:e?.frames??null,frameTimes:e?.frameTimes??null,duration:e?.duration??null};for(let[r,o]of Object.entries(t))if(o===null)delete n[r];else n[r]=o;return t}var Rn=[...st,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","contentContainerStyle","currentTime","defaultSource","defaultValue","ellipsizeMode","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","ios_backgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","listRole","maxLength","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","nonModal","dismissOnOutsideTap","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","initialRegion","tileOverlay","edgePadding","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","mapType","fillColor","strokeColor","pinColor","showsCompass","showsScale","cameraPitch","cameraHeading","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],at=new Set(["alwaysBounceHorizontal","alwaysBounceVertical","animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","nonModal","dismissOnOutsideTap","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","showsCompass","showsScale","pictureInPicture"]),An=new Map(Rn.map((n)=>[ct(n),n]));function ct(n){return n.replace(/[-_]/g,"").toLowerCase()}function _e(n,e){if((e==="Image"||e==="Video")&&n.toLowerCase()==="src")return"source";return An.get(ct(n))??n}var _n={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",map:"Map",mappolyline:"MapPolyline",mappolygon:"MapPolygon",mapmarker:"MapMarker",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",checkbox:"Checkbox",slider:"Slider",picker:"Picker",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 lt(n){return _n[n.toLowerCase()]||n}var En={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",apple:"leaf",archive:"archivebox",armchair:"sofa","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette",backpack:"backpack","badge-check":"checkmark.seal","badge-x":"xmark.seal",ban:"nosign","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100","battery-charging":"battery.100.bolt",bean:"leaf",bed:"bed.double",beef:"fork.knife",bell:"bell","bell-off":"bell.slash","bell-ring":"bell.and.waves.left.and.right",bike:"figure.outdoor.cycle",blocks:"square.grid.2x2",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",box:"shippingbox",brain:"brain",building:"building","building-2":"building.2",cable:"cable.connector","cake-slice":"birthday.cake",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-minus":"calendar.badge.minus","calendar-minus-2":"calendar.badge.minus","calendar-off":"calendar.badge.exclamationmark","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath","calendar-x":"calendar.badge.exclamationmark","calendar-x-2":"calendar.badge.exclamationmark",camera:"camera",carrot:"carrot","chart-bar":"chart.bar","chart-column":"chart.bar","chart-line":"chart.xyaxis.line","chart-no-axes-gantt":"chart.bar.doc.horizontal",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-arrow-out-up-left":"arrow.uturn.backward.circle","circle-minus":"minus.circle","circle-arrow-down":"arrow.down.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-dot":"smallcircle.filled.circle","circle-help":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock","clock-12":"clock","clock-2":"clock","clock-3":"clock","clock-4":"clock","clock-8":"clock","clock-alert":"clock.badge.exclamationmark",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",cookie:"birthday.cake",copy:"doc.on.doc","credit-card":"creditcard","cup-soda":"takeoutbag.and.cup.and.straw",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",drumstick:"fork.knife",dumbbell:"dumbbell",edit:"pencil",egg:"frying.pan","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",fish:"fish",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift","glass-water":"waterbottle",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal",hamburger:"takeoutbag.and.cup.and.straw","hand-fist":"hand.raised",heart:"heart","heart-off":"heart.slash","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house","id-card":"person.text.rectangle",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-dashboard":"rectangle.3.group","layout-grid":"square.grid.2x2",leaf:"leaf",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",megaphone:"megaphone",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble","messages-square":"bubble.left.and.bubble.right",mic:"mic",milk:"waterbottle",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",nut:"leaf",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","rectangle-horizontal":"rectangle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",salad:"leaf",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass","scan-line":"barcode.viewfinder",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart",shuffle:"shuffle","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",soup:"mug",sparkles:"sparkles",sprout:"leaf",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront","stretch-horizontal":"rectangle.split.1x2",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis","triangle-alert":"exclamationmark.triangle",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-check":"person.crop.circle.badge.checkmark","user-minus":"person.badge.minus","user-plus":"person.badge.plus","user-round":"person","user-round-check":"person.crop.circle.badge.checkmark","user-round-minus":"person.crop.circle.badge.minus","user-round-plus":"person.crop.circle.badge.plus","user-round-x":"person.crop.circle.badge.xmark","user-x":"person.crop.circle.badge.xmark",users:"person.2","users-round":"person.2",utensils:"fork.knife",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wheat:"laurel.leading",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",wine:"wineglass",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function Ie(n,e=!1){let t=String(n??"").trim();if(!t)return{symbol:"circle",known:!1};if(e)return{symbol:t,known:!0};let r=/^i-([a-z0-9]+)-(.+)$/.exec(t)??/^([a-z0-9]+):(.+)$/.exec(t),o=r?r[1]:"lucide",a=r?r[2]:t;if(o==="lucide"){let c=En[a];if(c)return{symbol:c,iconify:`i-lucide-${a}`,known:!0};if(!r&&t.includes("."))return{symbol:t,known:!0}}return{symbol:"circle",iconify:r?t:`i-lucide-${a}`,known:!1}}var dt=/^--[\w\u0080-\uFFFF-]+$/u;function ut(n,e){if(!/var\(/i.test(n))return n;let t="",r="",o=!1;for(let a=0;a<n.length;a++){let c=n[a];if(c==="\\"){t+=n.slice(a,a+2),a++;continue}if(r){if(t+=c,c===r)r="";continue}if(c==='"'||c==="'"){r=c,t+=c;continue}if(n.slice(a,a+4).toLowerCase()!=="var("||a>0&&/[\w-]/.test(n[a-1])){t+=c;continue}let u=1,f=-1,h="",S=a+4;for(;S<n.length;S++){let m=n[S];if(m==="\\"){S++;continue}if(h){if(m===h)h="";continue}if(m==='"'||m==="'"){h=m;continue}if(m==="(")u++;if(m===")"&&--u===0)break;if(m===","&&u===1&&f===-1)f=S}if(u!==0)return;let v=n.slice(a+4,f===-1?S:f).trim();if(!dt.test(v))return;let b=e(v,f===-1?void 0:n.slice(f+1,S).trim());if(b===void 0||t.length+b.length>65536)return;t+=b,o=!0,a=S}return o&&t.length>65536?void 0:t}function Z(n,e){let t=new Map,r=new Set;for(let[l,p]of n){let y=l.trim();if(!dt.test(y))continue;if(typeof p==="string"||typeof p==="number"&&Number.isFinite(p))t.set(y,String(p).trim())}let o=new Map,a=new Set;for(let[l,p]of t){let y=new Set,w=(N,d=0)=>d>64?void 0:ut(N,(x,R)=>(y.add(x),R===void 0?"":w(R,d+1)));if(w(p)===void 0)a.add(l);o.set(l,y)}let c=new Map,u=new Map,f=[],h=new Set,S=0;function v(l,p=0){if(p>64){a.add(l);return}c.set(l,S),u.set(l,S++),f.push(l),h.add(l);for(let N of o.get(l)??[]){if(!t.has(N))continue;if(!c.has(N)){if(v(N,p+1),u.has(N))u.set(l,Math.min(u.get(l),u.get(N)))}else if(h.has(N))u.set(l,Math.min(u.get(l),c.get(N)))}if(u.get(l)!==c.get(l))return;let y=[],w;do w=f.pop(),h.delete(w),y.push(w);while(w!==l);if(y.length>1||o.get(l)?.has(l))y.forEach((N)=>a.add(N))}for(let l of t.keys())if(!c.has(l))v(l);let b=new Map;function m(l,p){if(r.add(l),b.has(l))return b.get(l);let y=t.get(l),w=y===void 0||/^(?:inherit|unset)$/i.test(y)?e?.get(l):a.has(l)||/^(?:initial|revert|revert-layer)$/i.test(y)?void 0:g(y,p+1);return b.set(l,w),w}function g(l,p=0){if(p>64)return;return ut(l,(y,w)=>m(y,p)??(w===void 0?void 0:g(w,p+1)))}return{resolve:g,used:r,computed(){let l=new Map(e);for(let p of t.keys())l.set(p,m(p,0));return l}}}function Ce(n){if(n.display==="flex"&&n.flexDirection==null)return{...n,flexDirection:"row"};return n}var ft=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","tintColor","transform","overflow","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),In=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"]),ht=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"]),Cn=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,On=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,Pn=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),Bn=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function Mn(n){if(typeof n!=="string")return n;let e=On.exec(n);return e?Number(e[1])*(/^r?em$/i.test(e[2]||"")?16:1):n}function K(n){return typeof n==="number"&&Number.isFinite(n)}function Dn(n,e){if(n==="shadowOffset"&&e&&typeof e==="object"&&!Array.isArray(e)){let{width:t,height:r}=e;return K(t)&&K(r)?{width:t,height:r}:void 0}if(n==="transform"&&Array.isArray(e)){let t=[];for(let r of e){if(!r||typeof r!=="object"||Array.isArray(r)||Object.keys(r).length!==1)return;let[o,a]=Object.entries(r)[0];if(Bn.has(o)&&K(a))t.push({[o]:a});else if(Pn.has(o)&&typeof a==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(a))t.push({[o]:a});else return}return t}return}function Ln(n){let e=[],t=0,r=0,o="";for(let a=0;a<=n.length;a++){let c=n[a];if(c==="\\"){a++;continue}if(o){if(c===o)o="";continue}if(c==='"'||c==="'"){o=c;continue}if(c==="(")r++;if(c===")")r=Math.max(0,r-1);if(a!==n.length&&(c!==";"||r))continue;let u=n.slice(t,a),f=u.indexOf(":");if(f!==-1)e.push([u.slice(0,f).trim(),u.slice(f+1).trim()]);t=a+1}return e}function $n(n,e){let t;if(typeof n==="string"){if(n=n.trim(),!n)return[];try{n=JSON.parse(n)}catch{}}if(typeof n==="string")t=Ln(n);else if(n&&typeof n==="object"&&!Array.isArray(n))t=Object.entries(n);else{if(n!=null&&n!==!1)e({kind:"non-numeric-style",name:"style"});return[]}return t}function mt(n,e=()=>{},t={}){let r=$n(n,e),o=Z(r,t.inheritedVariables);return t.onVariables?.(o.computed()),jn(r,o,e)}function jn(n,e,t){let r={},o=[];for(let[a,c]of n){if(a.trim().startsWith("--")){o.push(a.trim());continue}let u=ft.has(a)||a.trim().startsWith("--")?a:a.trim().toLowerCase().replace(/-([a-z])/g,(S,v)=>v.toUpperCase());if(!ft.has(u)){t({kind:"unknown-style",name:u});continue}if(c==null||c==="")continue;let f=typeof c==="string"?e.resolve(c.trim()):c;if(f===void 0){t({kind:"non-numeric-style",name:u});continue}if(f==="")continue;let h;if(In.has(u)||ht.has(u)){if(h=Mn(f),!K(h)&&!(ht.has(u)&&typeof h==="string"&&h.endsWith("%")&&Cn.test(h.slice(0,-1))&&Number.isFinite(Number(h.slice(0,-1)))))h=void 0}else if(u==="display"&&f==="inline-flex")h="flex";else if(u==="shadowOffset"||u==="transform")h=Dn(u,f);else if(u==="gridTemplateColumns"||u==="gridTemplateRows")h=K(f)||typeof f==="string"?f:void 0;else if(u==="fontWeight"&&K(f))h=String(f);else if(typeof f==="string")h=f;if(h===void 0)t({kind:"non-numeric-style",name:u});else r[u]=h}for(let a of o)if(!e.used.has(a))t({kind:"unknown-style",name:a});return r}import{generate as ee,parse as yt}from"@stacksjs/ts-css/parse";async function bt(n,e){let t={light:new Map,dark:new Map},r=new Set,o=(v)=>{if(!r.has(v))r.add(v),e(v)},a=(v,b,m)=>{for(let g of m){let l=t[g].get(v);if(!l||Number(b.important)>Number(l.important)||b.important===l.important&&b.specificity>=l.specificity)t[g].set(v,b)}},c=(v)=>{if(v.type==="Declaration")return v.property.startsWith("--");if(v.type==="Rule"||v.type==="Atrule")return!!v.block&&[...v.block.children].some(c);return!1},u=(v)=>{let b=v.replace(/\s+/g,"").toLowerCase();if(!b||b==="all"||b==="screen")return["light","dark"];let m=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(b);return m?[m[1]]:void 0};function f(v,b){for(let m of v){if(!c(m))continue;if(m.type==="Atrule"){let l=m.prelude?ee(m.prelude):"",p=m.name.toLowerCase()==="media"?u(l):void 0;if(!p){o(`@${m.name} ${l}`.trim());continue}f(m.block.children,b.filter((y)=>p.includes(y)));continue}if(m.type!=="Rule")continue;let g=m.prelude.type==="SelectorList"?[...m.prelude.children].map(ee):[ee(m.prelude)];for(let l of g){let p=/^(html|:root)?(?:\.(dark|light))?$/.exec(l.trim());if(!p||!p[1]&&!p[2]){o(l);continue}let y=(p[1]===":root"?10:p[1]?1:0)+(p[2]?10:0);for(let w of m.block.children){if(w.type!=="Declaration"){if(c(w))o(`nested rule in ${l}`);continue}if(!w.property.startsWith("--"))continue;let N={value:ee(w.value),important:!!w.important,specificity:y};a(w.property,N,b.filter((d)=>!p[2]||p[2]===d))}}}}let h="",S;return await new HTMLRewriter().on("html",{element(v){let b=v.getAttribute("style");if(!b)return;try{let m=yt(b,{context:"declarationList"});if(m.type!=="DeclarationList")return;for(let g of m.children)if(g.type==="Declaration"&&g.property.startsWith("--"))a(g.property,{value:ee(g.value),important:!!g.important,specificity:1000},["light","dark"])}catch{o("invalid document inline theme")}}}).on("style",{element(v){h="";let b=v.getAttribute("type");S=!b||b.toLowerCase()==="text/css"?u(v.getAttribute("media")??""):void 0,v.onEndTag(()=>{try{let m=yt(h);if(m.type!=="StyleSheet")return;if(!S){if([...m.children].some(c))o("style type/media");return}f(m.children,S)}catch{o("invalid stylesheet")}})},text(v){h+=v.text}}).transform(new Response(n)).text(),{light:[...t.light].map(([v,b])=>[v,b.value]),dark:[...t.dark].map(([v,b])=>[v,b.value])}}function z(n,e={},t={},r={},o=[]){return{type:n,props:e,style:t,events:r,children:o}}function vt(n,e,t={}){return{version:"1.0.0",root:n,script:e,meta:{source:t.source||"unknown",compiledAt:t.compiledAt||Date.now(),headwindConfig:t.headwindConfig}}}var wt=new Set(["script","style","head","meta","link","title","base","noscript"]),St=new Set(["template","body","html","main","fragment"]),se=new Set,Wn=new Set(["onBlur","onChange","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),Oe=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","Link","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapPolygon","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...ke]),Fn=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"]]),Nt=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Xn={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function J(n){return n.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,t)=>{let r=Xn[t.toLowerCase()];if(r!==void 0)return r;if(t[0]==="#"){let o=t[1]==="x"||t[1]==="X"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(o)?String.fromCodePoint(o):e}return e})}function xt(n,e,t,r={}){let o=r.inheritedVariables,a={},c={},u={},f="",h={};for(let[m,g]of e){let l=m.toLowerCase();if(l==="class"||l==="classname"){f=f?`${f} ${g}`:g;continue}if(l==="style"){h={...h,...zn(n,g,t,{...r,onVariables(w){o=w,r.onVariables?.(w)}})};continue}if(l.startsWith(":")||l.startsWith("x-")&&l!=="x-cloak"){u[l.startsWith(":")?l.slice(1):l.slice(2)]=J(g);continue}if(l==="x-cloak")continue;if(l.startsWith("@")||l.startsWith("v-on:")){let w=l.startsWith("@")?l.slice(1):l.slice(5),[N]=w.split("."),d=Se[N]??(N.startsWith("on")?N:"");if(!d||!Wn.has(d)){t.push({kind:"unread-event",tag:n,name:m});continue}c[d]=J(g);continue}if(l==="key"){a.key=g;continue}let p=J(g),y=_e(m);if(p===""&&at.has(y)){a[y]=!0;continue}try{a[y]=JSON.parse(p)}catch{a[y]=p}}let S=a["data-native"]?a["data-native"]==="TextInput":n==="textarea"||n==="input"&&!["checkbox","radio","hidden"].includes(String(a.type??"text").toLowerCase()),v=f?Q(f,o,{focus:S,focusWithin:!0}):void 0;for(let m of new Set(v?.unknown??[]))t.push({kind:"unknown-class",tag:n,name:m});let b=Ce({...v?.style,...h});return{props:a,style:b,events:c,bindings:u,classes:f,inline:h}}function zn(n,e,t,r){return mt(J(e),(o)=>t.push({...o,tag:n}),r)}function Pe(n){return n.children.map((e)=>typeof e==="string"?e:Pe(e)).join("").replace(/\s+/g," ").trim()}function Hn(n,e){let t=n.node,r=t.children.filter((a)=>typeof a!=="string"),o=t.children.filter((a)=>typeof a==="string").join("").trim();if(n.tag==="button"&&t.type==="Button"&&!n.declaredNative&&r.length>0)return t.type="Pressable",t.props.role??="button",t.children=t.children.flatMap((a)=>typeof a==="string"?a.trim()?[z("Text",{},{},{},[a.trim()])]:[]:[a]),t;if(t.type==="Button"&&r.length===0)return t.children=o?[o]:[],t;if(t.type==="Svg"||t.type==="G")return t.children=r,t;if(t.type==="SvgText"){let a=Pe(t);return t.children=a?[a]:[],t}if(Nt.has(t.type)&&r.length===0&&o)return t.type="Text",t.children=[o],t;if(t.type==="Text"&&!o&&r.length===0&&typeof t.props.text==="string")return t.children=t.props.text?[t.props.text]:[],delete t.props.text,t;if(t.type==="Text"&&r.length>0){if(/(?:^|\s)(?:inline-)?(?:flex|grid)(?:\s|$)/.test(t._classes??"")||r.some((u)=>u.type!=="Text"))return t.type="View",t.children=t.children.map((u)=>typeof u==="string"?z("Text",{},{},{},[u]):u),t;let c=Pe(t);return e.push({kind:"flattened-text",tag:n.tag}),t.children=c?[c]:[],t}if(Nt.has(t.type)&&r.length>0)t.children=r;return t}async function qn(n,e={}){let t=[],r=await bt(n,(g)=>t.push({kind:"unsupported-theme-rule",tag:"style",name:g})),o=Z(r.light).computed(),a=[],c=[],u=new Set;function f(g){let l=c[c.length-1];if(!l)a.push(g);else if(!l.dropped)l.node.children.push(g)}function h(g){let l=(y)=>{if(g.tag!=="html"&&g.node._styleSource)y._styleAncestors=[g.node._styleSource,...y._styleAncestors??[]]};if(g.node.bindings&&Object.keys(g.node.bindings).length>0){let y=g.node.children,w=y.filter((d)=>typeof d!=="string"),N=w.length===1&&w.length===y.length?w[0]:z("View",{},{},{},y);if(N.bindings={...g.node.bindings,...N.bindings},N.bindingId===void 0&&g.node.bindingId!==void 0)N.bindingId=g.node.bindingId;l(N),f(N);return}let p=c[c.length-1];for(let y of g.node.children){if(typeof y==="string"){if(p&&!p.dropped)p.node.children.push(y);continue}if(l(y),!p)a.push(y);else if(!p.dropped)p.node.children.push(y)}}function S(g,l){let p=c[c.length-1];if(g==="svg"||p?.svg)return v(g,l,p);let y=wt.has(g)&&!se.has(g),w=c[c.length-1]?.dropped??!1,N=p?.variables??o,{props:d,style:x,events:R,bindings:W,classes:T,inline:L}=y||w?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:xt(g,l,t,{inheritedVariables:N,onVariables:(E)=>{N=E}});if(g==="html")N=o;let P=d["data-native"],k;if(typeof P==="string"&&Oe.has(P))k=P,delete d["data-native"];else if(k=se.has(g)?"View":lt(g),g==="input"){let E=String(d.type??"text").toLowerCase();if(E==="checkbox")k="Checkbox",d.formValue=d.value??"on",d.checked=d.checked===""||d.checked===!0||d.checked==="true",d.value=d.checked;else if(E==="hidden")k="View",x.display="none",L.display="none";else if(E==="radio")k="View",d.accessibilityRole="radio",t.push({kind:"unsupported-control",tag:g,name:"input:radio"})}if(!w&&k===g&&!Oe.has(k)&&!wt.has(g)&&!St.has(g)&&!u.has(g))u.add(g),t.push({kind:"unmapped-tag",tag:g});if((y||se.has(g))&&!u.has(`drop:${g}`))u.add(`drop:${g}`),t.push({kind:"dropped-subtree",tag:g});if(k==="View"&&/(?:^|\s)overflow-x-(?:auto|scroll)(?:\s|$)/.test(T))k="ScrollView",d.horizontal=!0,d.showsHorizontalScrollIndicator??=!1;else if(k==="View"&&/(?:^|\s)overflow-y-(?:auto|scroll)(?:\s|$)/.test(T))k="ScrollView";if(g==="form")d["data-stx-form"]=!0;if(g==="button"&&d.type===void 0)d.type="submit";if((k==="Video"||k==="Image")&&d.source===void 0&&d.src!==void 0)d.source=d.src,delete d.src;if(k==="Icon"){let E=Q(T).icon,A=Ie(String(d.symbol||d.name||E||""),Boolean(d.symbol));if(d.symbol=A.symbol,A.iconify)d.iconify=A.iconify}if(k==="FlatList"||k==="SectionList"){let E=new Set([...Object.keys(d),...Object.keys(W)].map((A)=>A.toLowerCase()));for(let[A,B]of Fn)if(E.has(A))t.push({kind:"unsupported-list-prop",tag:k,name:B})}let _=z(k,d,x,R);_._inlineStyle=L,_._styleSource=J(l.find(([E])=>E==="style")?.[1]??"");let I=d["data-stx-b"];if(typeof I==="number"&&Number.isInteger(I))_.bindingId=I;if(delete d["data-stx-b"],T)_._classes=T;if(Object.keys(W).length>0)_.bindings=W;if(typeof d.key==="string")_.key=d.key,delete d.key;return{tag:g,node:_,variables:N,declaredNative:typeof P==="string"&&Oe.has(P),dropped:y||w||se.has(g)||k==="Video",discard:y||w,unwrap:St.has(g)}}function v(g,l,p){let y=p?.dropped??!1,w=xe[g];if(y||!w){if(!y&&!u.has(`drop:${g}`))u.add(`drop:${g}`),t.push({kind:it.has(g)?"dropped-subtree":"unmapped-tag",tag:g});return{tag:g,node:z("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let N=p?.variables??o,{props:d,style:x,events:R,bindings:W,classes:T,inline:L}=xt(g,l,t,{inheritedVariables:N,onVariables:(I)=>{N=I}});if(w==="Svg"){let I=Te(d.viewBox);if(I)d.viewBox=I;else delete d.viewBox;for(let E of["width","height"]){if(typeof d[E]==="number"&&x[E]===void 0)x[E]=d[E];delete d[E]}}if(typeof d.strokeDasharray==="string"||typeof d.strokeDasharray==="number"){let I=String(d.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);d.strokeDasharray=I}let P=Re(w,d);if(P)d.geometry=P;if(w==="Animate")Ae(d);let k=z(w,d,x,R);k._inlineStyle=L,k._styleSource=J(l.find(([I])=>I==="style")?.[1]??"");let _=d["data-stx-b"];if(typeof _==="number"&&Number.isInteger(_))k.bindingId=_;if(delete d["data-stx-b"],T)k._classes=T;if(Object.keys(W).length>0)k.bindings=W;if(typeof d.key==="string")k.key=d.key,delete d.key;return{tag:g,node:k,variables:N,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(g){let l=g.tagName.toLowerCase(),p=S(l,[...g.attributes]),y=!0;try{g.onEndTag(()=>{if(c.pop(),p.discard)return;if(p.unwrap)h(p);else f(Hn(p,t))})}catch{y=!1}if(y)c.push(p);else if(!p.discard)f(p.node)},text(g){let l=c[c.length-1];if(!l||l.dropped)return;let p=J(g.text).replace(/\s+/g," ");if(!p.trim())return;l.node.children.push(p)}}).transform(new Response(n)).text(),a.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);let b=a.length===1?a[0]:z("View",{},{},{},a);if(r.light.length||r.dark.length)b._stylesheetTheme=r;let m=(g)=>{let l=we(g.props);if(Object.keys(l).length)g._accessibilitySource=Object.fromEntries(ve.filter((p)=>(p in g.props)).map((p)=>[p,g.props[p]])),Object.assign(g.props,l);for(let p of g.children)if(typeof p!=="string")m(p)};return m(b),{root:b,diagnostics:t}}async function kt(n,e={}){let{root:t,diagnostics:r}=await qn(n,e),o=e.script??{exports:{},functions:[],code:""};return{document:vt(t,o,{source:e.source??"unknown"}),diagnostics:r}}var Tt=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Gn=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Jn=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,Rt=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function Be(n){let e=[];Tt.lastIndex=0;for(let a of n.matchAll(Tt)){let c=a[1]??"";if(/\bserver\b/.test(c))continue;e.push(a[2].trim())}let t=e.filter(Boolean).join(`
4
+
5
+ `),r=[];for(let a of[Gn,Jn]){a.lastIndex=0;for(let c of t.matchAll(a))if(!r.includes(c[1]))r.push(c[1])}let o={};Rt.lastIndex=0;for(let a of t.matchAll(Rt)){let c=a[2];try{o[a[1]]=JSON.parse(c.replace(/^'(.*)'$/,'"$1"'))}catch{o[a[1]]=c}}return{exports:o,functions:r,code:t}}var oe=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,At=/function\s+(__stx_setup_[\w$]+)\s*\(/,Kn=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function Me(n){oe.lastIndex=0;for(let e of n.matchAll(oe)){let t=e[2].trim(),r=At.exec(t)?.[1];if(r)return{name:r,code:t}}return null}function _t(n){let e=[];oe.lastIndex=0;for(let t of n.matchAll(oe)){let r=t[1],o=t[2].trim(),a=Kn.exec(r)?.[1],c=/\bdata-stx-component-factories\b/i.test(r);if(!o||!a&&!c&&!At.test(o))continue;e.push(a?{code:o,owner:a}:{code:o})}return e}function Qn(){let n=[te.join(import.meta.dir,"..","primitives"),te.join(import.meta.dir,"native","primitives")];for(let e of n)if(Yn(te.join(e,"View.stx")))return e;return n[0]}async function Zn(n,e,t={}){let r=t.root??te.dirname(e),o=await i(r),a={root:r,componentsDir:t.componentsDir??o.componentsDir??te.join(r,"components"),buildMode:"serve",cache:!1,_targetComponentDirs:[Qn()],_targetComponentFallbackNames:["Button","Checkbox","Switch"],_nativeHostAttrs:!0,skipEventDirectives:!0,_pluginComponentDirs:o._pluginComponentDirs??[]},c={...t.context??{},__stx_inject_css:!1},u=new Set([e]),f=await s(n,c,e,a,u),{html:h,manifest:S}=ze(f),v=await Ze(r),{document:b,diagnostics:m}=await kt(v?`<style>${v}</style>${h}`:h,{source:e,script:Be(n)}),g=Me(h),l=_t(h);if(Be(n).code.trim()){let d=await Vr(n,e,t.context,{forceClientSetup:!0}),x=Me(d.setupCode??"");if(g=x??g,x&&!l.some((R)=>R.code===x.code))l.push({code:x.code})}let{buildModuleRegistryScript:p,registeredModuleIdsIn:y}=await import("./chunk-da7x7y7j.js"),w=[],N=await p(y(...l.map((d)=>d.code)),{collectInputs:w});for(let d of w)u.add(d);if(N)l.unshift({code:N});return{document:b,manifest:S,setup:g,scripts:l,diagnostics:m,html:h,dependencies:[...u]}}async function ae(n,e={}){return Zn(await Bun.file(n).text(),n,e)}var ne="__app";var ce="__runtime",rr="__messages";function De(n){let t=[C.join(import.meta.dir,"..","runtime",`${n}.ts`),C.join(import.meta.dir,"..","runtime",`${n}.js`),C.join(import.meta.dir,"native","runtime",`${n}.js`)].find((r)=>$e(r));if(!t)throw Error(`Native runtime module ${n} is missing`);return t}async function Le(n,e,t,r,o){let a={name:"stx-screen-inputs",setup(u){u.onLoad({filter:/.*/,namespace:"file"},({path:f})=>{r.add(f);let h=o?.get(f);return h===void 0?void 0:{contents:h,loader:"js"}})}},c=await Bun.build({entrypoints:[n],target:"browser",format:"iife",minify:t,plugins:[a,...e],define:{"process.env.NODE_ENV":JSON.stringify(t?"production":"development")}});if(!c.success){let u=c.logs.map((f)=>String(f.message??f)).join(`
6
+ `);throw Error(`Could not bundle ${n}:
7
+ ${u}`)}return(await c.outputs[0].text()).trim()}var ir=/^[\w-]+(?:\/[\w-]+)*$/,sr=/^[\w-]+$/;async function or(n,e){let t=C.resolve(n,e.dir);if(!e.languages?.length)throw Error("messages.languages must name at least one language");let r=new Map,o=new Map;for(let a of e.languages){if(!sr.test(a))throw Error(`messages: "${a}" is not a language directory name`);let c=C.join(t,a);if(!$e(c))throw Error(`messages: ${C.relative(n,c)} does not exist`);let u=new Map;for(let f of[...new Bun.Glob("**/*.{ts,js,mjs,json}").scanSync({cwd:c})].sort()){if(/\.(?:test|spec|d)\.[^.]+$/.test(f))continue;let h=f.replace(/\.[^./]+$/,"").split(C.sep).join("/");if(!ir.test(h))throw Error(`messages: ${a}/${f} is not an area name`);if(u.has(h))throw Error(`messages: ${a}/${h} is defined twice`);let S=C.join(c,f),v=await import(S),b=Object.keys(v).filter((l)=>l!=="default");if(b.length)throw Error(`messages: ${a}/${f} exports ${b.join(", ")}; a message module exports its messages as default, and nothing else`);let m=v.default,g=m!==null&&typeof m==="object"&&!Array.isArray(m)?JSON.stringify(m):void 0;if(g===void 0||!Bun.deepEquals(JSON.parse(g),m,!0))throw Error(`messages: ${a}/${f} must export plain data (an object JSON can hold) as default`);u.set(h,g),r.set(S,{language:a,area:h})}o.set(a,u)}return{files:r,data:o}}function ar(n,e){return`export default globalThis.__stxNativeRuntime.messages(${JSON.stringify(n)}, ${JSON.stringify(e)});`}function cr(n){let e=new Map;for(let[t,{language:r,area:o}]of n.files){let a=ar(r,o);e.set(t,a),e.set(nr(t),a)}return e}function lr(n){let e=new Set;for(let t of n.matchAll(/__stxNativeRuntime\.messages\(\s*"[\w-]+"\s*,\s*"([\w/-]+)"\s*\)/g))e.add(t[1]);return[...e].sort()}function ur(n,e){let t=C.isAbsolute(n.meta.source)?C.relative(e,n.meta.source).split(C.sep).join("/"):n.meta.source;return{...n,script:{exports:n.script.exports,functions:[],code:""},meta:{...n.meta,source:t,compiledAt:0}}}async function je(n){let e=Object.keys(n.screens);if(e.length===0)throw Error("screens must name at least one .stx file");let t=n.routed??!0,r=n.initialScreen??e[0];if(!n.screens[r])throw Error(`Initial screen ${r} is not in screens`);let o=C.resolve(n.root??process.cwd());if(n.messages&&!n.routesDir)throw Error("messages ship a language at a time beside route files: they need routesDir");if(n.sharedRuntime&&!n.routesDir)throw Error("sharedRuntime is the route files' runtime: it needs routesDir");if(n.messages&&!n.sharedRuntime)throw Error("messages are read by the shared runtime: they need sharedRuntime");if(n.messages&&n.outFile)throw Error("messages leave the languages out of the screens' code, which the one-file bundle cannot read: build it without messages");let a=n.messages?await or(o,n.messages):null,c=a?cr(a):null,u=[],f=async()=>{for(let T of e){let L=C.resolve(o,n.screens[T]);if(!L.endsWith(".stx"))throw Error(`Screen ${T} must name a .stx file`);u.push({name:T,file:L,compiled:await ae(L,{root:o})})}};if(c)await qs(c,f);else await f();let h=De("jsc-globals"),S=De("shared-screen"),v=n.app?C.resolve(o,n.app):null;if(v&&!$e(v))throw Error(`The app script ${n.app} does not exist`);if(v&&!t)throw Error("An app script needs a routed bundle");if(v&&n.screens[ne])throw Error(`${ne} is the app script's route, not a screen name`);let b=n.browser;if(n.screens[ce])throw Error(`${ce} is the runtime prelude's file, not a screen name`);let m=pt();if(b&&n.routesDir)throw Error("A browser screen is one route; routesDir is for device hosts");let g=(T,L,P)=>{let k=t?`var routeName = g.__stxNativeRoute || ${JSON.stringify(r)};
8
+ var isApp = ${v?`routeName === ${JSON.stringify(ne)}`:"false"};
9
+ if (!isApp && routeNames.indexOf(routeName) === -1) throw new Error(['Unknown native screen:', routeName].join(' '));
10
+ if (isApp ? ${!L} : ${JSON.stringify(T.map(({name:F})=>F))}.indexOf(routeName) === -1) throw new Error(['This bundle does not hold the native screen', routeName].join(' '));`:`var routeName = 'main';
11
+ var isApp = false;`,_=T.map(({name:F,compiled:M},j)=>`${j===0?"if":"else if"} (routeName === ${JSON.stringify(t?F:"main")}) {
12
+ nativeDocument = ${JSON.stringify(ur(M.document,o))};
13
+ manifest = ${JSON.stringify(M.manifest)};
14
+ }`).join(`
15
+ `),I=T.map(({name:F,compiled:M},j)=>`${j===0?"if":"else if"} (routeName === ${JSON.stringify(t?F:"main")}) {
16
+ g.__stx_latestSetup = null;
17
+ ${M.scripts.map((V)=>V.owner?` g.__stx_componentSetups = g.__stx_componentSetups || {};
18
+ // Kept by id as well as run once: a :for or :if clone of this component
19
+ // has no script to copy, and is set up from this (component hydration).
20
+ g.__stx_componentSetups[${JSON.stringify(V.owner)}] = function() {
21
+ ${V.code}
22
+ };
23
+ g.__STX_SETUP_ROOT__ = screen && screen.scopeRoot(${JSON.stringify(V.owner)});
24
+ try { g.__stx_componentSetups[${JSON.stringify(V.owner)}](); }
25
+ finally { g.__STX_SETUP_ROOT__ = null; }`:V.code).join(`
26
+ `)}
27
+ }`).join(`
28
+ `),E=L&&v,A=b?De("browser-screen"):null,B=b?Bun.resolveSync(b.platformModule,o):null;return`
29
+ ${P?`var runtime = globalThis.__stxNativeRuntime;
30
+ if (!runtime || runtime.version !== ${JSON.stringify(P)}) throw new Error('This screen needs the stx native runtime it was built with: evaluate ${ce}.js from the same build first');
31
+ var installJSCGlobals = runtime.installJSCGlobals;
32
+ var prepareNativeApp = runtime.prepareNativeApp;
33
+ var prepareSharedNativeScreen = runtime.prepareSharedNativeScreen;`:`import { installJSCGlobals } from ${JSON.stringify(h)};
34
+ import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(S)};`}
35
+ ${b?`import { createBrowserScreenBridge } from ${JSON.stringify(A)};
36
+ import { createBrowserPlatform } from ${JSON.stringify(B)};`:""}
37
+ ${E?`import * as nativeAppModule from ${JSON.stringify(v)};`:"var nativeAppModule = null;"}
38
+ ${b?"(async function() {":""}
39
+ var g = globalThis;
40
+ installJSCGlobals(g);
41
+ ${b?`var browserPlatform = await createBrowserPlatform(${JSON.stringify(b.platformOptions??{})});
42
+ var browserBridge = createBrowserScreenBridge(browserPlatform, ${JSON.stringify(b)});
43
+ var bridge = browserBridge;
44
+ g.__stxNativeRoute = ${JSON.stringify(r)};`:"var bridge = g.__stxNativeBridge;"}
45
+ if (!bridge) throw new Error('Missing __stxNativeBridge');
46
+ var routeNames = ${JSON.stringify(t?e:["main"])};
47
+ ${k}
48
+ g.__stxNativeRoute = routeName;
49
+ var nativeDocument;
50
+ var manifest;
51
+ ${_}
52
+ var screen = null;
53
+ var app = null;
54
+ if (isApp) {
55
+ app = prepareNativeApp(bridge, { routeName: routeName, routeNames: routeNames });
56
+ g.__stxNativeUnmount = function() { app.unmount(); };
57
+ }
58
+ else {
59
+ screen = prepareSharedNativeScreen(nativeDocument, manifest, bridge, { routeName: routeName, routeNames: routeNames });
60
+ g.__stx_host = screen.host;
61
+ g.__stxNativeUnmount = function() { screen.unmount(); };
62
+ }
63
+ ${P?"runtime.startSignals();":m}
64
+ var pageSetup = g.__stx_latestSetup;
65
+ var pageRuntimeSetup = g.stx && g.stx._latestSetup;
66
+ ${I}
67
+ // The screen's setup is the native host's to run. A screen script publishes
68
+ // it where a page's document runtime adopts its own, and in a browser that
69
+ // runtime's DOMContentLoaded and stx:load ran it a second time: another copy
70
+ // of the screen, mounted beside this one. Take it, and hand the page back
71
+ // whatever setup it had.
72
+ var screenSetup = g.__stx_latestSetup || null;
73
+ g.__stx_latestSetup = pageSetup;
74
+ if (g.stx) g.stx._latestSetup = pageRuntimeSetup || null;
75
+ if (isApp) app.start(nativeAppModule);
76
+ else screen.mount(g.stx, screenSetup);
77
+ ${b?`var stopApp = nativeAppModule && typeof nativeAppModule.default === 'function' ? nativeAppModule.default(g.craft) : null;
78
+ var unmount = g.__stxNativeUnmount;
79
+ var ended = false;
80
+ g.__stxNativeUnmount = function() { if (ended) return; ended = true; if (typeof stopApp === 'function') stopApp(); unmount(); browserBridge.dispose(); };
81
+ g.addEventListener('pagehide', function(event) { if (!event.persisted) g.__stxNativeUnmount(); });
82
+ })().catch(function(error) { console.error('[stx browser screen]', error); var node = document.querySelector(${JSON.stringify(b.container)}); if (node) { node.textContent = 'This screen could not start. Reload to try again.'; node.setAttribute('role', 'alert'); } });`:""}
83
+ `},l=(T)=>({name:"stx-native-shared-screens",setup(L){L.onResolve({filter:/^stx:native-shared-screens$/},()=>({path:"entry",namespace:"stx-native-shared-screens"})),L.onLoad({filter:/.*/,namespace:"stx-native-shared-screens"},()=>({contents:T,loader:"js"}))}}),p=new Set(u.flatMap(({compiled:T})=>T.dependencies)),y=u.flatMap(({compiled:T})=>T.diagnostics).map((T)=>({level:"warning",message:[T.kind,T.tag,T.name].filter(Boolean).join(": ")})),w=n.minify??!1,N,d,x;if(n.routesDir){let T=C.resolve(o,n.routesDir);Et(T,{recursive:!0});let L=`
84
+ import { installJSCGlobals } from ${JSON.stringify(h)};
85
+ import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(S)};
86
+ globalThis.__stxNativeRuntime = {
87
+ version: '__STX_NATIVE_RUNTIME_VERSION__',
88
+ installJSCGlobals: installJSCGlobals,
89
+ prepareNativeApp: prepareNativeApp,
90
+ prepareSharedNativeScreen: prepareSharedNativeScreen,
91
+ // Each screen starts its own signals runtime, after its host is in place.
92
+ startSignals: function() {
93
+ ${m}
94
+ },
95
+ // A language's messages for an area (the compile's \`messages\`), read the
96
+ // first time they are looked into: a screen never parses a language it
97
+ // is not shown in, nor an area it does not use.
98
+ messages: function(language, area) {
99
+ var g = globalThis;
100
+ var loaded = g.__stxNativeMessages || (g.__stxNativeMessages = {});
101
+ function table() {
102
+ var forLanguage = loaded[language] || (loaded[language] = {});
103
+ if (Object.prototype.hasOwnProperty.call(forLanguage, area)) return forLanguage[area];
104
+ var value = null;
105
+ if (typeof g.__stxNativeReadMessages === 'function') {
106
+ try {
107
+ var text = g.__stxNativeReadMessages(language, area);
108
+ if (typeof text === 'string') value = JSON.parse(text);
109
+ }
110
+ catch (error) { console.error('[stx native] could not read the ' + language + ' messages for ' + area, error); }
111
+ }
112
+ forLanguage[area] = value;
113
+ return value;
114
+ }
115
+ var own = Object.prototype.hasOwnProperty;
116
+ return new Proxy({}, {
117
+ get: function(target, name) { var messages = table(); return messages && own.call(messages, name) ? messages[name] : undefined; },
118
+ has: function(target, name) { var messages = table(); return !!messages && own.call(messages, name); },
119
+ ownKeys: function() { var messages = table(); return messages ? Object.keys(messages) : []; },
120
+ getOwnPropertyDescriptor: function(target, name) {
121
+ var messages = table();
122
+ return messages && own.call(messages, name) ? { value: messages[name], writable: false, enumerable: true, configurable: true } : undefined;
123
+ },
124
+ });
125
+ },
126
+ };
127
+ `,P,k=C.join(T,`${ce}.js`);if(n.sharedRuntime){let A=await Le("stx:native-shared-screens",[l(L)],w,p);P=Bun.hash(A).toString(36),d=k,await Bun.write(d,A.replace("__STX_NATIVE_RUNTIME_VERSION__",P))}else It(k,{force:!0});let _=C.join(T,rr);It(_,{recursive:!0,force:!0});let I={},E=[...u.map((A)=>({name:A.name,screens:[A],app:!1})),...v?[{name:ne,screens:[],app:!0}]:[]];N={};for(let A=0;A<E.length;A+=6)await Promise.all(E.slice(A,A+6).map(async(B)=>{let H=C.join(T,`${B.name}.js`),U=await Le("stx:native-shared-screens",[l(g(B.screens,B.app,P))],w,p,c??void 0);if(await Bun.write(H,U),N[B.name]=H,a)I[B.name]=lr(U)}));if(a){for(let[B,H]of a.data)for(let[U,F]of H)await Bun.write(C.join(_,B,`${U}.json`),F);let A=Object.fromEntries(Object.keys(I).sort().map((B)=>[B,I[B]]));await Bun.write(C.join(_,"routes.json"),JSON.stringify(A));for(let B of a.files.keys())p.add(B);x={dir:_,languages:[...a.data.keys()],routes:A}}if(!n.outFile)return{code:"",routes:N,runtime:d,...x?{messages:x}:{},diagnostics:y,dependencies:[...p]}}let R=await Le("stx:native-shared-screens",[l(g(u,!0))],w,p);if(!n.outFile)return{code:R,diagnostics:y,dependencies:[...p]};let W=C.resolve(o,n.outFile);return Et(C.dirname(W),{recursive:!0}),await Bun.write(W,R),{code:R,outFile:W,...N?{routes:N,runtime:d}:{},...x?{messages:x}:{},diagnostics:y,dependencies:[...p]}}async function dr(n,e={}){return je({...e,screens:{main:n},routed:!1})}function Ct(n,e={}){return dr(n,e)}var Ot=["native.config.json","stx-native.config.json"];function gr(n=process.cwd(),e){let t=e?X.resolve(n,e):Ot.map((f)=>X.join(n,f)).find((f)=>le(f));if(!t)return null;if(!le(t))throw Error(`Native config not found: ${t}`);let r=JSON.parse(pr(t,"utf8")),o=Object.entries(r.screens??{});if(o.length===0)throw Error(`${X.basename(t)} must name at least one screen in "screens"`);let a={};for(let[f,h]of o){if(!/^[A-Z][\w-]*$/i.test(f))throw Error(`Invalid native screen name: ${f}`);if(typeof h!=="string"||!h.endsWith(".stx"))throw Error(`Screen ${f} must name a .stx file`);if(a[f]=X.resolve(X.dirname(t),h),!le(a[f]))throw Error(`Screen ${f} not found: ${a[f]}`)}let c=r.initialScreen||o[0][0];if(!a[c])throw Error(`Initial screen ${c} 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?X.resolve(X.dirname(t),r.app):void 0;if(u&&!le(u))throw Error(`App script not found: ${u}`);return{initialScreen:c,screens:a,file:t,...u?{app:u}:{}}}async function xs(n,e={}){let t=X.resolve(e.cwd??process.cwd()),r=e.format??"ir";if(r!=="ir"&&r!=="bundle")throw Error(`Unknown compile format: ${r}. Expected ir or bundle.`);let o=n?null:gr(t,e.config);if(!n&&!o)throw Error(`Please specify an input file: stx native compile <file.stx>, or add ${Ot[0]}`);let a,c=[];if(r==="bundle"){let f=o?await je({screens:o.screens,initialScreen:o.initialScreen,minify:e.minify,root:t,...o.app?{app:o.app}:{}}):await Ct(X.resolve(t,n),{minify:e.minify});a=f.code,c=f.diagnostics}else{let f=async(S)=>{let v=await ae(S);return c.push(...v.diagnostics.map((b)=>({level:"warning",message:[b.kind,b.tag,b.name].filter(Boolean).join(": ")}))),v.document},h=o?{initialScreen:o.initialScreen,screens:Object.fromEntries(await Promise.all(Object.entries(o.screens).map(async([S,v])=>[S,await f(v)])))}:await f(X.resolve(t,n));a=JSON.stringify(h,null,2)}if(!e.output)return{output:a,diagnostics:c};let u=X.resolve(t,e.output);return fr(X.dirname(u),{recursive:!0}),await Bun.write(u,a),{output:a,written:u,diagnostics:c}}export{xs as runNativeCompile};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{hd,yd,bd,vd,wd,xd}from"./chunk-mmwedr93.js";export{vd as generateTransitionCSS,wd as generateTransitionRuntime,hd as performEnter,yd as performLeave,xd as processTransitionAttributes,bd as processTransitionDirectives};