@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.
- package/{chunk-bdr1170y.js → chunk-2c6seev1.js} +1 -1
- package/{chunk-9y8v1vrt.js → chunk-4mwx4pet.js} +1 -1
- package/{chunk-4x7xnfw1.js → chunk-61e7nvw9.js} +1 -1
- package/{chunk-979mxkzt.js → chunk-93bcazsp.js} +1 -1
- package/{chunk-y16fqzad.js → chunk-9fccgczj.js} +1 -1
- package/{chunk-kh4yq4rd.js → chunk-ff293dj0.js} +1 -1
- package/{chunk-cte9wd9x.js → chunk-g23dnf4y.js} +1 -1
- package/{chunk-c4nxr37s.js → chunk-gwcstcqs.js} +4 -4
- package/{chunk-ma91f4qj.js → chunk-m839588n.js} +1 -1
- package/{chunk-0nxcbf6d.js → chunk-pjv9mppd.js} +109 -108
- package/{chunk-pcd14q8r.js → chunk-rkn6bven.js} +4 -4
- package/compiled.js +1 -1
- package/package.json +1 -1
- package/ui-test-worker.js +1 -1
- package/web/{chunk-ppccb30x.js → chunk-00wh99xz.js} +4 -4
- package/web/chunk-00wh99xz.js.br +0 -0
- package/web/chunk-00wh99xz.js.gz +0 -0
- package/web/{chunk-g7t1bvvx.js → chunk-0a1t2j8h.js} +1 -1
- package/web/chunk-0a1t2j8h.js.br +0 -0
- package/web/chunk-0a1t2j8h.js.gz +0 -0
- package/web/{chunk-59ybhv47.js → chunk-1ar2phwa.js} +1 -1
- package/web/chunk-1ar2phwa.js.br +0 -0
- package/web/chunk-1ar2phwa.js.gz +0 -0
- package/web/{chunk-hqtm67yw.js → chunk-1jfydncj.js} +2 -2
- package/web/chunk-1jfydncj.js.br +0 -0
- package/web/chunk-1jfydncj.js.gz +0 -0
- package/web/{chunk-qqtj88e0.js → chunk-1p1jtvrt.js} +1 -1
- package/web/chunk-1p1jtvrt.js.br +0 -0
- package/web/chunk-1p1jtvrt.js.gz +0 -0
- package/web/chunk-1x38r11w.js +1 -0
- package/web/chunk-1x38r11w.js.br +2 -0
- package/web/chunk-1x38r11w.js.gz +0 -0
- package/web/{chunk-bbyqcvdz.js → chunk-25rf3svt.js} +2 -2
- package/web/chunk-25rf3svt.js.br +0 -0
- package/web/chunk-25rf3svt.js.gz +0 -0
- package/web/chunk-2cfv55j2.js +1 -0
- package/web/chunk-2cfv55j2.js.br +0 -0
- package/web/chunk-2cfv55j2.js.gz +0 -0
- package/web/{chunk-bg2ps35t.js → chunk-2q37qdq2.js} +1 -1
- package/web/chunk-2q37qdq2.js.br +0 -0
- package/web/chunk-2q37qdq2.js.gz +0 -0
- package/web/{chunk-13x3xyyh.js → chunk-2yhmab75.js} +4 -4
- package/web/chunk-2yhmab75.js.br +0 -0
- package/web/chunk-2yhmab75.js.gz +0 -0
- package/web/{chunk-bvmvj35k.js → chunk-3at57qna.js} +1 -1
- package/web/chunk-3at57qna.js.br +0 -0
- package/web/chunk-3at57qna.js.gz +0 -0
- package/web/{chunk-nb3jk1wk.js → chunk-3z9kpkec.js} +1 -1
- package/web/chunk-3z9kpkec.js.br +0 -0
- package/web/chunk-3z9kpkec.js.gz +0 -0
- package/web/chunk-4ncnt1c2.js +2 -0
- package/web/chunk-4ncnt1c2.js.br +0 -0
- package/web/{chunk-k69ysa0v.js → chunk-4ncnt1c2.js.gz} +0 -0
- package/web/chunk-4vc07x6t.js +1 -0
- package/web/chunk-4vc07x6t.js.br +0 -0
- package/web/chunk-4vc07x6t.js.gz +0 -0
- package/web/{chunk-921qw2jf.js → chunk-4ytc5sth.js} +1 -1
- package/web/chunk-4ytc5sth.js.br +0 -0
- package/web/chunk-4ytc5sth.js.gz +0 -0
- package/web/{chunk-zs7c2db4.js → chunk-5c5h90k0.js} +1 -1
- package/web/chunk-5c5h90k0.js.br +0 -0
- package/web/chunk-5c5h90k0.js.gz +0 -0
- package/web/chunk-5zpn3n5a.js +1 -0
- package/web/chunk-5zpn3n5a.js.br +0 -0
- package/web/chunk-5zpn3n5a.js.gz +0 -0
- package/web/chunk-64k06g43.js +1 -0
- package/web/chunk-64k06g43.js.br +0 -0
- package/web/chunk-64k06g43.js.gz +0 -0
- package/web/{chunk-bh0a254y.js → chunk-6pbrtp4e.js} +4 -4
- package/web/chunk-6pbrtp4e.js.br +0 -0
- package/web/chunk-6pbrtp4e.js.gz +0 -0
- package/web/chunk-6sehssym.js +1 -0
- package/web/chunk-6sehssym.js.br +2 -0
- package/web/chunk-6sehssym.js.gz +0 -0
- package/web/chunk-7hxj251q.js +1 -0
- package/web/chunk-7hxj251q.js.br +0 -0
- package/web/chunk-7hxj251q.js.gz +0 -0
- package/web/{chunk-abvtsz6z.js → chunk-7qcmg5ns.js} +1 -1
- package/web/chunk-7qcmg5ns.js.br +0 -0
- package/web/chunk-7qcmg5ns.js.gz +0 -0
- package/web/{chunk-172gywq4.js → chunk-82j6713x.js} +6 -6
- package/web/chunk-82j6713x.js.br +0 -0
- package/web/chunk-82j6713x.js.gz +0 -0
- package/web/{chunk-kbvzxsz7.js → chunk-9vexd52p.js} +1 -1
- package/web/chunk-9vexd52p.js.br +0 -0
- package/web/chunk-9vexd52p.js.gz +0 -0
- package/web/{chunk-crhbhsrh.js → chunk-ajj3nc80.js} +1 -1
- package/web/chunk-ajj3nc80.js.br +0 -0
- package/web/chunk-ajj3nc80.js.gz +0 -0
- package/web/chunk-amrkb4dd.js +1 -0
- package/web/chunk-amrkb4dd.js.br +0 -0
- package/web/chunk-amrkb4dd.js.gz +0 -0
- package/web/{chunk-w563538j.js → chunk-b7d5k9sp.js} +35 -35
- package/web/chunk-b7d5k9sp.js.br +0 -0
- package/web/chunk-b7d5k9sp.js.gz +0 -0
- package/web/chunk-bavn0z5d.js +1 -0
- package/web/chunk-bavn0z5d.js.br +0 -0
- package/web/chunk-bavn0z5d.js.gz +0 -0
- package/web/{chunk-yp75a6yh.js → chunk-bjw74xvy.js} +1 -1
- package/web/chunk-bjw74xvy.js.br +0 -0
- package/web/chunk-bjw74xvy.js.gz +0 -0
- package/web/chunk-bn68ks4x.js +1 -0
- package/web/chunk-bn68ks4x.js.br +0 -0
- package/web/chunk-bn68ks4x.js.gz +0 -0
- package/web/chunk-c59d2j14.js +8 -0
- package/web/chunk-c59d2j14.js.br +0 -0
- package/web/chunk-c59d2j14.js.gz +0 -0
- package/web/{chunk-634vc92s.js → chunk-cfz9ftze.js} +3 -3
- package/web/chunk-cfz9ftze.js.br +0 -0
- package/web/chunk-cfz9ftze.js.gz +0 -0
- package/web/{chunk-zsae1tn8.js → chunk-chq476ch.js} +4 -4
- package/web/chunk-chq476ch.js.br +0 -0
- package/web/chunk-chq476ch.js.gz +0 -0
- package/web/{chunk-5zkw2kkb.js → chunk-d0ey112q.js} +5 -5
- package/web/chunk-d0ey112q.js.br +0 -0
- package/web/chunk-d0ey112q.js.gz +0 -0
- package/web/{chunk-h1cv1kke.js → chunk-d71z7s5r.js} +1 -1
- package/web/chunk-d71z7s5r.js.br +0 -0
- package/web/chunk-d71z7s5r.js.gz +0 -0
- package/web/{chunk-8de69eyx.js → chunk-dembnhph.js} +1 -1
- package/web/chunk-dembnhph.js.br +0 -0
- package/web/chunk-dembnhph.js.gz +0 -0
- package/web/{chunk-m5nt857c.js → chunk-dfq4w8mf.js} +1 -1
- package/web/chunk-dfq4w8mf.js.br +0 -0
- package/web/chunk-dfq4w8mf.js.gz +0 -0
- package/web/{chunk-bbs6yq60.js → chunk-dwdxczxc.js} +3 -3
- package/web/chunk-dwdxczxc.js.br +0 -0
- package/web/chunk-dwdxczxc.js.gz +0 -0
- package/web/chunk-e3b2krd7.js +1 -0
- package/web/chunk-e3b2krd7.js.br +0 -0
- package/web/chunk-e3b2krd7.js.gz +0 -0
- package/web/{chunk-91s1ns6b.js → chunk-e4wbkc1x.js} +11 -11
- package/web/chunk-e4wbkc1x.js.br +0 -0
- package/web/chunk-e4wbkc1x.js.gz +0 -0
- package/web/{chunk-ygzgrjj7.js → chunk-f2qrf0he.js} +1 -1
- package/web/chunk-f2qrf0he.js.br +0 -0
- package/web/chunk-f2qrf0he.js.gz +0 -0
- package/web/{chunk-ca8hnmmv.js → chunk-f88vhwan.js} +5 -5
- package/web/chunk-f88vhwan.js.br +0 -0
- package/web/chunk-f88vhwan.js.gz +0 -0
- package/web/{chunk-yg9a23mv.js → chunk-fpp6jtb4.js} +1 -1
- package/web/chunk-fpp6jtb4.js.br +0 -0
- package/web/chunk-fpp6jtb4.js.gz +0 -0
- package/web/chunk-ft62hfnt.js +1 -0
- package/web/chunk-ft62hfnt.js.br +0 -0
- package/web/chunk-ft62hfnt.js.gz +0 -0
- package/web/{chunk-176tsg6e.js → chunk-g3fahpjw.js} +2 -2
- package/web/chunk-g3fahpjw.js.br +0 -0
- package/web/chunk-g3fahpjw.js.gz +0 -0
- package/web/{chunk-xw8tzrmm.js → chunk-g5b4wjwp.js} +94 -94
- package/web/chunk-g5b4wjwp.js.br +0 -0
- package/web/chunk-g5b4wjwp.js.gz +0 -0
- package/web/chunk-ga3tn73a.js +1 -0
- package/web/chunk-ga3tn73a.js.br +0 -0
- package/web/chunk-ga3tn73a.js.gz +0 -0
- package/web/{chunk-4cbcqcd2.js → chunk-gf4vtpw2.js} +1 -1
- package/web/chunk-gf4vtpw2.js.br +0 -0
- package/web/chunk-gf4vtpw2.js.gz +0 -0
- package/web/{chunk-n9npqkxf.js → chunk-ghxfjwhq.js} +1 -1
- package/web/chunk-ghxfjwhq.js.br +0 -0
- package/web/chunk-ghxfjwhq.js.gz +0 -0
- package/web/{chunk-hsgtzrkh.js → chunk-gxqs7zmy.js} +1 -1
- package/web/chunk-gxqs7zmy.js.br +0 -0
- package/web/chunk-gxqs7zmy.js.gz +0 -0
- package/web/{chunk-9k9p5dat.js → chunk-jpdp0xkd.js} +1 -1
- package/web/chunk-jpdp0xkd.js.br +0 -0
- package/web/chunk-jpdp0xkd.js.gz +0 -0
- package/web/{chunk-kn9bc5z2.js → chunk-jtzbk251.js} +2 -2
- package/web/chunk-jtzbk251.js.br +0 -0
- package/web/chunk-jtzbk251.js.gz +0 -0
- package/web/{chunk-ac8vmj54.js → chunk-kc6k0ect.js} +1 -1
- package/web/chunk-kc6k0ect.js.br +0 -0
- package/web/chunk-kc6k0ect.js.gz +0 -0
- package/web/{chunk-gy2y4zfa.js → chunk-kk7k8xc8.js} +5 -5
- package/web/chunk-kk7k8xc8.js.br +0 -0
- package/web/chunk-kk7k8xc8.js.gz +0 -0
- package/web/{chunk-6n3cwe1h.js → chunk-kmpyntam.js} +19 -19
- package/web/chunk-kmpyntam.js.br +0 -0
- package/web/chunk-kmpyntam.js.gz +0 -0
- package/web/{chunk-q17rem99.js → chunk-mejpj22t.js} +5 -5
- package/web/chunk-mejpj22t.js.br +0 -0
- package/web/chunk-mejpj22t.js.gz +0 -0
- package/web/{chunk-sapy54hm.js → chunk-mm10pm0x.js} +3 -3
- package/web/chunk-mm10pm0x.js.br +0 -0
- package/web/chunk-mm10pm0x.js.gz +0 -0
- package/web/{chunk-r4cr8rvt.js → chunk-mpve4748.js} +1 -1
- package/web/chunk-mpve4748.js.br +0 -0
- package/web/chunk-mpve4748.js.gz +0 -0
- package/web/chunk-ms022qq9.js +1 -0
- package/web/chunk-ms022qq9.js.br +2 -0
- package/web/chunk-ms022qq9.js.gz +0 -0
- package/web/{chunk-xv1d350x.js → chunk-mxf122px.js} +1 -1
- package/web/chunk-mxf122px.js.br +0 -0
- package/web/chunk-mxf122px.js.gz +0 -0
- package/web/chunk-mzv41kv9.js +1 -0
- package/web/chunk-mzv41kv9.js.br +2 -0
- package/web/chunk-mzv41kv9.js.gz +0 -0
- package/web/{chunk-2fms67zg.js → chunk-mzyg8zga.js} +1 -1
- package/web/chunk-mzyg8zga.js.br +0 -0
- package/web/chunk-mzyg8zga.js.gz +0 -0
- package/web/{chunk-c2eqwepm.js → chunk-n8j9jdsh.js} +1 -1
- package/web/chunk-n8j9jdsh.js.br +0 -0
- package/web/chunk-n8j9jdsh.js.gz +0 -0
- package/web/{chunk-fp7q643n.js → chunk-n8ts6ra2.js} +3 -3
- package/web/chunk-n8ts6ra2.js.br +0 -0
- package/web/chunk-n8ts6ra2.js.gz +0 -0
- package/web/chunk-nefchfa1.js +1 -0
- package/web/chunk-nefchfa1.js.br +0 -0
- package/web/chunk-nefchfa1.js.gz +0 -0
- package/web/chunk-ng0bsm6n.js +1 -0
- package/web/chunk-ng0bsm6n.js.br +0 -0
- package/web/chunk-ng0bsm6n.js.gz +0 -0
- package/web/{chunk-ced8pdbc.js → chunk-nz1mm18x.js} +1 -1
- package/web/chunk-nz1mm18x.js.br +0 -0
- package/web/chunk-nz1mm18x.js.gz +0 -0
- package/web/{chunk-mbaw66b5.js → chunk-pdxqp4rh.js} +1 -1
- package/web/chunk-pdxqp4rh.js.br +0 -0
- package/web/chunk-pdxqp4rh.js.gz +0 -0
- package/web/{chunk-g1penf6y.js → chunk-pe2zvyjt.js} +1 -1
- package/web/chunk-pe2zvyjt.js.br +0 -0
- package/web/chunk-pe2zvyjt.js.gz +0 -0
- package/web/{chunk-t7vwsg9r.js → chunk-q8ve5wqt.js} +2 -2
- package/web/chunk-q8ve5wqt.js.br +0 -0
- package/web/chunk-q8ve5wqt.js.gz +0 -0
- package/web/{chunk-ny87aq2j.js → chunk-qh93t9tv.js} +1 -1
- package/web/chunk-qh93t9tv.js.br +0 -0
- package/web/chunk-qh93t9tv.js.gz +0 -0
- package/web/{chunk-3vdw9nn7.js → chunk-qqewmk3y.js} +1 -1
- package/web/chunk-qqewmk3y.js.br +0 -0
- package/web/chunk-qqewmk3y.js.gz +0 -0
- package/web/{chunk-n59nyqcr.js → chunk-qzb06me8.js} +34 -34
- package/web/chunk-qzb06me8.js.br +0 -0
- package/web/chunk-qzb06me8.js.gz +0 -0
- package/web/{chunk-tt7j0m6m.js → chunk-r2zernvz.js} +5 -5
- package/web/chunk-r2zernvz.js.br +0 -0
- package/web/chunk-r2zernvz.js.gz +0 -0
- package/web/{chunk-qdq6wvgt.js → chunk-r8ykja8v.js} +3 -3
- package/web/chunk-r8ykja8v.js.br +0 -0
- package/web/chunk-r8ykja8v.js.gz +0 -0
- package/web/{chunk-qhr6hegh.js → chunk-r9b7eh2j.js} +1 -1
- package/web/chunk-r9b7eh2j.js.br +0 -0
- package/web/chunk-r9b7eh2j.js.gz +0 -0
- package/web/{chunk-eq28qb33.js → chunk-ry1wp3v8.js} +2 -2
- package/web/chunk-ry1wp3v8.js.br +0 -0
- package/web/chunk-ry1wp3v8.js.gz +0 -0
- package/web/chunk-s2bfc2vk.js +1 -0
- package/web/chunk-s2bfc2vk.js.br +0 -0
- package/web/chunk-s2bfc2vk.js.gz +0 -0
- package/web/{chunk-2psxv4dk.js → chunk-s4c6nzj9.js} +5 -5
- package/web/chunk-s4c6nzj9.js.br +0 -0
- package/web/chunk-s4c6nzj9.js.gz +0 -0
- package/web/{chunk-b9fqnzqd.js → chunk-ss23nnmc.js} +4 -4
- package/web/chunk-ss23nnmc.js.br +0 -0
- package/web/chunk-ss23nnmc.js.gz +0 -0
- package/web/{chunk-b2t33c3t.js → chunk-sxmv80th.js} +1 -1
- package/web/chunk-sxmv80th.js.br +0 -0
- package/web/chunk-sxmv80th.js.gz +0 -0
- package/web/{chunk-3sszg3gr.js → chunk-sy2cdka3.js} +1 -1
- package/web/chunk-sy2cdka3.js.br +0 -0
- package/web/chunk-sy2cdka3.js.gz +0 -0
- package/web/{chunk-vgpyff03.js → chunk-sysebfkg.js} +3 -3
- package/web/chunk-sysebfkg.js.br +0 -0
- package/web/chunk-sysebfkg.js.gz +0 -0
- package/web/{chunk-vb3sy3hv.js → chunk-t3620hrb.js} +2 -2
- package/web/chunk-t3620hrb.js.br +0 -0
- package/web/chunk-t3620hrb.js.gz +0 -0
- package/web/{chunk-phr7yps3.js → chunk-t5srz1hs.js} +2 -2
- package/web/chunk-t5srz1hs.js.br +0 -0
- package/web/chunk-t5srz1hs.js.gz +0 -0
- package/web/{chunk-sarkb4p9.js → chunk-v25k7n3r.js} +1 -1
- package/web/chunk-v25k7n3r.js.br +0 -0
- package/web/chunk-v25k7n3r.js.gz +0 -0
- package/web/{chunk-e3d6kvwm.js → chunk-vf0p4ayw.js} +1 -1
- package/web/chunk-vf0p4ayw.js.br +0 -0
- package/web/chunk-vf0p4ayw.js.gz +0 -0
- package/web/chunk-vr6n4pvt.js +1 -0
- package/web/chunk-vr6n4pvt.js.br +0 -0
- package/web/chunk-vr6n4pvt.js.gz +0 -0
- package/web/{chunk-713ygtrs.js → chunk-vx9g94x2.js} +4 -4
- package/web/chunk-vx9g94x2.js.br +0 -0
- package/web/chunk-vx9g94x2.js.gz +0 -0
- package/web/{chunk-cj0cmvbm.js → chunk-w5v80bmk.js} +4 -4
- package/web/chunk-w5v80bmk.js.br +0 -0
- package/web/chunk-w5v80bmk.js.gz +0 -0
- package/web/{chunk-y5zd05mz.js → chunk-wj0ck0pa.js} +1 -1
- package/web/chunk-wj0ck0pa.js.br +0 -0
- package/web/chunk-wj0ck0pa.js.gz +0 -0
- package/web/chunk-wjzdpyhs.css +1 -0
- package/web/chunk-wjzdpyhs.css.br +0 -0
- package/web/chunk-wjzdpyhs.css.gz +0 -0
- package/web/{chunk-17d30546.js → chunk-wmt8d7zv.js} +5 -5
- package/web/chunk-wmt8d7zv.js.br +0 -0
- package/web/chunk-wmt8d7zv.js.gz +0 -0
- package/web/{chunk-ksr360js.js → chunk-wqf0qjbv.js} +2 -2
- package/web/chunk-wqf0qjbv.js.br +0 -0
- package/web/chunk-wqf0qjbv.js.gz +0 -0
- package/web/{chunk-2z4zhtw4.js → chunk-y5f7gy03.js} +2 -2
- package/web/chunk-y5f7gy03.js.br +0 -0
- package/web/chunk-y5f7gy03.js.gz +0 -0
- package/web/{chunk-96n0nem7.js → chunk-yg78fas7.js} +1 -1
- package/web/chunk-yg78fas7.js.br +0 -0
- package/web/chunk-yg78fas7.js.gz +0 -0
- package/web/{chunk-k8x1xbf6.js → chunk-yvkbc3s5.js} +1 -1
- package/web/chunk-yvkbc3s5.js.br +0 -0
- package/web/chunk-yvkbc3s5.js.gz +0 -0
- package/web/{chunk-wrqazg2v.js → chunk-z9nj64n7.js} +1 -1
- package/web/chunk-z9nj64n7.js.br +0 -0
- package/web/chunk-z9nj64n7.js.gz +0 -0
- package/web/{chunk-ms7cscs9.js → chunk-zc0e01j4.js} +1 -1
- package/web/chunk-zc0e01j4.js.br +0 -0
- package/web/chunk-zc0e01j4.js.gz +0 -0
- package/web/{chunk-290wy4yk.js → chunk-zj9s9w76.js} +1 -1
- package/web/chunk-zj9s9w76.js.br +0 -0
- package/web/chunk-zj9s9w76.js.gz +0 -0
- package/web/{chunk-085ttz7c.js → chunk-znwpavn5.js} +4 -4
- package/web/chunk-znwpavn5.js.br +0 -0
- package/web/chunk-znwpavn5.js.gz +0 -0
- package/web/index.html +1 -1
- package/web/index.html.br +0 -0
- package/web/index.html.gz +0 -0
- package/web/chunk-085ttz7c.js.br +0 -0
- package/web/chunk-085ttz7c.js.gz +0 -0
- package/web/chunk-13x3xyyh.js.br +0 -0
- package/web/chunk-13x3xyyh.js.gz +0 -0
- package/web/chunk-172gywq4.js.br +0 -0
- package/web/chunk-172gywq4.js.gz +0 -0
- package/web/chunk-176tsg6e.js.br +0 -0
- package/web/chunk-176tsg6e.js.gz +0 -0
- package/web/chunk-17d30546.js.br +0 -0
- package/web/chunk-17d30546.js.gz +0 -0
- package/web/chunk-1k6jx4hs.js +0 -1
- package/web/chunk-1k6jx4hs.js.br +0 -0
- package/web/chunk-1k6jx4hs.js.gz +0 -0
- package/web/chunk-1kts05s6.css +0 -1
- package/web/chunk-1kts05s6.css.br +0 -0
- package/web/chunk-1kts05s6.css.gz +0 -0
- package/web/chunk-1z0x1j6q.js +0 -1
- package/web/chunk-1z0x1j6q.js.br +0 -0
- package/web/chunk-1z0x1j6q.js.gz +0 -0
- package/web/chunk-290wy4yk.js.br +0 -0
- package/web/chunk-290wy4yk.js.gz +0 -0
- package/web/chunk-2cdw1299.js +0 -1
- package/web/chunk-2cdw1299.js.br +0 -0
- package/web/chunk-2cdw1299.js.gz +0 -0
- package/web/chunk-2fms67zg.js.br +0 -0
- package/web/chunk-2fms67zg.js.gz +0 -0
- package/web/chunk-2psxv4dk.js.br +0 -0
- package/web/chunk-2psxv4dk.js.gz +0 -0
- package/web/chunk-2z4zhtw4.js.br +0 -0
- package/web/chunk-2z4zhtw4.js.gz +0 -0
- package/web/chunk-3sszg3gr.js.br +0 -0
- package/web/chunk-3sszg3gr.js.gz +0 -0
- package/web/chunk-3vdw9nn7.js.br +0 -0
- package/web/chunk-3vdw9nn7.js.gz +0 -0
- package/web/chunk-4cbcqcd2.js.br +0 -0
- package/web/chunk-4cbcqcd2.js.gz +0 -0
- package/web/chunk-4v6n6b36.js +0 -1
- package/web/chunk-4v6n6b36.js.br +0 -0
- package/web/chunk-4v6n6b36.js.gz +0 -0
- package/web/chunk-59ybhv47.js.br +0 -0
- package/web/chunk-59ybhv47.js.gz +0 -0
- package/web/chunk-5zkw2kkb.js.br +0 -0
- package/web/chunk-5zkw2kkb.js.gz +0 -0
- package/web/chunk-634vc92s.js.br +0 -0
- package/web/chunk-634vc92s.js.gz +0 -0
- package/web/chunk-6n3cwe1h.js.br +0 -0
- package/web/chunk-6n3cwe1h.js.gz +0 -0
- package/web/chunk-6zr2j7xj.js +0 -1
- package/web/chunk-6zr2j7xj.js.br +0 -0
- package/web/chunk-6zr2j7xj.js.gz +0 -0
- package/web/chunk-713ygtrs.js.br +0 -0
- package/web/chunk-713ygtrs.js.gz +0 -0
- package/web/chunk-7m4gmjvp.js +0 -1
- package/web/chunk-7m4gmjvp.js.br +0 -0
- package/web/chunk-7m4gmjvp.js.gz +0 -0
- package/web/chunk-7x90pq42.js +0 -1
- package/web/chunk-7x90pq42.js.br +0 -0
- package/web/chunk-7x90pq42.js.gz +0 -0
- package/web/chunk-8de69eyx.js.br +0 -0
- package/web/chunk-8de69eyx.js.gz +0 -0
- package/web/chunk-91s1ns6b.js.br +0 -0
- package/web/chunk-91s1ns6b.js.gz +0 -0
- package/web/chunk-921qw2jf.js.br +0 -0
- package/web/chunk-921qw2jf.js.gz +0 -0
- package/web/chunk-96n0nem7.js.br +0 -0
- package/web/chunk-96n0nem7.js.gz +0 -0
- package/web/chunk-9k9p5dat.js.br +0 -0
- package/web/chunk-9k9p5dat.js.gz +0 -0
- package/web/chunk-a529550j.js +0 -1
- package/web/chunk-a529550j.js.br +0 -0
- package/web/chunk-a529550j.js.gz +0 -0
- package/web/chunk-abvtsz6z.js.br +0 -0
- package/web/chunk-abvtsz6z.js.gz +0 -0
- package/web/chunk-ac8vmj54.js.br +0 -0
- package/web/chunk-ac8vmj54.js.gz +0 -0
- package/web/chunk-b2t33c3t.js.br +0 -0
- package/web/chunk-b2t33c3t.js.gz +0 -0
- package/web/chunk-b9fqnzqd.js.br +0 -0
- package/web/chunk-b9fqnzqd.js.gz +0 -0
- package/web/chunk-bbs6yq60.js.br +0 -0
- package/web/chunk-bbs6yq60.js.gz +0 -0
- package/web/chunk-bbyqcvdz.js.br +0 -0
- package/web/chunk-bbyqcvdz.js.gz +0 -0
- package/web/chunk-bg2ps35t.js.br +0 -0
- package/web/chunk-bg2ps35t.js.gz +0 -0
- package/web/chunk-bh0a254y.js.br +0 -0
- package/web/chunk-bh0a254y.js.gz +0 -0
- package/web/chunk-bvmvj35k.js.br +0 -0
- package/web/chunk-bvmvj35k.js.gz +0 -0
- package/web/chunk-c2eqwepm.js.br +0 -0
- package/web/chunk-c2eqwepm.js.gz +0 -0
- package/web/chunk-ca8hnmmv.js.br +0 -0
- package/web/chunk-ca8hnmmv.js.gz +0 -0
- package/web/chunk-ced8pdbc.js.br +0 -0
- package/web/chunk-ced8pdbc.js.gz +0 -0
- package/web/chunk-cj0cmvbm.js.br +0 -0
- package/web/chunk-cj0cmvbm.js.gz +0 -0
- package/web/chunk-crhbhsrh.js.br +0 -0
- package/web/chunk-crhbhsrh.js.gz +0 -0
- package/web/chunk-e3d6kvwm.js.br +0 -0
- package/web/chunk-e3d6kvwm.js.gz +0 -0
- package/web/chunk-eq28qb33.js.br +0 -3
- package/web/chunk-eq28qb33.js.gz +0 -0
- package/web/chunk-f8ac76br.js +0 -2
- package/web/chunk-f8ac76br.js.br +0 -3
- package/web/chunk-f8ac76br.js.gz +0 -0
- package/web/chunk-fp7q643n.js.br +0 -0
- package/web/chunk-fp7q643n.js.gz +0 -0
- package/web/chunk-g1penf6y.js.br +0 -0
- package/web/chunk-g1penf6y.js.gz +0 -0
- package/web/chunk-g7t1bvvx.js.br +0 -0
- package/web/chunk-g7t1bvvx.js.gz +0 -0
- package/web/chunk-gf4ky7tp.js +0 -8
- package/web/chunk-gf4ky7tp.js.br +0 -0
- package/web/chunk-gf4ky7tp.js.gz +0 -0
- package/web/chunk-gtcjwz0j.js +0 -1
- package/web/chunk-gtcjwz0j.js.br +0 -2
- package/web/chunk-gtcjwz0j.js.gz +0 -0
- package/web/chunk-gy2y4zfa.js.br +0 -0
- package/web/chunk-gy2y4zfa.js.gz +0 -0
- package/web/chunk-h1cv1kke.js.br +0 -0
- package/web/chunk-h1cv1kke.js.gz +0 -0
- package/web/chunk-h6k80vqf.js +0 -1
- package/web/chunk-h6k80vqf.js.br +0 -0
- package/web/chunk-h6k80vqf.js.gz +0 -0
- package/web/chunk-hqtm67yw.js.br +0 -0
- package/web/chunk-hqtm67yw.js.gz +0 -0
- package/web/chunk-hsgtzrkh.js.br +0 -0
- package/web/chunk-hsgtzrkh.js.gz +0 -0
- package/web/chunk-j7phw79h.js +0 -1
- package/web/chunk-j7phw79h.js.br +0 -0
- package/web/chunk-j7phw79h.js.gz +0 -0
- package/web/chunk-k69ysa0v.js.br +0 -0
- package/web/chunk-k69ysa0v.js.gz +0 -0
- package/web/chunk-k7h5g8qj.js +0 -1
- package/web/chunk-k7h5g8qj.js.br +0 -2
- package/web/chunk-k7h5g8qj.js.gz +0 -0
- package/web/chunk-k8x1xbf6.js.br +0 -0
- package/web/chunk-k8x1xbf6.js.gz +0 -0
- package/web/chunk-kbvzxsz7.js.br +0 -0
- package/web/chunk-kbvzxsz7.js.gz +0 -0
- package/web/chunk-kn9bc5z2.js.br +0 -0
- package/web/chunk-kn9bc5z2.js.gz +0 -0
- package/web/chunk-ksr360js.js.br +0 -0
- package/web/chunk-ksr360js.js.gz +0 -0
- package/web/chunk-m5nt857c.js.br +0 -0
- package/web/chunk-m5nt857c.js.gz +0 -0
- package/web/chunk-mbaw66b5.js.br +0 -0
- package/web/chunk-mbaw66b5.js.gz +0 -0
- package/web/chunk-ms7cscs9.js.br +0 -0
- package/web/chunk-ms7cscs9.js.gz +0 -0
- package/web/chunk-n59nyqcr.js.br +0 -0
- package/web/chunk-n59nyqcr.js.gz +0 -0
- package/web/chunk-n9npqkxf.js.br +0 -0
- package/web/chunk-n9npqkxf.js.gz +0 -0
- package/web/chunk-nb3jk1wk.js.br +0 -0
- package/web/chunk-nb3jk1wk.js.gz +0 -0
- package/web/chunk-ny87aq2j.js.br +0 -0
- package/web/chunk-ny87aq2j.js.gz +0 -0
- package/web/chunk-phr7yps3.js.br +0 -0
- package/web/chunk-phr7yps3.js.gz +0 -0
- package/web/chunk-ppccb30x.js.br +0 -0
- package/web/chunk-ppccb30x.js.gz +0 -0
- package/web/chunk-q17rem99.js.br +0 -0
- package/web/chunk-q17rem99.js.gz +0 -0
- package/web/chunk-qdq6wvgt.js.br +0 -0
- package/web/chunk-qdq6wvgt.js.gz +0 -0
- package/web/chunk-qhr6hegh.js.br +0 -0
- package/web/chunk-qhr6hegh.js.gz +0 -0
- package/web/chunk-qqtj88e0.js.br +0 -0
- package/web/chunk-qqtj88e0.js.gz +0 -0
- package/web/chunk-r165xpp5.js +0 -1
- package/web/chunk-r165xpp5.js.br +0 -0
- package/web/chunk-r165xpp5.js.gz +0 -0
- package/web/chunk-r4cr8rvt.js.br +0 -0
- package/web/chunk-r4cr8rvt.js.gz +0 -0
- package/web/chunk-sapy54hm.js.br +0 -0
- package/web/chunk-sapy54hm.js.gz +0 -0
- package/web/chunk-sarkb4p9.js.br +0 -0
- package/web/chunk-sarkb4p9.js.gz +0 -0
- package/web/chunk-t7vwsg9r.js.br +0 -0
- package/web/chunk-t7vwsg9r.js.gz +0 -0
- package/web/chunk-tt7j0m6m.js.br +0 -0
- package/web/chunk-tt7j0m6m.js.gz +0 -0
- package/web/chunk-va1rkfan.js +0 -1
- package/web/chunk-va1rkfan.js.br +0 -0
- package/web/chunk-va1rkfan.js.gz +0 -0
- package/web/chunk-vb3sy3hv.js.br +0 -0
- package/web/chunk-vb3sy3hv.js.gz +0 -0
- package/web/chunk-vgpyff03.js.br +0 -0
- package/web/chunk-vgpyff03.js.gz +0 -0
- package/web/chunk-w563538j.js.br +0 -0
- package/web/chunk-w563538j.js.gz +0 -0
- package/web/chunk-w71t7mes.js +0 -1
- package/web/chunk-w71t7mes.js.br +0 -0
- package/web/chunk-w71t7mes.js.gz +0 -0
- package/web/chunk-w96etr1w.js +0 -1
- package/web/chunk-w96etr1w.js.br +0 -0
- package/web/chunk-w96etr1w.js.gz +0 -0
- package/web/chunk-wrqazg2v.js.br +0 -0
- package/web/chunk-wrqazg2v.js.gz +0 -0
- package/web/chunk-xv1d350x.js.br +0 -0
- package/web/chunk-xv1d350x.js.gz +0 -0
- package/web/chunk-xw8tzrmm.js.br +0 -0
- package/web/chunk-xw8tzrmm.js.gz +0 -0
- package/web/chunk-xwsh4jx7.js +0 -1
- package/web/chunk-xwsh4jx7.js.br +0 -2
- package/web/chunk-xwsh4jx7.js.gz +0 -0
- package/web/chunk-xxk7xkrs.js +0 -1
- package/web/chunk-xxk7xkrs.js.br +0 -0
- package/web/chunk-xxk7xkrs.js.gz +0 -0
- package/web/chunk-y5zd05mz.js.br +0 -0
- package/web/chunk-y5zd05mz.js.gz +0 -0
- package/web/chunk-yg9a23mv.js.br +0 -0
- package/web/chunk-yg9a23mv.js.gz +0 -0
- package/web/chunk-ygzgrjj7.js.br +0 -0
- package/web/chunk-ygzgrjj7.js.gz +0 -0
- package/web/chunk-yp75a6yh.js.br +0 -0
- package/web/chunk-yp75a6yh.js.gz +0 -0
- package/web/chunk-zs7c2db4.js.br +0 -0
- package/web/chunk-zs7c2db4.js.gz +0 -0
- package/web/chunk-zsae1tn8.js.br +0 -0
- package/web/chunk-zsae1tn8.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{t,i,Ye,F,A,
|
|
1
|
+
import{t,i,Ye,F,A,q,Y,L,N,R,P,I,O,D,sa,J,Q,ec}from"./chunk-qzb06me8.js";import"./chunk-5a80hcah.js";import{gn}from"./chunk-pdxqp4rh.js";import{zt}from"./chunk-ef0wf92p.js";import{Rn}from"./chunk-drr7mqg2.js";function vt(e,s,n){e=+e,s=+s,n=(o=arguments.length)<2?(s=e,e=0,1):o<3?1:+n;var a=-1,o=Math.max(0,Math.ceil((s-e)/n))|0,c=Array(o);while(++a<o)c[a]=e+a*n;return c}function xt(){var e=zt().unknown(void 0),{domain:s,range:n}=e,a=0,o=1,c,l,f=!1,g=0,b=0,v=0.5;delete e.unknown;function _(){var w=s().length,H=o<a,z=H?o:a,V=H?a:o;if(c=(V-z)/Math.max(1,w-g+b*2),f)c=Math.floor(c);if(z+=(V-z-c*(w-g))*v,l=c*(1-g),f)z=Math.round(z),l=Math.round(l);var U=vt(w).map(function(it){return z+c*it});return n(H?U.reverse():U)}return e.domain=function(w){return arguments.length?(s(w),_()):s()},e.range=function(w){return arguments.length?([a,o]=w,a=+a,o=+o,_()):[a,o]},e.rangeRound=function(w){return[a,o]=w,a=+a,o=+o,f=!0,_()},e.bandwidth=function(){return l},e.step=function(){return c},e.round=function(w){return arguments.length?(f=!!w,_()):f},e.padding=function(w){return arguments.length?(g=Math.min(1,b=+w),_()):g},e.paddingInner=function(w){return arguments.length?(g=Math.min(1,w),_()):g},e.paddingOuter=function(w){return arguments.length?(b=+w,_()):b},e.align=function(w){return arguments.length?(v=Math.max(0,Math.min(1,w)),_()):v},e.copy=function(){return xt(s(),[a,o]).round(f).paddingInner(g).paddingOuter(b).align(v)},Rn.apply(_(),arguments)}var Pt=function(){var e=t(function(Z,h,u,x){for(u=u||{},x=Z.length;x--;u[Z[x]]=h);return u},"o"),s=[1,10,12,14,16,18,19,21,23],n=[2,6],a=[1,3],o=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],g=[1,25],b=[1,26],v=[1,28],_=[1,29],w=[1,30],H=[1,31],z=[1,32],V=[1,33],U=[1,34],it=[1,35],nt=[1,36],k=[1,37],j=[1,43],d=[1,42],G=[1,47],K=[1,50],S=[1,10,12,14,16,18,19,21,23,36,37,38],ot=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],W=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],gt=[1,65],M=[26,28],C={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:t(function(h,u,x,p,T,r,rt){var m=r.length-1;switch(T){case 5:p.setOrientation(r[m]);break;case 9:p.setDiagramTitle(r[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},r[m]);break;case 13:p.setLineData(r[m-1],r[m]);break;case 14:p.setBarData({text:"",type:"text"},r[m]);break;case 15:p.setBarData(r[m-1],r[m]);break;case 16:this.$=r[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=r[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=r[m-1];break;case 20:case 30:this.$=[r[m-2],...r[m]];break;case 21:case 31:this.$=[r[m]];break;case 22:this.$={value:Number(r[m-1]),label:r[m]};break;case 23:this.$={value:Number(r[m]),label:""};break;case 24:p.setXAxisTitle(r[m]);break;case 25:p.setXAxisTitle(r[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(r[m]);break;case 28:p.setXAxisRangeData(Number(r[m-2]),Number(r[m]));break;case 29:this.$=r[m-1];break;case 32:p.setYAxisTitle(r[m]);break;case 33:p.setYAxisTitle(r[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(r[m-2]),Number(r[m]));break;case 39:this.$={text:r[m],type:"text"};break;case 40:this.$={text:r[m],type:"text"};break;case 41:this.$={text:r[m],type:"markdown"};break;case 42:this.$=r[m];break;case 43:this.$=r[m-1]+""+r[m];break}},"anonymous"),table:[e(s,n,{3:1,4:2,7:4,5:a,36:o,37:c,38:l}),{1:[3]},e(s,n,{4:2,7:4,3:8,5:a,36:o,37:c,38:l}),e(s,n,{4:2,7:4,6:9,3:10,5:a,8:[1,11],36:o,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(f,[2,36]),e(f,[2,37]),e(f,[2,38]),{1:[2,1]},e(s,n,{4:2,7:4,3:21,5:a,36:o,37:c,38:l}),{1:[2,3]},e(f,[2,5]),e(s,[2,7],{4:22,36:o,37:c,38:l}),{11:23,30:g,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{11:39,13:38,24:j,29:d,30:g,31:40,32:41,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{11:45,15:44,29:G,30:g,35:46,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{11:49,17:48,24:K,30:g,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{11:52,17:51,24:K,30:g,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(ot,[2,39],{41:55,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k}),e(ot,[2,40]),e(ot,[2,41]),e(W,[2,42]),e(W,[2,44]),e(W,[2,45]),e(W,[2,46]),e(W,[2,47]),e(W,[2,48]),e(W,[2,49]),e(W,[2,50]),e(W,[2,51]),e(W,[2,52]),e(W,[2,53]),e(S,[2,10]),e(S,[2,24],{32:41,31:56,24:j,29:d}),e(S,[2,26]),e(S,[2,27]),{33:[1,57]},{11:59,30:g,34:58,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},e(S,[2,11]),e(S,[2,32],{35:60,29:G}),e(S,[2,34]),{33:[1,61]},e(S,[2,12]),{17:62,24:K},{25:63,27:64,29:gt},e(S,[2,14]),{17:66,24:K},e(S,[2,16]),e(S,[2,17]),e(W,[2,43]),e(S,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(S,[2,33]),{29:[1,70]},e(S,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(S,[2,15]),e(S,[2,28]),e(S,[2,29]),{11:59,30:g,34:74,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},e(S,[2,35]),e(S,[2,19]),{25:75,27:64,29:gt},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:t(function(h,u){if(u.recoverable)this.trace(h);else{var x=Error(h);throw x.hash=u,x}},"parseError"),parse:t(function(h){var u=this,x=[0],p=[],T=[null],r=[],rt=this.table,m="",bt=0,Nt=0,Ht=0,xe=2,$t=1,fe=r.slice.call(arguments,1),B=Object.create(this.lexer),ht={yy:{}};for(var St in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,St))ht.yy[St]=this.yy[St];if(B.setInput(h,ht.yy),ht.yy.lexer=B,ht.yy.parser=this,typeof B.yylloc>"u")B.yylloc={};var Rt=B.yylloc;r.push(Rt);var pe=B.options&&B.options.ranges;if(typeof ht.yy.parseError==="function")this.parseError=ht.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(et){x.length=x.length-2*et,T.length=T.length-et,r.length=r.length-et}t(me,"popStack");function Ut(){var et=p.pop()||B.lex()||$t;if(typeof et!=="number"){if(et instanceof Array)p=et,et=p.pop();et=u.symbols_[et]||et}return et}t(Ut,"lex");var X,_t,lt,tt,Be,Tt,ut={},yt,at,qt,wt;while(!0){if(lt=x[x.length-1],this.defaultActions[lt])tt=this.defaultActions[lt];else{if(X===null||typeof X>"u")X=Ut();tt=rt[lt]&&rt[lt][X]}if(typeof tt>"u"||!tt.length||!tt[0]){var Dt="";wt=[];for(yt in rt[lt])if(this.terminals_[yt]&&yt>xe)wt.push("'"+this.terminals_[yt]+"'");if(B.showPosition)Dt="Parse error on line "+(bt+1)+`:
|
|
2
2
|
`+B.showPosition()+`
|
|
3
|
-
Expecting `+wt.join(", ")+", got '"+(this.terminals_[
|
|
3
|
+
Expecting `+wt.join(", ")+", got '"+(this.terminals_[X]||X)+"'";else Dt="Parse error on line "+(bt+1)+": Unexpected "+(X==$t?"end of input":"'"+(this.terminals_[X]||X)+"'");this.parseError(Dt,{text:B.match,token:this.terminals_[X]||X,line:B.yylineno,loc:Rt,expected:wt})}if(tt[0]instanceof Array&&tt.length>1)throw Error("Parse Error: multiple actions possible at state: "+lt+", token: "+X);switch(tt[0]){case 1:if(x.push(X),T.push(B.yytext),r.push(B.yylloc),x.push(tt[1]),X=null,!_t){if(Nt=B.yyleng,m=B.yytext,bt=B.yylineno,Rt=B.yylloc,Ht>0)Ht--}else X=_t,_t=null;break;case 2:if(at=this.productions_[tt[1]][1],ut.$=T[T.length-at],ut._$={first_line:r[r.length-(at||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(at||1)].first_column,last_column:r[r.length-1].last_column},pe)ut._$.range=[r[r.length-(at||1)].range[0],r[r.length-1].range[1]];if(Tt=this.performAction.apply(ut,[m,Nt,bt,ht.yy,tt[1],T,r].concat(fe)),typeof Tt<"u")return Tt;if(at)x=x.slice(0,-1*at*2),T=T.slice(0,-1*at),r=r.slice(0,-1*at);x.push(this.productions_[tt[1]][0]),T.push(ut.$),r.push(ut._$),qt=rt[x[x.length-2]][x[x.length-1]],x.push(qt);break;case 3:return!0}}return!0},"parse")},st=function(){var Z={EOF:1,parseError:t(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw Error(u)},"parseError"),setInput:t(function(h,u){if(this.yy=u||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);if(u)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),h},"input"),unput:t(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var p=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),x.length-1)this.yylineno-=x.length-1;var T=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:x?(x.length===p.length?this.yylloc.first_column:0)+p[p.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges)this.yylloc.range=[T[0],T[0]+this.yyleng-u];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(h){this.unput(this.match.slice(h))},"less"),pastInput:t(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var h=this.pastInput(),u=Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
5
|
`+u+"^"},"showPosition"),test_match:t(function(h,u){var x,p,T;if(this.options.backtrack_lexer){if(T={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)T.yylloc.range=this.yylloc.range.slice(0)}if(p=h[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],x=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(x)return x;else if(this._backtrack){for(var r in T)this[r]=T[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var h,u,x,p;if(!this._more)this.yytext="",this.match="";var T=this._currentRules();for(var r=0;r<T.length;r++)if(x=this._input.match(this.rules[T[r]]),x&&(!u||x[0].length>u[0].length)){if(u=x,p=r,this.options.backtrack_lexer)if(h=this.test_match(x,T[r]),h!==!1)return h;else if(this._backtrack){u=!1;continue}else return!1;else if(!this.options.flex)break}if(u){if(h=this.test_match(u,T[p]),h!==!1)return h;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 u=this.next();if(u)return u;else return this.lex()},"lex"),begin:t(function(u){this.conditionStack.push(u)},"begin"),popState:t(function(){var u=this.conditionStack.length-1;if(u>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(u){if(u=this.conditionStack.length-1-Math.abs(u||0),u>=0)return this.conditionStack[u];else return"INITIAL"},"topState"),pushState:t(function(u){this.begin(u)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(u,x,p,T){var r=T;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return K}();C.lexer=st;function E(){this.yy={}}return t(E,"Parser"),E.prototype=C,C.Parser=E,new E}();Pt.parser=Pt;var be=Pt;function kt(e){return e.type==="bar"}t(kt,"isBarPlot");function At(e){return e.type==="band"}t(At,"isBandAxisData");function dt(e){return e.type==="linear"}t(dt,"isLinearAxisData");var It=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,s){if(!this.parentGroup)return{width:e.reduce((g,b)=>Math.max(b.length,g),0)*s,height:s};let n={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",s),o=a.node()?.getScreenCTM?.(),c=t((g)=>g&&g>0?g:1,"toScale"),l=c(o?.a),f=c(o?.d);for(let g of e){let b=ec(a,1,g),v=b?b.width/l:g.length*s,_=b?b.height/f:s;n.width=Math.max(n.width,v),n.height=Math.max(n.height,_)}return a.remove(),n}},Gt=0.7,jt=0.2,Qt=class{constructor(e,s,n,a){this.axisConfig=e,this.title=s,this.textDimensionCalculator=n,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Gt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Gt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let s=e.height;if(this.axisConfig.showAxisLine&&s>this.axisConfig.axisLineWidth)s-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let n=this.getLabelDimension(),a=jt*e.width;this.outerPadding=Math.min(n.width/2,a);let o=n.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)o=Math.max(o,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height));if(o+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,o<=s)s-=o,this.showLabel=!0}if(this.axisConfig.showTick&&s>=this.axisConfig.tickLength)this.showTick=!0,s-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=n.height,a<=s)s-=a,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-s}calculateSpaceIfDrawnVertical(e){let s=e.width;if(this.axisConfig.showAxisLine&&s>this.axisConfig.axisLineWidth)s-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let n=this.getLabelDimension(),a=jt*e.height;this.outerPadding=Math.min(n.height/2,a);let o=n.width+this.axisConfig.labelPadding*2;if(o<=s)s-=o,this.showLabel=!0}if(this.axisConfig.showTick&&s>=this.axisConfig.tickLength)this.showTick=!0,s-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=n.height,a<=s)s-=a,this.showTitle=!0}this.boundingRect.width=e.width-s,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let s=this.normalizedLabelRotationInRad;if(s===0)return 0;return Math.sin(s)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${s},${this.boundingRect.y} L ${s},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(s),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let s=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${s},${this.getScaleValue(n)} L ${s-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${s} L ${this.boundingRect.x+this.boundingRect.width},${s}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.getScaleValue(s)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let s=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${this.getScaleValue(n)},${s} L ${this.getScaleValue(n)},${s+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${s} L ${this.boundingRect.x+this.boundingRect.width},${s}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.getScaleValue(s),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let s=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${this.getScaleValue(n)},${s+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${s+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends Qt{static{t(this,"BandAxis")}constructor(e,s,n,a,o){super(e,a,o,s);this.categories=n,this.scale=xt().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=xt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),i.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends Qt{static{t(this,"LinearAxis")}constructor(e,s,n,a,o){super(e,a,o,s);this.domain=n,this.scale=gn().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=gn().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Lt(e,s,n,a){let o=new It(a);if(At(e))return new ye(s,n,e.categories,e.title,o);return new we(s,n,[e.min,e.max],e.title,o)}t(Lt,"getAxis");var ke=class{constructor(e,s,n,a){this.textDimensionCalculator=e,this.chartConfig=s,this.chartData=n,this.chartThemeConfig=a,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let s=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(s.width,e.width),a=s.height+2*this.chartConfig.titlePadding;if(a<=e.height&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=n,this.boundingRect.height=a,this.titleWidth=s.width,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(e,s){let n=Math.min(this.titleWidth,this.chartConfig.width)/2,a=Math.min(Math.max((e+s)/2,n),this.chartConfig.width-n);this.boundingRect.x=a-n,this.boundingRect.width=n*2}getDrawableElements(){let e=[];if(this.showChartTitle)e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return e}};function Kt(e,s,n,a){let o=new It(a);return new ke(o,e,s,n)}t(Kt,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function Et(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Et,"getLegendLayout");var Re=class{constructor(e,s,n,a){this.textDimensionCalculator=e,this.chartConfig=s,this.chartData=n,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((g)=>g.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:s,markerSize:n,markerSpacing:a,itemSpacing:o}=Et(this.chartConfig.legendFontSize),c=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((g)=>g.title),s),l=this.chartConfig.legendPadding*2+n+a+c.width,f=this.chartConfig.legendPadding*2+this.visiblePlots.length*s+(this.visiblePlots.length-1)*o;if(l<=e.width&&f<=e.height)this.boundingRect.width=l,this.boundingRect.height=f;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:s,markerSpacing:n,itemSpacing:a}=Et(this.chartConfig.legendFontSize),o=e+a,c=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,f=[],g=[];for(let[b,v]of this.visiblePlots.entries())if(kt(v))f.push({x:c,y:l+b*o,width:s,height:s,fill:v.fill,strokeFill:v.fill,strokeWidth:0});else{let _=l+b*o+s/2;g.push({path:`M ${c},${_} L ${c+s},${_}`,strokeFill:v.strokeFill,strokeWidth:v.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:f},{groupTexts:["legend","markers"],type:"path",data:g},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((b,v)=>({text:b.title,x:c+s+n,y:l+v*o+s/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function Zt(e,s,n,a){let o=new It(a);return new Re(o,e,s,n)}t(Zt,"getChartLegendComponent");var _e=class{constructor(e,s,n,a,o){this.plotData=e,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=o}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),s;if(this.orientation==="horizontal")s=sa().y((a)=>a[0]).x((a)=>a[1])(e);else s=sa().x((a)=>a[0]).y((a)=>a[1])(e);if(!s)return[];let n=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:s,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let c=[];for(let[l,[f,g]]of e.entries()){let b=this.plotData.pointLabels[l];if(!b)continue;if(this.orientation==="horizontal")c.push({x:g+10,y:f,text:b,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else c.push({x:f,y:g-10,text:b,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(c.length>0)n.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:c})}return n}},Te=class{constructor(e,s,n,a,o,c){this.barData=e,this.boundingRect=s,this.xAxis=n,this.yAxis=a,this.orientation=o,this.plotIndex=c}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((o)=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=0.05,n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,a=n/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((o)=>({x:this.boundingRect.x,y:o[0]-a,height:n,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((o)=>({x:o[0]-a,y:o[1],width:n,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,s,n){this.chartConfig=e,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,s){this.xAxis=e,this.yAxis=s}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[s,n]of this.chartData.plots.entries())switch(n.type){case"line":{let a=new _e(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,s);e.push(...a.getDrawableElement())}break;case"bar":{let a=new Te(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,s);e.push(...a.getDrawableElement())}break}return e}};function Jt(e,s,n){return new De(e,s,n)}t(Jt,"getPlotComponent");var ve=class{constructor(e,s,n,a){this.chartConfig=e,this.chartData=s,this.componentStore={title:Kt(e,s,n,a),plot:Jt(e,s,n),legend:Zt(e,s,n,a),xAxis:Lt(s.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},a),yAxis:Lt(s.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},a)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,s=this.chartConfig.height,n=0,a=0,o={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(s*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:l});if(e-=f.width,s-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:s}),a=f.height,s-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:e,height:s}),s-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:e,height:s}),n=f.width,e-=f.width,o=this.componentStore.legend.calculateSpace({width:e,height:l}),e-=o.width,e>0)c+=e,e=0;if(s>0)l+=s,s=0;if(this.componentStore.plot.calculateSpace({width:c,height:l}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.title.alignTo(n,n+c),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((l-o.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+c]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:a+l}),this.componentStore.yAxis.setRange([a,a+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((g)=>kt(g)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,s=this.chartConfig.height,n=0,a=0,o=0,c={width:0,height:0},l=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(s*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:l,height:f});if(e-=g.width,s-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:s}),n=g.height,s-=g.height,this.componentStore.xAxis.setAxisPosition("left"),g=this.componentStore.xAxis.calculateSpace({width:e,height:s}),e-=g.width,a=g.width,this.componentStore.yAxis.setAxisPosition("top"),g=this.componentStore.yAxis.calculateSpace({width:e,height:s}),s-=g.height,o=n+g.height,c=this.componentStore.legend.calculateSpace({width:e,height:f}),e-=c.width,e>0)l+=e,e=0;if(s>0)f+=s,s=0;if(this.componentStore.plot.calculateSpace({width:l,height:f}),this.componentStore.plot.setBoundingBoxXY({x:a,y:o}),this.componentStore.title.alignTo(a,a+l),this.componentStore.legend.setBoundingBoxXY({x:a+l,y:o+Math.max((f-c.height)/2,0)}),this.componentStore.yAxis.setRange([a,a+l]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:n}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some((b)=>kt(b)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let s of Object.values(this.componentStore))e.push(...s.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,s,n,a){return new ve(e,s,n,a).getDrawableElement()}},ft=0,te,pt=Vt(),mt=Ot(),y=Wt(),Mt=mt.plotColorPalette.split(",").map((e)=>e.trim()),Ct=!1,Bt=!1;function Ot(){let e=Ye(),s=A();return Z(e.xyChart,s.themeVariables.xyChart)}t(Ot,"getChartDefaultThemeConfig");function Vt(){let e=A();return Z(F.xyChart,e.xyChart)}t(Vt,"getChartDefaultConfig");function Wt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Wt,"getChartDefaultData");function ct(e){let s=A();return j(e.trim(),s)}t(ct,"textSanitizer");function ee(e){te=e}t(ee,"setTmpSVGG");function ie(e){if(e==="horizontal")pt.chartOrientation="horizontal";else pt.chartOrientation="vertical"}t(ie,"setOrientation");function se(e){y.xAxis.title=ct(e.text)}t(se,"setXAxisTitle");function Ft(e,s){y.xAxis={type:"linear",title:y.xAxis.title,min:e,max:s},Ct=!0}t(Ft,"setXAxisRangeData");function ne(e){y.xAxis={type:"band",title:y.xAxis.title,categories:e.map((s)=>ct(s.text))},Ct=!0}t(ne,"setXAxisBand");function ae(e){y.yAxis.title=ct(e.text)}t(ae,"setYAxisTitle");function oe(e,s){y.yAxis={type:"linear",title:y.yAxis.title,min:e,max:s},Bt=!0}t(oe,"setYAxisRangeData");function re(e){let s=Math.min(...e),n=Math.max(...e),a=dt(y.yAxis)?y.yAxis.min:1/0,o=dt(y.yAxis)?y.yAxis.max:-1/0;y.yAxis={type:"linear",title:y.yAxis.title,min:Math.min(a,s),max:Math.max(o,n)}}t(re,"setYAxisRangeFromPlotData");function Xt(e){let s=[];if(e.length===0)return s;if(!Ct){let n=dt(y.xAxis)?y.xAxis.min:1/0,a=dt(y.xAxis)?y.xAxis.max:-1/0;Ft(Math.min(n,1),Math.max(a,e.length))}if(At(y.xAxis)&&e.length>y.xAxis.categories.length)e=e.slice(0,y.xAxis.categories.length);if(!Bt)re(e);if(At(y.xAxis))s=y.xAxis.categories.map((n,a)=>[n,e[a]]);if(dt(y.xAxis)){let n=y.xAxis.min,a=y.xAxis.max;if(e.length===1)s=[[`${n}`,e[0]]];else{let o=(a-n)/(e.length-1);s=e.map((c,l)=>[`${n+l*o}`,c])}}return s}t(Xt,"transformDataWithoutCategory");function Yt(e){return Mt[e===0?0:e%Mt.length]}t(Yt,"getPlotColorFromPalette");function he(e,s){let n=s.map((l)=>l.value),a=s.map((l)=>l.label?ct(l.label):""),o=Xt(n),c=a.some((l)=>l!=="");y.plots.push({type:"line",title:ct(e.text),strokeFill:Yt(ft),strokeWidth:2,data:o,...c?{pointLabels:a}:{}}),ft++}t(he,"setLineData");function le(e,s){let n=s.map((o)=>o.value),a=Xt(n);y.plots.push({type:"bar",title:ct(e.text),fill:Yt(ft),data:a}),ft++}t(le,"setBarData");function ce(){if(y.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return y.title=D(),Pe.build(pt,y,mt,te)}t(ce,"getDrawableElem");function ge(){return mt}t(ge,"getChartThemeConfig");function ue(){return pt}t(ue,"getChartConfig");function de(){return y}t(de,"getXYChartData");var Le=t(function(){L(),ft=0,pt=Vt(),y=Wt(),mt=Ot(),Mt=mt.plotColorPalette.split(",").map((e)=>e.trim()),Ct=!1,Bt=!1},"clear"),Ee={getDrawableElem:ce,clear:Le,setAccTitle:N,getAccTitle:R,setDiagramTitle:O,getDiagramTitle:D,getAccDescription:I,setAccDescription:P,setOrientation:ie,setXAxisTitle:se,setXAxisRangeData:Ft,setXAxisBand:ne,setYAxisTitle:ae,setYAxisRangeData:oe,setLineData:he,setBarData:le,setTmpSVGG:ee,getChartThemeConfig:ge,getChartConfig:ue,getXYChartData:de},Me=t((e,s,n,a)=>{let o=a.db,c=o.getChartThemeConfig(),l=o.getChartConfig(),f=o.getXYChartData().plots[0].data.map((k)=>k[1]);function g(k){return k==="top"?"text-before-edge":"middle"}t(g,"getDominantBaseLine");function b(k){return k==="left"?"start":k==="right"?"end":"middle"}t(b,"getTextAnchor");function v(k){return`translate(${k.x}, ${k.y}) rotate(${k.rotation||0})`}t(v,"getTextTransformation"),i.debug(`Rendering xychart chart
|
|
7
|
-
`+e);let _=J(s),w=_.append("g").attr("class","main"),H=w.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var u=this.next();if(u)return u;else return this.lex()},"lex"),begin:t(function(u){this.conditionStack.push(u)},"begin"),popState:t(function(){var u=this.conditionStack.length-1;if(u>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(u){if(u=this.conditionStack.length-1-Math.abs(u||0),u>=0)return this.conditionStack[u];else return"INITIAL"},"topState"),pushState:t(function(u){this.begin(u)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(u,x,p,T){var r=T;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return Z}();C.lexer=st;function E(){this.yy={}}return t(E,"Parser"),E.prototype=C,C.Parser=E,new E}();Pt.parser=Pt;var be=Pt;function kt(e){return e.type==="bar"}t(kt,"isBarPlot");function At(e){return e.type==="band"}t(At,"isBandAxisData");function dt(e){return e.type==="linear"}t(dt,"isLinearAxisData");var It=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,s){if(!this.parentGroup)return{width:e.reduce((g,b)=>Math.max(b.length,g),0)*s,height:s};let n={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",s),o=a.node()?.getScreenCTM?.(),c=t((g)=>g&&g>0?g:1,"toScale"),l=c(o?.a),f=c(o?.d);for(let g of e){let b=ec(a,1,g),v=b?b.width/l:g.length*s,_=b?b.height/f:s;n.width=Math.max(n.width,v),n.height=Math.max(n.height,_)}return a.remove(),n}},Gt=0.7,jt=0.2,Qt=class{constructor(e,s,n,a){this.axisConfig=e,this.title=s,this.textDimensionCalculator=n,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Gt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Gt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let s=e.height;if(this.axisConfig.showAxisLine&&s>this.axisConfig.axisLineWidth)s-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let n=this.getLabelDimension(),a=jt*e.width;this.outerPadding=Math.min(n.width/2,a);let o=n.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)o=Math.max(o,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height));if(o+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,o<=s)s-=o,this.showLabel=!0}if(this.axisConfig.showTick&&s>=this.axisConfig.tickLength)this.showTick=!0,s-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=n.height,a<=s)s-=a,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-s}calculateSpaceIfDrawnVertical(e){let s=e.width;if(this.axisConfig.showAxisLine&&s>this.axisConfig.axisLineWidth)s-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let n=this.getLabelDimension(),a=jt*e.height;this.outerPadding=Math.min(n.height/2,a);let o=n.width+this.axisConfig.labelPadding*2;if(o<=s)s-=o,this.showLabel=!0}if(this.axisConfig.showTick&&s>=this.axisConfig.tickLength)this.showTick=!0,s-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=n.height,a<=s)s-=a,this.showTitle=!0}this.boundingRect.width=e.width-s,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let s=this.normalizedLabelRotationInRad;if(s===0)return 0;return Math.sin(s)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${s},${this.boundingRect.y} L ${s},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(s),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let s=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${s},${this.getScaleValue(n)} L ${s-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${s} L ${this.boundingRect.x+this.boundingRect.width},${s}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.getScaleValue(s)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let s=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${this.getScaleValue(n)},${s} L ${this.getScaleValue(n)},${s+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${s} L ${this.boundingRect.x+this.boundingRect.width},${s}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.getScaleValue(s),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let s=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${this.getScaleValue(n)},${s+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${s+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends Qt{static{t(this,"BandAxis")}constructor(e,s,n,a,o){super(e,a,o,s);this.categories=n,this.scale=xt().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=xt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),i.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends Qt{static{t(this,"LinearAxis")}constructor(e,s,n,a,o){super(e,a,o,s);this.domain=n,this.scale=gn().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=gn().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Lt(e,s,n,a){let o=new It(a);if(At(e))return new ye(s,n,e.categories,e.title,o);return new we(s,n,[e.min,e.max],e.title,o)}t(Lt,"getAxis");var ke=class{constructor(e,s,n,a){this.textDimensionCalculator=e,this.chartConfig=s,this.chartData=n,this.chartThemeConfig=a,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let s=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(s.width,e.width),a=s.height+2*this.chartConfig.titlePadding;if(a<=e.height&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=n,this.boundingRect.height=a,this.titleWidth=s.width,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(e,s){let n=Math.min(this.titleWidth,this.chartConfig.width)/2,a=Math.min(Math.max((e+s)/2,n),this.chartConfig.width-n);this.boundingRect.x=a-n,this.boundingRect.width=n*2}getDrawableElements(){let e=[];if(this.showChartTitle)e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return e}};function Kt(e,s,n,a){let o=new It(a);return new ke(o,e,s,n)}t(Kt,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function Et(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Et,"getLegendLayout");var Re=class{constructor(e,s,n,a){this.textDimensionCalculator=e,this.chartConfig=s,this.chartData=n,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((g)=>g.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:s,markerSize:n,markerSpacing:a,itemSpacing:o}=Et(this.chartConfig.legendFontSize),c=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((g)=>g.title),s),l=this.chartConfig.legendPadding*2+n+a+c.width,f=this.chartConfig.legendPadding*2+this.visiblePlots.length*s+(this.visiblePlots.length-1)*o;if(l<=e.width&&f<=e.height)this.boundingRect.width=l,this.boundingRect.height=f;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:s,markerSpacing:n,itemSpacing:a}=Et(this.chartConfig.legendFontSize),o=e+a,c=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,f=[],g=[];for(let[b,v]of this.visiblePlots.entries())if(kt(v))f.push({x:c,y:l+b*o,width:s,height:s,fill:v.fill,strokeFill:v.fill,strokeWidth:0});else{let _=l+b*o+s/2;g.push({path:`M ${c},${_} L ${c+s},${_}`,strokeFill:v.strokeFill,strokeWidth:v.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:f},{groupTexts:["legend","markers"],type:"path",data:g},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((b,v)=>({text:b.title,x:c+s+n,y:l+v*o+s/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function Zt(e,s,n,a){let o=new It(a);return new Re(o,e,s,n)}t(Zt,"getChartLegendComponent");var _e=class{constructor(e,s,n,a,o){this.plotData=e,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=o}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),s;if(this.orientation==="horizontal")s=sa().y((a)=>a[0]).x((a)=>a[1])(e);else s=sa().x((a)=>a[0]).y((a)=>a[1])(e);if(!s)return[];let n=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:s,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let c=[];for(let[l,[f,g]]of e.entries()){let b=this.plotData.pointLabels[l];if(!b)continue;if(this.orientation==="horizontal")c.push({x:g+10,y:f,text:b,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else c.push({x:f,y:g-10,text:b,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(c.length>0)n.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:c})}return n}},Te=class{constructor(e,s,n,a,o,c){this.barData=e,this.boundingRect=s,this.xAxis=n,this.yAxis=a,this.orientation=o,this.plotIndex=c}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((o)=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=0.05,n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,a=n/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((o)=>({x:this.boundingRect.x,y:o[0]-a,height:n,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((o)=>({x:o[0]-a,y:o[1],width:n,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,s,n){this.chartConfig=e,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,s){this.xAxis=e,this.yAxis=s}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[s,n]of this.chartData.plots.entries())switch(n.type){case"line":{let a=new _e(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,s);e.push(...a.getDrawableElement())}break;case"bar":{let a=new Te(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,s);e.push(...a.getDrawableElement())}break}return e}};function Jt(e,s,n){return new De(e,s,n)}t(Jt,"getPlotComponent");var ve=class{constructor(e,s,n,a){this.chartConfig=e,this.chartData=s,this.componentStore={title:Kt(e,s,n,a),plot:Jt(e,s,n),legend:Zt(e,s,n,a),xAxis:Lt(s.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},a),yAxis:Lt(s.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},a)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,s=this.chartConfig.height,n=0,a=0,o={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(s*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:l});if(e-=f.width,s-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:s}),a=f.height,s-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:e,height:s}),s-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:e,height:s}),n=f.width,e-=f.width,o=this.componentStore.legend.calculateSpace({width:e,height:l}),e-=o.width,e>0)c+=e,e=0;if(s>0)l+=s,s=0;if(this.componentStore.plot.calculateSpace({width:c,height:l}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.title.alignTo(n,n+c),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((l-o.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+c]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:a+l}),this.componentStore.yAxis.setRange([a,a+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((g)=>kt(g)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,s=this.chartConfig.height,n=0,a=0,o=0,c={width:0,height:0},l=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(s*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:l,height:f});if(e-=g.width,s-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:s}),n=g.height,s-=g.height,this.componentStore.xAxis.setAxisPosition("left"),g=this.componentStore.xAxis.calculateSpace({width:e,height:s}),e-=g.width,a=g.width,this.componentStore.yAxis.setAxisPosition("top"),g=this.componentStore.yAxis.calculateSpace({width:e,height:s}),s-=g.height,o=n+g.height,c=this.componentStore.legend.calculateSpace({width:e,height:f}),e-=c.width,e>0)l+=e,e=0;if(s>0)f+=s,s=0;if(this.componentStore.plot.calculateSpace({width:l,height:f}),this.componentStore.plot.setBoundingBoxXY({x:a,y:o}),this.componentStore.title.alignTo(a,a+l),this.componentStore.legend.setBoundingBoxXY({x:a+l,y:o+Math.max((f-c.height)/2,0)}),this.componentStore.yAxis.setRange([a,a+l]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:n}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some((b)=>kt(b)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let s of Object.values(this.componentStore))e.push(...s.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,s,n,a){return new ve(e,s,n,a).getDrawableElement()}},ft=0,te,pt=Vt(),mt=Ot(),y=Wt(),Mt=mt.plotColorPalette.split(",").map((e)=>e.trim()),Ct=!1,Bt=!1;function Ot(){let e=Ye(),s=A();return Q(e.xyChart,s.themeVariables.xyChart)}t(Ot,"getChartDefaultThemeConfig");function Vt(){let e=A();return Q(F.xyChart,e.xyChart)}t(Vt,"getChartDefaultConfig");function Wt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Wt,"getChartDefaultData");function ct(e){let s=A();return q(e.trim(),s)}t(ct,"textSanitizer");function ee(e){te=e}t(ee,"setTmpSVGG");function ie(e){if(e==="horizontal")pt.chartOrientation="horizontal";else pt.chartOrientation="vertical"}t(ie,"setOrientation");function se(e){y.xAxis.title=ct(e.text)}t(se,"setXAxisTitle");function Ft(e,s){y.xAxis={type:"linear",title:y.xAxis.title,min:e,max:s},Ct=!0}t(Ft,"setXAxisRangeData");function ne(e){y.xAxis={type:"band",title:y.xAxis.title,categories:e.map((s)=>ct(s.text))},Ct=!0}t(ne,"setXAxisBand");function ae(e){y.yAxis.title=ct(e.text)}t(ae,"setYAxisTitle");function oe(e,s){y.yAxis={type:"linear",title:y.yAxis.title,min:e,max:s},Bt=!0}t(oe,"setYAxisRangeData");function re(e){let s=Math.min(...e),n=Math.max(...e),a=dt(y.yAxis)?y.yAxis.min:1/0,o=dt(y.yAxis)?y.yAxis.max:-1/0;y.yAxis={type:"linear",title:y.yAxis.title,min:Math.min(a,s),max:Math.max(o,n)}}t(re,"setYAxisRangeFromPlotData");function Xt(e){let s=[];if(e.length===0)return s;if(!Ct){let n=dt(y.xAxis)?y.xAxis.min:1/0,a=dt(y.xAxis)?y.xAxis.max:-1/0;Ft(Math.min(n,1),Math.max(a,e.length))}if(At(y.xAxis)&&e.length>y.xAxis.categories.length)e=e.slice(0,y.xAxis.categories.length);if(!Bt)re(e);if(At(y.xAxis))s=y.xAxis.categories.map((n,a)=>[n,e[a]]);if(dt(y.xAxis)){let n=y.xAxis.min,a=y.xAxis.max;if(e.length===1)s=[[`${n}`,e[0]]];else{let o=(a-n)/(e.length-1);s=e.map((c,l)=>[`${n+l*o}`,c])}}return s}t(Xt,"transformDataWithoutCategory");function Yt(e){return Mt[e===0?0:e%Mt.length]}t(Yt,"getPlotColorFromPalette");function he(e,s){let n=s.map((l)=>l.value),a=s.map((l)=>l.label?ct(l.label):""),o=Xt(n),c=a.some((l)=>l!=="");y.plots.push({type:"line",title:ct(e.text),strokeFill:Yt(ft),strokeWidth:2,data:o,...c?{pointLabels:a}:{}}),ft++}t(he,"setLineData");function le(e,s){let n=s.map((o)=>o.value),a=Xt(n);y.plots.push({type:"bar",title:ct(e.text),fill:Yt(ft),data:a}),ft++}t(le,"setBarData");function ce(){if(y.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return y.title=D(),Pe.build(pt,y,mt,te)}t(ce,"getDrawableElem");function ge(){return mt}t(ge,"getChartThemeConfig");function ue(){return pt}t(ue,"getChartConfig");function de(){return y}t(de,"getXYChartData");var Le=t(function(){L(),ft=0,pt=Vt(),y=Wt(),mt=Ot(),Mt=mt.plotColorPalette.split(",").map((e)=>e.trim()),Ct=!1,Bt=!1},"clear"),Ee={getDrawableElem:ce,clear:Le,setAccTitle:N,getAccTitle:R,setDiagramTitle:O,getDiagramTitle:D,getAccDescription:I,setAccDescription:P,setOrientation:ie,setXAxisTitle:se,setXAxisRangeData:Ft,setXAxisBand:ne,setYAxisTitle:ae,setYAxisRangeData:oe,setLineData:he,setBarData:le,setTmpSVGG:ee,getChartThemeConfig:ge,getChartConfig:ue,getXYChartData:de},Me=t((e,s,n,a)=>{let o=a.db,c=o.getChartThemeConfig(),l=o.getChartConfig(),f=o.getXYChartData().plots[0].data.map((k)=>k[1]);function g(k){return k==="top"?"text-before-edge":"middle"}t(g,"getDominantBaseLine");function b(k){return k==="left"?"start":k==="right"?"end":"middle"}t(b,"getTextAnchor");function v(k){return`translate(${k.x}, ${k.y}) rotate(${k.rotation||0})`}t(v,"getTextTransformation"),i.debug(`Rendering xychart chart
|
|
7
|
+
`+e);let _=J(s),w=_.append("g").attr("class","main"),H=w.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");Y(_,l.height,l.width,!0),_.attr("viewBox",`0 0 ${l.width} ${l.height}`),H.attr("fill",c.backgroundColor),o.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let z=o.getDrawableElem(),V={};function U(k){let j=w,d="";for(let[G]of k.entries()){let K=w;if(G>0&&V[d])K=V[d];if(d+=k[G],j=V[d],!j)j=V[d]=K.append("g").attr("class",k[G])}return j}t(U,"getGroup");for(let k of z){if(k.data.length===0)continue;let j=U(k.groupTexts);switch(k.type){case"rect":if(j.selectAll("rect").data(k.data).enter().append("rect").attr("x",(d)=>d.x).attr("y",(d)=>d.y).attr("width",(d)=>d.width).attr("height",(d)=>d.height).attr("fill",(d)=>d.fill).attr("stroke",(d)=>d.strokeFill).attr("stroke-width",(d)=>d.strokeWidth),l.showDataLabel){let d=l.showDataLabelOutsideBar;if(l.chartOrientation==="horizontal"){let G=function(C,st){let{data:E,label:Z}=C;return st*Z.length*K<=E.width-S};var it=G;t(G,"fitsHorizontally");let K=0.7,S=10,ot=k.data.map((C,st)=>({data:C,label:f[st].toString()})).filter((C)=>C.data.width>0&&C.data.height>0),W=ot.map((C)=>{let{data:st}=C,E=st.height*0.7;while(!G(C,E)&&E>0)E-=1;return E}),gt=Math.floor(Math.min(...W)),M=t((C)=>{if(d)return C.data.x+C.data.width+S;else return C.data.x+C.data.width-S},"determineLabelXPosition");j.selectAll("text").data(ot).enter().append("text").attr("x",M).attr("y",(C)=>C.data.y+C.data.height/2).attr("text-anchor",d?"start":"end").attr("dominant-baseline","middle").attr("fill",c.dataLabelColor).attr("font-size",`${gt}px`).text((C)=>C.label)}else{let G=function(M,C,st){let{data:E,label:Z}=M,h=0.7,u=C*Z.length*0.7,x=E.x+E.width/2,p=x-u/2,T=x+u/2,r=p>=E.x&&T<=E.x+E.width,rt=E.y+st+C<=E.y+E.height;return r&&rt};var nt=G;t(G,"fitsInBar");let K=10,S=k.data.map((M,C)=>({data:M,label:f[C].toString()})).filter((M)=>M.data.width>0&&M.data.height>0),ot=S.map((M)=>{let{data:C,label:st}=M,E=C.width/(st.length*0.7);while(!G(M,E,K)&&E>0)E-=1;return E}),W=Math.floor(Math.min(...ot)),gt=t((M)=>{if(d)return M.data.y-K;else return M.data.y+K},"determineLabelYPosition");j.selectAll("text").data(S).enter().append("text").attr("x",(M)=>M.data.x+M.data.width/2).attr("y",gt).attr("text-anchor","middle").attr("dominant-baseline",d?"auto":"hanging").attr("fill",c.dataLabelColor).attr("font-size",`${W}px`).text((M)=>M.label)}}break;case"text":j.selectAll("text").data(k.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(d)=>d.fill).attr("font-size",(d)=>d.fontSize).attr("dominant-baseline",(d)=>g(d.verticalPos)).attr("text-anchor",(d)=>b(d.horizontalPos)).attr("transform",(d)=>v(d)).text((d)=>d.text);break;case"path":j.selectAll("path").data(k.data).enter().append("path").attr("d",(d)=>d.path).attr("fill",(d)=>d.fill?d.fill:"none").attr("stroke",(d)=>d.strokeFill).attr("stroke-width",(d)=>d.strokeWidth);break}}},"draw"),Ie={draw:Me},Ze={parser:be,db:Ee,renderer:Ie};export{Ze as diagram};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ee,e,n,y}from"./chunk-
|
|
1
|
+
import{ee,e,n,y}from"./chunk-g5b4wjwp.js";import{Vn,Jr}from"./chunk-pe2zvyjt.js";import"./chunk-7qcmg5ns.js";function b({connection:p}){let{ModelSelector:d,Select:c,SettingGroup:s,SettingRow:l}=y(),m=ee(),i=Jr({connection:p,endpoint:"/api/plugins/prompt-optimizer/settings",loadError:"读取优化插件设置失败",toBody:(o)=>({schemaVersion:1,revision:o.revision,primaryModel:o.primaryModel,maxClarificationRounds:o.maxClarificationRounds}),differs:(o,t)=>o.primaryModel?.providerID!==t.primaryModel?.providerID||o.primaryModel?.modelID!==t.primaryModel?.modelID||o.maxClarificationRounds!==t.maxClarificationRounds}),r=i.settings?.primaryModel??null,u=r?`${r.providerID}/${r.modelID}`:"";return n("form",{id:m,onSubmit:i.save,className:"min-w-0 space-y-5",children:[e(s,{title:"模型",children:e(l,{title:"优化模型",description:"未选择时拒绝改写,不会自动回退到其他模型",children:e("div",{className:"w-56",children:e(d,{variant:"field",models:i.modelList,value:u,onChange:(o)=>{let t=o.indexOf("/"),a=t<0?"":o.slice(0,t),g=t<0?o:o.slice(t+1);i.edit((f)=>({...f,primaryModel:{providerID:a,modelID:g}}))}})})})}),e(s,{title:"交互",children:e(l,{title:"澄清提问轮数",description:"草稿有关键歧义时,模型最多可反问几轮",children:e("div",{className:"w-56",children:e(c,{value:String(i.settings?.maxClarificationRounds??1),disabled:i.loading||i.saving,onValueChange:(o)=>{let t=o==="2"?2:1;i.edit((a)=>({...a,maxClarificationRounds:t}))},groups:[{options:[{value:"1",label:"单轮澄清(推荐)",description:"提问一次后直接输出改写结果"},{value:"2",label:"最多两轮澄清",description:"首轮澄清后可针对残留疑问追问一次"}]}]})})})}),e(Vn,{formID:m,notice:i.notice,dirty:i.dirty,busy:i.loading||i.saving,saving:i.saving,onReset:i.reset})]})}export{b as PromptOptimizerSettingsSection};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,m,e,n,y,l,xe,
|
|
1
|
+
import{a,m,e,n,y,l,xe,ie,Z,Bt}from"./chunk-g5b4wjwp.js";var z=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],h=l("circle-slash",z);function B(t){if(!t||typeof t!=="object")return;if(!("id"in t)||typeof t.id!=="string")return;if(!("state"in t)||typeof t.state!=="string")return;return{id:t.id,state:t.state,command:"command"in t&&typeof t.command==="string"?t.command:void 0,code:"code"in t&&(t.code===null||typeof t.code==="number")?t.code:void 0,output:"output"in t&&typeof t.output==="string"?t.output:void 0}}function U(t){let{Button:N,Panel:b,style:k}=y(),s=B(t.payload),[o,r]=a(!1),[C,P]=a(!1),[c,u]=a();if(!s)return null;let i=C?"killed":s.state,d=i==="running",f=i==="exited"&&s.code===0,p=i==="killed"||i==="timeout",g=s.output?.trim(),I=async()=>{if(o)return;r(!0),u(void 0);try{await t.connection.request(`/api/sessions/${encodeURIComponent(t.sessionID)}/jobs/${encodeURIComponent(s.id)}/kill`,{method:"POST"}),P(!0)}catch(x){u(x instanceof Error?x.message:"停止失败,后台任务可能已结束")}finally{r(!1)}};return n(b,{className:"my-2",header:n(m,{children:[e(Bt,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-mono text-ink/90",title:s.command??s.id,children:s.command??`任务 ${s.id}`})]}),actions:n(m,{children:[d&&n(m,{children:[n("span",{className:"flex items-center gap-1 text-warning",children:[e(ie,{className:"size-3.5 animate-spin"}),e("span",{children:"后台运行中"})]}),e(N,{size:"sm",variant:"danger-ghost",className:"h-6 rounded-md px-2 text-xs",disabled:o,onClick:()=>{I()},children:"停止"})]}),f&&n("span",{className:"flex items-center gap-1 text-success",children:[e(Z,{className:"size-3.5"}),e("span",{children:"已完成"})]}),p&&n("span",{className:"flex items-center gap-1 text-faint",children:[e(h,{className:"size-3.5"}),e("span",{children:i==="timeout"?"已超时":"已停止"})]}),!d&&!f&&!p&&n("span",{className:"flex items-center gap-1 text-danger",children:[e(xe,{className:"size-3.5"}),n("span",{children:["退出码 ",s.code??"异常"]})]})]}),children:[c&&e("p",{role:"status",className:"border-b border-line px-4 py-2.5 text-xs text-danger",children:c}),g&&e("pre",{className:k("chat.toolOutput","max-h-60 text-ink/90 select-text"),children:g})]})}export{U as BashJobCard};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ns}from"./chunk-y5f7gy03.js";export{Ns as createGitGraphServices};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,i,g}from"./chunk-n59nyqcr.js";import{mn,ai}from"./chunk-2fms67zg.js";import{Ke,Ze}from"./chunk-xw8tzrmm.js";var k=Ze(function(F,Y){(function(f,r){if(typeof F==="object"&&typeof Y==="object")Y.exports=r(ai());else if(typeof define==="function"&&define.amd)define(["cose-base"],r);else if(typeof F==="object")F.cytoscapeCoseBilkent=r(ai());else f.cytoscapeCoseBilkent=r(f.coseBase)})(F,function(u){return function(f){var r={};function n(o){if(r[o])return r[o].exports;var d=r[o]={i:o,l:!1,exports:{}};return f[o].call(d.exports,d,d.exports,n),d.l=!0,d.exports}return n.m=f,n.c=r,n.i=function(o){return o},n.d=function(o,d,l){if(!n.o(o,d))Object.defineProperty(o,d,{configurable:!1,enumerable:!0,get:l})},n.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(d,"a",d),d},n.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},n.p="",n(n.s=1)}([function(f,r){f.exports=u},function(f,r,n){var o=n(0).layoutBase.LayoutConstants,d=n(0).layoutBase.FDLayoutConstants,l=n(0).CoSEConstants,L=n(0).CoSELayout,b=n(0).CoSENode,H=n(0).layoutBase.PointD,v=n(0).layoutBase.DimensionD,_={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:0.45,nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.5};function D(p,e){var y={};for(var s in p)y[s]=p[s];for(var s in e)y[s]=e[s];return y}function I(p){this.options=D(_,p),U(this.options)}var U=function(e){if(e.nodeRepulsion!=null)l.DEFAULT_REPULSION_STRENGTH=d.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion;if(e.idealEdgeLength!=null)l.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=e.idealEdgeLength;if(e.edgeElasticity!=null)l.DEFAULT_SPRING_STRENGTH=d.DEFAULT_SPRING_STRENGTH=e.edgeElasticity;if(e.nestingFactor!=null)l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor;if(e.gravity!=null)l.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=e.gravity;if(e.numIter!=null)l.MAX_ITERATIONS=d.MAX_ITERATIONS=e.numIter;if(e.gravityRange!=null)l.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange;if(e.gravityCompound!=null)l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound;if(e.gravityRangeCompound!=null)l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound;if(e.initialEnergyOnIncremental!=null)l.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental;if(e.quality=="draft")o.QUALITY=0;else if(e.quality=="proof")o.QUALITY=2;else o.QUALITY=1;l.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!e.randomize,l.ANIMATE=d.ANIMATE=o.ANIMATE=e.animate,l.TILE=e.tile,l.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==="function"?e.tilingPaddingVertical.call():e.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==="function"?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};I.prototype.run=function(){var p,e,y=this.options,s=this.idToLNode={},c=this.layout=new L,a=this;a.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var E=c.newGraphManager();this.gm=E;var T=this.options.eles.nodes(),m=this.options.eles.edges();this.root=E.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(T),c);for(var h=0;h<m.length;h++){var P=m[h],x=this.idToLNode[P.data("source")],O=this.idToLNode[P.data("target")];if(x!==O&&x.getEdgesBetween(O).length==0){var et=E.add(c.newEdge(),x,O);et.id=P.id()}}var V=function(R,B){if(typeof R==="number")R=B;var C=R.data("id"),G=a.idToLNode[C];return{x:G.getRect().getCenterX(),y:G.getRect().getCenterY()}},nt=function X(){var R=function(){if(y.fit)y.cy.fit(y.eles,y.padding);if(!p)p=!0,a.cy.one("layoutready",y.ready),a.cy.trigger({type:"layoutready",layout:a})},B=a.options.refresh,C;for(var G=0;G<B&&!C;G++)C=a.stopped||a.layout.tick();if(C){if(c.checkLayoutSuccess()&&!c.isSubLayout)c.doPostLayout();if(c.tilingPostLayout)c.tilingPostLayout();if(c.isLayoutFinished=!0,a.options.eles.nodes().positions(V),R(),a.cy.one("layoutstop",a.options.stop),a.cy.trigger({type:"layoutstop",layout:a}),e)cancelAnimationFrame(e);p=!1;return}var M=a.layout.getPositionsData();y.eles.nodes().positions(function(A,it){if(typeof A==="number")A=it;if(!A.isParent()){var j=A.id(),N=M[j],w=A;while(N==null)if(N=M[w.data("parent")]||M["DummyCompound_"+w.data("parent")],M[j]=N,w=w.parent()[0],w==null)break;if(N!=null)return{x:N.x,y:N.y};else return{x:A.position("x"),y:A.position("y")}}}),R(),e=requestAnimationFrame(X)};if(c.addListener("layoutstarted",function(){if(a.options.animate==="during")e=requestAnimationFrame(nt)}),c.runLayout(),this.options.animate!=="during")a.options.eles.nodes().not(":parent").layoutPositions(a,a.options,V),p=!1;return this},I.prototype.getTopMostNodes=function(p){var e={};for(var y=0;y<p.length;y++)e[p[y].id()]=!0;var s=p.filter(function(c,a){if(typeof c==="number")c=a;var E=c.parent()[0];while(E!=null){if(e[E.id()])return!1;E=E.parent()[0]}return!0});return s},I.prototype.processChildrenList=function(p,e,y){var s=e.length;for(var c=0;c<s;c++){var a=e[c],E=a.children(),T,m=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(a.outerWidth()!=null&&a.outerHeight()!=null)T=p.add(new b(y.graphManager,new H(a.position("x")-m.w/2,a.position("y")-m.h/2),new v(parseFloat(m.w),parseFloat(m.h))));else T=p.add(new b(this.graphManager));if(T.id=a.data("id"),T.paddingLeft=parseInt(a.css("padding")),T.paddingTop=parseInt(a.css("padding")),T.paddingRight=parseInt(a.css("padding")),T.paddingBottom=parseInt(a.css("padding")),this.options.nodeDimensionsIncludeLabels){if(a.isParent()){var h=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,P=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,x=a.css("text-halign");T.labelWidth=h,T.labelHeight=P,T.labelPos=x}}if(this.idToLNode[a.data("id")]=T,isNaN(T.rect.x))T.rect.x=0;if(isNaN(T.rect.y))T.rect.y=0;if(E!=null&&E.length>0){var O=y.getGraphManager().add(y.newGraph(),T);this.processChildrenList(O,E,y)}}},I.prototype.stop=function(){return this.stopped=!0,this};var S=function(e){e("layout","cose-bilkent",I)};if(typeof cytoscape<"u")S(cytoscape);f.exports=S}])})});var z=Ke(k(),1);mn.use(z.default);function q(u,f){u.forEach((r)=>{let n={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach((o)=>{if(!["id","label","height","width","padding","x","y"].includes(o))n[o]=r[o]}),f.add({group:"nodes",data:n,position:{x:r.x??0,y:r.y??0}})})}t(q,"addNodes");function W(u,f){u.forEach((r)=>{let n={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach((o)=>{if(!["id","start","end"].includes(o))n[o]=r[o]}),f.add({group:"edges",data:n})})}t(W,"addEdges");function Q(u){return new Promise((f)=>{let r=g("body").append("div").attr("id","cy").attr("style","display:none"),n=mn({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),q(u.nodes,n),W(u.edges,n),n.nodes().forEach(function(d){d.layoutDimensions=()=>{let l=d.data();return{w:l.width,h:l.height}}});let o={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(o).run(),n.ready((d)=>{i.info("Cytoscape ready",d),f(n)})})}t(Q,"createCytoscapeInstance");function Z(u){return u.nodes().map((f)=>{let r=f.data(),n=f.position(),o={id:r.id,x:n.x,y:n.y};return Object.keys(r).forEach((d)=>{if(d!=="id")o[d]=r[d]}),o})}t(Z,"extractPositionedNodes");function J(u){return u.edges().map((f)=>{let r=f.data(),n=f._private.rscratch,o={id:r.id,source:r.source,target:r.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(r).forEach((d)=>{if(!["id","source","target"].includes(d))o[d]=r[d]}),o})}t(J,"extractPositionedEdges");async function K(u,f){i.debug("Starting cose-bilkent layout algorithm");try{tt(u);let r=await Q(u),n=Z(r),o=J(r);return i.debug(`Layout completed: ${n.length} nodes, ${o.length} edges`),{nodes:n,edges:o}}catch(r){throw i.error("Error in cose-bilkent layout algorithm:",r),r}}t(K,"executeCoseBilkentLayout");function tt(u){if(!u)throw Error("Layout data is required");if(!u.config)throw Error("Configuration is required in layout data");if(!u.rootNode)throw Error("Root node is required");if(!u.nodes||!Array.isArray(u.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(u.edges))throw Error("Edges array is required in layout data");return!0}t(tt,"validateLayoutData");var at=t(async(u,f,{insertCluster:r,insertEdge:n,insertEdgeLabel:o,insertMarkers:d,insertNode:l,log:L,positionEdgeLabel:b},{algorithm:H})=>{let v={},_={},D=f.select("g");d(D,u.markers,u.type,u.diagramId);let I=D.insert("g").attr("class","subgraphs"),U=D.insert("g").attr("class","edgePaths"),S=D.insert("g").attr("class","edgeLabels"),p=D.insert("g").attr("class","nodes");L.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(u.nodes.map(async(s)=>{if(s.isGroup){let c={...s};_[s.id]=c,v[s.id]=c,await r(I,s)}else{let c={...s};v[s.id]=c;let a=await l(p,s,{config:u.config,dir:u.direction||"TB"}),E=a.node().getBBox();c.width=E.width,c.height=E.height,c.domId=a,L.debug(`Node ${s.id} dimensions: ${E.width}x${E.height}`)}})),L.debug("Running cose-bilkent layout algorithm");let e={...u,nodes:u.nodes.map((s)=>{let c=v[s.id];return{...s,width:c.width,height:c.height}})},y=await K(e,u.config);L.debug("Positioning nodes based on layout results"),y.nodes.forEach((s)=>{let c=v[s.id];if(c?.domId)c.domId.attr("transform",`translate(${s.x}, ${s.y})`),c.x=s.x,c.y=s.y,L.debug(`Positioned node ${c.id} at center (${s.x}, ${s.y})`)}),y.edges.forEach((s)=>{let c=u.edges.find((a)=>a.id===s.id);if(c)c.points=[{x:s.startX,y:s.startY},{x:s.midX,y:s.midY},{x:s.endX,y:s.endY}]}),L.debug("Inserting and positioning edges"),await Promise.all(u.edges.map(async(s)=>{let c=await o(S,s),a=v[s.start??""],E=v[s.end??""];if(a&&E){let T=y.edges.find((m)=>m.id===s.id);if(T){L.debug("APA01 positionedEdge",T);let m={...s},h=n(U,m,_,u.type,a,E,u.diagramId);b(m,h)}else{let m={...s,points:[{x:a.x||0,y:a.y||0},{x:E.x||0,y:E.y||0}]},h=n(U,m,_,u.type,a,E,u.diagramId);b(m,h)}}})),L.debug("Cose-bilkent rendering completed")},"render"),ct=at;export{ct as render};
|
|
1
|
+
import{t,i,g}from"./chunk-qzb06me8.js";import{mn,ai}from"./chunk-mzyg8zga.js";import{Ke,Ze}from"./chunk-g5b4wjwp.js";var k=Ze(function(F,Y){(function(f,r){if(typeof F==="object"&&typeof Y==="object")Y.exports=r(ai());else if(typeof define==="function"&&define.amd)define(["cose-base"],r);else if(typeof F==="object")F.cytoscapeCoseBilkent=r(ai());else f.cytoscapeCoseBilkent=r(f.coseBase)})(F,function(u){return function(f){var r={};function n(o){if(r[o])return r[o].exports;var d=r[o]={i:o,l:!1,exports:{}};return f[o].call(d.exports,d,d.exports,n),d.l=!0,d.exports}return n.m=f,n.c=r,n.i=function(o){return o},n.d=function(o,d,l){if(!n.o(o,d))Object.defineProperty(o,d,{configurable:!1,enumerable:!0,get:l})},n.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(d,"a",d),d},n.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},n.p="",n(n.s=1)}([function(f,r){f.exports=u},function(f,r,n){var o=n(0).layoutBase.LayoutConstants,d=n(0).layoutBase.FDLayoutConstants,l=n(0).CoSEConstants,L=n(0).CoSELayout,b=n(0).CoSENode,H=n(0).layoutBase.PointD,v=n(0).layoutBase.DimensionD,_={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:0.45,nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.5};function D(p,e){var y={};for(var s in p)y[s]=p[s];for(var s in e)y[s]=e[s];return y}function I(p){this.options=D(_,p),U(this.options)}var U=function(e){if(e.nodeRepulsion!=null)l.DEFAULT_REPULSION_STRENGTH=d.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion;if(e.idealEdgeLength!=null)l.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=e.idealEdgeLength;if(e.edgeElasticity!=null)l.DEFAULT_SPRING_STRENGTH=d.DEFAULT_SPRING_STRENGTH=e.edgeElasticity;if(e.nestingFactor!=null)l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor;if(e.gravity!=null)l.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=e.gravity;if(e.numIter!=null)l.MAX_ITERATIONS=d.MAX_ITERATIONS=e.numIter;if(e.gravityRange!=null)l.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange;if(e.gravityCompound!=null)l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound;if(e.gravityRangeCompound!=null)l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound;if(e.initialEnergyOnIncremental!=null)l.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental;if(e.quality=="draft")o.QUALITY=0;else if(e.quality=="proof")o.QUALITY=2;else o.QUALITY=1;l.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!e.randomize,l.ANIMATE=d.ANIMATE=o.ANIMATE=e.animate,l.TILE=e.tile,l.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==="function"?e.tilingPaddingVertical.call():e.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==="function"?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};I.prototype.run=function(){var p,e,y=this.options,s=this.idToLNode={},c=this.layout=new L,a=this;a.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var E=c.newGraphManager();this.gm=E;var T=this.options.eles.nodes(),m=this.options.eles.edges();this.root=E.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(T),c);for(var h=0;h<m.length;h++){var P=m[h],x=this.idToLNode[P.data("source")],O=this.idToLNode[P.data("target")];if(x!==O&&x.getEdgesBetween(O).length==0){var et=E.add(c.newEdge(),x,O);et.id=P.id()}}var V=function(R,B){if(typeof R==="number")R=B;var C=R.data("id"),G=a.idToLNode[C];return{x:G.getRect().getCenterX(),y:G.getRect().getCenterY()}},nt=function X(){var R=function(){if(y.fit)y.cy.fit(y.eles,y.padding);if(!p)p=!0,a.cy.one("layoutready",y.ready),a.cy.trigger({type:"layoutready",layout:a})},B=a.options.refresh,C;for(var G=0;G<B&&!C;G++)C=a.stopped||a.layout.tick();if(C){if(c.checkLayoutSuccess()&&!c.isSubLayout)c.doPostLayout();if(c.tilingPostLayout)c.tilingPostLayout();if(c.isLayoutFinished=!0,a.options.eles.nodes().positions(V),R(),a.cy.one("layoutstop",a.options.stop),a.cy.trigger({type:"layoutstop",layout:a}),e)cancelAnimationFrame(e);p=!1;return}var M=a.layout.getPositionsData();y.eles.nodes().positions(function(A,it){if(typeof A==="number")A=it;if(!A.isParent()){var j=A.id(),N=M[j],w=A;while(N==null)if(N=M[w.data("parent")]||M["DummyCompound_"+w.data("parent")],M[j]=N,w=w.parent()[0],w==null)break;if(N!=null)return{x:N.x,y:N.y};else return{x:A.position("x"),y:A.position("y")}}}),R(),e=requestAnimationFrame(X)};if(c.addListener("layoutstarted",function(){if(a.options.animate==="during")e=requestAnimationFrame(nt)}),c.runLayout(),this.options.animate!=="during")a.options.eles.nodes().not(":parent").layoutPositions(a,a.options,V),p=!1;return this},I.prototype.getTopMostNodes=function(p){var e={};for(var y=0;y<p.length;y++)e[p[y].id()]=!0;var s=p.filter(function(c,a){if(typeof c==="number")c=a;var E=c.parent()[0];while(E!=null){if(e[E.id()])return!1;E=E.parent()[0]}return!0});return s},I.prototype.processChildrenList=function(p,e,y){var s=e.length;for(var c=0;c<s;c++){var a=e[c],E=a.children(),T,m=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(a.outerWidth()!=null&&a.outerHeight()!=null)T=p.add(new b(y.graphManager,new H(a.position("x")-m.w/2,a.position("y")-m.h/2),new v(parseFloat(m.w),parseFloat(m.h))));else T=p.add(new b(this.graphManager));if(T.id=a.data("id"),T.paddingLeft=parseInt(a.css("padding")),T.paddingTop=parseInt(a.css("padding")),T.paddingRight=parseInt(a.css("padding")),T.paddingBottom=parseInt(a.css("padding")),this.options.nodeDimensionsIncludeLabels){if(a.isParent()){var h=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,P=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,x=a.css("text-halign");T.labelWidth=h,T.labelHeight=P,T.labelPos=x}}if(this.idToLNode[a.data("id")]=T,isNaN(T.rect.x))T.rect.x=0;if(isNaN(T.rect.y))T.rect.y=0;if(E!=null&&E.length>0){var O=y.getGraphManager().add(y.newGraph(),T);this.processChildrenList(O,E,y)}}},I.prototype.stop=function(){return this.stopped=!0,this};var S=function(e){e("layout","cose-bilkent",I)};if(typeof cytoscape<"u")S(cytoscape);f.exports=S}])})});var z=Ke(k(),1);mn.use(z.default);function q(u,f){u.forEach((r)=>{let n={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach((o)=>{if(!["id","label","height","width","padding","x","y"].includes(o))n[o]=r[o]}),f.add({group:"nodes",data:n,position:{x:r.x??0,y:r.y??0}})})}t(q,"addNodes");function W(u,f){u.forEach((r)=>{let n={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach((o)=>{if(!["id","start","end"].includes(o))n[o]=r[o]}),f.add({group:"edges",data:n})})}t(W,"addEdges");function Q(u){return new Promise((f)=>{let r=g("body").append("div").attr("id","cy").attr("style","display:none"),n=mn({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),q(u.nodes,n),W(u.edges,n),n.nodes().forEach(function(d){d.layoutDimensions=()=>{let l=d.data();return{w:l.width,h:l.height}}});let o={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(o).run(),n.ready((d)=>{i.info("Cytoscape ready",d),f(n)})})}t(Q,"createCytoscapeInstance");function Z(u){return u.nodes().map((f)=>{let r=f.data(),n=f.position(),o={id:r.id,x:n.x,y:n.y};return Object.keys(r).forEach((d)=>{if(d!=="id")o[d]=r[d]}),o})}t(Z,"extractPositionedNodes");function J(u){return u.edges().map((f)=>{let r=f.data(),n=f._private.rscratch,o={id:r.id,source:r.source,target:r.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(r).forEach((d)=>{if(!["id","source","target"].includes(d))o[d]=r[d]}),o})}t(J,"extractPositionedEdges");async function K(u,f){i.debug("Starting cose-bilkent layout algorithm");try{tt(u);let r=await Q(u),n=Z(r),o=J(r);return i.debug(`Layout completed: ${n.length} nodes, ${o.length} edges`),{nodes:n,edges:o}}catch(r){throw i.error("Error in cose-bilkent layout algorithm:",r),r}}t(K,"executeCoseBilkentLayout");function tt(u){if(!u)throw Error("Layout data is required");if(!u.config)throw Error("Configuration is required in layout data");if(!u.rootNode)throw Error("Root node is required");if(!u.nodes||!Array.isArray(u.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(u.edges))throw Error("Edges array is required in layout data");return!0}t(tt,"validateLayoutData");var at=t(async(u,f,{insertCluster:r,insertEdge:n,insertEdgeLabel:o,insertMarkers:d,insertNode:l,log:L,positionEdgeLabel:b},{algorithm:H})=>{let v={},_={},D=f.select("g");d(D,u.markers,u.type,u.diagramId);let I=D.insert("g").attr("class","subgraphs"),U=D.insert("g").attr("class","edgePaths"),S=D.insert("g").attr("class","edgeLabels"),p=D.insert("g").attr("class","nodes");L.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(u.nodes.map(async(s)=>{if(s.isGroup){let c={...s};_[s.id]=c,v[s.id]=c,await r(I,s)}else{let c={...s};v[s.id]=c;let a=await l(p,s,{config:u.config,dir:u.direction||"TB"}),E=a.node().getBBox();c.width=E.width,c.height=E.height,c.domId=a,L.debug(`Node ${s.id} dimensions: ${E.width}x${E.height}`)}})),L.debug("Running cose-bilkent layout algorithm");let e={...u,nodes:u.nodes.map((s)=>{let c=v[s.id];return{...s,width:c.width,height:c.height}})},y=await K(e,u.config);L.debug("Positioning nodes based on layout results"),y.nodes.forEach((s)=>{let c=v[s.id];if(c?.domId)c.domId.attr("transform",`translate(${s.x}, ${s.y})`),c.x=s.x,c.y=s.y,L.debug(`Positioned node ${c.id} at center (${s.x}, ${s.y})`)}),y.edges.forEach((s)=>{let c=u.edges.find((a)=>a.id===s.id);if(c)c.points=[{x:s.startX,y:s.startY},{x:s.midX,y:s.midY},{x:s.endX,y:s.endY}]}),L.debug("Inserting and positioning edges"),await Promise.all(u.edges.map(async(s)=>{let c=await o(S,s),a=v[s.start??""],E=v[s.end??""];if(a&&E){let T=y.edges.find((m)=>m.id===s.id);if(T){L.debug("APA01 positionedEdge",T);let m={...s},h=n(U,m,_,u.type,a,E,u.diagramId);b(m,h)}else{let m={...s,points:[{x:a.x||0,y:a.y||0},{x:E.x||0,y:E.y||0}]},h=n(U,m,_,u.type,a,E,u.diagramId);b(m,h)}}})),L.debug("Cose-bilkent rendering completed")},"render"),ct=at;export{ct as render};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s,o,a,Wt,m,e,n,y,si,l,se,lr,wt,ve,ha,ce}from"./chunk-xw8tzrmm.js";var ke=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],L=l("at-sign",ke);var Ce=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],de=l("file-code-2",Ce);var we=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],pe=l("maximize-2",we);var Me=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],Z=l("notebook-pen",Me);var Ie=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ue=l("user",Ie);var w={approve:{label:"通过",text:"text-success",ring:"ring-success/80",soft:"bg-success/12 text-success"},reject:{label:"反对",text:"text-danger",ring:"ring-danger/80",soft:"bg-danger/12 text-danger"},abstain:{label:"弃权",text:"text-dim",ring:"ring-line-strong",soft:"bg-raised text-dim"},pending:{label:"未表态",text:"text-faint",ring:"ring-line",soft:"bg-raised text-faint"}},ze={thinking:"思考中",reading:"查阅中",speaking:"发言中",idle:"等待中",error:"出错",aborted:"已中止"},F={success:"text-success",warning:"text-warning",danger:"text-danger",neutral:"text-faint"},ee={success:"bg-success",warning:"bg-warning",danger:"bg-danger",neutral:"bg-faint"};function V(t){return t==="thinking"||t==="reading"||t==="speaking"}function K(t){let u=V(t.status);return{busy:u,text:u&&t.activeTool?t.activeTool:ze[t.status]}}function te(t){let u=t.members.filter((b)=>b.verdict==="approve").length,f=t.members.filter((b)=>b.verdict==="reject").length;if(t.state==="running"){if(t.phase==="research")return{tone:"warning",label:"调研中"};if(t.phase==="opening")return{tone:"warning",label:"开场表态"};return{tone:"warning",label:"群聊交流"}}if(t.state==="consensus"){if(u===t.members.length)return{tone:"success",label:"全票通过"};if(f===t.members.length)return{tone:"danger",label:"全票反对"};if(f>u)return{tone:"danger",label:"共识:反对"};return{tone:"success",label:"共识:通过"}}if(t.state==="diverged")return{tone:"warning",label:"存在分歧"};if(t.state==="error")return{tone:"danger",label:"失败"};return{tone:"neutral",label:"已中止"}}function W(t){let u=Math.max(1,Math.round(t/1000));if(u<60)return`${u}s`;return`${Math.floor(u/60)}m ${String(u%60).padStart(2,"0")}s`}var De={research:"调研",opening:"开场表态",discussion:"群聊交流"};function G(t){let{cn:u}=y(),{room:f}=t,b=te(f),g=f.state==="running",v=f.research?["research","opening","discussion"]:["opening","discussion"],i=g?v.indexOf(f.phase==="closed"?"discussion":f.phase??"discussion"):-1,h=[...v.map((d,p)=>({key:d,label:De[d],done:!g||p<i,active:p===i})),{key:"closed",label:g?"结论":b.label,done:!g,active:!1}];return e("ol",{className:u("flex min-w-0 gap-1",t.className),children:h.map((d,p)=>{let c=p===h.length-1&&!g;return n("li",{className:"min-w-0 flex-1",children:[e("span",{className:u("block h-[3px] rounded-full transition-colors duration-300",c?ee[b.tone]:d.active?"bg-accent animate-pulse":d.done?"bg-line-strong":"bg-line/60")}),e("span",{className:u("mt-1.5 block truncate text-[11px]",c?u("font-medium",F[b.tone]):d.active?"font-medium text-ink":d.done?"text-dim":"text-faint"),children:d.label})]},d.key)})})}function fe(t){let{Collapsible:u,CollapsibleContent:f,Composer:b,Markdown:g,ModelIcon:v,ScrollArea:i,SessionView:h,cn:d,confirm:p}=y(),{room:c,onClose:C}=t,[M,x]=a(!1),[J,D]=a(""),[R,H]=a(!1),[_,E]=a(),[S,B]=a(!1),[N,I]=a(!0),[T,z]=a(),ne=o(!1);ne.current=T!==void 0;let[U,X]=a(),[ae,A]=a(!1),oe=o(!1);oe.current=U!==void 0;let ie=(r)=>{A(!1),X(r)},re=o(null),Y=o(null),P=c.state==="running",j=te(c),ge=new Map(c.members.map((r)=>[r.id,r]));s(()=>{let r=(me)=>{if(me.key!=="Escape"||me.defaultPrevented||ne.current)return;if(oe.current)A(!0);else x(!0)},k=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",r),document.body.style.overflow=k}},[]);let le=c.messages.length;s(()=>{let r=Y.current;if(!r||!N||le===0)return;r.scrollTo({top:r.scrollHeight,behavior:"smooth"})},[le,N]);let be=async(r)=>{await t.onPost(r),I(!0)},he=async()=>{if(R)return;if(!await p({title:"中止理事会?",description:"所有成员会立即停止,已有发言保留。",action:"中止",danger:!0}))return;H(!0),E(void 0);try{await t.onAbort()}catch(k){E(k instanceof Error?k.message:"中止理事会失败")}finally{H(!1)}},Q=(r)=>{X(void 0),D((k)=>k.includes(`@${r}`)?k:`${k?`${k.trimEnd()} `:""}@${r} `),requestAnimationFrame(()=>re.current?.focus())},Ne=c.members.filter((r)=>r.verdict==="approve").length,ye=c.members.filter((r)=>r.verdict==="reject").length,q=c.members.find((r)=>r.id===T),O=c.members.find((r)=>r.id===U);return Wt(n("div",{role:"dialog","aria-modal":"true","aria-label":`理事会:${c.topic}`,onAnimationEnd:(r)=>{if(M&&r.target===r.currentTarget)C()},className:d("fixed inset-0 z-50 flex flex-col bg-bg pt-[env(safe-area-inset-top)] text-ink",M?"pointer-events-none animate-dialog-out":"animate-dialog-in"),children:[n(u,{open:S,onOpenChange:B,className:"shrink-0 border-b border-line px-4 pt-3 pb-3 sm:px-6",children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-3 text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-[0.2em] text-dim",children:"COUNCIL"}),e("span",{className:"tabular-nums",children:W(t.elapsedMs)}),n("span",{className:"tabular-nums",children:[c.messages.length," 条发言"]})]}),n("button",{type:"button","aria-expanded":S,onClick:()=>B((r)=>!r),className:"mt-0.5 flex max-w-full cursor-pointer items-start gap-1.5 text-left md:items-center",children:[e("h2",{className:"line-clamp-2 text-[15px] leading-snug font-semibold md:truncate md:text-lg",children:c.topic}),e(ve,{className:d("mt-0.5 size-4 shrink-0 text-faint transition-transform duration-300 ease-out-quint md:mt-0",!S&&"-rotate-90")})]})]}),n("div",{className:"flex shrink-0 items-center gap-1",children:[n("span",{className:d("inline-flex items-center gap-1.5 rounded-full border border-line px-2.5 py-1 text-xs font-medium",F[j.tone]),children:[e("span",{className:d("size-1.5 rounded-full",ee[j.tone],P&&"animate-pulse")}),j.label]}),e("button",{type:"button","aria-label":"关闭理事会页面",title:"关闭(Esc)",onClick:()=>x(!0),className:"ml-1 inline-flex size-10 -mr-2 cursor-pointer items-center justify-center rounded-full text-faint transition-colors hover:bg-raised hover:text-ink md:size-8 md:mr-0",children:e(ce,{className:"size-4"})})]})]}),e(f,{children:e("div",{className:"mt-2 max-h-[40dvh] overflow-y-auto overscroll-contain rounded-xl bg-panel px-3.5 py-2.5 text-[13px] leading-relaxed text-dim md:max-h-48",children:e(g,{text:c.brief})})}),e(G,{room:c,className:"mt-3"})]}),n("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[e("div",{className:"flex shrink-0 gap-2 overflow-x-auto overscroll-x-contain border-b border-line px-4 py-2.5 [scrollbar-width:none] md:hidden",children:c.members.map((r)=>e(Se,{member:r,onSelect:()=>z(r.id)},r.id))}),n("aside",{className:"hidden w-72 shrink-0 flex-col gap-2 overflow-y-auto border-r border-line p-4 md:flex",children:[n("div",{className:"flex items-center justify-between text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-wide",children:"席位"}),n("span",{className:"tabular-nums",children:[e("span",{className:"text-success",children:Ne})," / ",e("span",{className:"text-danger",children:ye})," /"," ",c.members.length]})]}),c.members.map((r)=>e(Re,{member:r,viewing:r.id===U,onMention:()=>Q(r.name),onOpen:()=>r.id===U?A(!0):ie(r.id)},r.id))]}),O&&n("main",{onAnimationEnd:(r)=>{if(!ae||r.target!==r.currentTarget)return;A(!1),X(void 0)},className:d("flex min-h-0 min-w-0 flex-1 flex-col",ae?"pointer-events-none animate-overlay-out":"animate-fade"),children:[n("div",{className:"flex shrink-0 items-center gap-2 border-b border-line px-3 py-2 sm:px-4",children:[n("button",{type:"button",onClick:()=>A(!0),className:"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-lg px-2 text-[13px] text-dim transition-colors hover:bg-raised hover:text-ink",children:[e(lr,{className:"size-4"}),"群聊"]}),e("span",{className:"text-line-strong",children:"/"}),n("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-[13px] font-medium",children:[e(v,{modelID:O.model,className:"size-4 shrink-0",size:16}),n("span",{className:"truncate",children:[O.name," 的推理过程"]})]}),e("button",{type:"button","aria-label":"在完整页面打开",title:"在完整页面打开",onClick:()=>t.onOpenMember(O.childSessionID),className:"inline-flex size-8 cursor-pointer items-center justify-center rounded-lg text-faint transition-colors hover:bg-raised hover:text-ink",children:e(wt,{className:"size-4"})})]}),e(h,{sessionID:O.childSessionID},O.childSessionID)]}),n("main",{className:d("min-h-0 min-w-0 flex-1 flex-col animate-fade",O?"hidden":"flex"),children:[e(i,{viewportRef:Y,onScrollCapture:(r)=>{let k=Y.current;if(!k||r.target!==k)return;I(k.scrollHeight-k.scrollTop-k.clientHeight<80)},children:n("div",{className:"mx-auto w-full max-w-3xl px-4 py-4 sm:px-6 md:py-5",children:[c.messages.length===0?n("div",{className:"flex flex-col items-center justify-center gap-3 py-24 text-center text-faint",children:[P?e(se,{className:"size-5 animate-spin"}):null,e("p",{className:"text-sm",children:P?c.phase==="research"?"成员正在各自调研,笔记不会进入群聊":"成员正在独立准备开场观点,彼此不可见":"这场理事会没有产生发言"})]}):e("ol",{className:"space-y-5",children:c.messages.map((r)=>e(Te,{message:r,membersByID:ge,onMention:()=>Q(r.senderName)},r.floor))}),c.summary&&!P&&n("section",{className:"mt-8 rounded-2xl border border-line bg-panel px-4 py-3",children:[n("h3",{className:d("text-xs font-semibold",F[j.tone]),children:["结论:",j.label]}),e("div",{className:"mt-1.5 text-[13px] leading-relaxed text-dim",children:e(g,{text:c.summary})})]})]})}),e("div",{className:"shrink-0 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:px-6 md:pb-4",children:n("div",{className:"mx-auto w-full max-w-3xl",children:[_&&e("p",{role:"status",className:"px-1 pb-2 text-[13px] text-danger",children:_}),e(b,{draftKey:`council:${c.roomID}`,placeholder:P?"插话,@ 某位成员会点名要求其回应":"理事会已结束,插话会重新唤醒成员",busy:P,allowAttachments:!1,text:J,onTextChange:D,inputRef:re,onSend:be,onAbort:()=>void he()})]})})]})]}),q&&e(Oe,{member:q,onClose:()=>z(void 0),onMention:()=>{z(void 0),Q(q.name)},onOpen:()=>{z(void 0),ie(q.id)}})]}),document.body)}function Se(t){let{ModelIcon:u,cn:f}=y(),{member:b}=t,g=w[b.verdict]??w.pending,{busy:v}=K(b);return n("button",{type:"button",onClick:t.onSelect,"aria-label":`${b.name},${g.label},查看详情`,className:"flex h-11 max-w-[11rem] shrink-0 cursor-pointer items-center gap-2 rounded-full border border-line bg-panel/60 pr-3.5 pl-1.5 active:bg-raised",children:[n("span",{className:f("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",g.ring),children:[e(u,{modelID:b.model,className:"size-4",size:16}),v&&e(se,{className:"absolute -right-1 -bottom-1 size-3.5 animate-spin rounded-full bg-bg text-accent"})]}),n("span",{className:"min-w-0 text-left leading-tight",children:[e("span",{className:"block truncate text-[13px] font-medium",children:b.name}),e("span",{className:f("block text-[11px]",g.text),children:g.label})]})]})}function Oe(t){let{Button:u,Dialog:f,Markdown:b,ModelIcon:g,cn:v}=y(),{member:i}=t,h=w[i.verdict]??w.pending,d=K(i);return e(f,{open:!0,onOpenChange:(p)=>!p&&t.onClose(),title:n("span",{className:"flex min-w-0 items-center gap-2.5",children:[e("span",{className:v("flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",h.ring),children:e(g,{modelID:i.model,className:"size-4",size:16})}),e("span",{className:"min-w-0 truncate",children:i.name}),e("span",{className:v("shrink-0 rounded px-1.5 py-px text-[11px] font-medium",h.soft),children:h.label})]}),description:i.model,footer:n(m,{children:[n(u,{variant:"secondary",onClick:t.onMention,children:[e(L,{className:"size-4"}),"点名"]}),n(u,{variant:"secondary",onClick:t.onOpen,children:[e(wt,{className:"size-4"}),"查看推理"]})]}),children:n("div",{className:"space-y-3 pb-1",children:[n("div",{className:"flex items-center gap-3 text-[13px]",children:[n("span",{className:v("flex min-w-0 flex-1 items-center gap-1.5",d.busy?"text-accent":"text-dim"),children:[d.busy&&e(se,{className:"size-3.5 shrink-0 animate-spin"}),e("span",{className:"truncate",children:d.text})]}),n("span",{className:"shrink-0 text-faint tabular-nums",children:["发言 ",i.turns??0," 次"]})]}),i.notes?n("section",{children:[n("h3",{className:"mb-1.5 flex items-center gap-1.5 text-xs font-medium text-faint",children:[e(Z,{className:"size-3.5"}),"调研笔记"]}),e("div",{className:"rounded-xl bg-bg/60 px-3.5 py-2.5 text-[13px] leading-relaxed text-dim",children:e(b,{text:i.notes})})]}):e("p",{className:"text-[13px] text-faint",children:"没有调研笔记"})]})})}function Re(t){let{Collapsible:u,CollapsibleContent:f,Markdown:b,ModelIcon:g,cn:v}=y(),{member:i}=t,[h,d]=a(!1),p=w[i.verdict]??w.pending,{busy:c,text:C}=K(i);return n(u,{open:h,onOpenChange:d,className:v("relative shrink-0 rounded-xl border p-2.5 transition-colors",t.viewing?"border-line-strong bg-raised/60":"border-line bg-panel/60 hover:bg-raised/40"),children:[e("button",{type:"button","aria-label":t.viewing?"返回群聊":`查看 ${i.name} 的推理过程`,"aria-pressed":t.viewing,title:t.viewing?"返回群聊":"查看推理与工具调用",onClick:t.onOpen,className:"absolute inset-0 cursor-pointer rounded-xl"}),n("div",{className:"pointer-events-none relative flex items-center gap-2.5",children:[e("span",{className:v("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",p.ring),children:e(g,{modelID:i.model,className:"size-4",size:16})}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"truncate text-[13px] font-medium",title:i.model,children:i.name}),e("span",{className:v("shrink-0 rounded px-1 text-[10.5px] font-medium",p.soft),children:p.label})]}),n("div",{className:v("flex min-w-0 items-center gap-1 text-[11px]",c?"text-accent":"text-faint"),children:[c&&e(se,{className:"size-3 shrink-0 animate-spin"}),e("span",{className:"truncate",children:C})]})]})]}),n("div",{className:"pointer-events-none relative mt-2 flex items-center gap-1 text-[11px] text-faint",children:[n("span",{className:"tabular-nums",children:["发言 ",i.turns??0," 次"]}),e("span",{className:"ml-auto"}),i.notes&&n("button",{type:"button","aria-expanded":h,onClick:()=>d((M)=>!M),className:v("pointer-events-auto inline-flex cursor-pointer items-center gap-1 rounded px-1.5 py-0.5 hover:bg-raised hover:text-ink",h&&"text-ink"),children:[e(Z,{className:"size-3"}),"笔记"]}),e("button",{type:"button","aria-label":`@ ${i.name}`,title:`@ ${i.name}`,onClick:t.onMention,className:"pointer-events-auto inline-flex cursor-pointer items-center rounded p-1 hover:bg-raised hover:text-ink",children:e(L,{className:"size-3"})})]}),i.notes&&e(f,{children:e("div",{className:"relative mt-2 max-h-56 overflow-y-auto rounded-lg bg-bg/60 px-2.5 py-2 text-xs leading-relaxed text-dim",children:e(b,{text:i.notes})})})]})}function Te(t){let{Code:u,Collapsible:f,CollapsibleContent:b,Markdown:g,cn:v}=y(),{message:i}=t,[h,d]=a(!1),p=i.senderID==="user"||i.senderID==="host",c=i.verdict&&i.verdict!=="pending"?w[i.verdict]:void 0,C=i.evidences??[],M=(i.mentions??[]).map((x)=>t.membersByID.get(x)).filter((x)=>x!==void 0);return n("li",{id:`council-floor-${i.floor}`,className:"group flex gap-3 animate-fade",children:[e(xe,{message:i,isHuman:p,className:"mt-0.5 hidden size-8 md:flex"}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs",children:[e(xe,{message:i,isHuman:p,className:"flex size-6 md:hidden"}),e("span",{className:"font-semibold text-ink",title:i.senderModel,children:i.senderName}),n("a",{href:`#council-floor-${i.floor}`,className:"font-mono text-[11px] text-faint hover:text-dim",onClick:(x)=>x.preventDefault(),children:["#",i.floor]}),c&&e("span",{className:v("rounded px-1.5 py-px text-[10.5px] font-medium",c.soft),children:c.label}),!p&&n("button",{type:"button",onClick:t.onMention,className:"ml-auto inline-flex cursor-pointer items-center gap-1 rounded-md px-2 py-1 text-[11px] text-faint transition-opacity hover:bg-raised hover:text-ink focus-visible:opacity-100 md:px-1.5 md:py-0.5 md:opacity-0 md:group-hover:opacity-100",children:[e(L,{className:"size-3"}),"回复"]})]}),(i.replyToFloor||M.length>0)&&n("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-[11px] text-faint",children:[i.replyToFloor&&n("button",{type:"button",onClick:()=>document.getElementById(`council-floor-${i.replyToFloor}`)?.scrollIntoView({block:"center",behavior:"smooth"}),className:"inline-flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-md bg-raised/70 px-1.5 py-0.5 hover:text-ink",children:[e(ha,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0 text-dim",children:["#",i.replyToFloor," ",i.replyToName]}),i.replyToPreview&&e("span",{className:"truncate",children:i.replyToPreview})]}),M.map((x)=>n("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent/10 px-1.5 py-0.5 text-accent",children:[e(L,{className:"size-3"}),x.name]},x.id))]}),e("div",{className:"mt-1.5 break-words text-[14px] leading-relaxed text-ink/90 md:text-[13.5px] [&_p]:my-1.5 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:e(g,{text:i.text})}),C.length>0&&n(f,{open:h,onOpenChange:d,className:"mt-2",children:[n("button",{type:"button","aria-expanded":h,onClick:()=>d((x)=>!x),className:"inline-flex max-w-full cursor-pointer items-center gap-1 text-[11px] text-faint hover:text-ink",children:[e(de,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0",children:["查阅 ",C.length," 处"]}),!h&&e("span",{className:"truncate font-mono",children:C.map((x)=>x.label).join(",")}),e(ve,{className:v("size-3 shrink-0 transition-transform duration-300 ease-out-quint",!h&&"-rotate-90")})]}),e(b,{children:e("div",{className:"mt-1.5 space-y-1.5",children:C.map((x)=>n("div",{className:"overflow-hidden rounded-lg border border-line bg-panel text-xs",children:[e("div",{className:"truncate border-b border-line/70 px-2.5 py-1 font-mono text-[11px] text-dim",children:x.label}),x.snippet&&e(u,{code:x.snippet,lang:x.lang||"ts",className:"max-h-40 overflow-auto px-2.5 py-1.5 text-[11.5px]"})]},`${x.tool}:${x.label}:${x.snippet?.slice(0,32)??""}`))})})]})]})]})}function xe(t){let{ModelIcon:u,cn:f}=y();return e("span",{className:f("shrink-0 items-center justify-center rounded-full",t.isHuman?"bg-accent/12 text-accent":"bg-raised",t.className),children:t.message.senderModel?e(u,{modelID:t.message.senderModel,className:"size-4",size:16}):e(ue,{className:"size-4"})})}function ot(t){let{ModelIcon:u,cn:f,useTheme:b}=y();b();let{connection:g,sessionID:v,payload:i,onOpen:h}=t,d=i,[p,c]=a(d),[C,M]=a(()=>{try{return sessionStorage.getItem(si)===d.roomID}catch{return!1}}),[x,J]=a(Date.now);s(()=>{c(d)},[d]),s(()=>{if(!C)return;try{if(sessionStorage.getItem(si)===d.roomID)sessionStorage.removeItem(si)}catch{}},[C,d.roomID]);let D=p.state==="running",R=`/api/sessions/${encodeURIComponent(v)}/council/${encodeURIComponent(p.roomID)}`;s(()=>{if(!D)return;let N=!1,T=setInterval(()=>{if(g.request(R).then((z)=>{if(!N&&z&&typeof z==="object"&&"roomID"in z)c(z)}).catch(()=>{}),!N)J(Date.now())},1200);return()=>{N=!0,clearInterval(T)}},[g,R,D]);let H=async(N)=>{let I=await g.request(`${R}/post`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:N})});c(I)},_=async()=>{let N=await g.request(`${R}/kill`,{method:"POST"});c(N)},E=(D?x:p.updatedAt)-p.createdAt,S=p.messages.at(-1),B=p.members.filter((N)=>V(N.status)).length;return n(m,{children:[n("button",{type:"button","aria-label":`进入理事会:${p.topic}`,onClick:()=>M(!0),className:"group relative my-2 block w-full cursor-pointer overflow-hidden rounded-2xl border border-line bg-panel text-left transition-colors hover:border-line-strong animate-fade",children:[n("div",{className:"px-4 pt-3.5",children:[n("div",{className:"flex items-center gap-1.5 text-[11px] text-faint",children:[e("span",{className:"font-medium text-dim",children:"理事会"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{className:"tabular-nums",children:W(E)}),n("span",{className:"ml-auto tabular-nums",children:[p.members.length," 位成员"]})]}),e("h4",{className:"mt-1 line-clamp-2 text-sm font-semibold text-ink md:truncate",title:p.topic,children:p.topic})]}),e(G,{room:p,className:"mt-3 px-4"}),e("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-2 px-4",children:p.members.map((N)=>{let I=w[N.verdict]??w.pending,T=V(N.status);return n("span",{className:"flex min-w-0 items-center gap-1.5 text-xs",title:N.model,children:[n("span",{className:f("relative flex size-6 shrink-0 items-center justify-center rounded-full bg-raised ring-2",I.ring),children:[e(u,{modelID:N.model,className:"size-3.5",size:14}),T&&e(se,{className:"absolute -right-1 -bottom-1 size-3 animate-spin rounded-full bg-panel text-accent"})]}),e("span",{className:"truncate text-dim",children:N.name}),e("span",{className:f("shrink-0 text-[11px]",I.text),children:I.label})]},N.id)})}),n("div",{className:"mt-3 flex items-center gap-2 border-t border-line/70 px-4 py-2.5 text-xs",children:[S?n(m,{children:[e("span",{className:"shrink-0 font-medium text-dim",children:S.senderName}),e("span",{className:"min-w-0 flex-1 truncate text-faint",children:S.text.replace(/\s+/g," ")})]}):e("span",{className:"min-w-0 flex-1 truncate text-faint",children:D?`${B} 位成员正在${p.phase==="research"?"调研":"思考"}…`:"没有发言"}),n("span",{className:"inline-flex shrink-0 items-center gap-1 text-faint transition-colors group-hover:text-ink",children:[p.messages.length>0&&n("span",{className:"tabular-nums",children:[p.messages.length," 条"]}),e(pe,{className:"size-3.5"})]})]})]}),C&&e(fe,{room:p,elapsedMs:E,onClose:()=>M(!1),onOpenMember:h,onPost:H,onAbort:_})]})}export{ot as CouncilCard};
|
|
1
|
+
import{s,o,a,Wt,m,e,n,y,si,l,ie,lr,wt,ve,ha,ce}from"./chunk-g5b4wjwp.js";var ke=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],L=l("at-sign",ke);var Ce=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],de=l("file-code-2",Ce);var we=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],pe=l("maximize-2",we);var Me=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],Z=l("notebook-pen",Me);var Ie=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ue=l("user",Ie);var w={approve:{label:"通过",text:"text-success",ring:"ring-success/80",soft:"bg-success/12 text-success"},reject:{label:"反对",text:"text-danger",ring:"ring-danger/80",soft:"bg-danger/12 text-danger"},abstain:{label:"弃权",text:"text-dim",ring:"ring-line-strong",soft:"bg-raised text-dim"},pending:{label:"未表态",text:"text-faint",ring:"ring-line",soft:"bg-raised text-faint"}},ze={thinking:"思考中",reading:"查阅中",speaking:"发言中",idle:"等待中",error:"出错",aborted:"已中止"},F={success:"text-success",warning:"text-warning",danger:"text-danger",neutral:"text-faint"},ee={success:"bg-success",warning:"bg-warning",danger:"bg-danger",neutral:"bg-faint"};function V(t){return t==="thinking"||t==="reading"||t==="speaking"}function K(t){let u=V(t.status);return{busy:u,text:u&&t.activeTool?t.activeTool:ze[t.status]}}function te(t){let u=t.members.filter((b)=>b.verdict==="approve").length,f=t.members.filter((b)=>b.verdict==="reject").length;if(t.state==="running"){if(t.phase==="research")return{tone:"warning",label:"调研中"};if(t.phase==="opening")return{tone:"warning",label:"开场表态"};return{tone:"warning",label:"群聊交流"}}if(t.state==="consensus"){if(u===t.members.length)return{tone:"success",label:"全票通过"};if(f===t.members.length)return{tone:"danger",label:"全票反对"};if(f>u)return{tone:"danger",label:"共识:反对"};return{tone:"success",label:"共识:通过"}}if(t.state==="diverged")return{tone:"warning",label:"存在分歧"};if(t.state==="error")return{tone:"danger",label:"失败"};return{tone:"neutral",label:"已中止"}}function W(t){let u=Math.max(1,Math.round(t/1000));if(u<60)return`${u}s`;return`${Math.floor(u/60)}m ${String(u%60).padStart(2,"0")}s`}var De={research:"调研",opening:"开场表态",discussion:"群聊交流"};function G(t){let{cn:u}=y(),{room:f}=t,b=te(f),g=f.state==="running",v=f.research?["research","opening","discussion"]:["opening","discussion"],i=g?v.indexOf(f.phase==="closed"?"discussion":f.phase??"discussion"):-1,h=[...v.map((d,p)=>({key:d,label:De[d],done:!g||p<i,active:p===i})),{key:"closed",label:g?"结论":b.label,done:!g,active:!1}];return e("ol",{className:u("flex min-w-0 gap-1",t.className),children:h.map((d,p)=>{let c=p===h.length-1&&!g;return n("li",{className:"min-w-0 flex-1",children:[e("span",{className:u("block h-[3px] rounded-full transition-colors duration-300",c?ee[b.tone]:d.active?"bg-accent animate-pulse":d.done?"bg-line-strong":"bg-line/60")}),e("span",{className:u("mt-1.5 block truncate text-[11px]",c?u("font-medium",F[b.tone]):d.active?"font-medium text-ink":d.done?"text-dim":"text-faint"),children:d.label})]},d.key)})})}function fe(t){let{Collapsible:u,CollapsibleContent:f,Composer:b,Markdown:g,ModelIcon:v,ScrollArea:i,SessionView:h,cn:d,confirm:p}=y(),{room:c,onClose:C}=t,[M,x]=a(!1),[J,D]=a(""),[R,H]=a(!1),[_,E]=a(),[S,B]=a(!1),[N,I]=a(!0),[T,z]=a(),ne=o(!1);ne.current=T!==void 0;let[U,X]=a(),[se,A]=a(!1),ae=o(!1);ae.current=U!==void 0;let oe=(r)=>{A(!1),X(r)},re=o(null),Y=o(null),P=c.state==="running",j=te(c),ge=new Map(c.members.map((r)=>[r.id,r]));s(()=>{let r=(me)=>{if(me.key!=="Escape"||me.defaultPrevented||ne.current)return;if(ae.current)A(!0);else x(!0)},k=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",r),document.body.style.overflow=k}},[]);let le=c.messages.length;s(()=>{let r=Y.current;if(!r||!N||le===0)return;r.scrollTo({top:r.scrollHeight,behavior:"smooth"})},[le,N]);let be=async(r)=>{await t.onPost(r),I(!0)},he=async()=>{if(R)return;if(!await p({title:"中止理事会?",description:"所有成员会立即停止,已有发言保留。",action:"中止",danger:!0}))return;H(!0),E(void 0);try{await t.onAbort()}catch(k){E(k instanceof Error?k.message:"中止理事会失败")}finally{H(!1)}},Q=(r)=>{X(void 0),D((k)=>k.includes(`@${r}`)?k:`${k?`${k.trimEnd()} `:""}@${r} `),requestAnimationFrame(()=>re.current?.focus())},Ne=c.members.filter((r)=>r.verdict==="approve").length,ye=c.members.filter((r)=>r.verdict==="reject").length,q=c.members.find((r)=>r.id===T),O=c.members.find((r)=>r.id===U);return Wt(n("div",{role:"dialog","aria-modal":"true","aria-label":`理事会:${c.topic}`,onAnimationEnd:(r)=>{if(M&&r.target===r.currentTarget)C()},className:d("fixed inset-0 z-50 flex flex-col bg-bg pt-[env(safe-area-inset-top)] text-ink",M?"pointer-events-none animate-dialog-out":"animate-dialog-in"),children:[n(u,{open:S,onOpenChange:B,className:"shrink-0 border-b border-line px-4 pt-3 pb-3 sm:px-6",children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-3 text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-[0.2em] text-dim",children:"COUNCIL"}),e("span",{className:"tabular-nums",children:W(t.elapsedMs)}),n("span",{className:"tabular-nums",children:[c.messages.length," 条发言"]})]}),n("button",{type:"button","aria-expanded":S,onClick:()=>B((r)=>!r),className:"mt-0.5 flex max-w-full cursor-pointer items-start gap-1.5 text-left md:items-center",children:[e("h2",{className:"line-clamp-2 text-[15px] leading-snug font-semibold md:truncate md:text-lg",children:c.topic}),e(ve,{className:d("mt-0.5 size-4 shrink-0 text-faint transition-transform duration-300 ease-out-quint md:mt-0",!S&&"-rotate-90")})]})]}),n("div",{className:"flex shrink-0 items-center gap-1",children:[n("span",{className:d("inline-flex items-center gap-1.5 rounded-full border border-line px-2.5 py-1 text-xs font-medium",F[j.tone]),children:[e("span",{className:d("size-1.5 rounded-full",ee[j.tone],P&&"animate-pulse")}),j.label]}),e("button",{type:"button","aria-label":"关闭理事会页面",title:"关闭(Esc)",onClick:()=>x(!0),className:"ml-1 inline-flex size-10 -mr-2 cursor-pointer items-center justify-center rounded-full text-faint transition-colors hover:bg-raised hover:text-ink md:size-8 md:mr-0",children:e(ce,{className:"size-4"})})]})]}),e(f,{children:e("div",{className:"mt-2 max-h-[40dvh] overflow-y-auto overscroll-contain rounded-xl bg-panel px-3.5 py-2.5 text-[13px] leading-relaxed text-dim md:max-h-48",children:e(g,{text:c.brief})})}),e(G,{room:c,className:"mt-3"})]}),n("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[e("div",{className:"flex shrink-0 gap-2 overflow-x-auto overscroll-x-contain border-b border-line px-4 py-2.5 [scrollbar-width:none] md:hidden",children:c.members.map((r)=>e(Se,{member:r,onSelect:()=>z(r.id)},r.id))}),n("aside",{className:"hidden w-72 shrink-0 flex-col gap-2 overflow-y-auto border-r border-line p-4 md:flex",children:[n("div",{className:"flex items-center justify-between text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-wide",children:"席位"}),n("span",{className:"tabular-nums",children:[e("span",{className:"text-success",children:Ne})," / ",e("span",{className:"text-danger",children:ye})," /"," ",c.members.length]})]}),c.members.map((r)=>e(Re,{member:r,viewing:r.id===U,onMention:()=>Q(r.name),onOpen:()=>r.id===U?A(!0):oe(r.id)},r.id))]}),O&&n("main",{onAnimationEnd:(r)=>{if(!se||r.target!==r.currentTarget)return;A(!1),X(void 0)},className:d("flex min-h-0 min-w-0 flex-1 flex-col",se?"pointer-events-none animate-overlay-out":"animate-fade"),children:[n("div",{className:"flex shrink-0 items-center gap-2 border-b border-line px-3 py-2 sm:px-4",children:[n("button",{type:"button",onClick:()=>A(!0),className:"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-lg px-2 text-[13px] text-dim transition-colors hover:bg-raised hover:text-ink",children:[e(lr,{className:"size-4"}),"群聊"]}),e("span",{className:"text-line-strong",children:"/"}),n("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-[13px] font-medium",children:[e(v,{modelID:O.model,className:"size-4 shrink-0",size:16}),n("span",{className:"truncate",children:[O.name," 的推理过程"]})]}),e("button",{type:"button","aria-label":"在完整页面打开",title:"在完整页面打开",onClick:()=>t.onOpenMember(O.childSessionID),className:"inline-flex size-8 cursor-pointer items-center justify-center rounded-lg text-faint transition-colors hover:bg-raised hover:text-ink",children:e(wt,{className:"size-4"})})]}),e(h,{sessionID:O.childSessionID},O.childSessionID)]}),n("main",{className:d("min-h-0 min-w-0 flex-1 flex-col animate-fade",O?"hidden":"flex"),children:[e(i,{viewportRef:Y,onScrollCapture:(r)=>{let k=Y.current;if(!k||r.target!==k)return;I(k.scrollHeight-k.scrollTop-k.clientHeight<80)},children:n("div",{className:"mx-auto w-full max-w-3xl px-4 py-4 sm:px-6 md:py-5",children:[c.messages.length===0?n("div",{className:"flex flex-col items-center justify-center gap-3 py-24 text-center text-faint",children:[P?e(ie,{className:"size-5 animate-spin"}):null,e("p",{className:"text-sm",children:P?c.phase==="research"?"成员正在各自调研,笔记不会进入群聊":"成员正在独立准备开场观点,彼此不可见":"这场理事会没有产生发言"})]}):e("ol",{className:"space-y-5",children:c.messages.map((r)=>e(Te,{message:r,membersByID:ge,onMention:()=>Q(r.senderName)},r.floor))}),c.summary&&!P&&n("section",{className:"mt-8 rounded-2xl border border-line bg-panel px-4 py-3",children:[n("h3",{className:d("text-xs font-semibold",F[j.tone]),children:["结论:",j.label]}),e("div",{className:"mt-1.5 text-[13px] leading-relaxed text-dim",children:e(g,{text:c.summary})})]})]})}),e("div",{className:"shrink-0 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:px-6 md:pb-4",children:n("div",{className:"mx-auto w-full max-w-3xl",children:[_&&e("p",{role:"status",className:"px-1 pb-2 text-[13px] text-danger",children:_}),e(b,{draftKey:`council:${c.roomID}`,placeholder:P?"插话,@ 某位成员会点名要求其回应":"理事会已结束,插话会重新唤醒成员",busy:P,allowAttachments:!1,text:J,onTextChange:D,inputRef:re,onSend:be,onAbort:()=>void he()})]})})]})]}),q&&e(Oe,{member:q,onClose:()=>z(void 0),onMention:()=>{z(void 0),Q(q.name)},onOpen:()=>{z(void 0),oe(q.id)}})]}),document.body)}function Se(t){let{ModelIcon:u,cn:f}=y(),{member:b}=t,g=w[b.verdict]??w.pending,{busy:v}=K(b);return n("button",{type:"button",onClick:t.onSelect,"aria-label":`${b.name},${g.label},查看详情`,className:"flex h-11 max-w-[11rem] shrink-0 cursor-pointer items-center gap-2 rounded-full border border-line bg-panel/60 pr-3.5 pl-1.5 active:bg-raised",children:[n("span",{className:f("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",g.ring),children:[e(u,{modelID:b.model,className:"size-4",size:16}),v&&e(ie,{className:"absolute -right-1 -bottom-1 size-3.5 animate-spin rounded-full bg-bg text-accent"})]}),n("span",{className:"min-w-0 text-left leading-tight",children:[e("span",{className:"block truncate text-[13px] font-medium",children:b.name}),e("span",{className:f("block text-[11px]",g.text),children:g.label})]})]})}function Oe(t){let{Button:u,Dialog:f,Markdown:b,ModelIcon:g,cn:v}=y(),{member:i}=t,h=w[i.verdict]??w.pending,d=K(i);return e(f,{open:!0,onOpenChange:(p)=>!p&&t.onClose(),title:n("span",{className:"flex min-w-0 items-center gap-2.5",children:[e("span",{className:v("flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",h.ring),children:e(g,{modelID:i.model,className:"size-4",size:16})}),e("span",{className:"min-w-0 truncate",children:i.name}),e("span",{className:v("shrink-0 rounded px-1.5 py-px text-[11px] font-medium",h.soft),children:h.label})]}),description:i.model,footer:n(m,{children:[n(u,{variant:"secondary",onClick:t.onMention,children:[e(L,{className:"size-4"}),"点名"]}),n(u,{variant:"secondary",onClick:t.onOpen,children:[e(wt,{className:"size-4"}),"查看推理"]})]}),children:n("div",{className:"space-y-3 pb-1",children:[n("div",{className:"flex items-center gap-3 text-[13px]",children:[n("span",{className:v("flex min-w-0 flex-1 items-center gap-1.5",d.busy?"text-accent":"text-dim"),children:[d.busy&&e(ie,{className:"size-3.5 shrink-0 animate-spin"}),e("span",{className:"truncate",children:d.text})]}),n("span",{className:"shrink-0 text-faint tabular-nums",children:["发言 ",i.turns??0," 次"]})]}),i.notes?n("section",{children:[n("h3",{className:"mb-1.5 flex items-center gap-1.5 text-xs font-medium text-faint",children:[e(Z,{className:"size-3.5"}),"调研笔记"]}),e("div",{className:"rounded-xl bg-bg/60 px-3.5 py-2.5 text-[13px] leading-relaxed text-dim",children:e(b,{text:i.notes})})]}):e("p",{className:"text-[13px] text-faint",children:"没有调研笔记"})]})})}function Re(t){let{Collapsible:u,CollapsibleContent:f,Markdown:b,ModelIcon:g,cn:v}=y(),{member:i}=t,[h,d]=a(!1),p=w[i.verdict]??w.pending,{busy:c,text:C}=K(i);return n(u,{open:h,onOpenChange:d,className:v("relative shrink-0 rounded-xl border p-2.5 transition-colors",t.viewing?"border-line-strong bg-raised/60":"border-line bg-panel/60 hover:bg-raised/40"),children:[e("button",{type:"button","aria-label":t.viewing?"返回群聊":`查看 ${i.name} 的推理过程`,"aria-pressed":t.viewing,title:t.viewing?"返回群聊":"查看推理与工具调用",onClick:t.onOpen,className:"absolute inset-0 cursor-pointer rounded-xl"}),n("div",{className:"pointer-events-none relative flex items-center gap-2.5",children:[e("span",{className:v("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",p.ring),children:e(g,{modelID:i.model,className:"size-4",size:16})}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"truncate text-[13px] font-medium",title:i.model,children:i.name}),e("span",{className:v("shrink-0 rounded px-1 text-[10.5px] font-medium",p.soft),children:p.label})]}),n("div",{className:v("flex min-w-0 items-center gap-1 text-[11px]",c?"text-accent":"text-faint"),children:[c&&e(ie,{className:"size-3 shrink-0 animate-spin"}),e("span",{className:"truncate",children:C})]})]})]}),n("div",{className:"pointer-events-none relative mt-2 flex items-center gap-1 text-[11px] text-faint",children:[n("span",{className:"tabular-nums",children:["发言 ",i.turns??0," 次"]}),e("span",{className:"ml-auto"}),i.notes&&n("button",{type:"button","aria-expanded":h,onClick:()=>d((M)=>!M),className:v("pointer-events-auto inline-flex cursor-pointer items-center gap-1 rounded px-1.5 py-0.5 hover:bg-raised hover:text-ink",h&&"text-ink"),children:[e(Z,{className:"size-3"}),"笔记"]}),e("button",{type:"button","aria-label":`@ ${i.name}`,title:`@ ${i.name}`,onClick:t.onMention,className:"pointer-events-auto inline-flex cursor-pointer items-center rounded p-1 hover:bg-raised hover:text-ink",children:e(L,{className:"size-3"})})]}),i.notes&&e(f,{children:e("div",{className:"relative mt-2 max-h-56 overflow-y-auto rounded-lg bg-bg/60 px-2.5 py-2 text-xs leading-relaxed text-dim",children:e(b,{text:i.notes})})})]})}function Te(t){let{Code:u,Collapsible:f,CollapsibleContent:b,Markdown:g,cn:v}=y(),{message:i}=t,[h,d]=a(!1),p=i.senderID==="user"||i.senderID==="host",c=i.verdict&&i.verdict!=="pending"?w[i.verdict]:void 0,C=i.evidences??[],M=(i.mentions??[]).map((x)=>t.membersByID.get(x)).filter((x)=>x!==void 0);return n("li",{id:`council-floor-${i.floor}`,className:"group flex gap-3 animate-fade",children:[e(xe,{message:i,isHuman:p,className:"mt-0.5 hidden size-8 md:flex"}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs",children:[e(xe,{message:i,isHuman:p,className:"flex size-6 md:hidden"}),e("span",{className:"font-semibold text-ink",title:i.senderModel,children:i.senderName}),n("a",{href:`#council-floor-${i.floor}`,className:"font-mono text-[11px] text-faint hover:text-dim",onClick:(x)=>x.preventDefault(),children:["#",i.floor]}),c&&e("span",{className:v("rounded px-1.5 py-px text-[10.5px] font-medium",c.soft),children:c.label}),!p&&n("button",{type:"button",onClick:t.onMention,className:"ml-auto inline-flex cursor-pointer items-center gap-1 rounded-md px-2 py-1 text-[11px] text-faint transition-opacity hover:bg-raised hover:text-ink focus-visible:opacity-100 md:px-1.5 md:py-0.5 md:opacity-0 md:group-hover:opacity-100",children:[e(L,{className:"size-3"}),"回复"]})]}),(i.replyToFloor||M.length>0)&&n("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-[11px] text-faint",children:[i.replyToFloor&&n("button",{type:"button",onClick:()=>document.getElementById(`council-floor-${i.replyToFloor}`)?.scrollIntoView({block:"center",behavior:"smooth"}),className:"inline-flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-md bg-raised/70 px-1.5 py-0.5 hover:text-ink",children:[e(ha,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0 text-dim",children:["#",i.replyToFloor," ",i.replyToName]}),i.replyToPreview&&e("span",{className:"truncate",children:i.replyToPreview})]}),M.map((x)=>n("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent/10 px-1.5 py-0.5 text-accent",children:[e(L,{className:"size-3"}),x.name]},x.id))]}),e("div",{className:"mt-1.5 break-words text-[14px] leading-relaxed text-ink/90 md:text-[13.5px] [&_p]:my-1.5 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:e(g,{text:i.text})}),C.length>0&&n(f,{open:h,onOpenChange:d,className:"mt-2",children:[n("button",{type:"button","aria-expanded":h,onClick:()=>d((x)=>!x),className:"inline-flex max-w-full cursor-pointer items-center gap-1 text-[11px] text-faint hover:text-ink",children:[e(de,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0",children:["查阅 ",C.length," 处"]}),!h&&e("span",{className:"truncate font-mono",children:C.map((x)=>x.label).join(",")}),e(ve,{className:v("size-3 shrink-0 transition-transform duration-300 ease-out-quint",!h&&"-rotate-90")})]}),e(b,{children:e("div",{className:"mt-1.5 space-y-1.5",children:C.map((x)=>n("div",{className:"overflow-hidden rounded-lg border border-line bg-panel text-xs",children:[e("div",{className:"truncate border-b border-line/70 px-2.5 py-1 font-mono text-[11px] text-dim",children:x.label}),x.snippet&&e(u,{code:x.snippet,lang:x.lang||"ts",className:"max-h-40 overflow-auto px-2.5 py-1.5 text-[11.5px]"})]},`${x.tool}:${x.label}:${x.snippet?.slice(0,32)??""}`))})})]})]})]})}function xe(t){let{ModelIcon:u,cn:f}=y();return e("span",{className:f("shrink-0 items-center justify-center rounded-full",t.isHuman?"bg-accent/12 text-accent":"bg-raised",t.className),children:t.message.senderModel?e(u,{modelID:t.message.senderModel,className:"size-4",size:16}):e(ue,{className:"size-4"})})}function ot(t){let{ModelIcon:u,cn:f,useTheme:b}=y();b();let{connection:g,sessionID:v,payload:i,onOpen:h}=t,d=i,[p,c]=a(d),[C,M]=a(()=>{try{return sessionStorage.getItem(si)===d.roomID}catch{return!1}}),[x,J]=a(Date.now);s(()=>{c(d)},[d]),s(()=>{if(!C)return;try{if(sessionStorage.getItem(si)===d.roomID)sessionStorage.removeItem(si)}catch{}},[C,d.roomID]);let D=p.state==="running",R=`/api/sessions/${encodeURIComponent(v)}/council/${encodeURIComponent(p.roomID)}`;s(()=>{if(!D)return;let N=!1,T=setInterval(()=>{if(g.request(R).then((z)=>{if(!N&&z&&typeof z==="object"&&"roomID"in z)c(z)}).catch(()=>{}),!N)J(Date.now())},1200);return()=>{N=!0,clearInterval(T)}},[g,R,D]);let H=async(N)=>{let I=await g.request(`${R}/post`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:N})});c(I)},_=async()=>{let N=await g.request(`${R}/kill`,{method:"POST"});c(N)},E=(D?x:p.updatedAt)-p.createdAt,S=p.messages.at(-1),B=p.members.filter((N)=>V(N.status)).length;return n(m,{children:[n("button",{type:"button","aria-label":`进入理事会:${p.topic}`,onClick:()=>M(!0),className:"group relative my-2 block w-full cursor-pointer overflow-hidden rounded-2xl border border-line bg-panel text-left transition-colors hover:border-line-strong animate-fade",children:[n("div",{className:"px-4 pt-3.5",children:[n("div",{className:"flex items-center gap-1.5 text-[11px] text-faint",children:[e("span",{className:"font-medium text-dim",children:"理事会"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{className:"tabular-nums",children:W(E)}),n("span",{className:"ml-auto tabular-nums",children:[p.members.length," 位成员"]})]}),e("h4",{className:"mt-1 line-clamp-2 text-sm font-semibold text-ink md:truncate",title:p.topic,children:p.topic})]}),e(G,{room:p,className:"mt-3 px-4"}),e("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-2 px-4",children:p.members.map((N)=>{let I=w[N.verdict]??w.pending,T=V(N.status);return n("span",{className:"flex min-w-0 items-center gap-1.5 text-xs",title:N.model,children:[n("span",{className:f("relative flex size-6 shrink-0 items-center justify-center rounded-full bg-raised ring-2",I.ring),children:[e(u,{modelID:N.model,className:"size-3.5",size:14}),T&&e(ie,{className:"absolute -right-1 -bottom-1 size-3 animate-spin rounded-full bg-panel text-accent"})]}),e("span",{className:"truncate text-dim",children:N.name}),e("span",{className:f("shrink-0 text-[11px]",I.text),children:I.label})]},N.id)})}),n("div",{className:"mt-3 flex items-center gap-2 border-t border-line/70 px-4 py-2.5 text-xs",children:[S?n(m,{children:[e("span",{className:"shrink-0 font-medium text-dim",children:S.senderName}),e("span",{className:"min-w-0 flex-1 truncate text-faint",children:S.text.replace(/\s+/g," ")})]}):e("span",{className:"min-w-0 flex-1 truncate text-faint",children:D?`${B} 位成员正在${p.phase==="research"?"调研":"思考"}…`:"没有发言"}),n("span",{className:"inline-flex shrink-0 items-center gap-1 text-faint transition-colors group-hover:text-ink",children:[p.messages.length>0&&n("span",{className:"tabular-nums",children:[p.messages.length," 条"]}),e(pe,{className:"size-3.5"})]})]})]}),C&&e(fe,{room:p,elapsedMs:E,onClose:()=>M(!1),onOpenMember:h,onPost:H,onAbort:_})]})}export{ot as CouncilCard};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qc}from"./chunk-g5b4wjwp.js";export{qc as QuestionDock};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-qzb06me8.js";import"./chunk-25rf3svt.js";import"./chunk-1p1jtvrt.js";import{fc}from"./chunk-bjw74xvy.js";export{fc as render};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{Tr}from"./chunk-
|
|
2
|
-
`),e=new Map,o=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){o=g;break}if(o===-1)return{text:n,lineMap:e};let c=[];for(let g=o+1;g<r.length;g++){let d=r[g];if(d.trim()===""||_.test(d)||E.test(d))continue;if(k.test(d))continue;c.push(d.replace(/\t/g," "))}if(!
|
|
3
|
-
`),lineMap:e}}t(
|
|
4
|
-
`+n);let c=o.db,s=c.getRoot(),a=c.getConfig(),l=J(r),g=l.append("g");g.attr("class","tree-view");let d=await fe(s,a),{totalHeight:p,totalWidth:f}=ue(g,s,a,d);l.attr("viewBox",`-${a.lineThickness/2} 0 ${f} ${p}`),
|
|
1
|
+
import{Tr}from"./chunk-ajj3nc80.js";import{ae}from"./chunk-z9nj64n7.js";import{t,i,F,A,q,Y,L,N,R,P,I,O,D,J,jr,Gt,Q}from"./chunk-qzb06me8.js";import{he}from"./chunk-y5f7gy03.js";var S=/[─━│┃└┗├┣]/,H=/[└┗├┣]/,j=/[─━]/,k=/^[\s│┃]+$/,E=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,_=/^\s*%%/,K=" ";function W(n){return n.some((r)=>S.test(r))}t(W,"isBoxDrawingFormat");function X(n){for(let r of n){let e=H.exec(r);if(e?.index&&e.index>0)return e.index}return 4}t(X,"inferSegmentWidth");function z(n,r){return n.replace(/\bline\s+(\d+)\b/gi,(e,o)=>{let c=parseInt(o,10),s=r.get(c);return s?`line ${s}`:e})}t(z,"remapErrorLines");function G(n){let r=n.split(`
|
|
2
|
+
`),e=new Map,o=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){o=g;break}if(o===-1)return{text:n,lineMap:e};let c=[];for(let g=o+1;g<r.length;g++){let d=r[g];if(d.trim()===""||_.test(d)||E.test(d))continue;if(k.test(d))continue;c.push(d.replace(/\t/g," "))}if(!W(c))return{text:n,lineMap:e};let s=X(c),a=[],l=0;for(let g=0;g<=o;g++)a.push(r[g]),l++,e.set(l,g+1);for(let g=o+1;g<r.length;g++){let d=r[g],p=d.trim(),f=g+1;if(p===""){a.push(d),l++,e.set(l,f);continue}if(_.test(d)){a.push(d),l++,e.set(l,f);continue}if(E.test(d)){a.push(d),l++,e.set(l,f);continue}if(k.test(d))continue;let h=d.replace(/\t/g," "),w=H.exec(h);if(w?.index!==void 0){let u=w.index,x=Math.round(u/s)+1,m=u+1;while(m<h.length&&j.test(h[m]))m++;while(m<h.length&&h[m]===" ")m++;let b=h.slice(m).trimEnd();if(!b)throw Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);let U=K.repeat(x);a.push(U+b),l++,e.set(l,f)}else if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;else if(S.test(h))a.push(d),l++,e.set(l,f);else if(/^\s+/.test(h))throw Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);else a.push(d),l++,e.set(l,f)}return{text:a.join(`
|
|
3
|
+
`),lineMap:e}}t(G,"preprocessBoxDrawing");var v=new Tr(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ee=t(()=>{v.reset(),L()},"clear"),te=t(()=>v.records.stack[0],"getRoot"),re=t(()=>v.records.cnt,"getCount"),ne=F.treeView,ie=t(()=>Q(ne,A().treeView),"getConfig"),oe=t((n,r,e,o,c,s)=>{while(n<=v.records.stack[v.records.stack.length-1].level)v.records.stack.pop();let a={id:v.records.cnt++,level:n,name:r,nodeType:e,icon:c,cssClass:o,description:s,children:[]};v.records.stack[v.records.stack.length-1].children.push(a),v.records.stack.push(a)},"addNode"),se={clear:ee,addNode:oe,getRoot:te,getCount:re,getConfig:ie,getAccTitle:R,getAccDescription:I,getDiagramTitle:D,setAccDescription:P,setAccTitle:N,setDiagramTitle:O},y=se,ce=t((n)=>{ae(n,y);for(let r of n.nodes){let e=typeof r.indent==="number"?r.indent:0,o=r.name,c=o.endsWith("/");if(c)o=o.slice(0,-1);let s=c?"directory":"file",a=r.classAnnotation||void 0,l=r.iconAnnotation,g=l!==void 0?l||"none":void 0,d=r.descAnnotation||void 0,p=d?q(d,A()):void 0;y.addNode(e,o,s,a,g,p)}},"populate"),le={parse:t(async(n)=>{let{text:r,lineMap:e}=G(n);try{let o=await he("treeView",r);i.debug(o),ce(o)}catch(o){if(e.size>0&&o instanceof Error)o.message=z(o.message,e);throw o}},"parse")},C={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function Z(n,r){let e=r?.filenameIcons?.[n];if(e)return e;let o=n.lastIndexOf(".");if(o>0){let c=n.substring(o).toLowerCase(),s=r?.extensionIcons;return s?.[c]??s?.[c.slice(1)]}return}t(Z,"detectIcon");function B(n,r){if(n.includes(":"))return n;if(n in C.icons||!r)return`${C.prefix}:${n}`;return`${r}:${n}`}t(B,"qualifyIcon");function V(n,r){if(n.icon==="none")return;if(n.icon)return B(n.icon,r.defaultIconPack);if(!r.showIcons)return;if(n.nodeType==="file"){let e=Z(n.name,r);if(e==="none")return;if(e)return B(e,r.defaultIconPack)}return`${C.prefix}:${n.nodeType==="directory"?"folder":"file"}`}t(V,"getNodeIcon");jr([{name:C.prefix,icons:C}]);var T=14,de=4,pe=16,fe=t(async(n,r)=>{let e=[],o=t((s)=>{let a=V(s,r);if(a)e.push({icon:a,node:s});s.children.forEach(o)},"collect");o(n);let c=await Promise.all(e.map(async({icon:s,node:a})=>({id:a.id,svg:await Gt(s,{height:T,width:T})})));return new Map(c.map(({id:s,svg:a})=>[s,a]))},"resolveNodeIcons"),ge=t((n,r,e,o,c,s)=>{let a=o.append("g"),l="treeView-node-label";if(e.nodeType==="directory")l+=" treeView-node-dir";if(e.cssClass)l+=` ${e.cssClass}`;let g=T+de,d=V(e,c),p=d!==void 0;if(d)a.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+c.paddingX}, ${r+c.paddingY})`).html(s.get(e.id)??"");let f=a.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",l),{height:h,width:w}=f.node().getBBox(),u=h+c.paddingY*2,x=n+c.paddingX+(p?g:0);f.attr("x",x),f.attr("y",r+u/2);let m=x+w,b=w+c.paddingX*2+(p?g:0);if(e.BBox={x:n,y:r,width:b,height:u},e.cssClass?.split(/\s+/).includes("highlight"))a.insert("rect",":first-child").attr("x",n).attr("y",r+1).attr("width",0).attr("height",u-2).attr("rx",3).attr("class","treeView-highlight-bg");return{node:e,nodeGroup:a,labelRightEdge:m,centerY:r+u/2}},"positionLabel"),M=t((n,r,e,o,c,s)=>n.append("line").attr("x1",r).attr("y1",e).attr("x2",o).attr("y2",c).attr("stroke-width",s).attr("class","treeView-node-line"),"positionLine"),ue=t((n,r,e,o)=>{let c=0,s=0,a=[],l=t((p,f,h,w)=>{let u=w*(h.rowIndent+h.paddingX),x=ge(u,c,f,p,h,o);a.push(x);let{height:m,width:b}=f.BBox;M(p,u-h.rowIndent,c+m/2,u,c+m/2,h.lineThickness),s=Math.max(s,u+b),c+=m},"drawNode"),g=t((p,f=0)=>{l(n,p,e,f),p.children.forEach((x)=>{g(x,f+1)});let{x:h,y:w,height:u}=p.BBox;if(p.children.length){let{y:x,height:m}=p.children[p.children.length-1].BBox;M(n,h+e.paddingX,w+u,h+e.paddingX,x+m/2+e.lineThickness/2,e.lineThickness)}},"processNode");g(r);let d=a.filter((p)=>p.node.description);if(d.length>0){let f=Math.max(...a.map((h)=>h.labelRightEdge))+pe;for(let h of d){let u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();s=Math.max(s,f+u.width+e.paddingX)}}for(let p of a)if(p.node.cssClass?.split(/\s+/).includes("highlight")){let f=p.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let h=s-p.node.BBox.x+8;f.attr("width",h),s=Math.max(s,p.node.BBox.x+h+2)}}return{totalHeight:c,totalWidth:s}},"drawTree"),me=t(async(n,r,e,o)=>{i.debug(`Rendering treeView diagram
|
|
4
|
+
`+n);let c=o.db,s=c.getRoot(),a=c.getConfig(),l=J(r),g=l.append("g");g.attr("class","tree-view");let d=await fe(s,a),{totalHeight:p,totalWidth:f}=ue(g,s,a,d);l.attr("viewBox",`-${a.lineThickness/2} 0 ${f} ${p}`),Y(l,p,f,a.useMaxWidth)},"draw"),we={draw:me},xe=we,ve={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},be=t(({treeView:n})=>{let{labelFontSize:r,labelColor:e,lineColor:o,iconColor:c,descriptionColor:s,highlightBg:a,highlightStroke:l}=Q(ve,n);return`
|
|
5
5
|
.treeView-node-label {
|
|
6
6
|
font-size: ${r};
|
|
7
7
|
fill: ${e};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ps}from"./chunk-y5f7gy03.js";export{Ps as createPacketServices};
|