@stacksjs/stx 0.2.336 → 0.2.338

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 (197) hide show
  1. package/dist/app-shell.js +9 -8
  2. package/dist/{chunk-9v0fsdsf.js → chunk-066yt1hy.js} +1 -1
  3. package/dist/{chunk-eth22r93.js → chunk-0xgc5t3y.js} +1 -1
  4. package/dist/{chunk-vd5xvsnv.js → chunk-18018jkn.js} +1 -1
  5. package/dist/{chunk-5tefa8qb.js → chunk-1vb2rj09.js} +2 -2
  6. package/dist/chunk-1wsewc5h.js +2 -0
  7. package/dist/{chunk-p1hy2bwn.js → chunk-1yj4xd6n.js} +3 -3
  8. package/dist/{chunk-fqq5k9ve.js → chunk-1z1efvtw.js} +1 -1
  9. package/dist/{chunk-cdqx2c2h.js → chunk-22hch2me.js} +1 -1
  10. package/dist/{chunk-kpeqn5tx.js → chunk-2gc4cevb.js} +1 -1
  11. package/dist/{chunk-mgmn1vxy.js → chunk-39xtzfzf.js} +1 -1
  12. package/dist/{chunk-zsnrcbw1.js → chunk-3cjvqa0s.js} +2 -2
  13. package/dist/chunk-3sgdth20.js +2 -0
  14. package/dist/chunk-41dfsdy9.js +2 -0
  15. package/dist/{chunk-ymrxpwr8.js → chunk-46tmg3k4.js} +2 -2
  16. package/dist/{chunk-e1sxe3q4.js → chunk-4904n5v0.js} +2 -2
  17. package/dist/chunk-4cw0s9f4.js +4 -0
  18. package/dist/chunk-4jj4kk18.js +2 -0
  19. package/dist/chunk-4np12rj1.js +2 -0
  20. package/dist/chunk-4pcjt99d.js +2 -0
  21. package/dist/{chunk-dvvx1wny.js → chunk-57atgbyq.js} +1 -1
  22. package/dist/chunk-58j32d7n.js +2 -0
  23. package/dist/{chunk-hyfjnn7g.js → chunk-5g6rprcy.js} +1 -1
  24. package/dist/{chunk-mm59b0gg.js → chunk-5qsg9q46.js} +1 -1
  25. package/dist/{chunk-m8kezfrt.js → chunk-5r7gfwpj.js} +5 -5
  26. package/dist/chunk-799s9mwc.js +47 -0
  27. package/dist/{chunk-yxppshfd.js → chunk-7a21q2q4.js} +1 -1
  28. package/dist/chunk-7d74am4w.js +2 -0
  29. package/dist/chunk-7ngnyy5k.js +2 -0
  30. package/dist/{chunk-r8rbf28v.js → chunk-7r79j1hs.js} +1 -1
  31. package/dist/{chunk-cr8v8k53.js → chunk-7r9vgzg4.js} +1 -1
  32. package/dist/{chunk-xwxdwqn9.js → chunk-7we3xfde.js} +1 -1
  33. package/dist/{chunk-fr66xp8q.js → chunk-823h67tv.js} +1 -1
  34. package/dist/{chunk-42en0cxm.js → chunk-86v2rps7.js} +1 -1
  35. package/dist/{chunk-xz3evxqp.js → chunk-8bxtvsgm.js} +1 -1
  36. package/dist/{chunk-09jdvqhg.js → chunk-8cg15rr7.js} +2 -2
  37. package/dist/chunk-95t7pked.js +2 -0
  38. package/dist/{chunk-xdmb578h.js → chunk-97ej3abh.js} +1 -1
  39. package/dist/{chunk-kw98dfza.js → chunk-9btdax2s.js} +1 -1
  40. package/dist/{chunk-pbexz0d4.js → chunk-9bvgzqw1.js} +2 -2
  41. package/dist/{chunk-te6qym2g.js → chunk-9jc2z17q.js} +2 -2
  42. package/dist/chunk-9m5sxaen.js +2 -0
  43. package/dist/{chunk-tjag2cmm.js → chunk-a26hcag1.js} +1 -1
  44. package/dist/chunk-a3m7mgjc.js +2 -0
  45. package/dist/{chunk-9368t9jm.js → chunk-a959m68j.js} +1 -1
  46. package/dist/{chunk-fkdnfjc2.js → chunk-aftqqqcg.js} +2 -2
  47. package/dist/chunk-aved735s.js +64 -0
  48. package/dist/{chunk-q0g5c39d.js → chunk-ay336sqb.js} +1 -1
  49. package/dist/{chunk-cvphepjb.js → chunk-b3pn6dh5.js} +1 -1
  50. package/dist/{chunk-5swem3qy.js → chunk-b4cabzk9.js} +1 -1
  51. package/dist/{chunk-ej8mv2k6.js → chunk-bgrkxzr7.js} +1 -1
  52. package/dist/{chunk-2cm03y4y.js → chunk-d3kjaae0.js} +1 -1
  53. package/dist/chunk-d7zxg9bp.js +16 -0
  54. package/dist/{chunk-1ebyt1ba.js → chunk-dekxwgc2.js} +1 -1
  55. package/dist/chunk-dvafkj8w.js +2 -0
  56. package/dist/chunk-e3rgky2r.js +3747 -0
  57. package/dist/{chunk-t41aaehf.js → chunk-e4g8wz6t.js} +1 -1
  58. package/dist/chunk-e9y48d60.js +2 -0
  59. package/dist/{chunk-pbzdjhp8.js → chunk-eq2j7w8p.js} +1 -1
  60. package/dist/chunk-f08ttkqr.js +2 -0
  61. package/dist/{chunk-4jdj52c5.js → chunk-f6sejeg3.js} +1 -1
  62. package/dist/chunk-fha0nyet.js +2 -0
  63. package/dist/{chunk-6k8h1fj1.js → chunk-fjrkyhm7.js} +1 -1
  64. package/dist/chunk-fw56y3cb.js +30 -0
  65. package/dist/chunk-fx5m9d3t.js +2 -0
  66. package/dist/{chunk-mwh3ymwc.js → chunk-g6czgcg4.js} +1 -1
  67. package/dist/chunk-gtfcw1gc.js +12 -0
  68. package/dist/chunk-gz539gk6.js +2 -0
  69. package/dist/chunk-h0y4mb2m.js +2 -0
  70. package/dist/chunk-hfzv07az.js +3 -0
  71. package/dist/{chunk-nat3actx.js → chunk-hrdd26r4.js} +1 -1
  72. package/dist/{chunk-cdsbxghb.js → chunk-jkyvk4x6.js} +1 -1
  73. package/dist/{chunk-4ty8j3xn.js → chunk-jx03a693.js} +1 -1
  74. package/dist/{chunk-vvd659y4.js → chunk-k3dtvay1.js} +1 -1
  75. package/dist/chunk-kawdj1j7.js +2 -0
  76. package/dist/{chunk-d4etph79.js → chunk-kdhrk7x5.js} +1 -1
  77. package/dist/chunk-kdwerx8e.js +2 -0
  78. package/dist/{chunk-n66k2v2q.js → chunk-kermxyfe.js} +2 -2
  79. package/dist/{chunk-x7yc7e9v.js → chunk-m11pb9cx.js} +1 -1
  80. package/dist/{chunk-k6ky5et7.js → chunk-m1p2n3nf.js} +1 -1
  81. package/dist/chunk-m46edxtt.js +3 -0
  82. package/dist/chunk-meqz313r.js +2 -0
  83. package/dist/{chunk-q05eh1n4.js → chunk-mnyehz4t.js} +2 -2
  84. package/dist/{chunk-0vv5s039.js → chunk-mys0rat0.js} +1 -1
  85. package/dist/chunk-n0a55zv2.js +2 -0
  86. package/dist/{chunk-7kw3grq5.js → chunk-nf7k53ap.js} +1 -1
  87. package/dist/{chunk-kffndzch.js → chunk-nhbc464j.js} +3 -3
  88. package/dist/{chunk-1hzgxk2m.js → chunk-nvp546bb.js} +1 -1
  89. package/dist/chunk-p1cddybx.js +2 -0
  90. package/dist/chunk-q0srntf6.js +2 -0
  91. package/dist/chunk-q3g4yf5r.js +2 -0
  92. package/dist/{chunk-c2ta859c.js → chunk-q9ckfwhh.js} +1 -1
  93. package/dist/chunk-qhdp0ycf.js +2 -0
  94. package/dist/{chunk-y4nzmkea.js → chunk-qsbjtp60.js} +1 -1
  95. package/dist/{chunk-1tva0f8f.js → chunk-qtc28zy1.js} +1 -1
  96. package/dist/{chunk-2vgkc0kg.js → chunk-r10fypcd.js} +1 -1
  97. package/dist/chunk-rkykwy3z.js +2 -0
  98. package/dist/{chunk-64djh88a.js → chunk-sqvqwd0p.js} +1 -1
  99. package/dist/{chunk-67bh5vrj.js → chunk-stbns4bg.js} +1 -1
  100. package/dist/chunk-szfk6pw6.js +2 -0
  101. package/dist/{chunk-amxtypkp.js → chunk-t00ga194.js} +1 -1
  102. package/dist/chunk-temapbqe.js +2 -0
  103. package/dist/{chunk-9kxfz708.js → chunk-tr1174hz.js} +1 -1
  104. package/dist/{chunk-q85qp5we.js → chunk-tr41gn5j.js} +1 -1
  105. package/dist/{chunk-crj19mqr.js → chunk-tr9ynxdw.js} +1 -1
  106. package/dist/{chunk-71y3bhcw.js → chunk-tsmdmf5h.js} +123 -37
  107. package/dist/{chunk-gptwwv3c.js → chunk-vaggjvsm.js} +1 -1
  108. package/dist/{chunk-ya5m5vbn.js → chunk-vgfd9582.js} +1 -1
  109. package/dist/chunk-vgfnre7b.js +2 -0
  110. package/dist/{chunk-n9c975db.js → chunk-vhzc08aa.js} +1 -1
  111. package/dist/{chunk-08w4gtyf.js → chunk-vm5jbgb1.js} +3 -3
  112. package/dist/{chunk-drqdc0mh.js → chunk-vxt5c5aq.js} +1 -1
  113. package/dist/{chunk-hzfd8cz0.js → chunk-w0hzaka3.js} +78 -67
  114. package/dist/{chunk-yk6446kr.js → chunk-w72v0ab1.js} +2 -2
  115. package/dist/{chunk-c65yrgck.js → chunk-wakb8z5q.js} +10 -10
  116. package/dist/{chunk-q569zmrr.js → chunk-wb90259a.js} +1 -1
  117. package/dist/chunk-x01sw9wy.js +2 -0
  118. package/dist/{chunk-dfejgnny.js → chunk-x48crnwa.js} +1 -1
  119. package/dist/{chunk-24b4711v.js → chunk-x4vhn880.js} +1 -1
  120. package/dist/{chunk-j2dj21ay.js → chunk-xe6zmdfq.js} +1 -1
  121. package/dist/chunk-y8vj3rtt.js +2 -0
  122. package/dist/chunk-yj1dxdfr.js +2 -0
  123. package/dist/{chunk-wx5zf66r.js → chunk-yne23w3c.js} +1 -1
  124. package/dist/{chunk-zz8qgqa1.js → chunk-ypzm47q3.js} +2 -2
  125. package/dist/chunk-z07knk3p.js +2 -0
  126. package/dist/{chunk-27xfkzks.js → chunk-zj039s33.js} +1 -1
  127. package/dist/{chunk-c79nfdyj.js → chunk-zk6ghjnj.js} +1 -1
  128. package/dist/chunk-zt4pf776.js +2 -0
  129. package/dist/{chunk-4k0ce745.js → chunk-zye9r15n.js} +2 -2
  130. package/dist/chunk-zzfpwxpp.js +2 -0
  131. package/dist/cli.js +14 -14
  132. package/dist/component-contract-checks.d.ts +18 -15
  133. package/dist/component-contract.d.ts +6 -14
  134. package/dist/craft-entry.js +1 -1
  135. package/dist/craft.js +1 -1
  136. package/dist/database.js +1 -1
  137. package/dist/expressions.d.ts +45 -0
  138. package/dist/expressions.js +60 -11
  139. package/dist/includes.js +4 -0
  140. package/dist/loops.js +10 -0
  141. package/dist/pwa.js +2 -2
  142. package/dist/server-components.js +2 -1
  143. package/dist/signals.js +121 -35
  144. package/dist/slots.js +86 -12
  145. package/dist/ssg.js +2 -2
  146. package/dist/stx-virtual-ts.d.ts +205 -95
  147. package/dist/template-syntax-escape.d.ts +36 -0
  148. package/dist/template-syntax-escape.js +8 -0
  149. package/dist/utils.js +9 -2
  150. package/dist/variable-extractor.d.ts +1 -0
  151. package/dist/variable-extractor.js +8 -0
  152. package/dist/visual-testing.js +1 -1
  153. package/package.json +8 -8
  154. package/dist/chunk-046dp691.js +0 -2
  155. package/dist/chunk-1brnvyhv.js +0 -2
  156. package/dist/chunk-3ntf8f5e.js +0 -2
  157. package/dist/chunk-4tnxnzja.js +0 -2
  158. package/dist/chunk-63yfp05p.js +0 -2
  159. package/dist/chunk-7y4eqkv4.js +0 -2
  160. package/dist/chunk-7ywnkv1f.js +0 -2
  161. package/dist/chunk-80zj5516.js +0 -2
  162. package/dist/chunk-8730k51r.js +0 -2
  163. package/dist/chunk-907qxn09.js +0 -2
  164. package/dist/chunk-9fcq5x2r.js +0 -2
  165. package/dist/chunk-a97tp43x.js +0 -2
  166. package/dist/chunk-atw841yx.js +0 -2
  167. package/dist/chunk-c1m1gng4.js +0 -2
  168. package/dist/chunk-caaenc3w.js +0 -60
  169. package/dist/chunk-dbfq77qe.js +0 -4
  170. package/dist/chunk-dnesmvvb.js +0 -2
  171. package/dist/chunk-eg8ksaft.js +0 -2
  172. package/dist/chunk-ewsx2qxm.js +0 -2
  173. package/dist/chunk-farwrdr2.js +0 -3
  174. package/dist/chunk-fcenm8n1.js +0 -2
  175. package/dist/chunk-gbz6pfs8.js +0 -2
  176. package/dist/chunk-gdbkqatx.js +0 -43
  177. package/dist/chunk-jnahcd4d.js +0 -2
  178. package/dist/chunk-ke88kpva.js +0 -30
  179. package/dist/chunk-krpkfndf.js +0 -3
  180. package/dist/chunk-kxtqbrfr.js +0 -3759
  181. package/dist/chunk-m1yrakpk.js +0 -2
  182. package/dist/chunk-q2hvne0v.js +0 -2
  183. package/dist/chunk-qpbk50xd.js +0 -2
  184. package/dist/chunk-rxdd3k6n.js +0 -2
  185. package/dist/chunk-ssd10kje.js +0 -2
  186. package/dist/chunk-szx6pxh3.js +0 -2
  187. package/dist/chunk-tpmgq2dx.js +0 -12
  188. package/dist/chunk-tte4m2s9.js +0 -2
  189. package/dist/chunk-v7gjsb3f.js +0 -2
  190. package/dist/chunk-vv289x82.js +0 -2
  191. package/dist/chunk-vx6mxybh.js +0 -2
  192. package/dist/chunk-x510wr8z.js +0 -2
  193. package/dist/chunk-x95sxapm.js +0 -2
  194. package/dist/chunk-xjrhzkx2.js +0 -2
  195. package/dist/chunk-y1x2ebhv.js +0 -2
  196. package/dist/chunk-yvec3f1c.js +0 -2
  197. package/dist/chunk-yzxm75jp.js +0 -2
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ri as a,si as b,ti as c,ui as d,vi as e}from"./chunk-7kw3grq5.js";import"./chunk-hyfjnn7g.js";export{c as renderSSRSuspense,a as processSuspenseDirectives,e as generateSuspenseRuntime,d as generateSuspenseCSS,b as createSSRSuspense};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ii as a}from"./chunk-fqq5k9ve.js";import"./chunk-hyfjnn7g.js";export{a as processDeferDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Vg as a,Wg as b,Xg as c,Yg as d,Zg as e,_g as f}from"./chunk-farwrdr2.js";import"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$v as E,Av as d,Bv as e,Cv as f,Dv as g,Ev as h,Fv as i,Gv as j,Hv as k,Iv as l,Jv as m,Kv as n,Lv as o,Mv as p,Nv as q,Ov as r,Pv as s,Qv as t,Rv as u,Sv as v,Tv as w,Uv as x,Vv as y,Wv as z,Xv as A,Yv as B,Zv as C,_v as D,aw as F,bw as G,cw as H,dw as I,ew as J,gw as K,iw as L,xv as a,yv as b,zv as c}from"./chunk-hzfd8cz0.js";import"./chunk-hyfjnn7g.js";L();export{o as setAppUrl,H as runMiddleware,r as route,j as resolveLayoutChain,s as resetRoutes,z as registerMiddleware,g as patternToRegex,t as navigateTo,h as matchRoute,E as loadMiddlewareFromDirectory,c as isNonPageRoutePattern,b as isNonPageRoutePath,B as hasMiddleware,K as getRouterScript,D as getMiddlewareNames,A as getMiddleware,d as generateRouteTypes,e as generateRouteManifest,n as formatRoutes,m as findErrorPage,f as filePathToPattern,J as extractLayoutMetadata,I as deriveLayoutGroup,q as defineRoutes,p as defineRoute,v as defineMiddleware,y as createStorageManager,w as createServerCookieManager,l as createRouter,F as createRouteLocation,G as createMiddlewareContext,x as createClientCookieManager,C as clearMiddleware,i as bracketPathToRegex,u as abortNavigation,k as Router,a as NON_PAGE_DIRS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ri as a,Si as b,Ti as c}from"./chunk-4k0ce745.js";import"./chunk-xwxdwqn9.js";import"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{hi as a}from"./chunk-mwh3ymwc.js";import"./chunk-hyfjnn7g.js";export{a as rewriteImagesWithSiblings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$h as a,ai as b,bi as c,ci as d,di as e,ei as f,fi as g,gi as h}from"./chunk-5tefa8qb.js";import"./chunk-t41aaehf.js";import"./chunk-hyfjnn7g.js";export{d as v,a as useForm,g as processHasErrorsDirective,h as processFormValidationDirectives,f as processErrorsDirective,e as processErrorDirective,b as defineForm,c as Validator};
@@ -1,60 +0,0 @@
1
- // @bun
2
- import{mt as bq}from"./chunk-amxtypkp.js";import{sw as k}from"./chunk-hyfjnn7g.js";var fq={1001:{message:"Unclosed directive: {{directive}}",help:"Make sure to close the directive with the appropriate end tag"},1002:{message:"Unclosed expression at position {{position}}",help:"Check for missing closing braces }}"},1003:{message:"Invalid directive syntax: {{directive}}",help:"Review the directive documentation for correct syntax"},1004:{message:"Malformed expression: {{expression}}",help:"Check for syntax errors in your expression"},1005:{message:"Unexpected token: {{token}}",help:"Remove or fix the unexpected token"},1101:{message:"Undefined variable: {{variable}}",help:"Make sure the variable is defined in the template context"},1102:{message:"Type error: {{details}}",help:"Check that you are using the correct types"},1103:{message:"Evaluation error: {{details}}",help:"Review the expression for errors"},1104:{message:"Infinite loop detected in {{location}}",help:"Check your loop conditions"},1105:{message:"Circular reference detected: {{path}}",help:"Remove the circular dependency"},1201:{message:"Unsafe expression blocked: {{expression}}",help:"This expression contains potentially dangerous code"},1202:{message:"Path traversal attempt blocked: {{path}}",help:"Use only relative paths within allowed directories"},1203:{message:"Potential XSS attempt blocked",help:"Sanitize user input before rendering"},1204:{message:"Code injection attempt blocked: {{code}}",help:"Avoid executing dynamic code"},1205:{message:"Prohibited DOM API usage: {{api}}",help:"Use STX.useRefs(), STX.useRef(), STX.el() and other STX helpers instead of direct DOM manipulation"},1301:{message:"File not found: {{path}}",help:"Check that the file exists and the path is correct"},1302:{message:"Error reading file: {{path}}",help:"Check file permissions and encoding"},1303:{message:"Invalid file path: {{path}}",help:"Use a valid file path"},1304:{message:"Permission denied: {{path}}",help:"Check file permissions"},1401:{message:"Invalid configuration: {{details}}",help:"Review your stx.config.ts file"},1402:{message:"Missing required configuration: {{key}}",help:"Add the required configuration option"},1403:{message:"Deprecated configuration: {{key}}",help:"Update to the new configuration format"},1501:{message:"Component not found: {{name}}",help:"Check that the component exists in your components directory"},1502:{message:"Invalid props for component {{name}}: {{details}}",help:"Check the component prop requirements"},1503:{message:"Error rendering component {{name}}: {{details}}",help:"Check the component template for errors"},1601:{message:"Filter not found: {{filter}}",help:"Register the filter or check the filter name"},1602:{message:"Invalid arguments for filter {{filter}}: {{details}}",help:"Check the filter documentation for correct arguments"},1603:{message:"Expression evaluation timed out",help:"Simplify the expression or increase the timeout"}},b={},$q="en";function hq(q){$q=q}function uq(){return $q}function dq(q){b={...b,...q}}function pq(){b={}}function Xq(q,Q={}){let J=b[q]||fq[q]||{message:`Unknown error (code: ${q})`},Z=J.message,$=J.help;for(let[Y,G]of Object.entries(Q)){let X=`{{${Y}}}`;if(Z=Z.replace(new RegExp(X,"g"),G),$)$=$.replace(new RegExp(X,"g"),G)}return{message:Z,help:$}}function mq(q,Q={}){let{message:J,help:Z}=Xq(q,Q);return Z?`${J}
3
- Help: ${Z}`:J}var U={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function u(q){for(let[Q,J]of Object.entries(U))if(J===q)return Q;return}function cq(){return!1}function L(){return!cq()||process.env.STX_DEBUG==="true"}function GQ(){return!1}import lq from"path";var Yq={showRelativePaths:!1,enableAutoRecovery:L(),logRecoveryWarnings:!0},T={...Yq};function iq(q){T={...T,...q}}function E(){return{...T}}function sq(){T={...Yq}}function C(q){if(!T.showRelativePaths||!q)return q;let Q=T.baseDir||process.cwd();try{let J=lq.relative(Q,q);return J.startsWith("..")?q:J}catch{return q}}class N extends Error{code;filePath;line;column;context;numericCode;constructor(q,Q,J,Z,$,Y,G){super(q);this.code=Q;this.filePath=J;this.line=Z;this.column=$;this.context=Y;if(this.name="StxError",this.numericCode=G||U.EVALUATION_ERROR,this.filePath)this.filePath=C(this.filePath)}}class Hq extends N{constructor(q,Q,J,Z,$,Y){super(q,"stx_SYNTAX_ERROR",Q,J,Z,$,Y||U.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class Gq extends N{constructor(q,Q,J,Z,$,Y){super(q,"stx_RUNTIME_ERROR",Q,J,Z,$,Y||U.EVALUATION_ERROR);this.name="StxRuntimeError"}}class Wq extends N{constructor(q,Q,J,Z,$,Y){super(q,"stx_SECURITY_ERROR",Q,J,Z,$,Y||U.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class Bq extends N{constructor(q,Q,J,Z,$,Y){super(q,"stx_FILE_ERROR",Q,J,Z,$,Y||U.FILE_NOT_FOUND);this.name="StxFileError"}}class Vq extends N{isFatal=!0;constructor(q,Q,J,Z,$,Y){super(q,"stx_VALIDATION_ERROR",Q,J,Z,$,Y||U.DOM_API_VIOLATION);this.name="StxValidationError"}}function d(q){let{type:Q,message:J,code:Z,filePath:$,line:Y,column:G,template:X,offset:H,snippet:W,suggestion:B,format:V="text"}=q,w=Y,M=G;if(!w&&X&&H!==void 0){let I=Fq(X,H);w=I.line,M=I.column}let j=$?C($):void 0,D=Z?u(Z):void 0,K={type:Q,code:Z,codeName:D,message:J,filePath:j,line:w,column:M,snippet:W,suggestion:B,timestamp:new Date().toISOString()},F;switch(V){case"html":F=rq(K);break;case"json":F=JSON.stringify(K,null,2);break;case"console":F=oq(K,X,H);break;case"text":default:F=nq(K,X,H);break}return{formatted:F,data:K}}function nq(q,Q,J){let Z=[],$=q.code?` [${q.codeName||q.code}]`:"";if(Z.push(`[${q.type} Error${$}]`),q.filePath){let Y=q.filePath;if(q.line){if(Y+=`:${q.line}`,q.column)Y+=`:${q.column}`}Z.push(`at ${Y}`)}if(Z.push(`
4
- ${q.message}`),Q&&q.line){let Y=aq(Q,q.line,2);if(Y)Z.push(`
5
- ${Y}`)}if(q.snippet)Z.push(`
6
- Snippet: ${q.snippet}`);if(q.suggestion)Z.push(`
7
- Suggestion: ${q.suggestion}`);return Z.join(" ")}function rq(q){let Q=q.code?` [${q.code}]`:"",J=q.filePath?` in ${q.filePath}${q.line?`:${q.line}`:""}`:"",Z=`<!-- [${q.type} Error${Q}]${J}: ${wq(q.message)}`;if(q.suggestion)Z+=` | Suggestion: ${wq(q.suggestion)}`;return Z+=" -->",Z}function oq(q,Q,J){let W=[],B=q.code?` [${q.codeName||q.code}]`:"";if(W.push(`\x1B[1m${"\x1B[31m"}\u2501\u2501\u2501 ${q.type} Error${B} \u2501\u2501\u2501${"\x1B[0m"}`),q.filePath){let V=`\x1B[36m${q.filePath}\x1B[0m`;if(q.line){if(V+=`\x1B[90m:${q.line}\x1B[0m`,q.column)V+=`\x1B[90m:${q.column}\x1B[0m`}W.push(`
8
- \x1B[90mat\x1B[0m ${V}`)}if(W.push(`
9
-
10
- ${q.message}`),Q&&q.line){let V=tq(Q,q.line,2);if(V)W.push(`
11
-
12
- \x1B[90mContext:\x1B[0m
13
- ${V}`)}if(q.suggestion)W.push(`
14
-
15
- \x1B[33mSuggestion:\x1B[0m ${q.suggestion}`);return W.push(`
16
- ${"\x1B[31m"}\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501${"\x1B[0m"}`),W.join("")}function aq(q,Q,J){let Z=q.split(`
17
- `),$=Math.max(0,Q-J-1),Y=Math.min(Z.length-1,Q+J-1),G=[];for(let X=$;X<=Y;X++){let H=(X+1).toString().padStart(4),W=X===Q-1?">":" ";G.push(`${W}${H} | ${Z[X]}`)}return G.join(`
18
- `)}function tq(q,Q,J){let Z=q.split(`
19
- `),$=Math.max(0,Q-J-1),Y=Math.min(Z.length-1,Q+J-1),G="\x1B[90m",X="\x1B[31m",H="\x1B[0m",W=[];for(let B=$;B<=Y;B++){let V=(B+1).toString().padStart(4),w=B===Q-1,M=w?"\x1B[31m>\x1B[0m":" ",j=w?`\x1B[31m${Z[B]}\x1B[0m`:`\x1B[90m${Z[B]}\x1B[0m`;W.push(`${M}\x1B[90m${V}\x1B[0m | ${j}`)}return W.join(`
20
- `)}function wq(q){return q.replace(/--/g,"- -").replace(/>/g,"&gt;")}function Fq(q,Q){let Z=q.substring(0,Q).split(`
21
- `);return{line:Z.length,column:Z[Z.length-1].length}}function y(q,Q,J){return d({type:q,message:Q,code:J,format:"html"}).formatted}function eq(q,Q,J,Z,$){return d({type:q,message:Q,code:$,filePath:J,line:Z,format:"console"}).formatted}function qJ(q,Q,J){let Z=J.template.split(`
22
- `),$=Fq(J.template,J.offset),Y=`[${q} Error at line ${$.line} in ${J.filePath}]: ${Q}
23
-
24
- `,G=Math.max(0,$.line-3),X=Math.min(Z.length-1,$.line+2);Y+=`Context:
25
- `;for(let H=G;H<=X;H++){let W=H+1,B=Z[H]||"",V=H===$.line-1?">":" ";Y+=`${V} ${W.toString().padStart(3)}: ${B}
26
- `}if($.line-1<Z.length){let H=" ".repeat($.column+5);Y+=`${H}^
27
- `}return Y}function JJ(q,Q,J){try{return q()}catch(Z){if(J&&Z instanceof Error)J(Z);return Q}}async function QJ(q,Q,J){try{return await q()}catch(Z){if(J&&Z instanceof Error)J(Z);return Q}}var ZJ={isEnabled(){return E().enableAutoRecovery},fixCommonSyntaxErrors(q){let Q=E();if(!Q.enableAutoRecovery)return{fixed:q,fixes:[]};let J=q,Z=[],$=(J.match(/\{\{/g)||[]).length,Y=(J.match(/\}\}/g)||[]).length;if($>Y){let X=$-Y;J+="}}".repeat(X),Z.push(`Added ${X} missing closing braces '}}'`)}let G=["if","foreach","for","switch","section"];for(let X of G){let H=(J.match(new RegExp(`@${X}\\b`,"g"))||[]).length,W=(J.match(new RegExp(`@end${X}\\b`,"g"))||[]).length;if(H>W){let B=H-W;for(let V=0;V<B;V++)J+=`
28
- @end${X}`;Z.push(`Added ${B} missing @end${X}`)}}if(Z.length>0&&Q.logRecoveryWarnings)console.warn("[stx] Auto-recovery applied fixes:"),Z.forEach((X)=>console.warn(` - ${X}`)),console.warn(" Consider fixing these issues in your template.");return{fixed:J,fixes:Z}},createFallbackContent(q,Q){if(L())return`<!-- ${q} failed: ${Q.message} -->`;return"<!-- stx rendering error -->"}};class p{errors=[];maxErrors;enableFileLogging;logFilePath;logFormat;maxFileSize;maxLogFiles;minLevel;writeQueue=Promise.resolve();constructor(q={}){this.maxErrors=q.maxErrors??1000,this.enableFileLogging=q.enableFileLogging??!1,this.logFilePath=q.logFilePath??".stx/errors.log",this.logFormat=q.logFormat??"json",this.maxFileSize=q.maxFileSize??10485760,this.maxLogFiles=q.maxLogFiles??5,this.minLevel=q.minLevel??"all"}configure(q){if(q.maxErrors!==void 0)this.maxErrors=q.maxErrors;if(q.enableFileLogging!==void 0)this.enableFileLogging=q.enableFileLogging;if(q.logFilePath!==void 0)this.logFilePath=q.logFilePath;if(q.logFormat!==void 0)this.logFormat=q.logFormat;if(q.maxFileSize!==void 0)this.maxFileSize=q.maxFileSize;if(q.maxLogFiles!==void 0)this.maxLogFiles=q.maxLogFiles;if(q.minLevel!==void 0)this.minLevel=q.minLevel}log(q,Q,J="error"){let Z={timestamp:new Date,error:q,context:Q,level:J};if(this.errors.push(Z),this.errors.length>this.maxErrors)this.errors=this.errors.slice(-this.maxErrors);if(this.enableFileLogging&&this.shouldLog(J))this.writeToFile(Z)}shouldLog(q){if(this.minLevel==="all")return!0;if(this.minLevel==="warning")return q==="error"||q==="warning";if(this.minLevel==="error")return q==="error";return!0}formatEntry(q){if(this.logFormat==="json")return JSON.stringify({timestamp:q.timestamp.toISOString(),level:q.level||"error",type:q.error.constructor.name,message:q.error.message,stack:q.error.stack,context:q.context});let Q=[`[${q.timestamp.toISOString()}] [${(q.level||"error").toUpperCase()}] ${q.error.constructor.name}: ${q.error.message}`];if(q.error.stack)Q.push(` Stack: ${q.error.stack.split(`
29
- `).slice(1).join(`
30
- `)}`);if(q.context)Q.push(` Context: ${JSON.stringify(q.context)}`);return Q.join(`
31
- `)}writeToFile(q){this.writeQueue=this.writeQueue.then(async()=>{try{let Q=await import("fs"),Z=(await import("path")).dirname(this.logFilePath);if(!Q.existsSync(Z))Q.mkdirSync(Z,{recursive:!0});await this.rotateIfNeeded(Q);let $=`${this.formatEntry(q)}
32
- `;Q.appendFileSync(this.logFilePath,$,"utf-8")}catch(Q){if(process.env.STX_DEBUG==="true")console.error("Failed to write to error log:",Q)}})}async rotateIfNeeded(q){try{if(!q.existsSync(this.logFilePath))return;if(q.statSync(this.logFilePath).size<this.maxFileSize)return;for(let J=this.maxLogFiles-1;J>=1;J--){let Z=`${this.logFilePath}.${J}`,$=`${this.logFilePath}.${J+1}`;if(q.existsSync(Z))if(J>=this.maxLogFiles-1)q.unlinkSync(Z);else q.renameSync(Z,$)}if(this.maxLogFiles<=1)q.writeFileSync(this.logFilePath,"");else q.renameSync(this.logFilePath,`${this.logFilePath}.1`)}catch(Q){if(process.env.STX_DEBUG==="true")console.error("Failed to rotate error logs:",Q)}}getRecentErrors(q=10){return this.errors.slice(-q)}getErrorsByType(q){return this.errors.filter((Q)=>Q.error.constructor.name===q)}getErrorsByLevel(q){return this.errors.filter((Q)=>Q.level===q)}clear(){this.errors.length=0}async clearLogFile(){try{let q=await import("fs");if(q.existsSync(this.logFilePath))q.writeFileSync(this.logFilePath,"","utf-8")}catch(q){if(process.env.STX_DEBUG==="true")console.error("Failed to clear error log:",q)}}getStats(){let q={},Q={error:0,warning:0,info:0};for(let J of this.errors){let Z=J.error.constructor.name;q[Z]=(q[Z]||0)+1;let $=J.level||"error";Q[$]=(Q[$]||0)+1}return{total:this.errors.length,byType:q,byLevel:Q}}async exportToFile(q,Q="json"){let J=await import("fs"),$=(await import("path")).dirname(q);if(!J.existsSync($))J.mkdirSync($,{recursive:!0});if(Q==="json"){let Y=this.errors.map((G)=>({timestamp:G.timestamp.toISOString(),level:G.level||"error",type:G.error.constructor.name,message:G.error.message,stack:G.error.stack,context:G.context}));J.writeFileSync(q,JSON.stringify(Y,null,2),"utf-8")}else{let Y=this.errors.map((G)=>this.formatEntry(G));J.writeFileSync(q,Y.join(`
33
-
34
- `),"utf-8")}}async flush(){await this.writeQueue}}var $J=new p,XJ={isDevelopment(){return L()},logDetailedError(q,Q){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",q.message),console.error("Stack:",q.stack),Q)console.error("Context:",Q);console.error("========================")},createErrorReport(q,Q){let J=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${q.message}`,`Type: ${q.constructor.name}`,`Stack: ${q.stack}`];if(Q)J.push(`Context: ${JSON.stringify(Q,null,2)}`);return J.push("========================"),J.join(`
35
- `)}};import m from"path";var c={isValidFilePath(q,Q){let J=q.replace(/\\/g,"/");if(J.includes("\x00"))return!1;if(J.includes("../")||J.includes("..\\")||J===".."||J.startsWith("../")||J.endsWith("/..")||J.includes("/..\\")||J.includes("\\../"))return!1;if(/^[a-z][a-z0-9+.-]*:/i.test(J))return!1;if(J.startsWith("/")){if(["/etc/","/root/","/var/","/usr/","/bin/","/sbin/","/proc/","/sys/","/dev/","/boot/","/home/","/private/","/Library/","/System/"].some((Y)=>J===Y.slice(0,-1)||J.startsWith(Y)))return!1}if(/^[a-z]:/i.test(J)){if(["Windows/","Windows\\","System32/","System32\\","Program Files/","Program Files\\"].some((Y)=>J.includes(Y)))return!1}if(Q){let $=m.resolve(Q,q),Y=m.resolve(Q);if(!$.startsWith(Y+m.sep)&&$!==Y)return!1}return!0},isValidVariableName(q){return/^[a-z_$]\w*$/i.test(q)},isValidDirectiveName(q){return/^[a-z][\w-]*$/i.test(q)},isSafeContent(q){return![/<script[^>]*>[\s\S]*?<\/script>/i,/javascript:/i,/data:text\/html/i,/vbscript:/i,/on\w+\s*=/i].some((J)=>J.test(q))}};function YJ(q){let Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return q.replace(/[&<>"']/g,(J)=>Q[J]||J)}function v(q,Q={}){let{allowHtml:J=!1,maxLength:Z=1e4,allowSpecialChars:$=!0,customSanitizer:Y}=Q,G=[],X=q,H=!1;if(Y){let B=Y(X);if(B!==X)X=B,H=!0}if(X.includes("\x00"))X=X.replace(/\0/g,""),H=!0,G.push("Null bytes removed from parameter");if(X.length>Z)X=X.substring(0,Z),H=!0,G.push(`Parameter truncated to ${Z} characters`);if(!J&&/<[^>]+>/.test(X))X=YJ(X),H=!0,G.push("HTML content was escaped");let W=[{pattern:/javascript:/gi,replacement:"",name:"javascript: URI"},{pattern:/vbscript:/gi,replacement:"",name:"vbscript: URI"},{pattern:/data:text\/html/gi,replacement:"",name:"data:text/html URI"}];for(let{pattern:B,replacement:V,name:w}of W)if(B.test(X))X=X.replace(B,V),H=!0,G.push(`Removed ${w} from parameter`);if(!$){let B=X;if(X=X.split("").filter((V)=>{let w=V.charCodeAt(0);return w>=32&&w!==127}).join(""),X!==B)H=!0,G.push("Control characters removed")}return{value:X,modified:H,warnings:G}}function HJ(q,Q){let J=q.replace(/\0/g,"");J=J.replace(/\\/g,"/"),J=J.replace(/^[a-z][a-z0-9+.-]*:/i,"");while(J.includes("../")||J.includes("./"))J=J.replace(/\.\.\//g,"").replace(/\.\//g,"");if(!c.isValidFilePath(J,Q))return null;return J}function GJ(q){let Q=[],J=q.trim(),Z=J!==q,$=[{pattern:/\beval\s*\(/gi,name:"eval()"},{pattern:/\bFunction\s*\(/gi,name:"Function()"},{pattern:/\bsetTimeout\s*\(/gi,name:"setTimeout()"},{pattern:/\bsetInterval\s*\(/gi,name:"setInterval()"},{pattern:/\bimport\s*\(/gi,name:"dynamic import()"},{pattern:/\brequire\s*\(/gi,name:"require()"},{pattern:/\b__proto__\b/gi,name:"__proto__"},{pattern:/\bconstructor\b/gi,name:"constructor"},{pattern:/\bprototype\b/gi,name:"prototype"}];for(let{pattern:Y,name:G}of $)if(Y.test(J))Q.push(`Potentially dangerous pattern detected: ${G}`);if(J.includes("\x00"))J=J.replace(/\0/g,""),Z=!0,Q.push("Null bytes removed from expression");return{value:J,modified:Z,warnings:Q}}function WJ(q,Q={}){return q.map((J)=>v(J,Q))}function Mq(q){let Q={};for(let[J,Z]of Object.entries(q)){if(!c.isValidVariableName(J))continue;if(typeof Z==="string"){let $=v(Z);Q[J]=$.value}else if(Array.isArray(Z))Q[J]=Z.map(($)=>typeof $==="string"?v($).value:$);else if(typeof Z==="object"&&Z!==null)Q[J]=Mq(Z);else Q[J]=Z}return Q}var BJ={maxSanitizeDepth:10,allowBracketNotation:!1},Uq={...BJ};var g=/\bnew\s+/,f="__stx_safe_ctors",_q=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,g,/\bdelete\s+/,/\bthis\b/],VJ=new Set(["eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this",f]),Iq=new Set(["__proto__","constructor","prototype"]),wJ=/[\w)\]]\s*\[\s*['"]/;function Oq(q){let Q="",J=[],Z=null,$=!1;for(let Y=0;Y<q.length;Y++){let G=q[Y];if($){$=!1;continue}if(G==="\\"&&Z){$=!0;continue}if(Z){if(Z==="`"&&G==="$"&&Y+1<q.length&&q[Y+1]==="{"){let X=1;Y+=2;while(Y<q.length&&X>0){if(q[Y]==="{")X++;else if(q[Y]==="}")X--;if(X>0)Q+=q[Y],J.push(Y),Y++}continue}if(G===Z)Z=null;continue}if(G==='"'||G==="'"||G==="`"){Z=G;continue}Q+=G,J.push(Y)}return{text:Q,map:J}}function FJ(q){return Oq(q).text}var Aq=["Collator","DateTimeFormat","DisplayNames","ListFormat","Locale","NumberFormat","PluralRules","RelativeTimeFormat","Segmenter"],Nq=(()=>{let q={Date,URL,URLSearchParams},Q=Intl;for(let J of Aq)if(typeof Q[J]==="function")q[`Intl_${J}`]=Q[J];return Object.freeze(Object.assign(Object.create(null),q))})(),MJ=/^new(\s+)(Date|URLSearchParams|URL|Intl\s*\.\s*([A-Z_a-z]\w*))\s*\(/,jq=/(?<![\w$])new(?![\w$])/g,Dq=`only new Date(), new URL(), new URLSearchParams() and new Intl.{${Aq.join(",")}}() are allowed`;function jJ(q){let{text:Q,map:J}=Oq(q),Z=[];jq.lastIndex=0;let $;while(($=jq.exec(Q))!==null){let G=$.index;if(/(?<!\.)\.\s*$/.test(Q.slice(0,G)))continue;let X=MJ.exec(Q.slice(G)),H=X?.[3],W=!X?null:H?`Intl_${H}`:X[2];if(!X||!W||!(W in Nq))throw new O(`matched /${g.source}/; ${Dq}`,q);let B=G+X[0].length,V=J[G],w=J[B-1]+1;if(q.slice(V,w)!==Q.slice(G,B))throw new O(`matched /${g.source}/; ${Dq}`,q);let M=V+3+X[1].length;Z.push({start:M,end:M+X[2].length,key:W})}let Y=q;for(let G=Z.length-1;G>=0;G--){let X=Z[G];Y=`${Y.slice(0,X.start)}${f}.${X.key}${Y.slice(X.end)}`}return{source:Y,usesSafeConstructors:Z.length>0}}class O extends Error{rule;expression;constructor(q,Q,J){super(J??`Potentially unsafe expression (${q}): ${Q}`);this.name="UnsafeExpressionError",this.rule=q,this.expression=Q}}function SQ(q){try{return i(q),null}catch(Q){return Q instanceof O?Q.rule:Q instanceof Error?Q.message:String(Q)}}function DJ(q,Q){let J=/[$A-Z_a-z][$\w]*/g,Z;while((Z=J.exec(q))!==null){let $=Z[0],Y=q[Z.index-1];if(VJ.has($))throw new O(`matched /\\b${$}\\b/; identifier ${$}`,Q);if(Y==="."&&Iq.has($))throw new O(`matched /.${$}/; property ${$}`,Q)}}function zJ(q){let Q=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=Q.exec(q))!==null){let Z=J[2];if(!Iq.has(Z))continue;let $=q.slice(0,J.index).match(/\S(?=\s*$)/)?.[0],Y=q.slice(J.index+J[0].length).match(/^\s*(\S)/)?.[1];if(!(($==="{"||$===",")&&Y===":"))throw new O(`bracket key ${J[2]}`,q)}}function i(q){let Q=q.trim(),J=FJ(Q);DJ(J,Q),zJ(Q);for(let Z of _q){if(Z===g)continue;if(Z.test(J))throw new O(`matched /${Z.source}/`,Q)}if(!Uq.allowBracketNotation&&wJ.test(Q))throw new O("bracket notation with a string key; enable with configureSafeEvaluator({ allowBracketNotation: true })",Q,`Bracket notation with strings not allowed: ${Q}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return jJ(Q)}function KJ(q){return i(q),q.trim()}function UJ(q){let Q={};Q.Math=Math,Q.JSON=JSON,Q.Date=Date,Q.String=String,Q.Number=Number,Q.Boolean=Boolean,Q.Array=Array,Q.parseInt=Number.parseInt,Q.parseFloat=Number.parseFloat,Q.isNaN=Number.isNaN,Q.isFinite=Number.isFinite,Q.encodeURIComponent=encodeURIComponent,Q.decodeURIComponent=decodeURIComponent;for(let[J,Z]of Object.entries(q)){if(J.startsWith("__")||_q.some(($)=>$.test(J)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))Q[J]=l(Z);else Q[J]=Z}return Q}function l(q,Q=0){if(Q>=Uq.maxSanitizeDepth)return"[Object too deep]";if(q===null||typeof q!=="object")return q;if(Array.isArray(q))return q.map((Z)=>l(Z,Q+1));if(q instanceof Date||q instanceof RegExp||q instanceof Map||q instanceof Set||q instanceof Error)return q;let J={};for(let[Z,$]of Object.entries(q)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if($&&typeof $==="object")J[Z]=l($,Q+1);else J[Z]=$}return J}function _J(q,Q){try{let J=UJ(Q),Z=Object.keys(J),$=Object.values(J);return NJ(q,Z)(...$)}catch{return}}function bQ(q){try{return KJ(q),!0}catch{return!1}}function s(q,Q){try{let J=_J(q,Q);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}var kq=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","let","static","implements","interface","package","private","protected","public","arguments","eval","await"]),IJ=2000,x=new Map;function zq(q,Q){let J=`${q.join(",")}\x00${Q}`,Z=x.get(J);if(Z)return Z;let $=Function(...q,Q);if(x.size>=IJ)x.clear();return x.set(J,$),$}function EQ(q){return q.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g," ").replace(/\??\.\s*[a-zA-Z_$][\w$]*/g," ").replace(/([{,]\s*)[a-zA-Z_$][\w$]*(\s*:)/g,"$1$2").match(/\b[a-zA-Z_$][\w$]*\b/g)||[]}var OJ=/^[A-Za-z_$][\w$]*$/;function AJ(q){return OJ.test(q)&&!kq.has(q)}function NJ(q,Q){let{source:J,usesSafeConstructors:Z}=i(q),$=[];for(let W=0;W<Q.length;W++){if(!AJ(Q[W]))continue;if(Q[W]===f)continue;$.push({key:Q[W],index:W})}$.sort((W,B)=>W.key.localeCompare(B.key));let Y=$.map((W)=>W.key),G=$.map((W)=>W.index),X=`
36
- 'use strict';
37
- try {
38
- return ${J};
39
- }
40
- catch (e) {
41
- if (e instanceof TypeError) {
42
- return undefined;
43
- }
44
- throw e;
45
- }
46
- `;return kJ(Z?(W)=>{let B=zq([f,...Y,...W],X);return(...V)=>B(Nq,...V)}:(W)=>zq([...Y,...W],X),Y,Q,$,G)}function kJ(q,Q,J,Z,$){let Y=q([]),G=Z.every((H,W)=>H.index===W);if(Q.length===J.length&&G)return Kq(Y,Q,q);return Kq((...H)=>{let W=Array($.length);for(let B=0;B<$.length;B++)W[B]=H[$[B]];return Y(...W)},Q,q,(H)=>{Y=q(H)})}function Kq(q,Q,J,Z){let Y=/^(\w+) is not defined$/,G=q,X=[],H=new Set(Q);return(...W)=>{for(let B=0;B<=8;B++)try{return G(...W)}catch(V){let w=V instanceof Error?V.message:"",M=Y.exec(w);if(!(V instanceof ReferenceError)||!M)return;let j=M[1];if(H.has(j)||kq.has(j))return;if(H.add(j),X.push(j),Z)Z(X);else G=J(X)}return}}function CQ(q){let Q=q.trim(),J=[/\beval\s*\(/i,/\bFunction\s*\(/i,/\bimport\s*\(/i,/\brequire\s*\(/i,/\bprocess\b/i,/\b__proto__\b/i,/\bconstructor\s*[.(]/i,/\bglobalThis\b/i,/\bwindow\b/i,/\bdocument\b/i,/\bfetch\s*\(/i,/\bBun\b/i,/\bDeno\b/i,/\bconsole\b/i,/\bthis\b/i,/\bReflect\b/i,/\bProxy\b/i,/\bprototype\b/i,/\.(bind|call|apply)\s*\(/i];for(let Z of J)if(Z.test(Q))return!1;return!0}import r from"path";var P;async function TJ(){if(P!==void 0)return P;try{P=(await import("@stacksjs/ts-i18n")).loadLocale??null}catch{P=null}return P}var t={defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},z={},_={},A={};function fQ(q){if(q)delete z[q];else for(let Q of Object.keys(z))delete z[Q]}function hQ(){let q=Object.entries(z).map(([Q,J])=>({locale:Q,loadedAt:new Date(J.loadedAt),keyCount:Lq(J.translations)}));return{size:Object.keys(z).length,locales:Object.keys(z),entries:q}}function Lq(q,Q=0){for(let J of Object.values(q))if(Q++,J&&typeof J==="object"&&!Array.isArray(J))Q=Lq(J,Q);return Q}function RJ(q,Q=0){if(Q<=0)return!1;return Date.now()-q.loadedAt>Q}function uQ(q){if(z[q])return"loaded";return A[q]||"idle"}function dQ(q){return A[q]==="loading"}function pQ(q){return!!z[q]}async function LJ(q,Q){let{locales:J,parallel:Z=!0,priority:$={},onLocaleLoaded:Y,onComplete:G,onError:X}=q,H=Z?J:[...J].sort((W,B)=>($[B]||0)-($[W]||0));if(Z){let W=H.map(async(B)=>{try{await h(B,Q),Y?.(B)}catch(V){X?.(B,V instanceof Error?V:Error(String(V)))}});await Promise.all(W)}else for(let W of H)try{await h(W,Q),Y?.(W)}catch(B){X?.(W,B instanceof Error?B:Error(String(B)))}G?.()}function mQ(q,Q){queueMicrotask(()=>{LJ(q,Q).catch((J)=>{if(Q.debug)console.error("Background preload error:",J)})})}async function h(q,Q){if({...t,...Q.i18n}.cache&&z[q]){let $=z[q],Y=Q.i18n?.cacheMaxAge??0;if(!RJ($,Y))return $.translations}if(_[q]?.state==="loading")return _[q].promise;A[q]="loading";let Z=o(q,Q).then(($)=>{return A[q]="loaded",delete _[q],$}).catch(($)=>{throw A[q]="error",_[q]={promise:Z,state:"error",error:$ instanceof Error?$:Error(String($))},$});return _[q]={promise:Z,state:"loading"},Z}function PJ(q){return z[q]?.translations}async function cQ(q,Q){let J=PJ(q);if(J)return J;return h(q,Q)}async function lQ(q,Q){if(z[q])return z[q].translations;if(_[q]){if(Q)return Promise.race([_[q].promise,new Promise((J,Z)=>setTimeout(()=>Z(Error(`Timeout waiting for locale: ${q}`)),Q))]);return _[q].promise}throw Error(`Locale "${q}" is not loading. Call loadTranslationLazy first.`)}function iQ(){return Object.entries(A).filter(([q,Q])=>Q==="loading").map(([q])=>q)}function sQ(q){if(q)delete _[q],delete A[q];else{for(let Q of Object.keys(_))delete _[Q];for(let Q of Object.keys(A))delete A[Q]}}async function o(q,Q){let J={...t,...Q.i18n},Z=r.isAbsolute(J.translationsDir)?J.translationsDir:r.resolve(Q.root||process.cwd(),J.translationsDir);try{let $=await TJ(),Y=$?await $(q,{translationsDir:Z,defaultLocale:J.defaultLocale,sources:yJ(J.format)}):await SJ(q,J,Z);if(Y===void 0){if(q!==J.defaultLocale)return o(J.defaultLocale,Q);return{}}let G=Y;if(J.cache)z[q]={translations:G,loadedAt:Date.now(),locale:q};return G}catch($){if(Q.debug)console.error(`Error loading translation file for locale "${q}":`,$);if(q!==J.defaultLocale)return o(J.defaultLocale,Q);return{}}}async function SJ(q,Q,J){let Z=r.join(J,`${q}${bJ(Q.format)}`);try{let $=await import(Z);return $.default||$}catch($){try{let Y=await Bun.file(Z).text();if(Q.format==="yaml"||Q.format==="yml")return EJ(Y);if(Q.format==="json")return JSON.parse(Y);throw $}catch{return}}}function bJ(q){switch(q){case"yaml":return".yaml";case"yml":return".yml";case"js":return".js";case"ts":return".ts";case"json":default:return".json"}}function EJ(q){let Q={},J=q.split(`
47
- `),Z=[{obj:Q,indent:-1}];for(let $ of J){let Y=$.replace(/#.*$/,"").trimEnd();if(!Y.trim())continue;let G=Y.search(/\S/);if(G===-1)continue;while(Z.length>1&&Z[Z.length-1].indent>=G)Z.pop();let X=Z[Z.length-1].obj,H=Y.match(/^(\s*)(\S[^:]*):\s*(.*)$/);if(H){let[,,W,B]=H,V=W.trim(),w=B.trim();if(w==="")X[V]={},Z.push({obj:X[V],indent:G});else X[V]=CJ(w)}}return Q}function CJ(q){if(q.startsWith("'")&&q.endsWith("'")||q.startsWith('"')&&q.endsWith('"'))return q.slice(1,-1);let Q=q.toLowerCase();if(Q==="true"||Q==="yes")return!0;if(Q==="false"||Q==="no")return!1;if(Q==="null"||Q==="~")return null;let J=Number(q);if(!Number.isNaN(J)&&q!=="")return J;return q}function yJ(q){switch(q){case"yaml":case"yml":return["yaml"];case"js":case"ts":return["ts"];case"json":default:return["json"]}}async function vJ(q,Q){return h(q,Q)}function xJ(q,Q){for(let J of q){let Z=J.trim(),$=Z.match(/^\{(\d+)\}\s*(.*)$/);if($){let G=Number.parseInt($[1],10);if(Q===G)return $[2];continue}let Y=Z.match(/^\[(\d+),(\d+|\*)\]\s*(.*)$/);if(Y){let G=Number.parseInt(Y[1],10),X=Y[2]==="*"?Number.POSITIVE_INFINITY:Number.parseInt(Y[2],10);if(Q>=G&&Q<=X)return Y[3];continue}}if(q.length===2)return Q===1?q[0].trim():q[1].trim();if(Q<q.length)return q[Q].trim();return q[q.length-1].trim()}function gJ(q,Q={}){return Pq(q,Q)}function Pq(q,Q){let J="",Z=0;while(Z<q.length)if(q[Z]==="{"){let $=fJ(q,Z);if($===-1){J+=q[Z],Z++;continue}let Y=q.slice(Z+1,$);J+=hJ(Y,Q),Z=$+1}else if(q[Z]==="'"&&Z+1<q.length)if(q[Z+1]==="'")J+="'",Z+=2;else if(q[Z+1]==="{"||q[Z+1]==="}")J+=q[Z+1],Z+=2;else J+=q[Z],Z++;else J+=q[Z],Z++;return J}function fJ(q,Q){let J=0;for(let Z=Q;Z<q.length;Z++)if(q[Z]==="{")J++;else if(q[Z]==="}"){if(J--,J===0)return Z}return-1}function hJ(q,Q){let J=uJ(q);if(J.length===0)return`{${q}}`;let Z=J[0].trim(),$=Q[Z];if(J.length===1)return $!==void 0?String($):`{${Z}}`;switch(J[1].trim().toLowerCase()){case"plural":return dJ($,J.slice(2).join(","),Q);case"select":return mJ($,J.slice(2).join(","));case"selectordinal":return cJ($,J.slice(2).join(","));case"number":return iJ($,J[2]?.trim());case"date":return sJ($,J[2]?.trim());case"time":return nJ($,J[2]?.trim());default:return $!==void 0?String($):`{${q}}`}}function uJ(q){let Q=[],J="",Z=0;for(let $=0;$<q.length;$++){let Y=q[$];if(Y==="{")Z++,J+=Y;else if(Y==="}")Z--,J+=Y;else if(Y===","&&Z===0)Q.push(J),J="";else J+=Y}if(J)Q.push(J);return Q}function dJ(q,Q,J){let Z=Number(q)||0,$=e(Q),Y=`=${Z}`;if($[Y])return n($[Y],Z,J);let G=pJ(Z);if($[G])return n($[G],Z,J);if($.other)return n($.other,Z,J);return String(Z)}function n(q,Q,J){let Z=q.replace(/#/g,String(Q));return Pq(Z,J)}function pJ(q){let Q=Math.abs(q),J=Math.floor(Q),Z=String(q).includes(".")?String(q).split(".")[1].length:0;if(J===1&&Z===0)return"one";return"other"}function mJ(q,Q){let J=String(q||""),Z=e(Q);if(Z[J])return Z[J];return Z.other||String(q)}function cJ(q,Q){let J=Number(q)||0,Z=e(Q),$=lJ(J);if(Z[$])return Z[$].replace(/#/g,String(J));if(Z.other)return Z.other.replace(/#/g,String(J));return String(J)}function lJ(q){let Q=Math.abs(q),J=Q%10,Z=Q%100;if(J===1&&Z!==11)return"one";if(J===2&&Z!==12)return"two";if(J===3&&Z!==13)return"few";return"other"}function e(q){let Q={},J=/(\w+|=\d+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g,Z=J.exec(q);while(Z!==null)Q[Z[1]]=Z[2],Z=J.exec(q);return Q}function iJ(q,Q){let J=Number(q);if(Number.isNaN(J))return String(q);switch(Q){case"integer":return Math.floor(J).toLocaleString();case"percent":return`${(J*100).toFixed(0)}%`;case"currency":return J.toLocaleString(void 0,{style:"currency",currency:"USD"});default:return J.toLocaleString()}}function sJ(q,Q){let J=q instanceof Date?q:new Date(String(q));if(Number.isNaN(J.getTime()))return String(q);let Z={};switch(Q){case"short":Z.dateStyle="short";break;case"medium":Z.dateStyle="medium";break;case"long":Z.dateStyle="long";break;case"full":Z.dateStyle="full";break;default:Z.dateStyle="medium"}return J.toLocaleDateString(void 0,Z)}function nJ(q,Q){let J=q instanceof Date?q:new Date(String(q));if(Number.isNaN(J.getTime()))return String(q);let Z={};switch(Q){case"short":Z.timeStyle="short";break;case"medium":Z.timeStyle="medium";break;case"long":Z.timeStyle="long";break;case"full":Z.timeStyle="full";break;default:Z.timeStyle="short"}return J.toLocaleTimeString(void 0,Z)}function rJ(q){return/\{[^}]+,\s*(?:plural|select|selectordinal|number|date|time)\s*,/.test(q)}function a(q,Q,J=!0,Z={}){let $=q.split("."),Y=Q;for(let X of $){if(Y===void 0||Y===null)break;Y=Y[X]}if(Y===void 0||Y===null)return J?q:"";let G=String(Y);if(rJ(G))return gJ(G,Z);if(G.includes("|")&&"count"in Z){let X=Number(Z.count),H=G.split("|");G=xJ(H,X)}for(let[X,H]of Object.entries(Z)){let W=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");G=G.replace(new RegExp(`:${W}`,"g"),String(H))}return G}var Tq=new Set(["ar","arc","ckb","dv","fa","he","khw","ks","nqo","prs","ps","sd","syr","ug","ur","uz-af","yi"]),oJ=new Set(["adlm","arab","aran","hebr","nkoo","rohg","syrc","thaa","yezi"]);function qq(q){if(!q)return"ltr";let Q=q.trim().toLowerCase().replace(/_/g,"-").split("-"),J=Q[0];if(!J)return"ltr";let Z=Q[1]?.length===4?Q[1]:void 0;if(Z)return oJ.has(Z)?"rtl":"ltr";if(Q.length>1&&Tq.has(`${J}-${Q[1]}`))return"rtl";return Tq.has(J)?"rtl":"ltr"}function nQ(q){return qq(q)==="rtl"}async function rQ(q,Q,J,Z){let $=q,Y=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)([\s\S]*?)@endtranslate/g,G={...t,...Z.i18n},X=await vJ(G.locale,Z);Q.__translations=X,Q.__locale=G.locale,Q.__i18nConfig=G,$=await Rq($,Y,async(B,V,w,M,j)=>{try{let D={};if(w)try{let F=[()=>JSON.parse(w),()=>{let I=`{"data":${w}}`,R=JSON.parse(I);return typeof R.data==="object"?R.data:{}},()=>{return s(w,Q)}];for(let I of F)try{if(D=I(),Object.keys(D).length>0)break}catch{}}catch(F){if(Z.debug)console.error("Error parsing parameters for @translate directive:",F)}return a(V,X,G.fallbackToKey,D)||M.trim()}catch(D){if(Z.debug)console.error("Error processing @translate directive:",D);return y("Translate",`Error in @translate('${V}'): ${D instanceof Error?D.message:String(D)}`,U.EVALUATION_ERROR)}});let H=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]+\})\s*)?\)/g;if(Z.debug){console.warn(`Processing translations in template. Sections: ${$.includes("<h2>Translation with Parameters</h2>")?"Parameters section found":"Parameters section missing"}`);let B=[...$.matchAll(H)];console.warn(`Found ${B.length} @translate matches`),B.forEach((V,w)=>console.warn(`Match ${w}: ${V[0]}, Key: ${V[1]}, Params: ${V[2]||"none"}`))}return $=await Rq($,/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)/g,async(B,V,w,M)=>{try{let j={};if(w)try{let D=[()=>JSON.parse(w),()=>{let K=`{"data":${w}}`,F=JSON.parse(K);return typeof F.data==="object"?F.data:{}},()=>{return s(w,Q)}];for(let K of D)try{if(j=K(),Object.keys(j).length>0)break}catch{}}catch(D){if(Z.debug)console.error("Error parsing parameters for @translate directive:",D)}return a(V,X,G.fallbackToKey,j)}catch(j){if(Z.debug)console.error("Error processing @translate directive:",j);return y("Translate",`Error in @translate('${V}'): ${j instanceof Error?j.message:String(j)}`,U.EVALUATION_ERROR)}}),$}async function Rq(q,Q,J){let Z=[];return q.replace(Q,(Y,...G)=>{let X=J(Y,...G).then((H)=>({match:Y,replacement:H}));return Z.push(X),Y}),(await Promise.all(Z)).reduce((Y,{match:G,replacement:X})=>Y.replace(G,X),q)}function oQ(q,Q=!0){return(J,Z={})=>{return a(J,q,Q,Z)}}import Sq from"path";function Jq(q,Q){if(!q||qq(q)!=="rtl")return!1;return!Q||Q.trim().toLowerCase()!=="rtl"}function Eq(q){if(!q)return!1;return q.trim().split(/\s+/)[0]?.toLowerCase()==="presentation"||q.trim().split(/\s+/)[0]?.toLowerCase()==="none"}function S(q,Q){let J=new RegExp(`\\b${Q}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(q);if(!J)return null;return J[2]??J[3]??J[4]??null}function JZ(q,Q,J,Z){let $=q;$=$.replace(/@a11y\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(G,X,H)=>{let B={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[X]||"Make this element accessible";return`<!-- a11y-hint: ${H||B} -->`});let Y=/@screenReader\(([^@]*)\)@endScreenReader/g;return $=$.replace(Y,(G,X)=>{return`<span class="sr-only">${X.trim()}</span>`}),$=$.replace(/@ariaDescribe\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(G,X,H)=>{return`<span id="${`desc-${X}`}" class="sr-only">${H}</span>`}),$}function QZ(){return`
48
- .sr-only {
49
- position: absolute;
50
- width: 1px;
51
- height: 1px;
52
- padding: 0;
53
- margin: -1px;
54
- overflow: hidden;
55
- clip: rect(0, 0, 0, 0);
56
- white-space: nowrap;
57
- border-width: 0;
58
- }
59
- `.trim()}function aJ(){return typeof globalThis.document<"u"&&typeof globalThis.document.createElement==="function"}function Cq(q){let Q=new Map,J=q.replace(/<(\/?)([A-Z][\w:.-]*)(?=[\s/>])/g,($,Y,G)=>{let X=Q.get(G);if(!X)X=`stx-a11y-component-${Q.size}`,Q.set(G,X);return`<${Y}${X}`}),Z=new Map([...Q.entries()].map(([$,Y])=>[Y,$]));return{protectedSource:J,restore:($)=>$.replace(/<(\/?)(stx-a11y-component-\d+)(?=[\s/>])/g,(Y,G,X)=>{let H=Z.get(X);return H?`<${G}${H}`:Y})}}function tJ(q,Q){let J=[],Z=/<img\s+([^>]*)>/gi,$;$=Z.exec(q);while($!==null){let F=$[1];if(!/\balt\s*=/i.test(F))J.push({type:"missing-alt",element:$[0].substring(0,100),message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"});$=Z.exec(q)}let Y=/<button([^>]*)>\s*<\/button>/gi;$=Y.exec(q);while($!==null){let F=$[1];if(!/\baria-label\s*=/i.test(F)&&!/\btitle\s*=/i.test(F))J.push({type:"missing-accessible-name",element:$[0].substring(0,100),message:"Empty button missing accessible name",impact:"critical",help:"Add text content, aria-label, or title",helpUrl:"https://web.dev/learn/accessibility/aria-html/"});$=Y.exec(q)}let G=/<a\s+([^>]*)>\s*<\/a>/gi;$=G.exec(q);while($!==null){let F=$[1];if(!/\baria-label\s*=/i.test(F)&&!/\btitle\s*=/i.test(F))J.push({type:"link-missing-text",element:$[0].substring(0,100),message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"});$=G.exec(q)}let X=/<(input|select|textarea)\s+([^>]*)>/gi;$=X.exec(q);while($!==null){let F=$[2];if(/\btype\s*=\s*["']hidden["']/i.test(F)){$=X.exec(q);continue}let I=/\baria-label\s*=/i.test(F)||/\baria-labelledby\s*=/i.test(F),R=F.match(/\bid\s*=\s*["']([^"']+)["']/i);if(!I){let yq=R&&new RegExp(`<label[^>]*\\bfor\\s*=\\s*["']${R[1]}["']`,"i").test(q),Qq=$.index,Zq=q.substring(0,Qq),YQ=q.substring(Qq),vq=(Zq.match(/<label\b/gi)||[]).length,xq=(Zq.match(/<\/label>/gi)||[]).length,gq=vq>xq;if(!yq&&!gq)J.push({type:"input-missing-label",element:$[0].substring(0,100),message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})}$=X.exec(q)}let H=/<h([1-6])[^>]*>/gi,W=[];$=H.exec(q);while($!==null)W.push(Number.parseInt($[1],10)),$=H.exec(q);let B=0;for(let F of W){if(B>0&&F>B+1)J.push({type:"heading-skip",element:`<h${F}>`,message:`Heading level skipped from h${B} to h${F}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});B=F}if(/<html\b/i.test(q)&&!/<html[^>]*\slang\s*=/i.test(q))J.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});let V=q.match(/<html\b([^>]*)>/i);if(V&&Jq(S(V[1],"lang"),S(V[1],"dir")))J.push({type:"missing-dir",element:V[0].substring(0,100),message:'Document language is right-to-left but dir="rtl" is not set',impact:"serious",help:'Add dir="rtl" to the html element so the layout mirrors the text',helpUrl:"https://www.w3.org/International/questions/qa-html-dir"});let w=/<table([^>]*)>([\s\S]*?)<\/table>/gi;$=w.exec(q);while($!==null){let F=$[2];if(!Eq(S($[1],"role"))&&!/<th\b/i.test(F))J.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});$=w.exec(q)}let M=/<(video|audio)[^>]*\sautoplay\s[^>]*>/gi;$=M.exec(q);while($!==null){if(!/\bmuted\b/i.test($[0]))J.push({type:"autoplay-audio",element:`<${$[1]}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"});$=M.exec(q)}let j=/\btabindex\s*=\s*["']([1-9]\d*)["']/gi;$=j.exec(q);while($!==null)J.push({type:"positive-tabindex",element:`tabindex="${$[1]}"`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"}),$=j.exec(q);let D=/<iframe\s+([^>]*)>/gi;$=D.exec(q);while($!==null){let F=$[1];if(!/\btitle\s*=/i.test(F)&&!/\baria-label\s*=/i.test(F))J.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"});$=D.exec(q)}let K=/<([a-z]+)\s+([^>]*role\s*=\s*["']button["'][^>]*)>/gi;$=K.exec(q);while($!==null){let F=$[1].toLowerCase(),I=$[2];if(F!=="button"&&!/\btabindex\s*=/i.test(I))J.push({type:"button-not-focusable",element:$[0].substring(0,100),message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"});$=K.exec(q)}return J}async function eJ(q,Q){let{protectedSource:J}=Cq(q);if(!aJ())return tJ(J,Q);let Z=[];try{let $=globalThis.document.createElement("div");$.innerHTML=J,$.querySelectorAll("img").forEach((H)=>{if(!H.hasAttribute("alt"))Z.push({type:"missing-alt",element:`<${H.outerHTML}>`,message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"})}),$.querySelectorAll('button, a, [role="button"]').forEach((H)=>{if(!(H.hasAttribute("aria-label")||H.hasAttribute("aria-labelledby")||H.textContent&&H.textContent.trim().length>0))Z.push({type:"missing-accessible-name",element:`<${H.outerHTML}>`,message:"Interactive element missing accessible name",impact:"critical",help:"Add text content, aria-label, or aria-labelledby",helpUrl:"https://web.dev/learn/accessibility/aria-html/"})}),$.querySelectorAll("input, select, textarea").forEach((H)=>{let W=H.getAttribute("id"),B=W&&$.querySelector(`label[for="${W}"]`),V=H.hasAttribute("aria-label")||H.hasAttribute("aria-labelledby"),w=H.closest("label")!==null;if(!B&&!V&&!w)Z.push({type:"input-missing-label",element:`<${H.outerHTML}>`,message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})});let Y=Array.from($.querySelectorAll("h1, h2, h3, h4, h5, h6")),G=0;for(let H of Y){let W=Number.parseInt(H.tagName.charAt(1));if(G>0&&W>G+1)Z.push({type:"heading-skip",element:`<${H.outerHTML}>`,message:`Heading level skipped from h${G} to h${W}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});G=W}let X=$.querySelector("html");if(J.includes("<html")&&X&&!X.hasAttribute("lang"))Z.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});if(X&&Jq(X.getAttribute("lang"),X.getAttribute("dir")))Z.push({type:"missing-dir",element:"<html>",message:'Document language is right-to-left but dir="rtl" is not set',impact:"serious",help:'Add dir="rtl" to the html element so the layout mirrors the text',helpUrl:"https://www.w3.org/International/questions/qa-html-dir"});if($.querySelectorAll("a").forEach((H)=>{let W=H.textContent&&H.textContent.trim().length>0,B=H.hasAttribute("aria-label")||H.hasAttribute("aria-labelledby"),V=H.hasAttribute("title"),w=H.querySelector("img[alt]");if(!W&&!B&&!V&&!w)Z.push({type:"link-missing-text",element:`<${H.outerHTML}>`,message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"})}),J.includes("<nav")||J.includes("<header")){if(!$.querySelector('a[href="#main"], a[href="#content"], .skip-link, [class*="skip"]')&&$.querySelectorAll("a").length>5)Z.push({type:"missing-skip-link",element:"<nav>",message:"Consider adding a skip navigation link",impact:"minor",help:"Add a skip link to allow keyboard users to bypass navigation",helpUrl:"https://web.dev/learn/accessibility/focus/#skip-links"})}if($.querySelectorAll("table").forEach((H)=>{if(Eq(H.getAttribute("role")))return;let W=H.querySelector("caption");if(!H.querySelector("th"))Z.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});if(!W&&!H.hasAttribute("aria-label")&&!H.hasAttribute("aria-labelledby"))Z.push({type:"table-missing-caption",element:"<table>",message:"Table missing caption or accessible name",impact:"minor",help:"Add a caption element or aria-label to describe the table",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"})}),$.querySelectorAll('[style*="color"]').forEach((H)=>{let W=H.getAttribute("style")||"";if(W.includes("color:")&&!W.includes("background"))Z.push({type:"potential-contrast-issue",element:`<${H.tagName.toLowerCase()}>`,message:"Element has inline color style - verify contrast ratio",impact:"minor",help:"Ensure text has sufficient contrast ratio (4.5:1 for normal text)",helpUrl:"https://web.dev/learn/accessibility/color-contrast/"})}),$.querySelectorAll("video[autoplay], audio[autoplay]").forEach((H)=>{if(!H.hasAttribute("muted"))Z.push({type:"autoplay-audio",element:`<${H.tagName.toLowerCase()}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"})}),$.querySelectorAll("[tabindex]").forEach((H)=>{if(Number.parseInt(H.getAttribute("tabindex")||"0")>0)Z.push({type:"positive-tabindex",element:`<${H.tagName.toLowerCase()}>`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"})}),$.querySelectorAll('[role="button"]').forEach((H)=>{if(!H.hasAttribute("tabindex"))Z.push({type:"button-not-focusable",element:`<${H.outerHTML}>`,message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"})}),J.includes("<body")&&!$.querySelector('main, [role="main"]'))Z.push({type:"missing-main-landmark",element:"<body>",message:"Document missing main landmark region",impact:"moderate",help:"Add a main element to identify the primary content",helpUrl:"https://web.dev/learn/accessibility/structure/#landmarks"});$.querySelectorAll("iframe").forEach((H)=>{if(!H.hasAttribute("title")&&!H.hasAttribute("aria-label"))Z.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"})})}catch($){console.error(`Error checking accessibility in ${Q}:`,$)}return Z}async function qQ(q,Q={}){let J={},{recursive:Z=!0,ignorePaths:$=[]}=Q,Y=Array.isArray(q)?q:[q],G=await bq(Y,{recursive:Z,ignorePaths:$}),X=[];for(let H of G)try{let W=await Bun.file(H).text();if(H.endsWith("good-a11y.stx"))continue;let B=await eJ(W,H);if(X.push(H),B.length>0)J[H]=B}catch(W){console.error(`Error scanning ${H}:`,W)}return{results:J,scannedFiles:X}}async function ZZ(q,Q={}){return(await qQ(q,Q)).results}var JQ={fixMissingAlt:!0,fixMissingLabels:!0,fixMissingFormLabels:!0,fixTableHeaders:!0,fixMissingLang:!0,fixMissingDir:!0,fixPositiveTabindex:!0,fixButtonFocusable:!0,defaultLang:"en"};function QQ(q,Q={}){let J={...JQ,...Q},Z=[],{protectedSource:$,restore:Y}=Cq(q),G=$;if(J.fixMissingAlt)G=G.replace(/<img([^>]*?)(?<!\balt\s*=\s*["'][^"']*["'])(\s*\/?>)/gi,(X,H,W)=>{if(/\balt\s*=/i.test(H))return X;let B=X,V=`<img${H} alt=""${W}`;return Z.push({type:"missing-alt",description:"Added empty alt attribute to image",before:B,after:V}),V});if(J.fixMissingLabels)G=G.replace(/<button([^>]*)>\s*<\/button>/gi,(X,H)=>{if(/\baria-label\s*=/i.test(H)||/\btitle\s*=/i.test(H))return X;let W=X,B=`<button${H} aria-label="Button"></button>`;return Z.push({type:"missing-accessible-name",description:"Added aria-label to empty button",before:W,after:B}),B}),G=G.replace(/<a([^>]*)>\s*(<(?:i|span|svg)[^>]*(?:class="[^"]*icon[^"]*")?[^>]*>.*?<\/(?:i|span|svg)>)?\s*<\/a>/gi,(X,H,W)=>{if(/\baria-label\s*=/i.test(H)||/\btitle\s*=/i.test(H))return X;if(!W&&X.replace(/<a[^>]*>|<\/a>/gi,"").trim())return X;let B=X,V=`<a${H} aria-label="Link">${W||""}</a>`;return Z.push({type:"missing-accessible-name",description:"Added aria-label to link without text",before:B,after:V}),V});if(J.fixMissingFormLabels)G=G.replace(/<(input|select|textarea)([^>]*)>/gi,(X,H,W)=>{if(/\baria-label\s*=/i.test(W)||/\baria-labelledby\s*=/i.test(W))return X;if(/\btype\s*=\s*["']hidden["']/i.test(W))return X;let B=W.match(/\bname\s*=\s*["']([^"']+)["']/i),V=W.match(/\bid\s*=\s*["']([^"']+)["']/i),w=B?.[1]||V?.[1]||H,M=X,j=`<${H}${W} aria-label="${w}">`;return Z.push({type:"input-missing-label",description:`Added aria-label to ${H} element`,before:M,after:j}),j});if(J.fixMissingLang)G=G.replace(/<html([^>]*)>/gi,(X,H)=>{if(/\blang\s*=/i.test(H))return X;let W=X,B=`<html${H} lang="${J.defaultLang}">`;return Z.push({type:"missing-lang",description:`Added lang="${J.defaultLang}" to html element`,before:W,after:B}),B});if(J.fixMissingDir)G=G.replace(/<html([^>]*)>/gi,(X,H)=>{let W=S(H,"lang");if(!Jq(W,S(H,"dir")))return X;let B=/\bdir\s*=/i.test(H)?`<html${H.replace(/\bdir\s*=\s*(["'])[^"']*\1/i,'dir="rtl"')}>`:`<html${H} dir="rtl">`;return Z.push({type:"missing-dir",description:`Added dir="rtl" to html element (lang="${W}" is right-to-left)`,before:X,after:B}),B});if(J.fixPositiveTabindex)G=G.replace(/\btabindex\s*=\s*["']([1-9]\d*)["']/gi,(X,H)=>{let W=X,B='tabindex="0"';return Z.push({type:"positive-tabindex",description:`Changed tabindex="${H}" to tabindex="0"`,before:W,after:'tabindex="0"'}),'tabindex="0"'});if(J.fixButtonFocusable)G=G.replace(/<([a-z]+)(\s[^>]*role\s*=\s*["']button["'][^>]*)>/gi,(X,H,W)=>{if(/\btabindex\s*=/i.test(W))return X;if(H.toLowerCase()==="button")return X;let B=X,V=`<${H}${W} tabindex="0">`;return Z.push({type:"button-not-focusable",description:'Added tabindex="0" to element with role="button"',before:B,after:V}),V});if(J.fixTableHeaders)G=G.replace(/<th([^>]*)>/gi,(X,H)=>{if(/\bscope\s*=/i.test(H))return X;let W=X,B=`<th${H} scope="col">`;return Z.push({type:"table-missing-scope",description:'Added scope="col" to table header',before:W,after:B}),B});return{original:q,fixed:Y(G),fixCount:Z.length,fixes:Z}}async function ZQ(q,Q={},J=!1){let Z=await Bun.file(q).text(),$=QQ(Z,Q);if(J&&$.fixCount>0)await Bun.write(q,$.fixed);return $}async function $Z(q,Q={},J={}){let Z={},{recursive:$=!0,ignorePaths:Y=[],writeBack:G=!1,extensions:X=[".stx",".html",".htm"]}=J,H=X.length===1?`*${X[0]}`:`*{${X.join(",")}}`,W=Sq.join(q,$?`**/${H}`:H),B=new Bun.Glob(W);for await(let V of B.scan()){if(Y.some((M)=>V.includes(Sq.normalize(M))))continue;try{let M=await ZQ(V,Q,G);if(M.fixCount>0)Z[V]=M}catch(M){console.error(`Error fixing ${V}:`,M)}}return Z}var $Q={name:"a11y",handler:(q,Q,J,Z)=>{if(!Q.length)return q;let $=Q[0].replace(/['"]/g,""),Y=Q.length>1?Q[1].replace(/['"]/g,""):"",X={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[$]||"Make this element accessible";return`<!-- a11y-hint: ${Y||X} -->${q}`},hasEndTag:!1},XQ={name:"screenReader",handler:(q)=>{return`<span class="sr-only">${q}</span>`},hasEndTag:!0};function XZ(){return[$Q,XQ]}
60
- export{hq as Kr,uq as Lr,dq as Mr,pq as Nr,Xq as Or,mq as Pr,U as Qr,u as Rr,cq as Sr,L as Tr,GQ as Ur,iq as Vr,E as Wr,sq as Xr,C as Yr,N as Zr,Hq as _r,Gq as $r,Wq as as,Bq as bs,Vq as cs,d as ds,y as es,eq as fs,qJ as gs,JJ as hs,QJ as is,ZJ as js,p as ks,$J as ls,XJ as ms,c as ns,v as os,HJ as ps,GJ as qs,WJ as rs,Mq as ss,SQ as ts,KJ as us,_J as vs,bQ as ws,s as xs,EQ as ys,AJ as zs,NJ as As,CQ as Bs,t as Cs,fQ as Ds,hQ as Es,uQ as Fs,dQ as Gs,pQ as Hs,LJ as Is,mQ as Js,h as Ks,PJ as Ls,cQ as Ms,lQ as Ns,iQ as Os,sQ as Ps,vJ as Qs,gJ as Rs,rJ as Ss,a as Ts,qq as Us,nQ as Vs,rQ as Ws,oQ as Xs,Eq as Ys,S as Zs,JZ as _s,QZ as $s,aJ as at,tJ as bt,eJ as ct,qQ as dt,ZZ as et,QQ as ft,ZQ as gt,$Z as ht,$Q as it,XQ as jt,XZ as kt};
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{$f as e}from"./chunk-gdbkqatx.js";import{Fg as EF,tg as t,vg as kF,wg as UF,xg as wF}from"./chunk-ke88kpva.js";import{Ig as BF}from"./chunk-dvvx1wny.js";import{yj as l,zj as d}from"./chunk-71y3bhcw.js";import{Mk as HF,Nk as IF,Ok as KF}from"./chunk-4jdj52c5.js";import{wl as YF,yl as ZF}from"./chunk-p1hy2bwn.js";import{$m as s,Br as o,Dr as M,Fp as $F,Up as GF,aq as VF,eq as r,um as p,vo as zF,wm as i}from"./chunk-kxtqbrfr.js";import{fu as qF}from"./chunk-kffndzch.js";import{xu as XF}from"./chunk-r8rbf28v.js";import{Fu as WF}from"./chunk-n66k2v2q.js";import{Ku as QF}from"./chunk-vvd659y4.js";import{gw as h,iw as _F}from"./chunk-hzfd8cz0.js";import G from"fs";import q from"path";import{createHash as NF}from"crypto";_F();function u(Q){return NF("sha256").update(Q).digest("hex").slice(0,8)}function c(Q=!1){let z=Q?d():l(),Z=u(z);return{content:z,filename:`runtime.${Z}.js`,hash:Z}}function a(){let Q=h(),z=u(Q);return{content:Q,filename:`router.${z}.js`,hash:z}}function bF(Q){return{runtimeTag:Q.runtime?`<script src="/__stx/${Q.runtime.filename}"></script>`:"",routerTag:Q.router?`<script src="/__stx/${Q.router.filename}"></script>`:"",cssTag:Q.css?`<link rel="stylesheet" href="/__stx/${Q.css.filename}">`:""}}import n from"path";import{createHash as OF}from"crypto";function TF(Q={}){let z=new Set;return{context:new Proxy(Q,{get(X,F){if(F in X)return X[F];if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return},has(X,F){if(F in X)return!0;if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return!1}}),accessedKeys:z}}async function FF(Q,z,Z={}){let X=n.resolve(Q),F=await Bun.file(X).text(),U=OF("sha256").update(F).digest("hex").slice(0,16);p();let w={};try{w=await M(Z.configDir)}catch{}let H=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(F))!==null){let E=k[1];if(/\bserver\b/.test(E))H.push(k[2])}let W=new Set(H.flatMap((E)=>e(E))),{context:_}=TF({__filename:X,__dirname:n.dirname(X),__stx_serverDeclared:W}),N=new Set,x={...o,...w,...Z,buildMode:"compile",strict:!1},I=await r(F,_,X,x,N),O=t(I),j=i();return{route:z,sourceFile:Q,html:I,fragment:O,placeholders:j,hasServerScripts:H.length>0,serverScriptContent:H,dependencies:Array.from(N),contentHash:U,status:s(F),streamTemplates:_.__streamTemplates}}var MF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function JF(Q,z){let Z=0,X=0;if(!G.existsSync(Q))return{copied:Z,bytes:X};G.mkdirSync(z,{recursive:!0});function F(U,w){let H=G.readdirSync(U,{withFileTypes:!0});for(let V of H){if(MF.has(V.name))continue;let k=q.join(U,V.name),W=q.join(w,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),F(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),Z++,X+=G.statSync(W).size}}}return F(Q,z),{copied:Z,bytes:X}}async function qJ(Q={}){let z=Date.now(),Z=q.resolve(Q.root||process.cwd()),X=q.resolve(Z,Q.outputDir||".output");console.log("[stx build] Starting production build...");let F=await M(Z),U=q.resolve(Z,Q.componentsDir??F.componentsDir??"components"),w=q.resolve(Z,Q.partialsDir??F.partialsDir??"partials"),H=q.resolve(Z,Q.layoutsDir??F.layoutsDir??"layouts"),V=Q.publicDir??F.publicDir??"public",k=F.app?.head||{},W=F.app?.colorMode,_=F.router?.container||"main",N=Q.routeRules??F.routeRules??{},x=BF(N),I=Q.serverApi??F.serverApi,O=typeof I==="object"?I:{};if(I)YF(Z,O);if(F.runtimeConfig)QF(F.runtimeConfig,{});if(G.existsSync(X))G.rmSync(X,{recursive:!0});let j=[q.join(X,"public","__stx"),q.join(X,"public","assets"),q.join(X,"server","pages"),q.join(X,"server","fragments")];for(let Y of j)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let E=zF(Z,{pagesDirs:F._layerPageDirs}),LF=["components","layouts","partials"],y=E.filter((Y)=>{return!LF.some((B)=>Y.pattern.startsWith(`/${B}/`)||Y.pattern===`/${B}`)});console.log(`[stx build] Found ${y.length} page routes (${E.length-y.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let L=c(Q.debug),K=a();await Bun.write(q.join(X,"public","__stx",L.filename),L.content),await Bun.write(q.join(X,"public","__stx",K.filename),K.content),console.log(`[stx build] Runtime: ${L.filename} (${(L.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${K.filename} (${(K.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let R=[],v=[];for(let Y of y){let B=x(Y.pattern),b=B.rendering==="prerender";if(b&&(Y.pattern.includes(":")||Y.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${Y.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let J=await FF(Y.filePath,Y.pattern,{configDir:Z,componentsDir:U,partialsDir:w,layoutsDir:H,debug:Q.debug});if(R.push(J),J.html=J.html.replace(/runtime\.__STX_HASH__\.js/g,L.filename).replace(/router\.__STX_HASH__\.js/g,K.filename),J.html=VF(J.html,k,{bodyScripts:[`<script src="/__stx/${K.filename}"></script>`],...W&&{colorMode:W}}),W)J.html=$F(J.html,W);if(k.htmlAttrs)J.html=GF(J.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(J.html)){let $=J.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if($&&$[1]){let m=$[1];J.html=J.html.replace(" "+m,""),J.html=J.html.replace(/<body([^>]*)>/,`<body$1 ${m}>`)}}if(J.html=J.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),J.html=await qF(J.html),b){let $=await EF(J,{params:{},request:new Request(`http://stx.build${Y.pattern}`),method:"GET",__stx_strict_hydration:!0});if($.redirect||$.cookies?.length||$.boundaries?.length||$.headers&&Object.keys($.headers).length)throw Error(`Prerendered route ${Y.pattern} cannot set response headers/cookies, redirect or stream`);J.html=$.html,J.status=$.status??J.status,J.hasServerScripts=!1,J.serverScriptContent=[],J.placeholders={}}J.fragment=kF(J.html,_);let C=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),g=q.join("server","pages",`${C}.compiled.json`),f=q.join("server","fragments",`${C}.html`);await Bun.write(q.join(X,g),JSON.stringify(J,null,2)),await Bun.write(q.join(X,f),J.fragment),v.push({pattern:Y.pattern,compiledPath:g,fragmentPath:f,isDynamic:J.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("["),prerendered:b}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(J){if(Object.keys(B).length)throw J;console.error(`[stx build] \u2717 ${Y.pattern}:`,J instanceof Error?J.message:J)}}let P=q.resolve(Z,V);if(G.existsSync(P)){let{copied:Y,bytes:B}=JF(P,q.join(X,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${V}/`)}let A=KF(Z);if(A){let{copied:Y,bytes:B}=JF(A,q.join(X,"public",IF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${HF}/`)}let S={runtime:L.filename,router:K.filename},T=UF(v,S,X);if(T.routeRules=N,T.routerContainer=_,I)T.apiRoutes=await ZF(Z,X,O);if(F.runtimeConfig)await Bun.write(q.join(X,"server/runtime-config.json"),JSON.stringify(F.runtimeConfig)),await WF(Z,F.runtimeConfig);if(F._layerGraph)await Bun.write(q.join(X,"server/layers.json"),JSON.stringify(XF(F._layerGraph),null,2));wF(T,X);let D=Date.now()-z;return console.log(`
3
- [stx build] Done in ${D}ms \u2014 ${R.length} pages compiled`),{pageCount:R.length,assets:S,outputDir:X,duration:D}}
4
- export{u as Rf,c as Sf,a as Tf,bF as Uf,FF as Vf,qJ as Wf};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Po as a,Qo as b,Ro as c,So as d,To as e,Uo as f,Vo as g,Wo as h,Xo as i,Yo as j}from"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{b as stripTypeScript,h as splitDeclaration,c as isModuleResolutionFailure,d as isMissingBindingFailure,f as isCompleteImport,j as hasVariables,e as extractVariables,i as extractScriptFromTemplate,g as convertToCommonJS,a as STX_ENGINE_BINDING_NAMES};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$ as Xl,$a as $n,$b as kp,$c as kq,$d as kr,A as Hk,Aa as ln,Ab as Fo,Ac as Lp,Ad as Lq,Ae as Rr,B as Ik,Ba as mn,Bb as Go,Bc as Mp,Bd as Mq,Be as Sr,C as Jk,Ca as zn,Cb as Ho,Cc as Np,Cd as Nq,Ce as Tr,D as Kk,Da as An,Db as Io,Dc as Op,Dd as Oq,De as Ur,E as Al,Ea as Bn,Eb as Jo,Ec as Pp,Ed as Pq,Ee as Vr,F as Bl,Fa as Cn,Fb as Ko,Fc as Qp,Fd as Qq,Fe as Wr,G as Cl,Ga as Dn,Gb as Lo,Gc as Rp,Gd as Rq,Ge as Xr,H as Dl,Ha as En,Hb as Mo,Hc as Sp,Hd as Sq,He as Yr,I as El,Ia as In,Ib as No,Ic as Tp,Id as Tq,Ie as Zr,J as Fl,Ja as Jn,Jb as Oo,Jc as Up,Jd as Uq,Je as _r,K as Gl,Ka as Kn,Kb as Po,Kc as Vp,Kd as Vq,Ke as $r,L as Hl,La as Ln,Lb as Qo,Lc as Wp,Ld as Wq,M as Il,Ma as Mn,Mb as Ro,Mc as Xp,Md as Xq,N as Jl,Na as Nn,Nb as Yo,Nc as Yp,Nd as Yq,O as Kl,Oa as On,Ob as Zo,Oc as Zp,Od as Zq,P as Ll,Pa as Pn,Pb as _o,Pc as _p,Pd as _q,Q as Ml,Qa as Qn,Qb as $o,Qc as $p,Qd as $q,R as Nl,Ra as Rn,Rb as ap,Rc as aq,Rd as ar,S as Ol,Sa as Sn,Sb as bp,Sc as bq,Sd as br,T as Pl,Ta as Tn,Tb as cp,Tc as cq,Td as cr,U as Ql,Ua as Un,Ub as dp,Uc as dq,Ud as dr,V as Rl,Va as Vn,Vb as ep,Vc as eq,Vd as er,W as Sl,Wa as Wn,Wb as fp,Wc as fq,Wd as fr,X as Tl,Xa as Xn,Xb as gp,Xc as gq,Xd as gr,Y as Ul,Ya as Yn,Yb as hp,Yc as hq,Yd as hr,Z as Vl,Za as Zn,Zb as ip,Zc as iq,Zd as ir,_ as Wl,_a as _n,_b as jp,_c as jq,_d as jr,aa as Yl,ab as ao,ac as lp,ad as lq,ae as lr,ba as Zl,bb as bo,bc as mp,bd as mq,be as sr,ca as _l,cb as co,cc as np,cd as nq,ce as tr,da as $l,db as eo,dc as op,dd as oq,de as ur,ea as am,eb as fo,ec as pp,ed as pq,ee as vr,fa as bm,fb as go,fc as qp,fd as qq,fe as wr,ga as cm,gb as ho,gc as rp,gd as rq,ge as xr,ha as dm,hb as io,hc as sp,hd as sq,he as yr,ia as em,ib as jo,ic as tp,id as tq,ie as zr,ja as fm,jb as ko,jc as up,jd as uq,je as Ar,ka as gm,kb as lo,kc as vp,kd as vq,ke as Br,la as hm,lb as mo,lc as wp,ld as wq,le as Cr,ma as im,mb as no,mc as xp,md as xq,me as Dr,na as jm,nb as qo,nc as yp,nd as yq,ne as Er,o as a,oa as km,ob as ro,oc as zp,od as zq,oe as Fr,p as sk,pa as $m,pb as so,pc as Ap,pd as Aq,pe as Gr,q as tk,qa as an,qb as to,qc as Bp,qd as Bq,qe as Hr,r as uk,ra as bn,rb as vo,rc as Cp,rd as Cq,re as Ir,s as vk,sa as cn,sb as wo,sc as Dp,sd as Dq,se as Jr,t as wk,ta as dn,tb as xo,tc as Ep,td as Eq,te as Kr,u as xk,ua as en,ub as yo,uc as Fp,ud as Fq,ue as Lr,v as yk,va as fn,vb as Ao,vc as Gp,vd as Gq,ve as Mr,w as zk,wa as gn,wb as Bo,wc as Hp,wd as Hq,we as Nr,x as Ak,xa as hn,xb as Co,xc as Ip,xd as Iq,xe as Or,y as Fk,ya as jn,yb as Do,yc as Jp,yd as Jq,ye as Pr,z as Gk,za as kn,zb as Eo,zc as Kp,zd as Kq,ze as Qr}from"./chunk-c65yrgck.js";import{Le as So,Me as To,Ne as Uo,Oe as Vo,Pe as Wo,Qe as Xo}from"./chunk-m8kezfrt.js";import{Re as oo,Se as po}from"./chunk-2ver2s2y.js";import{Te as uo}from"./chunk-6k8h1fj1.js";import{Ue as _m}from"./chunk-mgmn1vxy.js";import{Ve as Fn,We as Gn,Xe as Hn,Ye as zo}from"./chunk-fr66xp8q.js";import{$e as Nk,Ze as Lk,_e as Mk,af as Ok,bf as Pk,cf as Qk,df as Rk,ef as Sk,ff as Tk,gf as Uk,hf as Vk,if as Wk,jf as Xk,kf as Yk,lf as Zk}from"./chunk-ym3r8ktq.js";import{mf as ol,nf as pl,of as ql,pf as rl,qf as sl,rf as tl,sf as ul,tf as vl,uf as wl,vf as xl,wf as yl,xf as zl}from"./chunk-crj19mqr.js";import{yf as ml,zf as nl}from"./chunk-x7yc7e9v.js";import{Af as _k,Bf as $k,Cf as al,Df as bl,Ef as cl,Ff as dl,Gf as el,If as fl,Jf as gl,Kf as hl,Lf as il,Mf as jl,Nf as kl,Qf as ll}from"./chunk-j2dj21ay.js";import{Rf as Hm,Sf as Im,Tf as Jm,Uf as Km,Vf as Nm,Wf as Zm}from"./chunk-dbfq77qe.js";import{Xf as Lm,_f as Mm}from"./chunk-gdbkqatx.js";import{Ag as Sm,Bg as Tm,Cg as Um,Dg as Vm,Eg as Wm,Fg as Xm,Gg as Ym,gg as lm,hg as mm,ig as nm,jg as om,kg as pm,lg as qm,mg as rm,ng as sm,og as tm,pg as um,qg as vm,rg as wm,sg as xm,tg as ym,ug as zm,vg as Am,wg as Om,xg as Pm,yg as Qm,zg as Rm}from"./chunk-ke88kpva.js";import{Hg as Bm,Ig as Cm}from"./chunk-dvvx1wny.js";import{Jg as nn,Kg as on,Lg as pn,Mg as qn,Ng as rn,Og as sn,Pg as tn,Qg as un,Rg as vn,Sg as wn,Tg as xn,Ug as yn}from"./chunk-xz3evxqp.js";import{Vg as ci,Wg as di,Xg as ei,Yg as fi,Zg as gi,_g as hi}from"./chunk-farwrdr2.js";import{$g as wj,ah as xj,bh as yj,fh as zj,gh as Aj,hh as Bj}from"./chunk-wx5zf66r.js";import{ih as Hj,jh as Ij,kh as Jj,lh as Kj,mh as Lj,nh as Mj,oh as Nj,ph as Oj,qh as Pj,rh as Qj,sh as Rj}from"./chunk-yk6446kr.js";import{Ah as sj,Bh as tj,Ch as uj,Dh as vj,th as mj,uh as nj,vh as oj,wh as pj,xh as qj,zh as rj}from"./chunk-vd5xvsnv.js";import{Eh as hk,Gh as ik}from"./chunk-64djh88a.js";import{Mh as Fh,Nh as Gh,Oh as Hh,Ph as Ih,Qh as Jh,Rh as Kh,Sh as Lh,Th as Mh,Uh as Nh,Vh as Oh,Wh as Ph,Xh as Qh,Yh as Rh,Zh as Sh}from"./chunk-9368t9jm.js";import{$h as Th,ai as Uh,bi as Vh,ci as Wh}from"./chunk-5tefa8qb.js";import{hi as Xh}from"./chunk-mwh3ymwc.js";import{ii as $g}from"./chunk-fqq5k9ve.js";import{ji as ah,ki as bh}from"./chunk-ya5m5vbn.js";import{li as ch,mi as dh,ni as eh,oi as fh,pi as gh,qi as hh}from"./chunk-y4nzmkea.js";import{ri as ih,si as jh,ti as kh,ui as lh,vi as mh}from"./chunk-7kw3grq5.js";import{Ai as rh,wi as nh,xi as oh,yi as ph,zi as qh}from"./chunk-c79nfdyj.js";import{Bi as sh,Ci as th,Di as uh,Ei as vh,Fi as wh,Gi as xh,Hi as yh}from"./chunk-ej8mv2k6.js";import{Ii as zh,Ji as Ah,Ki as Bh,Li as Ch,Mi as Dh,Ni as Eh}from"./chunk-cr8v8k53.js";import{Pi as Yg,Qi as Zg}from"./chunk-q05eh1n4.js";import{Ti as _g}from"./chunk-4k0ce745.js";import"./chunk-xwxdwqn9.js";import{$i as Ie,Xi as Ee,Yi as Fe,Zi as Ge,_i as He,aj as Je,bj as Ke,cj as Le,dj as Me,ej as Ne,fj as Oe,gj as Pe,hj as Qe,ij as Re}from"./chunk-ymrxpwr8.js";import{jj as gf,kj as hf,lj as jf,mj as kf,nj as lf,oj as mf,pj as nf,qj as of,rj as pf,sj as qf,tj as rf,uj as sf,vj as tf,wj as uf,xj as vf,yj as wf,zj as xf}from"./chunk-71y3bhcw.js";import{Gj as Ue,Hj as Ve,Ij as We,Jj as Xe,Kj as Ye,Lj as Ze,Mj as _e,Nj as $e,Oj as af,Pj as bf,Qj as cf,Rj as df,Sj as ef,Tj as ff}from"./chunk-t41aaehf.js";import{$j as Ff,Uj as yf,Vj as zf,Wj as Af,Xj as Bf,Yj as Cf,Zj as Df,_j as Ef,ak as Gf,bk as Hf,ck as If,dk as Jf,ek as Kf}from"./chunk-fkdnfjc2.js";import{Ak as or,Bk as pr,Ck as qr,Dk as rr,yk as mr,zk as nr}from"./chunk-08w4gtyf.js";import{Ek as Bk,Fk as Ck,Gk as Dk,Hk as Ek,Ik as Dm,Jk as Em,Kk as Fm,Lk as Gm}from"./chunk-e1sxe3q4.js";import"./chunk-4jdj52c5.js";import"./chunk-zz8qgqa1.js";import{Bl as _b,wl as Yb,xl as Zb}from"./chunk-p1hy2bwn.js";import{$m as Zc,$n as ne,$o as Tf,$p as Tg,$q as gj,Am as qc,An as yd,Ap as sg,Aq as yi,Ar as gk,Bm as rc,Bn as zd,Bp as tg,Bq as Ii,Br as jk,Cm as sc,Cn as Ad,Cp as ug,Cq as Ji,Cr as kk,Dl as xa,Dm as tc,Dn as Bd,Dp as vg,Dq as Ki,Dr as lk,El as ya,Em as uc,En as Cd,Ep as wg,Eq as Li,Er as mk,Fl as za,Fm as vc,Fn as Dd,Fp as xg,Fq as Mi,Fr as nk,Gl as Aa,Gm as wc,Gn as Ed,Gp as yg,Gq as Ni,Gr as ok,Hl as Ba,Hm as xc,Hn as Fd,Hp as zg,Hq as Oi,Hr as pk,Il as Ca,Im as yc,In as Gd,Ip as Ag,Iq as Pi,Ir as qk,Jl as Da,Jm as zc,Jn as Hd,Jp as Bg,Jq as Qi,Jr as rk,Kl as Ea,Km as Ac,Kn as Id,Kp as Cg,Kq as Ri,Ll as Fa,Lm as Bc,Ln as Jd,Lp as Dg,Lq as Si,Ml as Ga,Mm as Cc,Mn as Kd,Mp as Eg,Mq as Ti,Nl as Ha,Nm as Dc,Nn as Ld,No as Mf,Np as Fg,Nq as Ui,Ol as Ia,Om as Ec,On as Md,Op as Gg,Oq as Vi,Pl as Ja,Pm as Fc,Pn as Nd,Pp as Hg,Pq as Wi,Ql as Ka,Qm as Pc,Qn as Od,Qp as Ig,Qq as Xi,Rl as La,Rm as Qc,Rn as Pd,Rp as Jg,Rq as Yi,Sl as Ma,Sm as Rc,Sn as Qd,Sp as Kg,Sq as Zi,Tl as Na,Tm as Sc,Tn as Rd,To as Nf,Tp as Lg,Tq as _i,Ul as Oa,Um as Tc,Un as ge,Up as Mg,Uq as $i,Vl as ib,Vm as Uc,Vn as he,Vo as Of,Vp as Ng,Vq as aj,Wl as jb,Wm as Vc,Wn as ie,Wp as Og,Wq as bj,Xl as kb,Xn as je,Xo as Pf,Xp as Pg,Xq as cj,Yl as lb,Ym as Wc,Yn as ke,Yo as Qf,Yp as Qg,Yq as dj,Zl as mb,Zm as Xc,Zn as le,Zo as Rf,Zp as Rg,Zq as ej,_l as nb,_m as Yc,_n as me,_o as Sf,_p as Sg,_q as fj,an as _c,ao as oe,ap as Uf,aq as Ug,ar as hj,bm as Fb,bn as $c,bo as pe,bp as Vf,bq as Vg,br as ij,cm as Gb,cn as ad,co as qe,cp as Wf,cq as Wg,cr as jj,dm as Hb,dn as bd,do as re,dp as Xf,dq as Xg,dr as kj,em as Ib,en as cd,eo as se,ep as Yf,eq as Yh,er as lj,fm as Jb,fn as dd,fo as te,fp as Zf,fq as Zh,fr as Cj,gm as Nb,gn as ed,gp as _f,gq as _h,gr as Dj,hm as Ob,hn as fd,hp as $f,hq as $h,hr as Ej,im as Pb,in as gd,ip as ag,iq as ai,ir as Fj,jm as $b,jn as hd,jp as bg,jq as bi,jr as Gj,km as ac,kn as id,kp as cg,kq as ii,kr as Sj,lm as bc,ln as jd,lo as xe,lp as dg,lq as ji,lr as Tj,mm as cc,mn as kd,mo as ye,mp as eg,mq as ki,mr as Uj,nm as dc,nn as ld,no as ze,np as fg,nq as li,nr as Vj,om as ec,on as md,oo as Ae,op as gg,oq as mi,or as Wj,pm as fc,pn as nd,po as Be,pp as hg,pq as ni,pr as Xj,qm as gc,qn as od,qo as Ce,qp as ig,qq as oi,qr as Yj,rm as hc,rn as pd,ro as De,rp as jg,rq as pi,rr as Zj,sm as ic,sn as qd,sp as kg,sq as qi,sr as _j,tm as jc,tn as rd,tp as lg,tq as ri,tr as $j,um as kc,un as sd,up as mg,uq as si,ur as ak,vm as lc,vn as td,vo as Se,vp as ng,vq as ti,vr as bk,wm as mc,wn as ud,wo as Te,wp as og,wq as ui,wr as ck,xm as nc,xn as vd,xp as pg,xq as vi,xr as dk,ym as oc,yn as wd,yo as Lf,yp as qg,yq as wi,yr as ek,zm as pc,zn as xd,zp as rg,zq as xi,zr as fk}from"./chunk-kxtqbrfr.js";import{$r as s,$s as la,Cs as M,Ds as N,Es as O,Fs as P,Gs as Q,Hs as R,Is as S,Js as T,Kr as b,Ks as U,Lr as c,Ls as V,Mr as d,Ms as W,Nr as e,Ns as X,Or as f,Os as Y,Pr as g,Ps as Z,Qr as h,Qs as _,Rr as i,Rs as $,Sr as j,Ss as aa,Tr as k,Ts as ba,Ur as l,Us as ca,Vr as m,Vs as da,Wr as n,Ws as ea,Xr as o,Xs as fa,Yr as p,Ys as ia,Zr as q,Zs as ja,_r as r,_s as ka,as as t,at as ma,bs as u,bt as na,cs as v,ct as oa,ds as w,dt as pa,es as x,et as qa,fs as y,ft as ra,gs as z,gt as sa,hs as A,ht as ta,is as B,it as ua,js as C,jt as va,ks as D,kt as wa,ls as E,ms as F,ns as G,os as H,ps as I,qs as J,rs as K,ss as L}from"./chunk-caaenc3w.js";import{lt as ga,mt as ha}from"./chunk-amxtypkp.js";import{nt as Kb,ot as Lb,pt as Mb}from"./chunk-nat3actx.js";import{qt as zi,rt as Ai,st as Bi,tt as Ci,ut as Di,vt as Ei,wt as Fi,xt as Gi,yt as Hi}from"./chunk-q0g5c39d.js";import{Qt as Gc,Rt as Hc,St as Ic,Tt as Jc,Ut as Kc,Wt as Lc,du as Mc,eu as Nc,fu as Oc}from"./chunk-kffndzch.js";import{mu as ue,ou as ve,ru as we}from"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import{Au as Sb,Bu as Tb,Cu as Ub,Du as Vb,yu as Qb,zu as Rb}from"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import{Iu as Wb,Ju as Xb}from"./chunk-vvd659y4.js";import{$u as ee,Nu as Sd,Ou as Td,Pu as Ud,Qu as Vd,Ru as Wd,Su as Xd,Tu as Yd,Uu as Zd,Vu as _d,Wu as $d,Xu as ae,Yu as be,Zu as ce,_u as de,av as fe}from"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import{gv as ob,hv as pb,iv as qb,jv as rb,kv as sb,lv as tb,mv as ub,nv as vb,ov as wb,pv as xb,qv as yb,rv as zb,sv as Ab,tv as Bb,uv as Cb,vv as Db,wv as Eb}from"./chunk-deqnt1w5.js";import{$v as db,Av as Pa,Bv as Qa,Ev as Ra,Jv as Sa,Kv as Ta,Qv as Ua,Rv as Va,Sv as Wa,Tv as Xa,Uv as Ya,Vv as Za,Wv as _a,Xv as $a,Yv as ab,Zv as bb,_v as cb,aw as eb,bw as fb,cw as gb,ew as hb}from"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{Vk as writeNetlifyConfig,Pm as writeManifest,yl as writeImageManifest,fp as wrapComponentForHMR,Or as withDefaults,gk as webComponentDirectiveHandler,Wp as watermark,Yq as watchViews,Il as watchMultiple,Jl as watchEffect,Hl as watch,Be as warmImagePlaceholders,Wl as waitForStore,X as waitForLocale,To as virtualPathFor,Vj as videoDirective,G as validators,Sr as validated,re as validateValueEnhanced,Zh as validateTemplate,Bm as validateRouteRules,$p as validateParams,se as validateFormEnhanced,Nq as validateFile,ne as validateFields,me as validateField,$h as validateDirective,Md as validateCspDirectives,ok as validateConfig,an as validateComponentScripts,zn as validateComponentProps,Xg as validateClientScript,Wh as v,xc as usesSignalsInScript,ub as usesReactiveRuntime,mi as userComponentFileExists,Ch as useVirtualList,_d as useTitle,Vl as useStoreOrThrow,xp as useStore,Fk as useStorage,pf as useSlots,Hk as useSessionStorage,Wb as useServerRuntimeConfig,Mf as useServerData,Xd as useSeoMeta,Xb as useRuntimeConfig,Xl as useRouteParams,Zl as useRouteParamOrThrow,Yl as useRouteParam,_d as usePageTitle,ff as useOptimistic,uf as useModel,$l as useMiddlewareValue,_l as useMiddlewareState,Gk as useLocalStorage,_o as useLoadingIndicator,Vd as useHead,Th as useForm,rf as useAttrs,Pq as uploadFiles,Oq as uploadFile,Sl as updateInstance,df as untrack,Ci as unregisterDirective,Tl as unmountInstance,Fc as unescapeHtml,Wo as typecheckStxFiles,li as transpileTypeScript,Br as translate,Ba as transitionDirective,dc as transformAutoImports,tn as toUsers,sn as toUser,Fp as thumbnail,Gq as thumbHashToRGBA,Hq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,yf as templateCache,cd as syncRecordedResponse,cp as stxClientHelpers,hg as structuredDataDirective,Er as stripLocalePrefix,ym as stripDocumentWrapper,Lb as stripCommentsAndLiterals,eo as stringToStream,Ad as strictCspPreset,Me as streamingSuspenseDirective,Qe as streamToResponse,Ke as streamTemplateSimple,Ee as streamTemplate,Ak as stopHmrServer,pn as stopBroadcasting,Tb as stateDirName,Ub as stateDir,Ue as state,Rg as startsDocument,zo as startProductionServer,uo as startInteractive,on as startBroadcasting,Gr as stampLocaleLayoutGroup,Ia as staggerDirective,Zp as srcsetUrls,Ja as springDirective,jd as splitByPipe,um as spaNavVaryHeaders,Uo as sourcePathFor,eq as smartBatchSign,oi as slotContentHasExpressions,cq as signUrl,ji as shouldTranspileTypeScript,xk as shouldReloadOnChange,hq as shouldRefreshSignature,yk as shouldIgnoreFile,uh as shouldCacheComponent,Jp as sharpen,Vr as shape,Sb as setStateDir,dm as setRouteParams,em as setMiddlewareState,Ae as setImagePlaceholder,jf as setGlobalProvide,b as setErrorLocale,Al as setCurrentInstance,Jj as setCachedVideoResult,yj as setCachedImageResult,sj as setCached,Yr as serveStxFile,_r as serveMultipleStxFiles,sk as serveMarkdownFile,Ko as serveFile,$r as serveApp,Jo as serve,ip as serializeState,Rm as serializeSetCookie,Lp as sepia,Yd as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Zj as scopeHTML,Yj as scopeCSS,kg as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,Pp as saturation,aq as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,ag as runPreProcessingMiddleware,bg as runPostProcessingMiddleware,Um as runPageAction,_e as runMountCallbacks,gb as runMiddleware,Ql as runHooks,ur as runDoctor,$e as runDestroyCallbacks,pg as runComposers,Qp as rotate,Xh as rewriteImagesWithSiblings,dd as responseBindings,si as resolveTemplatePath,ha as resolveStxTargets,kk as resolveStxDirectories,Ar as resolveI18n,Dp as resize,Uf as resetUnscopedSignalWarnings,Dc as resetRejectedExpressionWarnings,kc as resetPlaceholders,Ud as resetHead,hp as resetHMRHandler,o as resetErrorConfig,Qr as required,Sf as reportDeferredLoopWarnings,oc as replacePlaceholders,Wq as renderView,Sj as renderVideoComponent,ac as renderVendorStyleTags,dr as renderToString,er as renderToStream,fr as renderToDOM,Fq as renderThumbhashToCanvas,rr as renderTemplateString,pr as renderTemplate,qr as renderString,He as renderStreamingPage,ei as renderSlot,kh as renderSSRSuspense,pq as renderProtectedVideo,oq as renderProtectedImg,bq as renderMediaUpload,or as renderMarkdownView,Fm as renderLayoutTypes,Cj as renderImgComponent,ol as renderImageComponent,ae as renderHtmlAttrs,$d as renderHead,Zq as renderEmail,qi as renderComponentWithSlot,be as renderBodyAttrs,sp as render,Cd as relaxedCspPreset,le as registerValidationRule,Oe as registerStreamingDirectives,zp as registerStoresClient,bm as registerStore,ig as registerSeoDirectives,_a as registerMiddleware,sc as registerFilters,rc as registerFilter,d as registerErrorMessages,qe as registerEnhancedValidationRule,zi as registerDirective,Ld as registerCspDirectives,Cn as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,ec as referencesName,El as ref,mo as redirect,_c as recordResponseStatus,$c as recordResponseHeader,Vb as rebaseOntoStateDir,ad as readResponseStatus,bd as readResponseHeaders,qk as readMarkdownFile,zf as readFileCached,Fl as reactive,Up as quality,mq as pruneSignatureCache,vj as pruneCache,gf as provide,nr as protectCodeBlocks,Pr as prop,sg as processVueTemplate,Ah as processVirtualListDirectives,Eh as processVirtualGridDirectives,Rj as processVideo,oe as processValidateDirective,ea as processTranslateDirective,eh as processTransitionDirectives,hh as processTransitionAttributes,ee as processTitleDirective,Sc as processTemplateBindings,ah as processTeleportDirectives,ih as processSuspenseDirectives,dg as processStructuredData,Ie as processStreamDirectives,ed as processStatusDirective,Rh as processStaticDirectives,_f as processStackReplacements,Zf as processStackPushDirectives,fi as processSlots,wm as processShell,De as processServerBindings,eg as processSeoDirective,Pe as processSectionDirectives,Kc as processScopedStyles,Qc as processReactiveBindings,qq as processProtectedMedia,Kh as processPartialHydrationDirectives,Wg as processOnceDirective,$f as processMiddleware,cg as processMetaDirectives,fe as processMetaDirective,rk as processMarkdownFileDirectives,xi as processMarkdownDirectives,Tf as processLoops,sh as processKeepAliveDirectives,Vg as processJsonDirective,Dh as processInfiniteListDirectives,Yf as processIncludes,Ej as processImgComponents,ql as processImageComponents,dl as processImage,de as processHeadDirective,he as processForms,je as processFormInputDirectives,Bc as processExpressions,Ib as processEventDirectives,ke as processErrorDirective,tg as processDynamicComponents,Yh as processDirectives,Hi as processDirectiveAttributes,$g as processDeferDirectives,Qd as processCustomDirectives,Id as processCspDirectives,Wr as processComponentProps,jc as processClientScript,ie as processBasicFormDirectives,nh as processAsyncDirectives,Rd as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,we as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,Zo as preloadIslandHandlers,Ce as preloadIconCollection,kn as poolStrings,ik as pluginManager,ye as placeholdersWarmed,dh as performLeave,ch as performEnter,af as pendingLifecycleCounts,ef as peek,Vf as partialsCache,Tj as parseVideoDirectiveOptions,Bp as parseUrl,Iq as parseThumbhashString,pd as parseSwitchBlock,ci as parseSlots,di as parseSlotElement,ud as parseScriptDeclarations,ek as parseSFCComponent,rq as parseProtectedArgs,Rf as parseLoopBinding,Dj as parseImgComponent,Vi as parseImageUrl,pl as parseImageComponent,Sm as parseFormBody,rd as parseExpressionWithFilters,Dn as parseDefaults,jo as parseCookies,nm as parseContainerSelector,md as parseConditionalBlock,sd as parseArguments,Ma as parseAnimationShorthand,Rr as optional,ln as optimizeTemplate,vl as optimizeImage,wl as optimizeDirectory,Tr as oneOf,Wf as onceStore,Nl as onUpdated,Pc as onUpdate,Pl as onUnmounted,im as onServer,Ll as onMounted,Ye as onMount,Qh as onHydrated,nf as onErrorCaptured,Ze as onDestroy,yh as onDeactivated,hm as onClient,Ml as onBeforeUpdate,Ol as onBeforeUnmount,Kl as onBeforeMount,xh as onActivated,Bq as observeElement,no as notFound,yg as normalizeCriticalHeadOrder,mf as nextTick,Gn as negotiateEncoding,Ua as navigateTo,Rl as mountInstance,Ea as motionDirective,Bd as moderateCspPreset,jn as minifyHtml,gg as metaDirective,Jg as metaDedupKey,Cp as mergeParams,Lg as mergeHtmlAttrs,Wd as mergeHeadConfigs,Hc as mergeCssConfig,Fd as mergeCspDirectives,Ra as matchRoute,yi as markdownDirectiveHandler,pk as markdownCache,ga as looksLikeGlob,Dr as localizePath,U as loadTranslationLazy,_ as loadTranslation,lk as loadStxConfig,db as loadMiddlewareFromDirectory,Qm as loadManifest,xq as loadElement,qn as loadChannels,Kr as lintStxStrict,zq as lazyLoadAll,yq as lazyLoad,Ha as keyframeDirective,br as jsxs,cr as jsxDEV,ar as jsx,lo as jsonResponse,Ne as islandDirective,l as isTest,zm as isSpaNavigation,sm as isSpaNavRequest,fq as isSignatureValid,bf as isSignal,bl as isSharpAvailable,Yn as isServerEnvironment,fm as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,uq as isNativeLazySupported,mr as isMarkdownPath,Q as isLoading,R as isLoaded,ii as isJavaScriptScript,vq as isIntersectionObserverSupported,jl as isImageFile,cl as isImageBackendAvailable,aa as isICUFormat,Ph as isHydrated,ni as isHydrateTrigger,Yc as isHttpStatus,Xn as isEdgeEnvironment,Lr as isDirectiveKind,k as isDevelopment,cf as isDerived,wk as isCssOnlyChange,Fn as isCompressible,gm as isClient,ph as isAsyncComponent,Tm as isActionableMethod,Mp as invert,Bf as invalidateFileCacheByDir,Af as invalidateFileCache,Ac as interpolateScriptsInTemplate,yc as interpolateScriptExpressions,zc as interpolateScriptAttributes,x as inlineError,zr as injectThemeBootstrap,fg as injectSeoTags,wr as injectSeo,Lf as injectRouterScript,vk as injectHotReload,kb as injectHeatmap,Oc as injectCss,Gd as injectCspMetaTag,Tg as injectConfigHeadTags,xg as injectColorModeBootScript,Ng as injectCloakStyle,Eg as injectBuildId,cc as injectBrowserCoreAutoImports,Uc as injectAnalytics,hf as inject,am as initStoreRegistry,Yk as initNetlify,$o as initLoadingIndicator,wq as initLazyLoading,to as initFile,Eq as initBlurUp,Kq as initAllBlurUp,Gj as imgDirective,tl as imageDirective,Xm as hydrateTemplateStream,Wm as hydrateTemplate,Yo as hydrateIslands,Mh as hydrateIsland,Ym as hydrateFragment,Nh as hydrateByStrategy,Oh as hydrateAll,pp as hydrate,Io as htmlResponse,Pg as hoistLeadingHeadTags,zg as hoistColorModeBootScript,lb as heatmapDirective,oj as hashString,Kf as hashFilePath,mj as hashFile,nj as hashBuffer,rg as hasVueTemplateSyntax,Qf as hasVariables,up as hasStore,pc as hasPlaceholders,Wk as hasNetlifyConfig,ab as hasMiddleware,Jb as hasEventDirectives,Sg as hasDocumentShell,ai as hasDirectives,ma as hasDOMSupport,ml as handleImageRequest,of as handleError,jr as h,il as groupVariantsByFormat,Kp as grayscale,Bo as gitHash,cn as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,Rk as getTotalSize,gq as getTimeUntilExpiry,Yg as getStoreScript,vp as getStoreNames,tp as getStore,Kk as getStorageSize,Jk as getStorageKeys,ti as getSourceLineInfo,ki as getSharedTranspiler,Ff as getServeClientAsset,la as getScreenReaderOnlyStyle,_j as getScopeAttribute,Te as getRouteParams,Ob as getPublicEnvDefine,Pb as getPublicEnv,_h as getPositionInfo,mc as getPlaceholderRegistry,lj as getPlaceholderCacheStats,Td as getPageMeta,wd as getNonce,kl as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,xe as getImagePlaceholder,el as getImageMetadata,ue as getImageDelivery,op as getHydrationRuntime,cm as getHydratedStoreState,zk as getHmrServer,Sd as getHead,gp as getHMRHandler,Zi as getFormatExtension,qj as getFileMtime,hl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Bi as getDirectives,Ai as getDirective,Bl as getCurrentInstance,Lc as getCssServeAsset,Ed as getCspPreset,Nd as getCspHeaderName,wi as getComponentCacheStats,Ij as getCachedVideoResult,kq as getCachedSignature,Df as getCachedSignalsRuntime,Ef as getCachedRouterScript,jj as getCachedPlaceholder,xj as getCachedImageResult,rj as getCached,uj as getCacheStats,Cg as getBuildId,nn as getBroadcastServer,Yi as getBestVariant,tc as getAllFilters,Mi as generateWidthSrcset,Bh as generateVirtualListCSS,Rq as generateVideoPreview,te as generateValidationScript,Sq as generateUploadRuntime,dn as generateTreeShakenBundle,gh as generateTransitionRuntime,fh as generateTransitionCSS,Mj as generateThumbnails,cj as generateThumbhashPlaceholder,Pn as generateTemplatesDocs,mh as generateSuspenseRuntime,lh as generateSuspenseCSS,jp as generateStateScript,Wi as generateSrcsetData,Bj as generateSrcset,fl as generateSrcSet,Nj as generateSpriteSheet,_q as generateSpaShell,Xi as generateSourceTags,Si as generateSizesFromBreakpoints,Ri as generateSizesAttribute,gl as generateSizes,jg as generateSitemapIndex,xr as generateSitemap,tq as generateSimpleMediaPicker,nq as generateSignatureRuntime,xf as generateSignalsRuntimeDev,wf as generateSignalsRuntime,ic as generateServerDataBridge,Xj as generateScopeId,fk as generateSFCWebComponent,Gb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,lg as generateRobotsTxt,yr as generateRobots,Aj as generateResponsiveVariants,bk as generateReactiveWebComponentTS,ak as generateReactiveWebComponent,dk as generateReactiveRuntime,ck as generateReactiveMixin,Lj as generatePoster,ij as generatePlaceholderStyle,hj as generatePlaceholderCSS,bj as generatePlaceholder,Lh as generatePartialHydrationCSS,vd as generateNonce,Sk as generateNetlifyToml,Uq as generateMinifiedMediaRuntime,Tq as generateMediaRuntime,sq as generateMediaManagerEmbed,Om as generateManifest,bp as generateLoadingIndicatorHtml,Dq as generateLazyLoadRuntime,Gm as generateLayoutTypes,ej as generateLQIP,wh as generateKeepAliveRuntime,vh as generateKeepAliveCSS,Sh as generateIslandManifest,Qq as generateImagePreview,xl as generateImageManifest,np as generateHydrationScript,Re as generateHydrationRuntime,qp as generateHydrationCSS,Fh as generateHydrationBootstrap,uk as generateHotReloadScript,jb as generateHeatmapScript,ep as generateHMRClientScript,Oj as generateHLSManifest,kp as generateEventBindings,Qi as generateDprSrcsetWithVariableQuality,Pi as generateDprSrcset,Qg as generateDocumentShell,Un as generateDocs,Qn as generateDirectivesDocs,Gi as generateDirectiveRuntime,mg as generateDefaultRobotsTxt,Pj as generateDASHManifest,Nc as generateCss,zd as generateCspMetaTag,yd as generateCspHeader,tf as generateCompositionRuntime,On as generateComponentsDocs,Gh as generateComponentManifest,Mn as generateComponentDoc,gj as generateColorPlaceholder,wg as generateColorModeBootScript,Ul as generateClientRuntime,pj as generateCacheKey,gc as generateBrowserAutoImportDestructuring,Lq as generateBlurUpRuntime,Mq as generateBlurUpCSS,Rc as generateBindingsRuntime,Ni as generateAutoWidthSrcset,fc as generateAutoImportDestructuring,rh as generateAsyncComponentRuntime,qh as generateAsyncComponentCSS,Zb as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,Tc as generateAnalyticsScript,Xo as formatTypecheckDiagnostics,Ro as formatTypeErrors,qo as formatStxContent,Qk as formatSize,Ta as formatRoutes,ro as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,vr as formatDoctorReport,Rn as formatDocsAsMarkdown,Tn as formatDocsAsJson,Sn as formatDocsAsHtml,Tp as format,hn as foldConstants,Sp as flipVertical,Rp as flipHorizontal,Hm as fingerprint,Vo as findRuntimeTypeDeclarations,tr as findPantryPackage,ld as findMatchingEndTag,hd as findMatchingDelimiter,Kb as findInterpolationEnd,nd as findIfBlocks,qd as findExpressions,Sa as findErrorPage,Ic as findDuplicateScopedStyleRanges,od as findDirectiveBlocks,en as findDeadCode,en as findDeadBranches,om as findContainerRegion,Nn as findComponentFiles,Zr as findCommonDir,Pk as filterRequiredFiles,ri as fileExists,Nf as extractVariables,Mm as extractTemplateExpressions,Je as extractStreamBoundaries,lp as extractState,gi as extractSlotContent,Pf as extractScriptFromTemplate,Lm as extractScriptBlocks,nc as extractPlaceholders,kd as extractParenthesizedExpression,Zc as extractPageResponseStatus,hb as extractLayoutMetadata,fj as extractDominantColor,td as extractDirectiveParams,bi as extractDirectiveNames,Am as extractContainerContent,Kn as extractComponentProps,Hh as extractComponentName,Ln as extractComponentDescription,Mc as extractClassNames,hc as extractBridgeData,Ih as extractBoundProps,id as extractBalancedExpression,$b as extractAndStripCssImports,$j as extractAndScopeStyles,Hb as extractAndProcessEvents,Dk as externalizeSharedAssets,Ek as externalizeRepeatedAssets,Ck as externalizeHtml,Ec as evaluateExpression,gn as evaluateConstant,fd as evaluateAuthExpression,wc as escapeHtmlValue,vc as escapeHtml,C as errorRecovery,E as errorLogger,bh as ensureTeleportTargets,Ug as ensureDocumentShell,pe as enhancedValidationRules,In as enableDevTools,fn as eliminateDeadCode,We as effect,_p as dprUrls,Vn as docsCommand,Yb as discoverServerApi,Em as discoverLayoutNames,Cq as disconnectObserver,Jn as disableDevTools,F as devHelpers,vm as detectShell,Wn as detectRuntime,Tk as detectProjectConfig,_i as detectFormat,$m as detectBuildMode,Ve as derived,Xk as deploy,nk as defineStxConfig,yp as defineStore,qf as defineSlots,Jr as defineSiteConfig,Nr as definePropsWithValidation,Mr as defineProps,hk as definePlugin,Zd as definePageMeta,Wa as defineMiddleware,Uh as defineForm,lf as defineExpose,kf as defineEmits,Di as defineDirective,lr as defineCustomElement,yo as defineConfig,Ei as defineClientDirective,oh as defineAsyncComponent,Ao as defineApiHandler,Vq as defaultMediaConfig,zl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,ge as defaultFormClasses,qc as defaultFilters,Pd as defaultCspConfig,jk as defaultConfig,Xr as default,Gc as deepMergeThemes,Jc as dedupeScopedStyles,rm as decodeTitleEntities,dj as decodeThumbhash,Kd as cspNonceDirective,Jd as cspDirective,Jq as crossfadeTransition,Ep as crop,zh as createVirtualList,Uj as createVideoDirective,ho as createVercelHandler,Oo as createTypeChecker,fa as createTranslateFilter,co as createTextEncoderStream,kr as createStxApp,bo as createStreamingResponse,Le as createStreamRenderer,wp as createStore,Za as createStorageManager,Xa as createServerCookieManager,_b as createServerApi,Dl as createScope,jh as createSSRSuspense,Se as createRouter,Cm as createRouteRuleResolver,eb as createRouteLocation,Mo as createRoute,El as createRef,Fl as createReactive,sf as createProvideContext,Do as createProject,xo as createProductionBuild,lc as createPlaceholder,mn as createOptimizedBuild,io as createNetlifyHandler,Lk as createNetlifyClient,fb as createMiddlewareContext,Lo as createMiddleware,Aq as createLazyObserver,th as createKeepAliveCache,_n as createKVNamespace,Jh as createIslandRegistry,Fj as createImgDirective,ul as createImagePlugin,nl as createImageHandler,sl as createImageDirective,nb as createHeatmapAggregator,Ok as createFileManifest,Zn as createEnvAccessor,z as createEnhancedError,ao as createEdgeHandler,$n as createEdgeCache,ui as createDetailedErrorMessage,go as createDenoHandler,Uk as createDefaultNetlifyConfig,Od as createCspHeaders,ko as createCookie,Gl as createComputed,Cl as createComponentInstance,fo as createCloudflareHandler,Ya as createClientCookieManager,Fi as createBuiltinDirectives,kr as createApp,Ka as createAnimationTimeline,Hp as cover,Of as convertToCommonJS,Op as contrast,Gp as contain,y as consoleError,m as configureErrorHandling,mk as config,Gl as computed,Hn as compressResponse,og as composerPattern,ng as composer,xm as composeShellWithPage,Bn as componentDirective,pi as componentClientSignalNames,Nm as compileTemplate,a as collectRepeatedFlag,Nk as collectDeployFiles,Og as cloakStyleFragment,Kj as clearVideoCache,N as clearTranslationCache,Zg as clearStoreCache,Ik as clearStorage,lq as clearSignatureCache,vf as clearServerData,kj as clearPlaceholderCache,Xf as clearOnceStore,xd as clearNonce,bb as clearMiddleware,ze as clearImagePlaceholders,ve as clearImageDeliveryCatalog,rl as clearImageCache,e as clearErrorMessages,Gf as clearDevCaches,uc as clearCustomFilters,qg as clearComposers,_g as clearComposableCache,vi as clearComponentCache,tj as clearCache,Db as clearBlankCache,ap as cleanupLoadingIndicator,lm as classifyScript,mm as classifyAllScripts,Po as checkTemplateFile,Qo as checkTemplate,If as checkCache,iq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,wn as channel,po as captureScreenshots,oo as captureScreenshot,Z as cancelPendingLoads,Mk as calculateSha1,Oi as calculateOptimalWidths,Jf as cacheTemplate,Hf as cacheEngineFingerprint,Wj as buildWebComponents,So as buildVirtualSource,Xq as buildViews,Ap as buildUrl,Fe as buildSuspenseResolveScript,Ir as buildStaticSite,qb as buildRuntimeGlobalsDestructure,Im as buildRuntimeAsset,Jm as buildRouterAsset,Hr as buildLangPickerScript,Ui as buildImageUrl,Fg as buildIdFragment,Kg as buildHtmlAttrs,Zm as buildForProduction,En as buildComponentLibrary,jq as buildAuthParams,_m as buildApp,Fr as buildAlternateLinks,wo as build,un as broadcastPrivate,vn as broadcastPresence,rn as broadcast,Np as brightness,Mb as bracketDepths,Ip as blur,Eb as blankInertHtmlRegions,dq as batchSignUrls,Xe as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,Vp as auto,ja as attributeValue,Km as assetTags,Fb as asInvocableStatement,Ur as arrayOf,Cr as applyTranslations,zj as applyTransformations,hi as applySlots,An as applyPropDefaults,Yp as applyPreset,Mg as applyHtmlAttrs,ce as applyHead,Cc as applyFilters,tm as appendVary,Dd as apiCspPreset,Da as animationGroupDirective,Qj as analyzeVideo,bn as analyzeUsage,jm as analyzeTemplate,km as analyzeProject,bn as analyzeDirectiveUsage,Vc as analyticsDirective,Go as addStore,Fo as addPage,Hd as addNonceToInlineContent,Ho as addLayout,Eo as addComponent,Vm as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Cf as __setSignalsGeneratorsForTest,Dg as __setBuildIdForTest,Hj as VideoProcessorCache,Vh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,gd as Tokenizer,No as TemplateTypeChecker,so as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,gr as Show,Ge as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,bc as STX_AUTO_IMPORTS,Rb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,pm as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Wc as RESPONSE_STATUS_KEY,Xc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,vo as ProductionBuild,ir as Portal,Co as PROJECT_TEMPLATES,Xp as PRESETS,sb as NON_CLIENT_PRIMITIVES,rp as MemorySessionStore,Li as MIME_TYPES,Ii as MEDIA_DEFAULT_WIDTHS,Ki as MEDIA_DEFAULT_FORMATS,Dm as LAYOUT_TYPES_FILE,wj as ImageProcessorCache,ll as ImageProcessingError,mp as HydrationRuntime,tk as HotReloadServer,mb as HeatmapAggregator,Ig as HTML_CLASS_MARKER,Hg as HTML_ATTRS_MARKER,$q as Fragment,hr as For,qm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Bk as EXTERNALIZED_ASSET_DIR,Zk as DeployError,_k as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Qb as DEFAULT_STATE_DIR,al as DEFAULT_QUALITY,$i as DEFAULT_PLACEHOLDER_OPTIONS,$k as DEFAULT_FORMATS,Ji as DEFAULT_DPR_VALUES,dp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,Ti as COMMON_SIZES,ug as COLOR_MODE_BOOT_MARKER,vg as COLOR_MODE_BOOT_GLOBAL,Gg as CLOAK_STYLE,yn as BroadcastServer,xn as Broadcast,Ag as BUILD_ID_META,Bg as BUILD_ID_HEADER,Nb as BROWSER_CORE_IMPORTS,aj as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,sr as $path};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ap as a,bp as b,cp as c,dp as d,ep as e,fp as f,gp as g}from"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{a as resetUnscopedSignalWarnings,g as processStackReplacements,f as processStackPushDirectives,e as processIncludes,b as partialsCache,c as onceStore,d as clearOnceStore};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{Fm as I}from"./chunk-kxtqbrfr.js";import{As as V,ws as F}from"./chunk-caaenc3w.js";function R(j,W){let U=1,z=W,G="<template",X="</template";while(z<j.length&&U>0){let J=j.indexOf("<",z);if(J===-1)break;if(z=J,j.startsWith(G,z)&&(z+G.length>=j.length||/[\s>\/]/.test(j[z+G.length]))){U++,z+=G.length;continue}if(j.startsWith(X,z)){let Y=j.indexOf(">",z+X.length);if(Y!==-1){if(U--,U===0)return Y+1;z=Y+1;continue}}z++}return U===0?z:-1}var P=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function D(j,W){let U=null;for(let z=W;z<j.length;z++){let G=j[z];if(U){if(G==="\\"){z++;continue}if(G===U)U=null;continue}if(G==='"'||G==="'"){U=G;continue}if(G===">")return z+1}return-1}function b(j){let W=[],U=[],z=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,G=0;while(G<j.length){let X=j.indexOf("<",G);if(X===-1)break;if(j.startsWith("<!--",X)){let $=j.indexOf("-->",X+4);G=$===-1?j.length:$+3;continue}let J=D(j,X+1);if(J===-1)break;let Y=j.slice(X,J),Q=Y.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!Q){G=J;continue}let Z=Q[1]==="/",H=Q[2].toLowerCase();if(Z){let $=U.lastIndexOf(H);if($!==-1)U.splice($);G=J;continue}if(H==="template"&&U.length===0){let $=Y.match(z);if($){let K=R(j,J);if(K!==-1){let O=$[1]||$[2]||$[3];W.push({start:X,end:K,slotName:O,content:j.slice(J,K-11).trim(),propsBinding:$[4]||void 0}),G=K;continue}}}if(!/\/\s*>$/.test(Y)&&!P.has(H)){if(U.push(H),H==="script"||H==="style"){let $=j.toLowerCase().indexOf(`</${H}>`,J);if($!==-1){G=$;continue}}}G=J}return W}function w(j){let W={default:"",named:new Map},U=j,z=b(j);for(let Q of z)W.named.set(Q.slotName,{name:Q.slotName,content:Q.content,propsBinding:Q.propsBinding});z.sort((Q,Z)=>Z.start-Q.start);for(let Q of z)U=U.slice(0,Q.start)+U.slice(Q.end);let G=[],X=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi,J;while((J=X.exec(U))!==null){let[Q,Z,H,_,$,K]=J,O=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),L=(O+B).trim(),q=`<${Z}${L?" "+L:""}>${K}</${Z}>`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:q})}let Y=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*?)\/>/gi;while((J=Y.exec(U))!==null){let[Q,Z,H,_,$]=J,K=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),O=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=(K+O).trim(),L=`<${Z}${B?" "+B:""} />`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:L})}G.sort((Q,Z)=>Z.start-Q.start);for(let Q of G){let Z=W.named.get(Q.slotName);if(Z)Z.content+=Q.element;else W.named.set(Q.slotName,{name:Q.slotName,content:Q.element});U=U.slice(0,Q.start)+U.slice(Q.end)}return W.default=U.trim(),W}function C(j){let W=j.match(/name\s*=\s*["']([^"']+)["']/),U=W?W[1]:"",z={},G=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,X;while((X=G.exec(j))!==null)z[X[1]]=X[2];let J=j.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),Y=J?J[1].trim():"";return{name:U,props:z,defaultContent:Y}}async function N(j,W,U,z){if(!j)return U;let G=j.content;if(j.propsBinding&&Object.keys(W).length>0){let X=j.propsBinding.trim(),J={...z};if(X.startsWith("{")&&X.endsWith("}")){let Y=X.slice(1,-1).split(",").map((Q)=>Q.trim()).filter(Boolean);for(let Q of Y){let[Z,H]=Q.split(":").map(($)=>$.trim()),_=H||Z;if(W[Z]!==void 0)J[_]=W[Z]}}else J[X]=W;G=k(G,J)}return G}function k(j,W){return j.replace(/\{\{\s*([^}]+)\s*\}\}/g,(U,z)=>{try{let G=z.trim(),X=y(G,W);return I(String(X??""))}catch{return`{{ ${z} }}`}})}function y(j,W){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(j)){let z=j.split("."),G=W;for(let X of z)if(G&&typeof G==="object"&&X in G)G=G[X];else return;return G}let U=j.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(U){let[,z,G,X]=U,J=W[z],Y=parseInt(X,10);if(typeof J==="number")switch(G){case"+":return J+Y;case"-":return J-Y;case"*":return J*Y;case"/":return J/Y}}try{if(!F(j))return;return V(j,Object.keys(W))(...Object.values(W))}catch{return}}async function A(j,W,U){let z=j;z=await v(z,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(J,Y,Q,Z)=>{let H=W.named.get(Y),_=Z?.trim()||"",$=Q||"",K={},O=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,B;while((B=O.exec($))!==null){let L=B[1],q=B[2];K[L]=y(q,U)}return await N(H,K,_,U)});let X=/<slot\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return z=z.replace(X,(J,Y)=>{if(J.includes("name="))return J;let Q=Y?.trim()||"";return W.default||Q}),z}async function v(j,W,U){let z=[],G=[];j.replace(W,(Y,...Q)=>{let Z=Q[Q.length-2];return G.push({match:Y,index:Z}),z.push(U(Y,...Q.slice(0,-2))),Y});let X=await Promise.all(z),J=j;for(let Y=G.length-1;Y>=0;Y--){let{match:Q,index:Z}=G[Y];J=J.slice(0,Z)+X[Y]+J.slice(Z+Q.length)}return J}function E(j){let W=w(j);return{defaultSlot:W.default,namedSlots:W.named}}async function M(j,W,U,z){return await A(j,{default:W,named:U},z)}
3
- export{w as Vg,C as Wg,N as Xg,A as Yg,E as Zg,M as _g};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{so as b,to as c,uo as d}from"./chunk-kxtqbrfr.js";import{ys as a}from"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{b as rendersAsElement,c as processESImports,d as processComponents,a as freeIdentifiers};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{yf as a,zf as b}from"./chunk-x7yc7e9v.js";import"./chunk-j2dj21ay.js";import"./chunk-hyfjnn7g.js";export{a as handleImageRequest,b as createImageHandler};
@@ -1,43 +0,0 @@
1
- // @bun
2
- import{gm as e,ho as f,io as h,jo as u,ko as l,so as m}from"./chunk-kxtqbrfr.js";import{ot as D}from"./chunk-nat3actx.js";import{gv as g}from"./chunk-deqnt1w5.js";import JJ from"path";import C from"fs";import S from"path";function k(K,Z,$,J){let Q=0;for(let j=Z;j<K.length;j++)if(K[j]===$)Q++;else if(K[j]===J&&!(J===">"&&K[j-1]==="=")){if(--Q===0)return j}return-1}function WJ(K){let Z=D(K),$=0,J=0,Q=[];for(let j=0;j<Z.length;j++)if("([{".includes(Z[j]))$++;else if(")]}".includes(Z[j]))$--;else if(Z[j]===","&&$===0)Q.push(K.slice(J,j).trim()),J=j+1;return Q.push(K.slice(J).trim()),Q}function R(K,Z){let $=D(K),J=new RegExp(`\\b(?:${Z.map((Q)=>Q.replace(/[$]/g,"\\$&")).join("|")})\\s*(?=[<(])`,"g");for(let Q of $.matchAll(J)){let j=Q.index+Q[0].length,G="";if($[j]==="<"){let U=k($,j,"<",">");if(U<0)continue;G=K.slice(j+1,U),j=U+1;while(/\s/.test($[j]||"")&&j<$.length)j++}if($[j]!=="(")continue;let W=k($,j,"(",")");if(W>=0)return{type:G,args:WJ(K.slice(j+1,W))}}return null}var x=`
3
- type __StxCtor<T> = T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends BooleanConstructor ? boolean : T extends ArrayConstructor ? unknown[] : T extends ObjectConstructor ? object : T extends readonly unknown[] ? __StxCtor<T[number]> : T extends abstract new (...args: any[]) => infer V ? V : unknown;
4
- type __StxWiden<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T;
5
- type __StxOption<T> = T extends { type: infer C } ? __StxCtor<C> : T extends { default: infer D } ? D extends (...args: any[]) => infer V ? V : __StxWiden<D> : __StxCtor<T>;
6
- type __StxRequired<O> = { [K in keyof O]-?: O[K] extends { required: true } ? K : never }[keyof O];
7
- type __StxDefaulted<O> = { [K in keyof O]-?: O[K] extends { default: unknown } ? K : never }[keyof O];
8
- type __StxOptions<O> = { [K in Exclude<__StxRequired<O>, __StxDefaulted<O>>]: __StxOption<O[K]> } & { [K in Exclude<keyof O, Exclude<__StxRequired<O>, __StxDefaulted<O>>>]?: __StxOption<O[K]> };
9
- type __StxDefaults<P, K> = Omit<P, Extract<keyof P, K>> & Partial<Pick<P, Extract<keyof P, K>>>;
10
- `;function b(K,Z){let $=[],J={defineProps:["defineProps"],defineEmits:["defineEmits"],withDefaults:["withDefaults"]},Q=D(K),j=K.replace(/\bimport\s+(?:type\s+)?(\{[^}]*\}|\*\s+as\s+[\w$]+|[\w$]+)\s+from\s*(['"])([^'"]+)\2\s*;?/g,(F,H,q,B,Y)=>{if(Q.slice(Y,Y+6)!=="import")return F;if(B.endsWith(".stx"))return"";let N=`${Z}Import${$.length}`;if($.push(`import * as ${N} from ${JSON.stringify(B)};`),H.startsWith("*"))return`import ${H.replace(/^\*\s+as\s+/,"")} = ${N};`;if(!H.startsWith("{"))return`import ${H} = ${N}.default;`;return H.slice(1,-1).split(",").map((M)=>{let[w,O=w]=M.trim().replace(/^type\s+/,"").split(/\s+as\s+/);if(!w)return"";if(/^(?:stx|@stacksjs\/stx)(?:\/|$)/.test(B)&&w in J)J[w].push(O);return`import ${O} = ${N}.${w};`}).join(`
11
- `)}),G=R(K,J.defineProps),W=R(K,J.defineEmits),U=R(K,J.withDefaults);if(!G&&!W)return{declarations:"",props:null,events:null};let z=[],V=null,X=null;if(G){z.push(`const __options = (${G.args[0]||"{}"}) as const;`),z.push(`const __defaults = (${U?.args[1]||"{}"});`);let F=G.type||"__StxOptions<typeof __options>";z.push(`export type __StxProps = __StxDefaults<${F}, keyof typeof __defaults | __StxDefaulted<typeof __options>>;`),V=`${Z}.__StxProps`}if(W)z.push(`const __events = (${W.args[0]||"[]"}) as const;`),z.push(`export type __StxEvents = ${W.type||"Record<(typeof __events)[number], any[]>"};`),X=`${Z}.__StxEvents`;return{declarations:`${$.join(`
12
- `)}
13
- namespace ${Z} {
14
- ${j}
15
- ${z.join(`
16
- `)}
17
- }`,props:V,events:X}}function*UJ(K){let Z=/<([A-Za-z][\w.-]*)(?=[\s/>])/g,$;while($=Z.exec(K)){let J=Z.lastIndex,Q=[];while(J<K.length){while(/\s/.test(K[J]||""))J++;if(K[J]===">"||K.slice(J,J+2)==="/>"){J+=K[J]===">"?1:2;break}let j=/^[^\s=/>]+/.exec(K.slice(J))?.[0];if(!j){J++;continue}let G=J;J+=j.length;while(/\s/.test(K[J]||""))J++;if(K[J]!=="="){Q.push({name:j,value:!0,offset:G,braced:!1});continue}J++;while(/\s/.test(K[J]||""))J++;let W=K[J],U=W==="{",z=W==='"'||W==="'";if(z||U)J++;let V=J;if(U){let X=D(K.slice(J)),F=1,H=0;for(;H<X.length;H++){if(X[H]==="{")F++;if(X[H]==="}"&&--F===0)break}J+=H}else if(z)while(J<K.length&&K[J]!==W)J++;else while(J<K.length&&!/[\s/>]/.test(K[J]))J++;if(Q.push({name:j,value:K.slice(V,J),offset:V,braced:U}),z||U)J++}Z.lastIndex=J,yield{name:$[1],offset:$.index,attributes:Q}}}function p(K,Z,$){let J=[],Q=[x,"type __StxAssignedValue<T> = T extends { readonly _isSignal: true } | { readonly _isDerived: true } ? T extends () => infer V ? V : T : T;","type __StxProp<P, K> = K extends keyof P ? P[K] : unknown;",'type __StxEvent<E, K> = K extends keyof E ? E[K] extends readonly unknown[] ? Exclude<E[K]["length"], 0 | 1> extends never ? E[K][0] : E[K] : E[K] : any;'],j=new Map,G=new Map,W=new Map,U=$.scriptCode(K,$.filePath),z=D(U);for(let q of U.matchAll(/\bimport\s+(\{[^}]+\}|[\w$]+)\s+from\s*['"]([^'"]+)['"]/g)){if(z.slice(q.index,q.index+6)!=="import")continue;let B=q[2],Y=S.isAbsolute(B)||B.startsWith(".")?S.resolve(S.dirname($.filePath),B):h(B,S.dirname($.filePath));if(!Y)continue;let N=Y.endsWith(".stx")?Y:C.existsSync(`${Y}.stx`)?`${Y}.stx`:void 0,M=N?null:f(Y,!1),w=q[1].startsWith("{")?q[1].slice(1,-1).split(","):[q[1]];for(let O of w){let[L,P=L]=O.trim().split(/\s+as\s+/),I=N||M?.get(L)||M?.get(L.toLowerCase());if(I)W.set(P,I),W.set(P.toLowerCase(),I),W.set(P.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),I)}}for(let q of Z.matchAll(/@import\s*\(([^)]+)\)/g))for(let B of q[1].matchAll(/['"]([^'"]+)['"]/g)){let Y=u(B[1],$.filePath,$).find((N)=>C.statSync(N,{throwIfNoEntry:!1})?.isFile());if(Y)W.set(S.basename(B[1]).replace(/\.stx$/,""),Y)}let V={__importedComponents:W},X=new Map,F=(q,B,Y)=>{let N=K.slice(0,q);return{code:B,offset:q,attribute:Y,anchor:!0,kind:"directive",line:N.split(`
18
- `).length,column:q-N.lastIndexOf(`
19
- `)}},H=(q,B,Y)=>J.push({expression:q,statement:{text:B+q.code+Y,prefixLength:B.length}});for(let q of UJ(Z)){if(m(q.name)||q.name==="component")continue;let B=l(q.name,$.filePath,$,V);if(!B)continue;let Y=X.get(B);if(!Y){let M;try{M=$.readComponent?$.readComponent(B):C.readFileSync(B,"utf8")}catch{continue}if(M===void 0)continue;G.set(B,M),Y=b($.scriptCode(M,B),`__StxComponent${X.size}`),X.set(B,Y),Q.push(Y.declarations)}let N=[];for(let M of q.attributes){let{name:w,offset:O}=M,L=M.value===!0?"true":M.value;if(w.startsWith("@")||w.startsWith("v-on:")){if(Y.events&&M.value!==!0)j.set(O,`__StxEvent<${Y.events}, ${JSON.stringify(w.replace(/^@|^v-on:/,"").split(".")[0])}>`);continue}let P=/^v-model(?::([\w-]+))?(?:\.[\w-]+)*$/.exec(w);if(w.startsWith("v-")&&!w.startsWith("v-bind:")&&!P)continue;if(/^(?:x-|:)(?:if|for|show|key|else)(?:$|[.:-])/.test(w))continue;let I=(P?P[1]||"modelValue":w.replace(/^:|^v-bind:/,"")).replace(/-([a-z])/g,(TJ,zJ)=>zJ.toUpperCase());if(N.push(I),!Y.props)continue;let jJ=w.startsWith(":")||w.startsWith("v-bind:")||!!P||M.braced?L:M.value!==!0?JSON.stringify(L):"true";H(F(O,jJ,w),";void ((",`) satisfies __StxProp<${Y.props}, ${JSON.stringify(I)}>);`)}if(Y.props){let M=[...new Set(N)].map((O)=>`${JSON.stringify(O)}: undefined as any`).join(", "),w=F(q.offset,`<${q.name}>`);J.push({expression:w,statement:{text:`;void ({ ${M} } satisfies ${Y.props} & Record<string, unknown>);`,prefixLength:0}})}}return{declarations:X.size?Q.join(`
20
- `):"",checks:J,events:j,dependencies:G}}var d=/<script(\s[^>]*)?>([\s\S]*?)<\/script>/gi;function GJ(K){let Z=($)=>$.replace(/[^\n]/g," ");return K.replace(/<!--[\s\S]*?-->/g,Z).replace(/\{\{--[\s\S]*?--\}\}/g,Z)}function c(K){let Z=[],$=GJ(K);d.lastIndex=0;let J;while((J=d.exec($))!==null){let Q=(J[1]||"").trim(),j=(J[0].match(/^<script(?:\s[^>]*)?>/i)?.[0]??"<script>").length,G=(J[0].match(/<\/script\s*>$/i)?.[0]??"</script>").length,W=J.index+j,U=J.index+J[0].length-G,z=K.slice(W,U);if(/\bsrc\s*=/.test(Q))continue;let V=Q.match(/\btype\s*=\s*["']([^"']+)["']/i);if(V&&!/^(?:module|text\/(?:javascript|typescript))$/i.test(V[1]))continue;let X=/\bserver\b/.test(Q)?"server":/\bclient\b/.test(Q)?"client":"plain",F=_(K,W);Z.push({kind:X,code:z,startLine:F,attrs:Q})}return Z}function _(K,Z){let $=1;for(let J=0;J<Z&&J<K.length;J++)if(K.charCodeAt(J)===10)$++;return $}function T(K,Z){let $=K.lastIndexOf(`
21
- `,Z-1)+1;return Z-$+1}function y(K){let Z=K.split(""),$=(Q,j)=>{for(let G=Q;G<j&&G<Z.length;G++)if(Z[G]!==`
22
- `)Z[G]=" "},J=[/<script(?:\s[^>]*)?>[\s\S]*?<\/script>/gi,/<style(?:\s[^>]*)?>[\s\S]*?<\/style>/gi,/<!--[\s\S]*?-->/g,/\{\{--[\s\S]*?--\}\}/g,/@verbatim\b[\s\S]*?@endverbatim\b/g];for(let Q of J){Q.lastIndex=0;let j;while((j=Q.exec(K))!==null)$(j.index,j.index+j[0].length)}return Z.join("")}function FJ(K){let Z=0,$="";for(let J=0;J<K.length;J++){let Q=K[J];if($){if(Q==="\\"){J++;continue}if(Q===$)$="";continue}if(Q==='"'||Q==="'"||Q==="`"){$=Q;continue}if(Q==="("||Q==="["||Q==="{"){Z++;continue}if(Q===")"||Q==="]"||Q==="}"){Z--;continue}if(Q==="|"&&Z===0){if(K[J+1]==="|"){J++;continue}if(K[J-1]==="|")continue;return K.slice(0,J)}}return K}var KJ=new Set([":for","x-for","v-for"]),A=/(?:^|\s)((?::|x-|v-|@)[\w.:-]+)\s*=\s*(["'])([\s\S]*?)\2/g,E="__stx_interpolated",i="__StxElement",QJ="__StxTemplateValue",XJ=`type ${QJ}<T> = T extends { readonly _isSignal: true } | { readonly _isDerived: true } ? (T extends () => infer V ? T & V : T) : T`;function n(K){return K.replace(/\{\{[\s\S]*?\}\}/g,E).replace(/\{!![\s\S]*?!!\}/g,E)}function nJ(K){return K.replace(/\{\{[\s\S]*?\}\}|\{!![\s\S]*?!!\}/g,(Z)=>{let $=Z.split(`
23
- `).length-1,J=Z.length-$;return`0${" ".repeat(Math.max(0,J-1))}${`
24
- `.repeat($)}`})}var VJ=["foreach","endforeach","forelse","endforelse","for","endfor","while","endwhile","empty","if","elseif","else","endif","unless","endunless","isset","endisset","switch","case","default","endswitch","auth","endauth","guest","endguest","env","endenv","once","endonce","break","continue"],HJ=new RegExp(String.raw`^[ \t]*@(?:${VJ.join("|")})\b[ \t]*(\([^\n)]*\))?[ \t]*$`,"gm");function rJ(K){return K.replace(HJ,(Z)=>Z.replace(/[^\n]/g," "))}var r=new Set(["x-cloak","x-ref","x-transition","x-teleport","v-slot","x-hydrate",":key","x-tooltip","x-tooltip-position"]);function YJ(K){let Z=y(K),$=[],J=/(@?)\{\{([\s\S]*?)\}\}|(@?)\{!!([\s\S]*?)!!\}/g,Q;while((Q=J.exec(Z))!==null){if(Q[1]||Q[3])continue;let G=Q[2]??Q[4]??"",W=Q[2]!==void 0?2:3,U=FJ(G);if(!U.trim())continue;let z=Q.index+W+(U.length-U.trimStart().length);$.push({code:U.trim(),line:_(Z,z),column:T(Z,z),offset:z,kind:"interpolation"})}A.lastIndex=0;while((Q=A.exec(Z))!==null){let j=Q[1],G=Q[3]??"",W=j.replace(/\..*$/,"").replace(/^([^:].*?):.*$/,"$1");if(r.has(W)||r.has(j))continue;if(!G.trim())continue;let U=Q.index+Q[0].indexOf(Q[2],Q[0].indexOf(j)+j.length)+1;if(KJ.has(W)){let V=G.match(/\s+(?:in|of)\s+/);if(!V||V.index===void 0)continue;let X=G.slice(V.index+V[0].length),F=V.index+V[0].length+(X.length-X.trimStart().length);$.push({code:n(X.trim()),line:_(Z,U+F),column:T(Z,U+F),offset:U+F,kind:"directive",attribute:W});continue}let z=G.length-G.trimStart().length;$.push({code:n(G.trim()),line:_(Z,U+z),column:T(Z,U+z),offset:U+z,kind:"directive",attribute:W})}return $.sort((j,G)=>j.line-G.line||j.column-G.column),$}var qJ=2000;function BJ(K,Z){let $=0,J=Math.min(K.length,Z+qJ);for(let Q=Z;Q<J;Q++){let j=K[Q];if(j==="(")$++;else if(j===")"){if($--,$===0)return K.slice(Z+1,Q)}}return null}function wJ(K){let Z=new Map,$=(W,U)=>{let z=W.split(/[,[\]{}()\s]+/).filter(Boolean);for(let V of z){let X=V.replace(/^\.\.\./,"").trim();if(!/^\$?[A-Z_$][\w$]*$/i.test(X))continue;let F=z.length===1?U:void 0,H=Z.get(X);if(!H)Z.set(X,{name:X,iterable:F});else if(H.iterable!==F)H.iterable=void 0}},J=/^\$?[A-Z_$][\w$]*$/i,Q=(W)=>{let U=W.trim();return J.test(U)?U:void 0};for(let W of K.matchAll(/@for(?:each|else)\s*\(/g)){let U=BJ(K,W.index+W[0].length-1);if(U===null)continue;let z=U.match(/^([\s\S]*?)\bas\b([\s\S]*)$/);if(!z)continue;$(z[2].replace(/=>/g," "),Q(z[1]))}for(let W of K.matchAll(/@for\s*\(\s*(?:let|const|var)\s+([\w$]+)/g))$(W[1]);let j=y(K);A.lastIndex=0;let G;while((G=A.exec(j))!==null){let W=G[1].replace(/\..*$/,"");if(!KJ.has(W))continue;let U=G[3].match(/\s+(?:in|of)\s+/);if(!U||U.index===void 0)continue;$(G[3].slice(0,U.index),Q(G[3].slice(U.index+U[0].length)))}for(let W of K.matchAll(/@(?:php|js|ts)\b([\s\S]*?)@end(?:php|js|ts)\b/g))for(let U of W[1].matchAll(/\b(?:const|let|var|function|class)\s+([\w$]+)/g))$(U[1]);return[...Z.values()].sort((W,U)=>W.name.localeCompare(U.name))}function v(K){let Z=new Set;for(let $ of K.matchAll(/^\s*(?:export\s+)?(?:const|let|var)\s+([\w$]+)/gm))Z.add($[1]);for(let $ of K.matchAll(/^\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([\w$]+)/gm))Z.add($[1]);for(let $ of K.matchAll(/^\s*(?:export\s+)?class\s+([\w$]+)/gm))Z.add($[1]);for(let $ of K.matchAll(/^\s*(?:export\s+)?(?:const|let|var)\s*[[{]([^\]}]*)[\]}]/gm))for(let J of $[1].split(",")){let Q=J.split(":").pop().split("=")[0].replace(/^\.\.\./,"").trim();if(/^[A-Z_$][\w$]*$/i.test(Q))Z.add(Q)}return[...Z].sort()}function MJ(){return["declare var window: any",...g.map((K)=>`declare var ${K}: any`)].join(`
25
- `)}var NJ=["params","query","cookies","host","ip","setResponseStatus","setResponseHeader","notFound","request","url","definePageMeta","defineClientPayload","defineStore","props","$props"];function DJ(){return NJ.map((K)=>`declare var ${K}: any`).join(`
26
- `)}function ZJ(K){let Z=/\bdefineClientPayload\s*\(\s*\{([\s\S]*?)\}\s*\)/g,$,J=!1,Q=new Set,j=D(K);while(($=Z.exec(j))!==null){J=!0;for(let G of OJ($[1])){let W=G.split(":")[0].trim();if(/^[A-Za-z_$][\w$]*$/.test(W))Q.add(W)}}return J?[...Q]:null}function OJ(K){let Z=[],$=0,J="";for(let Q of K){if(Q===","&&$===0){Z.push(J),J="";continue}if(Q==="("||Q==="["||Q==="{")$++;else if(Q===")"||Q==="]"||Q==="}")$--;J+=Q}return Z.push(J),Z.filter((Q)=>Q.trim().length>0)}function PJ(K){let Z=/^[ \t]*import\b[\s\S]*?(?:from\s*['"][^'"]*['"]|['"][^'"]*['"])[ \t]*;?[ \t]*$/gm,$=[],J=K.replace(Z,(Q)=>{return $.push(Q.trim()),Q.split(`
27
- `).map(()=>"").join(`
28
- `)});return{imports:$.join(`
29
- `),body:J}}function $J(K){let Z=D(K),$=Array(Z.length),J=0;for(let W=0;W<Z.length;W++){let U=Z[W];if(U==="}"||U===")"||U==="]")J=Math.max(0,J-1);if($[W]=J,U==="{"||U==="("||U==="[")J++}let Q=[],j=/^[ \t]*(?:export[ \t]+)?(interface|type)[ \t]+([A-Za-z_$][\w$]*)/gm,G;while((G=j.exec(Z))!==null){if($[G.index]!==0)continue;let W=G[1],U=G[2],z;if(W==="interface"){let V=Z.indexOf("{",G.index);if(V===-1)continue;let X=0;z=-1;for(let F=V;F<Z.length;F++)if(Z[F]==="{")X++;else if(Z[F]==="}"&&--X===0){z=F+1;break}if(z===-1)continue}else{let V=0;z=Z.length;for(let X=Z.indexOf("=",G.index)+1;X<Z.length;X++){let F=Z[X];if(F==="{"||F==="["||F==="("||F==="<")V++;else if(F==="}"||F==="]"||F===")"||F===">")V--;else if(V<=0&&(F===";"||F===`
30
- `&&!/[=|&,<([{]\s*$/.test(Z.slice(Math.max(0,X-40),X)))){z=F===";"?X+1:X;break}}}Q.push({name:U,text:K.slice(G.index,z).replace(/^[ \t]*export[ \t]+/,"")}),j.lastIndex=z}return Q}function IJ(K){return new Set($J(K).map((Z)=>Z.name))}function aJ(K,Z=""){let $=ZJ(K),J=IJ(Z),Q=$J(K).filter((z)=>!J.has(z.name)).map((z)=>z.text);if(!$){let z=v(K);if(z.length===0&&Q.length===0)return"";return["",`// ${SJ}`,...Q,...z.map((V)=>`declare var ${V}: any`)].join(`
31
- `)}if($.length===0)return Q.length>0?["",`// ${a}`,...Q].join(`
32
- `):"";let{imports:j,body:G}=PJ(K),W=G.replace(/^[ \t]*export[ \t]+(?=(?:const|let|var|function|async|class)\b)/gm,""),U=["",`// ${a}`];if(j)U.push(j);return U.push(...Q),U.push(`async function ${o}() {`,W,` return { ${$.join(", ")} }`,"}",`type ${t} = Awaited<ReturnType<typeof ${o}>>`,...$.map((z)=>`declare var ${z}: ${t}[${JSON.stringify(z)}]`)),U.join(`
33
- `)}function LJ(K){let $=D(K).split(""),J=0;for(let Q=0;Q<$.length;Q++){let j=$[Q];if(j==="{"||j==="("||j==="["){J++;continue}if(j==="}"||j===")"||j==="]"){J=Math.max(0,J-1);continue}if(J>0&&j!==`
34
- `)$[Q]=" "}return v($.join(""))}function oJ(K,Z){if(ZJ(K)!==null)return[];let $=D(Z),J=new Set(g);return LJ(K).filter((Q)=>{if(J.has(Q))return!1;if(v(Z).includes(Q))return!1;return new RegExp(`(?<![.#\\w$])${Q}(?![\\w$])`).test($)})}var a="stx: types for the declared client payload (#1868)",SJ="stx: untyped bridge names \u2014 declare a defineClientPayload to check these (#1868)",o="__stxServerScope",t="__StxClientPayload";var vJ=["$env","$user","$slot","$slots","$attrs","$props","$page","$route","$loop","loop","$errors","$csrf","props","slot"];var _J=/^\s*[A-Z_$][\w$]*\s*=[^=]/i;function yJ(K,Z){let $=/@(if|unless|elseif|else|endif|endunless)\b\s*(\()?/g,J=[],Q;while((Q=$.exec(K))!==null){if(Q.index>=Z)break;let j=Q[1];if(j==="endif"||j==="endunless"){J.pop();continue}let G="";if(Q[2]==="("){let W=0,U=Q.index+Q[0].length-1,z=U+1;for(;U<K.length;U++){let V=K[U];if(V==="(")W++;else if(V===")"){if(W--,W===0)break}}G=K.slice(z,U).trim(),$.lastIndex=U+1}if(j==="if")J.push({seen:[],current:G});else if(j==="unless")J.push({seen:[],current:`!(${G})`});else if(j==="elseif"||j==="else"){let W=J[J.length-1];if(!W)continue;if(W.current)W.seen.push(W.current);W.current=j==="elseif"?G:null}}return J.flatMap((j)=>[...j.seen.map((G)=>`!(${G})`),...j.current?[j.current]:[]]).filter(Boolean)}function AJ(K){let Z=K.code.trim();if(!Z)return null;if(K.attribute?.startsWith("@")){if(_J.test(Z))return null;let J=";(($event: any): void => { ";return{text:`${J}${Z} });`,prefixLength:J.length}}let $=";void ((";return{text:`${$}${Z}));`,prefixLength:$.length}}var RJ=/(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)(['"])(\.{1,2}\/[^'"\n]*)\2/g;function s(K,Z){if(!Z)return K;return K.replace(RJ,($,J,Q,j)=>{let G=JJ.resolve(Z,j).replace(/\\/g,"/");return`${J}${Q}${G}${Q}`})}function tJ(K,Z={}){let $=c(K),J=K.split(`
35
- `),Q=Array.from({length:J.length},()=>""),j=new Map,G=Z.filePath&&Z.templateExpressions!==!1?p(K,y(K),{filePath:Z.filePath,componentsDir:Z.componentsDir,projectRoot:Z.projectRoot,readComponent:Z.readComponent,scriptCode:(U,z)=>c(U).map((V)=>s(V.code,JJ.dirname(z))).join(`
36
- `)}):void 0;for(let U of $)s(U.code,Z.originDir??"").split(`
37
- `).forEach((V,X)=>{let F=U.startLine-1+X;if(F<Q.length)Q[F]=V});let W=(U,z)=>{for(let[V,X]of U.split(`
38
- `).entries())if(Q.push(X),z)j.set(Q.length,V===0?z:{...z,line:z.line+V,column:1,prefixLength:0})};if(Z.globals!==!1){if(W(""),Z.runtimeGlobals!==!1)for(let z of MJ().split(`
39
- `))W(z);for(let z of DJ().split(`
40
- `))W(z);for(let z of e)W(`declare var ${z}: any`);for(let z of vJ)W(`declare var ${z}: any`);W(`declare var ${E}: any`);let U=new Set($.flatMap((z)=>v(z.code)));W(`type ${i}<T> = T extends readonly (infer E)[] ? E : T extends Iterable<infer E2> ? E2 : any`);for(let z of wJ(K)){if(U.has(z.name))continue;let V=z.iterable&&U.has(z.iterable)?`${i}<typeof ${z.iterable}>`:"any";W(`declare var ${z.name}: ${V}`)}}if(Z.templateExpressions!==!1){if(G?.declarations)for(let z of G.declarations.split(`
41
- `))W(z);let U=YJ(K).map((z)=>{let V=G?.events.get(z.offset??-1);if(V){z.anchor=!0;let X=z.code.trim(),F=/^([\w$]+)\s*=\s*([^=][\s\S]*)$/.exec(X),H=F?`void ((${F[2]}) satisfies __StxAssignedValue<typeof ${F[1]}>)`:/^[\w$]+(?:\.[\w$]+)*$/.test(X)?`${X}($event)`:X,q=`;(($event: ${V}): void => { `;return{expression:z,statement:{text:`${q}${H} });`,prefixLength:q.length}}}return{expression:z,statement:AJ(z)}}).filter((z)=>z.statement!==null);if(U.push(...G?.checks||[]),U.length>0){let z=y(K),X=[...new Set($.flatMap((H)=>v(H.code)))].filter((H)=>/^[A-Z_$][\w$]*$/i.test(H)),F=0;if(X.length>0){W(XJ);for(let H of X)W(`type __StxT_${H} = ${QJ}<typeof ${H}>`);W(`;((${X.map((H)=>`${H}: __StxT_${H}`).join(", ")}) => {`),F=1}for(let{expression:H,statement:q}of U){let B=" ".repeat(F),Y=H.offset===void 0?[]:yJ(z,H.offset),N=Y.length>0?`${Y.map((w)=>`if (${w}) `).join("")}{ `:"",M=Y.length>0?" }":"";W(B+N+q.text+M,{line:H.line,column:H.column,expression:H,prefixLength:q.prefixLength+B.length+N.length})}if(F>0)W("});")}}return W("export {}"),{text:Q.join(`
42
- `),lineMap:j,sourceLineCount:J.length,componentDependencies:G?.dependencies}}function sJ(K,Z,$){let J=K.lineMap.get(Z);if(!J)return Z<=K.sourceLineCount?{line:Z,column:$}:null;let Q=J.expression?.anchor?0:Math.max(0,$-1-(J.prefixLength??0));return{line:J.line,column:J.column+Q,expression:J.expression}}
43
- export{c as Xf,nJ as Yf,rJ as Zf,YJ as _f,v as $f,DJ as ag,aJ as bg,oJ as cg,s as dg,tJ as eg,sJ as fg};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Al as e,Bl as f,Cl as g,wl as a,xl as b,yl as c,zl as d}from"./chunk-p1hy2bwn.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-vvd659y4.js";import"./chunk-hzfd8cz0.js";import"./chunk-hyfjnn7g.js";export{e as productionApiDispatcher,g as isServerApiSource,b as generateApiTypes,a as discoverServerApi,f as createServerApi,d as createApiDispatcher,c as buildServerApi};
@@ -1,30 +0,0 @@
1
- // @bun
2
- import{Gm as R,Om as k,Oo as l,To as T,Zp as m,cn as d,dn as c,ym as P,zm as D}from"./chunk-kxtqbrfr.js";import{Ht as S,Jt as v}from"./chunk-kffndzch.js";import{fw as XJ,hw as YJ,iw as ZJ}from"./chunk-hzfd8cz0.js";import{pw as QJ,sw as q}from"./chunk-hyfjnn7g.js";var n=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function r(J,Y,Q){let X={fullTag:Q,content:Y,attrs:J};if(/\bserver\b/.test(J))return{...X,type:"server"};if(/\bdata-stx-scoped\b/.test(J))return{...X,type:"client"};if(n.test(Y))return{...X,type:"signals"};if(/\bclient\b/.test(J)||/\btype\s*=\s*["']module["']/.test(J)||/\bsrc\s*=/.test(J))return{...X,type:"client"};return{...X,type:"server"}}var s=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function y(J){let Y=[],Q=[],X=[],$=0;while($<J.length){let Z=J.indexOf("<",$);if(Z===-1)break;let U=v(J,Z);if(U>Z){$=U;continue}let W=S(J,Z);if(W>Z){let j=J.slice(Z,W),F=s.exec(j);if(F){let K=r(F[1],F[2],j);switch(K.type){case"signals":Y.push(K);break;case"client":Q.push(K);break;case"server":X.push(K);break}}$=W;continue}$=Z+(J.startsWith("<!--",Z)?4:1)}return{signals:Y,client:Q,server:X}}var o=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function a(J){let Y=[],Q=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,X;while((X=Q.exec(J))!==null)Y.push({start:X.index,end:X.index+X[0].length});return Y}function C(J,Y){return Y.some((Q)=>J>=Q.start&&J<Q.end)}function t(J){let Y=(J||"").trim();if(!Y)return null;if(/[\s>+~,:]/.test(Y))return null;let Q={},X=Y,$=X.match(/^[a-z][\w-]*/i);if($)Q.tag=$[0].toLowerCase(),X=X.slice($[0].length);while(X.length>0){let Z=X.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(Z){if(Q.attr=Z[1],Z[3]!==void 0&&Z[3]!=="")Q.attrValue=Z[3];X=X.slice(Z[0].length);continue}let U=X.match(/^#([\w-]+)/);if(U){Q.id=U[1],X=X.slice(U[0].length);continue}let W=X.match(/^\.([\w-]+)/);if(W){Q.className=W[1],X=X.slice(W[0].length);continue}return null}if(!Q.tag&&!Q.attr&&!Q.id&&!Q.className)return null;return Q}function e(J,Y){if(Y.attr){if(!(Y.attrValue===void 0?new RegExp(`\\b${Y.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${Y.attr}\\s*=\\s*(["'])\\s*${Y.attrValue}\\s*\\1`,"i")).test(J))return!1}if(Y.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${Y.id}\\s*\\1`,"i").test(J))return!1}if(Y.className){let Q=J.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!Q)return!1;if(!Q[2].split(/\s+/).includes(Y.className))return!1}return!0}function x(J,Y="main"){let Q=t(Y);if(!Q)return null;let X=/<([a-z][\w-]*)\b([^>]*)>/gi,$=a(J),Z;while((Z=X.exec(J))!==null){if(C(Z.index,$))continue;let U=Z[1].toLowerCase(),W=Z[2]||"";if(W.trimEnd().endsWith("/")||o.has(U))continue;if(Q.tag&&Q.tag!==U)continue;if(!e(W,Q))continue;let j=Z[0],F=Z.index+j.length,K=new RegExp(`<(/?)${U}\\b([^>]*)>`,"gi");K.lastIndex=F;let G=1,B;while((B=K.exec(J))!==null){if(C(B.index,$))continue;let w=B[1]==="/";if(!w&&(B[2]||"").trimEnd().endsWith("/"))continue;if(G+=w?-1:1,G===0)return{openTag:j,openIndex:Z.index,start:F,end:B.index,tagName:U}}return null}return null}var wJ="X-STX-Router",NJ="private, no-store";function AJ(J){return J.replace(/&#(\d+);/g,(Y,Q)=>f(Number(Q),Y)).replace(/&#x([0-9a-f]+);/gi,(Y,Q)=>f(Number.parseInt(Q,16),Y)).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")}function f(J,Y){if(!Number.isInteger(J)||J<0||J>1114111)return Y;try{return String.fromCodePoint(J)}catch{return Y}}function g(J){return J.headers.get("X-STX-Router")==="true"}function JJ(J,Y){if(!J)return Y;return J.split(",").some((X)=>X.trim().toLowerCase()===Y.toLowerCase())?J:`${J}, ${Y}`}function IJ(J){return{Vary:JJ(J,"X-STX-Router")}}import E from"path";XJ();var $J="stx-page-head:",UJ=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,O=null;function WJ(){if(O!==null)return O;try{let{getRouterScript:J}=(ZJ(),QJ(YJ));O=`<script>${J()}</script>`}catch{O=""}return O}async function MJ(J,Y){if(Y===!1)return null;if(Y&&typeof Y==="string"){let X=E.resolve(J,Y);if(await Bun.file(X).exists())return X;return null}let Q=E.join(J,"app.stx");if(await Bun.file(Q).exists())return Q;return null}async function bJ(J,Y){try{let Q=await Bun.file(J).text(),X=Q,$=Q.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)X=$[1].trim();let Z=y(Q),U=[...Z.client.map((V)=>V.fullTag),...Z.signals.map((V)=>V.fullTag)],W=[],j=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,F;while((F=j.exec(Q))!==null)W.push(F[0]);let K=X;for(let V of Z.server)K=K.replace(V.fullTag,"");for(let V of Z.client)K=K.replace(V.fullTag,"");K=K.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let G="<!--__STX_PAGE_SLOT__-->";if(K=K.replace(/<slot\s*\/>/gi,G).replace(/<slot\s*>\s*<\/slot>/gi,G),!K.includes(G))return console.warn(`[stx] Shell ${J} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:B,extractVariables:w,defaultConfig:N,loadStxConfig:I}=await import("./chunk-eg8ksaft.js"),_=await I(),z={__filename:J,__dirname:E.dirname(J)};for(let V of U){let L=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(L&&!V.includes("client")&&!V.includes('type="module"'))await w(L[1],z,J)}let A=await B(K,z,J,{...N,..._,...Y},new Set),H=A.indexOf(G);if(H===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:A.substring(0,H),afterSlot:A.substring(H+G.length),filePath:J,shellScripts:U,shellStyles:W}}catch(Q){return console.error(`[stx] Error processing shell ${J}:`,Q),null}}function PJ(J,Y,Q){let X,$="",Z=Y.match(UJ);if(Z){Y=Y.replace(Z[0],"");try{let K=Buffer.from(Z[1],"base64").toString("utf8"),G=K.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(G)X=G[1].trim();$=K.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let U=Q||X||"stx App",W=WJ(),j="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>${U}</title>
8
- ${$?` ${$}
9
- `:""} ${J.shellStyles.join(`
10
- `)}
11
- </head>
12
- <body>
13
- ${J.beforeSlot}
14
- <div data-stx-content>${Y}</div>
15
- ${J.afterSlot}
16
- ${J.shellScripts.filter((K)=>!K.includes("server")).join(`
17
- `)}
18
- ${j}
19
- ${W}
20
- </body>
21
- </html>`}function jJ(J,Y={}){let Q=J.trim();if(!m(Q))return J;let X=[],$=Q.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if($){let j=$[1],F=/<style\b[^>]*>[\s\S]*?<\/style>/gi,K;while((K=F.exec(j))!==null)X.push(K[0]);let G=j.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);if(G)X.push(G[0]);let B=j.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);if(B)X.push(B[0])}if(Y.preserveHead&&$){let j=[],F=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,K;while((K=F.exec($[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(K[0]))continue;j.push(K[0])}if(j.length>0)X.unshift(`<!--${$J}${Buffer.from(j.join(`
22
- `),"utf8").toString("base64")}-->`)}let Z=Q.match(/<body\b[^>]*>/i),U=Q.lastIndexOf("</body>");if(Z&&U!==-1){let j=Z.index+Z[0].length,F=Q.slice(j,U).trim();if(X.length>0)return X.join(`
23
- `)+`
24
- `+F;return F}let W=Q;if(W=W.replace(/<!DOCTYPE\b[^>]*>/i,""),W=W.replace(/<html\b[^>]*>/i,""),W=W.replace(/<\/html\s*>/i,""),$)W=W.replace(/<head\b[^>]*>[\s\S]*?<\/head>/i,X.join(`
25
- `));return W=W.replace(/<body\b[^>]*>/i,""),W=W.replace(/<\/body\s*>/i,""),W.trim()}var u=/^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;function RJ(J){return g(J)}function kJ(J,Y="main"){let Q=J.trim(),X=[],$=[],Z=Q.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(Z){let I=Z[1],_=/<style\b[^>]*>[\s\S]*?<\/style>/gi,z;while((z=_.exec(I))!==null)X.push(z[0]);let A=/<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;while((z=A.exec(I))!==null){if(u.test(z[0])||z[0].includes("__stx_early_mounts")||/^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(z[0]))continue;$.push(z[0])}}let U=x(Q,Y);if(!U)return jJ(J);let{tagName:W,start:j,end:F}=U,K=Q.slice(j,F).trim(),G=[],B=Q.match(/<body\b[^>]*>/i),w=Q.lastIndexOf("</body>");if(B&&B.index!==void 0&&w!==-1){let _=[[B.index+B[0].length,U.openIndex],[F+`</${W}>`.length,w]],z=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[A,H]of _){if(A>=H)continue;let V=Q.slice(A,H),L;z.lastIndex=0;while((L=z.exec(V))!==null){if(u.test(L[0]))continue;G.push(L[0])}}}let N=[];if(X.length>0)N.push(X.join(`
26
- `));if($.length>0)N.push($.join(`
27
- `));if(G.length>0)N.push(G.join(`
28
- `));return N.push(K),N.join(`
29
- `)}import M from"fs";import h from"path";function CJ(J,Y,Q){return{version:1,buildTime:new Date().toISOString(),routes:J,assets:Y,outputDir:Q}}function xJ(J,Y){let Q=h.join(Y,"manifest.json");M.writeFileSync(Q,JSON.stringify(J,null,2))}function fJ(J){let Y=h.join(J,"manifest.json");if(!M.existsSync(Y))return null;try{let Q=M.readFileSync(Y,"utf-8"),X=JSON.parse(Q);if(X.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${X.version}`),null;return X}catch(Q){return console.warn("[stx] Failed to load manifest:",Q),null}}function b(J,Y,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(Y)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function KJ(J){let Y=J.headers.get("content-type")||"",Q={},X=($,Z)=>{let U=Q[$];if(U===void 0)Q[$]=Z;else if(Array.isArray(U))U.push(Z);else Q[$]=[U,Z]};if(Y.includes("multipart/form-data")){let $=await J.formData();for(let[Z,U]of $.entries())if(typeof U==="string")X(Z,U);return Q}if(Y.includes("application/x-www-form-urlencoded")){for(let[$,Z]of new URLSearchParams(await J.text()).entries())X($,Z);return Q}return Q}function FJ(J){if(!J)return!1;let Y=J.toUpperCase();return Y!=="GET"&&Y!=="HEAD"}async function p(J,Y={}){let Q=Y.request,X=Y.method??Q?.method;if(!Q||!FJ(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let $={};try{$=await KJ(Q)}catch{}let Z=await J.action({request:Q,form:$,params:Y.params??{},query:J.query??{},cookies:Y.cookies??{}});if(Z&&typeof Z==="object"){let U=Z,W=GJ(U.cookies),j=U.redirect;if(typeof j==="string"&&j)return{redirect:j,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:F,redirect:K,...G}=U;if(Object.assign(J,G),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function GJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let Y=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){Y.push(b(Q,X));continue}if(X&&typeof X==="object"){let $=X;if(typeof $.value!=="string")continue;Y.push(b(Q,$.value,$))}}return Y}function hJ(J,Y=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let $ of Y)X.append("Set-Cookie",$);for(let[$,Z]of Object.entries(Q??{}))if($.toLowerCase()!=="location")X.set($,Z);return new Response(null,{status:303,headers:X})}async function sJ(J,Y={}){return(await i(J,Y)).html}async function oJ(J,Y={}){let{html:Q,context:X,redirect:$,cookies:Z}=await i(J,Y),U=d(X),W=c(X);if($)return{html:Q,redirect:$,cookies:Z,status:U,headers:W};let{extractStreamBoundaries:j}=await import("./chunk-7ywnkv1f.js"),F=j(X),K=J.streamTemplates;if(K&&Object.keys(K).length>0){let{processDirectives:G}=await import("./chunk-63yfp05p.js"),{defaultConfig:B}=await import("./chunk-ssd10kje.js"),w=X.streamBoundaries||{},N={...B,autoShell:!1},I=Object.keys(K).map((z)=>({id:z,render:async()=>{let A=typeof w[z]==="function"?await w[z]():void 0;return G(K[z],{...X,$boundary:A},J.sourceFile,N,new Set)}})),_=new Set(I.map((z)=>z.id));F=[...(F||[]).filter((z)=>!_.has(z.id)),...I]}return{html:Q,boundaries:F&&F.length>0?F:void 0,cookies:Z,status:U,headers:W}}async function i(J,Y){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...Y};if(!J.hasServerScripts&&!D(J.html))return{html:J.html,context:Q};for(let U of J.serverScriptContent)try{await T(U,Q,J.sourceFile)}catch(W){if(Y.__stx_strict_hydration)throw W;console.warn(`[stx] Server script error in ${J.sourceFile}:`,W)}let X=await p(Q,{request:Y.request,method:Y.method,params:Y.params??{},cookies:Y.cookies??{}}),$=(U)=>{let W=U.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),j=l(Q);if(!j)return W;let F=W.indexOf("</head>");return F<0?j+W:W.slice(0,F)+j+W.slice(F)};if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!D(J.html))return{html:$(J.html),context:Q,cookies:X.cookies};let Z=new Map;for(let[U,W]of Object.entries(J.placeholders))if(W.expression)try{let j=k(W.expression,Q);if(W.type==="raw")Z.set(U,j!==void 0&&j!==null?String(j):"");else Z.set(U,j!==void 0&&j!==null?R(String(j)):"")}catch(j){if(Y.__stx_strict_hydration)throw j;Z.set(U,"")}return{html:$(P(J.html,Z)),context:Q,cookies:X.cookies}}async function aJ(J,Y={}){if(!J.hasServerScripts&&!D(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...Y};for(let $ of J.serverScriptContent)try{await T($,Q,J.sourceFile)}catch(Z){console.warn(`[stx] Server script error in ${J.sourceFile}:`,Z)}if(!D(J.fragment))return J.fragment;let X=new Map;for(let[$,Z]of Object.entries(J.placeholders))if(Z.expression)try{let U=k(Z.expression,Q);if(Z.type==="raw")X.set($,U!==void 0&&U!==null?String(U):"");else X.set($,U!==void 0&&U!==null?R(String(U)):"")}catch{X.set($,"")}return P(J.fragment,X)}
30
- export{r as gg,y as hg,t as ig,x as jg,wJ as kg,NJ as lg,AJ as mg,g as ng,JJ as og,IJ as pg,MJ as qg,bJ as rg,PJ as sg,jJ as tg,RJ as ug,kJ as vg,CJ as wg,xJ as xg,fJ as yg,b as zg,KJ as Ag,FJ as Bg,p as Cg,hJ as Dg,sJ as Eg,oJ as Fg,aJ as Gg};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{ct as Q}from"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import{Cu as R}from"./chunk-gptwwv3c.js";import"./chunk-hyfjnn7g.js";import O from"fs";import U from"path";async function W(j,b={}){let q=Date.now(),z={total:0,passed:0,failed:0,new:0,failures:[],duration:0},K=b.snapshotDir||R(j.root,"story","snapshots");await O.promises.mkdir(K,{recursive:!0});let B=j.storyFiles;if(b.filter&&b.filter.length>0)B=B.filter((J)=>b.filter.some((G)=>J.fileName.toLowerCase().includes(G.toLowerCase())));for(let J of B)await X(J,K,b,z);return z.duration=Date.now()-q,z}async function X(j,b,q,z){let K=j.story;if(!K)return;for(let B of K.variants){z.total++;let J=U.join(b,`${j.id}-${B.id}.snap`),G=Y(B.source||""),L=await _(J);if(q.update||!L){let M={storyId:j.id,variantId:B.id,component:j.fileName,timestamp:Date.now(),hash:G};if(await O.promises.writeFile(J,JSON.stringify(M,null,2)),!L)z.new++;z.passed++}else try{let M=await O.promises.readFile(J,"utf-8"),N=JSON.parse(M);if(N.hash===G)z.passed++;else z.failed++,z.failures.push({storyId:j.id,variantId:B.id,component:j.fileName,message:"Snapshot mismatch",difference:Z(N.hash,G)})}catch(M){z.failed++,z.failures.push({storyId:j.id,variantId:B.id,component:j.fileName,message:`Error reading snapshot: ${M}`})}}}async function A(j,b={}){return(await W(j,{...b,update:!0})).total}function Y(j){let b=0;for(let q=0;q<j.length;q++){let z=j.charCodeAt(q);b=(b<<5)-b+z,b=b&b}return b.toString(16)}function Z(j,b){if(j===b)return 0;let q=Math.abs(Number.parseInt(j,16)-Number.parseInt(b,16));return Math.min(q/1e6,1)}async function _(j){try{return await O.promises.access(j),!0}catch{return!1}}function I(j){let b=[];if(b.push(""),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(" STX Story Visual Regression Tests"),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(""),j.failures.length>0){b.push(" \u274C Failures:"),b.push("");for(let q of j.failures){if(b.push(` \u2022 ${q.component} / ${q.variantId}`),b.push(` ${q.message}`),q.difference!==void 0)b.push(` Difference: ${(q.difference*100).toFixed(2)}%`);b.push("")}}if(b.push(" Summary:"),b.push(` Total: ${j.total}`),b.push(` Passed: ${j.passed} \u2713`),b.push(` Failed: ${j.failed} \u2717`),j.new>0)b.push(` New: ${j.new} \u26A1`);return b.push(` Time: ${j.duration}ms`),b.push(""),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(""),b.join(`
3
- `)}async function S(j,b={}){let q=performance.now(),z=[],K=0,B=0;for(let G of j.storyFiles)try{let L=await Bun.file(G.path).text(),M=await Q(L,G.path);if(M.length>0){for(let N of M)z.push({storyId:G.id,variantId:"default",component:G.component,message:`A11y: ${N.message}`,expected:"No accessibility violations",actual:`${N.type}: ${N.message} (impact: ${N.impact})`});B++}else K++}catch(L){z.push({storyId:G.id,variantId:"default",component:G.component,message:`Failed to check a11y: ${L instanceof Error?L.message:String(L)}`,expected:"File readable for a11y check",actual:"File read error"}),B++}let J=performance.now()-q;return{total:j.storyFiles.length,passed:K,failed:B,new:0,failures:z,duration:J}}export{A as updateSnapshots,W as runVisualTests,S as runA11yTests,I as formatTestResults};