@bkm016/basalt 0.1.18 → 0.1.20

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 (979) hide show
  1. package/README.md +1 -1
  2. package/chunk-0b2brwjc.js +3 -0
  3. package/chunk-0bgg0hdd.js +2 -0
  4. package/chunk-0g8rtf05.js +18 -0
  5. package/chunk-0wwd4q6h.js +5 -0
  6. package/chunk-11xxfc0x.js +3 -0
  7. package/chunk-1gaj43fx.js +2 -0
  8. package/chunk-1tbv5t08.js +5 -0
  9. package/chunk-204c01mz.js +25 -0
  10. package/chunk-29g01nrz.js +20 -0
  11. package/chunk-2fts9k52.js +3 -0
  12. package/chunk-30bbdzma.js +16 -0
  13. package/chunk-3phf8eg6.js +3 -0
  14. package/chunk-3r38vbt5.js +2 -0
  15. package/chunk-3sg32v3n.js +2 -0
  16. package/chunk-4dgqcp6q.js +2 -0
  17. package/chunk-4fbj3k59.js +3 -0
  18. package/chunk-4wc2gbhe.js +2 -0
  19. package/chunk-51pfvmhh.js +470 -0
  20. package/chunk-5e7yegea.js +2 -0
  21. package/chunk-5ja0vsam.js +10 -0
  22. package/chunk-5tsfqsmf.js +2 -0
  23. package/chunk-6en06hkk.js +2 -0
  24. package/chunk-6hatfwsq.js +2 -0
  25. package/chunk-78ky455y.js +4 -0
  26. package/chunk-7kz9435k.js +11 -0
  27. package/chunk-8mqaq042.js +2 -0
  28. package/chunk-9qzyn98b.js +3 -0
  29. package/chunk-a1vdrgsh.js +59 -0
  30. package/chunk-a2z1cy84.js +2 -0
  31. package/chunk-a3fpx924.js +3 -0
  32. package/chunk-agb771ak.js +3 -0
  33. package/chunk-ak9rkrf3.js +5 -0
  34. package/chunk-as2mwf79.js +2 -0
  35. package/chunk-bkhsva5n.js +7 -0
  36. package/chunk-c5pg2875.js +3552 -0
  37. package/chunk-cks36jdh.js +8 -0
  38. package/chunk-cwrf78vs.js +3 -0
  39. package/chunk-d2f0hq8z.js +2 -0
  40. package/chunk-e0ytnnwt.js +3 -0
  41. package/chunk-e3bgzeb3.js +3 -0
  42. package/chunk-enmrpjpt.js +3 -0
  43. package/chunk-eps1epfr.js +4 -0
  44. package/chunk-ewr51fwc.js +3 -0
  45. package/chunk-eyyxqb6y.js +7 -0
  46. package/chunk-fgjw0r6g.js +12 -0
  47. package/chunk-g9hsrrj5.js +2 -0
  48. package/chunk-gg3kfa12.js +3 -0
  49. package/chunk-gpceyezp.js +2 -0
  50. package/chunk-gs5aebwh.js +2 -0
  51. package/chunk-h2pp8mnh.js +4 -0
  52. package/chunk-h4n0gg11.js +2 -0
  53. package/chunk-jzya0e5n.js +7 -0
  54. package/chunk-mde2dd79.js +2 -0
  55. package/chunk-ncb0tyaw.js +2 -0
  56. package/chunk-np2xnt1g.js +3 -0
  57. package/chunk-nszq2z0w.js +2 -0
  58. package/chunk-p0e82mee.js +3 -0
  59. package/chunk-qxpx8dn6.js +12 -0
  60. package/chunk-s819vmwh.js +3 -0
  61. package/chunk-s8m4svhf.js +3 -0
  62. package/chunk-sm9fpy18.js +390 -0
  63. package/chunk-svx7mz0w.js +25 -0
  64. package/chunk-tb3zsqe8.js +3 -0
  65. package/chunk-tp885r8h.js +39 -0
  66. package/chunk-tpeg9fkd.js +2 -0
  67. package/chunk-tpetsqzt.js +9 -0
  68. package/chunk-v0mw006s.js +15 -0
  69. package/chunk-v7da0aqn.js +7 -0
  70. package/chunk-vzrmdaba.js +2 -0
  71. package/chunk-w045zk55.js +2 -0
  72. package/chunk-w6nc3jn7.js +2 -0
  73. package/chunk-w9fdcchk.js +3 -0
  74. package/chunk-wj09qkyw.js +3 -0
  75. package/chunk-x1y4s01x.js +31 -0
  76. package/chunk-y3vap4a1.js +10 -0
  77. package/chunk-y83tnkr3.js +11 -0
  78. package/chunk-yk29stq0.js +5 -0
  79. package/chunk-ys2fds2x.js +3 -0
  80. package/chunk-yshdvnsp.js +2 -0
  81. package/chunk-z9p2ry9w.js +3 -0
  82. package/chunk-zkjnt298.js +3 -0
  83. package/compiled.js +10 -10
  84. package/package.json +1 -1
  85. package/ui-test-worker.js +37 -37
  86. package/web/chunk-08w40agf.js +34 -0
  87. package/web/chunk-08w40agf.js.br +0 -0
  88. package/web/chunk-08w40agf.js.gz +0 -0
  89. package/web/chunk-0bfypmyv.js +1 -0
  90. package/web/chunk-0bfypmyv.js.br +2 -0
  91. package/web/chunk-0bfypmyv.js.gz +0 -0
  92. package/web/chunk-0h0whn75.js +24 -0
  93. package/web/chunk-0h0whn75.js.br +0 -0
  94. package/web/chunk-0h0whn75.js.gz +0 -0
  95. package/web/chunk-0pzs9k06.js +1 -0
  96. package/web/chunk-0pzs9k06.js.br +0 -0
  97. package/web/chunk-0pzs9k06.js.gz +0 -0
  98. package/web/chunk-0rvx1z2b.js +1 -0
  99. package/web/chunk-0rvx1z2b.js.br +0 -0
  100. package/web/chunk-0rvx1z2b.js.gz +0 -0
  101. package/web/chunk-0tcmnvab.js +2 -0
  102. package/web/chunk-0tcmnvab.js.br +0 -0
  103. package/web/chunk-0tcmnvab.js.gz +0 -0
  104. package/web/chunk-0wqmwnd8.js +2 -0
  105. package/web/chunk-0wqmwnd8.js.br +0 -0
  106. package/web/chunk-0wqmwnd8.js.gz +0 -0
  107. package/web/chunk-0z10aqp1.js +2 -0
  108. package/web/chunk-0z10aqp1.js.br +0 -0
  109. package/web/chunk-0z10aqp1.js.gz +0 -0
  110. package/web/chunk-12vcrj7y.js +1 -0
  111. package/web/chunk-12vcrj7y.js.br +0 -0
  112. package/web/chunk-12vcrj7y.js.gz +0 -0
  113. package/web/chunk-186rp10x.js +62 -0
  114. package/web/chunk-186rp10x.js.br +0 -0
  115. package/web/chunk-186rp10x.js.gz +0 -0
  116. package/web/chunk-1cwyy3gh.js +2 -0
  117. package/web/chunk-1cwyy3gh.js.br +0 -0
  118. package/web/chunk-1cwyy3gh.js.gz +0 -0
  119. package/web/chunk-1ecsxh85.js +1 -0
  120. package/web/chunk-1ecsxh85.js.br +0 -0
  121. package/web/chunk-1ecsxh85.js.gz +0 -0
  122. package/web/chunk-1ghnag5v.js +2 -0
  123. package/web/chunk-1ghnag5v.js.br +0 -0
  124. package/web/chunk-1ghnag5v.js.gz +0 -0
  125. package/web/chunk-1ps9fj5n.js +2 -0
  126. package/web/chunk-1ps9fj5n.js.br +0 -0
  127. package/web/chunk-1ps9fj5n.js.gz +0 -0
  128. package/web/chunk-1ratg1jd.js +332 -0
  129. package/web/chunk-1ratg1jd.js.br +0 -0
  130. package/web/chunk-1ratg1jd.js.gz +0 -0
  131. package/web/chunk-1yvcxpp2.js +7 -0
  132. package/web/chunk-1yvcxpp2.js.br +0 -0
  133. package/web/chunk-1yvcxpp2.js.gz +0 -0
  134. package/web/chunk-2r3w0pt0.js +8 -0
  135. package/web/chunk-2r3w0pt0.js.br +0 -0
  136. package/web/chunk-2r3w0pt0.js.gz +0 -0
  137. package/web/chunk-2rnnvxa5.js +291 -0
  138. package/web/chunk-2rnnvxa5.js.br +0 -0
  139. package/web/chunk-2rnnvxa5.js.gz +0 -0
  140. package/web/chunk-2stffcvc.js +1 -0
  141. package/web/chunk-2stffcvc.js.br +0 -0
  142. package/web/chunk-2stffcvc.js.gz +0 -0
  143. package/web/chunk-2svqgkqw.js +1 -0
  144. package/web/chunk-2svqgkqw.js.br +0 -0
  145. package/web/chunk-2svqgkqw.js.gz +0 -0
  146. package/web/chunk-366a11ec.js +1 -0
  147. package/web/chunk-366a11ec.js.br +0 -0
  148. package/web/chunk-366a11ec.js.gz +0 -0
  149. package/web/chunk-37hmswdk.js +7 -0
  150. package/web/chunk-37hmswdk.js.br +0 -0
  151. package/web/chunk-37hmswdk.js.gz +0 -0
  152. package/web/chunk-3fd6mgf0.js +1 -0
  153. package/web/chunk-3fd6mgf0.js.br +0 -0
  154. package/web/chunk-3fd6mgf0.js.gz +0 -0
  155. package/web/chunk-4mypk63p.js +2 -0
  156. package/web/chunk-4mypk63p.js.br +0 -0
  157. package/web/chunk-4mypk63p.js.gz +0 -0
  158. package/web/chunk-52tt9qt4.js +2 -0
  159. package/web/chunk-52tt9qt4.js.br +0 -0
  160. package/web/chunk-52tt9qt4.js.gz +0 -0
  161. package/web/chunk-53cg6pxm.js +142 -0
  162. package/web/chunk-53cg6pxm.js.br +0 -0
  163. package/web/chunk-53cg6pxm.js.gz +0 -0
  164. package/web/chunk-59h87pvn.js +12 -0
  165. package/web/chunk-59h87pvn.js.br +0 -0
  166. package/web/chunk-59h87pvn.js.gz +0 -0
  167. package/web/chunk-5cp4n5ck.js +2 -0
  168. package/web/chunk-5cp4n5ck.js.br +0 -0
  169. package/web/chunk-5cp4n5ck.js.gz +0 -0
  170. package/web/chunk-6a3wt5c5.js +30 -0
  171. package/web/chunk-6a3wt5c5.js.br +0 -0
  172. package/web/chunk-6a3wt5c5.js.gz +0 -0
  173. package/web/chunk-6n1ha6ta.js +7 -0
  174. package/web/chunk-6n1ha6ta.js.br +0 -0
  175. package/web/chunk-6n1ha6ta.js.gz +0 -0
  176. package/web/chunk-6pbhqbv0.js +1 -0
  177. package/web/chunk-6pbhqbv0.js.br +0 -0
  178. package/web/chunk-6pbhqbv0.js.gz +0 -0
  179. package/web/chunk-72st75n7.js +70 -0
  180. package/web/chunk-72st75n7.js.br +0 -0
  181. package/web/chunk-72st75n7.js.gz +0 -0
  182. package/web/chunk-7cf1kk45.js +1 -0
  183. package/web/chunk-7cf1kk45.js.br +2 -0
  184. package/web/chunk-7cf1kk45.js.gz +0 -0
  185. package/web/chunk-7h59ac2b.js +38 -0
  186. package/web/chunk-7h59ac2b.js.br +0 -0
  187. package/web/chunk-7h59ac2b.js.gz +0 -0
  188. package/web/chunk-81xbfpbq.js +41 -0
  189. package/web/chunk-81xbfpbq.js.br +0 -0
  190. package/web/chunk-81xbfpbq.js.gz +0 -0
  191. package/web/chunk-82q4e8ff.js +1 -0
  192. package/web/chunk-82q4e8ff.js.br +0 -0
  193. package/web/chunk-82q4e8ff.js.gz +0 -0
  194. package/web/chunk-89crtpnw.js +1 -0
  195. package/web/chunk-89crtpnw.js.br +0 -0
  196. package/web/chunk-89crtpnw.js.gz +0 -0
  197. package/web/chunk-89e8629e.js +1 -0
  198. package/web/chunk-89e8629e.js.br +0 -0
  199. package/web/chunk-89e8629e.js.gz +0 -0
  200. package/web/chunk-9n1nsdqs.js +1 -0
  201. package/web/chunk-9n1nsdqs.js.br +0 -0
  202. package/web/chunk-9n1nsdqs.js.gz +0 -0
  203. package/web/chunk-9r7nbre7.js +2 -0
  204. package/web/chunk-9r7nbre7.js.br +0 -0
  205. package/web/chunk-9r7nbre7.js.gz +0 -0
  206. package/web/chunk-9y9nwaqj.js +1 -0
  207. package/web/chunk-9y9nwaqj.js.br +0 -0
  208. package/web/chunk-9y9nwaqj.js.gz +0 -0
  209. package/web/chunk-a8qe7kvz.js +1 -0
  210. package/web/chunk-a8qe7kvz.js.br +0 -0
  211. package/web/chunk-a8qe7kvz.js.gz +0 -0
  212. package/web/chunk-ahdca62g.js +1 -0
  213. package/web/chunk-ahdca62g.js.br +0 -0
  214. package/web/chunk-ahdca62g.js.gz +0 -0
  215. package/web/chunk-apr33amc.js +140 -0
  216. package/web/chunk-apr33amc.js.br +0 -0
  217. package/web/chunk-apr33amc.js.gz +0 -0
  218. package/web/chunk-aw9bwd4w.js +3 -0
  219. package/web/chunk-aw9bwd4w.js.br +0 -0
  220. package/web/chunk-aw9bwd4w.js.gz +0 -0
  221. package/web/chunk-bg0qgabv.js +1 -0
  222. package/web/chunk-bg0qgabv.js.br +0 -0
  223. package/web/chunk-bg0qgabv.js.gz +0 -0
  224. package/web/chunk-bks2k04k.js +2 -0
  225. package/web/chunk-bks2k04k.js.br +0 -0
  226. package/web/chunk-bks2k04k.js.gz +0 -0
  227. package/web/chunk-c28crzwk.js +120 -0
  228. package/web/chunk-c28crzwk.js.br +0 -0
  229. package/web/chunk-c28crzwk.js.gz +0 -0
  230. package/web/chunk-cmhxtckb.js +2 -0
  231. package/web/chunk-cmhxtckb.js.br +0 -0
  232. package/web/chunk-cmhxtckb.js.gz +0 -0
  233. package/web/chunk-d7f85w1y.js +1 -0
  234. package/web/chunk-d7f85w1y.js.br +0 -0
  235. package/web/chunk-d7f85w1y.js.gz +0 -0
  236. package/web/chunk-dmhezjv3.js +217 -0
  237. package/web/chunk-dmhezjv3.js.br +0 -0
  238. package/web/chunk-dmhezjv3.js.gz +0 -0
  239. package/web/chunk-dmzvhbpn.js +292 -0
  240. package/web/chunk-dmzvhbpn.js.br +0 -0
  241. package/web/chunk-dmzvhbpn.js.gz +0 -0
  242. package/web/chunk-e2z3kdhw.js +39 -0
  243. package/web/chunk-e2z3kdhw.js.br +0 -0
  244. package/web/chunk-e2z3kdhw.js.gz +0 -0
  245. package/web/chunk-e65y60v1.js +2 -0
  246. package/web/chunk-e65y60v1.js.br +0 -0
  247. package/web/chunk-e65y60v1.js.gz +0 -0
  248. package/web/chunk-ed8qqn45.js +2 -0
  249. package/web/chunk-ed8qqn45.js.br +0 -0
  250. package/web/chunk-ed8qqn45.js.gz +0 -0
  251. package/web/chunk-ef1h0tt7.js +2 -0
  252. package/web/chunk-ef1h0tt7.js.br +0 -0
  253. package/web/chunk-ef1h0tt7.js.gz +0 -0
  254. package/web/chunk-eqmghkwh.js +1 -0
  255. package/web/chunk-eqmghkwh.js.br +0 -0
  256. package/web/chunk-eqmghkwh.js.gz +0 -0
  257. package/web/chunk-esckazz2.js +1 -0
  258. package/web/chunk-esckazz2.js.br +0 -0
  259. package/web/chunk-esckazz2.js.gz +0 -0
  260. package/web/chunk-ezj5rjqr.js +4 -0
  261. package/web/chunk-ezj5rjqr.js.br +0 -0
  262. package/web/chunk-ezj5rjqr.js.gz +0 -0
  263. package/web/chunk-fjrgg82c.js +139 -0
  264. package/web/chunk-fjrgg82c.js.br +0 -0
  265. package/web/chunk-fjrgg82c.js.gz +0 -0
  266. package/web/chunk-g3vbtxgy.js +2 -0
  267. package/web/chunk-g3vbtxgy.js.br +0 -0
  268. package/web/chunk-g3vbtxgy.js.gz +0 -0
  269. package/web/chunk-gbcf0rdk.js +1 -0
  270. package/web/chunk-gbcf0rdk.js.br +0 -0
  271. package/web/chunk-gbcf0rdk.js.gz +0 -0
  272. package/web/chunk-gj6bdv1y.js +200 -0
  273. package/web/chunk-gj6bdv1y.js.br +0 -0
  274. package/web/chunk-gj6bdv1y.js.gz +0 -0
  275. package/web/chunk-gk1bc3c3.js +2 -0
  276. package/web/chunk-gk1bc3c3.js.br +0 -0
  277. package/web/chunk-gk1bc3c3.js.gz +0 -0
  278. package/web/chunk-gpjytpyw.js +2 -0
  279. package/web/chunk-gpjytpyw.js.br +0 -0
  280. package/web/chunk-gpjytpyw.js.gz +0 -0
  281. package/web/chunk-h1c0m3g4.js +99 -0
  282. package/web/chunk-h1c0m3g4.js.br +0 -0
  283. package/web/chunk-h1c0m3g4.js.gz +0 -0
  284. package/web/chunk-h1qv0cpd.css +1 -0
  285. package/web/chunk-h1qv0cpd.css.br +0 -0
  286. package/web/chunk-h1qv0cpd.css.gz +0 -0
  287. package/web/chunk-hj067dfg.js +1 -0
  288. package/web/chunk-hj067dfg.js.br +2 -0
  289. package/web/chunk-hj067dfg.js.gz +0 -0
  290. package/web/chunk-hq7e5xgd.js +1 -0
  291. package/web/chunk-hq7e5xgd.js.br +0 -0
  292. package/web/chunk-hq7e5xgd.js.gz +0 -0
  293. package/web/chunk-hqt1f3fm.js +24 -0
  294. package/web/chunk-hqt1f3fm.js.br +0 -0
  295. package/web/chunk-hqt1f3fm.js.gz +0 -0
  296. package/web/chunk-hwxj58j5.js +2 -0
  297. package/web/chunk-hwxj58j5.js.br +0 -0
  298. package/web/chunk-hwxj58j5.js.gz +0 -0
  299. package/web/chunk-hxzb25a8.js +1 -0
  300. package/web/chunk-hxzb25a8.js.br +0 -0
  301. package/web/chunk-hxzb25a8.js.gz +0 -0
  302. package/web/chunk-j4942vkb.js +1 -0
  303. package/web/chunk-j4942vkb.js.br +0 -0
  304. package/web/chunk-j4942vkb.js.gz +0 -0
  305. package/web/chunk-jmnzcm1f.js +21 -0
  306. package/web/chunk-jmnzcm1f.js.br +0 -0
  307. package/web/chunk-jmnzcm1f.js.gz +0 -0
  308. package/web/chunk-js940jjj.js +40 -0
  309. package/web/chunk-js940jjj.js.br +0 -0
  310. package/web/chunk-js940jjj.js.gz +0 -0
  311. package/web/chunk-jy9vkfbf.js +1 -0
  312. package/web/chunk-jy9vkfbf.js.br +0 -0
  313. package/web/chunk-jy9vkfbf.js.gz +0 -0
  314. package/web/chunk-k1d0y72z.js +2 -0
  315. package/web/chunk-k1d0y72z.js.br +0 -0
  316. package/web/chunk-k1d0y72z.js.gz +0 -0
  317. package/web/chunk-k4pknkvp.js +16 -0
  318. package/web/chunk-k4pknkvp.js.br +0 -0
  319. package/web/chunk-k4pknkvp.js.gz +0 -0
  320. package/web/chunk-k6fwzn0z.js +324 -0
  321. package/web/chunk-k6fwzn0z.js.br +0 -0
  322. package/web/chunk-k6fwzn0z.js.gz +0 -0
  323. package/web/chunk-kdegb6pd.js +169 -0
  324. package/web/chunk-kdegb6pd.js.br +0 -0
  325. package/web/chunk-kdegb6pd.js.gz +0 -0
  326. package/web/chunk-kedjfh66.js +2 -0
  327. package/web/chunk-kedjfh66.js.br +0 -0
  328. package/web/chunk-kedjfh66.js.gz +0 -0
  329. package/web/chunk-kh0xyffx.js +1 -0
  330. package/web/chunk-kh0xyffx.js.br +0 -0
  331. package/web/chunk-kh0xyffx.js.gz +0 -0
  332. package/web/chunk-ktvxgxsd.js +2 -0
  333. package/web/chunk-ktvxgxsd.js.br +0 -0
  334. package/web/chunk-ktvxgxsd.js.gz +0 -0
  335. package/web/chunk-mbpv2w5h.js +78 -0
  336. package/web/chunk-mbpv2w5h.js.br +0 -0
  337. package/web/chunk-mbpv2w5h.js.gz +0 -0
  338. package/web/chunk-mh3nkkpx.js +84 -0
  339. package/web/chunk-mh3nkkpx.js.br +0 -0
  340. package/web/chunk-mh3nkkpx.js.gz +0 -0
  341. package/web/chunk-mhzqgzh0.js +89 -0
  342. package/web/chunk-mhzqgzh0.js.br +0 -0
  343. package/web/chunk-mhzqgzh0.js.gz +0 -0
  344. package/web/chunk-mj8dzc8q.js +214 -0
  345. package/web/chunk-mj8dzc8q.js.br +0 -0
  346. package/web/chunk-mj8dzc8q.js.gz +0 -0
  347. package/web/chunk-mwfrxgbs.js +2 -0
  348. package/web/chunk-mwfrxgbs.js.br +0 -0
  349. package/web/chunk-mwfrxgbs.js.gz +0 -0
  350. package/web/chunk-n419cees.js +1 -0
  351. package/web/chunk-n419cees.js.br +0 -0
  352. package/web/chunk-n419cees.js.gz +0 -0
  353. package/web/chunk-n45fgfyt.js +1 -0
  354. package/web/chunk-n45fgfyt.js.br +2 -0
  355. package/web/chunk-n45fgfyt.js.gz +0 -0
  356. package/web/chunk-n5v71fas.js +2 -0
  357. package/web/chunk-n5v71fas.js.br +0 -0
  358. package/web/chunk-n5v71fas.js.gz +0 -0
  359. package/web/chunk-nb58m79v.js +89 -0
  360. package/web/chunk-nb58m79v.js.br +0 -0
  361. package/web/chunk-nb58m79v.js.gz +0 -0
  362. package/web/chunk-nsna2v2r.js +1 -0
  363. package/web/chunk-nsna2v2r.js.br +0 -0
  364. package/web/chunk-nsna2v2r.js.gz +0 -0
  365. package/web/chunk-nxdp58nf.js +1 -0
  366. package/web/chunk-nxdp58nf.js.br +0 -0
  367. package/web/chunk-nxdp58nf.js.gz +0 -0
  368. package/web/chunk-nytgs01h.js +1 -0
  369. package/web/chunk-nytgs01h.js.br +0 -0
  370. package/web/chunk-nytgs01h.js.gz +0 -0
  371. package/web/chunk-p76f6cf4.js +2 -0
  372. package/web/chunk-p76f6cf4.js.br +0 -0
  373. package/web/chunk-p76f6cf4.js.gz +0 -0
  374. package/web/chunk-pkxn54jm.js +1 -0
  375. package/web/chunk-pkxn54jm.js.br +0 -0
  376. package/web/chunk-pkxn54jm.js.gz +0 -0
  377. package/web/chunk-q0srq8g5.js +1 -0
  378. package/web/chunk-q0srq8g5.js.br +0 -0
  379. package/web/chunk-q0srq8g5.js.gz +0 -0
  380. package/web/chunk-qgtqwmkb.js +1 -0
  381. package/web/chunk-qgtqwmkb.js.br +2 -0
  382. package/web/chunk-qgtqwmkb.js.gz +0 -0
  383. package/web/chunk-qjg6dw46.js +1134 -0
  384. package/web/chunk-qjg6dw46.js.br +0 -0
  385. package/web/chunk-qjg6dw46.js.gz +0 -0
  386. package/web/chunk-qjjxevxe.js +1 -0
  387. package/web/chunk-qjjxevxe.js.br +0 -0
  388. package/web/chunk-qjjxevxe.js.gz +0 -0
  389. package/web/chunk-qx5ab39c.js +4 -0
  390. package/web/chunk-qx5ab39c.js.br +0 -0
  391. package/web/chunk-qx5ab39c.js.gz +0 -0
  392. package/web/chunk-qygjhm63.js +1 -0
  393. package/web/chunk-qygjhm63.js.br +0 -0
  394. package/web/chunk-qygjhm63.js.gz +0 -0
  395. package/web/chunk-recfg8af.js +2 -0
  396. package/web/chunk-recfg8af.js.br +0 -0
  397. package/web/chunk-recfg8af.js.gz +0 -0
  398. package/web/chunk-rfsg5rke.js +1 -0
  399. package/web/chunk-rfsg5rke.js.br +2 -0
  400. package/web/chunk-rfsg5rke.js.gz +0 -0
  401. package/web/chunk-s7h50avx.js +2 -0
  402. package/web/chunk-s7h50avx.js.br +0 -0
  403. package/web/chunk-s7h50avx.js.gz +0 -0
  404. package/web/chunk-sk47kk5j.js +1 -0
  405. package/web/chunk-sk47kk5j.js.br +0 -0
  406. package/web/chunk-sk47kk5j.js.gz +0 -0
  407. package/web/chunk-t9heac9a.js +2 -0
  408. package/web/chunk-t9heac9a.js.br +0 -0
  409. package/web/chunk-t9heac9a.js.gz +0 -0
  410. package/web/chunk-tg3f9xmp.js +1 -0
  411. package/web/chunk-tg3f9xmp.js.br +0 -0
  412. package/web/chunk-tg3f9xmp.js.gz +0 -0
  413. package/web/chunk-tgeeggkh.js +1 -0
  414. package/web/chunk-tgeeggkh.js.br +0 -0
  415. package/web/chunk-tgeeggkh.js.gz +0 -0
  416. package/web/chunk-v2bkkhb8.js +303 -0
  417. package/web/chunk-v2bkkhb8.js.br +0 -0
  418. package/web/chunk-v2bkkhb8.js.gz +0 -0
  419. package/web/chunk-v5p2fds9.js +36 -0
  420. package/web/chunk-v5p2fds9.js.br +0 -0
  421. package/web/chunk-v5p2fds9.js.gz +0 -0
  422. package/web/chunk-v6snw1sw.js +1 -0
  423. package/web/chunk-v6snw1sw.js.br +0 -0
  424. package/web/chunk-v6snw1sw.js.gz +0 -0
  425. package/web/chunk-veadbga2.js +1 -0
  426. package/web/chunk-veadbga2.js.br +2 -0
  427. package/web/chunk-veadbga2.js.gz +0 -0
  428. package/web/chunk-vh2prc6k.js +1 -0
  429. package/web/chunk-vh2prc6k.js.br +0 -0
  430. package/web/chunk-vh2prc6k.js.gz +0 -0
  431. package/web/chunk-vhpzp7zd.js +2 -0
  432. package/web/chunk-vhpzp7zd.js.br +0 -0
  433. package/web/chunk-vhpzp7zd.js.gz +0 -0
  434. package/web/chunk-vpbnyz43.js +98 -0
  435. package/web/chunk-vpbnyz43.js.br +0 -0
  436. package/web/chunk-vpbnyz43.js.gz +0 -0
  437. package/web/chunk-vxadngbp.js +2 -0
  438. package/web/chunk-vxadngbp.js.br +3 -0
  439. package/web/chunk-vxadngbp.js.gz +0 -0
  440. package/web/chunk-wa8wr2y9.js +106 -0
  441. package/web/chunk-wa8wr2y9.js.br +0 -0
  442. package/web/chunk-wa8wr2y9.js.gz +0 -0
  443. package/web/chunk-wbxz2bjb.js +1 -0
  444. package/web/chunk-wbxz2bjb.js.br +0 -0
  445. package/web/chunk-wbxz2bjb.js.gz +0 -0
  446. package/web/chunk-wgzatts8.js +1 -0
  447. package/web/chunk-wgzatts8.js.br +0 -0
  448. package/web/chunk-wgzatts8.js.gz +0 -0
  449. package/web/chunk-whczyxqw.js +1 -0
  450. package/web/chunk-whczyxqw.js.br +0 -0
  451. package/web/chunk-whczyxqw.js.gz +0 -0
  452. package/web/chunk-wmzz2crn.js +1 -0
  453. package/web/chunk-wmzz2crn.js.br +0 -0
  454. package/web/chunk-wmzz2crn.js.gz +0 -0
  455. package/web/chunk-wvqcbp4a.js +1 -0
  456. package/web/chunk-wvqcbp4a.js.br +0 -0
  457. package/web/chunk-wvqcbp4a.js.gz +0 -0
  458. package/web/chunk-wvvrdqgb.js +1 -0
  459. package/web/chunk-wvvrdqgb.js.br +2 -0
  460. package/web/chunk-wvvrdqgb.js.gz +0 -0
  461. package/web/chunk-x2hxq5yr.js +55 -0
  462. package/web/chunk-x2hxq5yr.js.br +0 -0
  463. package/web/chunk-x2hxq5yr.js.gz +0 -0
  464. package/web/chunk-x8bnp6vr.js +1 -0
  465. package/web/chunk-x8bnp6vr.js.br +0 -0
  466. package/web/chunk-x8bnp6vr.js.gz +0 -0
  467. package/web/chunk-xp9tdb5t.js +1 -0
  468. package/web/chunk-xp9tdb5t.js.br +2 -0
  469. package/web/chunk-xp9tdb5t.js.gz +0 -0
  470. package/web/chunk-xvmzsftt.js +2 -0
  471. package/web/chunk-xvmzsftt.js.br +0 -0
  472. package/web/chunk-xvmzsftt.js.gz +0 -0
  473. package/web/chunk-y10hsdq4.js +1 -0
  474. package/web/chunk-y10hsdq4.js.br +0 -0
  475. package/web/chunk-y10hsdq4.js.gz +0 -0
  476. package/web/chunk-ye7vge7s.js +1 -0
  477. package/web/chunk-ye7vge7s.js.br +0 -0
  478. package/web/chunk-ye7vge7s.js.gz +0 -0
  479. package/web/chunk-zbzgd8kn.js +2 -0
  480. package/web/chunk-zbzgd8kn.js.br +0 -0
  481. package/web/chunk-zbzgd8kn.js.gz +0 -0
  482. package/web/chunk-zhwqscat.js +1 -0
  483. package/web/chunk-zhwqscat.js.br +0 -0
  484. package/web/chunk-zhwqscat.js.gz +0 -0
  485. package/web/chunk-znrsm604.js +370 -0
  486. package/web/chunk-znrsm604.js.br +0 -0
  487. package/web/chunk-znrsm604.js.gz +0 -0
  488. package/web/chunk-zthww0ws.js +1 -0
  489. package/web/chunk-zthww0ws.js.br +0 -0
  490. package/web/chunk-zthww0ws.js.gz +0 -0
  491. package/web/index.html +3 -1
  492. package/web/index.html.br +0 -0
  493. package/web/index.html.gz +0 -0
  494. package/worker.js +1 -1
  495. package/chunk-02q61grt.js +0 -3
  496. package/chunk-03r6s8pm.js +0 -2
  497. package/chunk-09fsdkd3.js +0 -5
  498. package/chunk-0bg4w7ht.js +0 -3
  499. package/chunk-0s4r7k7j.js +0 -2
  500. package/chunk-27kw4nth.js +0 -2
  501. package/chunk-2ag9mvms.js +0 -10
  502. package/chunk-2shwjp8q.js +0 -3
  503. package/chunk-3114vstw.js +0 -2
  504. package/chunk-31meb34a.js +0 -2
  505. package/chunk-34w345mt.js +0 -2
  506. package/chunk-3amfr8zp.js +0 -7
  507. package/chunk-40nk2jjt.js +0 -2
  508. package/chunk-49bz6hg5.js +0 -25
  509. package/chunk-4hgkwa4k.js +0 -3
  510. package/chunk-4wfd77kc.js +0 -2
  511. package/chunk-55kpabb3.js +0 -2
  512. package/chunk-5p2asrj6.js +0 -2
  513. package/chunk-65hg0v7e.js +0 -2
  514. package/chunk-67qw30cj.js +0 -3770
  515. package/chunk-6rehcf49.js +0 -12
  516. package/chunk-6vkz3wqz.js +0 -25
  517. package/chunk-81yk0kj2.js +0 -3
  518. package/chunk-885vf5kb.js +0 -2
  519. package/chunk-8wy08x0d.js +0 -2
  520. package/chunk-9cqa9trx.js +0 -4
  521. package/chunk-ae45qq4z.js +0 -2
  522. package/chunk-ag3em5yv.js +0 -4
  523. package/chunk-b5k5p49x.js +0 -2
  524. package/chunk-b84vbfjc.js +0 -2
  525. package/chunk-dkpgstr2.js +0 -18
  526. package/chunk-dzn4c87v.js +0 -3
  527. package/chunk-e5xsyr0n.js +0 -3
  528. package/chunk-f97ma522.js +0 -3
  529. package/chunk-f9yneea6.js +0 -3
  530. package/chunk-fk43jgwe.js +0 -31
  531. package/chunk-frjqjdkx.js +0 -11
  532. package/chunk-fycz7ap5.js +0 -2
  533. package/chunk-fzefs6kn.js +0 -3
  534. package/chunk-g1n8k4dg.js +0 -5
  535. package/chunk-g5mdw639.js +0 -3
  536. package/chunk-gnvx44kj.js +0 -10
  537. package/chunk-gpympx0t.js +0 -467
  538. package/chunk-gyp2jn7d.js +0 -3
  539. package/chunk-hambwbfz.js +0 -7
  540. package/chunk-j02kqpvq.js +0 -5
  541. package/chunk-j1h7pabk.js +0 -7
  542. package/chunk-j6hn9qz6.js +0 -3
  543. package/chunk-jfx4c32t.js +0 -8
  544. package/chunk-jjj8a18b.js +0 -59
  545. package/chunk-k3c32v59.js +0 -3
  546. package/chunk-k8j3fvx5.js +0 -2
  547. package/chunk-kcn3af9r.js +0 -12
  548. package/chunk-m45dpnd1.js +0 -16
  549. package/chunk-m4wf04dz.js +0 -15
  550. package/chunk-m8k6t63k.js +0 -2
  551. package/chunk-nrggp4x6.js +0 -2
  552. package/chunk-nt549hv5.js +0 -2
  553. package/chunk-pg4mtrdy.js +0 -3
  554. package/chunk-psr4rxnn.js +0 -20
  555. package/chunk-qhhv81gd.js +0 -2
  556. package/chunk-qprms4rt.js +0 -2
  557. package/chunk-r0pm6dap.js +0 -3
  558. package/chunk-rck0kx09.js +0 -2
  559. package/chunk-rsn8ad6s.js +0 -2
  560. package/chunk-skzh3q1s.js +0 -2
  561. package/chunk-sm4b3q49.js +0 -3
  562. package/chunk-ste3ek53.js +0 -3
  563. package/chunk-trw86cmb.js +0 -11
  564. package/chunk-tv7met41.js +0 -3
  565. package/chunk-w33aapmk.js +0 -39
  566. package/chunk-wkqrsfrb.js +0 -389
  567. package/chunk-wxngqzqs.js +0 -3
  568. package/chunk-xafx1p7z.js +0 -3
  569. package/chunk-xgfqmm46.js +0 -2
  570. package/chunk-xr77j4f8.js +0 -9
  571. package/chunk-ykstnss8.js +0 -3
  572. package/chunk-yqv7ej5r.js +0 -5
  573. package/chunk-z97bcdg2.js +0 -3
  574. package/chunk-z9s7pwv5.js +0 -7
  575. package/web/chunk-013et20n.js +0 -2
  576. package/web/chunk-013et20n.js.br +0 -0
  577. package/web/chunk-013et20n.js.gz +0 -0
  578. package/web/chunk-0ernj3c0.js +0 -1
  579. package/web/chunk-0ernj3c0.js.br +0 -0
  580. package/web/chunk-0ernj3c0.js.gz +0 -0
  581. package/web/chunk-0j65yg1p.js +0 -1
  582. package/web/chunk-0j65yg1p.js.br +0 -0
  583. package/web/chunk-0j65yg1p.js.gz +0 -0
  584. package/web/chunk-0khcpaa8.js +0 -1
  585. package/web/chunk-0khcpaa8.js.br +0 -0
  586. package/web/chunk-0khcpaa8.js.gz +0 -0
  587. package/web/chunk-0wbdd74r.js +0 -1
  588. package/web/chunk-0wbdd74r.js.br +0 -2
  589. package/web/chunk-0wbdd74r.js.gz +0 -0
  590. package/web/chunk-1f2wvhq9.js +0 -1
  591. package/web/chunk-1f2wvhq9.js.br +0 -0
  592. package/web/chunk-1f2wvhq9.js.gz +0 -0
  593. package/web/chunk-1q2kmv35.js +0 -332
  594. package/web/chunk-1q2kmv35.js.br +0 -0
  595. package/web/chunk-1q2kmv35.js.gz +0 -0
  596. package/web/chunk-1tfrm3pk.js +0 -2
  597. package/web/chunk-1tfrm3pk.js.br +0 -0
  598. package/web/chunk-1tfrm3pk.js.gz +0 -0
  599. package/web/chunk-2qt5fy5n.js +0 -1
  600. package/web/chunk-2qt5fy5n.js.br +0 -0
  601. package/web/chunk-2qt5fy5n.js.gz +0 -0
  602. package/web/chunk-2sxtb709.js +0 -1
  603. package/web/chunk-2sxtb709.js.br +0 -0
  604. package/web/chunk-2sxtb709.js.gz +0 -0
  605. package/web/chunk-2wrwm0qe.js +0 -1
  606. package/web/chunk-2wrwm0qe.js.br +0 -0
  607. package/web/chunk-2wrwm0qe.js.gz +0 -0
  608. package/web/chunk-2wwj27b9.js +0 -7
  609. package/web/chunk-2wwj27b9.js.br +0 -0
  610. package/web/chunk-2wwj27b9.js.gz +0 -0
  611. package/web/chunk-33mmrjdp.js +0 -1
  612. package/web/chunk-33mmrjdp.js.br +0 -2
  613. package/web/chunk-33mmrjdp.js.gz +0 -0
  614. package/web/chunk-33tb7q04.js +0 -2
  615. package/web/chunk-33tb7q04.js.br +0 -0
  616. package/web/chunk-33tb7q04.js.gz +0 -0
  617. package/web/chunk-3txb4sha.js +0 -1
  618. package/web/chunk-3txb4sha.js.br +0 -0
  619. package/web/chunk-3txb4sha.js.gz +0 -0
  620. package/web/chunk-3xgfsx7y.js +0 -2
  621. package/web/chunk-3xgfsx7y.js.br +0 -0
  622. package/web/chunk-3xgfsx7y.js.gz +0 -0
  623. package/web/chunk-40jka4r7.js +0 -2
  624. package/web/chunk-40jka4r7.js.br +0 -0
  625. package/web/chunk-40jka4r7.js.gz +0 -0
  626. package/web/chunk-41vh5n86.js +0 -1
  627. package/web/chunk-41vh5n86.js.br +0 -0
  628. package/web/chunk-41vh5n86.js.gz +0 -0
  629. package/web/chunk-5kz048x3.js +0 -2
  630. package/web/chunk-5kz048x3.js.br +0 -0
  631. package/web/chunk-5kz048x3.js.gz +0 -0
  632. package/web/chunk-5mbz8yj9.js +0 -3
  633. package/web/chunk-5mbz8yj9.js.br +0 -0
  634. package/web/chunk-5mbz8yj9.js.gz +0 -0
  635. package/web/chunk-6024wfxb.js +0 -30
  636. package/web/chunk-6024wfxb.js.br +0 -0
  637. package/web/chunk-6024wfxb.js.gz +0 -0
  638. package/web/chunk-6ey4c6gw.js +0 -2
  639. package/web/chunk-6ey4c6gw.js.br +0 -0
  640. package/web/chunk-6ey4c6gw.js.gz +0 -0
  641. package/web/chunk-6q3p851n.js +0 -1
  642. package/web/chunk-6q3p851n.js.br +0 -2
  643. package/web/chunk-6q3p851n.js.gz +0 -0
  644. package/web/chunk-74g3wh08.js +0 -2
  645. package/web/chunk-74g3wh08.js.br +0 -0
  646. package/web/chunk-74g3wh08.js.gz +0 -0
  647. package/web/chunk-78akzkgs.js +0 -84
  648. package/web/chunk-78akzkgs.js.br +0 -0
  649. package/web/chunk-78akzkgs.js.gz +0 -0
  650. package/web/chunk-7ck99bsp.js +0 -62
  651. package/web/chunk-7ck99bsp.js.br +0 -0
  652. package/web/chunk-7ck99bsp.js.gz +0 -0
  653. package/web/chunk-7fjbyns9.js +0 -1
  654. package/web/chunk-7fjbyns9.js.br +0 -0
  655. package/web/chunk-7fjbyns9.js.gz +0 -0
  656. package/web/chunk-7n6b2xra.js +0 -21
  657. package/web/chunk-7n6b2xra.js.br +0 -0
  658. package/web/chunk-7n6b2xra.js.gz +0 -0
  659. package/web/chunk-7p4mcqkd.js +0 -78
  660. package/web/chunk-7p4mcqkd.js.br +0 -0
  661. package/web/chunk-7p4mcqkd.js.gz +0 -0
  662. package/web/chunk-7ztwkhg5.js +0 -1
  663. package/web/chunk-7ztwkhg5.js.br +0 -0
  664. package/web/chunk-7ztwkhg5.js.gz +0 -0
  665. package/web/chunk-823etvc3.js +0 -99
  666. package/web/chunk-823etvc3.js.br +0 -0
  667. package/web/chunk-823etvc3.js.gz +0 -0
  668. package/web/chunk-8ec53vjd.js +0 -1
  669. package/web/chunk-8ec53vjd.js.br +0 -0
  670. package/web/chunk-8ec53vjd.js.gz +0 -0
  671. package/web/chunk-8g55ytgz.js +0 -1
  672. package/web/chunk-8g55ytgz.js.br +0 -0
  673. package/web/chunk-8g55ytgz.js.gz +0 -0
  674. package/web/chunk-8nxjthxc.js +0 -1
  675. package/web/chunk-8nxjthxc.js.br +0 -0
  676. package/web/chunk-8nxjthxc.js.gz +0 -0
  677. package/web/chunk-8q76yd76.js +0 -291
  678. package/web/chunk-8q76yd76.js.br +0 -0
  679. package/web/chunk-8q76yd76.js.gz +0 -0
  680. package/web/chunk-9kbrjmtz.js +0 -1
  681. package/web/chunk-9kbrjmtz.js.br +0 -0
  682. package/web/chunk-9kbrjmtz.js.gz +0 -0
  683. package/web/chunk-9s4bh6qm.js +0 -40
  684. package/web/chunk-9s4bh6qm.js.br +0 -0
  685. package/web/chunk-9s4bh6qm.js.gz +0 -0
  686. package/web/chunk-9vf3zy3d.js +0 -2
  687. package/web/chunk-9vf3zy3d.js.br +0 -0
  688. package/web/chunk-9vf3zy3d.js.gz +0 -0
  689. package/web/chunk-a449xjq6.js +0 -7
  690. package/web/chunk-a449xjq6.js.br +0 -0
  691. package/web/chunk-a449xjq6.js.gz +0 -0
  692. package/web/chunk-b05eay33.js +0 -1
  693. package/web/chunk-b05eay33.js.br +0 -0
  694. package/web/chunk-b05eay33.js.gz +0 -0
  695. package/web/chunk-bdypt5mj.js +0 -142
  696. package/web/chunk-bdypt5mj.js.br +0 -0
  697. package/web/chunk-bdypt5mj.js.gz +0 -0
  698. package/web/chunk-ccy2q2z0.js +0 -2
  699. package/web/chunk-ccy2q2z0.js.br +0 -0
  700. package/web/chunk-ccy2q2z0.js.gz +0 -0
  701. package/web/chunk-ceg13tma.js +0 -2
  702. package/web/chunk-ceg13tma.js.br +0 -0
  703. package/web/chunk-ceg13tma.js.gz +0 -0
  704. package/web/chunk-ch60a61d.js +0 -2
  705. package/web/chunk-ch60a61d.js.br +0 -0
  706. package/web/chunk-ch60a61d.js.gz +0 -0
  707. package/web/chunk-czvdg0c5.js +0 -1
  708. package/web/chunk-czvdg0c5.js.br +0 -0
  709. package/web/chunk-czvdg0c5.js.gz +0 -0
  710. package/web/chunk-drr7mqg2.js +0 -1
  711. package/web/chunk-drr7mqg2.js.br +0 -0
  712. package/web/chunk-drr7mqg2.js.gz +0 -0
  713. package/web/chunk-dsa5m3h6.js +0 -200
  714. package/web/chunk-dsa5m3h6.js.br +0 -0
  715. package/web/chunk-dsa5m3h6.js.gz +0 -0
  716. package/web/chunk-dww3grm3.js +0 -24
  717. package/web/chunk-dww3grm3.js.br +0 -0
  718. package/web/chunk-dww3grm3.js.gz +0 -0
  719. package/web/chunk-e187gt5x.js +0 -1
  720. package/web/chunk-e187gt5x.js.br +0 -0
  721. package/web/chunk-e187gt5x.js.gz +0 -0
  722. package/web/chunk-emxa4wv3.js +0 -2
  723. package/web/chunk-emxa4wv3.js.br +0 -0
  724. package/web/chunk-emxa4wv3.js.gz +0 -0
  725. package/web/chunk-ey0zwvbx.js +0 -1
  726. package/web/chunk-ey0zwvbx.js.br +0 -0
  727. package/web/chunk-ey0zwvbx.js.gz +0 -0
  728. package/web/chunk-ey14knbn.js +0 -2
  729. package/web/chunk-ey14knbn.js.br +0 -0
  730. package/web/chunk-ey14knbn.js.gz +0 -0
  731. package/web/chunk-fba06jm8.js +0 -1132
  732. package/web/chunk-fba06jm8.js.br +0 -0
  733. package/web/chunk-fba06jm8.js.gz +0 -0
  734. package/web/chunk-fh56vgfx.js +0 -39
  735. package/web/chunk-fh56vgfx.js.br +0 -0
  736. package/web/chunk-fh56vgfx.js.gz +0 -0
  737. package/web/chunk-ft05x3my.js +0 -169
  738. package/web/chunk-ft05x3my.js.br +0 -0
  739. package/web/chunk-ft05x3my.js.gz +0 -0
  740. package/web/chunk-fzmrnh17.js +0 -303
  741. package/web/chunk-fzmrnh17.js.br +0 -0
  742. package/web/chunk-fzmrnh17.js.gz +0 -0
  743. package/web/chunk-gbt7asd7.js +0 -2
  744. package/web/chunk-gbt7asd7.js.br +0 -0
  745. package/web/chunk-gbt7asd7.js.gz +0 -0
  746. package/web/chunk-gh9fkn3t.js +0 -1
  747. package/web/chunk-gh9fkn3t.js.br +0 -2
  748. package/web/chunk-gh9fkn3t.js.gz +0 -0
  749. package/web/chunk-h1syyjqq.js +0 -2
  750. package/web/chunk-h1syyjqq.js.br +0 -0
  751. package/web/chunk-h1syyjqq.js.gz +0 -0
  752. package/web/chunk-h7byk4z3.js +0 -140
  753. package/web/chunk-h7byk4z3.js.br +0 -0
  754. package/web/chunk-h7byk4z3.js.gz +0 -0
  755. package/web/chunk-hby0hkv4.js +0 -1
  756. package/web/chunk-hby0hkv4.js.br +0 -0
  757. package/web/chunk-hby0hkv4.js.gz +0 -0
  758. package/web/chunk-hjvsp2yx.js +0 -1
  759. package/web/chunk-hjvsp2yx.js.br +0 -0
  760. package/web/chunk-hjvsp2yx.js.gz +0 -0
  761. package/web/chunk-hpjzy5ww.js +0 -1
  762. package/web/chunk-hpjzy5ww.js.br +0 -0
  763. package/web/chunk-hpjzy5ww.js.gz +0 -0
  764. package/web/chunk-hzfp8kqx.js +0 -217
  765. package/web/chunk-hzfp8kqx.js.br +0 -0
  766. package/web/chunk-hzfp8kqx.js.gz +0 -0
  767. package/web/chunk-j6jjk46a.js +0 -2
  768. package/web/chunk-j6jjk46a.js.br +0 -0
  769. package/web/chunk-j6jjk46a.js.gz +0 -0
  770. package/web/chunk-j8f0m1dq.js +0 -1
  771. package/web/chunk-j8f0m1dq.js.br +0 -0
  772. package/web/chunk-j8f0m1dq.js.gz +0 -0
  773. package/web/chunk-jc178ad5.js +0 -2
  774. package/web/chunk-jc178ad5.js.br +0 -0
  775. package/web/chunk-jc178ad5.js.gz +0 -0
  776. package/web/chunk-jcsf0ke5.js +0 -41
  777. package/web/chunk-jcsf0ke5.js.br +0 -0
  778. package/web/chunk-jcsf0ke5.js.gz +0 -0
  779. package/web/chunk-jg43a2xk.js +0 -139
  780. package/web/chunk-jg43a2xk.js.br +0 -0
  781. package/web/chunk-jg43a2xk.js.gz +0 -0
  782. package/web/chunk-jrgdxqtq.js +0 -7
  783. package/web/chunk-jrgdxqtq.js.br +0 -0
  784. package/web/chunk-jrgdxqtq.js.gz +0 -0
  785. package/web/chunk-js8dvtfg.js +0 -2
  786. package/web/chunk-js8dvtfg.js.br +0 -0
  787. package/web/chunk-js8dvtfg.js.gz +0 -0
  788. package/web/chunk-jt0s9qs7.js +0 -1
  789. package/web/chunk-jt0s9qs7.js.br +0 -0
  790. package/web/chunk-jt0s9qs7.js.gz +0 -0
  791. package/web/chunk-jv5faf88.js +0 -34
  792. package/web/chunk-jv5faf88.js.br +0 -0
  793. package/web/chunk-jv5faf88.js.gz +0 -0
  794. package/web/chunk-k295x81w.js +0 -370
  795. package/web/chunk-k295x81w.js.br +0 -0
  796. package/web/chunk-k295x81w.js.gz +0 -0
  797. package/web/chunk-k3aa37pw.js +0 -2
  798. package/web/chunk-k3aa37pw.js.br +0 -0
  799. package/web/chunk-k3aa37pw.js.gz +0 -0
  800. package/web/chunk-k6wxwgp1.js +0 -55
  801. package/web/chunk-k6wxwgp1.js.br +0 -0
  802. package/web/chunk-k6wxwgp1.js.gz +0 -0
  803. package/web/chunk-k9vc7kp2.js +0 -292
  804. package/web/chunk-k9vc7kp2.js.br +0 -0
  805. package/web/chunk-k9vc7kp2.js.gz +0 -0
  806. package/web/chunk-kxyws7q7.js +0 -1
  807. package/web/chunk-kxyws7q7.js.br +0 -0
  808. package/web/chunk-kxyws7q7.js.gz +0 -0
  809. package/web/chunk-mcgf645h.js +0 -1
  810. package/web/chunk-mcgf645h.js.br +0 -4
  811. package/web/chunk-mcgf645h.js.gz +0 -0
  812. package/web/chunk-mj3tshy8.js +0 -214
  813. package/web/chunk-mj3tshy8.js.br +0 -0
  814. package/web/chunk-mj3tshy8.js.gz +0 -0
  815. package/web/chunk-mnb2wdvy.js +0 -24
  816. package/web/chunk-mnb2wdvy.js.br +0 -0
  817. package/web/chunk-mnb2wdvy.js.gz +0 -0
  818. package/web/chunk-ndf58dgc.js +0 -1
  819. package/web/chunk-ndf58dgc.js.br +0 -0
  820. package/web/chunk-ndf58dgc.js.gz +0 -0
  821. package/web/chunk-nhpm5nd5.js +0 -2
  822. package/web/chunk-nhpm5nd5.js.br +0 -0
  823. package/web/chunk-nhpm5nd5.js.gz +0 -0
  824. package/web/chunk-nwxjdetb.js +0 -1
  825. package/web/chunk-nwxjdetb.js.br +0 -0
  826. package/web/chunk-nwxjdetb.js.gz +0 -0
  827. package/web/chunk-nyjfcard.js +0 -106
  828. package/web/chunk-nyjfcard.js.br +0 -0
  829. package/web/chunk-nyjfcard.js.gz +0 -0
  830. package/web/chunk-pcfjcy3a.js +0 -324
  831. package/web/chunk-pcfjcy3a.js.br +0 -0
  832. package/web/chunk-pcfjcy3a.js.gz +0 -0
  833. package/web/chunk-pry6wdbe.js +0 -1
  834. package/web/chunk-pry6wdbe.js.br +0 -0
  835. package/web/chunk-pry6wdbe.js.gz +0 -0
  836. package/web/chunk-pvahdcgy.js +0 -2
  837. package/web/chunk-pvahdcgy.js.br +0 -0
  838. package/web/chunk-pvahdcgy.js.gz +0 -0
  839. package/web/chunk-q3njnnef.js +0 -16
  840. package/web/chunk-q3njnnef.js.br +0 -0
  841. package/web/chunk-q3njnnef.js.gz +0 -0
  842. package/web/chunk-qxvqkkmw.js +0 -1
  843. package/web/chunk-qxvqkkmw.js.br +0 -0
  844. package/web/chunk-qxvqkkmw.js.gz +0 -0
  845. package/web/chunk-qych3sbs.js +0 -1
  846. package/web/chunk-qych3sbs.js.br +0 -0
  847. package/web/chunk-qych3sbs.js.gz +0 -0
  848. package/web/chunk-rbmp2e4b.js +0 -1
  849. package/web/chunk-rbmp2e4b.js.br +0 -0
  850. package/web/chunk-rbmp2e4b.js.gz +0 -0
  851. package/web/chunk-rcre1stj.js +0 -1
  852. package/web/chunk-rcre1stj.js.br +0 -0
  853. package/web/chunk-rcre1stj.js.gz +0 -0
  854. package/web/chunk-rdb6091n.js +0 -89
  855. package/web/chunk-rdb6091n.js.br +0 -0
  856. package/web/chunk-rdb6091n.js.gz +0 -0
  857. package/web/chunk-ryw7xnab.js +0 -1
  858. package/web/chunk-ryw7xnab.js.br +0 -0
  859. package/web/chunk-ryw7xnab.js.gz +0 -0
  860. package/web/chunk-sbbmy02e.js +0 -2
  861. package/web/chunk-sbbmy02e.js.br +0 -0
  862. package/web/chunk-sbbmy02e.js.gz +0 -0
  863. package/web/chunk-sgbc835w.js +0 -2
  864. package/web/chunk-sgbc835w.js.br +0 -0
  865. package/web/chunk-sgbc835w.js.gz +0 -0
  866. package/web/chunk-sydy10mb.js +0 -1
  867. package/web/chunk-sydy10mb.js.br +0 -0
  868. package/web/chunk-sydy10mb.js.gz +0 -0
  869. package/web/chunk-t0ywnp5e.js +0 -1
  870. package/web/chunk-t0ywnp5e.js.br +0 -0
  871. package/web/chunk-t0ywnp5e.js.gz +0 -0
  872. package/web/chunk-t72jq97z.js +0 -2
  873. package/web/chunk-t72jq97z.js.br +0 -0
  874. package/web/chunk-t72jq97z.js.gz +0 -0
  875. package/web/chunk-tfcc9bcz.js +0 -4
  876. package/web/chunk-tfcc9bcz.js.br +0 -0
  877. package/web/chunk-tfcc9bcz.js.gz +0 -0
  878. package/web/chunk-v2bvbgfc.js +0 -2
  879. package/web/chunk-v2bvbgfc.js.br +0 -0
  880. package/web/chunk-v2bvbgfc.js.gz +0 -0
  881. package/web/chunk-v7zq4vc9.js +0 -12
  882. package/web/chunk-v7zq4vc9.js.br +0 -0
  883. package/web/chunk-v7zq4vc9.js.gz +0 -0
  884. package/web/chunk-vh8pkcem.css +0 -1
  885. package/web/chunk-vh8pkcem.css.br +0 -0
  886. package/web/chunk-vh8pkcem.css.gz +0 -0
  887. package/web/chunk-vq3sby7x.js +0 -1
  888. package/web/chunk-vq3sby7x.js.br +0 -0
  889. package/web/chunk-vq3sby7x.js.gz +0 -0
  890. package/web/chunk-vszya05r.js +0 -2
  891. package/web/chunk-vszya05r.js.br +0 -0
  892. package/web/chunk-vszya05r.js.gz +0 -0
  893. package/web/chunk-was9xf03.js +0 -8
  894. package/web/chunk-was9xf03.js.br +0 -0
  895. package/web/chunk-was9xf03.js.gz +0 -0
  896. package/web/chunk-we1v1829.js +0 -2
  897. package/web/chunk-we1v1829.js.br +0 -0
  898. package/web/chunk-we1v1829.js.gz +0 -0
  899. package/web/chunk-wfa1c8dn.js +0 -1
  900. package/web/chunk-wfa1c8dn.js.br +0 -0
  901. package/web/chunk-wfa1c8dn.js.gz +0 -0
  902. package/web/chunk-wg2exnxe.js +0 -1
  903. package/web/chunk-wg2exnxe.js.br +0 -2
  904. package/web/chunk-wg2exnxe.js.gz +0 -0
  905. package/web/chunk-wvd3zj1m.js +0 -70
  906. package/web/chunk-wvd3zj1m.js.br +0 -0
  907. package/web/chunk-wvd3zj1m.js.gz +0 -0
  908. package/web/chunk-wzmxtr30.js +0 -1
  909. package/web/chunk-wzmxtr30.js.br +0 -0
  910. package/web/chunk-wzmxtr30.js.gz +0 -0
  911. package/web/chunk-x815g7yp.js +0 -1
  912. package/web/chunk-x815g7yp.js.br +0 -0
  913. package/web/chunk-x815g7yp.js.gz +0 -0
  914. package/web/chunk-x8ps0p82.js +0 -98
  915. package/web/chunk-x8ps0p82.js.br +0 -0
  916. package/web/chunk-x8ps0p82.js.gz +0 -0
  917. package/web/chunk-xea3snym.js +0 -1
  918. package/web/chunk-xea3snym.js.br +0 -0
  919. package/web/chunk-xea3snym.js.gz +0 -0
  920. package/web/chunk-xg4v60m7.js +0 -1
  921. package/web/chunk-xg4v60m7.js.br +0 -0
  922. package/web/chunk-xg4v60m7.js.gz +0 -0
  923. package/web/chunk-xhr9jrjt.js +0 -89
  924. package/web/chunk-xhr9jrjt.js.br +0 -0
  925. package/web/chunk-xhr9jrjt.js.gz +0 -0
  926. package/web/chunk-xp90g2e7.js +0 -36
  927. package/web/chunk-xp90g2e7.js.br +0 -0
  928. package/web/chunk-xp90g2e7.js.gz +0 -0
  929. package/web/chunk-xs1g97qa.js +0 -2
  930. package/web/chunk-xs1g97qa.js.br +0 -0
  931. package/web/chunk-xs1g97qa.js.gz +0 -0
  932. package/web/chunk-xyk1wpr4.js +0 -1
  933. package/web/chunk-xyk1wpr4.js.br +0 -3
  934. package/web/chunk-xyk1wpr4.js.gz +0 -0
  935. package/web/chunk-yavbdwyt.js +0 -1
  936. package/web/chunk-yavbdwyt.js.br +0 -0
  937. package/web/chunk-yavbdwyt.js.gz +0 -0
  938. package/web/chunk-yfnhnsxe.js +0 -4
  939. package/web/chunk-yfnhnsxe.js.br +0 -0
  940. package/web/chunk-yfnhnsxe.js.gz +0 -0
  941. package/web/chunk-yk965yth.js +0 -1
  942. package/web/chunk-yk965yth.js.br +0 -0
  943. package/web/chunk-yk965yth.js.gz +0 -0
  944. package/web/chunk-ynhcjhsx.js +0 -2
  945. package/web/chunk-ynhcjhsx.js.br +0 -0
  946. package/web/chunk-ynhcjhsx.js.gz +0 -0
  947. package/web/chunk-ypmm1gts.js +0 -1
  948. package/web/chunk-ypmm1gts.js.br +0 -0
  949. package/web/chunk-ypmm1gts.js.gz +0 -0
  950. package/web/chunk-yssx5a5q.js +0 -1
  951. package/web/chunk-yssx5a5q.js.br +0 -0
  952. package/web/chunk-yssx5a5q.js.gz +0 -0
  953. package/web/chunk-z0a8cnq8.js +0 -1
  954. package/web/chunk-z0a8cnq8.js.br +0 -0
  955. package/web/chunk-z0a8cnq8.js.gz +0 -0
  956. package/web/chunk-z1afsvbv.js +0 -2
  957. package/web/chunk-z1afsvbv.js.br +0 -0
  958. package/web/chunk-z1afsvbv.js.gz +0 -0
  959. package/web/chunk-z1ka8jtd.js +0 -2
  960. package/web/chunk-z1ka8jtd.js.br +0 -0
  961. package/web/chunk-z1ka8jtd.js.gz +0 -0
  962. package/web/chunk-z7tdzen9.js +0 -1
  963. package/web/chunk-z7tdzen9.js.br +0 -0
  964. package/web/chunk-z7tdzen9.js.gz +0 -0
  965. package/web/chunk-zbwjj06m.js +0 -38
  966. package/web/chunk-zbwjj06m.js.br +0 -0
  967. package/web/chunk-zbwjj06m.js.gz +0 -0
  968. package/web/chunk-zd2j189j.js +0 -1
  969. package/web/chunk-zd2j189j.js.br +0 -0
  970. package/web/chunk-zd2j189j.js.gz +0 -0
  971. package/web/chunk-zfgpq4n4.js +0 -120
  972. package/web/chunk-zfgpq4n4.js.br +0 -0
  973. package/web/chunk-zfgpq4n4.js.gz +0 -0
  974. package/web/chunk-zgas56xw.js +0 -1
  975. package/web/chunk-zgas56xw.js.br +0 -0
  976. package/web/chunk-zgas56xw.js.gz +0 -0
  977. package/web/chunk-zkfepf91.js +0 -1
  978. package/web/chunk-zkfepf91.js.br +0 -0
  979. package/web/chunk-zkfepf91.js.gz +0 -0
Binary file
Binary file
@@ -0,0 +1,12 @@
1
+ import{ss,_r,Oi,ls,qr,cs,ai}from"./chunk-qjg6dw46.js";var S=class extends Error{constructor(t){super(t);this.name="ShikiError"}};function tn(t){return Ne(t)}function Ne(t){if(Array.isArray(t))return nn(t);if(t instanceof RegExp)return t;if(typeof t==="object")return rn(t);return t}function nn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ne(t[n]);return e}function rn(t){let e={};for(let n in t)e[n]=Ne(t[n]);return e}function Ve(t,...e){return e.forEach((n)=>{for(let r in n)t[r]=n[r]}),t}function Ye(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");if(e===0)return t;else if(~e===t.length-1)return Ye(t.substring(0,t.length-1));else return t.substr(~e+1)}var ye=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,J=class{static hasCaptures(t){if(t===null)return!1;return ye.lastIndex=0,ye.test(t)}static replaceCaptures(t,e,n){return t.replace(ye,(r,s,i,o)=>{let a=n[parseInt(s||i,10)];if(a){let c=e.substring(a.start,a.end);while(c[0]===".")c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function Je(t,e){if(t<e)return-1;if(t>e)return 1;return 0}function Qe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let i=Je(t[s],e[s]);if(i!==0)return i}return 0}return n-r}function Fe(t){if(/^#[0-9a-f]{6}$/i.test(t))return!0;if(/^#[0-9a-f]{8}$/i.test(t))return!0;if(/^#[0-9a-f]{3}$/i.test(t))return!0;if(/^#[0-9a-f]{4}$/i.test(t))return!0;return!1}function Xe(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ze=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},M=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(an(t),e)}static createFromParsedTheme(t,e){return ln(t,e)}_cachedMatchRoot=new Ze((t)=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find((s)=>sn(t.parent,s.parentScopes));if(!r)return null;return new et(r.fontStyle,r.foreground,r.background)}},be=class t{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(let r of n)e=new t(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new t(n,e[r]);return n}push(e){return new t(this,e)}getSegments(){let e=this,n=[];while(e)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){if(this===e)return!0;if(this.parent===null)return!1;return this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function sn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}while(t){if(on(t.scopeName,r))break;if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function on(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var et=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function an(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let a;if(typeof o.scope==="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else if(Array.isArray(o.scope))a=o.scope;else a=[""];let c=-1;if(typeof o.settings.fontStyle==="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;if(typeof o.settings.foreground==="string"&&Fe(o.settings.foreground))l=o.settings.foreground;let u=null;if(typeof o.settings.background==="string"&&Fe(o.settings.background))u=o.settings.background;for(let h=0,d=a.length;h<d;h++){let m=a[h].trim().split(" "),y=m[m.length-1],_=null;if(m.length>1)_=m.slice(0,m.length-1),_.reverse();n[r++]=new cn(y,_,s,c,l,u)}}return n}var cn=class{constructor(t,e,n,r,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},k=((t)=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(k||{});function ln(t,e){t.sort((c,l)=>{let u=Je(c.scope,l.scope);if(u!==0)return u;if(u=Qe(c.parentScopes,l.parentScopes),u!==0)return u;return c.index-l.index});let n=0,r="#000000",s="#ffffff";while(t.length>=1&&t[0].scope===""){let c=t.shift();if(c.fontStyle!==-1)n=c.fontStyle;if(c.foreground!==null)r=c.foreground;if(c.background!==null)s=c.background}let i=new un(e),o=new et(n,i.getId(r),i.getId(s)),a=new fn(new we(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new M(i,o,a)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},hn=Object.freeze([]),we=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,i){this.scopeDepth=e,this.parentScopes=n||hn,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){if(this.scopeDepth>e)console.log("how did this happen?");else this.scopeDepth=e;if(n!==-1)this.fontStyle=n;if(r!==0)this.foreground=r;if(s!==0)this.background=s}},fn=class t{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;while(!0){if(e.parentScopes[r]===">")r++;if(n.parentScopes[s]===">")s++;if(r>=e.parentScopes.length||s>=n.parentScopes.length)break;let i=n.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1)s=e,i="";else s=e.substring(0,r),i=e.substring(r+1);if(this._children.hasOwnProperty(s))return this._children[s].match(i)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,r,s,i,o){if(n===""){this._doInsertHere(e,r,s,i,o);return}let a=n.indexOf("."),c,l;if(a===-1)c=n,l="";else c=n.substring(0,a),l=n.substring(a+1);let u;if(this._children.hasOwnProperty(c))u=this._children[c];else u=new t(this._mainRule.clone(),we.cloneArr(this._rulesWithParentScopes)),this._children[c]=u;u.insert(e+1,l,r,s,i,o)}_doInsertHere(e,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(Qe(c.parentScopes,n)===0){c.acceptOverwrite(e,r,s,i);return}}if(r===-1)r=this._mainRule.fontStyle;if(s===0)s=this._mainRule.foreground;if(i===0)i=this._mainRule.background;this._rulesWithParentScopes.push(new we(e,n,r,s,i))}},x=class t{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=t.getLanguageId(e),r=t.getTokenType(e),s=t.getFontStyle(e),i=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,i,o,a){let c=t.getLanguageId(e),l=t.getTokenType(e),u=t.containsBalancedBrackets(e)?1:0,h=t.getFontStyle(e),d=t.getForeground(e),f=t.getBackground(e);if(n!==0)c=n;if(r!==8)l=mn(r);if(s!==null)u=s?1:0;if(i!==-1)h=i;if(o!==0)d=o;if(a!==0)f=a;return(c<<0|l<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function dn(t){return t}function mn(t){return t}function X(t,e){let n=[],r=gn(t),s=r.next();while(s!==null){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(n.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();let c=i();return(l)=>!!c&&!c(l)}if(s==="("){s=r.next();let c=a();if(s===")")s=r.next();return c}if(De(s)){let c=[];do c.push(s),s=r.next();while(De(s));return(l)=>e(c,l)}return null}function o(){let c=[],l=i();while(l)c.push(l),l=i();return(u)=>c.every((h)=>h(u))}function a(){let c=[],l=o();while(l){if(c.push(l),s==="|"||s===",")do s=r.next();while(s==="|"||s===",");else break;l=o()}return(u)=>c.some((h)=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function gn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function tt(t){if(typeof t.dispose==="function")t.dispose()}var j=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},pn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},_n=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();if(this._seenReferenceKeys.has(e))return;this._seenReferenceKeys.add(e),this._references.push(t)}},yn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new j(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new _n;for(let n of t)bn(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof j){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function bn(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw Error(`No grammar provided for <${e}>`);return}let i=n.lookup(e);if(t instanceof j)Q({baseGrammar:i,selfGrammar:s},r);else Ce(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let o=n.injections(t.scopeName);if(o)for(let a of o)r.add(new j(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];Z([r],e,n)}}function Q(t,e){if(t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns))Z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e);if(t.selfGrammar.injections)Z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Z(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?Ve({},e.repository,r.repository):e.repository;if(Array.isArray(r.patterns))Z(r.patterns,{...e,repository:s},n);let i=r.include;if(!i)continue;let o=nt(i);switch(o.kind){case 0:Q({...e,selfGrammar:e.baseGrammar},n);break;case 1:Q(e,n);break;case 2:Ce(o.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};if(o.kind===4)Ce(o.ruleName,c,n);else Q(c,n)}else if(o.kind===4)n.add(new pn(o.scopeName,o.ruleName));else n.add(new j(o.scopeName));break}}}var Sn=class{kind=0},wn=class{kind=1},Cn=class{constructor(t){this.ruleName=t}kind=2},kn=class{constructor(t){this.scopeName=t}kind=3},Rn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function nt(t){if(t==="$base")return new Sn;else if(t==="$self")return new wn;let e=t.indexOf("#");if(e===-1)return new kn(t);else if(e===0)return new Cn(t.substring(1));else{let n=t.substring(0,e),r=t.substring(e+1);return new Rn(n,r)}}var Nn=/\\(\d+)/,We=/\\(\d+)/g,Cs=Symbol("RuleId"),Tn=-1,rt=-2;function st(t){return t}function it(t){return t}var W=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Ye(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){if(!this._nameIsCapturing||this._name===null||t===null||e===null)return this._name;return J.replaceCaptures(this._name,t,e)}getContentName(t,e){if(!this._contentNameIsCapturing||this._contentName===null)return this._contentName;return J.replaceCaptures(this._contentName,t,e)}},vn=class extends W{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r);this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw Error("Not supported!")}compile(t,e){throw Error("Not supported!")}compileAG(t,e,n,r){throw Error("Not supported!")}},An=class extends W{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null);this._match=new F(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},He=class extends W{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r);this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},ke=class extends W{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,i,o,a,c,l){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this._end=new F(o?o:"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);if(this.applyEndPatternLast)this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end);else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}if(this._end.hasBackReferences)if(this.applyEndPatternLast)this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e);else this._cachedCompiledPatterns.setSource(0,e);return this._cachedCompiledPatterns}},ee=class extends W{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,i,o,a,c){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new F(o,rt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null;if(this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){if(!this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns=new D,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while);if(this._while.hasBackReferences)this._cachedCompiledWhilePatterns.setSource(0,e?e:"￿");return this._cachedCompiledWhilePatterns}},ot=class t{static createCaptureRule(e,n,r,s,i){return e.registerRule((o)=>new vn(n,o,r,s,i))}static getCompiledRuleId(e,n,r){if(!e.id)n.registerRule((s)=>{if(e.id=s,e.match)return new An(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){if(e.repository)r=Ve({},r,e.repository);let i=e.patterns;if(typeof i>"u"&&e.include)i=[{include:e.include}];return new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(i,n,r))}if(e.while)return new ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,r),t._compilePatterns(e.patterns,n,r));return new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,t._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,r))});return e.id}static _compileCaptures(e,n,r){let s=[];if(e){let i=0;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10);if(a>i)i=a}for(let o=0;o<=i;o++)s[o]=null;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10),c=0;if(e[o].patterns)c=t.getCompiledRuleId(e[o],n,r);s[a]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){let a=e[i],c=-1;if(a.include){let l=nt(a.include);switch(l.kind){case 0:case 1:c=t.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[l.ruleName];if(u)c=t.getCompiledRuleId(u,n,r);break;case 3:case 4:let h=l.scopeName,d=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(d){let m=f.repository[d];if(m)c=t.getCompiledRuleId(m,n,f.repository)}else c=t.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else c=t.getCompiledRuleId(a,n,r);if(c!==-1){let l=n.getRule(c),u=!1;if(l instanceof He||l instanceof ke||l instanceof ee){if(l.hasMissingPatterns&&l.patterns.length===0)u=!0}if(u)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},F=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e==="string"){let r=e.length,s=0,i=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"){if(a+1<r){let l=e.charAt(a+1);if(l==="z")i.push(e.substring(s,a)),i.push("$(?!\\n)(?<!\\n)"),s=a+2;else if(l==="A"||l==="G")o=!0;a++}}if(this.hasAnchor=o,s===0)this.source=e;else i.push(e.substring(s,r)),this.source=i.join("")}else this.hasAnchor=!1,this.source=e;if(this.hasAnchor)this._anchorCache=this._buildAnchorCache();else this._anchorCache=null;if(this.ruleId=n,typeof this.source==="string")this.hasBackReferences=Nn.test(this.source);else this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(e){if(this.source===e)return;if(this.source=e,this.hasAnchor)this._anchorCache=this._buildAnchorCache()}resolveBackReferences(e,n){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let r=n.map((s)=>e.substring(s.start,s.end));return We.lastIndex=0,this.source.replace(We,(s,i)=>Xe(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)if(a=this.source.charAt(i),e[i]=a,n[i]=a,r[i]=a,s[i]=a,a==="\\"){if(i+1<o){if(c=this.source.charAt(i+1),c==="A")e[i+1]="￿",n[i+1]="￿",r[i+1]="A",s[i+1]="A";else if(c==="G")e[i+1]="￿",n[i+1]="G",r[i+1]="￿",s[i+1]="G";else e[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c;i++}}return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){if(!this.hasAnchor||!this._anchorCache||typeof this.source!=="string")return this.source;if(e)if(n)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;else if(n)return this._anchorCache.A0_G1;else return this._anchorCache.A0_G0}},D=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){if(this._cached)this._cached.dispose(),this._cached=null;if(this._anchorCache.A0_G0)this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null;if(this._anchorCache.A0_G1)this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null;if(this._anchorCache.A1_G0)this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null;if(this._anchorCache.A1_G1)this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){if(this._items[t].source!==e)this._disposeCaches(),this._items[t].setSource(e)}compile(t){if(!this._cached){let e=this._items.map((n)=>n.source);this._cached=new qe(t,e,this._items.map((n)=>n.ruleId))}return this._cached}compileAG(t,e,n){if(!this._hasAnchors)return this.compile(t);else if(e)if(n){if(!this._anchorCache.A1_G1)this._anchorCache.A1_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G1}else{if(!this._anchorCache.A1_G0)this._anchorCache.A1_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G0}else if(n){if(!this._anchorCache.A0_G1)this._anchorCache.A0_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G1}else{if(!this._anchorCache.A0_G0)this._anchorCache.A0_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G0}}_resolveAnchors(t,e,n){let r=this._items.map((s)=>s.resolveAnchors(e,n));return new qe(t,r,this._items.map((s)=>s.ruleId))}},qe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){if(typeof this.scanner.dispose==="function")this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
2
+ `)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);if(!r)return null;return{ruleId:this.rules[r.index],captureIndices:r.captureIndices}}},Se=class{constructor(t,e){this.languageId=t,this.tokenType=e}},En=class t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Se(e,8),this._embeddedLanguagesMatcher=new xn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){if(e===null)return t._NULL_SCOPE_METADATA;return this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Se(0,0);_getBasicScopeAttributes=new Ze((e)=>{let n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Se(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let n=e.match(t.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},xn=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);let e=t.map(([n,r])=>Xe(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;let e=t.match(this.scopesRegExp);if(!e)return;return this.values.get(e[1])}},ks={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},at=!1,ze=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function ct(t,e,n,r,s,i,o,a){let c=e.content.length,l=!1,u=-1;if(o){let f=In(t,e,n,r,s,i);s=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}let h=Date.now();while(!l){if(a!==0){if(Date.now()-h>a)return new ze(s,!0)}d()}return new ze(s,!1);function d(){let f=Ln(t,e,n,r,s,u);if(!f){i.produce(s,c),l=!0;return}let{captureIndices:m,matchedRuleId:y}=f,_=m&&m.length>0?m[0].end>r:!1;if(y===Tn){let p=s.getRule(t);i.produce(s,m[0].start),s=s.withContentNameScopesList(s.nameScopesList),B(t,e,n,s,i,p.endCaptures,m),i.produce(s,m[0].end);let g=s;if(s=s.parent,u=g.getAnchorPos(),!_&&g.getEnterPos()===r){s=g,i.produce(s,c),l=!0;return}}else{let p=t.getRule(y);i.produce(s,m[0].start);let g=s,b=p.getName(e.content,m),C=s.contentNameScopesList.pushAttributed(b,t);if(s=s.push(y,r,u,m[0].end===c,null,C,C),p instanceof ke){let R=p;B(t,e,n,s,i,R.beginCaptures,m),i.produce(s,m[0].end),u=m[0].end;let N=R.getContentName(e.content,m),E=C.pushAttributed(N,t);if(s=s.withContentNameScopesList(E),R.endHasBackReferences)s=s.withEndRule(R.getEndWithResolvedBackReferences(e.content,m));if(!_&&g.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(p instanceof ee){let R=p;B(t,e,n,s,i,R.beginCaptures,m),i.produce(s,m[0].end),u=m[0].end;let N=R.getContentName(e.content,m),E=C.pushAttributed(N,t);if(s=s.withContentNameScopesList(E),R.whileHasBackReferences)s=s.withEndRule(R.getWhileWithResolvedBackReferences(e.content,m));if(!_&&g.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(B(t,e,n,s,i,p.captures,m),i.produce(s,m[0].end),s=s.pop(),!_){s=s.safePop(),i.produce(s,c),l=!0;return}}if(m[0].end>r)r=m[0].end,n=!1}}function In(t,e,n,r,s,i){let o=s.beginRuleCapturedEOL?0:-1,a=[];for(let c=s;c;c=c.pop()){let l=c.getRule(t);if(l instanceof ee)a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){let{ruleScanner:l,findOptions:u}=Bn(c.rule,t,c.stack.endRule,n,r===o),h=l.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==rt){s=c.stack.pop();break}if(h.captureIndices&&h.captureIndices.length){if(i.produce(c.stack,h.captureIndices[0].start),B(t,e,n,c.stack,i,c.rule.whileCaptures,h.captureIndices),i.produce(c.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>r)r=h.captureIndices[0].end,n=!1}}else{s=c.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:o,isFirstLine:n}}function Ln(t,e,n,r,s,i){let o=Pn(t,e,n,r,s,i),a=t.getInjections();if(a.length===0)return o;let c=Gn(a,t,e,n,r,s,i);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;if(u<l||c.priorityMatch&&u===l)return c;return o}function Pn(t,e,n,r,s,i){let o=s.getRule(t),{ruleScanner:a,findOptions:c}=lt(o,t,s.endRule,n,r===i),l=a.findNextMatchSync(e,r,c);if(l)return{captureIndices:l.captureIndices,matchedRuleId:l.ruleId};return null}function Gn(t,e,n,r,s,i,o){let a=Number.MAX_VALUE,c=null,l,u=0,h=i.contentNameScopesList.getScopeNames();for(let d=0,f=t.length;d<f;d++){let m=t[d];if(!m.matcher(h))continue;let y=e.getRule(m.ruleId),{ruleScanner:_,findOptions:p}=lt(y,e,null,r,s===o),g=_.findNextMatchSync(n,s,p);if(!g)continue;let b=g.captureIndices[0].start;if(b>=a)continue;if(a=b,c=g.captureIndices,l=g.ruleId,u=m.priority,a===s)break}if(c)return{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l};return null}function lt(t,e,n,r,s){if(at){let o=t.compile(e,n),a=ut(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function Bn(t,e,n,r,s){if(at){let o=t.compileWhile(e,n),a=ut(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function ut(t,e){let n=0;if(!t)n|=1;if(!e)n|=4;return n}function B(t,e,n,r,s,i,o){if(i.length===0)return;let a=e.content,c=Math.min(i.length,o.length),l=[],u=o[0].end;for(let h=0;h<c;h++){let d=i[h];if(d===null)continue;let f=o[h];if(f.length===0)continue;if(f.start>u)break;while(l.length>0&&l[l.length-1].endPos<=f.start)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0)s.produceFromScopes(l[l.length-1].scopes,f.start);else s.produce(r,f.start);if(d.retokenizeCapturedWithRuleId){let y=d.getName(a,o),_=r.contentNameScopesList.pushAttributed(y,t),p=d.getContentName(a,o),g=_.pushAttributed(p,t),b=r.push(d.retokenizeCapturedWithRuleId,f.start,-1,!1,null,_,g),C=t.createOnigString(a.substring(0,f.end));ct(t,C,n&&f.start===0,f.start,b,s,!1,0),tt(C);continue}let m=d.getName(a,o);if(m!==null){let _=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(m,t);l.push(new On(_,f.end))}}while(l.length>0)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var On=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function $n(t,e,n,r,s,i,o,a){return new jn(t,e,n,r,s,i,o,a)}function Ue(t,e,n,r,s){let i=X(e,te),o=ot.getCompiledRuleId(n,r,s.repository);for(let a of i)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:s,priority:a.priority})}function te(t,e){if(e.length<t.length)return!1;let n=0;return t.every((r)=>{for(let s=n;s<e.length;s++)if(Mn(e[s],r))return n=s+1,!0;return!1})}function Mn(t,e){if(!t)return!1;if(t===e)return!0;let n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var jn=class{constructor(t,e,n,r,s,i,o,a){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new En(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ke(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(let c of Object.keys(s)){let l=X(c,te);for(let u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let t of this._ruleId2desc)if(t)t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){let t={lookup:(s)=>{if(s===this._rootScopeName)return this._grammar;return this.getExternalGrammar(s)},injections:(s)=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){let s=r.injections;if(s)for(let o in s)Ue(e,o,s[o],this,r);let i=this._grammarRepository.injections(n);if(i)i.forEach((o)=>{let a=this.getExternalGrammar(o);if(a){let c=a.injectionSelector;if(c)Ue(e,c,a,this,a)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){if(this._injections===null)this._injections=this._collectInjections();return this._injections}registerRule(t){let e=++this._lastRuleId,n=t(st(e));return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[it(t)]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];else if(this._grammarRepository){let n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Ke(n,e&&e.$base),this._includedGrammars[t]}return}tokenizeLine(t,e,n=0){let r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){let r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){if(this._rootId===-1)this._rootId=ot.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections();let s;if(!e||e===Re.NULL){s=!0;let l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=x.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null),f;if(d)f=O.createRootAndLookUpScopeName(d,h,this);else f=O.createRoot("unknown",h);e=new Re(null,this._rootId,-1,-1,!1,null,f,f)}else s=!1,e.reset();t=t+`
3
+ `;let i=this.createOnigString(t),o=i.content.length,a=new Dn(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=ct(this,i,s,0,e,a,!0,r);return tt(i),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ke(t,e){return t=tn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var O=class t{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let i of n)s=be.push(s,i.scopeNames),r=new t(r,s,i.encodedTokenAttributes);return r}static createRoot(e,n){return new t(null,new be(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),i=new be(null,e),o=r.themeProvider.themeMatch(i),a=t.mergeAttributes(n,s,o);return new t(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,i=0,o=0;if(r!==null)s=r.fontStyle,i=r.foregroundId,o=r.backgroundId;return x.set(e,n.languageId,n.tokenType,null,s,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return t._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let i of r)s=t._pushAttributed(s,i,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),i=e.scopePath.push(n),o=r.themeProvider.themeMatch(i),a=t.mergeAttributes(e.tokenAttributes,s,o);return new t(e,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Re=class t{constructor(e,n,r,s,i,o,a,c){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new t(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){if(e===null)return!1;return t._equals(this,e)}static _equals(e,n){if(e===n)return!0;if(!this._structuralEquals(e,n))return!1;return O.equals(e.contentNameScopesList,n.contentNameScopesList)}static _structuralEquals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){while(e)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){if(this.parent)return this.parent;return this}push(e,n,r,s,i,o,a){return new t(this,e,n,r,s,i,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){if(this.parent)n=this.parent._writeString(e,n);return e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){if(this.contentNameScopesList===e)return this;return this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){if(this.endRule===e)return this;return new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;while(n&&n._enterPos===e._enterPos){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:it(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=O.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,st(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,O.fromExtension(r,n.contentNameScopesList))}},Fn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap((n)=>{if(n==="*")return this.allowAny=!0,[];return X(n,te).map((r)=>r.matcher)}),this.unbalancedBracketScopes=e.flatMap((n)=>X(n,te).map((r)=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Dn=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways)s=!0;if(this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let i=t?.getScopeNames()??[];for(let o of this._tokenTypeOverrides)if(o.matcher(i))r=x.set(r,0,dn(o.type),null,-1,0,0);if(this.balancedBracketSelectors)s=this.balancedBracketSelectors.match(i)}if(s)r=x.set(r,0,8,s,-1,0,0);if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){if(this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1)this._tokens.pop();if(this._tokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0;return this._tokens}getBinaryResult(t,e){if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1)this._binaryTokens.pop(),this._binaryTokens.pop();if(this._binaryTokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0;let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},Wn=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){if(this._rawGrammars.set(t.scopeName,t),e)this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,$n(t,i,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},ht=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Wn(M.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(M.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new Fn(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let i=new yn(this._syncRegistry,t);while(i.Q.length>0)i.Q.map((o)=>this._loadSingleGrammar(o.scopeName)),i.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){if(!this._ensureGrammarCache.has(t))this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0)}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections==="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},ne=Re.NULL;function q(t,e){let n=typeof t==="string"?{}:{...t.colorReplacements},r=typeof t==="string"?t:t.name;for(let[s,i]of Object.entries(e?.colorReplacements||{}))if(typeof i==="string")n[s]=i;else if(s===r)Object.assign(n,i);return n}function v(t,e){if(!t)return t;return e?.[t?.toLowerCase()]||t}function pt(t){return Array.isArray(t)?t:[t]}async function Te(t){return Promise.resolve(typeof t==="function"?t():t).then((e)=>e.default||e)}function z(t){return!t||["plaintext","txt","text","plain"].includes(t)}function _t(t){return t==="ansi"||z(t)}function U(t){return t==="none"}function yt(t){return U(t)}var Hn=/(\r?\n)/g;function P(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(Hn),r=0,s=[];for(let i=0;i<n.length;i+=2){let o=e?n[i]+(n[i+1]||""):n[i];s.push([o,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}var ft={light:"#333333",dark:"#bbbbbb"},dt={light:"#fffffe",dark:"#1e1e1e"},mt="__shiki_resolved";function re(t){if(t?.[mt])return t;let e={...t};if(e.tokenColors&&!e.settings)e.settings=e.tokenColors,delete e.tokenColors;e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let a=e.settings?e.settings.find((c)=>!c.name&&!c.scope):void 0;if(a?.settings?.foreground)r=a.settings.foreground;if(a?.settings?.background)n=a.settings.background;if(!r&&e?.colors?.["editor.foreground"])r=e.colors["editor.foreground"];if(!n&&e?.colors?.["editor.background"])n=e.colors["editor.background"];if(!r)r=e.type==="light"?ft.light:ft.dark;if(!n)n=e.type==="light"?dt.light:dt.dark;e.fg=r,e.bg=n}if(!(e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope))e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,i=new Map;function o(a){if(i.has(a))return i.get(a);s+=1;let c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;if(e.colorReplacements?.[`#${c}`])return o(a);return i.set(a,c),c}e.settings=e.settings.map((a)=>{let c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),l=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!l)return a;let u={...a,settings:{...a.settings}};if(c){let h=o(a.settings.foreground);e.colorReplacements[h]=a.settings.foreground,u.settings.foreground=h}if(l){let h=o(a.settings.background);e.colorReplacements[h]=a.settings.background,u.settings.background=h}return u});for(let a of Object.keys(e.colors||{}))if(a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi")){if(!e.colors[a]?.startsWith("#")){let c=o(e.colors[a]);e.colorReplacements[c]=e.colors[a],e.colors[a]=c}}return Object.defineProperty(e,mt,{enumerable:!1,writable:!1,value:!0}),e}async function bt(t){return[...new Set((await Promise.all(t.filter((e)=>!_t(e)).map(async(e)=>await Te(e).then((n)=>Array.isArray(n)?n:[n])))).flat())]}async function St(t){return(await Promise.all(t.map(async(e)=>yt(e)?null:re(await Te(e))))).filter((e)=>!!e)}function wt(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);while(e[t]){if(t=e[t],n.has(t))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var qn=class extends ht{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t);this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map((s)=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){if(typeof t==="string")return this._resolvedThemes.get(t);else return this.loadTheme(t)}loadTheme(t){let e=re(t);if(e.name)this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null;return e}getLoadedThemes(){if(!this._loadedThemesCache)this._loadedThemesCache=[...this._resolvedThemes.keys()];return this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);if(!e)e=M.createFromRawTheme(t),this._textmateThemeCache.set(t,e);this._syncRegistry.setTheme(e)}getGrammar(t){return t=wt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter((s)=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases)t.aliases.forEach((s)=>{this._alias[s]=t.name});if(this._loadedLanguagesCache=null,e.size)for(let s of e)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,i])=>{if(!i)return!1;return(i.embeddedLanguages||i.embeddedLangs)?.some((o)=>n.map(([a])=>a).includes(o))}).filter((s)=>!n.includes(s));throw new S(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){if(!this._loadedLanguagesCache)this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])];return this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},zn=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:(n)=>t.createScanner(n),createOnigString:(n)=>t.createString(n)},e.forEach((n)=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){if(this._langs.set(t.name,t),t.aliases)t.aliases.forEach((e)=>{this._langs.set(e,t)});if(this._scopeToLang.set(t.scopeName,t),t.injectTo)t.injectTo.forEach((e)=>{if(!this._injections.get(e))this._injections.set(e,[]);this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},H=0;function ve(t){if(H+=1,t.warnings!==!1&&H>=10&&H%10===0)console.warn(`[Shiki] ${H} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(re),s=new qn(new zn(t.engine,n),r,n,t.langAlias),i;function o(g){return wt(g,t.langAlias)}function a(g){_();let b=s.getGrammar(typeof g==="string"?g:g.name);if(!b)throw new S(`Language \`${g}\` not found, you may need to load it first`);return b}function c(g){if(g==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();let b=s.getTheme(g);if(!b)throw new S(`Theme \`${g}\` not found, you may need to load it first`);return b}function l(g){_();let b=c(g);if(i!==g)s.setTheme(b),i=g;return{theme:b,colorMap:s.getColorMap()}}function u(){return _(),s.getLoadedThemes()}function h(){return _(),s.getLoadedLanguages()}function d(...g){_(),s.loadLanguages(g.flat(1))}async function f(...g){return d(await bt(g))}function m(...g){_();for(let b of g.flat(1))s.loadTheme(b)}async function y(...g){return _(),m(await St(g))}function _(){if(e)throw new S("Shiki instance has been disposed")}function p(){if(e)return;e=!0,s.dispose(),H-=1}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:o,loadLanguage:f,loadLanguageSync:d,loadTheme:y,loadThemeSync:m,dispose:p,[Symbol.dispose]:p}}async function Ae(t){if(!t.engine)console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([St(t.themes||[]),bt(t.langs||[]),t.engine]);return ve({...t,themes:e,langs:n,engine:r})}var Ct=new WeakMap;function K(t,e){Ct.set(t,e)}function G(t){return Ct.get(t)}var se=class t{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new t(Object.fromEntries(pt(n).map((r)=>[r,ne])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Un(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Un(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let i=s?.nameScopesList?.scopeName;if(i)e.push(i);if(s.parent)r(s.parent)}return r(t),e}function Kn(t,e){if(!(t instanceof se))throw new S("Invalid grammar state");return t.getInternalStack(e)}var Vn=/,/,Yn=/ /;function Ee(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(z(t.resolveLangAlias(n.lang||"text"))||U(r))return P(e).map((a)=>[{content:a[0],offset:a[1]}]);let{theme:s,colorMap:i}=t.setTheme(r),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Rt(e,o,s,i,n)}function kt(...t){if(t.length===2)return G(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=r;if(z(s)||U(i))throw new S("Plain language does not have grammar state");if(s==="ansi")throw new S("ANSI language does not have grammar state");let{theme:o,colorMap:a}=e.setTheme(i),c=e.getLanguage(s);return new se(xe(n,c,o,a,r).stateStack,c.name,o.name)}function Rt(t,e,n,r,s){let i=xe(t,e,n,r,s),o=new se(i.stateStack,e.name,n.name);return K(i.tokens,o),i.tokens}function xe(t,e,n,r,s){let i=q(n,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:c=!1}=s,l=P(t),u=s.grammarState?Kn(s.grammarState,n.name)??ne:s.grammarContextCode!=null?xe(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:ne,h=[],d=[];for(let f=0,m=l.length;f<m;f++){let[y,_]=l[f];if(y===""){h=[],d.push([]);continue}if(o>0&&y.length>=o){h=[],d.push([{content:y,offset:_,color:"",fontStyle:0}]);continue}let p,g,b;if(c&&c!=="tokenType")p=e.tokenizeLine(y,u,a),g=p.tokens,b=0;let C=e.tokenizeLine2(y,u,a),R=C.tokens.length/2;for(let N=0;N<R;N++){let E=C.tokens[2*N],ge=N+1<R?C.tokens[2*N+2]:y.length;if(E===ge)continue;let pe=C.tokens[2*N+1],Zt=v(r[x.getForeground(pe)],i),en=x.getFontStyle(pe),Y={content:y.substring(E,ge),offset:_+E,color:Zt,fontStyle:en};if(c==="tokenType")Y.type=x.getTokenType(pe);else if(c){let Me=[];if(c!=="scopeName")for(let T of n.settings){let L;switch(typeof T.scope){case"string":L=T.scope.split(Vn).map((_e)=>_e.trim());break;case"object":L=T.scope;break;default:continue}Me.push({settings:T,selectors:L.map((_e)=>_e.split(Yn))})}Y.explanation=[];let je=0;while(E+je<ge){let T=g[b],L=y.substring(T.startIndex,T.endIndex);je+=L.length,Y.explanation.push({content:L,scopes:c==="scopeName"?Jn(T.scopes):Qn(Me,T.scopes)}),b+=1}}h.push(Y)}d.push(h),h=[],u=C.ruleStack}return{tokens:d,stateStack:u}}function Jn(t){return t.map((e)=>({scopeName:e}))}function Qn(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let i=e[r];n[r]={scopeName:i,themeMatches:Zn(t,i,e.slice(0,r))}}return n}function gt(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Xn(t,e,n){if(!gt(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;while(r>=0&&s>=0){if(gt(t[r],n[s]))r-=1;s-=1}if(r===-1)return!0;return!1}function Zn(t,e,n){let r=[];for(let{selectors:s,settings:i}of t)for(let o of s)if(Xn(o,e,n)){r.push(i);break}return r}function ie(t,e,n,r=Ee){let s=Object.entries(n.themes).filter((l)=>l[1]).map((l)=>({color:l[0],theme:l[1]})),i=s.map((l)=>{let u=r(t,e,{...n,theme:l.theme});return{tokens:u,state:G(u),theme:typeof l.theme==="string"?l.theme:l.theme.name}}),o=er(...i.map((l)=>l.tokens)),a=o[0].map((l,u)=>l.map((h,d)=>{let f={content:h.content,variants:{},offset:h.offset};if("includeExplanation"in n&&n.includeExplanation)f.explanation=h.explanation;return o.forEach((m,y)=>{let{content:_,explanation:p,offset:g,...b}=m[u][d];f.variants[s[y].color]=b}),f})),c=i[0].state?new se(Object.fromEntries(i.map((l)=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;if(c)K(a,c);return a}function er(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map((c)=>c[r]),i=e.map(()=>[]);e.forEach((c,l)=>c.push(i[l]));let o=s.map(()=>0),a=s.map((c)=>c[0]);while(a.every((c)=>c)){let c=Math.min(...a.map((l)=>l.content.length));for(let l=0;l<n;l++){let u=a[l];if(u.content.length===c)i[l].push(u),o[l]+=1,a[l]=s[l][o[l]];else i[l].push({...u,content:u.content.slice(0,c)}),a[l]={...u,content:u.content.slice(c),offset:u.offset+c}}}}return e}var Nt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Tt={}.hasOwnProperty;function vt(t,e){let n=e||{};function r(s,...i){let{invalid:o,handlers:a}=r;if(s&&Tt.call(s,t)){let c=String(s[t]);o=Tt.call(a,c)?a[c]:r.unknown}if(o)return o.call(this,s,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var tr=/["&'<>`]/g,nr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,sr=/[|\\{}()[\]^$+*?.]/g,At=new WeakMap;function Et(t,e){if(t=t.replace(e.subset?ir(e.subset):tr,r),e.subset||e.escapeOnly)return t;return t.replace(nr,n).replace(rr,r);function n(s,i,o){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function r(s,i,o){return e.format(s.charCodeAt(0),o.charCodeAt(i+1),e)}}function ir(t){let e=At.get(t);if(!e)e=or(t),At.set(t,e);return e}function or(t){let e=[],n=-1;while(++n<t.length)e.push(t[n].replace(sr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var ar=/[\dA-Fa-f]/;function xt(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!ar.test(String.fromCharCode(e))?r:r+";"}var cr=/\d/;function It(t,e,n){let r="&#"+String(t);return n&&e&&!cr.test(String.fromCharCode(e))?r:r+";"}var Lt=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var oe={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"};var Pt=["cent","copy","divide","gt","lt","not","para","times"];var Gt={}.hasOwnProperty,Ie={},ae;for(ae in oe)if(Gt.call(oe,ae))Ie[oe[ae]]=ae;var lr=/[^\dA-Za-z]/;function Bt(t,e,n,r){let s=String.fromCharCode(t);if(Gt.call(Ie,s)){let i=Ie[s],o="&"+i;if(n&&Lt.includes(i)&&!Pt.includes(i)&&(!r||e&&e!==61&&lr.test(String.fromCharCode(e))))return o;return o+";"}return""}function Ot(t,e,n){let r=xt(t,e,n.omitOptionalSemicolons),s;if(n.useNamedReferences||n.useShortestReferences)s=Bt(t,e,n.omitOptionalSemicolons,n.attribute);if((n.useShortestReferences||!s)&&n.useShortestReferences){let i=It(t,e,n.omitOptionalSemicolons);if(i.length<r.length)r=i}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function A(t,e){return Et(t,Object.assign({format:Ot},e))}var ur=/^>|^->|<!--|-->|--!>|<!-$/g,hr=[">"],fr=["<",">"];function $t(t,e,n,r){return r.settings.bogusComments?"<?"+A(t.value,Object.assign({},r.settings.characterReferences,{subset:hr}))+">":"<!--"+t.value.replace(ur,s)+"-->";function s(i){return A(i,Object.assign({},r.settings.characterReferences,{subset:fr}))}}function Mt(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var w=jt(1),Le=jt(-1),dr=[];function jt(t){return e;function e(n,r,s){let i=n?n.children:dr,o=(r||0)+t,a=i[o];if(!s)while(a&&_r(a))o+=t,a=i[o];return a}}var mr={}.hasOwnProperty;function ce(t){return e;function e(n,r,s){return mr.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var V=ce({body:pr,caption:Pe,colgroup:Pe,dd:wr,dt:Sr,head:Pe,html:gr,li:br,optgroup:Cr,option:kr,p:yr,rp:Ft,rt:Ft,tbody:Nr,td:Dt,tfoot:Tr,th:Dt,thead:Rr,tr:vr});function Pe(t,e,n){let r=w(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&_r(r.value.charAt(0)))}function gr(t,e,n){let r=w(n,e);return!r||r.type!=="comment"}function pr(t,e,n){let r=w(n,e);return!r||r.type!=="comment"}function yr(t,e,n){let r=w(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function br(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Sr(t,e,n){let r=w(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function wr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Ft(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Cr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function kr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Rr(t,e,n){let r=w(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Nr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Tr(t,e,n){return!w(n,e)}function vr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Dt(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var Wt=ce({body:xr,colgroup:Ir,head:Er,html:Ar,tbody:Lr});function Ar(t){let e=w(t,-1);return!e||e.type!=="comment"}function Er(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function xr(t){let e=w(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&_r(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ir(t,e,n){let r=Le(n,e),s=w(t,-1,!0);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&V(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="col")}function Lr(t,e,n){let r=Le(n,e),s=w(t,-1);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&V(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="tr")}var le={name:[[`
4
+ \f\r &/=>`.split(""),`
5
+ \f\r "&'/=>\``.split("")],[`\x00
6
+ \f\r "&'/<=>`.split(""),`\x00
7
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
8
+ \f\r &>`.split(""),`\x00
9
+ \f\r "&'<=>\``.split("")],[`\x00
10
+ \f\r "&'<=>\``.split(""),`\x00
11
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\x00&'".split(""),"\x00\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\x00"&'.split(""),"\x00\"&'`".split("")]]};function Ht(t,e,n,r){let s=r.schema,i=s.space==="svg"?!1:r.settings.omitOptionalTags,o=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase()),a=[],c;if(s.space==="html"&&t.tagName==="svg")r.schema=qr;let l=Pr(r,t.properties),u=r.all(s.space==="html"&&t.tagName==="template"?t.content:t);if(r.schema=s,u)o=!1;if(l||!i||!Wt(t,e,n)){if(a.push("<",t.tagName,l?" "+l:""),o&&(s.space==="svg"||r.settings.closeSelfClosing)){if(c=l.charAt(l.length-1),!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")a.push(" ");a.push("/")}a.push(">")}if(a.push(u),!o&&(!i||!V(t,e,n)))a.push("</"+t.tagName+">");return a.join("")}function Pr(t,e){let n=[],r=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){let i=Gr(t,s,e[s]);if(i)n.push(i)}}while(++r<n.length){let i=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;if(r!==n.length-1&&i!=='"'&&i!=="'")n[r]+=" "}return n.join("")}function Gr(t,e,n){let r=Oi(t.schema,e),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,i=t.settings.allowDangerousCharacters?0:1,o=t.quote,a;if(r.overloadedBoolean&&(n===r.attribute||n===""))n=!0;else if((r.boolean||r.overloadedBoolean)&&(typeof n!=="string"||n===r.attribute||n===""))n=Boolean(n);if(n===null||n===void 0||n===!1||typeof n==="number"&&Number.isNaN(n))return"";let c=A(r.attribute,Object.assign({},t.settings.characterReferences,{subset:le.name[s][i]}));if(n===!0)return c;if(n=Array.isArray(n)?(r.commaSeparated?ss:cs)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)return c;if(t.settings.preferUnquoted)a=A(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:le.unquoted[s][i]}));if(a!==n){if(t.settings.quoteSmart&&ai(n,o)>ai(n,t.alternative))o=t.alternative;a=o+A(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?le.single:le.double)[s][i],attribute:!0}))+o}return c+(a?"="+a:a)}var Br=["<","&"];function ue(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:A(t.value,Object.assign({},r.settings.characterReferences,{subset:Br}))}function qt(t,e,n,r){return r.settings.allowDangerousHtml?t.value:ue(t,e,n,r)}function zt(t,e,n,r){return r.all(t)}var Ut=vt("type",{invalid:Or,unknown:$r,handlers:{comment:$t,doctype:Mt,element:Ht,raw:qt,root:zt,text:ue}});function Or(t){throw Error("Expected node, not `"+t+"`")}function $r(t){throw Error("Cannot compile unknown node `"+t.type+"`")}var Mr={},jr={},Fr=[];function Ge(t,e){let n=e||Mr,r=n.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Dr,all:Wr,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Nt,characterReferences:n.characterReferences||jr,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?qr:ls,quote:r,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Dr(t,e,n){return Ut(t,e,n,this)}function Wr(t){let e=[],n=t&&t.children||Fr,r=-1;while(++r<n.length)e[r]=this.one(n[r],r,t);return e.join("")}var Kt=/\s+/g;function Jt(t,e){if(!e)return t;if(t.properties||={},t.properties.class||=[],typeof t.properties.class==="string")t.properties.class=t.properties.class.split(Kt);if(!Array.isArray(t.properties.class))t.properties.class=[];let n=Array.isArray(e)?e:e.split(Kt);for(let r of n)if(r&&!t.properties.class.includes(r))t.properties.class.push(r);return t}function Hr(t){let e=P(t,!0).map(([s])=>s);function n(s){if(s===t.length)return{line:e.length-1,character:e.at(-1).length};let i=s,o=0;for(let a of e){if(i<a.length)break;i-=a.length,o++}return{line:o,character:i}}function r(s,i){let o=0;for(let a=0;a<s;a++)o+=e[a].length;return o+=i,o}return{lines:e,indexToPos:n,posToIndex:r}}var zr=["color","background-color"];function Ur(t,e){let n=0,r=[];for(let s of e){if(s>n)r.push({...t,content:t.content.slice(n,s),offset:t.offset+n});n=s}if(n<t.content.length)r.push({...t,content:t.content.slice(n),offset:t.offset+n});return r}function Kr(t,e){let n=0,r=t.length;while(n<r){let s=n+(r-n>>1);if(t[s]<=e)n=s+1;else r=s}return n}function Vr(t,e){let n=[...e instanceof Set?e:new Set(e)].sort((r,s)=>r-s);if(!n.length)return t;return t.map((r)=>r.flatMap((s)=>{let i=s.offset+s.content.length,o=Kr(n,s.offset),a=o;while(a<n.length&&n[a]<i)a++;if(o===a)return s;let c=n.slice(o,a);for(let l=0;l<c.length;l++)c[l]-=s.offset;return Ur(s,c)}))}function Yr(t,e,n,r,s="css-vars"){let i={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map((u)=>he(t.variants[u])),a=new Set(o.flatMap((u)=>Object.keys(u))),c={},l=(u,h)=>{let d=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+e[u]+(h==="color"?"":d)};return o.forEach((u,h)=>{for(let d of a){let f=u[d]||"inherit";if(h===0&&r&&zr.includes(d))if(r==="light-dark()"&&o.length>1){let m=e.findIndex((g)=>g==="light"),y=e.findIndex((g)=>g==="dark");if(m===-1||y===-1)throw new S('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let _=o[m][d]||"inherit",p=o[y][d]||"inherit";if(c[d]=`light-dark(${_}, ${p})`,s==="css-vars")c[l(h,d)]=f}else c[d]=f;else if(s==="css-vars")c[l(h,d)]=f}}),i.htmlStyle=c,i}function he(t){let e={};if(t.color)e.color=t.color;if(t.bgColor)e["background-color"]=t.bgColor;if(t.fontStyle){if(t.fontStyle&k.Italic)e["font-style"]="italic";if(t.fontStyle&k.Bold)e["font-weight"]="bold";let n=[];if(t.fontStyle&k.Underline)n.push("underline");if(t.fontStyle&k.Strikethrough)n.push("line-through");if(n.length)e["text-decoration"]=n.join(" ")}return e}function Oe(t){if(typeof t==="string")return t;return Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function Jr(){let t=new WeakMap;function e(n){if(!t.has(n.meta)){let s=function(o){if(typeof o==="number"){if(o<0||o>n.source.length)throw new S(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...r.indexToPos(o),offset:o}}else{let a=r.lines[o.line];if(a===void 0)throw new S(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);let c=o.character;if(c<0)c=a.length+c;if(c<0||c>a.length)throw new S(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:c,offset:r.posToIndex(o.line,c)}}},r=Hr(n.source),i=(n.options.decorations||[]).map((o)=>({...o,start:s(o.start),end:s(o.end)}));Qr(i),t.set(n.meta,{decorations:i,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;return Vr(n,e(this).decorations.flatMap((r)=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;let r=e(this),s=[...n.children].filter((u)=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new S(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(u,h,d,f){let m=s[u],y="",_=-1,p=-1;if(h===0)_=0;if(d===0)p=0;if(d===Number.POSITIVE_INFINITY)p=m.children.length;if(_===-1||p===-1)for(let b=0;b<m.children.length;b++){if(y+=Qt(m.children[b]),_===-1&&y.length===h)_=b+1;if(p===-1&&y.length===d)p=b+1}if(_===-1)throw new S(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(p===-1)throw new S(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);let g=m.children.slice(_,p);if(!f.alwaysWrap&&g.length===m.children.length)a(m,f,"line");else if(!f.alwaysWrap&&g.length===1&&g[0].type==="element")a(g[0],f,"token");else{let b={type:"element",tagName:"span",properties:{},children:g};a(b,f,"wrapper"),m.children.splice(_,g.length,b)}}function o(u,h){s[u]=a(s[u],h,"line")}function a(u,h,d){let f=h.properties||{},m=h.transform||((y)=>y);if(u.tagName=h.tagName||"span",u.properties={...u.properties,...f,class:u.properties.class},h.properties?.class)Jt(u,h.properties.class);return u=m(u,d)||u,u}let c=[],l=r.decorations.sort((u,h)=>h.start.offset-u.start.offset||u.end.offset-h.end.offset);for(let u of l){let{start:h,end:d}=u;if(h.line===d.line)i(h.line,h.character,d.character,u);else if(h.line<d.line){i(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let f=h.line+1;f<d.line;f++)c.unshift(()=>o(f,u));i(d.line,0,d.character,u)}}c.forEach((u)=>u())}}}function Qr(t){for(let e=0;e<t.length;e++){let n=t[e];if(n.start.offset>n.end.offset)throw new S(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){let s=t[r],i=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,o=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,a=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,c=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(i||o||a||c){if(i&&o)continue;if(a&&c)continue;if(a&&n.start.offset===n.end.offset)continue;if(o&&s.start.offset===s.end.offset)continue;throw new S(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function Qt(t){if(t.type==="text")return t.value;if(t.type==="element")return t.children.map(Qt).join("");return""}var Xr=[Jr()];function fe(t){let e=Zr(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...Xr]}function Zr(t){let e=[],n=[],r=[];for(let s of t)switch(s.enforce){case"pre":e.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:e,post:n,normal:r}}var I=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Be={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function es(t,e){let n=t.indexOf("\x1B",e);if(n!==-1){if(t[n+1]==="["){let r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}}return{position:t.length}}function Vt(t){let e=t.shift();if(e==="2"){let n=t.splice(0,3).map((r)=>Number.parseInt(r));if(n.length!==3||n.some((r)=>Number.isNaN(r)))return;return{type:"rgb",rgb:n}}else if(e==="5"){let n=t.shift();if(n)return{type:"table",index:Number(n)}}}function ts(t){let e=[];while(t.length>0){let n=t.shift();if(!n)continue;let r=Number.parseInt(n);if(Number.isNaN(r))continue;if(r===0)e.push({type:"resetAll"});else if(r<=9){if(Be[r])e.push({type:"setDecoration",value:Be[r]})}else if(r<=29){let s=Be[r-20];if(s){if(e.push({type:"resetDecoration",value:s}),s==="dim")e.push({type:"resetDecoration",value:"bold"})}}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:I[r-30]}});else if(r===38){let s=Vt(t);if(s)e.push({type:"setForegroundColor",value:s})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:I[r-40]}});else if(r===48){let s=Vt(t);if(s)e.push({type:"setBackgroundColor",value:s})}else if(r===49)e.push({type:"resetBackgroundColor"});else if(r===53)e.push({type:"setDecoration",value:"overline"});else if(r===55)e.push({type:"resetDecoration",value:"overline"});else if(r>=90&&r<=97)e.push({type:"setForegroundColor",value:{type:"named",name:I[r-90+8]}});else if(r>=100&&r<=107)e.push({type:"setBackgroundColor",value:{type:"named",name:I[r-100+8]}})}return e}function ns(){let t=null,e=null,n=new Set;return{parse(r){let s=[],i=0;do{let o=es(r,i),a=o.sequence?r.substring(i,o.startPosition):r.substring(i);if(a.length>0)s.push({value:a,foreground:t,background:e,decorations:new Set(n)});if(o.sequence){let c=ts(o.sequence);for(let l of c)if(l.type==="resetAll")t=null,e=null,n.clear();else if(l.type==="resetForegroundColor")t=null;else if(l.type==="resetBackgroundColor")e=null;else if(l.type==="resetDecoration")n.delete(l.value);for(let l of c)if(l.type==="setForegroundColor")t=l.value;else if(l.type==="setBackgroundColor")e=l.value;else if(l.type==="setDecoration")n.add(l.value)}i=o.position}while(i<r.length);return s}}}var rs={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function is(t=rs){function e(a){return t[a]}function n(a){return`#${a.map((c)=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let l=0;l<I.length;l++)r.push(e(I[l]));let a=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)r.push(n([a[l],a[u],a[h]]));let c=8;for(let l=0;l<24;l++,c+=10)r.push(n([c,c,c]));return r}function i(a){return s()[a]}function o(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return i(a.index)}}return{value:o}}var os=/#([0-9a-f]{3,8})/i,as=/var\((--[\w-]+-ansi-[\w-]+)\)/,us={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function hs(t,e,n){let r=q(t,n),s=P(e),i=is(Object.fromEntries(I.map((a)=>{let c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,t.colors?.[c]||us[a]]}))),o=ns();return s.map((a)=>o.parse(a[0]).map((c)=>{let l,u;if(c.decorations.has("reverse"))l=c.background?i.value(c.background):t.bg,u=c.foreground?i.value(c.foreground):t.fg;else l=c.foreground?i.value(c.foreground):t.fg,u=c.background?i.value(c.background):void 0;if(l=v(l,r),u=v(u,r),c.decorations.has("dim"))l=fs(l);let h=k.None;if(c.decorations.has("bold"))h|=k.Bold;if(c.decorations.has("italic"))h|=k.Italic;if(c.decorations.has("underline"))h|=k.Underline;if(c.decorations.has("strikethrough"))h|=k.Strikethrough;return{content:c.value,offset:a[1],color:l,bgColor:u,fontStyle:h}}))}function fs(t){let e=t.match(os);if(e){let r=e[1];if(r.length===8){let s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else if(r.length===6)return`#${r}80`;else if(r.length===4){let s=r[0],i=r[1],o=r[2],a=r[3];return`#${s}${s}${i}${i}${o}${o}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){let s=r[0],i=r[1],o=r[2];return`#${s}${s}${i}${i}${o}${o}80`}}let n=t.match(as);if(n)return`var(${n[1]}-dim)`;return t}function $e(t,e,n={}){let r=t.resolveLangAlias(n.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=n;if(!z(r)&&!U(s)&&r==="ansi"){let{theme:i}=t.setTheme(s);return hs(i,e,n)}return Ee(t,e,n)}function de(t,e,n){let r,s,i,o,a,c;if("themes"in n){let{defaultColor:l="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=n,d=Object.entries(n.themes).filter((p)=>p[1]).map((p)=>({color:p[0],theme:p[1]})).sort((p,g)=>p.color===l?-1:g.color===l?1:0);if(d.length===0)throw new S("`themes` option must not be empty");let f=ie(t,e,n,$e);if(c=G(f),l&&l!=="light-dark()"&&!d.some((p)=>p.color===l))throw new S(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=d.map((p)=>t.getTheme(p.theme)),y=d.map((p)=>p.color);if(i=f.map((p)=>p.map((g)=>Yr(g,y,u,l,h))),c)K(i,c);let _=d.map((p)=>q(p.theme,n));s=Yt(d,m,_,u,l,"fg",h),r=Yt(d,m,_,u,l,"bg",h),o=`shiki-themes ${m.map((p)=>p.name).join(" ")}`,a=l?void 0:[s,r].join(";")}else if("theme"in n){let l=q(n.theme,n);i=$e(t,e,n);let u=t.getTheme(n.theme);r=v(u.bg,l),s=v(u.fg,l),o=u.name,c=G(i)}else throw new S("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:o,rootStyle:a,grammarState:c}}function Yt(t,e,n,r,s,i,o){return t.map((a,c)=>{let l=v(e[c][i],n[c])||"inherit",u=`${r+a.color}${i==="bg"?"-bg":""}:${l}`;if(c===0&&s){if(s==="light-dark()"&&t.length>1){let h=t.findIndex((f)=>f.color==="light"),d=t.findIndex((f)=>f.color==="dark");if(h===-1||d===-1)throw new S('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${v(e[h][i],n[h])||"inherit"}, ${v(e[d][i],n[d])||"inherit"});${u}`}return l}if(o==="css-vars")return u;return null}).filter((a)=>!!a).join(";")}var Xt=/^\s+$/,ds=/^(\s*)(.*?)(\s*)$/;function me(t,e,n,r={meta:{},options:n,codeToHast:(s,i)=>me(t,s,i),codeToTokens:(s,i)=>de(t,s,i)}){let s=e;for(let m of fe(n))s=m.preprocess?.call(r,s,n)||s;let{tokens:i,fg:o,bg:a,themeName:c,rootStyle:l,grammarState:u}=de(t,s,n),{mergeWhitespaces:h=!0,mergeSameStyleTokens:d=!1}=n;if(h===!0)i=gs(i);else if(h==="never")i=ps(i);if(d)i=_s(i);let f={...r,get source(){return s}};for(let m of fe(n))i=m.tokens?.call(f,i)||i;return ms(i,{...n,fg:o,bg:a,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},f,u)}function ms(t,e,n,r=G(t)){let s=fe(e),i=[],o={type:"root",children:[]},{structure:a="classic",tabindex:c="0"}=e,l={class:`shiki ${e.themeName||""}`};if(e.rootStyle!==!1)if(e.rootStyle!=null)l.style=e.rootStyle;else l.style=`background-color:${e.bg};color:${e.fg}`;if(c!==!1&&c!=null)l.tabindex=c.toString();for(let[y,_]of Object.entries(e.meta||{}))if(!y.startsWith("_"))l[y]=_;let u={type:"element",tagName:"pre",properties:l,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:i},d=[],f={...n,structure:a,addClassToHast:Jt,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return h},get lines(){return d}};if(t.forEach((y,_)=>{if(_){if(a==="inline")o.children.push({type:"element",tagName:"br",properties:{},children:[]});else if(a==="classic")i.push({type:"text",value:`
12
+ `})}let p={type:"element",tagName:"span",properties:{class:"line"},children:[]},g=0;for(let b of y){let C={type:"element",tagName:"span",properties:{...b.htmlAttrs},children:[{type:"text",value:b.content}]},R=Oe(b.htmlStyle||he(b));if(R)C.properties.style=R;for(let N of s)C=N?.span?.call(f,C,_+1,g,p,b)||C;if(a==="inline")o.children.push(C);else if(a==="classic")p.children.push(C);g+=b.content.length}if(a==="classic"){for(let b of s)p=b?.line?.call(f,p,_+1)||p;d.push(p),i.push(p)}else if(a==="inline")d.push(p)}),a==="classic"){for(let y of s)h=y?.code?.call(f,h)||h;u.children.push(h);for(let y of s)u=y?.pre?.call(f,u)||u;o.children.push(u)}else if(a==="inline"){let y=[],_={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let g of o.children)if(g.type==="element"&&g.tagName==="br")y.push(_),_={type:"element",tagName:"span",properties:{class:"line"},children:[]};else if(g.type==="element"||g.type==="text")_.children.push(g);y.push(_);let p={type:"element",tagName:"code",properties:{},children:y};for(let g of s)p=g?.code?.call(f,p)||p;o.children=[];for(let g=0;g<p.children.length;g++){if(g>0)o.children.push({type:"element",tagName:"br",properties:{},children:[]});let b=p.children[g];if(b.type==="element")o.children.push(...b.children)}}let m=o;for(let y of s)m=y?.root?.call(f,m)||m;if(r)K(m,r);return m}function gs(t){return t.map((e)=>{let n=[],r="",s;return e.forEach((i,o)=>{let a=!(i.fontStyle&&(i.fontStyle&k.Underline||i.fontStyle&k.Strikethrough));if(a&&Xt.test(i.content)&&e[o+1]){if(s===void 0)s=i.offset;r+=i.content}else if(r){if(a)n.push({...i,offset:s,content:r+i.content});else n.push({content:r,offset:s},i);s=void 0,r=""}else n.push(i)}),n})}function ps(t){return t.map((e)=>e.flatMap((n)=>{if(Xt.test(n.content))return n;let r=n.content.match(ds);if(!r)return n;let[,s,i,o]=r;if(!s&&!o)return n;let a=[{...n,offset:n.offset+s.length,content:i}];if(s)a.unshift({content:s,offset:n.offset});if(o)a.push({content:o,offset:n.offset+s.length+i.length});return a}))}function _s(t){return t.map((e)=>{let n=[];for(let r of e){if(n.length===0){n.push({...r});continue}let s=n.at(-1),i=Oe(s.htmlStyle||he(s)),o=Oe(r.htmlStyle||he(r)),a=s.fontStyle&&(s.fontStyle&k.Underline||s.fontStyle&k.Strikethrough),c=r.fontStyle&&(r.fontStyle&k.Underline||r.fontStyle&k.Strikethrough);if(!a&&!c&&i===o)s.content+=r.content;else n.push({...r})}return n})}var ys=Ge;function bs(t,e,n){let r={meta:{},options:n,codeToHast:(i,o)=>me(t,i,o),codeToTokens:(i,o)=>de(t,i,o)},s=ys(me(t,e,n,r));for(let i of fe(n))s=i.postprocess?.call(r,s,n)||s;return s}async function No(t){let e=await Ae(t);return{getLastGrammarState:(...n)=>kt(e,...n),codeToTokensBase:(n,r)=>$e(e,n,r),codeToTokensWithThemes:(n,r)=>ie(e,n,r),codeToTokens:(n,r)=>de(e,n,r),codeToHast:(n,r)=>me(e,n,r),codeToHtml:(n,r)=>bs(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}export{No as createHighlighterCore};
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ function Kr(i,d){let e;if(d===void 0){for(let n of i)if(n!=null&&(e<n||e===void 0&&n>=n))e=n}else{let n=-1;for(let f of i)if((f=d(f,++n,i))!=null&&(e<f||e===void 0&&f>=f))e=f}return e}function kr(i,d){let e;if(d===void 0){for(let n of i)if(n!=null&&(e>n||e===void 0&&n>=n))e=n}else{let n=-1;for(let f of i)if((f=d(f,++n,i))!=null&&(e>f||e===void 0&&f>=f))e=f}return e}
2
+ export{Kr,kr};
Binary file
Binary file
@@ -0,0 +1,30 @@
1
+ import{wr}from"./chunk-cmhxtckb.js";import{re}from"./chunk-mwfrxgbs.js";import{t,a,B,S,j,G,A,R,I,L,D,P,M,Q,Br,qt,X}from"./chunk-v2bkkhb8.js";import{fe}from"./chunk-53cg6pxm.js";var W=/[─━│┃└┗├┣]/,z=/[└┗├┣]/,J=/[─━]/,N=/^[\s│┃]+$/,E=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,_=/^\s*%%/,K=" ";function O(n){return n.some((r)=>W.test(r))}t(O,"isBoxDrawingFormat");function Y(n){for(let r of n){let e=z.exec(r);if(e?.index&&e.index>0)return e.index}return 4}t(Y,"inferSegmentWidth");function F(n,r){return n.replace(/\bline\s+(\d+)\b/gi,(e,i)=>{let c=parseInt(i,10),o=r.get(c);return o?`line ${o}`:e})}t(F,"remapErrorLines");function Z(n){let r=n.split(`
2
+ `),e=new Map,i=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){i=g;break}if(i===-1)return{text:n,lineMap:e};let c=[];for(let g=i+1;g<r.length;g++){let d=r[g];if(d.trim()===""||_.test(d)||E.test(d))continue;if(N.test(d))continue;c.push(d.replace(/\t/g," "))}if(!O(c))return{text:n,lineMap:e};let o=Y(c),s=[],l=0;for(let g=0;g<=i;g++)s.push(r[g]),l++,e.set(l,g+1);for(let g=i+1;g<r.length;g++){let d=r[g],p=d.trim(),f=g+1;if(p===""){s.push(d),l++,e.set(l,f);continue}if(_.test(d)){s.push(d),l++,e.set(l,f);continue}if(E.test(d)){s.push(d),l++,e.set(l,f);continue}if(N.test(d))continue;let h=d.replace(/\t/g," "),w=z.exec(h);if(w?.index!==void 0){let u=w.index,x=Math.round(u/o)+1,m=u+1;while(m<h.length&&J.test(h[m]))m++;while(m<h.length&&h[m]===" ")m++;let b=h.slice(m).trimEnd();if(!b)throw Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);let U=K.repeat(x);s.push(U+b),l++,e.set(l,f)}else if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;else if(W.test(h))s.push(d),l++,e.set(l,f);else if(/^\s+/.test(h))throw Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);else s.push(d),l++,e.set(l,f)}return{text:s.join(`
3
+ `),lineMap:e}}t(Z,"preprocessBoxDrawing");var v=new wr(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ee=t(()=>{v.reset(),A()},"clear"),te=t(()=>v.records.stack[0],"getRoot"),ne=t(()=>v.records.cnt,"getCount"),ie=B.treeView,oe=t(()=>X(ie,S().treeView),"getConfig"),se=t((n,r,e,i,c,o)=>{while(n<=v.records.stack[v.records.stack.length-1].level)v.records.stack.pop();let s={id:v.records.cnt++,level:n,name:r,nodeType:e,icon:c,cssClass:i,description:o,children:[]};v.records.stack[v.records.stack.length-1].children.push(s),v.records.stack.push(s)},"addNode"),ae={clear:ee,addNode:se,getRoot:te,getCount:ne,getConfig:oe,getAccTitle:I,getAccDescription:D,getDiagramTitle:M,setAccDescription:L,setAccTitle:R,setDiagramTitle:P},y=ae,ce=t((n)=>{re(n,y);for(let r of n.nodes){let e=typeof r.indent==="number"?r.indent:0,i=r.name,c=i.endsWith("/");if(c)i=i.slice(0,-1);let o=c?"directory":"file",s=r.classAnnotation||void 0,l=r.iconAnnotation,g=l!==void 0?l||"none":void 0,d=r.descAnnotation||void 0,p=d?j(d,S()):void 0;y.addNode(e,i,o,s,g,p)}},"populate"),le={parse:t(async(n)=>{let{text:r,lineMap:e}=Z(n);try{let i=await fe("treeView",r);a.debug(i),ce(i)}catch(i){if(e.size>0&&i instanceof Error)i.message=F(i.message,e);throw i}},"parse")},C={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function q(n,r){let e=r?.filenameIcons?.[n];if(e)return e;let i=n.lastIndexOf(".");if(i>0){let c=n.substring(i).toLowerCase(),o=r?.extensionIcons;return o?.[c]??o?.[c.slice(1)]}return}t(q,"detectIcon");function T(n,r){if(n.includes(":"))return n;if(n in C.icons||!r)return`${C.prefix}:${n}`;return`${r}:${n}`}t(T,"qualifyIcon");function k(n,r){if(n.icon==="none")return;if(n.icon)return T(n.icon,r.defaultIconPack);if(!r.showIcons)return;if(n.nodeType==="file"){let e=q(n.name,r);if(e==="none")return;if(e)return T(e,r.defaultIconPack)}return`${C.prefix}:${n.nodeType==="directory"?"folder":"file"}`}t(k,"getNodeIcon");Br([{name:C.prefix,icons:C}]);var V=14,de=4,he=16,pe=t(async(n,r)=>{let e=[],i=t((o)=>{let s=k(o,r);if(s)e.push({icon:s,node:o});o.children.forEach(i)},"collect");i(n);let c=await Promise.all(e.map(async({icon:o,node:s})=>({id:s.id,svg:await qt(o,{height:V,width:V})})));return new Map(c.map(({id:o,svg:s})=>[o,s]))},"resolveNodeIcons"),ge=t((n,r,e,i,c,o)=>{let s=i.append("g"),l="treeView-node-label";if(e.nodeType==="directory")l+=" treeView-node-dir";if(e.cssClass)l+=` ${e.cssClass}`;let g=V+de,d=k(e,c),p=d!==void 0;if(d)s.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+c.paddingX}, ${r+c.paddingY})`).html(o.get(e.id)??"");let f=s.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",l),{height:h,width:w}=f.node().getBBox(),u=h+c.paddingY*2,x=n+c.paddingX+(p?g:0);f.attr("x",x),f.attr("y",r+u/2);let m=x+w,b=w+c.paddingX*2+(p?g:0);if(e.BBox={x:n,y:r,width:b,height:u},e.cssClass?.split(/\s+/).includes("highlight"))s.insert("rect",":first-child").attr("x",n).attr("y",r+1).attr("width",0).attr("height",u-2).attr("rx",3).attr("class","treeView-highlight-bg");return{node:e,nodeGroup:s,labelRightEdge:m,centerY:r+u/2}},"positionLabel"),H=t((n,r,e,i,c,o)=>n.append("line").attr("x1",r).attr("y1",e).attr("x2",i).attr("y2",c).attr("stroke-width",o).attr("class","treeView-node-line"),"positionLine"),ue=t((n,r,e,i)=>{let c=0,o=0,s=[],l=t((p,f,h,w)=>{let u=w*(h.rowIndent+h.paddingX),x=ge(u,c,f,p,h,i);s.push(x);let{height:m,width:b}=f.BBox;H(p,u-h.rowIndent,c+m/2,u,c+m/2,h.lineThickness),o=Math.max(o,u+b),c+=m},"drawNode"),g=t((p,f=0)=>{l(n,p,e,f),p.children.forEach((x)=>{g(x,f+1)});let{x:h,y:w,height:u}=p.BBox;if(p.children.length){let{y:x,height:m}=p.children[p.children.length-1].BBox;H(n,h+e.paddingX,w+u,h+e.paddingX,x+m/2+e.lineThickness/2,e.lineThickness)}},"processNode");g(r);let d=s.filter((p)=>p.node.description);if(d.length>0){let f=Math.max(...s.map((h)=>h.labelRightEdge))+he;for(let h of d){let u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();o=Math.max(o,f+u.width+e.paddingX)}}for(let p of s)if(p.node.cssClass?.split(/\s+/).includes("highlight")){let f=p.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let h=o-p.node.BBox.x+8;f.attr("width",h),o=Math.max(o,p.node.BBox.x+h+2)}}return{totalHeight:c,totalWidth:o}},"drawTree"),me=t(async(n,r,e,i)=>{a.debug(`Rendering treeView diagram
4
+ `+n);let c=i.db,o=c.getRoot(),s=c.getConfig(),l=Q(r),g=l.append("g");g.attr("class","tree-view");let d=await pe(o,s),{totalHeight:p,totalWidth:f}=ue(g,o,s,d);l.attr("viewBox",`-${s.lineThickness/2} 0 ${f} ${p}`),G(l,p,f,s.useMaxWidth)},"draw"),we={draw:me},xe=we,ve={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},be=t(({treeView:n})=>{let{labelFontSize:r,labelColor:e,lineColor:i,iconColor:c,descriptionColor:o,highlightBg:s,highlightStroke:l}=X(ve,n);return`
5
+ .treeView-node-label {
6
+ font-size: ${r};
7
+ fill: ${e};
8
+ white-space: pre;
9
+ }
10
+ .treeView-node-dir {
11
+ font-weight: bold;
12
+ }
13
+ .treeView-node-line {
14
+ stroke: ${i};
15
+ }
16
+ .treeView-node-icon {
17
+ color: ${c};
18
+ }
19
+ .treeView-node-description {
20
+ font-size: ${r};
21
+ fill: ${o};
22
+ font-style: italic;
23
+ white-space: pre;
24
+ }
25
+ .treeView-highlight-bg {
26
+ fill: ${s};
27
+ stroke: ${l};
28
+ stroke-width: 1;
29
+ }
30
+ `},"styles"),Ce=be,Ee={db:y,renderer:xe,parser:le,styles:Ce};export{Ee as diagram};
Binary file
Binary file
@@ -0,0 +1,7 @@
1
+ import{v,o,_,i,r,p,e,n,y,Mt}from"./chunk-qjg6dw46.js";var V="__chat__";function S(t){if(!Number.isFinite(t)||t<=0)return"0";if(t<1000)return Math.round(t).toString();if(t<1e6)return`${(t/1000).toFixed(1)}K`;if(t<1e9)return`${(t/1e6).toFixed(2)}M`;return`${(t/1e9).toFixed(2)}B`}function L(t){let u=Number.isFinite(t)?Math.max(0,t):0;return Math.round(u).toLocaleString("en-US")}function R(t){if(!Number.isFinite(t)||t<=0)return"0s";if(t<1000)return"<1s";if(t<60000)return`${Math.floor(t/1000)}s`;if(t<3600000){let c=Math.floor(t/1000),a=Math.floor(c/60),f=c%60;return f>0?`${a}m ${f}s`:`${a}m`}if(t<259200000){let c=Math.floor(t/60000),a=Math.floor(c/60),f=c%60;return f>0?`${a}h ${f}m`:`${a}h`}let u=Math.floor(t/3600000),g=Math.floor(u/24),m=u%24;return m>0?`${g}d ${m}h`:`${g}d`}function ae(t){if(!Number.isFinite(t)||t<=0)return"0s";if(t<1000)return"<1s";if(t<60000)return`${Math.round(t/1000)}s`;if(t<3600000)return`${Math.round(t/60000)}m`;if(t<86400000){let m=t/3600000;return`${m>=10?Math.round(m).toString():m.toFixed(1).replace(/\.0$/,"")}h`}let u=t/86400000;return`${u>=10?Math.round(u).toString():u.toFixed(1).replace(/\.0$/,"")}d`}function B(t,u=1){if(!Number.isFinite(t)||t<=0)return"0%";let g=10**-u/100;if(t<g)return`<${(g*100).toFixed(u)}%`;return`${(t*100).toFixed(u)}%`}function Q(t){if(!Number.isFinite(t)||t<=0)return"0 B";if(t<1024)return`${Math.round(t)} B`;if(t<1048576)return`${(t/1024).toFixed(1)} KB`;if(t<1073741824)return`${(t/1048576).toFixed(2)} MB`;return`${(t/1073741824).toFixed(2)} GB`}function W(t){let u=t.split("-"),g=u[1],m=u[2];if(g!==void 0&&m!==void 0)return`${g}/${m}`;return t}function Z(t){let u=t.split("-"),g=u[0],m=u[1],c=u[2];if(g===void 0||m===void 0||c===void 0)return t;let a=Number(g),f=Number(m)-1,b=Number(c),M=new Date(Date.UTC(a,f,b)),C=["周日","周一","周二","周三","周四","周五","周六"],w=M.getUTCDay(),F=C[w]??"";return`${t} ${F}`}function se(t,u=Date.now()){if(t===null||t===void 0||!Number.isFinite(t)||t<=0)return"从未";let g=Math.max(0,u-t);if(g<60000)return"刚刚";if(g<3600000)return`${Math.max(1,Math.floor(g/60000))} 分钟前`;if(g<86400000)return`${Math.max(1,Math.floor(g/3600000))} 小时前`;if(g<2592000000)return`${Math.max(1,Math.floor(g/86400000))} 天前`;let m=new Date(t),c=m.getFullYear(),a=String(m.getMonth()+1).padStart(2,"0"),f=String(m.getDate()).padStart(2,"0");return`${c}-${a}-${f}`}function K(t){return e("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:e("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${t.percent}%`}})})}function Y(t){return e("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:t.children})}function G(t){return e("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:t.children})}function J(t){return n(G,{children:[n("span",{children:["输入 ",e("span",{className:"text-ink",children:S(t.stat.inputTokens)})]}),n("span",{children:["输出 ",e("span",{className:"text-ink",children:S(t.stat.outputTokens)})]}),n("span",{children:["缓存读 ",e("span",{className:"text-ink",children:S(t.stat.cacheReadTokens)}),t.cacheHitRate!==void 0&&n("span",{className:"text-faint",children:[" (",B(t.cacheHitRate),")"]})]})]})}function oe(t){let{projects:u,selectedProjectID:g,onSelectProject:m}=t,{style:c}=y();if(u.length===0)return e("div",{className:c("surface.empty"),children:"暂无项目统计数据"});return e("div",{className:"divide-y divide-line",children:u.map((a)=>{let f=a.projectID??V,b=g===f,M=Math.max(a.tokenShare>0?1:0,a.tokenShare*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e("span",{className:"font-medium text-sm text-ink truncate",children:a.name}),e("span",{className:c("control.badge","font-mono truncate max-w-[240px]"),title:a.directory||"未绑定项目目录",children:a.directory||"独立会话"}),e("button",{type:"button",onClick:()=>m(b?null:f),className:"rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-accent/10 transition-colors cursor-pointer shrink-0",children:b?"取消筛选":"筛选"})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[e("span",{className:"text-xs font-medium text-ink",title:L(a.totalTokens),children:S(a.totalTokens)}),n("span",{className:"text-[11px] text-faint",children:["(",B(a.tokenShare),")"]})]})]}),e(K,{percent:M}),n(Y,{children:[e(J,{stat:a,cacheHitRate:a.cacheHitRate}),n(G,{children:[n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(a.activeDurationMs)})]}),n("span",{children:[e("span",{className:"text-ink",children:a.sessionCount.toLocaleString()})," 会话"]}),n("span",{children:["工具 ",e("span",{className:"text-ink",children:a.toolCalls.toLocaleString()})," 次"]})]})]})]},f)})})}function re(t){let{models:u}=t,{ModelIcon:g,style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无模型调用数据"});return e("div",{className:"divide-y divide-line",children:u.map((c)=>{let a=Math.max(c.share>0?1:0,c.share*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e(g,{modelID:c.model,className:"size-4 shrink-0"}),e("span",{className:"font-mono text-sm font-medium text-ink truncate",children:c.shortName}),e("span",{className:m("control.badge","font-mono shrink-0"),children:c.provider})]}),n("div",{className:"flex items-baseline gap-2.5 font-mono tabular-nums shrink-0",children:[c.avgTps!==null&&n("span",{className:"text-[11px] text-dim",children:[c.avgTps.toFixed(1)," tok/s"]}),n("span",{className:"text-xs font-medium text-ink",title:L(c.totalTokens),children:[S(c.totalTokens)," ",n("span",{className:"text-[11px] font-normal text-faint",children:["(",B(c.share),")"]})]})]})]}),e(K,{percent:a}),n(Y,{children:[e(J,{stat:c,cacheHitRate:c.cacheHitRate}),n(G,{children:[n("span",{children:[e("span",{className:"text-ink",children:c.turns.toLocaleString()})," 轮",c.errors>0?n("span",{className:"text-danger",children:[" (",c.errors," 错)"]}):null]}),n("span",{children:["工具 ",e("span",{className:"text-ink",children:c.toolCalls.toLocaleString()})," 次"]}),c.generationMs>0&&n("span",{children:["推理 ",e("span",{className:"text-ink",children:ae(c.generationMs)})]})]})]})]},c.model)})})}function ie(t){let{tools:u}=t,{StatusChip:g,style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无工具调用数据"});return e("div",{className:"divide-y divide-line",children:u.map((c)=>{let a=Math.max(c.share>0?1:0,c.share*100),f=c.successRate>=0.95?"success":c.successRate>=0.8?"warning":"danger",b=Math.max(0,c.calls-c.errors),M=c.calls>0?Math.round(c.outputBytes/c.calls):0;return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e("span",{className:"font-mono text-sm font-medium text-ink truncate",children:c.name}),n(g,{tone:f,children:["成功率 ",B(c.successRate)]})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[n("span",{className:"text-xs font-medium text-ink",children:[c.calls.toLocaleString()," 次"]}),n("span",{className:"text-[11px] text-faint",children:["(",B(c.share),")"]})]})]}),e(K,{percent:a}),n(Y,{children:[n(G,{children:[n("span",{children:["成功 ",e("span",{className:"text-ink",children:b.toLocaleString()})," 次"]}),n("span",{children:["失败 ",e("span",{className:c.errors>0?"text-danger":"text-ink",children:c.errors.toLocaleString()})," 次"]})]}),n(G,{children:[n("span",{children:["累计输出 ",e("span",{className:"text-ink",children:Q(c.outputBytes)})]}),n("span",{children:["单次均值 ",e("span",{className:"text-ink",children:Q(M)})]})]})]})]},c.name)})})}function le(t){let{sessions:u,onOpenSession:g}=t,{style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无高消耗会话记录"});let c=Math.max(1,...u.map((a)=>a.totalTokens));return e("div",{className:"divide-y divide-line",children:u.map((a)=>{let f=c>0?Math.max(1,a.totalTokens/c*100):0,b=a.model.split("/").pop()??a.model;return n("button",{type:"button",onClick:()=>g(a.id),className:"group block w-full p-4 text-left space-y-2.5 hover:bg-raised/40 transition-colors cursor-pointer",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e("span",{className:"font-medium text-sm text-ink truncate group-hover:text-accent transition-colors",children:a.title.trim()||"新会话"}),e("span",{className:m("control.badge","font-mono truncate max-w-[140px] shrink-0"),title:a.projectName,children:a.projectName}),a.kind==="sub"&&e("span",{className:"rounded bg-accent/15 px-1.5 py-0.5 text-[10.5px] text-accent shrink-0",children:"子代理"}),a.archivedAt!==null&&e("span",{className:m("control.badge","shrink-0"),children:"已归档"})]}),n("div",{className:"flex items-center gap-1.5 font-mono tabular-nums shrink-0",children:[e("span",{className:"text-xs font-medium text-ink",title:L(a.totalTokens),children:S(a.totalTokens)}),e(Mt,{className:"size-3.5 text-faint group-hover:text-ink group-hover:translate-x-0.5 transition-all"})]})]}),e(K,{percent:f}),n(Y,{children:[e(J,{stat:a}),n(G,{children:[e("span",{className:"text-ink",children:b}),n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(a.activeDurationMs)})]}),n("span",{children:[e("span",{className:"text-ink",children:a.assistantTurns})," 轮"]}),e("span",{className:"text-faint",children:se(a.updated)})]})]})]},a.id)})})}var ce=[{value:"tokens",label:"Token 用量"},{value:"duration",label:"活跃耗时"},{value:"activity",label:"交互轮次"}];function ue(t){let{cn:u,Segmented:g,SettingGroup:m,style:c}=y(),{daily:a}=t,[f,b]=r("tokens"),[M,C]=r(null),w=_(()=>a.some((s)=>s.totalTokens>0||s.activeDurationMs>0||s.runs>0),[a]),F=_(()=>{if(a.length===0)return{totalText:"0",avgText:"0",peakDate:"—",peakValueText:"0"};if(f==="tokens"){let N=a.reduce((P,A)=>P+A.totalTokens,0),j=a.filter((P)=>P.totalTokens>0).length,T=a[0];for(let P of a)if(!T||P.totalTokens>T.totalTokens)T=P;return{totalText:S(N),totalFullText:L(N),avgText:j>0?S(Math.round(N/j)):"0",peakDate:T&&T.totalTokens>0?W(T.date):"—",peakValueText:T&&T.totalTokens>0?S(T.totalTokens):"0"}}if(f==="duration"){let N=a.reduce((P,A)=>P+A.activeDurationMs,0),j=a.filter((P)=>P.activeDurationMs>0).length,T=a[0];for(let P of a)if(!T||P.activeDurationMs>T.activeDurationMs)T=P;return{totalText:R(N),totalFullText:R(N),avgText:j>0?R(Math.round(N/j)):"0s",peakDate:T&&T.activeDurationMs>0?W(T.date):"—",peakValueText:T&&T.activeDurationMs>0?R(T.activeDurationMs):"0s"}}let s=a.reduce((N,j)=>N+j.assistantTurns,0),l=a.reduce((N,j)=>N+j.userMessages,0),x=s+l,k=a.filter((N)=>N.assistantTurns>0||N.userMessages>0).length,h=a[0];for(let N of a){let j=h?h.assistantTurns+h.userMessages:0;if(!h||N.assistantTurns+N.userMessages>j)h=N}let H=h?h.assistantTurns+h.userMessages:0;return{totalText:`${x.toLocaleString()} 轮`,totalFullText:`助手 ${s.toLocaleString()} 轮 · 用户 ${l.toLocaleString()} 问`,avgText:k>0?`${(x/k).toFixed(1)} 轮/天`:"0 轮/天",peakDate:h&&H>0?W(h.date):"—",peakValueText:h&&H>0?`${H.toLocaleString()} 轮`:"0 轮"}},[a,f]),D=_(()=>{if(M){let s=a.find((l)=>l.date===M);if(s)return s}for(let s=a.length-1;s>=0;s--){let l=a[s];if(l&&(l.totalTokens>0||l.activeDurationMs>0||l.runs>0))return l}return a[a.length-1]},[a,M]),z=_(()=>{if(f==="tokens")return Math.max(1,...a.map((s)=>s.totalTokens));if(f==="duration")return Math.max(1000,...a.map((s)=>s.activeDurationMs));return Math.max(1,...a.map((s)=>s.assistantTurns+s.userMessages))},[a,f]),d=_(()=>{if(a.length<=7)return a.map((x)=>x.date);let s=6,l=[];for(let x=0;x<s;x++){let k=Math.round(x*(a.length-1)/(s-1)),h=a[k];if(h)l.push(h.date)}return l},[a]);if(!w)return e(m,{title:"每日趋势",action:e(g,{value:f,onChange:(s)=>b(s),options:ce}),children:e("div",{className:c("surface.empty"),children:"当前时间范围内暂无活跃数据"})});return e(m,{title:"每日趋势",action:e(g,{value:f,onChange:(s)=>b(s),options:ce}),children:n("div",{className:"p-4 space-y-4",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 font-mono text-dim tabular-nums",children:[n("span",{children:["汇总 ",e("span",{className:"text-ink",children:F.totalText})]}),n("span",{children:["日均 ",e("span",{className:"text-ink",children:F.avgText})]}),n("span",{children:["峰值 ",e("span",{className:"text-ink",children:F.peakValueText}),F.peakDate!=="—"?n("span",{className:"text-faint",children:[" (",F.peakDate,")"]}):null]})]}),n("div",{className:"flex items-center gap-3 text-[11px] text-dim",children:[f==="tokens"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent/40"}),"缓存读"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"输入"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"输出"]})]}),f==="duration"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"工作调度"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"模型推理"]})]}),f==="activity"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"助手回复"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"用户提问"]})]})]})]}),n("div",{className:"relative h-44 w-full pt-1",children:[n("div",{className:"absolute inset-0 flex flex-col justify-between pointer-events-none pb-5 text-[10px] text-faint/60",children:[e("div",{className:"border-b border-line/40 w-full"}),e("div",{className:"border-b border-line/30 w-full"}),e("div",{className:"border-b border-line/40 w-full"})]}),n("section",{"aria-label":"每日趋势柱状序列",className:"relative h-full flex flex-col justify-between",onMouseLeave:()=>C(null),children:[e("div",{className:"flex-1 flex items-end gap-1 sm:gap-1.5 pb-2",children:a.map((s)=>{let l=s.totalTokens;if(f==="duration")l=s.activeDurationMs;else if(f==="activity")l=s.assistantTurns+s.userMessages;let x=l<=0,k=x?0:Math.max(3,Math.min(100,l/z*100)),h=D?.date===s.date;return n("button",{type:"button","aria-label":`${s.date} 统计数据`,className:"flex-1 h-full flex flex-col justify-end items-center group cursor-pointer relative min-w-0 bg-transparent p-0 border-0 focus:outline-hidden",onMouseEnter:()=>C(s.date),onFocus:()=>C(s.date),onClick:()=>C(s.date),children:[e("div",{className:u("absolute inset-y-0 w-full rounded-xs transition-colors pointer-events-none",h?"bg-accent/10":"group-hover:bg-raised/60")}),x?e("div",{className:"h-1 w-full max-w-[24px] rounded-full bg-raised group-hover:bg-dim/30"}):n("div",{className:"w-full max-w-[24px] rounded-t-xs overflow-hidden flex flex-col justify-end transition-all duration-150",style:{height:`${k}%`},children:[f==="tokens"&&n(p,{children:[s.outputTokens>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${s.outputTokens/s.totalTokens*100}%`}}),s.inputTokens+s.cacheWriteTokens>0&&e("div",{className:"bg-accent transition-all duration-200",style:{height:`${(s.inputTokens+s.cacheWriteTokens)/s.totalTokens*100}%`}}),s.cacheReadTokens>0&&e("div",{className:"bg-accent/40 transition-all duration-200",style:{height:`${s.cacheReadTokens/s.totalTokens*100}%`}})]}),f==="duration"&&n(p,{children:[s.generationMs>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${Math.min(100,s.generationMs/Math.max(1,s.activeDurationMs)*100)}%`}}),e("div",{className:"bg-accent flex-1 transition-all duration-200"})]}),f==="activity"&&n(p,{children:[s.userMessages>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${s.userMessages/Math.max(1,s.assistantTurns+s.userMessages)*100}%`}}),e("div",{className:"bg-accent flex-1 transition-all duration-200"})]})]}),h&&e("div",{className:"absolute -bottom-1 size-1 rounded-full bg-accent"})]},s.date)})}),e("div",{className:u("flex items-center pt-1.5 text-[10px] text-faint font-mono tabular-nums",a.length<=7?"gap-1 sm:gap-1.5":"justify-between"),children:d.map((s)=>e("div",{className:u("whitespace-nowrap",a.length<=7&&"flex-1 text-center"),children:W(s)},s))})]})]}),e("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line pt-3 font-mono text-xs tabular-nums",children:D?n(p,{children:[e("span",{className:"text-ink",children:Z(D.date)}),n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 text-dim",children:[n("span",{children:["Token ",e("span",{className:"text-ink",children:S(D.totalTokens)})]}),n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(D.activeDurationMs)})]}),n("span",{children:["交互 ",n("span",{className:"text-ink",children:[D.assistantTurns+D.userMessages," 轮"]})]}),n("span",{children:["工具 ",n("span",{className:"text-ink",children:[D.toolCalls," 次"]})]})]})]}):e("span",{className:"font-sans text-faint",children:"悬停柱状图查看单日明细"})})]})})}function pe(t){let{cn:u,SettingGroup:g}=y(),{daily:m,hourly:c}=t,[a,f]=r(null),b=_(()=>{let l=new Map;for(let k of c)l.set(k.hour,k);let x=[];for(let k=0;k<24;k++){let h=l.get(k);if(h)x.push(h);else x.push({hour:k,totalTokens:0,activeDurationMs:0,userMessages:0,assistantTurns:0,runs:0})}return x},[c]),M=_(()=>{let l=b[0];for(let x of b)if(!l||x.totalTokens>l.totalTokens)l=x;return l&&l.totalTokens>0?l:null},[b]),C=_(()=>b.reduce((l,x)=>l+x.totalTokens,0),[b]),w=_(()=>Math.max(1,...b.map((l)=>l.totalTokens)),[b]),F=_(()=>{if(C<=0)return 0;return b.filter((x)=>x.hour>=8&&x.hour<20).reduce((x,k)=>x+k.totalTokens,0)/C},[b,C]),D=_(()=>Math.max(1,...m.map((l)=>l.totalTokens)),[m]),z=_(()=>{let l=0,x=0;for(let k of m)if(k.totalTokens>0||k.activeDurationMs>0||k.runs>0){if(x++,x>l)l=x}else x=0;return l},[m]),d=_(()=>m.filter((l)=>l.totalTokens>0||l.activeDurationMs>0||l.runs>0).length,[m]),s=a!==null?b[a]:M;return n(g,{title:"活跃时段与热力",action:n("div",{className:"flex items-center gap-3 font-mono text-xs text-faint tabular-nums",children:[n("span",{children:["日间占比 ",B(F)]}),n("span",{children:["连续活跃 ",z," 天"]}),n("span",{children:["活跃 ",d,"/",m.length," 天"]})]}),children:[n("div",{className:"p-4 space-y-3",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[e("span",{className:"text-dim",children:"24 小时分布"}),s?n("div",{className:"flex items-center gap-3 font-mono text-dim tabular-nums",children:[n("span",{className:"text-ink",children:[a!==null?"时段 ":"高峰 ",String(s.hour).padStart(2,"0"),":00 -"," ",String((s.hour+1)%24).padStart(2,"0"),":00"]}),e("span",{className:"text-ink",children:S(s.totalTokens)}),s.activeDurationMs>0&&e("span",{children:R(s.activeDurationMs)})]}):e("span",{className:"text-faint",children:"暂无时段分布"})]}),n("section",{"aria-label":"24 小时活跃分布序列",className:"h-28 w-full flex flex-col justify-between pt-1",onMouseLeave:()=>f(null),children:[e("div",{className:"flex-1 flex items-end gap-1.5 pb-1.5",children:b.map((l)=>{let x=M?.hour===l.hour,k=a===l.hour,h=l.totalTokens>0?Math.max(6,l.totalTokens/w*100):0,H=`${String(l.hour).padStart(2,"0")}:00 - ${String((l.hour+1)%24).padStart(2,"0")}:00
2
+ 消耗: ${L(l.totalTokens)} Token
3
+ 耗时: ${R(l.activeDurationMs)}
4
+ 助手轮次: ${l.assistantTurns} 轮`;return e("button",{type:"button","aria-label":`${String(l.hour).padStart(2,"0")}:00 时段统计`,className:"flex-1 h-full flex flex-col justify-end items-center group relative cursor-pointer bg-transparent p-0 border-0 focus:outline-hidden",title:H,onMouseEnter:()=>f(l.hour),onFocus:()=>f(l.hour),onClick:()=>f(l.hour),children:h>0?e("div",{className:u("w-full max-w-[20px] rounded-t-xs transition-all duration-200",x||k?"bg-accent":"bg-accent/55 group-hover:bg-accent"),style:{height:`${h}%`}}):e("div",{className:"h-1 w-full max-w-[20px] rounded-full bg-raised group-hover:bg-dim/30"})},l.hour)})}),n("div",{className:"flex justify-between items-center text-[10px] text-faint font-mono pt-1.5 border-t border-line/40",children:[e("span",{children:"00:00"}),e("span",{children:"04:00"}),e("span",{children:"08:00"}),e("span",{children:"12:00"}),e("span",{children:"16:00"}),e("span",{children:"20:00"}),e("span",{children:"23:00"})]})]})]}),n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"text-xs text-dim",children:["自然日热力 (",m.length," 天)"]}),e("div",{className:"flex flex-wrap items-center gap-1.5",children:m.map((l)=>{let x="bg-raised";if(l.totalTokens>0){let h=l.totalTokens/D;if(h<=0.33)x="bg-accent/30";else if(h<=0.66)x="bg-accent/60";else x="bg-accent"}let k=`${Z(l.date)}
5
+ 消耗: ${L(l.totalTokens)} Token
6
+ 耗时: ${R(l.activeDurationMs)}
7
+ 助手轮次: ${l.assistantTurns} 轮`;return e("div",{className:u("size-3.5 rounded-xs transition-transform hover:scale-125 cursor-pointer",x),title:k},l.date)})})]})]})}var xe=[{value:"7d",label:"近 7 天"},{value:"30d",label:"近 30 天"},{value:"90d",label:"近 90 天"},{value:"all",label:"全部"}],q=new Map,me=[];function X(t,u){return`${t}:${u??"all"}`}function Le(t){let{connection:u,onOpen:g}=t,{Button:m,PageLayout:c,Segmented:a,SettingGroup:f,style:b}=y(),[M,C]=r("30d"),[w,F]=r(null),[D,z]=r("projects"),[d,s]=r(()=>q.get(X("30d",null))??null),[l,x]=r(()=>!q.has(X("30d",null))),[k,h]=r(null),[H,N]=r(()=>me),j=i(0),T=v(async()=>{let A=++j.current,O=X(M,w),ee=q.get(O);if(ee)s(ee);x(!0);try{let E=new URLSearchParams({range:M,tzOffset:String(new Date().getTimezoneOffset())});if(w)E.set("projectID",w);let U=await u.request(`/api/stats?${E.toString()}`);if(A!==j.current)return;if(q.set(O,U),s(U),h(null),U.projects)N((de)=>{let te=new Map(de.map((I)=>[I.id,I.name]));for(let I of U.projects)if(I.projectID)te.set(I.projectID,I.name);let ne=Array.from(te.entries()).map(([I,fe])=>({id:I,name:fe}));return me=ne,ne})}catch(E){if(A===j.current)h(E instanceof Error?E.message:"加载统计数据失败")}finally{if(A===j.current)x(!1)}},[u,M,w]);o(()=>(T(),()=>{j.current++}),[T]);let P=_(()=>{if(!w)return null;if(w===V)return"独立聊天";return(H.find((O)=>O.id===w)??d?.projects.find((O)=>O.projectID===w))?.name??"指定项目"},[w,H,d]);return n(c,{title:P?n(p,{children:["统计 ",n("span",{className:"text-dim",children:["· ",P]})]}):"统计",description:"按项目、模型与工具统计活跃耗时与 Token 消耗。",actions:n(p,{children:[w&&e(m,{size:"sm",variant:"ghost",onClick:()=>F(null),children:"返回全部"}),e(a,{value:M,onChange:C,options:xe})]}),children:[k&&n("div",{className:"mb-4 flex items-center justify-between rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger",children:[e("span",{children:k}),e(m,{size:"sm",variant:"ghost",onClick:()=>{T()},className:"text-danger hover:text-danger",children:"重试"})]}),l&&!d?e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在加载统计…"}):!d?e("div",{className:b("surface.card","p-12 text-center text-sm text-dim"),children:"暂无统计数据"}):n("div",{className:"space-y-8",children:[e(f,{title:"核心总览",unboxed:!0,children:n("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[n("div",{className:b("surface.card","p-4"),children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{children:"总 Token 消耗"}),n("span",{className:"font-mono tabular-nums",children:["缓存命中 ",B(d.overview.cacheHitRate)]})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tracking-tight text-ink tabular-nums",title:`${L(d.overview.totalTokens)} Token`,children:S(d.overview.totalTokens)}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("span",{children:["输入 ",S(d.overview.inputTokens)]}),n("span",{children:["输出 ",S(d.overview.outputTokens)]}),n("span",{children:["缓存读 ",S(d.overview.cacheReadTokens)]})]})]}),n("div",{className:b("surface.card","p-4"),children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{children:"活跃工作耗时"}),n("span",{className:"font-mono tabular-nums",children:["日均"," ",d.overview.activeDays>0?R(d.overview.activeDurationMs/d.overview.activeDays):"0s"]})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tracking-tight text-ink tabular-nums",children:R(d.overview.activeDurationMs)}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("span",{children:["模型推理 ",R(d.overview.generationMs)]}),n("span",{children:["并发累计 ",R(d.overview.cumulativeRunDurationMs)]})]})]}),n("div",{className:b("surface.card","p-4"),children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{children:"会话与工作流"}),n("span",{className:"font-mono tabular-nums",children:[d.overview.activeProjects,"/",d.overview.totalProjects," 活跃项目"]})]}),n("div",{className:"mt-1.5 font-mono text-xl font-semibold tracking-tight text-ink tabular-nums",children:[d.overview.sessionCount.toLocaleString()," 个会话"]}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("span",{children:[d.overview.mainSessionCount," 主会话 / ",d.overview.subSessionCount," 子代理"]}),n("span",{children:[d.overview.userMessages," 提问 / ",d.overview.assistantTurns," 回复"]})]})]}),n("div",{className:b("surface.card","p-4"),children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{children:"吞吐效率与调用"}),n("span",{className:"font-mono tabular-nums",children:[d.overview.compactions," 次折叠"]})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tracking-tight text-ink tabular-nums",children:d.overview.avgTps!==null?`${d.overview.avgTps.toFixed(1)} tok/s`:`${d.overview.toolCalls.toLocaleString()} 次调用`}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("span",{children:[d.overview.toolCalls.toLocaleString()," 次工具调用"]}),n("span",{children:[d.overview.runCount.toLocaleString()," 次运行"]})]})]})]})}),e(ue,{daily:d.daily}),e(pe,{daily:d.daily,hourly:d.hourly}),e(f,{title:"分类明细",action:e(a,{value:D,onChange:z,options:[{value:"projects",label:`项目消耗 (${d.projects.length})`},{value:"models",label:`模型分析 (${d.models.length})`},{value:"tools",label:`工具调用 (${d.tools.length})`},{value:"sessions",label:`高消耗会话 (${d.topSessions.length})`}]}),children:n("div",{className:"animate-fade",children:[D==="projects"&&e(oe,{projects:d.projects,selectedProjectID:w,onSelectProject:F,onOpenSession:g}),D==="models"&&e(re,{models:d.models}),D==="tools"&&e(ie,{tools:d.tools}),D==="sessions"&&e(le,{sessions:d.topSessions,onOpenSession:g})]},D)})]})]})}export{Le as StatsPage};
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{o,i,r,Vt,p,e,n,y,ei,s,le,ar,xt,ge,pa,oe}from"./chunk-qjg6dw46.js";var ke=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],L=s("at-sign",ke);var Ce=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],de=s("file-code-2",Ce);var we=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],pe=s("maximize-2",we);var Me=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],Z=s("notebook-pen",Me);var Ie=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ue=s("user",Ie);var w={approve:{label:"通过",text:"text-success",ring:"ring-success/80",soft:"bg-success/12 text-success"},reject:{label:"反对",text:"text-danger",ring:"ring-danger/80",soft:"bg-danger/12 text-danger"},abstain:{label:"弃权",text:"text-dim",ring:"ring-line-strong",soft:"bg-raised text-dim"},pending:{label:"未表态",text:"text-faint",ring:"ring-line",soft:"bg-raised text-faint"}},ze={thinking:"思考中",reading:"查阅中",speaking:"发言中",idle:"等待中",error:"出错",aborted:"已中止"},F={success:"text-success",warning:"text-warning",danger:"text-danger",neutral:"text-faint"},ee={success:"bg-success",warning:"bg-warning",danger:"bg-danger",neutral:"bg-faint"};function V(t){return t==="thinking"||t==="reading"||t==="speaking"}function K(t){let u=V(t.status);return{busy:u,text:u&&t.activeTool?t.activeTool:ze[t.status]}}function te(t){let u=t.members.filter((b)=>b.verdict==="approve").length,f=t.members.filter((b)=>b.verdict==="reject").length;if(t.state==="running"){if(t.phase==="research")return{tone:"warning",label:"调研中"};if(t.phase==="opening")return{tone:"warning",label:"开场表态"};return{tone:"warning",label:"群聊交流"}}if(t.state==="consensus"){if(u===t.members.length)return{tone:"success",label:"全票通过"};if(f===t.members.length)return{tone:"danger",label:"全票反对"};if(f>u)return{tone:"danger",label:"共识:反对"};return{tone:"success",label:"共识:通过"}}if(t.state==="diverged")return{tone:"warning",label:"存在分歧"};if(t.state==="error")return{tone:"danger",label:"失败"};return{tone:"neutral",label:"已中止"}}function W(t){let u=Math.max(1,Math.round(t/1000));if(u<60)return`${u}s`;return`${Math.floor(u/60)}m ${String(u%60).padStart(2,"0")}s`}var De={research:"调研",opening:"开场表态",discussion:"群聊交流"};function G(t){let{cn:u}=y(),{room:f}=t,b=te(f),g=f.state==="running",v=f.research?["research","opening","discussion"]:["opening","discussion"],a=g?v.indexOf(f.phase==="closed"?"discussion":f.phase??"discussion"):-1,h=[...v.map((m,d)=>({key:m,label:De[m],done:!g||d<a,active:d===a})),{key:"closed",label:g?"结论":b.label,done:!g,active:!1}];return e("ol",{className:u("flex min-w-0 gap-1",t.className),children:h.map((m,d)=>{let c=d===h.length-1&&!g;return n("li",{className:"min-w-0 flex-1",children:[e("span",{className:u("block h-[3px] rounded-full transition-colors duration-300",c?ee[b.tone]:m.active?"bg-accent animate-pulse":m.done?"bg-line-strong":"bg-line/60")}),e("span",{className:u("mt-1.5 block truncate text-[11px]",c?u("font-medium",F[b.tone]):m.active?"font-medium text-ink":m.done?"text-dim":"text-faint"),children:m.label})]},m.key)})})}function fe(t){let{Collapsible:u,CollapsibleContent:f,Composer:b,Markdown:g,ModelIcon:v,ScrollArea:a,SessionView:h,cn:m,confirm:d}=y(),{room:c,onClose:C}=t,[M,x]=r(!1),[J,D]=r(""),[R,H]=r(!1),[_,E]=r(),[S,B]=r(!1),[N,I]=r(!0),[T,z]=r(),ne=i(!1);ne.current=T!==void 0;let[U,X]=r(),[se,A]=r(!1),ae=i(!1);ae.current=U!==void 0;let ie=(l)=>{A(!1),X(l)},re=i(null),Y=i(null),P=c.state==="running",j=te(c),be=new Map(c.members.map((l)=>[l.id,l]));o(()=>{let l=(me)=>{if(me.key!=="Escape"||me.defaultPrevented||ne.current)return;if(ae.current)A(!0);else x(!0)},k=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l),document.body.style.overflow=k}},[]);let ce=c.messages.length;o(()=>{let l=Y.current;if(!l||!N||ce===0)return;l.scrollTo({top:l.scrollHeight,behavior:"smooth"})},[ce,N]);let ve=async(l)=>{await t.onPost(l),I(!0)},he=async()=>{if(R)return;if(!await d({title:"中止理事会?",description:"所有成员会立即停止,已有发言保留。",action:"中止",danger:!0}))return;H(!0),E(void 0);try{await t.onAbort()}catch(k){E(k instanceof Error?k.message:"中止理事会失败")}finally{H(!1)}},Q=(l)=>{X(void 0),D((k)=>k.includes(`@${l}`)?k:`${k?`${k.trimEnd()} `:""}@${l} `),requestAnimationFrame(()=>re.current?.focus())},Ne=c.members.filter((l)=>l.verdict==="approve").length,ye=c.members.filter((l)=>l.verdict==="reject").length,q=c.members.find((l)=>l.id===T),O=c.members.find((l)=>l.id===U);return Vt(n("div",{role:"dialog","aria-modal":"true","aria-label":`理事会:${c.topic}`,onAnimationEnd:(l)=>{if(M&&l.target===l.currentTarget)C()},className:m("fixed inset-0 z-50 flex flex-col bg-bg pt-[env(safe-area-inset-top)] text-ink",M?"pointer-events-none animate-dialog-out":"animate-dialog-in"),children:[n(u,{open:S,onOpenChange:B,className:"shrink-0 border-b border-line px-4 pt-3 pb-3 sm:px-6",children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-3 text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-[0.2em] text-dim",children:"COUNCIL"}),e("span",{className:"tabular-nums",children:W(t.elapsedMs)}),n("span",{className:"tabular-nums",children:[c.messages.length," 条发言"]})]}),n("button",{type:"button","aria-expanded":S,onClick:()=>B((l)=>!l),className:"mt-0.5 flex max-w-full cursor-pointer items-start gap-1.5 text-left md:items-center",children:[e("h2",{className:"line-clamp-2 text-[15px] leading-snug font-semibold md:truncate md:text-lg",children:c.topic}),e(ge,{className:m("mt-0.5 size-4 shrink-0 text-faint transition-transform duration-300 ease-out-quint md:mt-0",!S&&"-rotate-90")})]})]}),n("div",{className:"flex shrink-0 items-center gap-1",children:[n("span",{className:m("inline-flex items-center gap-1.5 rounded-full border border-line px-2.5 py-1 text-xs font-medium",F[j.tone]),children:[e("span",{className:m("size-1.5 rounded-full",ee[j.tone],P&&"animate-pulse")}),j.label]}),e("button",{type:"button","aria-label":"关闭理事会页面",title:"关闭(Esc)",onClick:()=>x(!0),className:"ml-1 inline-flex size-10 -mr-2 cursor-pointer items-center justify-center rounded-full text-faint transition-colors hover:bg-raised hover:text-ink md:size-8 md:mr-0",children:e(oe,{className:"size-4"})})]})]}),e(f,{children:e("div",{className:"mt-2 max-h-[40dvh] overflow-y-auto overscroll-contain rounded-xl bg-panel px-3.5 py-2.5 text-[13px] leading-relaxed text-dim md:max-h-48",children:e(g,{text:c.brief})})}),e(G,{room:c,className:"mt-3"})]}),n("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[e("div",{className:"flex shrink-0 gap-2 overflow-x-auto overscroll-x-contain border-b border-line px-4 py-2.5 [scrollbar-width:none] md:hidden",children:c.members.map((l)=>e(Se,{member:l,onSelect:()=>z(l.id)},l.id))}),n("aside",{className:"hidden w-72 shrink-0 flex-col gap-2 overflow-y-auto border-r border-line p-4 md:flex",children:[n("div",{className:"flex items-center justify-between text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-wide",children:"席位"}),n("span",{className:"tabular-nums",children:[e("span",{className:"text-success",children:Ne})," / ",e("span",{className:"text-danger",children:ye})," /"," ",c.members.length]})]}),c.members.map((l)=>e(Re,{member:l,viewing:l.id===U,onMention:()=>Q(l.name),onOpen:()=>l.id===U?A(!0):ie(l.id)},l.id))]}),O&&n("main",{onAnimationEnd:(l)=>{if(!se||l.target!==l.currentTarget)return;A(!1),X(void 0)},className:m("flex min-h-0 min-w-0 flex-1 flex-col",se?"pointer-events-none animate-overlay-out":"animate-fade"),children:[n("div",{className:"flex shrink-0 items-center gap-2 border-b border-line px-3 py-2 sm:px-4",children:[n("button",{type:"button",onClick:()=>A(!0),className:"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-lg px-2 text-[13px] text-dim transition-colors hover:bg-raised hover:text-ink",children:[e(ar,{className:"size-4"}),"群聊"]}),e("span",{className:"text-line-strong",children:"/"}),n("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-[13px] font-medium",children:[e(v,{modelID:O.model,className:"size-4 shrink-0",size:16}),n("span",{className:"truncate",children:[O.name," 的推理过程"]})]}),e("button",{type:"button","aria-label":"在完整页面打开",title:"在完整页面打开",onClick:()=>t.onOpenMember(O.childSessionID),className:"inline-flex size-8 cursor-pointer items-center justify-center rounded-lg text-faint transition-colors hover:bg-raised hover:text-ink",children:e(xt,{className:"size-4"})})]}),e(h,{sessionID:O.childSessionID},O.childSessionID)]}),n("main",{className:m("min-h-0 min-w-0 flex-1 flex-col animate-fade",O?"hidden":"flex"),children:[e(a,{viewportRef:Y,onScrollCapture:(l)=>{let k=Y.current;if(!k||l.target!==k)return;I(k.scrollHeight-k.scrollTop-k.clientHeight<80)},children:n("div",{className:"mx-auto w-full max-w-3xl px-4 py-4 sm:px-6 md:py-5",children:[c.messages.length===0?n("div",{className:"flex flex-col items-center justify-center gap-3 py-24 text-center text-faint",children:[P?e(le,{className:"size-5 animate-spin"}):null,e("p",{className:"text-sm",children:P?c.phase==="research"?"成员正在各自调研,笔记不会进入群聊":"成员正在独立准备开场观点,彼此不可见":"这场理事会没有产生发言"})]}):e("ol",{className:"space-y-5",children:c.messages.map((l)=>e(Te,{message:l,membersByID:be,onMention:()=>Q(l.senderName)},l.floor))}),c.summary&&!P&&n("section",{className:"mt-8 rounded-2xl border border-line bg-panel px-4 py-3",children:[n("h3",{className:m("text-xs font-semibold",F[j.tone]),children:["结论:",j.label]}),e("div",{className:"mt-1.5 text-[13px] leading-relaxed text-dim",children:e(g,{text:c.summary})})]})]})}),e("div",{className:"shrink-0 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:px-6 md:pb-4",children:n("div",{className:"mx-auto w-full max-w-3xl",children:[_&&e("p",{role:"status",className:"px-1 pb-2 text-[13px] text-danger",children:_}),e(b,{draftKey:`council:${c.roomID}`,placeholder:P?"插话,@ 某位成员会点名要求其回应":"理事会已结束,插话会重新唤醒成员",busy:P,allowAttachments:!1,text:J,onTextChange:D,inputRef:re,onSend:ve,onAbort:()=>void he()})]})})]})]}),q&&e(Oe,{member:q,onClose:()=>z(void 0),onMention:()=>{z(void 0),Q(q.name)},onOpen:()=>{z(void 0),ie(q.id)}})]}),document.body)}function Se(t){let{ModelIcon:u,cn:f}=y(),{member:b}=t,g=w[b.verdict]??w.pending,{busy:v}=K(b);return n("button",{type:"button",onClick:t.onSelect,"aria-label":`${b.name},${g.label},查看详情`,className:"flex h-11 max-w-[11rem] shrink-0 cursor-pointer items-center gap-2 rounded-full border border-line bg-panel/60 pr-3.5 pl-1.5 active:bg-raised",children:[n("span",{className:f("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",g.ring),children:[e(u,{modelID:b.model,className:"size-4",size:16}),v&&e(le,{className:"absolute -right-1 -bottom-1 size-3.5 animate-spin rounded-full bg-bg text-accent"})]}),n("span",{className:"min-w-0 text-left leading-tight",children:[e("span",{className:"block truncate text-[13px] font-medium",children:b.name}),e("span",{className:f("block text-[11px]",g.text),children:g.label})]})]})}function Oe(t){let{Button:u,Dialog:f,Markdown:b,ModelIcon:g,cn:v}=y(),{member:a}=t,h=w[a.verdict]??w.pending,m=K(a);return e(f,{open:!0,onOpenChange:(d)=>!d&&t.onClose(),title:n("span",{className:"flex min-w-0 items-center gap-2.5",children:[e("span",{className:v("flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",h.ring),children:e(g,{modelID:a.model,className:"size-4",size:16})}),e("span",{className:"min-w-0 truncate",children:a.name}),e("span",{className:v("shrink-0 rounded px-1.5 py-px text-[11px] font-medium",h.soft),children:h.label})]}),description:a.model,footer:n(p,{children:[n(u,{variant:"secondary",onClick:t.onMention,children:[e(L,{className:"size-4"}),"点名"]}),n(u,{variant:"secondary",onClick:t.onOpen,children:[e(xt,{className:"size-4"}),"查看推理"]})]}),children:n("div",{className:"space-y-3 pb-1",children:[n("div",{className:"flex items-center gap-3 text-[13px]",children:[n("span",{className:v("flex min-w-0 flex-1 items-center gap-1.5",m.busy?"text-accent":"text-dim"),children:[m.busy&&e(le,{className:"size-3.5 shrink-0 animate-spin"}),e("span",{className:"truncate",children:m.text})]}),n("span",{className:"shrink-0 text-faint tabular-nums",children:["发言 ",a.turns??0," 次"]})]}),a.notes?n("section",{children:[n("h3",{className:"mb-1.5 flex items-center gap-1.5 text-xs font-medium text-faint",children:[e(Z,{className:"size-3.5"}),"调研笔记"]}),e("div",{className:"rounded-xl bg-bg/60 px-3.5 py-2.5 text-[13px] leading-relaxed text-dim",children:e(b,{text:a.notes})})]}):e("p",{className:"text-[13px] text-faint",children:"没有调研笔记"})]})})}function Re(t){let{Collapsible:u,CollapsibleContent:f,Markdown:b,ModelIcon:g,cn:v}=y(),{member:a}=t,[h,m]=r(!1),d=w[a.verdict]??w.pending,{busy:c,text:C}=K(a);return n(u,{open:h,onOpenChange:m,className:v("relative shrink-0 rounded-xl border p-2.5 transition-colors",t.viewing?"border-line-strong bg-raised/60":"border-line bg-panel/60 hover:bg-raised/40"),children:[e("button",{type:"button","aria-label":t.viewing?"返回群聊":`查看 ${a.name} 的推理过程`,"aria-pressed":t.viewing,title:t.viewing?"返回群聊":"查看推理与工具调用",onClick:t.onOpen,className:"absolute inset-0 cursor-pointer rounded-xl"}),n("div",{className:"pointer-events-none relative flex items-center gap-2.5",children:[e("span",{className:v("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",d.ring),children:e(g,{modelID:a.model,className:"size-4",size:16})}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"truncate text-[13px] font-medium",title:a.model,children:a.name}),e("span",{className:v("shrink-0 rounded px-1 text-[10.5px] font-medium",d.soft),children:d.label})]}),n("div",{className:v("flex min-w-0 items-center gap-1 text-[11px]",c?"text-accent":"text-faint"),children:[c&&e(le,{className:"size-3 shrink-0 animate-spin"}),e("span",{className:"truncate",children:C})]})]})]}),n("div",{className:"pointer-events-none relative mt-2 flex items-center gap-1 text-[11px] text-faint",children:[n("span",{className:"tabular-nums",children:["发言 ",a.turns??0," 次"]}),e("span",{className:"ml-auto"}),a.notes&&n("button",{type:"button","aria-expanded":h,onClick:()=>m((M)=>!M),className:v("pointer-events-auto inline-flex cursor-pointer items-center gap-1 rounded px-1.5 py-0.5 hover:bg-raised hover:text-ink",h&&"text-ink"),children:[e(Z,{className:"size-3"}),"笔记"]}),e("button",{type:"button","aria-label":`@ ${a.name}`,title:`@ ${a.name}`,onClick:t.onMention,className:"pointer-events-auto inline-flex cursor-pointer items-center rounded p-1 hover:bg-raised hover:text-ink",children:e(L,{className:"size-3"})})]}),a.notes&&e(f,{children:e("div",{className:"relative mt-2 max-h-56 overflow-y-auto rounded-lg bg-bg/60 px-2.5 py-2 text-xs leading-relaxed text-dim",children:e(b,{text:a.notes})})})]})}function Te(t){let{Code:u,Collapsible:f,CollapsibleContent:b,Markdown:g,cn:v}=y(),{message:a}=t,[h,m]=r(!1),d=a.senderID==="user"||a.senderID==="host",c=a.verdict&&a.verdict!=="pending"?w[a.verdict]:void 0,C=a.evidences??[],M=(a.mentions??[]).map((x)=>t.membersByID.get(x)).filter((x)=>x!==void 0);return n("li",{id:`council-floor-${a.floor}`,className:"group flex gap-3 animate-fade",children:[e(xe,{message:a,isHuman:d,className:"mt-0.5 hidden size-8 md:flex"}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs",children:[e(xe,{message:a,isHuman:d,className:"flex size-6 md:hidden"}),e("span",{className:"font-semibold text-ink",title:a.senderModel,children:a.senderName}),n("a",{href:`#council-floor-${a.floor}`,className:"font-mono text-[11px] text-faint hover:text-dim",onClick:(x)=>x.preventDefault(),children:["#",a.floor]}),c&&e("span",{className:v("rounded px-1.5 py-px text-[10.5px] font-medium",c.soft),children:c.label}),!d&&n("button",{type:"button",onClick:t.onMention,className:"ml-auto inline-flex cursor-pointer items-center gap-1 rounded-md px-2 py-1 text-[11px] text-faint transition-opacity hover:bg-raised hover:text-ink focus-visible:opacity-100 md:px-1.5 md:py-0.5 md:opacity-0 md:group-hover:opacity-100",children:[e(L,{className:"size-3"}),"回复"]})]}),(a.replyToFloor||M.length>0)&&n("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-[11px] text-faint",children:[a.replyToFloor&&n("button",{type:"button",onClick:()=>document.getElementById(`council-floor-${a.replyToFloor}`)?.scrollIntoView({block:"center",behavior:"smooth"}),className:"inline-flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-md bg-raised/70 px-1.5 py-0.5 hover:text-ink",children:[e(pa,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0 text-dim",children:["#",a.replyToFloor," ",a.replyToName]}),a.replyToPreview&&e("span",{className:"truncate",children:a.replyToPreview})]}),M.map((x)=>n("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent/10 px-1.5 py-0.5 text-accent",children:[e(L,{className:"size-3"}),x.name]},x.id))]}),e("div",{className:"mt-1.5 break-words text-[14px] leading-relaxed text-ink/90 md:text-[13.5px] [&_p]:my-1.5 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:e(g,{text:a.text})}),C.length>0&&n(f,{open:h,onOpenChange:m,className:"mt-2",children:[n("button",{type:"button","aria-expanded":h,onClick:()=>m((x)=>!x),className:"inline-flex max-w-full cursor-pointer items-center gap-1 text-[11px] text-faint hover:text-ink",children:[e(de,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0",children:["查阅 ",C.length," 处"]}),!h&&e("span",{className:"truncate font-mono",children:C.map((x)=>x.label).join(",")}),e(ge,{className:v("size-3 shrink-0 transition-transform duration-300 ease-out-quint",!h&&"-rotate-90")})]}),e(b,{children:e("div",{className:"mt-1.5 space-y-1.5",children:C.map((x)=>n("div",{className:"overflow-hidden rounded-lg border border-line bg-panel text-xs",children:[e("div",{className:"truncate border-b border-line/70 px-2.5 py-1 font-mono text-[11px] text-dim",children:x.label}),x.snippet&&e(u,{code:x.snippet,lang:x.lang||"ts",className:"max-h-40 overflow-auto px-2.5 py-1.5 text-[11.5px]"})]},`${x.tool}:${x.label}:${x.snippet?.slice(0,32)??""}`))})})]})]})]})}function xe(t){let{ModelIcon:u,cn:f}=y();return e("span",{className:f("shrink-0 items-center justify-center rounded-full",t.isHuman?"bg-accent/12 text-accent":"bg-raised",t.className),children:t.message.senderModel?e(u,{modelID:t.message.senderModel,className:"size-4",size:16}):e(ue,{className:"size-4"})})}function ot(t){let{ModelIcon:u,cn:f,useTheme:b}=y();b();let{connection:g,sessionID:v,payload:a,onOpen:h}=t,m=a,[d,c]=r(m),[C,M]=r(()=>{try{return sessionStorage.getItem(ei)===m.roomID}catch{return!1}}),[x,J]=r(Date.now);o(()=>{c(m)},[m]),o(()=>{if(!C)return;try{if(sessionStorage.getItem(ei)===m.roomID)sessionStorage.removeItem(ei)}catch{}},[C,m.roomID]);let D=d.state==="running",R=`/api/sessions/${encodeURIComponent(v)}/council/${encodeURIComponent(d.roomID)}`;o(()=>{if(!D)return;let N=!1,T=setInterval(()=>{if(g.request(R).then((z)=>{if(!N&&z&&typeof z==="object"&&"roomID"in z)c(z)}).catch(()=>{}),!N)J(Date.now())},1200);return()=>{N=!0,clearInterval(T)}},[g,R,D]);let H=async(N)=>{let I=await g.request(`${R}/post`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:N})});c(I)},_=async()=>{let N=await g.request(`${R}/kill`,{method:"POST"});c(N)},E=(D?x:d.updatedAt)-d.createdAt,S=d.messages.at(-1),B=d.members.filter((N)=>V(N.status)).length;return n(p,{children:[n("button",{type:"button","aria-label":`进入理事会:${d.topic}`,onClick:()=>M(!0),className:"group relative my-2 block w-full cursor-pointer overflow-hidden rounded-2xl border border-line bg-panel text-left transition-colors hover:border-line-strong animate-fade",children:[n("div",{className:"px-4 pt-3.5",children:[n("div",{className:"flex items-center gap-1.5 text-[11px] text-faint",children:[e("span",{className:"font-medium text-dim",children:"理事会"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{className:"tabular-nums",children:W(E)}),n("span",{className:"ml-auto tabular-nums",children:[d.members.length," 位成员"]})]}),e("h4",{className:"mt-1 line-clamp-2 text-sm font-semibold text-ink md:truncate",title:d.topic,children:d.topic})]}),e(G,{room:d,className:"mt-3 px-4"}),e("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-2 px-4",children:d.members.map((N)=>{let I=w[N.verdict]??w.pending,T=V(N.status);return n("span",{className:"flex min-w-0 items-center gap-1.5 text-xs",title:N.model,children:[n("span",{className:f("relative flex size-6 shrink-0 items-center justify-center rounded-full bg-raised ring-2",I.ring),children:[e(u,{modelID:N.model,className:"size-3.5",size:14}),T&&e(le,{className:"absolute -right-1 -bottom-1 size-3 animate-spin rounded-full bg-panel text-accent"})]}),e("span",{className:"truncate text-dim",children:N.name}),e("span",{className:f("shrink-0 text-[11px]",I.text),children:I.label})]},N.id)})}),n("div",{className:"mt-3 flex items-center gap-2 border-t border-line/70 px-4 py-2.5 text-xs",children:[S?n(p,{children:[e("span",{className:"shrink-0 font-medium text-dim",children:S.senderName}),e("span",{className:"min-w-0 flex-1 truncate text-faint",children:S.text.replace(/\s+/g," ")})]}):e("span",{className:"min-w-0 flex-1 truncate text-faint",children:D?`${B} 位成员正在${d.phase==="research"?"调研":"思考"}…`:"没有发言"}),n("span",{className:"inline-flex shrink-0 items-center gap-1 text-faint transition-colors group-hover:text-ink",children:[d.messages.length>0&&n("span",{className:"tabular-nums",children:[d.messages.length," 条"]}),e(pe,{className:"size-3.5"})]})]})]}),C&&e(fe,{room:d,elapsedMs:E,onClose:()=>M(!1),onOpenMember:h,onPost:H,onAbort:_})]})}export{ot as CouncilCard};
Binary file
Binary file
@@ -0,0 +1,70 @@
1
+ import{t,k,G,A,R,I,L,D,P,M,u,Q,Et,g}from"./chunk-v2bkkhb8.js";var dt=function(){var e=t(function(j,i,n,s){for(n=n||{},s=j.length;s--;n[j[s]]=i);return n},"o"),y=[1,4],r=[1,14],l=[1,12],o=[1,13],f=[6,7,8],m=[1,20],d=[1,18],x=[1,19],c=[6,7,11],_=[1,6,13,14],b=[1,23],S=[1,24],E=[1,6,7,11,13,14],U={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(i,n,s,h,p,a,T){var v=a.length-1;switch(p){case 6:case 7:return h;case 15:h.addNode(a[v-1].length,a[v].trim());break;case 16:h.addNode(0,a[v].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:y},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:y},{6:r,7:[1,10],9:9,12:11,13:l,14:o},e(f,[2,3]),{1:[2,2]},e(f,[2,4]),e(f,[2,5]),{1:[2,6],6:r,12:15,13:l,14:o},{6:r,9:16,12:11,13:l,14:o},{6:m,7:d,10:17,11:x},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:m,7:d,10:22,11:x},{1:[2,7],6:r,12:15,13:l,14:o},e(_,[2,14],{7:b,11:S}),e(E,[2,8]),e(E,[2,9]),e(E,[2,10]),e(c,[2,15]),e(_,[2,13],{7:b,11:S}),e(E,[2,11]),e(E,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(i,n){if(n.recoverable)this.trace(i);else{var s=Error(i);throw s.hash=n,s}},"parseError"),parse:t(function(i){var n=this,s=[0],h=[],p=[null],a=[],T=this.table,v="",V=0,B=0,C=0,W=2,X=1,rt=a.slice.call(arguments,1),w=Object.create(this.lexer),N={yy:{}};for(var K in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,K))N.yy[K]=this.yy[K];if(w.setInput(i,N.yy),N.yy.lexer=w,N.yy.parser=this,typeof w.yylloc>"u")w.yylloc={};var q=w.yylloc;a.push(q);var lt=w.options&&w.options.ranges;if(typeof N.yy.parseError==="function")this.parseError=N.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(H){s.length=s.length-2*H,p.length=p.length-H,a.length=a.length-H}t(xt,"popStack");function yt(){var H=h.pop()||w.lex()||X;if(typeof H!=="number"){if(H instanceof Array)h=H,H=h.pop();H=n.symbols_[H]||H}return H}t(yt,"lex");var F,ot,J,z,Rt,ht,tt={},st,Y,ft,nt;while(!0){if(J=s[s.length-1],this.defaultActions[J])z=this.defaultActions[J];else{if(F===null||typeof F>"u")F=yt();z=T[J]&&T[J][F]}if(typeof z>"u"||!z.length||!z[0]){var ct="";nt=[];for(st in T[J])if(this.terminals_[st]&&st>W)nt.push("'"+this.terminals_[st]+"'");if(w.showPosition)ct="Parse error on line "+(V+1)+`:
2
+ `+w.showPosition()+`
3
+ Expecting `+nt.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else ct="Parse error on line "+(V+1)+": Unexpected "+(F==X?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(ct,{text:w.match,token:this.terminals_[F]||F,line:w.yylineno,loc:q,expected:nt})}if(z[0]instanceof Array&&z.length>1)throw Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(z[0]){case 1:if(s.push(F),p.push(w.yytext),a.push(w.yylloc),s.push(z[1]),F=null,!ot){if(B=w.yyleng,v=w.yytext,V=w.yylineno,q=w.yylloc,C>0)C--}else F=ot,ot=null;break;case 2:if(Y=this.productions_[z[1]][1],tt.$=p[p.length-Y],tt._$={first_line:a[a.length-(Y||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(Y||1)].first_column,last_column:a[a.length-1].last_column},lt)tt._$.range=[a[a.length-(Y||1)].range[0],a[a.length-1].range[1]];if(ht=this.performAction.apply(tt,[v,B,V,N.yy,z[1],p,a].concat(rt)),typeof ht<"u")return ht;if(Y)s=s.slice(0,-1*Y*2),p=p.slice(0,-1*Y),a=a.slice(0,-1*Y);s.push(this.productions_[z[1]][0]),p.push(tt.$),a.push(tt._$),ft=T[s[s.length-2]][s[s.length-1]],s.push(ft);break;case 3:return!0}}return!0},"parse")},Z=function(){var j={EOF:1,parseError:t(function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw Error(n)},"parseError"),setInput:t(function(i,n){if(this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);if(n)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),i},"input"),unput:t(function(i){var n=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var h=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1)this.yylineno-=s.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===h.length?this.yylloc.first_column:0)+h[h.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(i){this.unput(this.match.slice(i))},"less"),pastInput:t(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var i=this.match;if(i.length<20)i+=this._input.substr(0,20-i.length);return(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var i=this.pastInput(),n=Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:t(function(i,n){var s,h,p;if(this.options.backtrack_lexer){if(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)p.yylloc.range=this.yylloc.range.slice(0)}if(h=i[0].match(/(?:\r\n?|\n).*/g),h)this.yylineno+=h.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],s=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(s)return s;else if(this._backtrack){for(var a in p)this[a]=p[a];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var i,n,s,h;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var a=0;a<p.length;a++)if(s=this._input.match(this.rules[p[a]]),s&&(!n||s[0].length>n[0].length)){if(n=s,h=a,this.options.backtrack_lexer)if(i=this.test_match(s,p[a]),i!==!1)return i;else if(this._backtrack){n=!1;continue}else return!1;else if(!this.options.flex)break}if(n){if(i=this.test_match(n,p[h]),i!==!1)return i;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(n,s,h,p){var a=p;switch(h){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return j}();U.lexer=Z;function O(){this.yy={}}return t(O,"Parser"),O.prototype=U,U.Parser=O,new O}();dt.parser=dt;var vt=dt,St=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,A()}getRoot(){return this.root}addNode(e,y){let r=k.sanitizeText(y,u());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],P(r);return}this.baseLevel??=e;let l=e-this.baseLevel+1;if(l<=0)l=1;while(this.stack.length>1&&this.stack[this.stack.length-1].level>=l)this.stack.pop();let o=this.stack[this.stack.length-1].node,f={text:r,children:[]};o.children.push(f),this.stack.push({level:l,node:f})}getAccTitle(){return I()}setAccTitle(e){R(e)}getAccDescription(){return D()}setAccDescription(e){L(e)}getDiagramTitle(){return M()}setDiagramTitle(e){P(e)}},$t=14,et=250,At=30,It=60,Lt=5,bt=82*Math.PI/180,pt=Math.cos(bt),gt=Math.sin(bt),kt=t((e,y,r)=>{let l=e.node().getBBox(),o=l.width+y*2,f=l.height+y*2;G(e,f,o,r),e.attr("viewBox",`${l.x-y} ${l.y-y} ${o} ${f}`)},"applyPaddedViewBox"),Tt=t((e,y,r,l)=>{let f=l.db.getRoot();if(!f)return;let m=u(),{look:d,handDrawnSeed:x,themeVariables:c}=m,_=Et(m.fontSize)[0]??$t,b=d==="handDrawn",S=f.children??[],E=m.ishikawa?.diagramPadding??20,U=m.ishikawa?.useMaxWidth??!1,Z=Q(y),O=Z.append("g").attr("class","ishikawa"),j=b?g.svg(Z.node()):void 0,i=j?{roughSvg:j,seed:x??0,lineColor:c?.lineColor??"#333",fillColor:c?.mainBkg??"#fff"}:void 0,n=`ishikawa-arrow-${y}`;if(!b)O.append("defs").append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let s=0,h=et,p=b?void 0:it(O,s,h,s,h,"ishikawa-spine");if(Mt(O,s,h,f.text,_,i),!S.length){if(b)it(O,s,h,s,h,"ishikawa-spine",i);kt(Z,E,U);return}s-=20;let a=S.filter((w,N)=>N%2===0),T=S.filter((w,N)=>N%2===1),v=mt(a),V=mt(T),B=v.total+V.total,C=et,W=et;if(B>0){let w=et*2,N=et*0.3;C=Math.max(N,w*(v.total/B)),W=Math.max(N,w*(V.total/B))}let X=_*2;if(C=Math.max(C,v.max*X),W=Math.max(W,V.max*X),h=Math.max(C,et),p)p.attr("y1",h).attr("y2",h);O.select(".ishikawa-head-group").attr("transform",`translate(0,${h})`);let rt=Math.ceil(S.length/2);for(let w=0;w<rt;w++){let N=O.append("g").attr("class","ishikawa-pair");for(let[K,q,lt]of[[S[w*2],-1,C],[S[w*2+1],1,W]])if(K)Nt(N,K,s,h,q,lt,_,i);s=N.selectAll("text").nodes().reduce((K,q)=>Math.min(K,q.getBBox().x),1/0)}if(b)it(O,s,h,0,h,"ishikawa-spine",i);else{p.attr("x1",s);let w=`url(#${n})`;O.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",w)}kt(Z,E,U)},"draw"),mt=t((e)=>{let y=t((r)=>r.children.reduce((l,o)=>l+1+y(o),0),"countDescendants");return e.reduce((r,l)=>{let o=y(l);return r.total+=o,r.max=Math.max(r.max,o),r},{total:0,max:0})},"sideStats"),Mt=t((e,y,r,l,o,f)=>{let m=Math.max(6,Math.floor(110/(o*0.6))),d=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${y},${r})`),x=at(d,_t(l,m),0,0,"ishikawa-head-label","start",o),c=x.node().getBBox(),_=Math.max(60,c.width+6),b=Math.max(40,c.height*2+40),S=`M 0 ${-b/2} L 0 ${b/2} Q ${_*2.4} 0 0 ${-b/2} Z`;if(f){let E=f.roughSvg.path(S,{roughness:1.5,seed:f.seed,fill:f.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:f.lineColor,strokeWidth:2});d.insert(()=>E,":first-child").attr("class","ishikawa-head")}else d.insert("path",":first-child").attr("class","ishikawa-head").attr("d",S);x.attr("transform",`translate(${(_-c.width)/2-c.x+3},${-c.y-c.height/2})`)},"drawHead"),Pt=t((e,y)=>{let r=[],l=[],o=t((f,m,d)=>{let x=y===-1?[...f].reverse():f;for(let c of x){let _=r.length,b=c.children??[];if(r.push({depth:d,text:_t(c.text,15),parentIndex:m,childCount:b.length}),d%2===0){if(l.push(_),b.length)o(b,_,d+1)}else{if(b.length)o(b,_,d+1);l.push(_)}}},"walk");return o(e,-1,2),{entries:r,yOrder:l}},"flattenTree"),Bt=t((e,y,r,l,o,f,m)=>{let d=e.append("g").attr("class","ishikawa-label-group"),c=at(d,y,r,l+11*o,"ishikawa-label cause","middle",f).node().getBBox();if(m){let _=m.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:m.seed,fill:m.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:m.lineColor,strokeWidth:2});d.insert(()=>_,":first-child").attr("class","ishikawa-label-box")}else d.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",c.x-20).attr("y",c.y-2).attr("width",c.width+40).attr("height",c.height+4)},"drawCauseLabel"),ut=t((e,y,r,l,o,f)=>{let m=Math.sqrt(l*l+o*o);if(m===0)return;let d=l/m,x=o/m,c=6,_=-x*c,b=d*c,S=y,E=r,U=`M ${S} ${E} L ${S-d*c*2+_} ${E-x*c*2+b} L ${S-d*c*2-_} ${E-x*c*2-b} Z`,Z=f.roughSvg.path(U,{roughness:1,seed:f.seed,fill:f.lineColor,fillStyle:"solid",stroke:f.lineColor,strokeWidth:1});e.append(()=>Z)},"drawArrowMarker"),Nt=t((e,y,r,l,o,f,m,d)=>{let x=y.children??[],c=f*(x.length?1:0.2),_=-pt*c,b=gt*c*o,S=r+_,E=l+b;if(it(e,r,l,S,E,"ishikawa-branch",d),d)ut(e,r,l,r-S,l-E,d);if(Bt(e,y.text,S,E,o,m,d),!x.length)return;let{entries:U,yOrder:Z}=Pt(x,o),O=U.length,j=Array(O);for(let[p,a]of Z.entries())j[a]=l+b*((p+1)/(O+1));let i=new Map;i.set(-1,{x0:r,y0:l,x1:S,y1:E,childCount:x.length,childrenDrawn:0});let n=-pt,s=gt*o,h=o<0?"ishikawa-label up":"ishikawa-label down";for(let[p,a]of U.entries()){let T=j[p],v=i.get(a.parentIndex),V=e.append("g").attr("class","ishikawa-sub-group"),B=0,C=0,W=0;if(a.depth%2===0){let X=v.y1-v.y0;if(B=wt(v.x0,v.x1,X?(T-v.y0)/X:0.5),C=T,W=B-(a.childCount>0?It+a.childCount*Lt:At),it(V,B,T,W,T,"ishikawa-sub-branch",d),d)ut(V,B,T,1,0,d);at(V,a.text,W,T,"ishikawa-label align","end",m)}else{let X=v.childrenDrawn++;if(B=wt(v.x0,v.x1,(v.childCount-X)/(v.childCount+1)),C=v.y0,W=B+n*((T-C)/s),it(V,B,C,W,T,"ishikawa-sub-branch",d),d)ut(V,B,C,B-W,C-T,d);at(V,a.text,W,T,h,"end",m)}if(a.childCount>0)i.set(p,{x0:B,y0:C,x1:W,y1:T,childCount:a.childCount,childrenDrawn:0})}},"drawBranch"),Dt=t((e)=>e.split(/<br\s*\/?>|\n/),"splitLines"),_t=t((e,y)=>{if(e.length<=y)return e;let r=[];for(let l of e.split(/\s+/)){let o=r.length-1;if(o>=0&&r[o].length+1+l.length<=y)r[o]+=" "+l;else r.push(l)}return r.join(`
7
+ `)},"wrapText"),at=t((e,y,r,l,o,f,m)=>{let d=Dt(y),x=m*1.05,c=e.append("text").attr("class",o).attr("text-anchor",f).attr("x",r).attr("y",l-(d.length-1)*x/2);for(let[_,b]of d.entries())c.append("tspan").attr("x",r).attr("dy",_===0?0:x).text(b);return c},"drawMultilineText"),wt=t((e,y,r)=>e+(y-e)*r,"lerp"),it=t((e,y,r,l,o,f,m)=>{if(m){let d=m.roughSvg.line(y,r,l,o,{roughness:1.5,seed:m.seed,stroke:m.lineColor,strokeWidth:2});e.append(()=>d).attr("class",f);return}return e.append("line").attr("class",f).attr("x1",y).attr("y1",r).attr("x2",l).attr("y2",o)},"drawLine"),Ot={draw:Tt},Ct=t((e)=>`
8
+ .ishikawa .ishikawa-spine,
9
+ .ishikawa .ishikawa-branch,
10
+ .ishikawa .ishikawa-sub-branch {
11
+ stroke: ${e.lineColor};
12
+ stroke-width: 2;
13
+ fill: none;
14
+ }
15
+
16
+ .ishikawa .ishikawa-sub-branch {
17
+ stroke-width: 1;
18
+ }
19
+
20
+ .ishikawa .ishikawa-arrow {
21
+ fill: ${e.lineColor};
22
+ }
23
+
24
+ .ishikawa .ishikawa-head {
25
+ fill: ${e.mainBkg};
26
+ stroke: ${e.lineColor};
27
+ stroke-width: 2;
28
+ }
29
+
30
+ .ishikawa .ishikawa-label-box {
31
+ fill: ${e.mainBkg};
32
+ stroke: ${e.lineColor};
33
+ stroke-width: 2;
34
+ }
35
+
36
+ .ishikawa text {
37
+ font-family: ${e.fontFamily};
38
+ font-size: ${e.fontSize};
39
+ fill: ${e.textColor};
40
+ }
41
+
42
+ .ishikawa .ishikawa-head-label {
43
+ font-weight: 600;
44
+ text-anchor: middle;
45
+ dominant-baseline: middle;
46
+ font-size: 14px;
47
+ }
48
+
49
+ .ishikawa .ishikawa-label {
50
+ text-anchor: end;
51
+ }
52
+
53
+ .ishikawa .ishikawa-label.cause {
54
+ text-anchor: middle;
55
+ dominant-baseline: middle;
56
+ }
57
+
58
+ .ishikawa .ishikawa-label.align {
59
+ text-anchor: end;
60
+ dominant-baseline: middle;
61
+ }
62
+
63
+ .ishikawa .ishikawa-label.up {
64
+ dominant-baseline: baseline;
65
+ }
66
+
67
+ .ishikawa .ishikawa-label.down {
68
+ dominant-baseline: hanging;
69
+ }
70
+ `,"getStyles"),Vt=Ct,Ut={parser:vt,get db(){return new St},renderer:Ot,styles:Vt};export{Ut as diagram};
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{Kt}from"./chunk-0wqmwnd8.js";export{Kt as default};
@@ -0,0 +1,2 @@
1
+ �import{Kt}from"./chunk-0wqmwnd8.js";export{Kt as default};
2
+