@bkm016/basalt 0.1.24 → 0.1.25

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 (543) hide show
  1. package/{chunk-bdr1170y.js → chunk-2c6seev1.js} +1 -1
  2. package/{chunk-9y8v1vrt.js → chunk-4mwx4pet.js} +1 -1
  3. package/{chunk-4x7xnfw1.js → chunk-61e7nvw9.js} +1 -1
  4. package/{chunk-979mxkzt.js → chunk-93bcazsp.js} +1 -1
  5. package/{chunk-y16fqzad.js → chunk-9fccgczj.js} +1 -1
  6. package/{chunk-kh4yq4rd.js → chunk-ff293dj0.js} +1 -1
  7. package/{chunk-cte9wd9x.js → chunk-g23dnf4y.js} +1 -1
  8. package/{chunk-c4nxr37s.js → chunk-gwcstcqs.js} +4 -4
  9. package/{chunk-ma91f4qj.js → chunk-m839588n.js} +1 -1
  10. package/{chunk-0nxcbf6d.js → chunk-pjv9mppd.js} +109 -108
  11. package/{chunk-pcd14q8r.js → chunk-rkn6bven.js} +4 -4
  12. package/compiled.js +1 -1
  13. package/package.json +1 -1
  14. package/ui-test-worker.js +1 -1
  15. package/web/{chunk-ppccb30x.js → chunk-00wh99xz.js} +4 -4
  16. package/web/chunk-00wh99xz.js.br +0 -0
  17. package/web/chunk-00wh99xz.js.gz +0 -0
  18. package/web/{chunk-g7t1bvvx.js → chunk-0a1t2j8h.js} +1 -1
  19. package/web/chunk-0a1t2j8h.js.br +0 -0
  20. package/web/chunk-0a1t2j8h.js.gz +0 -0
  21. package/web/{chunk-59ybhv47.js → chunk-1ar2phwa.js} +1 -1
  22. package/web/chunk-1ar2phwa.js.br +0 -0
  23. package/web/chunk-1ar2phwa.js.gz +0 -0
  24. package/web/{chunk-hqtm67yw.js → chunk-1jfydncj.js} +2 -2
  25. package/web/chunk-1jfydncj.js.br +0 -0
  26. package/web/chunk-1jfydncj.js.gz +0 -0
  27. package/web/{chunk-qqtj88e0.js → chunk-1p1jtvrt.js} +1 -1
  28. package/web/chunk-1p1jtvrt.js.br +0 -0
  29. package/web/chunk-1p1jtvrt.js.gz +0 -0
  30. package/web/chunk-1x38r11w.js +1 -0
  31. package/web/chunk-1x38r11w.js.br +2 -0
  32. package/web/chunk-1x38r11w.js.gz +0 -0
  33. package/web/{chunk-bbyqcvdz.js → chunk-25rf3svt.js} +2 -2
  34. package/web/chunk-25rf3svt.js.br +0 -0
  35. package/web/chunk-25rf3svt.js.gz +0 -0
  36. package/web/chunk-2cfv55j2.js +1 -0
  37. package/web/chunk-2cfv55j2.js.br +0 -0
  38. package/web/chunk-2cfv55j2.js.gz +0 -0
  39. package/web/{chunk-bg2ps35t.js → chunk-2q37qdq2.js} +1 -1
  40. package/web/chunk-2q37qdq2.js.br +0 -0
  41. package/web/chunk-2q37qdq2.js.gz +0 -0
  42. package/web/{chunk-13x3xyyh.js → chunk-2yhmab75.js} +4 -4
  43. package/web/chunk-2yhmab75.js.br +0 -0
  44. package/web/chunk-2yhmab75.js.gz +0 -0
  45. package/web/{chunk-bvmvj35k.js → chunk-3at57qna.js} +1 -1
  46. package/web/chunk-3at57qna.js.br +0 -0
  47. package/web/chunk-3at57qna.js.gz +0 -0
  48. package/web/{chunk-nb3jk1wk.js → chunk-3z9kpkec.js} +1 -1
  49. package/web/chunk-3z9kpkec.js.br +0 -0
  50. package/web/chunk-3z9kpkec.js.gz +0 -0
  51. package/web/chunk-4ncnt1c2.js +2 -0
  52. package/web/chunk-4ncnt1c2.js.br +0 -0
  53. package/web/{chunk-k69ysa0v.js → chunk-4ncnt1c2.js.gz} +0 -0
  54. package/web/chunk-4vc07x6t.js +1 -0
  55. package/web/chunk-4vc07x6t.js.br +0 -0
  56. package/web/chunk-4vc07x6t.js.gz +0 -0
  57. package/web/{chunk-921qw2jf.js → chunk-4ytc5sth.js} +1 -1
  58. package/web/chunk-4ytc5sth.js.br +0 -0
  59. package/web/chunk-4ytc5sth.js.gz +0 -0
  60. package/web/{chunk-zs7c2db4.js → chunk-5c5h90k0.js} +1 -1
  61. package/web/chunk-5c5h90k0.js.br +0 -0
  62. package/web/chunk-5c5h90k0.js.gz +0 -0
  63. package/web/chunk-5zpn3n5a.js +1 -0
  64. package/web/chunk-5zpn3n5a.js.br +0 -0
  65. package/web/chunk-5zpn3n5a.js.gz +0 -0
  66. package/web/chunk-64k06g43.js +1 -0
  67. package/web/chunk-64k06g43.js.br +0 -0
  68. package/web/chunk-64k06g43.js.gz +0 -0
  69. package/web/{chunk-bh0a254y.js → chunk-6pbrtp4e.js} +4 -4
  70. package/web/chunk-6pbrtp4e.js.br +0 -0
  71. package/web/chunk-6pbrtp4e.js.gz +0 -0
  72. package/web/chunk-6sehssym.js +1 -0
  73. package/web/chunk-6sehssym.js.br +2 -0
  74. package/web/chunk-6sehssym.js.gz +0 -0
  75. package/web/chunk-7hxj251q.js +1 -0
  76. package/web/chunk-7hxj251q.js.br +0 -0
  77. package/web/chunk-7hxj251q.js.gz +0 -0
  78. package/web/{chunk-abvtsz6z.js → chunk-7qcmg5ns.js} +1 -1
  79. package/web/chunk-7qcmg5ns.js.br +0 -0
  80. package/web/chunk-7qcmg5ns.js.gz +0 -0
  81. package/web/{chunk-172gywq4.js → chunk-82j6713x.js} +6 -6
  82. package/web/chunk-82j6713x.js.br +0 -0
  83. package/web/chunk-82j6713x.js.gz +0 -0
  84. package/web/{chunk-kbvzxsz7.js → chunk-9vexd52p.js} +1 -1
  85. package/web/chunk-9vexd52p.js.br +0 -0
  86. package/web/chunk-9vexd52p.js.gz +0 -0
  87. package/web/{chunk-crhbhsrh.js → chunk-ajj3nc80.js} +1 -1
  88. package/web/chunk-ajj3nc80.js.br +0 -0
  89. package/web/chunk-ajj3nc80.js.gz +0 -0
  90. package/web/chunk-amrkb4dd.js +1 -0
  91. package/web/chunk-amrkb4dd.js.br +0 -0
  92. package/web/chunk-amrkb4dd.js.gz +0 -0
  93. package/web/{chunk-w563538j.js → chunk-b7d5k9sp.js} +35 -35
  94. package/web/chunk-b7d5k9sp.js.br +0 -0
  95. package/web/chunk-b7d5k9sp.js.gz +0 -0
  96. package/web/chunk-bavn0z5d.js +1 -0
  97. package/web/chunk-bavn0z5d.js.br +0 -0
  98. package/web/chunk-bavn0z5d.js.gz +0 -0
  99. package/web/{chunk-yp75a6yh.js → chunk-bjw74xvy.js} +1 -1
  100. package/web/chunk-bjw74xvy.js.br +0 -0
  101. package/web/chunk-bjw74xvy.js.gz +0 -0
  102. package/web/chunk-bn68ks4x.js +1 -0
  103. package/web/chunk-bn68ks4x.js.br +0 -0
  104. package/web/chunk-bn68ks4x.js.gz +0 -0
  105. package/web/chunk-c59d2j14.js +8 -0
  106. package/web/chunk-c59d2j14.js.br +0 -0
  107. package/web/chunk-c59d2j14.js.gz +0 -0
  108. package/web/{chunk-634vc92s.js → chunk-cfz9ftze.js} +3 -3
  109. package/web/chunk-cfz9ftze.js.br +0 -0
  110. package/web/chunk-cfz9ftze.js.gz +0 -0
  111. package/web/{chunk-zsae1tn8.js → chunk-chq476ch.js} +4 -4
  112. package/web/chunk-chq476ch.js.br +0 -0
  113. package/web/chunk-chq476ch.js.gz +0 -0
  114. package/web/{chunk-5zkw2kkb.js → chunk-d0ey112q.js} +5 -5
  115. package/web/chunk-d0ey112q.js.br +0 -0
  116. package/web/chunk-d0ey112q.js.gz +0 -0
  117. package/web/{chunk-h1cv1kke.js → chunk-d71z7s5r.js} +1 -1
  118. package/web/chunk-d71z7s5r.js.br +0 -0
  119. package/web/chunk-d71z7s5r.js.gz +0 -0
  120. package/web/{chunk-8de69eyx.js → chunk-dembnhph.js} +1 -1
  121. package/web/chunk-dembnhph.js.br +0 -0
  122. package/web/chunk-dembnhph.js.gz +0 -0
  123. package/web/{chunk-m5nt857c.js → chunk-dfq4w8mf.js} +1 -1
  124. package/web/chunk-dfq4w8mf.js.br +0 -0
  125. package/web/chunk-dfq4w8mf.js.gz +0 -0
  126. package/web/{chunk-bbs6yq60.js → chunk-dwdxczxc.js} +3 -3
  127. package/web/chunk-dwdxczxc.js.br +0 -0
  128. package/web/chunk-dwdxczxc.js.gz +0 -0
  129. package/web/chunk-e3b2krd7.js +1 -0
  130. package/web/chunk-e3b2krd7.js.br +0 -0
  131. package/web/chunk-e3b2krd7.js.gz +0 -0
  132. package/web/{chunk-91s1ns6b.js → chunk-e4wbkc1x.js} +11 -11
  133. package/web/chunk-e4wbkc1x.js.br +0 -0
  134. package/web/chunk-e4wbkc1x.js.gz +0 -0
  135. package/web/{chunk-ygzgrjj7.js → chunk-f2qrf0he.js} +1 -1
  136. package/web/chunk-f2qrf0he.js.br +0 -0
  137. package/web/chunk-f2qrf0he.js.gz +0 -0
  138. package/web/{chunk-ca8hnmmv.js → chunk-f88vhwan.js} +5 -5
  139. package/web/chunk-f88vhwan.js.br +0 -0
  140. package/web/chunk-f88vhwan.js.gz +0 -0
  141. package/web/{chunk-yg9a23mv.js → chunk-fpp6jtb4.js} +1 -1
  142. package/web/chunk-fpp6jtb4.js.br +0 -0
  143. package/web/chunk-fpp6jtb4.js.gz +0 -0
  144. package/web/chunk-ft62hfnt.js +1 -0
  145. package/web/chunk-ft62hfnt.js.br +0 -0
  146. package/web/chunk-ft62hfnt.js.gz +0 -0
  147. package/web/{chunk-176tsg6e.js → chunk-g3fahpjw.js} +2 -2
  148. package/web/chunk-g3fahpjw.js.br +0 -0
  149. package/web/chunk-g3fahpjw.js.gz +0 -0
  150. package/web/{chunk-xw8tzrmm.js → chunk-g5b4wjwp.js} +94 -94
  151. package/web/chunk-g5b4wjwp.js.br +0 -0
  152. package/web/chunk-g5b4wjwp.js.gz +0 -0
  153. package/web/chunk-ga3tn73a.js +1 -0
  154. package/web/chunk-ga3tn73a.js.br +0 -0
  155. package/web/chunk-ga3tn73a.js.gz +0 -0
  156. package/web/{chunk-4cbcqcd2.js → chunk-gf4vtpw2.js} +1 -1
  157. package/web/chunk-gf4vtpw2.js.br +0 -0
  158. package/web/chunk-gf4vtpw2.js.gz +0 -0
  159. package/web/{chunk-n9npqkxf.js → chunk-ghxfjwhq.js} +1 -1
  160. package/web/chunk-ghxfjwhq.js.br +0 -0
  161. package/web/chunk-ghxfjwhq.js.gz +0 -0
  162. package/web/{chunk-hsgtzrkh.js → chunk-gxqs7zmy.js} +1 -1
  163. package/web/chunk-gxqs7zmy.js.br +0 -0
  164. package/web/chunk-gxqs7zmy.js.gz +0 -0
  165. package/web/{chunk-9k9p5dat.js → chunk-jpdp0xkd.js} +1 -1
  166. package/web/chunk-jpdp0xkd.js.br +0 -0
  167. package/web/chunk-jpdp0xkd.js.gz +0 -0
  168. package/web/{chunk-kn9bc5z2.js → chunk-jtzbk251.js} +2 -2
  169. package/web/chunk-jtzbk251.js.br +0 -0
  170. package/web/chunk-jtzbk251.js.gz +0 -0
  171. package/web/{chunk-ac8vmj54.js → chunk-kc6k0ect.js} +1 -1
  172. package/web/chunk-kc6k0ect.js.br +0 -0
  173. package/web/chunk-kc6k0ect.js.gz +0 -0
  174. package/web/{chunk-gy2y4zfa.js → chunk-kk7k8xc8.js} +5 -5
  175. package/web/chunk-kk7k8xc8.js.br +0 -0
  176. package/web/chunk-kk7k8xc8.js.gz +0 -0
  177. package/web/{chunk-6n3cwe1h.js → chunk-kmpyntam.js} +19 -19
  178. package/web/chunk-kmpyntam.js.br +0 -0
  179. package/web/chunk-kmpyntam.js.gz +0 -0
  180. package/web/{chunk-q17rem99.js → chunk-mejpj22t.js} +5 -5
  181. package/web/chunk-mejpj22t.js.br +0 -0
  182. package/web/chunk-mejpj22t.js.gz +0 -0
  183. package/web/{chunk-sapy54hm.js → chunk-mm10pm0x.js} +3 -3
  184. package/web/chunk-mm10pm0x.js.br +0 -0
  185. package/web/chunk-mm10pm0x.js.gz +0 -0
  186. package/web/{chunk-r4cr8rvt.js → chunk-mpve4748.js} +1 -1
  187. package/web/chunk-mpve4748.js.br +0 -0
  188. package/web/chunk-mpve4748.js.gz +0 -0
  189. package/web/chunk-ms022qq9.js +1 -0
  190. package/web/chunk-ms022qq9.js.br +2 -0
  191. package/web/chunk-ms022qq9.js.gz +0 -0
  192. package/web/{chunk-xv1d350x.js → chunk-mxf122px.js} +1 -1
  193. package/web/chunk-mxf122px.js.br +0 -0
  194. package/web/chunk-mxf122px.js.gz +0 -0
  195. package/web/chunk-mzv41kv9.js +1 -0
  196. package/web/chunk-mzv41kv9.js.br +2 -0
  197. package/web/chunk-mzv41kv9.js.gz +0 -0
  198. package/web/{chunk-2fms67zg.js → chunk-mzyg8zga.js} +1 -1
  199. package/web/chunk-mzyg8zga.js.br +0 -0
  200. package/web/chunk-mzyg8zga.js.gz +0 -0
  201. package/web/{chunk-c2eqwepm.js → chunk-n8j9jdsh.js} +1 -1
  202. package/web/chunk-n8j9jdsh.js.br +0 -0
  203. package/web/chunk-n8j9jdsh.js.gz +0 -0
  204. package/web/{chunk-fp7q643n.js → chunk-n8ts6ra2.js} +3 -3
  205. package/web/chunk-n8ts6ra2.js.br +0 -0
  206. package/web/chunk-n8ts6ra2.js.gz +0 -0
  207. package/web/chunk-nefchfa1.js +1 -0
  208. package/web/chunk-nefchfa1.js.br +0 -0
  209. package/web/chunk-nefchfa1.js.gz +0 -0
  210. package/web/chunk-ng0bsm6n.js +1 -0
  211. package/web/chunk-ng0bsm6n.js.br +0 -0
  212. package/web/chunk-ng0bsm6n.js.gz +0 -0
  213. package/web/{chunk-ced8pdbc.js → chunk-nz1mm18x.js} +1 -1
  214. package/web/chunk-nz1mm18x.js.br +0 -0
  215. package/web/chunk-nz1mm18x.js.gz +0 -0
  216. package/web/{chunk-mbaw66b5.js → chunk-pdxqp4rh.js} +1 -1
  217. package/web/chunk-pdxqp4rh.js.br +0 -0
  218. package/web/chunk-pdxqp4rh.js.gz +0 -0
  219. package/web/{chunk-g1penf6y.js → chunk-pe2zvyjt.js} +1 -1
  220. package/web/chunk-pe2zvyjt.js.br +0 -0
  221. package/web/chunk-pe2zvyjt.js.gz +0 -0
  222. package/web/{chunk-t7vwsg9r.js → chunk-q8ve5wqt.js} +2 -2
  223. package/web/chunk-q8ve5wqt.js.br +0 -0
  224. package/web/chunk-q8ve5wqt.js.gz +0 -0
  225. package/web/{chunk-ny87aq2j.js → chunk-qh93t9tv.js} +1 -1
  226. package/web/chunk-qh93t9tv.js.br +0 -0
  227. package/web/chunk-qh93t9tv.js.gz +0 -0
  228. package/web/{chunk-3vdw9nn7.js → chunk-qqewmk3y.js} +1 -1
  229. package/web/chunk-qqewmk3y.js.br +0 -0
  230. package/web/chunk-qqewmk3y.js.gz +0 -0
  231. package/web/{chunk-n59nyqcr.js → chunk-qzb06me8.js} +34 -34
  232. package/web/chunk-qzb06me8.js.br +0 -0
  233. package/web/chunk-qzb06me8.js.gz +0 -0
  234. package/web/{chunk-tt7j0m6m.js → chunk-r2zernvz.js} +5 -5
  235. package/web/chunk-r2zernvz.js.br +0 -0
  236. package/web/chunk-r2zernvz.js.gz +0 -0
  237. package/web/{chunk-qdq6wvgt.js → chunk-r8ykja8v.js} +3 -3
  238. package/web/chunk-r8ykja8v.js.br +0 -0
  239. package/web/chunk-r8ykja8v.js.gz +0 -0
  240. package/web/{chunk-qhr6hegh.js → chunk-r9b7eh2j.js} +1 -1
  241. package/web/chunk-r9b7eh2j.js.br +0 -0
  242. package/web/chunk-r9b7eh2j.js.gz +0 -0
  243. package/web/{chunk-eq28qb33.js → chunk-ry1wp3v8.js} +2 -2
  244. package/web/chunk-ry1wp3v8.js.br +0 -0
  245. package/web/chunk-ry1wp3v8.js.gz +0 -0
  246. package/web/chunk-s2bfc2vk.js +1 -0
  247. package/web/chunk-s2bfc2vk.js.br +0 -0
  248. package/web/chunk-s2bfc2vk.js.gz +0 -0
  249. package/web/{chunk-2psxv4dk.js → chunk-s4c6nzj9.js} +5 -5
  250. package/web/chunk-s4c6nzj9.js.br +0 -0
  251. package/web/chunk-s4c6nzj9.js.gz +0 -0
  252. package/web/{chunk-b9fqnzqd.js → chunk-ss23nnmc.js} +4 -4
  253. package/web/chunk-ss23nnmc.js.br +0 -0
  254. package/web/chunk-ss23nnmc.js.gz +0 -0
  255. package/web/{chunk-b2t33c3t.js → chunk-sxmv80th.js} +1 -1
  256. package/web/chunk-sxmv80th.js.br +0 -0
  257. package/web/chunk-sxmv80th.js.gz +0 -0
  258. package/web/{chunk-3sszg3gr.js → chunk-sy2cdka3.js} +1 -1
  259. package/web/chunk-sy2cdka3.js.br +0 -0
  260. package/web/chunk-sy2cdka3.js.gz +0 -0
  261. package/web/{chunk-vgpyff03.js → chunk-sysebfkg.js} +3 -3
  262. package/web/chunk-sysebfkg.js.br +0 -0
  263. package/web/chunk-sysebfkg.js.gz +0 -0
  264. package/web/{chunk-vb3sy3hv.js → chunk-t3620hrb.js} +2 -2
  265. package/web/chunk-t3620hrb.js.br +0 -0
  266. package/web/chunk-t3620hrb.js.gz +0 -0
  267. package/web/{chunk-phr7yps3.js → chunk-t5srz1hs.js} +2 -2
  268. package/web/chunk-t5srz1hs.js.br +0 -0
  269. package/web/chunk-t5srz1hs.js.gz +0 -0
  270. package/web/{chunk-sarkb4p9.js → chunk-v25k7n3r.js} +1 -1
  271. package/web/chunk-v25k7n3r.js.br +0 -0
  272. package/web/chunk-v25k7n3r.js.gz +0 -0
  273. package/web/{chunk-e3d6kvwm.js → chunk-vf0p4ayw.js} +1 -1
  274. package/web/chunk-vf0p4ayw.js.br +0 -0
  275. package/web/chunk-vf0p4ayw.js.gz +0 -0
  276. package/web/chunk-vr6n4pvt.js +1 -0
  277. package/web/chunk-vr6n4pvt.js.br +0 -0
  278. package/web/chunk-vr6n4pvt.js.gz +0 -0
  279. package/web/{chunk-713ygtrs.js → chunk-vx9g94x2.js} +4 -4
  280. package/web/chunk-vx9g94x2.js.br +0 -0
  281. package/web/chunk-vx9g94x2.js.gz +0 -0
  282. package/web/{chunk-cj0cmvbm.js → chunk-w5v80bmk.js} +4 -4
  283. package/web/chunk-w5v80bmk.js.br +0 -0
  284. package/web/chunk-w5v80bmk.js.gz +0 -0
  285. package/web/{chunk-y5zd05mz.js → chunk-wj0ck0pa.js} +1 -1
  286. package/web/chunk-wj0ck0pa.js.br +0 -0
  287. package/web/chunk-wj0ck0pa.js.gz +0 -0
  288. package/web/chunk-wjzdpyhs.css +1 -0
  289. package/web/chunk-wjzdpyhs.css.br +0 -0
  290. package/web/chunk-wjzdpyhs.css.gz +0 -0
  291. package/web/{chunk-17d30546.js → chunk-wmt8d7zv.js} +5 -5
  292. package/web/chunk-wmt8d7zv.js.br +0 -0
  293. package/web/chunk-wmt8d7zv.js.gz +0 -0
  294. package/web/{chunk-ksr360js.js → chunk-wqf0qjbv.js} +2 -2
  295. package/web/chunk-wqf0qjbv.js.br +0 -0
  296. package/web/chunk-wqf0qjbv.js.gz +0 -0
  297. package/web/{chunk-2z4zhtw4.js → chunk-y5f7gy03.js} +2 -2
  298. package/web/chunk-y5f7gy03.js.br +0 -0
  299. package/web/chunk-y5f7gy03.js.gz +0 -0
  300. package/web/{chunk-96n0nem7.js → chunk-yg78fas7.js} +1 -1
  301. package/web/chunk-yg78fas7.js.br +0 -0
  302. package/web/chunk-yg78fas7.js.gz +0 -0
  303. package/web/{chunk-k8x1xbf6.js → chunk-yvkbc3s5.js} +1 -1
  304. package/web/chunk-yvkbc3s5.js.br +0 -0
  305. package/web/chunk-yvkbc3s5.js.gz +0 -0
  306. package/web/{chunk-wrqazg2v.js → chunk-z9nj64n7.js} +1 -1
  307. package/web/chunk-z9nj64n7.js.br +0 -0
  308. package/web/chunk-z9nj64n7.js.gz +0 -0
  309. package/web/{chunk-ms7cscs9.js → chunk-zc0e01j4.js} +1 -1
  310. package/web/chunk-zc0e01j4.js.br +0 -0
  311. package/web/chunk-zc0e01j4.js.gz +0 -0
  312. package/web/{chunk-290wy4yk.js → chunk-zj9s9w76.js} +1 -1
  313. package/web/chunk-zj9s9w76.js.br +0 -0
  314. package/web/chunk-zj9s9w76.js.gz +0 -0
  315. package/web/{chunk-085ttz7c.js → chunk-znwpavn5.js} +4 -4
  316. package/web/chunk-znwpavn5.js.br +0 -0
  317. package/web/chunk-znwpavn5.js.gz +0 -0
  318. package/web/index.html +1 -1
  319. package/web/index.html.br +0 -0
  320. package/web/index.html.gz +0 -0
  321. package/web/chunk-085ttz7c.js.br +0 -0
  322. package/web/chunk-085ttz7c.js.gz +0 -0
  323. package/web/chunk-13x3xyyh.js.br +0 -0
  324. package/web/chunk-13x3xyyh.js.gz +0 -0
  325. package/web/chunk-172gywq4.js.br +0 -0
  326. package/web/chunk-172gywq4.js.gz +0 -0
  327. package/web/chunk-176tsg6e.js.br +0 -0
  328. package/web/chunk-176tsg6e.js.gz +0 -0
  329. package/web/chunk-17d30546.js.br +0 -0
  330. package/web/chunk-17d30546.js.gz +0 -0
  331. package/web/chunk-1k6jx4hs.js +0 -1
  332. package/web/chunk-1k6jx4hs.js.br +0 -0
  333. package/web/chunk-1k6jx4hs.js.gz +0 -0
  334. package/web/chunk-1kts05s6.css +0 -1
  335. package/web/chunk-1kts05s6.css.br +0 -0
  336. package/web/chunk-1kts05s6.css.gz +0 -0
  337. package/web/chunk-1z0x1j6q.js +0 -1
  338. package/web/chunk-1z0x1j6q.js.br +0 -0
  339. package/web/chunk-1z0x1j6q.js.gz +0 -0
  340. package/web/chunk-290wy4yk.js.br +0 -0
  341. package/web/chunk-290wy4yk.js.gz +0 -0
  342. package/web/chunk-2cdw1299.js +0 -1
  343. package/web/chunk-2cdw1299.js.br +0 -0
  344. package/web/chunk-2cdw1299.js.gz +0 -0
  345. package/web/chunk-2fms67zg.js.br +0 -0
  346. package/web/chunk-2fms67zg.js.gz +0 -0
  347. package/web/chunk-2psxv4dk.js.br +0 -0
  348. package/web/chunk-2psxv4dk.js.gz +0 -0
  349. package/web/chunk-2z4zhtw4.js.br +0 -0
  350. package/web/chunk-2z4zhtw4.js.gz +0 -0
  351. package/web/chunk-3sszg3gr.js.br +0 -0
  352. package/web/chunk-3sszg3gr.js.gz +0 -0
  353. package/web/chunk-3vdw9nn7.js.br +0 -0
  354. package/web/chunk-3vdw9nn7.js.gz +0 -0
  355. package/web/chunk-4cbcqcd2.js.br +0 -0
  356. package/web/chunk-4cbcqcd2.js.gz +0 -0
  357. package/web/chunk-4v6n6b36.js +0 -1
  358. package/web/chunk-4v6n6b36.js.br +0 -0
  359. package/web/chunk-4v6n6b36.js.gz +0 -0
  360. package/web/chunk-59ybhv47.js.br +0 -0
  361. package/web/chunk-59ybhv47.js.gz +0 -0
  362. package/web/chunk-5zkw2kkb.js.br +0 -0
  363. package/web/chunk-5zkw2kkb.js.gz +0 -0
  364. package/web/chunk-634vc92s.js.br +0 -0
  365. package/web/chunk-634vc92s.js.gz +0 -0
  366. package/web/chunk-6n3cwe1h.js.br +0 -0
  367. package/web/chunk-6n3cwe1h.js.gz +0 -0
  368. package/web/chunk-6zr2j7xj.js +0 -1
  369. package/web/chunk-6zr2j7xj.js.br +0 -0
  370. package/web/chunk-6zr2j7xj.js.gz +0 -0
  371. package/web/chunk-713ygtrs.js.br +0 -0
  372. package/web/chunk-713ygtrs.js.gz +0 -0
  373. package/web/chunk-7m4gmjvp.js +0 -1
  374. package/web/chunk-7m4gmjvp.js.br +0 -0
  375. package/web/chunk-7m4gmjvp.js.gz +0 -0
  376. package/web/chunk-7x90pq42.js +0 -1
  377. package/web/chunk-7x90pq42.js.br +0 -0
  378. package/web/chunk-7x90pq42.js.gz +0 -0
  379. package/web/chunk-8de69eyx.js.br +0 -0
  380. package/web/chunk-8de69eyx.js.gz +0 -0
  381. package/web/chunk-91s1ns6b.js.br +0 -0
  382. package/web/chunk-91s1ns6b.js.gz +0 -0
  383. package/web/chunk-921qw2jf.js.br +0 -0
  384. package/web/chunk-921qw2jf.js.gz +0 -0
  385. package/web/chunk-96n0nem7.js.br +0 -0
  386. package/web/chunk-96n0nem7.js.gz +0 -0
  387. package/web/chunk-9k9p5dat.js.br +0 -0
  388. package/web/chunk-9k9p5dat.js.gz +0 -0
  389. package/web/chunk-a529550j.js +0 -1
  390. package/web/chunk-a529550j.js.br +0 -0
  391. package/web/chunk-a529550j.js.gz +0 -0
  392. package/web/chunk-abvtsz6z.js.br +0 -0
  393. package/web/chunk-abvtsz6z.js.gz +0 -0
  394. package/web/chunk-ac8vmj54.js.br +0 -0
  395. package/web/chunk-ac8vmj54.js.gz +0 -0
  396. package/web/chunk-b2t33c3t.js.br +0 -0
  397. package/web/chunk-b2t33c3t.js.gz +0 -0
  398. package/web/chunk-b9fqnzqd.js.br +0 -0
  399. package/web/chunk-b9fqnzqd.js.gz +0 -0
  400. package/web/chunk-bbs6yq60.js.br +0 -0
  401. package/web/chunk-bbs6yq60.js.gz +0 -0
  402. package/web/chunk-bbyqcvdz.js.br +0 -0
  403. package/web/chunk-bbyqcvdz.js.gz +0 -0
  404. package/web/chunk-bg2ps35t.js.br +0 -0
  405. package/web/chunk-bg2ps35t.js.gz +0 -0
  406. package/web/chunk-bh0a254y.js.br +0 -0
  407. package/web/chunk-bh0a254y.js.gz +0 -0
  408. package/web/chunk-bvmvj35k.js.br +0 -0
  409. package/web/chunk-bvmvj35k.js.gz +0 -0
  410. package/web/chunk-c2eqwepm.js.br +0 -0
  411. package/web/chunk-c2eqwepm.js.gz +0 -0
  412. package/web/chunk-ca8hnmmv.js.br +0 -0
  413. package/web/chunk-ca8hnmmv.js.gz +0 -0
  414. package/web/chunk-ced8pdbc.js.br +0 -0
  415. package/web/chunk-ced8pdbc.js.gz +0 -0
  416. package/web/chunk-cj0cmvbm.js.br +0 -0
  417. package/web/chunk-cj0cmvbm.js.gz +0 -0
  418. package/web/chunk-crhbhsrh.js.br +0 -0
  419. package/web/chunk-crhbhsrh.js.gz +0 -0
  420. package/web/chunk-e3d6kvwm.js.br +0 -0
  421. package/web/chunk-e3d6kvwm.js.gz +0 -0
  422. package/web/chunk-eq28qb33.js.br +0 -3
  423. package/web/chunk-eq28qb33.js.gz +0 -0
  424. package/web/chunk-f8ac76br.js +0 -2
  425. package/web/chunk-f8ac76br.js.br +0 -3
  426. package/web/chunk-f8ac76br.js.gz +0 -0
  427. package/web/chunk-fp7q643n.js.br +0 -0
  428. package/web/chunk-fp7q643n.js.gz +0 -0
  429. package/web/chunk-g1penf6y.js.br +0 -0
  430. package/web/chunk-g1penf6y.js.gz +0 -0
  431. package/web/chunk-g7t1bvvx.js.br +0 -0
  432. package/web/chunk-g7t1bvvx.js.gz +0 -0
  433. package/web/chunk-gf4ky7tp.js +0 -8
  434. package/web/chunk-gf4ky7tp.js.br +0 -0
  435. package/web/chunk-gf4ky7tp.js.gz +0 -0
  436. package/web/chunk-gtcjwz0j.js +0 -1
  437. package/web/chunk-gtcjwz0j.js.br +0 -2
  438. package/web/chunk-gtcjwz0j.js.gz +0 -0
  439. package/web/chunk-gy2y4zfa.js.br +0 -0
  440. package/web/chunk-gy2y4zfa.js.gz +0 -0
  441. package/web/chunk-h1cv1kke.js.br +0 -0
  442. package/web/chunk-h1cv1kke.js.gz +0 -0
  443. package/web/chunk-h6k80vqf.js +0 -1
  444. package/web/chunk-h6k80vqf.js.br +0 -0
  445. package/web/chunk-h6k80vqf.js.gz +0 -0
  446. package/web/chunk-hqtm67yw.js.br +0 -0
  447. package/web/chunk-hqtm67yw.js.gz +0 -0
  448. package/web/chunk-hsgtzrkh.js.br +0 -0
  449. package/web/chunk-hsgtzrkh.js.gz +0 -0
  450. package/web/chunk-j7phw79h.js +0 -1
  451. package/web/chunk-j7phw79h.js.br +0 -0
  452. package/web/chunk-j7phw79h.js.gz +0 -0
  453. package/web/chunk-k69ysa0v.js.br +0 -0
  454. package/web/chunk-k69ysa0v.js.gz +0 -0
  455. package/web/chunk-k7h5g8qj.js +0 -1
  456. package/web/chunk-k7h5g8qj.js.br +0 -2
  457. package/web/chunk-k7h5g8qj.js.gz +0 -0
  458. package/web/chunk-k8x1xbf6.js.br +0 -0
  459. package/web/chunk-k8x1xbf6.js.gz +0 -0
  460. package/web/chunk-kbvzxsz7.js.br +0 -0
  461. package/web/chunk-kbvzxsz7.js.gz +0 -0
  462. package/web/chunk-kn9bc5z2.js.br +0 -0
  463. package/web/chunk-kn9bc5z2.js.gz +0 -0
  464. package/web/chunk-ksr360js.js.br +0 -0
  465. package/web/chunk-ksr360js.js.gz +0 -0
  466. package/web/chunk-m5nt857c.js.br +0 -0
  467. package/web/chunk-m5nt857c.js.gz +0 -0
  468. package/web/chunk-mbaw66b5.js.br +0 -0
  469. package/web/chunk-mbaw66b5.js.gz +0 -0
  470. package/web/chunk-ms7cscs9.js.br +0 -0
  471. package/web/chunk-ms7cscs9.js.gz +0 -0
  472. package/web/chunk-n59nyqcr.js.br +0 -0
  473. package/web/chunk-n59nyqcr.js.gz +0 -0
  474. package/web/chunk-n9npqkxf.js.br +0 -0
  475. package/web/chunk-n9npqkxf.js.gz +0 -0
  476. package/web/chunk-nb3jk1wk.js.br +0 -0
  477. package/web/chunk-nb3jk1wk.js.gz +0 -0
  478. package/web/chunk-ny87aq2j.js.br +0 -0
  479. package/web/chunk-ny87aq2j.js.gz +0 -0
  480. package/web/chunk-phr7yps3.js.br +0 -0
  481. package/web/chunk-phr7yps3.js.gz +0 -0
  482. package/web/chunk-ppccb30x.js.br +0 -0
  483. package/web/chunk-ppccb30x.js.gz +0 -0
  484. package/web/chunk-q17rem99.js.br +0 -0
  485. package/web/chunk-q17rem99.js.gz +0 -0
  486. package/web/chunk-qdq6wvgt.js.br +0 -0
  487. package/web/chunk-qdq6wvgt.js.gz +0 -0
  488. package/web/chunk-qhr6hegh.js.br +0 -0
  489. package/web/chunk-qhr6hegh.js.gz +0 -0
  490. package/web/chunk-qqtj88e0.js.br +0 -0
  491. package/web/chunk-qqtj88e0.js.gz +0 -0
  492. package/web/chunk-r165xpp5.js +0 -1
  493. package/web/chunk-r165xpp5.js.br +0 -0
  494. package/web/chunk-r165xpp5.js.gz +0 -0
  495. package/web/chunk-r4cr8rvt.js.br +0 -0
  496. package/web/chunk-r4cr8rvt.js.gz +0 -0
  497. package/web/chunk-sapy54hm.js.br +0 -0
  498. package/web/chunk-sapy54hm.js.gz +0 -0
  499. package/web/chunk-sarkb4p9.js.br +0 -0
  500. package/web/chunk-sarkb4p9.js.gz +0 -0
  501. package/web/chunk-t7vwsg9r.js.br +0 -0
  502. package/web/chunk-t7vwsg9r.js.gz +0 -0
  503. package/web/chunk-tt7j0m6m.js.br +0 -0
  504. package/web/chunk-tt7j0m6m.js.gz +0 -0
  505. package/web/chunk-va1rkfan.js +0 -1
  506. package/web/chunk-va1rkfan.js.br +0 -0
  507. package/web/chunk-va1rkfan.js.gz +0 -0
  508. package/web/chunk-vb3sy3hv.js.br +0 -0
  509. package/web/chunk-vb3sy3hv.js.gz +0 -0
  510. package/web/chunk-vgpyff03.js.br +0 -0
  511. package/web/chunk-vgpyff03.js.gz +0 -0
  512. package/web/chunk-w563538j.js.br +0 -0
  513. package/web/chunk-w563538j.js.gz +0 -0
  514. package/web/chunk-w71t7mes.js +0 -1
  515. package/web/chunk-w71t7mes.js.br +0 -0
  516. package/web/chunk-w71t7mes.js.gz +0 -0
  517. package/web/chunk-w96etr1w.js +0 -1
  518. package/web/chunk-w96etr1w.js.br +0 -0
  519. package/web/chunk-w96etr1w.js.gz +0 -0
  520. package/web/chunk-wrqazg2v.js.br +0 -0
  521. package/web/chunk-wrqazg2v.js.gz +0 -0
  522. package/web/chunk-xv1d350x.js.br +0 -0
  523. package/web/chunk-xv1d350x.js.gz +0 -0
  524. package/web/chunk-xw8tzrmm.js.br +0 -0
  525. package/web/chunk-xw8tzrmm.js.gz +0 -0
  526. package/web/chunk-xwsh4jx7.js +0 -1
  527. package/web/chunk-xwsh4jx7.js.br +0 -2
  528. package/web/chunk-xwsh4jx7.js.gz +0 -0
  529. package/web/chunk-xxk7xkrs.js +0 -1
  530. package/web/chunk-xxk7xkrs.js.br +0 -0
  531. package/web/chunk-xxk7xkrs.js.gz +0 -0
  532. package/web/chunk-y5zd05mz.js.br +0 -0
  533. package/web/chunk-y5zd05mz.js.gz +0 -0
  534. package/web/chunk-yg9a23mv.js.br +0 -0
  535. package/web/chunk-yg9a23mv.js.gz +0 -0
  536. package/web/chunk-ygzgrjj7.js.br +0 -0
  537. package/web/chunk-ygzgrjj7.js.gz +0 -0
  538. package/web/chunk-yp75a6yh.js.br +0 -0
  539. package/web/chunk-yp75a6yh.js.gz +0 -0
  540. package/web/chunk-zs7c2db4.js.br +0 -0
  541. package/web/chunk-zs7c2db4.js.gz +0 -0
  542. package/web/chunk-zsae1tn8.js.br +0 -0
  543. package/web/chunk-zsae1tn8.js.gz +0 -0
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{Ea}from"./chunk-y5f7gy03.js";export{Ea as createRailroadServices};
Binary file
Binary file
@@ -1 +1 @@
1
- import{t,i}from"./chunk-n59nyqcr.js";import{ge,Ln,Nn}from"./chunk-cj0cmvbm.js";import{ae}from"./chunk-wrqazg2v.js";import{La,yn}from"./chunk-2z4zhtw4.js";var s=La().RailroadEbnf.parser.LangiumParser,a=t((e)=>{let r=e.alternatives.map(m);if(r.length===1)return r[0];return{type:"choice",alternatives:r}},"transformChoice"),m=t((e)=>{let r=e.elements.map(p);if(r.length===1)return r[0];return{type:"sequence",elements:r}},"transformSequence"),o=t((e)=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return a(e.element);case"EbnfOptional":return{type:"optional",element:a(e.element)};case"EbnfRepetition":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),l=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},o(r.except)]};default:throw Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),p=t((e)=>e.postfixes.reduce((r,n)=>l(r,n),o(e.base)),"transformTerm"),f=t((e)=>({name:e.name,definition:a(e.definition)}),"transformRule"),u=t((e)=>{if(ae(e,ge),e.title)ge.setTitle(e.title);e.rules.map((r)=>ge.addRule(f(r)))},"populateDb"),c={parse:t((e)=>{ge.clear(),i.debug("[EBNF Parser] Starting Langium parse");let r=s.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new yn(r);let n=r.value;i.debug("[EBNF Parser] Parsed rules:",n.rules.length),u(n),i.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:ge}},x={parser:c,db:ge,renderer:Nn,styles:Ln};export{x as diagram};
1
+ import{t,i}from"./chunk-qzb06me8.js";import{ge,Ln,Nn}from"./chunk-w5v80bmk.js";import{ae}from"./chunk-z9nj64n7.js";import{La,yn}from"./chunk-y5f7gy03.js";var s=La().RailroadEbnf.parser.LangiumParser,a=t((e)=>{let r=e.alternatives.map(m);if(r.length===1)return r[0];return{type:"choice",alternatives:r}},"transformChoice"),m=t((e)=>{let r=e.elements.map(p);if(r.length===1)return r[0];return{type:"sequence",elements:r}},"transformSequence"),o=t((e)=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return a(e.element);case"EbnfOptional":return{type:"optional",element:a(e.element)};case"EbnfRepetition":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),l=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},o(r.except)]};default:throw Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),p=t((e)=>e.postfixes.reduce((r,n)=>l(r,n),o(e.base)),"transformTerm"),f=t((e)=>({name:e.name,definition:a(e.definition)}),"transformRule"),u=t((e)=>{if(ae(e,ge),e.title)ge.setTitle(e.title);e.rules.map((r)=>ge.addRule(f(r)))},"populateDb"),c={parse:t((e)=>{ge.clear(),i.debug("[EBNF Parser] Starting Langium parse");let r=s.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new yn(r);let n=r.value;i.debug("[EBNF Parser] Parsed rules:",n.rules.length),u(n),i.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:ge}},x={parser:c,db:ge,renderer:Nn,styles:Ln};export{x as diagram};
Binary file
Binary file
@@ -1 +1 @@
1
- import{b,s,o,a,m,e,n,y,cr,ye}from"./chunk-xw8tzrmm.js";import{gi,yi,bi}from"./chunk-bg2ps35t.js";var te={global:"全局",project:"项目",custom:"自定义",builtin:"内置"};function F({skill:i,issue:x,connection:v}){let{Button:E,CopyButton:C,style:u,useTheme:R}=y();R();let[l,k]=a(),[L,P]=a(),[f,O]=a(0);return s(()=>{let p=!0;P(void 0),k(void 0);let S=new URLSearchParams;if(i.projectID)S.set("projectID",i.projectID);if(i.location)S.set("location",i.location);let N=S.toString()?`?${S.toString()}`:"";return Promise.all([v.request(`/api/skills/${encodeURIComponent(i.name)}/content${N}`),v.request(`/api/skills/${encodeURIComponent(i.name)}/files${N}`)]).then(([g,D])=>{if(p)k({text:g.text,files:D.files})}).catch((g)=>{if(p)P(g instanceof Error?g.message:"读取失败")}),()=>{p=!1}},[v,i.name,i.projectID,i.location,f]),n("div",{className:"min-w-0 space-y-5 text-sm text-ink",children:[e("p",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-dim",children:i.description||"暂无描述"}),n("div",{children:[n("p",{className:"break-all text-xs text-dim",children:[te[i.scope],i.projectName?` · ${i.projectName}`:""]}),n("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[e("code",{className:u("markdown.inlineCode","min-w-0 flex-1 break-all text-xs"),children:i.location}),e(C,{text:i.location,label:"复制完整路径",className:"size-10"})]})]}),n("ul",{className:"space-y-1 break-words text-xs text-dim",children:[e("li",{children:"启用状态按名称生效,影响同名技能在新会话与压缩刷新后的可用性。"}),i.disableModelInvocation&&e("li",{children:"仅手动:可由用户调用,不向模型自动提供。"}),i.platforms&&n("li",{children:["平台限制:",i.platforms.join("、")]}),i.disabled&&e("li",{children:"已禁用:不会提供给新会话或压缩刷新后的会话。"}),x?.overriddenBy&&n("li",{className:"break-all",children:["被覆盖:同名技能优先使用 ",x.overriddenBy]})]}),i.commands?.length?n("div",{children:[e("h3",{className:"font-medium",children:"bin 命令"}),e("p",{className:"mt-1 text-xs text-dim",children:"技能目录中的可执行命令。"}),e("ul",{className:"mt-2 space-y-1 font-mono text-xs",children:i.commands.map((p)=>e("li",{className:"break-all",children:p},p))})]}):null,L?n("div",{role:"alert",className:"space-y-2",children:[n("p",{className:"break-words text-danger",children:["读取失败:",L]}),e(E,{className:"h-10",onClick:()=>O(f+1),children:"重试"})]}):!l?e("p",{role:"status",className:"text-dim",children:"正在读取文件…"}):n(m,{children:[n("section",{children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e("h3",{className:"font-medium",children:"SKILL.md 原文"}),e(C,{text:l.text,label:"复制 SKILL.md 原文",className:"size-10"})]}),n("p",{className:"mb-2 text-xs text-faint",children:[l.text.length.toLocaleString()," 字符 · 约 ",Math.ceil(l.text.length/4).toLocaleString()," ","tokens(估算)"]}),e("pre",{className:u("surface.subtle",u("chat.toolOutput"),"rounded-lg bg-raised p-3 text-xs leading-5 break-all"),children:l.text})]}),n("section",{children:[n("h3",{className:"font-medium",children:["目录文件 · ",l.files.length,l.files.length===200?"(最多显示 200 个)":""]}),e("ul",{className:"mt-2 space-y-1 font-mono text-xs text-dim",children:l.files.map((p)=>e("li",{className:"break-all",children:p},p))})]})]})]})}var A="all",G="non-project";function me({connection:i}){let{Button:x,Select:v,Dialog:E,CatalogRow:C,style:u,useTheme:R}=y();R();let[l,k]=a([]),[L,P]=a([]),[f,O]=a(A),[p,S]=a([]),[N,g]=a(),[D,H]=a(""),[w,B]=a(),[h,q]=a(!0),[K,z]=a(),[W,Q]=a(),d=o(0),I=o(!1),j=b(async(t=!1)=>{let r=++d.current;I.current=!0,q(!0);try{if(t)await i.request("/api/skills/rescan",{method:"POST"});let[c,U,T]=await Promise.all([i.request("/api/skills?all=true"),i.request("/api/skills/settings"),i.request("/api/projects")]);if(r!==d.current)return;k(c.skills),P(T),S(c.issues),g(U),Q(new Date),z(void 0)}catch(c){if(r===d.current)z(c instanceof Error?c.message:"读取失败")}finally{if(r===d.current)I.current=!1,q(!1)}},[i]);s(()=>(j(),()=>{d.current++}),[j]);async function V(t){if(I.current)return;I.current=!0;let r=++d.current;q(!0);try{let c=await i.request("/api/skills/settings",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(r!==d.current)return;g(c),await j()}catch(c){if(r!==d.current)return;z(c instanceof Error?c.message:"保存设置失败"),I.current=!1,q(!1)}}let X=D.trim().toLocaleLowerCase(),Y=L.filter((t)=>l.some((r)=>r.projectID===t.id)),J=f===A?l:l.filter((t)=>{if(t.scope!=="project")return!0;return f!==G&&t.projectID===f}),M=J.filter((t)=>`${t.name} ${t.description??""}`.toLocaleLowerCase().includes(X)),_=(t)=>p.find((r)=>r.kind==="overridden"&&(r.path==="<built-in>"?t.scope==="builtin":r.path.replace(/\\/g,"/")===`${t.location.replace(/\\/g,"/")}/SKILL.md`));return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:u("settings.groupTitle"),children:"技能"}),e("p",{"aria-live":"polite",className:u("settings.groupDesc"),children:W&&`找到 ${J.length} 个 · ${W.toLocaleTimeString("zh-CN",{hour12:!1})}`})]}),n("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e(v,{value:f,disabled:h,onValueChange:(t)=>{B(void 0),O(t)},groups:[{options:[{value:A,label:"全部来源"},{value:G,label:"非项目技能"}]},...gi(Y)],className:"w-44"}),n(x,{variant:"ghost",disabled:h,onClick:()=>j(!0),className:"h-9 px-2.5 text-xs",children:[e(ye,{className:`size-3.5 ${h?"animate-spin":""}`}),e("span",{className:"ml-1",children:"重新扫描"})]})]})]}),K&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法更新技能:",K]}),e(x,{disabled:h,onClick:()=>j(),children:"重试"})]}),e(yi,{label:"搜索技能",placeholder:"搜索技能",value:D,onChange:H}),e("div",{className:u("settings.groupBox"),children:h&&!l.length?e(bi,{}):M.length===0?e("p",{className:"p-4 text-sm text-dim",children:"没有找到匹配的技能"}):e("ul",{className:"divide-y divide-line",children:M.map((t)=>{let r=_(t),c=t.disabled;return e("li",{children:e(C,{name:t.name,selectLabel:`查看技能 ${t.name}`,onSelect:()=>B(t),description:t.description,inactive:c,aside:n(m,{children:[r&&n("span",{className:"flex items-center gap-1 text-xs text-warning",children:[e(cr,{className:"size-3.5"}),"被覆盖"]}),e("span",{className:u("control.badge"),children:t.scope==="project"?"项目":t.scope==="builtin"?"内置":"全局"})]}),toggle:{checked:!c,label:`启用技能 ${t.name}`,disabled:h,onCheckedChange:(U)=>{if(!N)return;let T=N.disabled??[],Z=U?T.filter((ee)=>ee!==t.name):[...T,t.name];V({...N,disabled:Z})}}})},`${t.scope}:${t.projectID??""}:${t.name}`)})})})]}),e(E,{open:Boolean(w),onOpenChange:(t)=>{if(!t)B(void 0)},title:w?.name??"",size:"lg",footer:e("div",{className:"flex w-full justify-end",children:e(x,{variant:"primary",onClick:()=>B(void 0),children:"关闭"})}),children:w&&e(F,{skill:w,issue:_(w),connection:i})})]})}export{me as SkillsSection};
1
+ import{b,s,o,a,m,e,n,y,cr,ye}from"./chunk-g5b4wjwp.js";import{gi,yi,bi}from"./chunk-2q37qdq2.js";var te={global:"全局",project:"项目",custom:"自定义",builtin:"内置"};function F({skill:i,issue:x,connection:v}){let{Button:E,CopyButton:C,style:u,useTheme:R}=y();R();let[l,k]=a(),[L,P]=a(),[f,O]=a(0);return s(()=>{let p=!0;P(void 0),k(void 0);let S=new URLSearchParams;if(i.projectID)S.set("projectID",i.projectID);if(i.location)S.set("location",i.location);let N=S.toString()?`?${S.toString()}`:"";return Promise.all([v.request(`/api/skills/${encodeURIComponent(i.name)}/content${N}`),v.request(`/api/skills/${encodeURIComponent(i.name)}/files${N}`)]).then(([g,D])=>{if(p)k({text:g.text,files:D.files})}).catch((g)=>{if(p)P(g instanceof Error?g.message:"读取失败")}),()=>{p=!1}},[v,i.name,i.projectID,i.location,f]),n("div",{className:"min-w-0 space-y-5 text-sm text-ink",children:[e("p",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-dim",children:i.description||"暂无描述"}),n("div",{children:[n("p",{className:"break-all text-xs text-dim",children:[te[i.scope],i.projectName?` · ${i.projectName}`:""]}),n("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[e("code",{className:u("markdown.inlineCode","min-w-0 flex-1 break-all text-xs"),children:i.location}),e(C,{text:i.location,label:"复制完整路径",className:"size-10"})]})]}),n("ul",{className:"space-y-1 break-words text-xs text-dim",children:[e("li",{children:"启用状态按名称生效,影响同名技能在新会话与压缩刷新后的可用性。"}),i.disableModelInvocation&&e("li",{children:"仅手动:可由用户调用,不向模型自动提供。"}),i.platforms&&n("li",{children:["平台限制:",i.platforms.join("、")]}),i.disabled&&e("li",{children:"已禁用:不会提供给新会话或压缩刷新后的会话。"}),x?.overriddenBy&&n("li",{className:"break-all",children:["被覆盖:同名技能优先使用 ",x.overriddenBy]})]}),i.commands?.length?n("div",{children:[e("h3",{className:"font-medium",children:"bin 命令"}),e("p",{className:"mt-1 text-xs text-dim",children:"技能目录中的可执行命令。"}),e("ul",{className:"mt-2 space-y-1 font-mono text-xs",children:i.commands.map((p)=>e("li",{className:"break-all",children:p},p))})]}):null,L?n("div",{role:"alert",className:"space-y-2",children:[n("p",{className:"break-words text-danger",children:["读取失败:",L]}),e(E,{className:"h-10",onClick:()=>O(f+1),children:"重试"})]}):!l?e("p",{role:"status",className:"text-dim",children:"正在读取文件…"}):n(m,{children:[n("section",{children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e("h3",{className:"font-medium",children:"SKILL.md 原文"}),e(C,{text:l.text,label:"复制 SKILL.md 原文",className:"size-10"})]}),n("p",{className:"mb-2 text-xs text-faint",children:[l.text.length.toLocaleString()," 字符 · 约 ",Math.ceil(l.text.length/4).toLocaleString()," ","tokens(估算)"]}),e("pre",{className:u("surface.subtle",u("chat.toolOutput"),"rounded-lg bg-raised p-3 text-xs leading-5 break-all"),children:l.text})]}),n("section",{children:[n("h3",{className:"font-medium",children:["目录文件 · ",l.files.length,l.files.length===200?"(最多显示 200 个)":""]}),e("ul",{className:"mt-2 space-y-1 font-mono text-xs text-dim",children:l.files.map((p)=>e("li",{className:"break-all",children:p},p))})]})]})]})}var A="all",G="non-project";function me({connection:i}){let{Button:x,Select:v,Dialog:E,CatalogRow:C,style:u,useTheme:R}=y();R();let[l,k]=a([]),[L,P]=a([]),[f,O]=a(A),[p,S]=a([]),[N,g]=a(),[D,H]=a(""),[w,B]=a(),[h,q]=a(!0),[K,z]=a(),[W,Q]=a(),d=o(0),I=o(!1),j=b(async(t=!1)=>{let r=++d.current;I.current=!0,q(!0);try{if(t)await i.request("/api/skills/rescan",{method:"POST"});let[c,U,T]=await Promise.all([i.request("/api/skills?all=true"),i.request("/api/skills/settings"),i.request("/api/projects")]);if(r!==d.current)return;k(c.skills),P(T),S(c.issues),g(U),Q(new Date),z(void 0)}catch(c){if(r===d.current)z(c instanceof Error?c.message:"读取失败")}finally{if(r===d.current)I.current=!1,q(!1)}},[i]);s(()=>(j(),()=>{d.current++}),[j]);async function V(t){if(I.current)return;I.current=!0;let r=++d.current;q(!0);try{let c=await i.request("/api/skills/settings",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(r!==d.current)return;g(c),await j()}catch(c){if(r!==d.current)return;z(c instanceof Error?c.message:"保存设置失败"),I.current=!1,q(!1)}}let X=D.trim().toLocaleLowerCase(),Y=L.filter((t)=>l.some((r)=>r.projectID===t.id)),J=f===A?l:l.filter((t)=>{if(t.scope!=="project")return!0;return f!==G&&t.projectID===f}),M=J.filter((t)=>`${t.name} ${t.description??""}`.toLocaleLowerCase().includes(X)),_=(t)=>p.find((r)=>r.kind==="overridden"&&(r.path==="<built-in>"?t.scope==="builtin":r.path.replace(/\\/g,"/")===`${t.location.replace(/\\/g,"/")}/SKILL.md`));return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:u("settings.groupTitle"),children:"技能"}),e("p",{"aria-live":"polite",className:u("settings.groupDesc"),children:W&&`找到 ${J.length} 个 · ${W.toLocaleTimeString("zh-CN",{hour12:!1})}`})]}),n("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e(v,{value:f,disabled:h,onValueChange:(t)=>{B(void 0),O(t)},groups:[{options:[{value:A,label:"全部来源"},{value:G,label:"非项目技能"}]},...gi(Y)],className:"w-44"}),n(x,{variant:"ghost",disabled:h,onClick:()=>j(!0),className:"h-9 px-2.5 text-xs",children:[e(ye,{className:`size-3.5 ${h?"animate-spin":""}`}),e("span",{className:"ml-1",children:"重新扫描"})]})]})]}),K&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法更新技能:",K]}),e(x,{disabled:h,onClick:()=>j(),children:"重试"})]}),e(yi,{label:"搜索技能",placeholder:"搜索技能",value:D,onChange:H}),e("div",{className:u("settings.groupBox"),children:h&&!l.length?e(bi,{}):M.length===0?e("p",{className:"p-4 text-sm text-dim",children:"没有找到匹配的技能"}):e("ul",{className:"divide-y divide-line",children:M.map((t)=>{let r=_(t),c=t.disabled;return e("li",{children:e(C,{name:t.name,selectLabel:`查看技能 ${t.name}`,onSelect:()=>B(t),description:t.description,inactive:c,aside:n(m,{children:[r&&n("span",{className:"flex items-center gap-1 text-xs text-warning",children:[e(cr,{className:"size-3.5"}),"被覆盖"]}),e("span",{className:u("control.badge"),children:t.scope==="project"?"项目":t.scope==="builtin"?"内置":"全局"})]}),toggle:{checked:!c,label:`启用技能 ${t.name}`,disabled:h,onCheckedChange:(U)=>{if(!N)return;let T=N.disabled??[],Z=U?T.filter((ee)=>ee!==t.name):[...T,t.name];V({...N,disabled:Z})}}})},`${t.scope}:${t.projectID??""}:${t.name}`)})})})]}),e(E,{open:Boolean(w),onOpenChange:(t)=>{if(!t)B(void 0)},title:w?.name??"",size:"lg",footer:e("div",{className:"flex w-full justify-end",children:e(x,{variant:"primary",onClick:()=>B(void 0),children:"关闭"})}),children:w&&e(F,{skill:w,issue:_(w),connection:i})})]})}export{me as SkillsSection};
Binary file
Binary file
@@ -1 +1 @@
1
- import{t}from"./chunk-n59nyqcr.js";var c=1;function i(){if(typeof globalThis>"u")return;return globalThis}t(i,"getCaptureGlobal");function p(){return Boolean(i()?.mermaidCaptureSizes)}t(p,"shouldCaptureSizes");function u(){if(typeof location>"u")return"browser-dev";return`${location.pathname}${location.search}`}t(u,"capturedFromLocation");function d(n,r){let o=i();if(!o)return;let e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";o.mermaidCapturedSizes??=[];let a={svgId:s,sizes:n};o.mermaidCapturedSizes.push(a),o.mermaidLastCapturedSizes=a}t(d,"emitCapturedSizes");function m(n,r){let o=[];for(let e of r.nodes){if(e.isGroup)continue;o.push({id:e.id,width:e.width??0,height:e.height??0})}if(o.length===0)return;d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:o},n)}t(m,"captureNodeSizes");export{m as captureNodeSizes};
1
+ import{t}from"./chunk-qzb06me8.js";var c=1;function i(){if(typeof globalThis>"u")return;return globalThis}t(i,"getCaptureGlobal");function p(){return Boolean(i()?.mermaidCaptureSizes)}t(p,"shouldCaptureSizes");function u(){if(typeof location>"u")return"browser-dev";return`${location.pathname}${location.search}`}t(u,"capturedFromLocation");function d(n,r){let o=i();if(!o)return;let e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";o.mermaidCapturedSizes??=[];let a={svgId:s,sizes:n};o.mermaidCapturedSizes.push(a),o.mermaidLastCapturedSizes=a}t(d,"emitCapturedSizes");function m(n,r){let o=[];for(let e of r.nodes){if(e.isGroup)continue;o.push({id:e.id,width:e.width??0,height:e.height??0})}if(o.length===0)return;d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:o},n)}t(m,"captureNodeSizes");export{m as captureNodeSizes};
Binary file
Binary file
@@ -1 +1 @@
1
- import{s,o,a,oe,m,e,n,u,Dt,K,k,p,_,re,ue,fe,qi,ot,hs}from"./chunk-xw8tzrmm.js";var M=30;function q(t){let l=new Date(t),y=new Date,c=new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime(),x=new Date(y.getFullYear(),y.getMonth(),y.getDate()).getTime(),d=86400000,h=Math.round((x-c)/86400000),g=`${l.getMonth()+1}月${l.getDate()}日`;if(h===0)return`今天 · ${g}`;if(h===1)return`昨天 · ${g}`;if(h>1&&h<7)return`${h} 天前 · ${g}`;if(l.getFullYear()===y.getFullYear())return g;return`${l.getFullYear()}年${g}`}function Q(t){if(!t)return"";let l=new Date(t),y=(d)=>String(d).padStart(2,"0"),c=y(l.getHours()),x=y(l.getMinutes());return`${c}:${x}`}function V(t){if(!t)return"";return new Date(t).toLocaleString()}function Z(t,l=t.length){let y=[],c=new Map;for(let x=0;x<t.length;x++){let d=t[x];if(!d)continue;let h=d.archivedAt??0,g=new Date(h),D=`${g.getFullYear()}-${g.getMonth()+1}-${g.getDate()}`,b=c.get(D);if(!b){if(x>=l)continue;b={key:D,title:q(h),total:0,sessions:[]},c.set(D,b),y.push(b)}if(b.total+=1,x<l)b.sessions.push(d)}return y}function le(t){k();let[l,y]=a(""),[c,x]=a(!1),[d,h]=a(new Set),[g,D]=a(!1),b=o(null),w=oe(t.conn.state),P=t.projectID??"chat",L=t.projectID?t.projects.find((i)=>i.id===t.projectID)?.name??"项目":"聊天",S=qi(t.sessions,P),f=qi(S,P,l),I=`${P}\x00${l.trim().toLocaleLowerCase()}`,[T,A]=a({key:I,count:M}),G=T.key===I?T.count:M,z=Math.min(G,f.length),R=z<f.length;s(()=>{let i=b.current;if(!i||!R||typeof IntersectionObserver>"u")return;let v=i.closest(".minimal-scroll-area"),r=new IntersectionObserver((C)=>{if(C.some((j)=>j.isIntersecting))A({key:I,count:Math.min(f.length,z+M)})},{root:v,rootMargin:"320px 0px"});return r.observe(i),()=>r.disconnect()},[I,R,z,f.length]);let F=f.filter((i)=>d.has(i.id)),B=f.length>0&&d.size===f.length;function O(){if(B)h(new Set);else h(new Set(f.map((i)=>i.id)))}function E(i){h((v)=>{let r=new Set(v);if(r.has(i))r.delete(i);else r.add(i);return r})}async function Y(i){if(i.length===0||g)return;D(!0);try{if(t.onBatchDelete)await t.onBatchDelete(i);else for(let v of i)t.onDelete(v);if(h(new Set),c&&i.length===f.length)x(!1)}finally{D(!1)}}async function H(i){if(i.length===0||g)return;D(!0);try{if(t.onBatchRestore)await t.onBatchRestore(i);else for(let v of i)t.onRestore(v);if(h(new Set),c&&i.length===f.length)x(!1)}finally{D(!1)}}function W(){if(w.indexError)return n("div",{role:"alert",className:"animate-fade space-y-2 rounded-2xl border border-danger/20 bg-danger/5 p-6 text-sm text-danger",children:[n("p",{children:["加载失败:",w.indexError]}),e(_,{loading:w.indexLoading,disabled:w.indexLoading,onClick:()=>{if(!t.conn.state.get().indexLoading)t.conn.refreshIndex()},children:"重试"})]});if(w.status!=="open"||w.indexLoading)return e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在连接…"});if(f.length===0)return n("div",{className:p("surface.emptyDashed","animate-fade"),children:[e("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:e(Dt,{className:"size-5"})}),n("div",{children:[e("p",{className:"text-[15px] font-medium",children:S.length===0?`${L}里暂无归档会话`:"没有匹配结果"}),e("p",{className:"mt-1 text-sm text-dim",children:S.length===0?"归档的会话会安全存放在这里,不干扰日常列表。":"尝试更换关键词重新搜索。"})]})]});let i=Z(f,z);return n("div",{className:"space-y-6 animate-fade",children:[i.map((v)=>n("section",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between px-1 text-xs text-dim",children:[e("h2",{className:"font-medium text-ink",children:v.title}),n("span",{className:"tabular-nums text-faint",children:[v.total," 个会话"]})]}),e("div",{className:p("settings.groupBox"),children:e("ul",{className:"divide-y divide-line/60",children:v.sessions.map((r)=>{let C=d.has(r.id),j=t.projects.find((N)=>N.id===r.projectID)?.name;return n("li",{tabIndex:c?0:void 0,className:u("group flex flex-wrap items-center justify-between gap-x-3 gap-y-1 px-4 py-2.5 transition-colors sm:flex-nowrap",c?"cursor-pointer hover:bg-raised/70 focus:outline-hidden focus:bg-raised/70":"hover:bg-raised/50",c&&C&&"bg-accent/5"),onClick:c?()=>E(r.id):void 0,onKeyDown:c?(N)=>{if(N.key==="Enter"||N.key===" ")N.preventDefault(),E(r.id)}:void 0,children:[n("div",{className:"flex min-w-0 flex-1 basis-48 items-center gap-2.5",children:[c&&e("span",{className:u("flex size-4 shrink-0 items-center justify-center rounded-md border transition-colors",C?"border-accent bg-accent text-accent-ink":"border-line-strong bg-panel"),children:C&&e(K,{className:"size-3",strokeWidth:3})}),e(ot,{modelID:r.model,className:"size-4 shrink-0 text-dim"}),e("button",{type:"button",disabled:c,className:u("block max-w-full truncate text-left text-sm font-medium text-ink transition-colors focus:outline-hidden",!c&&"hover:text-accent"),onClick:()=>!c&&t.onOpen(r.id),children:fe(r)}),j&&e("span",{className:p("control.badge","shrink-0 text-[11px] text-dim"),children:j})]}),n("div",{className:"flex shrink-0 items-center justify-end gap-1.5 sm:grid sm:justify-items-end",children:[e("time",{dateTime:r.archivedAt?new Date(r.archivedAt).toISOString():void 0,title:r.archivedAt?`归档于 ${V(r.archivedAt)}`:void 0,className:u("text-xs tabular-nums text-faint cursor-default sm:col-start-1 sm:row-start-1",!c&&"transition-opacity sm:group-hover:opacity-0 sm:group-focus-within:opacity-0"),children:Q(r.archivedAt)}),!c&&n("div",{className:"flex items-center gap-1.5 opacity-90 transition-opacity sm:pointer-events-none sm:col-start-1 sm:row-start-1 sm:opacity-0 sm:group-hover:pointer-events-auto sm:group-hover:opacity-100 sm:group-focus-within:pointer-events-auto sm:group-focus-within:opacity-100",children:[e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:t.pending.has(r.id),onClick:(N)=>{N.stopPropagation(),t.onRestore(r)},children:"恢复"}),e(_,{size:"sm",variant:"danger-ghost",className:"h-7 px-2 text-xs",disabled:t.pending.has(r.id),onClick:(N)=>{N.stopPropagation(),t.onDelete(r)},children:"永久删除"})]})]})]},r.id)})})})]},v.key)),R&&n("div",{ref:b,className:"flex items-center justify-between rounded-xl border border-line/60 bg-panel/40 px-4 py-2.5 text-xs text-faint",children:[n("span",{className:"tabular-nums",children:["已显示 ",z," / ",f.length," 个会话"]}),n("div",{className:"flex items-center gap-1.5",children:[e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>A({key:I,count:Math.min(f.length,z+M)}),children:"加载更多"}),e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>A({key:I,count:f.length}),children:"显示全部"})]})]})]})}return n(hs,{"aria-label":"已归档会话",title:n(m,{children:["已归档 ",n("span",{className:"text-dim",children:["· ",L]})]}),description:"浏览和管理已归档的会话,可随时恢复到聊天列表或彻底删除。",children:[n("div",{className:"mb-6 space-y-2",children:[e(ue,{label:"搜索标题",children:(i)=>e(re,{id:i,value:l,onChange:(v)=>y(v.target.value),placeholder:"搜索归档会话…"})}),S.length>0&&(c?n("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-xl border border-line bg-panel p-2.5 shadow-xs",children:[n("button",{type:"button",className:"flex items-center gap-2 text-xs font-medium text-ink hover:text-accent focus:outline-hidden",onClick:O,children:[n("span",{className:u("flex size-4 shrink-0 items-center justify-center rounded-md border transition-colors",B?"border-accent bg-accent text-accent-ink":d.size>0?"border-accent bg-accent/20 text-accent":"border-line-strong bg-panel"),children:[B&&e(K,{className:"size-3",strokeWidth:3}),!B&&d.size>0&&e("span",{className:"size-1.5 rounded-xs bg-accent"})]}),n("span",{children:[B?"取消全选":"全选",n("span",{className:"ml-1 text-dim",children:["(",d.size,"/",f.length,")"]})]})]}),n("div",{className:"flex items-center gap-2",children:[n(_,{size:"sm",variant:"secondary",className:"h-7 px-2.5 text-xs",loading:g,disabled:d.size===0||g,onClick:()=>void H(F),children:["批量恢复",d.size>0?` (${d.size})`:""]}),n(_,{size:"sm",variant:"danger",className:"h-7 px-2.5 text-xs",loading:g,disabled:d.size===0||g,onClick:()=>void Y(F),children:["彻底删除",d.size>0?` (${d.size})`:""]}),e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:g,onClick:()=>{x(!1),h(new Set)},children:"退出管理"})]})]}):n("div",{className:"flex items-center justify-between px-0.5 text-xs text-dim",children:[e("span",{children:l.trim()?`匹配 ${f.length} 个会话(共 ${S.length} 个)`:`共 ${S.length} 个归档会话`}),f.length>0&&n("div",{className:"flex items-center gap-2",children:[e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>x(!0),children:"批量管理"}),e(_,{size:"sm",variant:"danger-ghost",className:"h-7 px-2 text-xs",onClick:()=>void Y(f),children:l.trim()?"清空匹配结果":"清空全部"})]})]}))]}),W()]})}export{le as ArchivePage};
1
+ import{s,o,a,se,m,e,n,u,Dt,Z,k,p,_,re,de,fe,qi,ot,hs}from"./chunk-g5b4wjwp.js";var M=30;function W(t){let l=new Date(t),y=new Date,c=new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime(),x=new Date(y.getFullYear(),y.getMonth(),y.getDate()).getTime(),d=86400000,h=Math.round((x-c)/86400000),g=`${l.getMonth()+1}月${l.getDate()}日`;if(h===0)return`今天 · ${g}`;if(h===1)return`昨天 · ${g}`;if(h>1&&h<7)return`${h} 天前 · ${g}`;if(l.getFullYear()===y.getFullYear())return g;return`${l.getFullYear()}年${g}`}function q(t){if(!t)return"";let l=new Date(t),y=(d)=>String(d).padStart(2,"0"),c=y(l.getHours()),x=y(l.getMinutes());return`${c}:${x}`}function Q(t){if(!t)return"";return new Date(t).toLocaleString()}function V(t,l=t.length){let y=[],c=new Map;for(let x=0;x<t.length;x++){let d=t[x];if(!d)continue;let h=d.archivedAt??0,g=new Date(h),D=`${g.getFullYear()}-${g.getMonth()+1}-${g.getDate()}`,b=c.get(D);if(!b){if(x>=l)continue;b={key:D,title:W(h),total:0,sessions:[]},c.set(D,b),y.push(b)}if(b.total+=1,x<l)b.sessions.push(d)}return y}function le(t){k();let[l,y]=a(""),[c,x]=a(!1),[d,h]=a(new Set),[g,D]=a(!1),b=o(null),w=se(t.conn.state),P=t.projectID??"chat",L=t.projectID?t.projects.find((i)=>i.id===t.projectID)?.name??"项目":"聊天",S=qi(t.sessions,P),f=qi(S,P,l),I=`${P}\x00${l.trim().toLocaleLowerCase()}`,[T,A]=a({key:I,count:M}),G=T.key===I?T.count:M,z=Math.min(G,f.length),R=z<f.length;s(()=>{let i=b.current;if(!i||!R||typeof IntersectionObserver>"u")return;let v=i.closest(".minimal-scroll-area"),r=new IntersectionObserver((C)=>{if(C.some((j)=>j.isIntersecting))A({key:I,count:Math.min(f.length,z+M)})},{root:v,rootMargin:"320px 0px"});return r.observe(i),()=>r.disconnect()},[I,R,z,f.length]);let F=f.filter((i)=>d.has(i.id)),B=f.length>0&&d.size===f.length;function O(){if(B)h(new Set);else h(new Set(f.map((i)=>i.id)))}function E(i){h((v)=>{let r=new Set(v);if(r.has(i))r.delete(i);else r.add(i);return r})}async function Y(i){if(i.length===0||g)return;D(!0);try{if(t.onBatchDelete)await t.onBatchDelete(i);else for(let v of i)t.onDelete(v);if(h(new Set),c&&i.length===f.length)x(!1)}finally{D(!1)}}async function H(i){if(i.length===0||g)return;D(!0);try{if(t.onBatchRestore)await t.onBatchRestore(i);else for(let v of i)t.onRestore(v);if(h(new Set),c&&i.length===f.length)x(!1)}finally{D(!1)}}function K(){if(w.indexError)return n("div",{role:"alert",className:"animate-fade space-y-2 rounded-2xl border border-danger/20 bg-danger/5 p-6 text-sm text-danger",children:[n("p",{children:["加载失败:",w.indexError]}),e(_,{loading:w.indexLoading,disabled:w.indexLoading,onClick:()=>{if(!t.conn.state.get().indexLoading)t.conn.refreshIndex()},children:"重试"})]});if(w.status!=="open"||w.indexLoading)return e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在连接…"});if(f.length===0)return n("div",{className:p("surface.emptyDashed","animate-fade"),children:[e("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:e(Dt,{className:"size-5"})}),n("div",{children:[e("p",{className:"text-[15px] font-medium",children:S.length===0?`${L}里暂无归档会话`:"没有匹配结果"}),e("p",{className:"mt-1 text-sm text-dim",children:S.length===0?"归档的会话会安全存放在这里,不干扰日常列表。":"尝试更换关键词重新搜索。"})]})]});let i=V(f,z);return n("div",{className:"space-y-6 animate-fade",children:[i.map((v)=>n("section",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between px-1 text-xs text-dim",children:[e("h2",{className:"font-medium text-ink",children:v.title}),n("span",{className:"tabular-nums text-faint",children:[v.total," 个会话"]})]}),e("div",{className:p("settings.groupBox"),children:e("ul",{className:"divide-y divide-line/60",children:v.sessions.map((r)=>{let C=d.has(r.id),j=t.projects.find((N)=>N.id===r.projectID)?.name;return n("li",{tabIndex:c?0:void 0,className:u("group flex flex-wrap items-center justify-between gap-x-3 gap-y-1 px-4 py-2.5 transition-colors sm:flex-nowrap",c?"cursor-pointer hover:bg-raised/70 focus:outline-hidden focus:bg-raised/70":"hover:bg-raised/50",c&&C&&"bg-accent/5"),onClick:c?()=>E(r.id):void 0,onKeyDown:c?(N)=>{if(N.key==="Enter"||N.key===" ")N.preventDefault(),E(r.id)}:void 0,children:[n("div",{className:"flex min-w-0 flex-1 basis-48 items-center gap-2.5",children:[c&&e("span",{className:u("flex size-4 shrink-0 items-center justify-center rounded-md border transition-colors",C?"border-accent bg-accent text-accent-ink":"border-line-strong bg-panel"),children:C&&e(Z,{className:"size-3",strokeWidth:3})}),e(ot,{modelID:r.model,className:"size-4 shrink-0 text-dim"}),e("button",{type:"button",disabled:c,className:u("block max-w-full truncate text-left text-sm font-medium text-ink transition-colors focus:outline-hidden",!c&&"hover:text-accent"),onClick:()=>!c&&t.onOpen(r.id),children:fe(r)}),j&&e("span",{className:p("control.badge","shrink-0 text-[11px] text-dim"),children:j})]}),n("div",{className:"flex shrink-0 items-center justify-end gap-1.5 sm:grid sm:justify-items-end",children:[e("time",{dateTime:r.archivedAt?new Date(r.archivedAt).toISOString():void 0,title:r.archivedAt?`归档于 ${Q(r.archivedAt)}`:void 0,className:u("text-xs tabular-nums text-faint cursor-default sm:col-start-1 sm:row-start-1",!c&&"transition-opacity sm:group-hover:opacity-0 sm:group-focus-within:opacity-0"),children:q(r.archivedAt)}),!c&&n("div",{className:"flex items-center gap-1.5 opacity-90 transition-opacity sm:pointer-events-none sm:col-start-1 sm:row-start-1 sm:opacity-0 sm:group-hover:pointer-events-auto sm:group-hover:opacity-100 sm:group-focus-within:pointer-events-auto sm:group-focus-within:opacity-100",children:[e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:t.pending.has(r.id),onClick:(N)=>{N.stopPropagation(),t.onRestore(r)},children:"恢复"}),e(_,{size:"sm",variant:"danger-ghost",className:"h-7 px-2 text-xs",disabled:t.pending.has(r.id),onClick:(N)=>{N.stopPropagation(),t.onDelete(r)},children:"永久删除"})]})]})]},r.id)})})})]},v.key)),R&&n("div",{ref:b,className:"flex items-center justify-between rounded-xl border border-line/60 bg-panel/40 px-4 py-2.5 text-xs text-faint",children:[n("span",{className:"tabular-nums",children:["已显示 ",z," / ",f.length," 个会话"]}),n("div",{className:"flex items-center gap-1.5",children:[e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>A({key:I,count:Math.min(f.length,z+M)}),children:"加载更多"}),e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>A({key:I,count:f.length}),children:"显示全部"})]})]})]})}return n(hs,{"aria-label":"已归档会话",title:n(m,{children:["已归档 ",n("span",{className:"text-dim",children:["· ",L]})]}),description:"浏览和管理已归档的会话,可随时恢复到聊天列表或彻底删除。",children:[n("div",{className:"mb-6 space-y-2",children:[e(de,{label:"搜索标题",children:(i)=>e(re,{id:i,value:l,onChange:(v)=>y(v.target.value),placeholder:"搜索归档会话…"})}),S.length>0&&(c?n("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-xl border border-line bg-panel p-2.5 shadow-xs",children:[n("button",{type:"button",className:"flex items-center gap-2 text-xs font-medium text-ink hover:text-accent focus:outline-hidden",onClick:O,children:[n("span",{className:u("flex size-4 shrink-0 items-center justify-center rounded-md border transition-colors",B?"border-accent bg-accent text-accent-ink":d.size>0?"border-accent bg-accent/20 text-accent":"border-line-strong bg-panel"),children:[B&&e(Z,{className:"size-3",strokeWidth:3}),!B&&d.size>0&&e("span",{className:"size-1.5 rounded-xs bg-accent"})]}),n("span",{children:[B?"取消全选":"全选",n("span",{className:"ml-1 text-dim",children:["(",d.size,"/",f.length,")"]})]})]}),n("div",{className:"flex items-center gap-2",children:[n(_,{size:"sm",variant:"secondary",className:"h-7 px-2.5 text-xs",loading:g,disabled:d.size===0||g,onClick:()=>void H(F),children:["批量恢复",d.size>0?` (${d.size})`:""]}),n(_,{size:"sm",variant:"danger",className:"h-7 px-2.5 text-xs",loading:g,disabled:d.size===0||g,onClick:()=>void Y(F),children:["彻底删除",d.size>0?` (${d.size})`:""]}),e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:g,onClick:()=>{x(!1),h(new Set)},children:"退出管理"})]})]}):n("div",{className:"flex items-center justify-between px-0.5 text-xs text-dim",children:[e("span",{children:l.trim()?`匹配 ${f.length} 个会话(共 ${S.length} 个)`:`共 ${S.length} 个归档会话`}),f.length>0&&n("div",{className:"flex items-center gap-2",children:[e(_,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>x(!0),children:"批量管理"}),e(_,{size:"sm",variant:"danger-ghost",className:"h-7 px-2 text-xs",onClick:()=>void Y(f),children:l.trim()?"清空匹配结果":"清空全部"})]})]}))]}),K()]})}export{le as ArchivePage};
Binary file
Binary file
@@ -1,9 +1,9 @@
1
- import{t,i,st,C,L,N,R,P,I,O,D,d,g,Zs,H,Re,Te,Ee,un,He,Ue}from"./chunk-n59nyqcr.js";import{In}from"./chunk-c2eqwepm.js";import{ze}from"./chunk-b2t33c3t.js";import{Me}from"./chunk-eq28qb33.js";var Pt=function(){var e=t(function(Q,c,p,n){for(p=p||{},n=Q.length;n--;p[Q[n]]=c);return p},"o"),s=[1,2],l=[1,3],r=[1,4],u=[2,4],f=[1,9],y=[1,11],m=[1,16],o=[1,17],T=[1,18],E=[1,19],G=[1,33],Y=[1,20],W=[1,21],x=[1,22],S=[1,23],V=[1,24],w=[1,26],z=[1,27],M=[1,28],K=[1,29],A=[1,30],rt=[1,31],St=[1,32],gt=[1,35],yt=[1,36],mt=[1,37],bt=[1,38],it=[1,34],b=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],kt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Lt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:t(function(c,p,n,k,_,a,at){var h=a.length-1;switch(_){case 3:return k.setRootDoc(a[h]),a[h];break;case 4:this.$=[];break;case 5:if(a[h]!="nl")a[h-1].push(a[h]),this.$=a[h-1];break;case 6:case 7:this.$=a[h];break;case 8:this.$="nl";break;case 12:this.$=a[h];break;case 13:let Et=a[h-1];Et.description=k.trimColon(a[h]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:a[h-2],state2:a[h]};break;case 15:let _t=k.trimColon(a[h]);this.$={stmt:"relation",state1:a[h-3],state2:a[h-1],description:_t};break;case 19:this.$={stmt:"state",id:a[h-3],type:"default",description:"",doc:a[h-1]};break;case 20:var X=a[h],J=a[h-2].trim();if(a[h].match(":")){var ct=a[h].split(":");X=ct[0],J=[J,ct[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:a[h-3],type:"default",description:a[h-5],doc:a[h-1]};break;case 22:this.$={stmt:"state",id:a[h],type:"fork"};break;case 23:this.$={stmt:"state",id:a[h],type:"join"};break;case 24:this.$={stmt:"state",id:a[h],type:"choice"};break;case 25:this.$={stmt:"state",id:k.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[h-1].trim(),note:{position:a[h-2].trim(),text:a[h].trim()}};break;case 29:this.$=a[h].trim(),k.setAccTitle(this.$);break;case 30:case 31:this.$=a[h].trim(),k.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[h-3],url:a[h-2],tooltip:a[h-1]};break;case 33:this.$={stmt:"click",id:a[h-3],url:a[h-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[h-1].trim(),classes:a[h].trim()};break;case 36:this.$={stmt:"style",id:a[h-1].trim(),styleClass:a[h].trim()};break;case 37:this.$={stmt:"applyClass",id:a[h-1].trim(),styleClass:a[h].trim()};break;case 38:k.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:k.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:k.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:k.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[h].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:a[h-2].trim(),classes:[a[h].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:a[h-2].trim(),classes:[a[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:s,5:l,6:r},{1:[3]},{3:5,4:s,5:l,6:r},{3:6,4:s,5:l,6:r},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:o,19:T,22:E,24:G,25:Y,26:W,27:x,28:S,29:V,32:25,33:w,35:z,37:M,38:K,41:A,45:rt,48:St,51:gt,52:yt,53:mt,54:bt,57:it},e(b,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:m,17:o,19:T,22:E,24:G,25:Y,26:W,27:x,28:S,29:V,32:25,33:w,35:z,37:M,38:K,41:A,45:rt,48:St,51:gt,52:yt,53:mt,54:bt,57:it},e(b,[2,7]),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(b,[2,11]),e(b,[2,12],{14:[1,40],15:[1,41]}),e(b,[2,16]),{18:[1,42]},e(b,[2,18],{20:[1,43]}),{23:[1,44]},e(b,[2,22]),e(b,[2,23]),e(b,[2,24]),e(b,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(b,[2,28]),{34:[1,49]},{36:[1,50]},e(b,[2,31]),{13:51,24:G,57:it},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(kt,[2,44],{58:[1,56]}),e(kt,[2,45],{58:[1,57]}),e(b,[2,38]),e(b,[2,39]),e(b,[2,40]),e(b,[2,41]),e(b,[2,6]),e(b,[2,13]),{13:58,24:G,57:it},e(b,[2,17]),e(Vt,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(b,[2,29]),e(b,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(b,[2,14],{14:[1,71]}),{4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:o,19:T,21:[1,72],22:E,24:G,25:Y,26:W,27:x,28:S,29:V,32:25,33:w,35:z,37:M,38:K,41:A,45:rt,48:St,51:gt,52:yt,53:mt,54:bt,57:it},e(b,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(b,[2,34]),e(b,[2,35]),e(b,[2,36]),e(b,[2,37]),e(kt,[2,46]),e(kt,[2,47]),e(b,[2,15]),e(b,[2,19]),e(Vt,u,{7:78}),e(b,[2,26]),e(b,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:o,19:T,21:[1,81],22:E,24:G,25:Y,26:W,27:x,28:S,29:V,32:25,33:w,35:z,37:M,38:K,41:A,45:rt,48:St,51:gt,52:yt,53:mt,54:bt,57:it},e(b,[2,32]),e(b,[2,33]),e(b,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:t(function(c,p){if(p.recoverable)this.trace(c);else{var n=Error(c);throw n.hash=p,n}},"parseError"),parse:t(function(c){var p=this,n=[0],k=[],_=[null],a=[],at=this.table,h="",X=0,J=0,ct=0,Et=2,_t=1,de=a.slice.call(arguments,1),v=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(v.setInput(c,tt.yy),tt.yy.lexer=v,tt.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var It=v.yylloc;a.push(It);var ue=v.options&&v.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function fe(U){n.length=n.length-2*U,_.length=_.length-U,a.length=a.length-U}t(fe,"popStack");function Mt(){var U=k.pop()||v.lex()||_t;if(typeof U!=="number"){if(U instanceof Array)k=U,U=k.pop();U=p.symbols_[U]||U}return U}t(Mt,"lex");var F,Nt,et,j,Qe,Ot,nt={},vt,q,Wt,Dt;while(!0){if(et=n[n.length-1],this.defaultActions[et])j=this.defaultActions[et];else{if(F===null||typeof F>"u")F=Mt();j=at[et]&&at[et][F]}if(typeof j>"u"||!j.length||!j[0]){var Rt="";Dt=[];for(vt in at[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(v.showPosition)Rt="Parse error on line "+(X+1)+`:
1
+ import{t,i,st,C,L,N,R,P,I,O,D,d,g,Zs,H,De,Ne,Me,un,He,Ue}from"./chunk-qzb06me8.js";import{In}from"./chunk-n8j9jdsh.js";import{ze}from"./chunk-sxmv80th.js";import{Re}from"./chunk-ry1wp3v8.js";var Pt=function(){var e=t(function(Q,c,p,n){for(p=p||{},n=Q.length;n--;p[Q[n]]=c);return p},"o"),s=[1,2],l=[1,3],r=[1,4],u=[2,4],f=[1,9],y=[1,11],m=[1,16],o=[1,17],T=[1,18],E=[1,19],G=[1,33],Y=[1,20],W=[1,21],x=[1,22],S=[1,23],V=[1,24],w=[1,26],z=[1,27],M=[1,28],K=[1,29],A=[1,30],rt=[1,31],St=[1,32],gt=[1,35],yt=[1,36],mt=[1,37],bt=[1,38],it=[1,34],b=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],kt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Lt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:t(function(c,p,n,k,_,a,at){var h=a.length-1;switch(_){case 3:return k.setRootDoc(a[h]),a[h];break;case 4:this.$=[];break;case 5:if(a[h]!="nl")a[h-1].push(a[h]),this.$=a[h-1];break;case 6:case 7:this.$=a[h];break;case 8:this.$="nl";break;case 12:this.$=a[h];break;case 13:let Et=a[h-1];Et.description=k.trimColon(a[h]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:a[h-2],state2:a[h]};break;case 15:let _t=k.trimColon(a[h]);this.$={stmt:"relation",state1:a[h-3],state2:a[h-1],description:_t};break;case 19:this.$={stmt:"state",id:a[h-3],type:"default",description:"",doc:a[h-1]};break;case 20:var X=a[h],J=a[h-2].trim();if(a[h].match(":")){var ct=a[h].split(":");X=ct[0],J=[J,ct[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:a[h-3],type:"default",description:a[h-5],doc:a[h-1]};break;case 22:this.$={stmt:"state",id:a[h],type:"fork"};break;case 23:this.$={stmt:"state",id:a[h],type:"join"};break;case 24:this.$={stmt:"state",id:a[h],type:"choice"};break;case 25:this.$={stmt:"state",id:k.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[h-1].trim(),note:{position:a[h-2].trim(),text:a[h].trim()}};break;case 29:this.$=a[h].trim(),k.setAccTitle(this.$);break;case 30:case 31:this.$=a[h].trim(),k.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[h-3],url:a[h-2],tooltip:a[h-1]};break;case 33:this.$={stmt:"click",id:a[h-3],url:a[h-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[h-1].trim(),classes:a[h].trim()};break;case 36:this.$={stmt:"style",id:a[h-1].trim(),styleClass:a[h].trim()};break;case 37:this.$={stmt:"applyClass",id:a[h-1].trim(),styleClass:a[h].trim()};break;case 38:k.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:k.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:k.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:k.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[h].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:a[h-2].trim(),classes:[a[h].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:a[h-2].trim(),classes:[a[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:s,5:l,6:r},{1:[3]},{3:5,4:s,5:l,6:r},{3:6,4:s,5:l,6:r},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:o,19:T,22:E,24:G,25:Y,26:W,27:x,28:S,29:V,32:25,33:w,35:z,37:M,38:K,41:A,45:rt,48:St,51:gt,52:yt,53:mt,54:bt,57:it},e(b,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:m,17:o,19:T,22:E,24:G,25:Y,26:W,27:x,28:S,29:V,32:25,33:w,35:z,37:M,38:K,41:A,45:rt,48:St,51:gt,52:yt,53:mt,54:bt,57:it},e(b,[2,7]),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(b,[2,11]),e(b,[2,12],{14:[1,40],15:[1,41]}),e(b,[2,16]),{18:[1,42]},e(b,[2,18],{20:[1,43]}),{23:[1,44]},e(b,[2,22]),e(b,[2,23]),e(b,[2,24]),e(b,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(b,[2,28]),{34:[1,49]},{36:[1,50]},e(b,[2,31]),{13:51,24:G,57:it},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(kt,[2,44],{58:[1,56]}),e(kt,[2,45],{58:[1,57]}),e(b,[2,38]),e(b,[2,39]),e(b,[2,40]),e(b,[2,41]),e(b,[2,6]),e(b,[2,13]),{13:58,24:G,57:it},e(b,[2,17]),e(Vt,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(b,[2,29]),e(b,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(b,[2,14],{14:[1,71]}),{4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:o,19:T,21:[1,72],22:E,24:G,25:Y,26:W,27:x,28:S,29:V,32:25,33:w,35:z,37:M,38:K,41:A,45:rt,48:St,51:gt,52:yt,53:mt,54:bt,57:it},e(b,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(b,[2,34]),e(b,[2,35]),e(b,[2,36]),e(b,[2,37]),e(kt,[2,46]),e(kt,[2,47]),e(b,[2,15]),e(b,[2,19]),e(Vt,u,{7:78}),e(b,[2,26]),e(b,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:o,19:T,21:[1,81],22:E,24:G,25:Y,26:W,27:x,28:S,29:V,32:25,33:w,35:z,37:M,38:K,41:A,45:rt,48:St,51:gt,52:yt,53:mt,54:bt,57:it},e(b,[2,32]),e(b,[2,33]),e(b,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:t(function(c,p){if(p.recoverable)this.trace(c);else{var n=Error(c);throw n.hash=p,n}},"parseError"),parse:t(function(c){var p=this,n=[0],k=[],_=[null],a=[],at=this.table,h="",X=0,J=0,ct=0,Et=2,_t=1,de=a.slice.call(arguments,1),v=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(v.setInput(c,tt.yy),tt.yy.lexer=v,tt.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var It=v.yylloc;a.push(It);var ue=v.options&&v.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function fe(U){n.length=n.length-2*U,_.length=_.length-U,a.length=a.length-U}t(fe,"popStack");function Mt(){var U=k.pop()||v.lex()||_t;if(typeof U!=="number"){if(U instanceof Array)k=U,U=k.pop();U=p.symbols_[U]||U}return U}t(Mt,"lex");var F,Nt,et,j,Qe,Ot,nt={},vt,q,Wt,Dt;while(!0){if(et=n[n.length-1],this.defaultActions[et])j=this.defaultActions[et];else{if(F===null||typeof F>"u")F=Mt();j=at[et]&&at[et][F]}if(typeof j>"u"||!j.length||!j[0]){var Rt="";Dt=[];for(vt in at[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(v.showPosition)Rt="Parse error on line "+(X+1)+`:
2
2
  `+v.showPosition()+`
3
3
  Expecting `+Dt.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else Rt="Parse error on line "+(X+1)+": Unexpected "+(F==_t?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(Rt,{text:v.match,token:this.terminals_[F]||F,line:v.yylineno,loc:It,expected:Dt})}if(j[0]instanceof Array&&j.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+F);switch(j[0]){case 1:if(n.push(F),_.push(v.yytext),a.push(v.yylloc),n.push(j[1]),F=null,!Nt){if(J=v.yyleng,h=v.yytext,X=v.yylineno,It=v.yylloc,ct>0)ct--}else F=Nt,Nt=null;break;case 2:if(q=this.productions_[j[1]][1],nt.$=_[_.length-q],nt._$={first_line:a[a.length-(q||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(q||1)].first_column,last_column:a[a.length-1].last_column},ue)nt._$.range=[a[a.length-(q||1)].range[0],a[a.length-1].range[1]];if(Ot=this.performAction.apply(nt,[h,J,X,tt.yy,j[1],_,a].concat(de)),typeof Ot<"u")return Ot;if(q)n=n.slice(0,-1*q*2),_=_.slice(0,-1*q),a=a.slice(0,-1*q);n.push(this.productions_[j[1]][0]),_.push(nt.$),a.push(nt._$),Wt=at[n[n.length-2]][n[n.length-1]],n.push(Wt);break;case 3:return!0}}return!0},"parse")},he=function(){var Q={EOF:1,parseError:t(function(p,n){if(this.yy.parser)this.yy.parser.parseError(p,n);else throw Error(p)},"parseError"),setInput:t(function(c,p){if(this.yy=p||this.yy||{},this._input=c,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 c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var p=c.match(/(?:\r\n?|\n).*/g);if(p)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),c},"input"),unput:t(function(c){var p=c.length,n=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var k=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),n.length-1)this.yylineno-=n.length-1;var _=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:n?(n.length===k.length?this.yylloc.first_column:0)+k[k.length-n.length].length-n[0].length:this.yylloc.first_column-p},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-p];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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(c){this.unput(this.match.slice(c))},"less"),pastInput:t(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var c=this.match;if(c.length<20)c+=this._input.substr(0,20-c.length);return(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var c=this.pastInput(),p=Array(c.length+1).join("-");return c+this.upcomingInput()+`
5
5
  `+p+"^"},"showPosition"),test_match:t(function(c,p){var n,k,_;if(this.options.backtrack_lexer){if(_={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)_.yylloc.range=this.yylloc.range.slice(0)}if(k=c[0].match(/(?:\r\n?|\n).*/g),k)this.yylineno+=k.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,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(c[0].length),this.matched+=c[0],n=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(n)return n;else if(this._backtrack){for(var a in _)this[a]=_[a];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var c,p,n,k;if(!this._more)this.yytext="",this.match="";var _=this._currentRules();for(var a=0;a<_.length;a++)if(n=this._input.match(this.rules[_[a]]),n&&(!p||n[0].length>p[0].length)){if(p=n,k=a,this.options.backtrack_lexer)if(c=this.test_match(n,_[a]),c!==!1)return c;else if(this._backtrack){p=!1;continue}else return!1;else if(!this.options.flex)break}if(p){if(c=this.test_match(p,_[k]),c!==!1)return c;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 p=this.next();if(p)return p;else return this.lex()},"lex"),begin:t(function(p){this.conditionStack.push(p)},"begin"),popState:t(function(){var p=this.conditionStack.length-1;if(p>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(p){if(p=this.conditionStack.length-1-Math.abs(p||0),p>=0)return this.conditionStack[p];else return"INITIAL"},"topState"),pushState:t(function(p){this.begin(p)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(p,n,k,_){function a(){let h=n.yytext.indexOf("%%");if(h===0)return!1;if(h>0){let X=n.yytext.slice(0,h),J=n.yytext.slice(h);if(J)p.lexer.unput(J);n.yytext=X}return!0}t(a,"processId");var at=_;switch(k){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!a())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+n.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!a())return;return this.popState(),"ID";break;case 66:if(!a())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;break;case 68:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!a())return;return 24;case 74:return n.yytext=n.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return Q}();Lt.lexer=he;function Tt(){this.yy={}}return t(Tt,"Parser"),Tt.prototype=Lt,Lt.Parser=Tt,new Tt}();Pt.parser=Pt;var pe=Pt,Se="TB",Jt="TB",jt="dir",lt="state",ot="root",Bt="relation",ge="classDef",ye="style",me="applyClass",ft="default",qt="divider",Qt="fill:none",Zt="fill: #333",te="c",ee="markdown",se="normal",$t="rect",Ft="rectWithTitle",be="stateStart",ke="stateEnd",Gt="divider",Ut="roundedWithTitle",_e="note",ve="noteGroup",pt="statediagram",De="state",Ce=`${pt}-${De}`,re="transition",Ae="note",xe="note-edge",Le=`${re} ${xe}`,we=`${pt}-${Ae}`,Ie="cluster",Ne=`${pt}-${Ie}`,Oe="cluster-alt",$e=`${pt}-${Oe}`,ie="parent",ae="note",Fe="state",Yt="----",Pe=`${Yt}${ae}`,Ht=`${Yt}${ie}`,At=new Map,Z=0,ne=0,ht=new Map,Be=t((e,s,l,r)=>{if(e===Gt&&l?.id!==void 0&&ht.has(l.id)){let y=ht.get(l.id);return ht.set(s,y),y}let u=ne++,f=r?void 0:u;return ht.set(s,f),f},"colorSlotFor");function xt(e="",s=0,l="",r=Yt){let u=l!==null&&l.length>0?`${r}${l}`:"";return`${Fe}-${e}${u}-${s}`}t(xt,"stateDomId");var Ge=t((e,s,l,r,u,f,y,m)=>{i.trace("items",s),s.forEach((o)=>{switch(o.stmt){case lt:ut(e,o,l,r,u,f,y,m);break;case ft:ut(e,o,l,r,u,f,y,m);break;case Bt:{ut(e,o.state1,l,r,u,f,y,m),ut(e,o.state2,l,r,u,f,y,m);let T=y==="neo",E={id:"edge"+Z,start:o.state1.id,end:o.state2.id,arrowhead:"normal",arrowTypeEnd:T?"arrow_barb_neo":"arrow_barb",style:Qt,labelStyle:"",label:C.sanitizeText(o.description??"",d()),arrowheadStyle:Zt,labelpos:te,labelType:ee,thickness:se,classes:re,look:y};u.push(E),Z++}break}})},"setupDoc"),zt=t((e,s=Jt)=>{let l=s;if(e.doc){for(let r of e.doc)if(r.stmt==="dir")l=r.value}return l},"getDir");function dt(e,s,l){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((u)=>{let f=l.get(u);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=e.find((u)=>u.id===s.id);if(r)Object.assign(r,s);else e.push(s)}t(dt,"insertOrUpdateNode");function oe(e){return e?.classes?.join(" ")??""}t(oe,"getClassesFromDbInfo");function le(e){return e?.styles??[]}t(le,"getStylesFromDbInfo");var ut=t((e,s,l,r,u,f,y,m)=>{let o=s.id,T=l.get(o),E=oe(T),G=le(T),Y=d(),W=E.trim()!==""||G.length>0;if(i.info("dataFetcher parsedItem",s,T,G),o!=="root"){let x=$t;if(s.start===!0)x=be;else if(s.start===!1)x=ke;if(s.type!==ft)x=s.type;if(!At.get(o))At.set(o,{id:o,shape:x,description:C.sanitizeText(o,Y),cssClasses:`${E} ${Ce}`,cssStyles:G});let S=At.get(o);if(s.description){if(Array.isArray(S.description))S.shape=Ft,S.description.push(s.description);else if(S.description?.length&&S.description.length>0)if(S.shape=Ft,S.description===o)S.description=[s.description];else S.description=[S.description,s.description];else S.shape=$t,S.description=s.description;S.description=C.sanitizeTextOrArray(S.description,Y)}if(S.description?.length===1&&S.shape===Ft)if(S.type==="group")S.shape=Ut;else S.shape=$t;if(!S.type&&s.doc)i.info("Setting cluster for XCX",o,zt(s)),S.type="group",S.isGroup=!0,S.dir=zt(s),S.shape=s.type===qt?Gt:Ut,S.colorIndex=Be(S.shape,o,e,W),S.cssClasses=`${S.cssClasses} ${Ne} ${f?$e:""}`;let V={labelStyle:"",shape:S.shape,label:S.description,cssClasses:S.cssClasses,cssCompiledStyles:[],cssStyles:S.cssStyles,id:o,dir:S.dir,domId:xt(o,Z),type:S.type,isGroup:S.type==="group",colorIndex:S.colorIndex,padding:8,rx:10,ry:10,look:y,labelType:"markdown"};if(V.shape===Gt)V.label="";if(e&&e.id!=="root")i.trace("Setting node ",o," to be child of its parent ",e.id),V.parentId=e.id;if(V.centerLabel=!0,s.note){let w={labelStyle:"",shape:_e,label:s.note.text,labelType:"markdown",cssClasses:we,cssStyles:[],cssCompiledStyles:[],id:o+Pe+"-"+Z,domId:xt(o,Z,ae),type:"node",isGroup:!1,padding:Y.flowchart?.padding,look:y,position:s.note.position},z=o+Ht,M={labelStyle:"",shape:ve,label:s.note.text,cssClasses:S.cssClasses,cssStyles:[],id:o+Ht,domId:xt(o,Z,ie),type:"group",isGroup:!0,padding:16,look:y,position:s.note.position};Z++,M.id=z,w.parentId=z,dt(r,M,m),dt(r,w,m),dt(r,V,m);let K=o,A=w.id;if(s.note.position==="left of")K=w.id,A=o;u.push({id:K+"-"+A,start:K,end:A,arrowhead:"none",arrowTypeEnd:"",style:Qt,labelStyle:"",classes:Le,pattern:"dashed",arrowheadStyle:Zt,labelpos:te,labelType:ee,thickness:se,look:y})}else dt(r,V,m)}if(s.doc)i.trace("Adding nodes children "),Ge(s,s.doc,l,r,u,!f,y,m)},"dataFetcher"),Ye=t(()=>{At.clear(),Z=0,ne=0,ht.clear()},"reset"),ce=t((e,s=Jt)=>{if(!e.doc)return s;let l=s;for(let r of e.doc)if(r.stmt==="dir")l=r.value;return l},"getDir"),Ve=t(function(e,s){return s.db.getClasses()},"getClasses"),We=t(async function(e,s,l,r){i.info("REF0:"),i.info("Drawing state diagram (v2)",s);let{securityLevel:u,state:f,layout:y}=d();r.db.extract(r.db.getRootDocV2());let m=r.db.getData(),o=ze(s,u);if(m.type=r.type,m.layoutAlgorithm=Ue(y),m.nodeSpacing=f?.nodeSpacing||50,m.rankSpacing=f?.rankSpacing||50,d().look==="neo")m.markers=["barbNeo"];else m.markers=["barb"];m.diagramId=s,await He(m,o);let E=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((Y,W)=>{let x=typeof W==="string"?W:typeof W?.id==="string"?W.id:"",S=m.nodes.find((A)=>A.id===x);if(!x){i.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(W));return}let V=o.node()?.querySelectorAll("g.node, g.rough-node"),w;if(V?.forEach((A)=>{let rt=A.textContent?.trim();if(A.id===S?.domId||rt===x)w=A}),!w){i.warn("⚠️ Could not find node matching text:",x);return}let z=w.parentNode;if(!z){i.warn("⚠️ Node has no parent, cannot wrap:",x);return}let M=document.createElementNS("http://www.w3.org/2000/svg","a"),K=Y.url.replace(/^"+|"+$/g,"");if(M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",K),M.setAttribute("target","_blank"),Y.tooltip){let A=Y.tooltip.replace(/^"+|"+$/g,"");M.setAttribute("title",A),w.setAttribute("title",A)}z.replaceChild(M,w),M.appendChild(w),i.info("\uD83D\uDD17 Wrapped node in <a> tag for:",x,Y.url)})}catch(G){i.error("❌ Error injecting clickable links:",G)}H.insertTitle(o,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),Me(o,E,pt,f?.useMaxWidth??!0)},"draw"),je={getClasses:Ve,draw:We,getDir:ce},B={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Kt=t(()=>new Map,"newClassesList"),Xt=t(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Ct=t((e)=>JSON.parse(JSON.stringify(e)),"clone"),Ke=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Kt(),this.documents={root:Xt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=R,this.setAccTitle=N,this.getAccDescription=I,this.setAccDescription=P,this.setDiagramTitle=O,this.getDiagramTitle=D,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{t(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let r of Array.isArray(e)?e:e.doc)switch(r.stmt){case lt:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Bt:this.addRelation(r.state1,r.state2,r.description);break;case ge:this.addStyleClass(r.id.trim(),r.classes);break;case ye:this.handleStyleDef(r);break;case me:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),l=d();Ye(),ut(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,l.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){let s=e.id.trim().split(","),l=e.styleClass.split(",");for(let r of s){let u=this.getState(r);if(!u){let f=r.trim();this.addState(f),u=this.getState(f)}if(u)u.styles=l.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(e){if(i.info("Setting root doc",e),this.rootDoc=e,this.version===1)this.extract(e);else this.extract(this.getRootDocV2())}docTranslator(e,s,l){if(s.stmt===Bt){this.docTranslator(e,s.state1,!0),this.docTranslator(e,s.state2,!1);return}if(s.stmt===lt)if(s.id===B.START_NODE)s.id=e.id+(l?"_start":"_end"),s.start=l;else s.id=s.id.trim();if(s.stmt!==ot&&s.stmt!==lt||!s.doc)return;let r=[],u=[];for(let f of s.doc)if(f.type===qt){let y=Ct(f);y.doc=Ct(u),r.push(y),u=[]}else u.push(f);if(r.length>0&&u.length>0){let f={stmt:lt,id:Zs(),type:"divider",doc:Ct(u)};r.push(Ct(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:ot,stmt:ot},{id:ot,stmt:ot,doc:this.rootDoc},!0),{id:ot,doc:this.rootDoc}}addState(e,s=ft,l=void 0,r=void 0,u=void 0,f=void 0,y=void 0,m=void 0){let o=e?.trim();if(!this.currentDocument.states.has(o))i.info("Adding state ",o,r),this.currentDocument.states.set(o,{stmt:lt,id:o,descriptions:[],type:s,doc:l,note:u,classes:[],styles:[],textStyles:[]});else{let T=this.currentDocument.states.get(o);if(!T)throw Error(`State not found: ${o}`);if(!T.doc)T.doc=l;if(!T.type)T.type=s}if(r)i.info("Setting state description",o,r),(Array.isArray(r)?r:[r]).forEach((E)=>this.addDescription(o,E.trim()));if(u){let T=this.currentDocument.states.get(o);if(!T)throw Error(`State not found: ${o}`);T.note=u,T.note.text=C.sanitizeText(T.note.text,d())}if(f)i.info("Setting state classes",o,f),(Array.isArray(f)?f:[f]).forEach((E)=>this.setCssClass(o,E.trim()));if(y)i.info("Setting state styles",o,y),(Array.isArray(y)?y:[y]).forEach((E)=>this.setStyle(o,E.trim()));if(m)i.info("Setting state styles",o,y),(Array.isArray(m)?m:[m]).forEach((E)=>this.setTextStyle(o,E.trim()))}clear(e){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Xt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Kt(),!e)this.links=new Map,L()}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){i.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,s,l){this.links.set(e,{url:s,tooltip:l}),i.warn("Adding link",e,s,l)}getLinks(){return this.links}startIdIfNeeded(e=""){if(e===B.START_NODE)return this.startEndCount++,`${B.START_TYPE}${this.startEndCount}`;return e}startTypeIfNeeded(e="",s=ft){return e===B.START_NODE?B.START_TYPE:s}endIdIfNeeded(e=""){if(e===B.END_NODE)return this.startEndCount++,`${B.END_TYPE}${this.startEndCount}`;return e}endTypeIfNeeded(e="",s=ft){return e===B.END_NODE?B.END_TYPE:s}addRelationObjs(e,s,l=""){let r=this.startIdIfNeeded(e.id.trim()),u=this.startTypeIfNeeded(e.id.trim(),e.type),f=this.startIdIfNeeded(s.id.trim()),y=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,u,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(f,y,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:C.sanitizeText(l,d())})}addRelation(e,s,l){if(typeof e==="object"&&typeof s==="object")this.addRelationObjs(e,s,l);else if(typeof e==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(e.trim()),u=this.startTypeIfNeeded(e),f=this.endIdIfNeeded(s.trim()),y=this.endTypeIfNeeded(s);this.addState(r,u),this.addState(f,y),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:l?C.sanitizeText(l,d()):void 0})}}addDescription(e,s){let l=this.currentDocument.states.get(e),r=s.startsWith(":")?s.replace(":","").trim():s;l?.descriptions?.push(C.sanitizeText(r,d()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,s=""){if(!this.classes.has(e))this.classes.set(e,{id:e,styles:[],textStyles:[]});let l=this.classes.get(e);if(s&&l)s.split(B.STYLECLASS_SEP).forEach((r)=>{let u=r.replace(/([^;]*);/,"$1").trim();if(RegExp(B.COLOR_KEYWORD).exec(r)){let y=u.replace(B.FILL_KEYWORD,B.BG_FILL).replace(B.COLOR_KEYWORD,B.FILL_KEYWORD);l.textStyles.push(y)}l.styles.push(u)})}getClasses(){return this.classes}setupToolTips(e){let s=In();g(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(u)=>{let f=g(u.currentTarget),y=f.attr("title");if(y===null)return;let m=u.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+m.left+(m.right-m.left)/2+"px").style("top",window.scrollY+m.bottom+"px"),s.html(st.sanitize(y)),f.classed("hover",!0)}).on("mouseout",(u)=>{s.transition().duration(500).style("opacity",0),g(u.currentTarget).classed("hover",!1)})}setCssClass(e,s){e.split(",").forEach((l)=>{let r=this.getState(l);if(!r){let u=l.trim();this.addState(u),r=this.getState(u)}r?.classes?.push(s)})}setStyle(e,s){this.getState(e)?.styles?.push(s)}setTextStyle(e,s){this.getState(e)?.textStyles?.push(s)}bindFunctions(e){this.funs.forEach((s)=>{s(e)})}getDirectionStatement(){return this.rootDoc.find((e)=>e.stmt===jt)}getDirection(){return this.getDirectionStatement()?.value??Se}setDirection(e){let s=this.getDirectionStatement();if(s)s.value=e;else this.rootDoc.unshift({stmt:jt,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=d();for(let s of this.nodes)if(s.wrappingWidth??=e.state?.wrappingWidth,!s.isGroup)s.minWidth??=e.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:ce(this.getRootDocV2())}}getConfig(){return d().state}},Xe=t((e)=>{let{theme:s,bkgColorArray:l,borderColorArray:r}=e;if(!Te(s,r))return"";let u=Ee(e.look),f=Re(l),y="";for(let m=0;m<un(r);m++){let o=r[m],T=f?`fill: ${l[m%l.length]};`:"",E=`[data-look="${u}"][data-color-id="color-${m}"]`;y+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var p=this.next();if(p)return p;else return this.lex()},"lex"),begin:t(function(p){this.conditionStack.push(p)},"begin"),popState:t(function(){var p=this.conditionStack.length-1;if(p>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(p){if(p=this.conditionStack.length-1-Math.abs(p||0),p>=0)return this.conditionStack[p];else return"INITIAL"},"topState"),pushState:t(function(p){this.begin(p)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(p,n,k,_){function a(){let h=n.yytext.indexOf("%%");if(h===0)return!1;if(h>0){let X=n.yytext.slice(0,h),J=n.yytext.slice(h);if(J)p.lexer.unput(J);n.yytext=X}return!0}t(a,"processId");var at=_;switch(k){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!a())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+n.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!a())return;return this.popState(),"ID";break;case 66:if(!a())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;break;case 68:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!a())return;return 24;case 74:return n.yytext=n.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return Q}();Lt.lexer=he;function Tt(){this.yy={}}return t(Tt,"Parser"),Tt.prototype=Lt,Lt.Parser=Tt,new Tt}();Pt.parser=Pt;var pe=Pt,Se="TB",Jt="TB",jt="dir",lt="state",ot="root",Bt="relation",ge="classDef",ye="style",me="applyClass",ft="default",qt="divider",Qt="fill:none",Zt="fill: #333",te="c",ee="markdown",se="normal",$t="rect",Ft="rectWithTitle",be="stateStart",ke="stateEnd",Gt="divider",Ut="roundedWithTitle",Te="note",Ee="noteGroup",pt="statediagram",_e="state",ve=`${pt}-${_e}`,re="transition",Ce="note",Ae="note-edge",xe=`${re} ${Ae}`,Le=`${pt}-${Ce}`,we="cluster",Ie=`${pt}-${we}`,Oe="cluster-alt",$e=`${pt}-${Oe}`,ie="parent",ae="note",Fe="state",Yt="----",Pe=`${Yt}${ae}`,Ht=`${Yt}${ie}`,At=new Map,Z=0,ne=0,ht=new Map,Be=t((e,s,l,r)=>{if(e===Gt&&l?.id!==void 0&&ht.has(l.id)){let y=ht.get(l.id);return ht.set(s,y),y}let u=ne++,f=r?void 0:u;return ht.set(s,f),f},"colorSlotFor");function xt(e="",s=0,l="",r=Yt){let u=l!==null&&l.length>0?`${r}${l}`:"";return`${Fe}-${e}${u}-${s}`}t(xt,"stateDomId");var Ge=t((e,s,l,r,u,f,y,m)=>{i.trace("items",s),s.forEach((o)=>{switch(o.stmt){case lt:ut(e,o,l,r,u,f,y,m);break;case ft:ut(e,o,l,r,u,f,y,m);break;case Bt:{ut(e,o.state1,l,r,u,f,y,m),ut(e,o.state2,l,r,u,f,y,m);let T=y==="neo",E={id:"edge"+Z,start:o.state1.id,end:o.state2.id,arrowhead:"normal",arrowTypeEnd:T?"arrow_barb_neo":"arrow_barb",style:Qt,labelStyle:"",label:C.sanitizeText(o.description??"",d()),arrowheadStyle:Zt,labelpos:te,labelType:ee,thickness:se,classes:re,look:y};u.push(E),Z++}break}})},"setupDoc"),zt=t((e,s=Jt)=>{let l=s;if(e.doc){for(let r of e.doc)if(r.stmt==="dir")l=r.value}return l},"getDir");function dt(e,s,l){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((u)=>{let f=l.get(u);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=e.find((u)=>u.id===s.id);if(r)Object.assign(r,s);else e.push(s)}t(dt,"insertOrUpdateNode");function oe(e){return e?.classes?.join(" ")??""}t(oe,"getClassesFromDbInfo");function le(e){return e?.styles??[]}t(le,"getStylesFromDbInfo");var ut=t((e,s,l,r,u,f,y,m)=>{let o=s.id,T=l.get(o),E=oe(T),G=le(T),Y=d(),W=E.trim()!==""||G.length>0;if(i.info("dataFetcher parsedItem",s,T,G),o!=="root"){let x=$t;if(s.start===!0)x=be;else if(s.start===!1)x=ke;if(s.type!==ft)x=s.type;if(!At.get(o))At.set(o,{id:o,shape:x,description:C.sanitizeText(o,Y),cssClasses:`${E} ${ve}`,cssStyles:G});let S=At.get(o);if(s.description){if(Array.isArray(S.description))S.shape=Ft,S.description.push(s.description);else if(S.description?.length&&S.description.length>0)if(S.shape=Ft,S.description===o)S.description=[s.description];else S.description=[S.description,s.description];else S.shape=$t,S.description=s.description;S.description=C.sanitizeTextOrArray(S.description,Y)}if(S.description?.length===1&&S.shape===Ft)if(S.type==="group")S.shape=Ut;else S.shape=$t;if(!S.type&&s.doc)i.info("Setting cluster for XCX",o,zt(s)),S.type="group",S.isGroup=!0,S.dir=zt(s),S.shape=s.type===qt?Gt:Ut,S.colorIndex=Be(S.shape,o,e,W),S.cssClasses=`${S.cssClasses} ${Ie} ${f?$e:""}`;let V={labelStyle:"",shape:S.shape,label:S.description,cssClasses:S.cssClasses,cssCompiledStyles:[],cssStyles:S.cssStyles,id:o,dir:S.dir,domId:xt(o,Z),type:S.type,isGroup:S.type==="group",colorIndex:S.colorIndex,padding:8,rx:10,ry:10,look:y,labelType:"markdown"};if(V.shape===Gt)V.label="";if(e&&e.id!=="root")i.trace("Setting node ",o," to be child of its parent ",e.id),V.parentId=e.id;if(V.centerLabel=!0,s.note){let w={labelStyle:"",shape:Te,label:s.note.text,labelType:"markdown",cssClasses:Le,cssStyles:[],cssCompiledStyles:[],id:o+Pe+"-"+Z,domId:xt(o,Z,ae),type:"node",isGroup:!1,padding:Y.flowchart?.padding,look:y,position:s.note.position},z=o+Ht,M={labelStyle:"",shape:Ee,label:s.note.text,cssClasses:S.cssClasses,cssStyles:[],id:o+Ht,domId:xt(o,Z,ie),type:"group",isGroup:!0,padding:16,look:y,position:s.note.position};Z++,M.id=z,w.parentId=z,dt(r,M,m),dt(r,w,m),dt(r,V,m);let K=o,A=w.id;if(s.note.position==="left of")K=w.id,A=o;u.push({id:K+"-"+A,start:K,end:A,arrowhead:"none",arrowTypeEnd:"",style:Qt,labelStyle:"",classes:xe,pattern:"dashed",arrowheadStyle:Zt,labelpos:te,labelType:ee,thickness:se,look:y})}else dt(r,V,m)}if(s.doc)i.trace("Adding nodes children "),Ge(s,s.doc,l,r,u,!f,y,m)},"dataFetcher"),Ye=t(()=>{At.clear(),Z=0,ne=0,ht.clear()},"reset"),ce=t((e,s=Jt)=>{if(!e.doc)return s;let l=s;for(let r of e.doc)if(r.stmt==="dir")l=r.value;return l},"getDir"),Ve=t(function(e,s){return s.db.getClasses()},"getClasses"),We=t(async function(e,s,l,r){i.info("REF0:"),i.info("Drawing state diagram (v2)",s);let{securityLevel:u,state:f,layout:y}=d();r.db.extract(r.db.getRootDocV2());let m=r.db.getData(),o=ze(s,u);if(m.type=r.type,m.layoutAlgorithm=Ue(y),m.nodeSpacing=f?.nodeSpacing||50,m.rankSpacing=f?.rankSpacing||50,d().look==="neo")m.markers=["barbNeo"];else m.markers=["barb"];m.diagramId=s,await He(m,o);let E=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((Y,W)=>{let x=typeof W==="string"?W:typeof W?.id==="string"?W.id:"",S=m.nodes.find((A)=>A.id===x);if(!x){i.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(W));return}let V=o.node()?.querySelectorAll("g.node, g.rough-node"),w;if(V?.forEach((A)=>{let rt=A.textContent?.trim();if(A.id===S?.domId||rt===x)w=A}),!w){i.warn("⚠️ Could not find node matching text:",x);return}let z=w.parentNode;if(!z){i.warn("⚠️ Node has no parent, cannot wrap:",x);return}let M=document.createElementNS("http://www.w3.org/2000/svg","a"),K=Y.url.replace(/^"+|"+$/g,"");if(M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",K),M.setAttribute("target","_blank"),Y.tooltip){let A=Y.tooltip.replace(/^"+|"+$/g,"");M.setAttribute("title",A),w.setAttribute("title",A)}z.replaceChild(M,w),M.appendChild(w),i.info("\uD83D\uDD17 Wrapped node in <a> tag for:",x,Y.url)})}catch(G){i.error("❌ Error injecting clickable links:",G)}H.insertTitle(o,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),Re(o,E,pt,f?.useMaxWidth??!0)},"draw"),je={getClasses:Ve,draw:We,getDir:ce},B={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Kt=t(()=>new Map,"newClassesList"),Xt=t(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Ct=t((e)=>JSON.parse(JSON.stringify(e)),"clone"),Ke=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Kt(),this.documents={root:Xt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=R,this.setAccTitle=N,this.getAccDescription=I,this.setAccDescription=P,this.setDiagramTitle=O,this.getDiagramTitle=D,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{t(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let r of Array.isArray(e)?e:e.doc)switch(r.stmt){case lt:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Bt:this.addRelation(r.state1,r.state2,r.description);break;case ge:this.addStyleClass(r.id.trim(),r.classes);break;case ye:this.handleStyleDef(r);break;case me:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),l=d();Ye(),ut(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,l.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){let s=e.id.trim().split(","),l=e.styleClass.split(",");for(let r of s){let u=this.getState(r);if(!u){let f=r.trim();this.addState(f),u=this.getState(f)}if(u)u.styles=l.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(e){if(i.info("Setting root doc",e),this.rootDoc=e,this.version===1)this.extract(e);else this.extract(this.getRootDocV2())}docTranslator(e,s,l){if(s.stmt===Bt){this.docTranslator(e,s.state1,!0),this.docTranslator(e,s.state2,!1);return}if(s.stmt===lt)if(s.id===B.START_NODE)s.id=e.id+(l?"_start":"_end"),s.start=l;else s.id=s.id.trim();if(s.stmt!==ot&&s.stmt!==lt||!s.doc)return;let r=[],u=[];for(let f of s.doc)if(f.type===qt){let y=Ct(f);y.doc=Ct(u),r.push(y),u=[]}else u.push(f);if(r.length>0&&u.length>0){let f={stmt:lt,id:Zs(),type:"divider",doc:Ct(u)};r.push(Ct(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:ot,stmt:ot},{id:ot,stmt:ot,doc:this.rootDoc},!0),{id:ot,doc:this.rootDoc}}addState(e,s=ft,l=void 0,r=void 0,u=void 0,f=void 0,y=void 0,m=void 0){let o=e?.trim();if(!this.currentDocument.states.has(o))i.info("Adding state ",o,r),this.currentDocument.states.set(o,{stmt:lt,id:o,descriptions:[],type:s,doc:l,note:u,classes:[],styles:[],textStyles:[]});else{let T=this.currentDocument.states.get(o);if(!T)throw Error(`State not found: ${o}`);if(!T.doc)T.doc=l;if(!T.type)T.type=s}if(r)i.info("Setting state description",o,r),(Array.isArray(r)?r:[r]).forEach((E)=>this.addDescription(o,E.trim()));if(u){let T=this.currentDocument.states.get(o);if(!T)throw Error(`State not found: ${o}`);T.note=u,T.note.text=C.sanitizeText(T.note.text,d())}if(f)i.info("Setting state classes",o,f),(Array.isArray(f)?f:[f]).forEach((E)=>this.setCssClass(o,E.trim()));if(y)i.info("Setting state styles",o,y),(Array.isArray(y)?y:[y]).forEach((E)=>this.setStyle(o,E.trim()));if(m)i.info("Setting state styles",o,y),(Array.isArray(m)?m:[m]).forEach((E)=>this.setTextStyle(o,E.trim()))}clear(e){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Xt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Kt(),!e)this.links=new Map,L()}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){i.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,s,l){this.links.set(e,{url:s,tooltip:l}),i.warn("Adding link",e,s,l)}getLinks(){return this.links}startIdIfNeeded(e=""){if(e===B.START_NODE)return this.startEndCount++,`${B.START_TYPE}${this.startEndCount}`;return e}startTypeIfNeeded(e="",s=ft){return e===B.START_NODE?B.START_TYPE:s}endIdIfNeeded(e=""){if(e===B.END_NODE)return this.startEndCount++,`${B.END_TYPE}${this.startEndCount}`;return e}endTypeIfNeeded(e="",s=ft){return e===B.END_NODE?B.END_TYPE:s}addRelationObjs(e,s,l=""){let r=this.startIdIfNeeded(e.id.trim()),u=this.startTypeIfNeeded(e.id.trim(),e.type),f=this.startIdIfNeeded(s.id.trim()),y=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,u,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(f,y,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:C.sanitizeText(l,d())})}addRelation(e,s,l){if(typeof e==="object"&&typeof s==="object")this.addRelationObjs(e,s,l);else if(typeof e==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(e.trim()),u=this.startTypeIfNeeded(e),f=this.endIdIfNeeded(s.trim()),y=this.endTypeIfNeeded(s);this.addState(r,u),this.addState(f,y),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:l?C.sanitizeText(l,d()):void 0})}}addDescription(e,s){let l=this.currentDocument.states.get(e),r=s.startsWith(":")?s.replace(":","").trim():s;l?.descriptions?.push(C.sanitizeText(r,d()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,s=""){if(!this.classes.has(e))this.classes.set(e,{id:e,styles:[],textStyles:[]});let l=this.classes.get(e);if(s&&l)s.split(B.STYLECLASS_SEP).forEach((r)=>{let u=r.replace(/([^;]*);/,"$1").trim();if(RegExp(B.COLOR_KEYWORD).exec(r)){let y=u.replace(B.FILL_KEYWORD,B.BG_FILL).replace(B.COLOR_KEYWORD,B.FILL_KEYWORD);l.textStyles.push(y)}l.styles.push(u)})}getClasses(){return this.classes}setupToolTips(e){let s=In();g(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(u)=>{let f=g(u.currentTarget),y=f.attr("title");if(y===null)return;let m=u.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+m.left+(m.right-m.left)/2+"px").style("top",window.scrollY+m.bottom+"px"),s.html(st.sanitize(y)),f.classed("hover",!0)}).on("mouseout",(u)=>{s.transition().duration(500).style("opacity",0),g(u.currentTarget).classed("hover",!1)})}setCssClass(e,s){e.split(",").forEach((l)=>{let r=this.getState(l);if(!r){let u=l.trim();this.addState(u),r=this.getState(u)}r?.classes?.push(s)})}setStyle(e,s){this.getState(e)?.styles?.push(s)}setTextStyle(e,s){this.getState(e)?.textStyles?.push(s)}bindFunctions(e){this.funs.forEach((s)=>{s(e)})}getDirectionStatement(){return this.rootDoc.find((e)=>e.stmt===jt)}getDirection(){return this.getDirectionStatement()?.value??Se}setDirection(e){let s=this.getDirectionStatement();if(s)s.value=e;else this.rootDoc.unshift({stmt:jt,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=d();for(let s of this.nodes)if(s.wrappingWidth??=e.state?.wrappingWidth,!s.isGroup)s.minWidth??=e.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:ce(this.getRootDocV2())}}getConfig(){return d().state}},Xe=t((e)=>{let{theme:s,bkgColorArray:l,borderColorArray:r}=e;if(!Ne(s,r))return"";let u=Me(e.look),f=De(l),y="";for(let m=0;m<un(r);m++){let o=r[m],T=f?`fill: ${l[m%l.length]};`:"",E=`[data-look="${u}"][data-color-id="color-${m}"]`;y+=`
7
7
 
8
8
  /* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
9
9
  the body, so what stays visible of \`outer\` is the band behind the label. */
Binary file
Binary file
@@ -1 +1 @@
1
- import{b,s,ee,o,a,m,e,n,y,pr,fa,mt,Gr,rt,_r,ke,me,Bi,Fc,Fi}from"./chunk-xw8tzrmm.js";function le(d){let{Button:h,confirm:L,PageLayout:x,Switch:_,cn:F,style:z}=y(),{connection:f,onOpen:O}=d,[D,p]=a([]),[w,H]=a([]),[q,J]=a([]),[I,T]=a(),[B,U]=a([]),[A,V]=a(!0),[k,N]=a(),[C,R]=a(),[W,P]=a(!1),[G,c]=a({}),i=o(0),E=b(async()=>{let t=++i.current;try{let[r,l,u,g]=await Promise.all([f.request("/api/automations"),f.request("/api/projects").catch(()=>[]),f.request("/api/info").catch(()=>{return}),f.request("/api/models").catch(()=>({models:[]}))]),Z=[...new Set(r.flatMap((v)=>v.lastSessionID?[v.lastSessionID]:[]))],te=(await Promise.all(Z.map(async(v)=>f.request(`/api/sessions/${encodeURIComponent(v)}`).catch((j)=>{if(j instanceof Error&&"status"in j&&j.status===404)return;throw j})))).filter((v)=>v!==void 0);if(t!==i.current)return;if(p(r.sort((v,j)=>v.created-j.created)),H(l),J(te),T(u),g?.models)U(g.models.map((v)=>v.id));N(void 0)}catch(r){if(t===i.current)N(r instanceof Error?r.message:"加载失败")}finally{if(t===i.current)V(!1)}},[f]);s(()=>(E(),()=>{i.current++}),[E]);let S=(t)=>{R(t),P(!0)},Q=async(t)=>{c((r)=>({...r,[t.id]:!0}));try{let r=await f.request(`/api/automations/${t.id}/run`,{method:"POST"});O(r.id)}catch(r){N(r instanceof Error?r.message:"运行失败")}finally{c((r)=>({...r,[t.id]:!1}))}},X=async(t)=>{if(!await L({title:`删除自动化「${t.name}」?`,description:"已经跑出来的会话会保留。",action:"删除",danger:!0}))return;try{await f.request(`/api/automations/${t.id}`,{method:"DELETE"}),p((l)=>l.filter((u)=>u.id!==t.id))}catch(l){N(l instanceof Error?l.message:"删除失败")}},Y=async(t,r)=>{try{let l=await f.request(`/api/automations/${t.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:r})});p((u)=>u.map((g)=>g.id===t.id?l:g))}catch(l){N(l instanceof Error?l.message:"状态切换失败")}};return n(x,{title:"自动化",description:n(m,{children:["到点自动开一个新会话执行提示词,跑完的结果在会话里查看。",I?.timezone&&n("span",{className:"text-faint",children:["按服务器时区 ",I.timezone,"。"]})]}),actions:n(h,{variant:"primary",onClick:()=>S(null),children:[e(ke,{className:"size-4"}),"新建"]}),children:[k&&e("div",{className:"mb-4 rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),A?e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在加载自动化…"}):D.length===0?n("div",{className:z("surface.emptyDashed","animate-fade"),children:[e("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:e(pr,{className:"size-5"})}),n("div",{children:[e("p",{className:"text-[15px] font-medium",children:"还没有自动化"}),e("p",{className:"mt-1 text-sm text-dim",children:"比如「每个工作日 9 点总结昨天的提交」。"})]}),n(h,{size:"sm",onClick:()=>S(null),className:"mt-1",children:[e(ke,{className:"size-3.5"}),"新建自动化"]})]}):e("ul",{className:"flex animate-fade flex-col gap-3",children:D.map((t)=>{let r=t.projectID?w.find((g)=>g.id===t.projectID):void 0,l=t.lastSessionID?q.find((g)=>g.id===t.lastSessionID):void 0,u=Boolean(G[t.id]);return e("li",{children:n("article",{className:z("surface.card","group p-4 transition-[border-color,box-shadow] duration-200 hover:border-line-strong hover:shadow-composer"),children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:F("min-w-0 flex-1 transition-opacity duration-200",!t.enabled&&"opacity-55"),children:[e("h2",{className:"truncate text-[15px] font-medium",children:t.name}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3.5 gap-y-1 text-[13px] text-dim",children:[n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[e(pr,{}),Fc(t.schedule)]}),n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[r?e(mt,{}):e(Gr,{}),r?r.name:"聊天"]}),t.enabled&&t.nextRun!==null&&n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[e(fa,{}),"下次 ",Fi(t.nextRun)]})]})]}),e(_,{checked:t.enabled,label:t.enabled?"停用":"启用",onCheckedChange:(g)=>Y(t,g),className:"mt-0.5"})]}),e("p",{className:F("mt-3 line-clamp-2 text-sm leading-6 whitespace-pre-wrap text-faint transition-opacity duration-200",!t.enabled&&"opacity-55"),children:t.prompt}),n("div",{className:"mt-3 -mb-1 flex items-center gap-1",children:[n(h,{size:"sm",onClick:()=>Q(t),disabled:u,children:[e(_r,{className:"size-3.5"}),u?"正在启动…":"立即运行"]}),n(h,{size:"sm",variant:"ghost",onClick:()=>S(t),children:[e(rt,{className:"size-3.5"}),"编辑"]}),n(h,{size:"sm",variant:"danger-ghost",onClick:()=>X(t),children:[e(me,{className:"size-3.5"}),"删除"]}),e("div",{className:"flex-1"}),t.lastRun!==null&&n("button",{type:"button",disabled:!l,onClick:()=>l&&O(l.id),className:"rounded-md px-1.5 py-1 text-[13px] text-faint transition-colors enabled:hover:bg-raised enabled:hover:text-ink",children:["上次运行 ",Fi(t.lastRun),l?.archivedAt!=null?" · 已归档":"",!l?" · 会话已删除":""]})]})]})},t.id)})}),C!==void 0&&e(ne,{open:W,onOpenChange:P,automation:C??void 0,projects:w,models:B,timezone:I?.timezone,onSaved:(t)=>{p((r)=>{let l=r.findIndex((u)=>u.id===t.id);if(l>=0){let u=[...r];return u[l]=t,u}return[...r,t].sort((u,g)=>u.created-g.created)}),P(!1)},connection:f},C?.id??"new")]})}var M="custom",K="chat";function ne(d){let{Button:h,Dialog:L,Field:x,Form:_,FormError:F,Input:z,Select:f,Textarea:O}=y(),D=ee(),p=d.automation,[w,H]=a(p?.name??""),[q,J]=a(p?.prompt??""),[I,T]=a(p?.schedule??Bi[0]?.cron??"0 9 * * *"),[B,U]=a(()=>!Bi.some((c)=>c.cron===I)),[A,V]=a(p?.projectID??K),[k,N]=a(p?.model??""),[C,R]=a(!1),[W,P]=a();async function G(c){c.preventDefault(),R(!0),P(void 0);try{let i=A===K?void 0:A,E={name:w,prompt:q,schedule:I,model:k||void 0},S;if(p)S=await d.connection.request(`/api/automations/${p.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({...E,projectID:i??null})});else S=await d.connection.request("/api/automations",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...E,projectID:i})});d.onSaved(S)}catch(i){P(i instanceof Error?i.message:"保存失败")}finally{R(!1)}}return e(L,{open:d.open,onOpenChange:d.onOpenChange,title:d.automation?"编辑自动化":"新建自动化",size:"lg",footer:n(m,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(h,{onClick:()=>d.onOpenChange(!1),children:"取消"}),e(h,{type:"submit",form:D,variant:"primary",disabled:C,children:C?"正在保存…":d.automation?"保存":"创建"})]}),children:n(_,{id:D,onSubmit:G,children:[e(x,{label:"名称",children:(c)=>e(z,{id:c,autoFocus:!p,required:!0,value:w,onChange:(i)=>H(i.target.value),placeholder:"例如:每日提交总结"})}),e(x,{label:"提示词",hint:"没人盯着运行,写清楚要做什么、结果怎么汇报。",children:(c)=>e(O,{id:c,required:!0,value:q,onChange:(i)=>J(i.target.value),rows:5,placeholder:"总结昨天到现在的 git 提交,按模块分组,列出需要我关注的改动。"})}),n("div",{className:"grid gap-x-3 gap-y-4 sm:grid-cols-2",children:[e(x,{label:"时间",children:(c)=>e(f,{id:c,value:B?M:I,onValueChange:(i)=>{if(U(i===M),i!==M)T(i)},groups:[{options:Bi.map((i)=>({value:i.cron,label:i.label}))},{options:[{value:M,label:"自定义(cron)"}]}]})}),e(x,{label:"在哪里运行",children:(c)=>e(f,{id:c,value:A,onValueChange:V,groups:[{options:[{value:K,label:"聊天",description:"不绑定目录",icon:e(Gr,{})}]},...d.projects.length?[{label:"项目",options:d.projects.map((i)=>({value:i.id,label:i.name,icon:e(mt,{})}))}]:[]]})})]}),B&&e(x,{label:"cron 表达式",hint:`分 时 日 月 周,例如 30 8 * * 1-5 是工作日 8:30。${d.timezone?`按 ${d.timezone} 时间。`:""}`,children:(c)=>e(z,{id:c,required:!0,value:I,onChange:(i)=>T(i.target.value),spellCheck:!1,className:"font-mono"})}),d.models.length>0&&e(x,{label:"模型",children:(c)=>e(f,{id:c,value:k||"default",onValueChange:(i)=>N(i==="default"?"":i),groups:[{options:[{value:"default",label:"默认模型"},...d.models.map((i)=>({value:i,label:i}))]}]})}),e(F,{children:W})]})})}export{le as AutomationsPage};
1
+ import{b,s,ee,o,a,m,e,n,y,pr,fa,mt,Gr,rt,_r,ke,me,Bi,Fc,Fi}from"./chunk-g5b4wjwp.js";function le(d){let{Button:h,confirm:L,PageLayout:x,Switch:_,cn:F,style:z}=y(),{connection:f,onOpen:O}=d,[D,p]=a([]),[w,H]=a([]),[q,J]=a([]),[I,T]=a(),[B,U]=a([]),[A,V]=a(!0),[k,N]=a(),[C,R]=a(),[W,P]=a(!1),[G,c]=a({}),i=o(0),E=b(async()=>{let t=++i.current;try{let[r,l,u,g]=await Promise.all([f.request("/api/automations"),f.request("/api/projects").catch(()=>[]),f.request("/api/info").catch(()=>{return}),f.request("/api/models").catch(()=>({models:[]}))]),Z=[...new Set(r.flatMap((v)=>v.lastSessionID?[v.lastSessionID]:[]))],te=(await Promise.all(Z.map(async(v)=>f.request(`/api/sessions/${encodeURIComponent(v)}`).catch((j)=>{if(j instanceof Error&&"status"in j&&j.status===404)return;throw j})))).filter((v)=>v!==void 0);if(t!==i.current)return;if(p(r.sort((v,j)=>v.created-j.created)),H(l),J(te),T(u),g?.models)U(g.models.map((v)=>v.id));N(void 0)}catch(r){if(t===i.current)N(r instanceof Error?r.message:"加载失败")}finally{if(t===i.current)V(!1)}},[f]);s(()=>(E(),()=>{i.current++}),[E]);let S=(t)=>{R(t),P(!0)},Q=async(t)=>{c((r)=>({...r,[t.id]:!0}));try{let r=await f.request(`/api/automations/${t.id}/run`,{method:"POST"});O(r.id)}catch(r){N(r instanceof Error?r.message:"运行失败")}finally{c((r)=>({...r,[t.id]:!1}))}},X=async(t)=>{if(!await L({title:`删除自动化「${t.name}」?`,description:"已经跑出来的会话会保留。",action:"删除",danger:!0}))return;try{await f.request(`/api/automations/${t.id}`,{method:"DELETE"}),p((l)=>l.filter((u)=>u.id!==t.id))}catch(l){N(l instanceof Error?l.message:"删除失败")}},Y=async(t,r)=>{try{let l=await f.request(`/api/automations/${t.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:r})});p((u)=>u.map((g)=>g.id===t.id?l:g))}catch(l){N(l instanceof Error?l.message:"状态切换失败")}};return n(x,{title:"自动化",description:n(m,{children:["到点自动开一个新会话执行提示词,跑完的结果在会话里查看。",I?.timezone&&n("span",{className:"text-faint",children:["按服务器时区 ",I.timezone,"。"]})]}),actions:n(h,{variant:"primary",onClick:()=>S(null),children:[e(ke,{className:"size-4"}),"新建"]}),children:[k&&e("div",{className:"mb-4 rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),A?e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在加载自动化…"}):D.length===0?n("div",{className:z("surface.emptyDashed","animate-fade"),children:[e("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:e(pr,{className:"size-5"})}),n("div",{children:[e("p",{className:"text-[15px] font-medium",children:"还没有自动化"}),e("p",{className:"mt-1 text-sm text-dim",children:"比如「每个工作日 9 点总结昨天的提交」。"})]}),n(h,{size:"sm",onClick:()=>S(null),className:"mt-1",children:[e(ke,{className:"size-3.5"}),"新建自动化"]})]}):e("ul",{className:"flex animate-fade flex-col gap-3",children:D.map((t)=>{let r=t.projectID?w.find((g)=>g.id===t.projectID):void 0,l=t.lastSessionID?q.find((g)=>g.id===t.lastSessionID):void 0,u=Boolean(G[t.id]);return e("li",{children:n("article",{className:z("surface.card","group p-4 transition-[border-color,box-shadow] duration-200 hover:border-line-strong hover:shadow-composer"),children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:F("min-w-0 flex-1 transition-opacity duration-200",!t.enabled&&"opacity-55"),children:[e("h2",{className:"truncate text-[15px] font-medium",children:t.name}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3.5 gap-y-1 text-[13px] text-dim",children:[n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[e(pr,{}),Fc(t.schedule)]}),n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[r?e(mt,{}):e(Gr,{}),r?r.name:"聊天"]}),t.enabled&&t.nextRun!==null&&n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[e(fa,{}),"下次 ",Fi(t.nextRun)]})]})]}),e(_,{checked:t.enabled,label:t.enabled?"停用":"启用",onCheckedChange:(g)=>Y(t,g),className:"mt-0.5"})]}),e("p",{className:F("mt-3 line-clamp-2 text-sm leading-6 whitespace-pre-wrap text-faint transition-opacity duration-200",!t.enabled&&"opacity-55"),children:t.prompt}),n("div",{className:"mt-3 -mb-1 flex items-center gap-1",children:[n(h,{size:"sm",onClick:()=>Q(t),disabled:u,children:[e(_r,{className:"size-3.5"}),u?"正在启动…":"立即运行"]}),n(h,{size:"sm",variant:"ghost",onClick:()=>S(t),children:[e(rt,{className:"size-3.5"}),"编辑"]}),n(h,{size:"sm",variant:"danger-ghost",onClick:()=>X(t),children:[e(me,{className:"size-3.5"}),"删除"]}),e("div",{className:"flex-1"}),t.lastRun!==null&&n("button",{type:"button",disabled:!l,onClick:()=>l&&O(l.id),className:"rounded-md px-1.5 py-1 text-[13px] text-faint transition-colors enabled:hover:bg-raised enabled:hover:text-ink",children:["上次运行 ",Fi(t.lastRun),l?.archivedAt!=null?" · 已归档":"",!l?" · 会话已删除":""]})]})]})},t.id)})}),C!==void 0&&e(ne,{open:W,onOpenChange:P,automation:C??void 0,projects:w,models:B,timezone:I?.timezone,onSaved:(t)=>{p((r)=>{let l=r.findIndex((u)=>u.id===t.id);if(l>=0){let u=[...r];return u[l]=t,u}return[...r,t].sort((u,g)=>u.created-g.created)}),P(!1)},connection:f},C?.id??"new")]})}var M="custom",K="chat";function ne(d){let{Button:h,Dialog:L,Field:x,Form:_,FormError:F,Input:z,Select:f,Textarea:O}=y(),D=ee(),p=d.automation,[w,H]=a(p?.name??""),[q,J]=a(p?.prompt??""),[I,T]=a(p?.schedule??Bi[0]?.cron??"0 9 * * *"),[B,U]=a(()=>!Bi.some((c)=>c.cron===I)),[A,V]=a(p?.projectID??K),[k,N]=a(p?.model??""),[C,R]=a(!1),[W,P]=a();async function G(c){c.preventDefault(),R(!0),P(void 0);try{let i=A===K?void 0:A,E={name:w,prompt:q,schedule:I,model:k||void 0},S;if(p)S=await d.connection.request(`/api/automations/${p.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({...E,projectID:i??null})});else S=await d.connection.request("/api/automations",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...E,projectID:i})});d.onSaved(S)}catch(i){P(i instanceof Error?i.message:"保存失败")}finally{R(!1)}}return e(L,{open:d.open,onOpenChange:d.onOpenChange,title:d.automation?"编辑自动化":"新建自动化",size:"lg",footer:n(m,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(h,{onClick:()=>d.onOpenChange(!1),children:"取消"}),e(h,{type:"submit",form:D,variant:"primary",disabled:C,children:C?"正在保存…":d.automation?"保存":"创建"})]}),children:n(_,{id:D,onSubmit:G,children:[e(x,{label:"名称",children:(c)=>e(z,{id:c,autoFocus:!p,required:!0,value:w,onChange:(i)=>H(i.target.value),placeholder:"例如:每日提交总结"})}),e(x,{label:"提示词",hint:"没人盯着运行,写清楚要做什么、结果怎么汇报。",children:(c)=>e(O,{id:c,required:!0,value:q,onChange:(i)=>J(i.target.value),rows:5,placeholder:"总结昨天到现在的 git 提交,按模块分组,列出需要我关注的改动。"})}),n("div",{className:"grid gap-x-3 gap-y-4 sm:grid-cols-2",children:[e(x,{label:"时间",children:(c)=>e(f,{id:c,value:B?M:I,onValueChange:(i)=>{if(U(i===M),i!==M)T(i)},groups:[{options:Bi.map((i)=>({value:i.cron,label:i.label}))},{options:[{value:M,label:"自定义(cron)"}]}]})}),e(x,{label:"在哪里运行",children:(c)=>e(f,{id:c,value:A,onValueChange:V,groups:[{options:[{value:K,label:"聊天",description:"不绑定目录",icon:e(Gr,{})}]},...d.projects.length?[{label:"项目",options:d.projects.map((i)=>({value:i.id,label:i.name,icon:e(mt,{})}))}]:[]]})})]}),B&&e(x,{label:"cron 表达式",hint:`分 时 日 月 周,例如 30 8 * * 1-5 是工作日 8:30。${d.timezone?`按 ${d.timezone} 时间。`:""}`,children:(c)=>e(z,{id:c,required:!0,value:I,onChange:(i)=>T(i.target.value),spellCheck:!1,className:"font-mono"})}),d.models.length>0&&e(x,{label:"模型",children:(c)=>e(f,{id:c,value:k||"default",onValueChange:(i)=>N(i==="default"?"":i),groups:[{options:[{value:"default",label:"默认模型"},...d.models.map((i)=>({value:i,label:i}))]}]})}),e(F,{children:W})]})})}export{le as AutomationsPage};
Binary file
Binary file