@bkm016/basalt 0.1.4 → 0.1.5
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/README.md +53 -5
- package/{chunk-y648fzx0.js → chunk-0039s4jt.js} +3 -3
- package/{chunk-m40gxwq4.js → chunk-00gwse5r.js} +3 -3
- package/{chunk-t6zs4kw0.js → chunk-0fwdxd45.js} +2 -2
- package/{chunk-nmca5h6m.js → chunk-0j0qggej.js} +1 -1
- package/chunk-0n99m9m4.js +2 -0
- package/{chunk-pjyn2s97.js → chunk-0stvywr8.js} +1 -1
- package/{chunk-ztsjgssj.js → chunk-1xa7d5mh.js} +1 -1
- package/chunk-2nb3d92s.js +2 -0
- package/chunk-2nkfxhef.js +3868 -0
- package/chunk-2pa1z37c.js +2 -0
- package/{chunk-fw2bpqmw.js → chunk-2qcpq99g.js} +1 -1
- package/{chunk-981f9dw8.js → chunk-36cqq0ga.js} +6 -6
- package/{chunk-whvj83b7.js → chunk-3c330qna.js} +2 -2
- package/chunk-3k627vf2.js +3 -0
- package/{chunk-r7fpkb49.js → chunk-3k7ejpkc.js} +1 -1
- package/chunk-4g5f43ea.js +3 -0
- package/{chunk-fjtvjrkg.js → chunk-539ekagy.js} +4 -4
- package/{chunk-97rzj7f6.js → chunk-5v4g21rw.js} +1 -1
- package/{chunk-r0scgfwx.js → chunk-6dsq0fns.js} +2 -2
- package/{chunk-pbcy6zdt.js → chunk-7as47pcw.js} +1 -1
- package/{chunk-g2t6t8fk.js → chunk-7jezts2n.js} +2 -2
- package/{chunk-8wc8qdx8.js → chunk-7qq99360.js} +6 -6
- package/{chunk-9rmqgc3c.js → chunk-7tgqhveh.js} +15 -15
- package/{chunk-mvfsxdx6.js → chunk-7w0mefgk.js} +10 -10
- package/{chunk-y58ygzn9.js → chunk-818nd6s1.js} +3 -3
- package/{chunk-vv7fp27r.js → chunk-8mezk0cb.js} +2 -2
- package/{chunk-q7t30zz2.js → chunk-8xb636vr.js} +5 -5
- package/{chunk-ev6yvy5y.js → chunk-980drajf.js} +15 -15
- package/{chunk-3x94302m.js → chunk-9z7sdh5e.js} +3 -3
- package/{chunk-zggzfa7j.js → chunk-a4b75ekk.js} +2 -2
- package/{chunk-2zp1mv3q.js → chunk-ar3dbfp9.js} +1 -1
- package/{chunk-vk1gxk1t.js → chunk-aw65h276.js} +1 -1
- package/{chunk-f3xadvab.js → chunk-b9fqretv.js} +2 -2
- package/{chunk-7tbya5b5.js → chunk-bgkegf0k.js} +22 -22
- package/{chunk-0y7ne3d0.js → chunk-bwawt15q.js} +2 -2
- package/{chunk-pxsrqrd0.js → chunk-c4qr1f41.js} +2 -2
- package/chunk-dddsrff6.js +478 -0
- package/{chunk-xfvvh1s5.js → chunk-e63c1186.js} +1 -1
- package/{chunk-em187cy3.js → chunk-ebzkckyw.js} +2 -2
- package/chunk-eegztdzb.js +2 -0
- package/{chunk-rmj5b73e.js → chunk-gw05p4g3.js} +1 -1
- package/{chunk-k23t7vhs.js → chunk-h1rypb99.js} +5 -5
- package/{chunk-akr0a8nc.js → chunk-hq5ke1yp.js} +1 -1
- package/{chunk-jwdb0ccj.js → chunk-jvwg4rn1.js} +3 -3
- package/{chunk-7afmgncg.js → chunk-jyrwk08p.js} +1 -1
- package/chunk-kns4kv7b.js +3 -0
- package/{chunk-8d46jtbj.js → chunk-mat08ab1.js} +2 -2
- package/{chunk-jk25nt60.js → chunk-mkp28k1x.js} +2 -2
- package/{chunk-3ct2tkr8.js → chunk-npez1492.js} +2 -2
- package/{chunk-shadcb9z.js → chunk-nx3jnbv8.js} +2 -2
- package/{chunk-ykens1hy.js → chunk-nxkmd29x.js} +1 -1
- package/{chunk-y7nma9rk.js → chunk-pjr91g6k.js} +2 -2
- package/{chunk-m8vkwdgr.js → chunk-r0jc8e7t.js} +4 -4
- package/chunk-rxj6tct8.js +2 -0
- package/{chunk-362g64pd.js → chunk-sqaam5ak.js} +1 -1
- package/{chunk-4w17tzp5.js → chunk-srjgvdvs.js} +12 -12
- package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
- package/{chunk-k6w6y71k.js → chunk-t7sc0wwc.js} +2 -2
- package/{chunk-kp22kaez.js → chunk-v4k3qmdm.js} +2 -2
- package/{chunk-1vd0f74z.js → chunk-vt1anydc.js} +4 -4
- package/chunk-wd3z74av.js +2 -0
- package/{chunk-xh3vr5vz.js → chunk-wfyrfvfn.js} +1 -1
- package/{chunk-2hbfk5xd.js → chunk-wnzvnskb.js} +2 -2
- package/{chunk-cjc90f84.js → chunk-x89em726.js} +3 -3
- package/{chunk-vexrrw1b.js → chunk-xtq1xpq0.js} +2 -2
- package/chunk-yna8bwqc.js +2 -0
- package/{chunk-aky4tztg.js → chunk-zn0g0859.js} +2 -2
- package/{chunk-qe0teyn1.js → chunk-zrkh5dw7.js} +1 -1
- package/chunk-zzwjt7fp.js +2 -0
- package/compiled.js +12 -12
- package/package.json +1 -1
- package/ui-test-worker.js +20 -20
- package/web/chunk-01hcjafh.js +2 -0
- package/web/{chunk-n8sky2q6.js → chunk-07agqp8h.js} +1 -1
- package/web/{chunk-hvw3gn2a.js → chunk-0k9aec1s.js} +20 -20
- package/web/{chunk-74j07k8k.js → chunk-0p1nmj5n.js} +2 -2
- package/web/chunk-0qr891eq.js +70 -0
- package/web/{chunk-ts7zrf5b.js → chunk-0whceqes.js} +2 -2
- package/web/chunk-0ytga215.js +1 -0
- package/web/{chunk-0z0y25zf.js → chunk-12z7d0hp.js} +3 -3
- package/web/chunk-14bad871.js +2 -0
- package/web/chunk-1amzv4ha.js +1 -0
- package/web/chunk-1cfh0e2e.js +324 -0
- package/web/chunk-1pasbxwh.js +89 -0
- package/web/{chunk-4d3a7xs2.js → chunk-1s2hp6h1.js} +1 -1
- package/web/chunk-26bwh1sb.js +169 -0
- package/web/{chunk-wnskxerq.js → chunk-2nht58dc.js} +5 -5
- package/web/chunk-2y0rc1fe.js +1 -0
- package/web/chunk-3hkgdw6f.js +36 -0
- package/web/chunk-4a4j030b.js +1 -0
- package/web/{chunk-nvhmq4z5.js → chunk-4m3zdd41.js} +6 -6
- package/web/chunk-4w298aqs.js +1 -0
- package/web/{chunk-t4c8xavd.js → chunk-56krfj3b.js} +7 -7
- package/web/{chunk-ds7srg4p.js → chunk-5nda24gv.js} +1 -1
- package/web/{chunk-42e3b9hv.js → chunk-5shygfgb.js} +19 -19
- package/web/chunk-65nwc4cf.js +1 -0
- package/web/chunk-6bwgdvf6.js +1 -0
- package/web/chunk-6enn8p66.js +1 -0
- package/web/chunk-6stt9d18.js +1 -0
- package/web/{chunk-4gavbw65.js → chunk-7a3c137d.js} +1 -1
- package/web/chunk-7e47b1sn.js +1 -0
- package/web/chunk-7pypx5h8.js +2 -0
- package/web/chunk-7znyd1mj.js +39 -0
- package/web/{chunk-3re8y26v.js → chunk-892nf39p.js} +7 -7
- package/web/chunk-8r0s8tx7.js +1 -0
- package/web/chunk-9dy7z3ej.js +2 -0
- package/web/chunk-9mq2cdtq.js +1 -0
- package/web/chunk-9w5tf22s.js +1 -0
- package/web/{chunk-bhsaj6qq.js → chunk-9xgspn75.js} +2 -2
- package/web/{chunk-zx8zec24.js → chunk-abhad4zj.js} +56 -56
- package/web/chunk-advfpyb9.js +140 -0
- package/web/chunk-affear07.js +3 -0
- package/web/chunk-ahztazsg.js +1 -0
- package/web/chunk-aqt7kc3s.js +106 -0
- package/web/chunk-b5hah4mf.js +1 -0
- package/web/chunk-b8tfetd8.js +1 -0
- package/web/{chunk-9cx1be43.js → chunk-bnb9xhgw.js} +15 -15
- package/web/{chunk-n1dmrz44.js → chunk-c01176kn.js} +2 -2
- package/web/chunk-c3nn0vvc.js +1 -0
- package/web/chunk-c53xmf48.js +30 -0
- package/web/chunk-ckgpy4r4.js +1 -0
- package/web/chunk-crzseqbx.js +24 -0
- package/web/chunk-d22wq71s.js +1 -0
- package/web/{chunk-pws2seas.js → chunk-d60dpf69.js} +19 -19
- package/web/{chunk-6cnek1xh.js → chunk-d6ddkh6e.js} +1 -1
- package/web/{chunk-cg3jterp.js → chunk-d9wdsjkk.js} +2 -2
- package/web/{chunk-ttg6tbwx.js → chunk-da7m1kva.js} +2 -2
- package/web/chunk-dbnrfxt1.js +8 -0
- package/web/chunk-ddxf8e84.js +1 -0
- package/web/chunk-dzg1pv80.js +200 -0
- package/web/{chunk-yqbnps3a.js → chunk-e8h45nyr.js} +1 -1
- package/web/chunk-ej9vb61c.js +1 -0
- package/web/chunk-f9k3xrwb.js +2 -0
- package/web/{chunk-fh2vj0wv.js → chunk-fjag6yg8.js} +2 -2
- package/web/chunk-fnnrrzqa.js +78 -0
- package/web/{chunk-n90cqdvg.js → chunk-fv6vm14n.js} +2 -2
- package/web/{chunk-b1bgzz66.js → chunk-g5jxwkdh.js} +1 -1
- package/web/{chunk-sspfxp5e.js → chunk-g8kkc6vz.js} +1 -1
- package/web/chunk-g9sqbafw.js +2 -0
- package/web/{chunk-0h0vb6gt.js → chunk-gcv91974.js} +4 -4
- package/web/{chunk-sfg2wkhe.js → chunk-gxqaa4sv.js} +7 -7
- package/web/chunk-gxsb5tx3.js +1 -0
- package/web/{chunk-54thej0t.js → chunk-gyp6v7jd.js} +2 -2
- package/web/chunk-h0c42zy3.js +1 -0
- package/web/chunk-h2ag4kvz.js +2 -0
- package/web/{chunk-kmr7r9xj.js → chunk-h6gh63xj.js} +2 -2
- package/web/{chunk-6m69hczt.js → chunk-h6k1x096.js} +2 -2
- package/web/{chunk-24mfx6w1.js → chunk-j1bw5v1g.js} +2 -2
- package/web/chunk-j34q5jn6.js +1 -0
- package/web/{chunk-0pbjgdgp.js → chunk-ja7w629n.js} +2 -2
- package/web/{chunk-zbj1trar.js → chunk-jam45rqg.js} +2 -2
- package/web/{chunk-f4tacm06.js → chunk-jcdw85mv.js} +1 -1
- package/web/chunk-jfvxxp5c.js +1 -0
- package/web/chunk-jg6fmz2d.js +1 -0
- package/web/{chunk-92ssjk2y.js → chunk-k67v6dyg.js} +40 -40
- package/web/chunk-ka7c5rhx.js +99 -0
- package/web/{chunk-df5zx17h.js → chunk-kza0t0gj.js} +1 -1
- package/web/{chunk-0b47eyrf.js → chunk-m8knte9z.js} +1 -1
- package/web/{chunk-v5cnt7c8.js → chunk-mnzramhc.js} +1 -1
- package/web/{chunk-a408enpy.js → chunk-mpfgr049.js} +1 -1
- package/web/chunk-mz1dabxh.js +1 -0
- package/web/chunk-mz9b5bsa.js +1 -0
- package/web/chunk-p53n0hwr.js +1 -0
- package/web/chunk-paywgcf7.js +40 -0
- package/web/chunk-pfcnr9tw.js +1 -0
- package/web/chunk-pyg1mr80.js +303 -0
- package/web/chunk-q7xkscc5.js +1 -0
- package/web/{chunk-xzp7jf7e.js → chunk-qcge7d6s.js} +2 -2
- package/web/chunk-qmbgb79a.js +1139 -0
- package/web/{chunk-pjkdrgm0.js → chunk-qq5gh5zr.js} +1 -1
- package/web/chunk-qrdh9j62.js +1 -0
- package/web/{chunk-9t5dnjaz.js → chunk-s24qs1bn.js} +9 -9
- package/web/chunk-sd22cnjy.js +1 -0
- package/web/{chunk-ydtrc1ay.js → chunk-sd3cdqcm.js} +2 -2
- package/web/{chunk-rykfak98.js → chunk-sf101c23.js} +2 -2
- package/web/{chunk-1gbd61z0.js → chunk-sfq6cw45.js} +2 -2
- package/web/chunk-svqj4az8.js +1 -0
- package/web/chunk-t7jwyvvr.js +1 -0
- package/web/{chunk-rvrf0f3h.js → chunk-tcp77cp2.js} +2 -2
- package/web/chunk-tf18d2dk.css +1 -0
- package/web/chunk-thbqwq6b.js +1 -0
- package/web/chunk-v0g4cqc1.js +4 -0
- package/web/chunk-vhzys0rr.js +292 -0
- package/web/chunk-vnt34mkb.js +1 -0
- package/web/chunk-vqfz99ff.js +1 -0
- package/web/chunk-vttgyb5v.js +2 -0
- package/web/chunk-x7sb3bwf.js +370 -0
- package/web/chunk-xce8n339.js +1 -0
- package/web/{chunk-kwccs9f6.js → chunk-xk1t58c4.js} +12 -12
- package/web/chunk-xsrvw7dt.js +4 -0
- package/web/chunk-xtss82z2.js +1 -0
- package/web/{chunk-2j4m0bh1.js → chunk-y7jq61nv.js} +2 -2
- package/web/{chunk-1eg9sbbt.js → chunk-ybw6vgf6.js} +2 -2
- package/web/{chunk-ybrf9mhz.js → chunk-yvgs6bm3.js} +4 -4
- package/web/{chunk-b53bfkys.js → chunk-z4aj066q.js} +1 -1
- package/web/chunk-zazs8p6c.js +1 -0
- package/web/{chunk-aqfpnhmt.js → chunk-zc1mk10n.js} +19 -19
- package/web/{chunk-d11v5s7w.js → chunk-zqht0jzx.js} +6 -6
- package/web/{chunk-pz9ps2jm.js → chunk-zz397b0v.js} +12 -12
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-06hdzq5n.js +0 -2
- package/chunk-5dfbezv9.js +0 -2
- package/chunk-5x1sankd.js +0 -3753
- package/chunk-71h08f4g.js +0 -2
- package/chunk-7nzhdrv9.js +0 -2
- package/chunk-7q51n619.js +0 -2
- package/chunk-9mmz6wt3.js +0 -2
- package/chunk-bpw6q7g0.js +0 -3
- package/chunk-fvn32nzj.js +0 -478
- package/chunk-n6e43rvk.js +0 -3
- package/chunk-ry0z4ev6.js +0 -2
- package/chunk-vkpvcxjr.js +0 -2
- package/web/chunk-0rmkpsgp.js +0 -1
- package/web/chunk-0s80zw00.js +0 -1
- package/web/chunk-0xkyryrq.js +0 -1
- package/web/chunk-2s0bmrkv.js +0 -39
- package/web/chunk-2z1rwr28.js +0 -2
- package/web/chunk-344bq59c.js +0 -89
- package/web/chunk-3t0211rw.js +0 -1
- package/web/chunk-44rmrmcn.js +0 -1
- package/web/chunk-4bzqrwr0.js +0 -1139
- package/web/chunk-4jmazh6x.js +0 -370
- package/web/chunk-4re74xwm.js +0 -140
- package/web/chunk-4rm1vy7w.js +0 -1
- package/web/chunk-59kqahb3.js +0 -1
- package/web/chunk-5qtyq3ce.js +0 -292
- package/web/chunk-5z4jcqct.js +0 -200
- package/web/chunk-5z6x2n5h.js +0 -1
- package/web/chunk-6beqrmtq.js +0 -1
- package/web/chunk-6f5ke0x9.js +0 -1
- package/web/chunk-6xaqxcq8.js +0 -1
- package/web/chunk-7q6wvv2x.js +0 -1
- package/web/chunk-7qsa4p8h.js +0 -1
- package/web/chunk-8nja0ygy.js +0 -1
- package/web/chunk-8y64fkpz.js +0 -24
- package/web/chunk-9ad7v7bm.js +0 -8
- package/web/chunk-9dzxv335.js +0 -4
- package/web/chunk-a497tykb.js +0 -70
- package/web/chunk-b6k9w215.js +0 -2
- package/web/chunk-cjfssg3m.js +0 -2
- package/web/chunk-cqp1d4p0.js +0 -1
- package/web/chunk-dy2gm1fs.js +0 -1
- package/web/chunk-e0zre35a.js +0 -1
- package/web/chunk-e9twvs9n.js +0 -3
- package/web/chunk-f2kgtyfp.js +0 -1
- package/web/chunk-f8bn5tzf.js +0 -1
- package/web/chunk-f91wzwtk.js +0 -1
- package/web/chunk-fdp9bsj7.js +0 -1
- package/web/chunk-g1ev11wx.js +0 -1
- package/web/chunk-gmzqdm7v.js +0 -1
- package/web/chunk-hfaffkrh.js +0 -1
- package/web/chunk-j2vt8c8v.js +0 -1
- package/web/chunk-ka3q31t1.js +0 -1
- package/web/chunk-khxcn8tt.js +0 -106
- package/web/chunk-kqqmp1am.js +0 -1
- package/web/chunk-m2d1sp30.js +0 -1
- package/web/chunk-nbgqbxcy.js +0 -1
- package/web/chunk-ncpnpe9w.js +0 -99
- package/web/chunk-ne0v8mfb.js +0 -2
- package/web/chunk-ngx2cp8x.js +0 -2
- package/web/chunk-nxcgf7ec.js +0 -1
- package/web/chunk-p0kvmf28.js +0 -2
- package/web/chunk-p3k7m5nr.js +0 -1
- package/web/chunk-pggaffrh.js +0 -169
- package/web/chunk-pxe3vna4.js +0 -1
- package/web/chunk-qh15dxav.css +0 -1
- package/web/chunk-qpmbxhh6.js +0 -1
- package/web/chunk-r0rctnxz.js +0 -1
- package/web/chunk-rn3dnqm8.js +0 -1
- package/web/chunk-rtf2zzzv.js +0 -1
- package/web/chunk-srrfphes.js +0 -1
- package/web/chunk-tdr6x2xc.js +0 -1
- package/web/chunk-tncvg1nn.js +0 -1
- package/web/chunk-vyp0ns1f.js +0 -2
- package/web/chunk-wvdehm9y.js +0 -303
- package/web/chunk-x7ahcpj7.js +0 -1
- package/web/chunk-y38bf0wm.js +0 -1
- package/web/chunk-y56aaba5.js +0 -2
- package/web/chunk-ye58t45p.js +0 -4
- package/web/chunk-z1h20s8c.js +0 -78
- package/web/chunk-zj4q9jth.js +0 -36
- package/web/chunk-zj5k94dk.js +0 -40
- package/web/chunk-zqch0sc8.js +0 -30
- package/web/install.ps1 +0 -91
- package/web/install.sh +0 -177
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fi}from"./chunk-jam45rqg.js";export{fi as default};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import{e,
|
|
2
|
-
`+
|
|
3
|
-
Expecting `+Dt.join(", ")+", got '"+(this.terminals_[
|
|
1
|
+
import{e,a,Re,v,C,S,E,T,A,R,L,l,p,Ui,M,ue,oe,se,ht,ye,ve}from"./chunk-pyg1mr80.js";import{$t}from"./chunk-tcp77cp2.js";import{ge}from"./chunk-9xgspn75.js";import{le}from"./chunk-01hcjafh.js";var Bt=function(){var t=e(function(Q,h,g,n){for(g=g||{},n=Q.length;n--;g[Q[n]]=h);return g},"o"),s=[1,2],c=[1,3],r=[1,4],u=[2,4],f=[1,9],m=[1,11],b=[1,16],o=[1,17],D=[1,18],x=[1,19],G=[1,33],Y=[1,20],j=[1,21],O=[1,22],y=[1,23],V=[1,24],F=[1,26],z=[1,27],W=[1,28],K=[1,29],N=[1,30],st=[1,31],St=[1,32],gt=[1,35],yt=[1,36],mt=[1,37],bt=[1,38],rt=[1,34],k=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],kt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Mt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Lt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(h,g,n,_,w,i,it){var d=i.length-1;switch(w){case 3:return _.setRootDoc(i[d]),i[d];break;case 4:this.$=[];break;case 5:if(i[d]!="nl")i[d-1].push(i[d]),this.$=i[d-1];break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:let Et=i[d-1];Et.description=_.trimColon(i[d]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:let _t=_.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:_t};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var X=i[d],J=i[d-2].trim();if(i[d].match(":")){var lt=i[d].split(":");X=lt[0],J=[J,lt[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:_.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),_.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),_.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:_.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:_.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:_.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:_.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:s,5:c,6:r},{1:[3]},{3:5,4:s,5:c,6:r},{3:6,4:s,5:c,6:r},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(k,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:b,17:o,19:D,22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(k,[2,7]),t(k,[2,8]),t(k,[2,9]),t(k,[2,10]),t(k,[2,11]),t(k,[2,12],{14:[1,40],15:[1,41]}),t(k,[2,16]),{18:[1,42]},t(k,[2,18],{20:[1,43]}),{23:[1,44]},t(k,[2,22]),t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(k,[2,28]),{34:[1,49]},{36:[1,50]},t(k,[2,31]),{13:51,24:G,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(kt,[2,44],{58:[1,56]}),t(kt,[2,45],{58:[1,57]}),t(k,[2,38]),t(k,[2,39]),t(k,[2,40]),t(k,[2,41]),t(k,[2,6]),t(k,[2,13]),{13:58,24:G,57:rt},t(k,[2,17]),t(Mt,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(k,[2,29]),t(k,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(k,[2,14],{14:[1,71]}),{4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,21:[1,72],22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(k,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(k,[2,34]),t(k,[2,35]),t(k,[2,36]),t(k,[2,37]),t(kt,[2,46]),t(kt,[2,47]),t(k,[2,15]),t(k,[2,19]),t(Mt,u,{7:78}),t(k,[2,26]),t(k,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,21:[1,81],22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(k,[2,32]),t(k,[2,33]),t(k,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(h,g){if(g.recoverable)this.trace(h);else{var n=Error(h);throw n.hash=g,n}},"parseError"),parse:e(function(h){var g=this,n=[0],_=[],w=[null],i=[],it=this.table,d="",X=0,J=0,lt=0,Et=2,_t=1,me=i.slice.call(arguments,1),I=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(I.setInput(h,tt.yy),tt.yy.lexer=I,tt.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var It=I.yylloc;i.push(It);var be=I.options&&I.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ke(H){n.length=n.length-2*H,w.length=w.length-H,i.length=i.length-H}e(ke,"popStack");function Wt(){var H=_.pop()||I.lex()||_t;if(typeof H!=="number"){if(H instanceof Array)_=H,H=_.pop();H=g.symbols_[H]||H}return H}e(Wt,"lex");var P,Nt,et,U,ts,Ot,at={},vt,q,jt,Dt;while(!0){if(et=n[n.length-1],this.defaultActions[et])U=this.defaultActions[et];else{if(P===null||typeof P>"u")P=Wt();U=it[et]&&it[et][P]}if(typeof U>"u"||!U.length||!U[0]){var Rt="";Dt=[];for(vt in it[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(I.showPosition)Rt="Parse error on line "+(X+1)+`:
|
|
2
|
+
`+I.showPosition()+`
|
|
3
|
+
Expecting `+Dt.join(", ")+", got '"+(this.terminals_[P]||P)+"'";else Rt="Parse error on line "+(X+1)+": Unexpected "+(P==_t?"end of input":"'"+(this.terminals_[P]||P)+"'");this.parseError(Rt,{text:I.match,token:this.terminals_[P]||P,line:I.yylineno,loc:It,expected:Dt})}if(U[0]instanceof Array&&U.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+P);switch(U[0]){case 1:if(n.push(P),w.push(I.yytext),i.push(I.yylloc),n.push(U[1]),P=null,!Nt){if(J=I.yyleng,d=I.yytext,X=I.yylineno,It=I.yylloc,lt>0)lt--}else P=Nt,Nt=null;break;case 2:if(q=this.productions_[U[1]][1],at.$=w[w.length-q],at._$={first_line:i[i.length-(q||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(q||1)].first_column,last_column:i[i.length-1].last_column},be)at._$.range=[i[i.length-(q||1)].range[0],i[i.length-1].range[1]];if(Ot=this.performAction.apply(at,[d,J,X,tt.yy,U[1],w,i].concat(me)),typeof Ot<"u")return Ot;if(q)n=n.slice(0,-1*q*2),w=w.slice(0,-1*q),i=i.slice(0,-1*q);n.push(this.productions_[U[1]][0]),w.push(at.$),i.push(at._$),jt=it[n[n.length-2]][n[n.length-1]],n.push(jt);break;case 3:return!0}}return!0},"parse")},Se=function(){var Q={EOF:1,parseError:e(function(g,n){if(this.yy.parser)this.yy.parser.parseError(g,n);else throw Error(g)},"parseError"),setInput:e(function(h,g){if(this.yy=g||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:e(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var g=h.match(/(?:\r\n?|\n).*/g);if(g)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:e(function(h){var g=h.length,n=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var _=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1)this.yylineno-=n.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===_.length?this.yylloc.first_column:0)+_[_.length-n.length].length-n[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(h){this.unput(this.match.slice(h))},"less"),pastInput:e(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:e(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:e(function(){var h=this.pastInput(),g=Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
|
-
`+g+"^"},"showPosition"),test_match:e(function(h,g){var
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:e(function(g){this.conditionStack.push(g)},"begin"),popState:e(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:e(function(g){this.begin(g)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(g,o,v,w){function n(){let d=o.yytext.indexOf("%%");if(d===0)return!1;if(d>0){let X=o.yytext.slice(0,d),J=o.yytext.slice(d);if(J)g.lexer.unput(J);o.yytext=X}return!0}e(n,"processId");var it=w;switch(v){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),o.yytext=o.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),o.yytext=o.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!n())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+o.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!n())return;return this.popState(),"ID";break;case 66:if(!n())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),o.yytext=o.yytext.substr(2).trim(),31;break;case 68:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!n())return;return 24;case 74:return o.yytext=o.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return Q}();Lt.lexer=me;function Tt(){this.yy={}}return e(Tt,"Parser"),Tt.prototype=Lt,Lt.Parser=Tt,new Tt}();Bt.parser=Bt;var Ee=Bt,_e="TB",qt="TB",Ut="dir",ot="state",nt="root",Gt="relation",ve="classDef",De="style",Ce="applyClass",ut="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",re="markdown",ne="normal",$t="rect",Ft="rectWithTitle",Ae="stateStart",xe="stateEnd",Yt="divider",Ht="roundedWithTitle",we="note",Ie="noteGroup",pt="statediagram",Ne="state",Oe=`${pt}-${Ne}`,oe="transition",Re="note",$e="note-edge",Fe=`${oe} ${$e}`,Pe=`${pt}-${Re}`,Be="cluster",Ge=`${pt}-${Be}`,Ye="cluster-alt",Ve=`${pt}-${Ye}`,le="parent",de="note",Me="state",Vt="----",We=`${Vt}${de}`,zt=`${Vt}${le}`,At=new Map,Z=0,ue=0,ct=new Map,je=e((t,i,c,a)=>{if(t===Yt&&c?.id!==void 0&&ct.has(c.id)){let b=ct.get(c.id);return ct.set(i,b),b}let u=ue++,f=a?void 0:u;return ct.set(i,f),f},"colorSlotFor");function xt(t="",i=0,c="",a=Vt){let u=c!==null&&c.length>0?`${a}${c}`:"";return`${Me}-${t}${u}-${i}`}e(xt,"stateDomId");var Ue=e((t,i,c,a,u,f,b,k)=>{r.trace("items",i),i.forEach((l)=>{switch(l.stmt){case ot:dt(t,l,c,a,u,f,b,k);break;case ut:dt(t,l,c,a,u,f,b,k);break;case Gt:{dt(t,l.state1,c,a,u,f,b,k),dt(t,l.state2,c,a,u,f,b,k);let D=b==="neo",x={id:"edge"+Z,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:D?"arrow_barb_neo":"arrow_barb",style:Zt,labelStyle:"",label:y.sanitizeText(l.description??"",s()),arrowheadStyle:te,labelpos:ee,labelType:re,thickness:ne,classes:oe,look:b};u.push(x),Z++}break}})},"setupDoc"),Kt=e((t,i=qt)=>{let c=i;if(t.doc){for(let a of t.doc)if(a.stmt==="dir")c=a.value}return c},"getDir");function ht(t,i,c){if(!i.id||i.id==="</join></fork>"||i.id==="</choice>")return;if(i.cssClasses){if(!Array.isArray(i.cssCompiledStyles))i.cssCompiledStyles=[];i.cssClasses.split(" ").forEach((u)=>{let f=c.get(u);if(f)i.cssCompiledStyles=[...i.cssCompiledStyles??[],...f.styles]})}let a=t.find((u)=>u.id===i.id);if(a)Object.assign(a,i);else t.push(i)}e(ht,"insertOrUpdateNode");function fe(t){return t?.classes?.join(" ")??""}e(fe,"getClassesFromDbInfo");function pe(t){return t?.styles??[]}e(pe,"getStylesFromDbInfo");var dt=e((t,i,c,a,u,f,b,k)=>{let l=i.id,D=c.get(l),x=fe(D),Y=pe(D),V=s(),j=x.trim()!==""||Y.length>0;if(r.info("dataFetcher parsedItem",i,D,Y),l!=="root"){let F=$t;if(i.start===!0)F=Ae;else if(i.start===!1)F=xe;if(i.type!==ut)F=i.type;if(!At.get(l))At.set(l,{id:l,shape:F,description:y.sanitizeText(l,V),cssClasses:`${x} ${Oe}`,cssStyles:Y});let m=At.get(l);if(i.description){if(Array.isArray(m.description))m.shape=Ft,m.description.push(i.description);else if(m.description?.length&&m.description.length>0)if(m.shape=Ft,m.description===l)m.description=[i.description];else m.description=[m.description,i.description];else m.shape=$t,m.description=i.description;m.description=y.sanitizeTextOrArray(m.description,V)}if(m.description?.length===1&&m.shape===Ft)if(m.type==="group")m.shape=Ht;else m.shape=$t;if(!m.type&&i.doc)r.info("Setting cluster for XCX",l,Kt(i)),m.type="group",m.isGroup=!0,m.dir=Kt(i),m.shape=i.type===Qt?Yt:Ht,m.colorIndex=je(m.shape,l,t,j),m.cssClasses=`${m.cssClasses} ${Ge} ${f?Ve:""}`;let M={labelStyle:"",shape:m.shape,label:m.description,cssClasses:m.cssClasses,cssCompiledStyles:[],cssStyles:m.cssStyles,id:l,dir:m.dir,domId:xt(l,Z),type:m.type,isGroup:m.type==="group",colorIndex:m.colorIndex,padding:8,rx:10,ry:10,look:b,labelType:"markdown"};if(M.shape===Yt)M.label="";if(t&&t.id!=="root")r.trace("Setting node ",l," to be child of its parent ",t.id),M.parentId=t.id;if(M.centerLabel=!0,i.note){let P={labelStyle:"",shape:we,label:i.note.text,labelType:"markdown",cssClasses:Pe,cssStyles:[],cssCompiledStyles:[],id:l+We+"-"+Z,domId:xt(l,Z,de),type:"node",isGroup:!1,padding:V.flowchart?.padding,look:b,position:i.note.position},z=l+zt,W={labelStyle:"",shape:Ie,label:i.note.text,cssClasses:m.cssClasses,cssStyles:[],id:l+zt,domId:xt(l,Z,le),type:"group",isGroup:!0,padding:16,look:b,position:i.note.position};Z++,W.id=z,P.parentId=z,ht(a,W,k),ht(a,P,k),ht(a,M,k);let K=l,R=P.id;if(i.note.position==="left of")K=P.id,R=l;u.push({id:K+"-"+R,start:K,end:R,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Fe,pattern:"dashed",arrowheadStyle:te,labelpos:ee,labelType:re,thickness:ne,look:b})}else ht(a,M,k)}if(i.doc)r.trace("Adding nodes children "),Ue(i,i.doc,c,a,u,!f,b,k)},"dataFetcher"),He=e(()=>{At.clear(),Z=0,ue=0,ct.clear()},"reset"),Se=e((t,i=qt)=>{if(!t.doc)return i;let c=i;for(let a of t.doc)if(a.stmt==="dir")c=a.value;return c},"getDir"),ze=e(function(t,i){return i.db.getClasses()},"getClasses"),Ke=e(async function(t,i,c,a){r.info("REF0:"),r.info("Drawing state diagram (v2)",i);let{securityLevel:u,state:f,layout:b}=s();a.db.extract(a.db.getRootDocV2());let k=a.db.getData(),l=he(i,u);if(k.type=a.type,k.layoutAlgorithm=ye(b),k.nodeSpacing=f?.nodeSpacing||50,k.rankSpacing=f?.rankSpacing||50,s().look==="neo")k.markers=["barbNeo"];else k.markers=["barb"];k.diagramId=i,await ge(k,l);let x=8;try{(typeof a.db.getLinks==="function"?a.db.getLinks():new Map).forEach((V,j)=>{let F=typeof j==="string"?j:typeof j?.id==="string"?j.id:"",m=k.nodes.find((R)=>R.id===F);if(!F){r.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(j));return}let M=l.node()?.querySelectorAll("g.node, g.rough-node"),P;if(M?.forEach((R)=>{let st=R.textContent?.trim();if(R.id===m?.domId||st===F)P=R}),!P){r.warn("⚠️ Could not find node matching text:",F);return}let z=P.parentNode;if(!z){r.warn("⚠️ Node has no parent, cannot wrap:",F);return}let W=document.createElementNS("http://www.w3.org/2000/svg","a"),K=V.url.replace(/^"+|"+$/g,"");if(W.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",K),W.setAttribute("target","_blank"),V.tooltip){let R=V.tooltip.replace(/^"+|"+$/g,"");W.setAttribute("title",R),P.setAttribute("title",R)}z.replaceChild(W,P),W.appendChild(P),r.info("\uD83D\uDD17 Wrapped node in <a> tag for:",F,V.url)})}catch(Y){r.error("❌ Error injecting clickable links:",Y)}N.insertTitle(l,"statediagramTitleText",f?.titleTopMargin??25,a.db.getDiagramTitle()),se(l,x,pt,f?.useMaxWidth??!0)},"draw"),Xe={getClasses:ze,draw:Ke,getDir:Se},G={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Xt=e(()=>new Map,"newClassesList"),Jt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Ct=e((t)=>JSON.parse(JSON.stringify(t)),"clone"),Je=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Xt(),this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=E,this.setAccTitle=S,this.getAccDescription=A,this.setAccDescription=T,this.setDiagramTitle=I,this.getDiagramTitle=L,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let a of Array.isArray(t)?t:t.doc)switch(a.stmt){case ot:this.addState(a.id.trim(),a.type,a.doc,a.description,a.note);break;case Gt:this.addRelation(a.state1,a.state2,a.description);break;case ve:this.addStyleClass(a.id.trim(),a.classes);break;case De:this.handleStyleDef(a);break;case Ce:this.setCssClass(a.id.trim(),a.styleClass);break;case"click":this.addLink(a.id,a.url,a.tooltip);break}let i=this.getStates(),c=s();He(),dt(void 0,this.getRootDocV2(),i,this.nodes,this.edges,!0,c.look,this.classes);for(let a of this.nodes){if(!Array.isArray(a.label))continue;if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(t){let i=t.id.trim().split(","),c=t.styleClass.split(",");for(let a of i){let u=this.getState(a);if(!u){let f=a.trim();this.addState(f),u=this.getState(f)}if(u)u.styles=c.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(t){if(r.info("Setting root doc",t),this.rootDoc=t,this.version===1)this.extract(t);else this.extract(this.getRootDocV2())}docTranslator(t,i,c){if(i.stmt===Gt){this.docTranslator(t,i.state1,!0),this.docTranslator(t,i.state2,!1);return}if(i.stmt===ot)if(i.id===G.START_NODE)i.id=t.id+(c?"_start":"_end"),i.start=c;else i.id=i.id.trim();if(i.stmt!==nt&&i.stmt!==ot||!i.doc)return;let a=[],u=[];for(let f of i.doc)if(f.type===Qt){let b=Ct(f);b.doc=Ct(u),a.push(b),u=[]}else u.push(f);if(a.length>0&&u.length>0){let f={stmt:ot,id:zi(),type:"divider",doc:Ct(u)};a.push(Ct(f)),i.doc=a}i.doc.forEach((f)=>this.docTranslator(i,f,!0))}getRootDocV2(){return this.docTranslator({id:nt,stmt:nt},{id:nt,stmt:nt,doc:this.rootDoc},!0),{id:nt,doc:this.rootDoc}}addState(t,i=ut,c=void 0,a=void 0,u=void 0,f=void 0,b=void 0,k=void 0){let l=t?.trim();if(!this.currentDocument.states.has(l))r.info("Adding state ",l,a),this.currentDocument.states.set(l,{stmt:ot,id:l,descriptions:[],type:i,doc:c,note:u,classes:[],styles:[],textStyles:[]});else{let D=this.currentDocument.states.get(l);if(!D)throw Error(`State not found: ${l}`);if(!D.doc)D.doc=c;if(!D.type)D.type=i}if(a)r.info("Setting state description",l,a),(Array.isArray(a)?a:[a]).forEach((x)=>this.addDescription(l,x.trim()));if(u){let D=this.currentDocument.states.get(l);if(!D)throw Error(`State not found: ${l}`);D.note=u,D.note.text=y.sanitizeText(D.note.text,s())}if(f)r.info("Setting state classes",l,f),(Array.isArray(f)?f:[f]).forEach((x)=>this.setCssClass(l,x.trim()));if(b)r.info("Setting state styles",l,b),(Array.isArray(b)?b:[b]).forEach((x)=>this.setStyle(l,x.trim()));if(k)r.info("Setting state styles",l,b),(Array.isArray(k)?k:[k]).forEach((x)=>this.setTextStyle(l,x.trim()))}clear(t){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Xt(),!t)this.links=new Map,C()}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){r.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,i,c){this.links.set(t,{url:i,tooltip:c}),r.warn("Adding link",t,i,c)}getLinks(){return this.links}startIdIfNeeded(t=""){if(t===G.START_NODE)return this.startEndCount++,`${G.START_TYPE}${this.startEndCount}`;return t}startTypeIfNeeded(t="",i=ut){return t===G.START_NODE?G.START_TYPE:i}endIdIfNeeded(t=""){if(t===G.END_NODE)return this.startEndCount++,`${G.END_TYPE}${this.startEndCount}`;return t}endTypeIfNeeded(t="",i=ut){return t===G.END_NODE?G.END_TYPE:i}addRelationObjs(t,i,c=""){let a=this.startIdIfNeeded(t.id.trim()),u=this.startTypeIfNeeded(t.id.trim(),t.type),f=this.startIdIfNeeded(i.id.trim()),b=this.startTypeIfNeeded(i.id.trim(),i.type);this.addState(a,u,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(f,b,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),this.currentDocument.relations.push({id1:a,id2:f,relationTitle:y.sanitizeText(c,s())})}addRelation(t,i,c){if(typeof t==="object"&&typeof i==="object")this.addRelationObjs(t,i,c);else if(typeof t==="string"&&typeof i==="string"){let a=this.startIdIfNeeded(t.trim()),u=this.startTypeIfNeeded(t),f=this.endIdIfNeeded(i.trim()),b=this.endTypeIfNeeded(i);this.addState(a,u),this.addState(f,b),this.currentDocument.relations.push({id1:a,id2:f,relationTitle:c?y.sanitizeText(c,s()):void 0})}}addDescription(t,i){let c=this.currentDocument.states.get(t),a=i.startsWith(":")?i.replace(":","").trim():i;c?.descriptions?.push(y.sanitizeText(a,s()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,i=""){if(!this.classes.has(t))this.classes.set(t,{id:t,styles:[],textStyles:[]});let c=this.classes.get(t);if(i&&c)i.split(G.STYLECLASS_SEP).forEach((a)=>{let u=a.replace(/([^;]*);/,"$1").trim();if(RegExp(G.COLOR_KEYWORD).exec(a)){let b=u.replace(G.FILL_KEYWORD,G.BG_FILL).replace(G.COLOR_KEYWORD,G.FILL_KEYWORD);c.textStyles.push(b)}c.styles.push(u)})}getClasses(){return this.classes}setupToolTips(t){let i=Pt();p(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(u)=>{let f=p(u.currentTarget),b=f.attr("title");if(b===null)return;let k=u.currentTarget?.getBoundingClientRect();i.transition().duration(200).style("opacity",".9"),i.style("left",window.scrollX+k.left+(k.right-k.left)/2+"px").style("top",window.scrollY+k.bottom+"px"),i.html(Le.sanitize(b)),f.classed("hover",!0)}).on("mouseout",(u)=>{i.transition().duration(500).style("opacity",0),p(u.currentTarget).classed("hover",!1)})}setCssClass(t,i){t.split(",").forEach((c)=>{let a=this.getState(c);if(!a){let u=c.trim();this.addState(u),a=this.getState(u)}a?.classes?.push(i)})}setStyle(t,i){this.getState(t)?.styles?.push(i)}setTextStyle(t,i){this.getState(t)?.textStyles?.push(i)}bindFunctions(t){this.funs.forEach((i)=>{i(t)})}getDirectionStatement(){return this.rootDoc.find((t)=>t.stmt===Ut)}getDirection(){return this.getDirectionStatement()?.value??_e}setDirection(t){let i=this.getDirectionStatement();if(i)i.value=t;else this.rootDoc.unshift({stmt:Ut,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=s();for(let i of this.nodes)if(i.wrappingWidth??=t.state?.wrappingWidth,!i.isGroup)i.minWidth??=t.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Se(this.getRootDocV2())}}getConfig(){return s().state}},qe=e((t)=>{let{theme:i,bkgColorArray:c,borderColorArray:a}=t;if(!ae(i,a))return"";let u=ie(t.look),f=ce(c),b="";for(let k=0;k<ft(a);k++){let l=a[k],D=f?`fill: ${c[k%c.length]};`:"",x=`[data-look="${u}"][data-color-id="color-${k}"]`;b+=`
|
|
5
|
+
`+g+"^"},"showPosition"),test_match:e(function(h,g){var n,_,w;if(this.options.backtrack_lexer){if(w={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)w.yylloc.range=this.yylloc.range.slice(0)}if(_=h[0].match(/(?:\r\n?|\n).*/g),_)this.yylineno+=_.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.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],n=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(n)return n;else if(this._backtrack){for(var i in w)this[i]=w[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var h,g,n,_;if(!this._more)this.yytext="",this.match="";var w=this._currentRules();for(var i=0;i<w.length;i++)if(n=this._input.match(this.rules[w[i]]),n&&(!g||n[0].length>g[0].length)){if(g=n,_=i,this.options.backtrack_lexer)if(h=this.test_match(n,w[i]),h!==!1)return h;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(h=this.test_match(g,w[_]),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:e(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:e(function(g){this.conditionStack.push(g)},"begin"),popState:e(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:e(function(g){this.begin(g)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(g,n,_,w){function i(){let d=n.yytext.indexOf("%%");if(d===0)return!1;if(d>0){let X=n.yytext.slice(0,d),J=n.yytext.slice(d);if(J)g.lexer.unput(J);n.yytext=X}return!0}e(i,"processId");var it=w;switch(_){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!i())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+n.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!i())return;return this.popState(),"ID";break;case 66:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;break;case 68:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!i())return;return 24;case 74:return n.yytext=n.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return Q}();Lt.lexer=Se;function Tt(){this.yy={}}return e(Tt,"Parser"),Tt.prototype=Lt,Lt.Parser=Tt,new Tt}();Bt.parser=Bt;var Te=Bt,Ee="TB",qt="TB",Ut="dir",ot="state",nt="root",Gt="relation",_e="classDef",De="style",Ce="applyClass",ft="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",re="markdown",ie="normal",Ft="rect",Pt="rectWithTitle",Ae="stateStart",xe="stateEnd",Yt="divider",Ht="roundedWithTitle",Le="note",we="noteGroup",pt="statediagram",Ie="state",Ne=`${pt}-${Ie}`,ae="transition",Oe="note",$e="note-edge",Fe=`${ae} ${$e}`,Pe=`${pt}-${Oe}`,Be="cluster",Ge=`${pt}-${Be}`,Ye="cluster-alt",Ve=`${pt}-${Ye}`,ne="parent",ce="note",Me="state",Vt="----",We=`${Vt}${ce}`,zt=`${Vt}${ne}`,At=new Map,Z=0,he=0,ct=new Map,je=e((t,s,c,r)=>{if(t===Yt&&c?.id!==void 0&&ct.has(c.id)){let m=ct.get(c.id);return ct.set(s,m),m}let u=he++,f=r?void 0:u;return ct.set(s,f),f},"colorSlotFor");function xt(t="",s=0,c="",r=Vt){let u=c!==null&&c.length>0?`${r}${c}`:"";return`${Me}-${t}${u}-${s}`}e(xt,"stateDomId");var Ue=e((t,s,c,r,u,f,m,b)=>{a.trace("items",s),s.forEach((o)=>{switch(o.stmt){case ot:ut(t,o,c,r,u,f,m,b);break;case ft:ut(t,o,c,r,u,f,m,b);break;case Gt:{ut(t,o.state1,c,r,u,f,m,b),ut(t,o.state2,c,r,u,f,m,b);let D=m==="neo",x={id:"edge"+Z,start:o.state1.id,end:o.state2.id,arrowhead:"normal",arrowTypeEnd:D?"arrow_barb_neo":"arrow_barb",style:Zt,labelStyle:"",label:v.sanitizeText(o.description??"",l()),arrowheadStyle:te,labelpos:ee,labelType:re,thickness:ie,classes:ae,look:m};u.push(x),Z++}break}})},"setupDoc"),Kt=e((t,s=qt)=>{let c=s;if(t.doc){for(let r of t.doc)if(r.stmt==="dir")c=r.value}return c},"getDir");function dt(t,s,c){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((u)=>{let f=c.get(u);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=t.find((u)=>u.id===s.id);if(r)Object.assign(r,s);else t.push(s)}e(dt,"insertOrUpdateNode");function de(t){return t?.classes?.join(" ")??""}e(de,"getClassesFromDbInfo");function fe(t){return t?.styles??[]}e(fe,"getStylesFromDbInfo");var ut=e((t,s,c,r,u,f,m,b)=>{let o=s.id,D=c.get(o),x=de(D),G=fe(D),Y=l(),j=x.trim()!==""||G.length>0;if(a.info("dataFetcher parsedItem",s,D,G),o!=="root"){let O=Ft;if(s.start===!0)O=Ae;else if(s.start===!1)O=xe;if(s.type!==ft)O=s.type;if(!At.get(o))At.set(o,{id:o,shape:O,description:v.sanitizeText(o,Y),cssClasses:`${x} ${Ne}`,cssStyles:G});let y=At.get(o);if(s.description){if(Array.isArray(y.description))y.shape=Pt,y.description.push(s.description);else if(y.description?.length&&y.description.length>0)if(y.shape=Pt,y.description===o)y.description=[s.description];else y.description=[y.description,s.description];else y.shape=Ft,y.description=s.description;y.description=v.sanitizeTextOrArray(y.description,Y)}if(y.description?.length===1&&y.shape===Pt)if(y.type==="group")y.shape=Ht;else y.shape=Ft;if(!y.type&&s.doc)a.info("Setting cluster for XCX",o,Kt(s)),y.type="group",y.isGroup=!0,y.dir=Kt(s),y.shape=s.type===Qt?Yt:Ht,y.colorIndex=je(y.shape,o,t,j),y.cssClasses=`${y.cssClasses} ${Ge} ${f?Ve:""}`;let V={labelStyle:"",shape:y.shape,label:y.description,cssClasses:y.cssClasses,cssCompiledStyles:[],cssStyles:y.cssStyles,id:o,dir:y.dir,domId:xt(o,Z),type:y.type,isGroup:y.type==="group",colorIndex:y.colorIndex,padding:8,rx:10,ry:10,look:m,labelType:"markdown"};if(V.shape===Yt)V.label="";if(t&&t.id!=="root")a.trace("Setting node ",o," to be child of its parent ",t.id),V.parentId=t.id;if(V.centerLabel=!0,s.note){let F={labelStyle:"",shape:Le,label:s.note.text,labelType:"markdown",cssClasses:Pe,cssStyles:[],cssCompiledStyles:[],id:o+We+"-"+Z,domId:xt(o,Z,ce),type:"node",isGroup:!1,padding:Y.flowchart?.padding,look:m,position:s.note.position},z=o+zt,W={labelStyle:"",shape:we,label:s.note.text,cssClasses:y.cssClasses,cssStyles:[],id:o+zt,domId:xt(o,Z,ne),type:"group",isGroup:!0,padding:16,look:m,position:s.note.position};Z++,W.id=z,F.parentId=z,dt(r,W,b),dt(r,F,b),dt(r,V,b);let K=o,N=F.id;if(s.note.position==="left of")K=F.id,N=o;u.push({id:K+"-"+N,start:K,end:N,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Fe,pattern:"dashed",arrowheadStyle:te,labelpos:ee,labelType:re,thickness:ie,look:m})}else dt(r,V,b)}if(s.doc)a.trace("Adding nodes children "),Ue(s,s.doc,c,r,u,!f,m,b)},"dataFetcher"),He=e(()=>{At.clear(),Z=0,he=0,ct.clear()},"reset"),pe=e((t,s=qt)=>{if(!t.doc)return s;let c=s;for(let r of t.doc)if(r.stmt==="dir")c=r.value;return c},"getDir"),ze=e(function(t,s){return s.db.getClasses()},"getClasses"),Ke=e(async function(t,s,c,r){a.info("REF0:"),a.info("Drawing state diagram (v2)",s);let{securityLevel:u,state:f,layout:m}=l();r.db.extract(r.db.getRootDocV2());let b=r.db.getData(),o=ge(s,u);if(b.type=r.type,b.layoutAlgorithm=ve(m),b.nodeSpacing=f?.nodeSpacing||50,b.rankSpacing=f?.rankSpacing||50,l().look==="neo")b.markers=["barbNeo"];else b.markers=["barb"];b.diagramId=s,await ye(b,o);let x=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((Y,j)=>{let O=typeof j==="string"?j:typeof j?.id==="string"?j.id:"",y=b.nodes.find((N)=>N.id===O);if(!O){a.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(j));return}let V=o.node()?.querySelectorAll("g.node, g.rough-node"),F;if(V?.forEach((N)=>{let st=N.textContent?.trim();if(N.id===y?.domId||st===O)F=N}),!F){a.warn("⚠️ Could not find node matching text:",O);return}let z=F.parentNode;if(!z){a.warn("⚠️ Node has no parent, cannot wrap:",O);return}let W=document.createElementNS("http://www.w3.org/2000/svg","a"),K=Y.url.replace(/^"+|"+$/g,"");if(W.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",K),W.setAttribute("target","_blank"),Y.tooltip){let N=Y.tooltip.replace(/^"+|"+$/g,"");W.setAttribute("title",N),F.setAttribute("title",N)}z.replaceChild(W,F),W.appendChild(F),a.info("\uD83D\uDD17 Wrapped node in <a> tag for:",O,Y.url)})}catch(G){a.error("❌ Error injecting clickable links:",G)}M.insertTitle(o,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),le(o,x,pt,f?.useMaxWidth??!0)},"draw"),Xe={getClasses:ze,draw:Ke,getDir:pe},B={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Xt=e(()=>new Map,"newClassesList"),Jt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Ct=e((t)=>JSON.parse(JSON.stringify(t)),"clone"),Je=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Xt(),this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=E,this.setAccTitle=S,this.getAccDescription=A,this.setAccDescription=T,this.setDiagramTitle=R,this.getDiagramTitle=L,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let r of Array.isArray(t)?t:t.doc)switch(r.stmt){case ot:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Gt:this.addRelation(r.state1,r.state2,r.description);break;case _e:this.addStyleClass(r.id.trim(),r.classes);break;case De:this.handleStyleDef(r);break;case Ce:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),c=l();He(),ut(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,c.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(t){let s=t.id.trim().split(","),c=t.styleClass.split(",");for(let r of s){let u=this.getState(r);if(!u){let f=r.trim();this.addState(f),u=this.getState(f)}if(u)u.styles=c.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(t){if(a.info("Setting root doc",t),this.rootDoc=t,this.version===1)this.extract(t);else this.extract(this.getRootDocV2())}docTranslator(t,s,c){if(s.stmt===Gt){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===ot)if(s.id===B.START_NODE)s.id=t.id+(c?"_start":"_end"),s.start=c;else s.id=s.id.trim();if(s.stmt!==nt&&s.stmt!==ot||!s.doc)return;let r=[],u=[];for(let f of s.doc)if(f.type===Qt){let m=Ct(f);m.doc=Ct(u),r.push(m),u=[]}else u.push(f);if(r.length>0&&u.length>0){let f={stmt:ot,id:Ui(),type:"divider",doc:Ct(u)};r.push(Ct(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:nt,stmt:nt},{id:nt,stmt:nt,doc:this.rootDoc},!0),{id:nt,doc:this.rootDoc}}addState(t,s=ft,c=void 0,r=void 0,u=void 0,f=void 0,m=void 0,b=void 0){let o=t?.trim();if(!this.currentDocument.states.has(o))a.info("Adding state ",o,r),this.currentDocument.states.set(o,{stmt:ot,id:o,descriptions:[],type:s,doc:c,note:u,classes:[],styles:[],textStyles:[]});else{let D=this.currentDocument.states.get(o);if(!D)throw Error(`State not found: ${o}`);if(!D.doc)D.doc=c;if(!D.type)D.type=s}if(r)a.info("Setting state description",o,r),(Array.isArray(r)?r:[r]).forEach((x)=>this.addDescription(o,x.trim()));if(u){let D=this.currentDocument.states.get(o);if(!D)throw Error(`State not found: ${o}`);D.note=u,D.note.text=v.sanitizeText(D.note.text,l())}if(f)a.info("Setting state classes",o,f),(Array.isArray(f)?f:[f]).forEach((x)=>this.setCssClass(o,x.trim()));if(m)a.info("Setting state styles",o,m),(Array.isArray(m)?m:[m]).forEach((x)=>this.setStyle(o,x.trim()));if(b)a.info("Setting state styles",o,m),(Array.isArray(b)?b:[b]).forEach((x)=>this.setTextStyle(o,x.trim()))}clear(t){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Xt(),!t)this.links=new Map,C()}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){a.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,s,c){this.links.set(t,{url:s,tooltip:c}),a.warn("Adding link",t,s,c)}getLinks(){return this.links}startIdIfNeeded(t=""){if(t===B.START_NODE)return this.startEndCount++,`${B.START_TYPE}${this.startEndCount}`;return t}startTypeIfNeeded(t="",s=ft){return t===B.START_NODE?B.START_TYPE:s}endIdIfNeeded(t=""){if(t===B.END_NODE)return this.startEndCount++,`${B.END_TYPE}${this.startEndCount}`;return t}endTypeIfNeeded(t="",s=ft){return t===B.END_NODE?B.END_TYPE:s}addRelationObjs(t,s,c=""){let r=this.startIdIfNeeded(t.id.trim()),u=this.startTypeIfNeeded(t.id.trim(),t.type),f=this.startIdIfNeeded(s.id.trim()),m=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,u,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(f,m,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:v.sanitizeText(c,l())})}addRelation(t,s,c){if(typeof t==="object"&&typeof s==="object")this.addRelationObjs(t,s,c);else if(typeof t==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(t.trim()),u=this.startTypeIfNeeded(t),f=this.endIdIfNeeded(s.trim()),m=this.endTypeIfNeeded(s);this.addState(r,u),this.addState(f,m),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:c?v.sanitizeText(c,l()):void 0})}}addDescription(t,s){let c=this.currentDocument.states.get(t),r=s.startsWith(":")?s.replace(":","").trim():s;c?.descriptions?.push(v.sanitizeText(r,l()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,s=""){if(!this.classes.has(t))this.classes.set(t,{id:t,styles:[],textStyles:[]});let c=this.classes.get(t);if(s&&c)s.split(B.STYLECLASS_SEP).forEach((r)=>{let u=r.replace(/([^;]*);/,"$1").trim();if(RegExp(B.COLOR_KEYWORD).exec(r)){let m=u.replace(B.FILL_KEYWORD,B.BG_FILL).replace(B.COLOR_KEYWORD,B.FILL_KEYWORD);c.textStyles.push(m)}c.styles.push(u)})}getClasses(){return this.classes}setupToolTips(t){let s=$t();p(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(u)=>{let f=p(u.currentTarget),m=f.attr("title");if(m===null)return;let b=u.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.bottom+"px"),s.html(Re.sanitize(m)),f.classed("hover",!0)}).on("mouseout",(u)=>{s.transition().duration(500).style("opacity",0),p(u.currentTarget).classed("hover",!1)})}setCssClass(t,s){t.split(",").forEach((c)=>{let r=this.getState(c);if(!r){let u=c.trim();this.addState(u),r=this.getState(u)}r?.classes?.push(s)})}setStyle(t,s){this.getState(t)?.styles?.push(s)}setTextStyle(t,s){this.getState(t)?.textStyles?.push(s)}bindFunctions(t){this.funs.forEach((s)=>{s(t)})}getDirectionStatement(){return this.rootDoc.find((t)=>t.stmt===Ut)}getDirection(){return this.getDirectionStatement()?.value??Ee}setDirection(t){let s=this.getDirectionStatement();if(s)s.value=t;else this.rootDoc.unshift({stmt:Ut,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=l();for(let s of this.nodes)if(s.wrappingWidth??=t.state?.wrappingWidth,!s.isGroup)s.minWidth??=t.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:pe(this.getRootDocV2())}}getConfig(){return l().state}},qe=e((t)=>{let{theme:s,bkgColorArray:c,borderColorArray:r}=t;if(!oe(s,r))return"";let u=se(t.look),f=ue(c),m="";for(let b=0;b<ht(r);b++){let o=r[b],D=f?`fill: ${c[b%c.length]};`:"",x=`[data-look="${u}"][data-color-id="color-${b}"]`;m+=`
|
|
7
7
|
|
|
8
8
|
/* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
|
|
9
9
|
the body, so what stays visible of \`outer\` is the band behind the label. */
|
|
10
10
|
${x}.statediagram-cluster rect.outer {
|
|
11
|
-
stroke: ${
|
|
11
|
+
stroke: ${o};
|
|
12
12
|
${D}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
${x}.statediagram-cluster rect.inner {
|
|
16
|
-
stroke: ${
|
|
16
|
+
stroke: ${o};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/* Concurrency regions. Siblings of one composite share a slot, so a divided composite
|
|
20
20
|
reads as one thing split into parts rather than as several composites. */
|
|
21
21
|
${x}.statediagram-cluster rect.divider {
|
|
22
|
-
stroke: ${
|
|
22
|
+
stroke: ${o};
|
|
23
23
|
${D}
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -40,7 +40,7 @@ Expecting `+Dt.join(", ")+", got '"+(this.terminals_[B]||B)+"'";else Rt="Parse e
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
${x}.statediagram-cluster .outer path[fill='none'] {
|
|
43
|
-
stroke: ${
|
|
43
|
+
stroke: ${o};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/* No \`.inner\` rule on purpose. The body shape is left entirely alone under handDrawn,
|
|
@@ -60,9 +60,9 @@ Expecting `+Dt.join(", ")+", got '"+(this.terminals_[B]||B)+"'";else Rt="Parse e
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
${x}.statediagram-cluster .divider path[fill='none'] {
|
|
63
|
-
stroke: ${
|
|
63
|
+
stroke: ${o};
|
|
64
64
|
}
|
|
65
|
-
`}return
|
|
65
|
+
`}return m},"genColor"),Qe=e((t)=>`
|
|
66
66
|
${qe(t)}
|
|
67
67
|
defs [id$="-barbEnd"] {
|
|
68
68
|
fill: ${t.transitionColor};
|
|
@@ -288,4 +288,4 @@ g.stateGroup line {
|
|
|
288
288
|
ry: ${t.radius}px;
|
|
289
289
|
filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
|
|
290
290
|
}
|
|
291
|
-
`,"getStyles"),Ze=Qe,ks={parser:
|
|
291
|
+
`,"getStyles"),Ze=Qe,ks={parser:Te,get db(){return new Je(2)},renderer:Xe,styles:Ze,init:e((t)=>{if(!t.state)t.state={};t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{ks as diagram};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{F,o,g,i,r,y,t,n,_,j,ci,xo,Yi,Pr,nr,_o,Zi,wo,ea,ta,$n,ui,di}from"./chunk-qmbgb79a.js";var P={sealed:"已封存",folded:"已折叠",archived:"已移出"},T=["bg-accent","bg-accent-strong","bg-warning","bg-success"];function W(e,d){if(e.startsWith("recent-"))return"json";let c=d.trimStart();if(!c)return"markdown";if(c.startsWith("{")||c.startsWith("["))return"json";if(/^<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>/.test(c))return"xml";return"markdown"}function B(e){if(!e||e.length>32000)return e;if(!e.trimStart().startsWith("<"))return e;let c=[],m=0,a=(p)=>" ".repeat(p),l=/(<([a-zA-Z_][\w.-]*)(?:\s+[^>]*)?>([^\r\n<]*)<\/\2>)|(<\/[a-zA-Z_][\w.-]*>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?\/>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>)|([^<]+)/g,u;while((u=l.exec(e))!==null){let[,p,,,f,s,x,v]=u;if(p)c.push(`${a(m)}${p.trim()}`);else if(f)m=Math.max(0,m-1),c.push(`${a(m)}${f.trim()}`);else if(x)c.push(`${a(m)}${x.trim()}`),m++;else if(s)c.push(`${a(m)}${s.trim()}`);else if(v){let h=v.trim();if(h)for(let w of h.split(/\r?\n/)){let E=w.trim();if(E)c.push(`${a(m)}${E}`)}}}return c.length>0?c.join(`
|
|
2
|
+
`):e}function R(){return n("div",{role:"status","aria-busy":"true","aria-label":"正在加载上下文",className:"space-y-2 animate-pulse",children:[t("div",{className:"h-10 rounded-xl border border-line bg-panel/40"}),t("div",{className:"h-10 rounded-xl border border-line bg-panel/40"}),t("div",{className:"h-10 rounded-xl border border-line bg-panel/40"})]})}function k(e){let{style:d}=_();return t("p",{className:d("surface.empty"),children:e.children})}function A(e){let{cn:d}=_();if(!e.items.length)return t(k,{children:"新会话还没有上下文。发送第一条消息后,这里会显示构成。"});let c=e.items.reduce((m,a)=>m+a.tokens,0)||1;return n("div",{className:"space-y-2.5",children:[t("div",{className:"flex h-2 overflow-hidden rounded-full bg-raised",children:e.items.map((m,a)=>t("span",{className:d(T[a%T.length],"transition-[width] duration-300 ease-out-quint"),title:`${m.label}:${m.tokens.toLocaleString()} token`,style:{width:`${m.tokens/c*100}%`}},m.id))}),t("div",{className:"space-y-1.5",children:e.items.map((m,a)=>t(G,{item:m,total:c,index:a,color:T[a%T.length]??"bg-accent"},m.id))})]})}function G(e){let{cn:d,Chevron:c,CopyButton:m,Code:a,style:l,useTheme:u}=_();u();let[p,f]=r(!1),s=(e.item.tokens/e.total*100).toFixed(1),x=g(()=>p&&e.item.detail?nr(e.item.detail):"",[p,e.item.detail]),v=g(()=>x?W(e.item.id,x):"markdown",[x,e.item.id]),h=g(()=>{if(!x)return"";return v==="xml"?B(x):x},[x,v]);return n("div",{"data-state":p?"open":"closed",className:l("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":p,onClick:()=>f((w)=>!w),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs",children:[t("span",{className:d("size-2 shrink-0 rounded-full",e.color),"aria-hidden":!0}),t("span",{className:"min-w-0 flex-1 truncate font-medium text-ink",children:e.item.label}),e.item.state&&t("span",{className:l("control.badge","text-[10px]"),children:P[e.item.state]}),t("span",{className:"font-mono tabular-nums text-dim",children:e.item.tokens.toLocaleString()}),n("span",{className:"w-10 text-right font-mono text-[11px] tabular-nums text-faint",children:[s,"%"]}),t(c,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),p&&n("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2 text-xs text-dim",children:[t("div",{className:"mb-2 h-1 overflow-hidden rounded-full bg-raised",children:t("div",{className:d("h-full",e.color),style:{width:`${s}%`}})}),h?n("div",{className:l("surface.subtle","group/detail relative overflow-hidden rounded-lg bg-panel/70 p-2.5"),children:[t("div",{className:"absolute right-1.5 top-1.5 z-10",children:t(m,{text:e.item.detail,size:"icon-xs",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink backdrop-blur-sm"})}),t("div",{className:"max-h-80 overflow-y-auto pr-6 text-dim",children:t(a,{code:h,lang:v,className:"text-[11px]! leading-relaxed! [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere]"})})]}):t("p",{className:"py-2 text-center text-xs text-faint",children:"(空)"})]})]})}var I=40,Q={accent:"bg-accent/15 text-accent",success:"bg-success/15 text-success",warning:"bg-warning/15 text-warning",danger:"bg-danger/15 text-danger",neutral:"bg-raised text-dim"};function O(e){let{Button:d,CopyButton:c,style:m,useTheme:a}=_();a();let[l,u]=r(I),p=i(null),f=l<e.entries.length;o(()=>{let x=p.current;if(!x||!f||typeof IntersectionObserver>"u")return;let v=new IntersectionObserver((h)=>{if(h.some((w)=>w.isIntersecting))u((w)=>Math.min(e.entries.length,w+I))},{rootMargin:"480px"});return v.observe(x),()=>v.disconnect()},[f,e.entries.length]);let s=g(()=>e.entries.slice(-l).reverse(),[e.entries,l]);if(!e.entries.length)return t(k,{children:"还没有消息。"});return n("div",{className:"space-y-1.5",children:[n("div",{className:m("surface.subtle","flex items-center justify-between px-3 py-1.5 text-xs text-faint"),children:[n("span",{children:["共 ",e.entries.length," 条记录"]}),t(c,{text:()=>e.entries.map((x)=>JSON.stringify(x,null,2)).join(`
|
|
3
|
+
|
|
4
|
+
`),size:"icon-xs",label:"复制全部原始 JSON",className:"hover:bg-raised text-faint hover:text-ink"})]}),s.map((x)=>t(Y,{entry:x},x.seq)),f&&n("div",{ref:p,className:m("surface.subtle","flex items-center justify-between bg-panel/40 px-3 py-2 text-xs text-faint"),children:[n("span",{children:["已显示 ",s.length," / ",e.entries.length," 条"]}),n("div",{className:"flex items-center gap-1.5",children:[t(d,{size:"sm",variant:"ghost",onClick:()=>u((x)=>Math.min(e.entries.length,x+I)),children:"加载更多"}),t(d,{size:"sm",variant:"ghost",onClick:()=>u(e.entries.length),children:"显示全部"})]})]})]})}var Y=F(function(d){let{Chevron:c,CopyButton:m,style:a,useTheme:l}=_();l();let[u,p]=r(!1),f=_o(d.entry),s=g(()=>xo(d.entry.time),[d.entry.time]);return n("div",{"data-state":u?"open":"closed",className:a("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":u,onClick:()=>p((x)=>!x),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs",children:[n("span",{className:"shrink-0 font-mono text-[10.5px] tabular-nums text-faint",children:["#",d.entry.seq]}),t("span",{className:a("control.badge","shrink-0 font-medium text-[10px]",Q[f.tone]),children:f.badge}),t("span",{className:"min-w-0 flex-1 truncate text-ink",children:f.title}),f.meta&&t("span",{className:a("control.badge","shrink-0 font-mono text-[10px] text-faint"),children:f.meta}),t("span",{className:"shrink-0 font-mono text-[10.5px] tabular-nums text-faint",children:s}),t(c,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),u&&t("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2.5 text-xs text-dim",children:n("div",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between text-[11px] text-faint",children:[n("span",{className:"font-mono",children:[d.entry.type," · #",d.entry.seq]}),t(m,{text:()=>JSON.stringify(d.entry,null,2),size:"icon-xs",label:"复制此条 JSON",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink"})]}),t(ee,{entry:d.entry})]})})]})});function ee(e){let{Code:d,style:c,useTheme:m}=_();m();let a=e.entry;if(a.type==="user")return n("div",{className:"space-y-2",children:[a.text&&t("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-sans text-xs leading-relaxed text-ink whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),children:Pr(a.text)}),a.attachments&&a.attachments.length>0&&n("div",{className:"space-y-1",children:[n("div",{className:"text-[10.5px] font-medium text-faint",children:["附件(",a.attachments.length,")"]}),t("div",{className:"flex flex-wrap gap-1.5",children:a.attachments.map((l,u)=>{let p=l.kind==="image"?Math.floor(l.data.length*0.75):l.data.length;return n("div",{className:c("surface.subtle","inline-flex items-center gap-1.5 px-2 py-1 text-[11px]"),children:[t("span",{className:c("control.badge","text-[10px] text-faint"),children:l.kind==="image"?"图片":l.kind==="path"?"路径":"文本"}),t("span",{className:"max-w-40 truncate font-medium text-ink",children:l.name}),n("span",{className:"font-mono text-[10px] text-faint",children:[l.mimeType," · ",Yi(p)]})]},`${l.name}-${u}`)})})]}),a.notices&&a.notices.length>0&&n("div",{className:"space-y-1",children:[n("div",{className:"text-[10.5px] font-medium text-faint",children:["通知来源(",a.notices.length,")"]}),a.notices.map((l)=>n("div",{className:c("surface.subtle","flex items-center justify-between px-2.5 py-1.5 font-mono text-[11px]"),children:[n("span",{className:"truncate text-ink",children:[l.sourceKind,"/",l.sourceID]}),t("span",{className:"text-faint",children:l.state})]},l.dedupeKey))]})]});if(a.type==="assistant")return n("div",{className:"space-y-2",children:[n("div",{className:"font-mono text-[11px] text-faint",children:["模型:",a.model]}),a.error&&t("div",{className:"rounded-lg border border-danger/30 bg-danger/8 px-2.5 py-2 text-xs text-danger",children:a.error}),a.parts.map((l,u)=>{if(l.type==="thinking")return n("div",{className:c("surface.subtle","p-2.5 space-y-1"),children:[t("div",{className:"text-[10.5px] font-medium text-faint",children:"思考"}),t("pre",{className:"max-h-60 overflow-y-auto font-sans text-xs italic leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:Pr(l.text)})]},`thinking-${u}`);if(l.type==="text")return n("div",{className:c("surface.subtle","p-2.5 space-y-1"),children:[t("div",{className:"text-[10.5px] font-medium text-faint",children:"回复"}),t("pre",{className:"max-h-60 overflow-y-auto font-sans text-xs leading-relaxed text-ink whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:Pr(l.text)})]},`text-${u}`);return n("div",{className:c("surface.subtle","p-2.5 space-y-1.5"),children:[n("div",{className:"flex items-center justify-between gap-2 text-[11px]",children:[n("span",{className:"font-mono font-medium text-ink",children:["工具调用 · ",l.name]}),t("span",{className:"truncate font-mono text-[10px] text-faint",children:l.id})]}),t("div",{className:"max-h-60 overflow-y-auto text-dim",children:t(d,{code:nr(JSON.stringify(l.input,Zi,2)),lang:"json",className:"text-[11px]! leading-relaxed! [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere]"})})]},l.id||`tool-${u}`)})]});if(a.type==="tool_result")return n("div",{className:"space-y-2",children:[n("div",{className:"flex flex-wrap items-center gap-2 font-mono text-[11px] text-faint",children:[t("span",{className:"text-ink",children:a.name}),t("span",{children:"·"}),t("span",{className:"truncate",children:a.callID}),t("span",{className:c("control.badge","ml-auto font-sans text-[10px]",a.isError?"bg-danger/15 text-danger":"text-dim"),children:a.isError?"执行失败":"执行完成"})]}),a.images&&a.images.length>0&&t("div",{className:"flex flex-wrap gap-1.5",children:a.images.map((l,u)=>n("span",{className:c("surface.subtle","px-2 py-1 font-mono text-[10.5px] text-faint"),children:["图片 #",u+1," · ",l.mimeType," · ",Yi(Math.floor(l.data.length*0.75))]},`${l.mimeType}-${u}`))}),ci(a.output)?t("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-words [overflow-wrap:anywhere]",a.isError?"text-danger":"text-dim"),children:Pr(a.output)}):t("p",{className:"py-1 text-faint",children:"(无文本输出)"})]});return t("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-mono text-[11px] leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),children:wo(a)})}function D(e){let{cn:d,style:c,useTheme:m}=_();if(m(),!e.todos.length)return t(k,{children:"暂无待办。"});return t("ul",{className:"space-y-1.5",children:e.todos.map((a)=>n("li",{className:c("surface.interactive","flex items-start gap-2.5 px-3 py-2 text-xs"),children:[n("span",{className:d("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border transition-colors duration-300",a.status==="completed"&&"border-success bg-success text-panel",a.status==="in_progress"&&"border-accent",a.status==="pending"&&"border-line-strong"),children:[a.status==="completed"&&t(j,{className:"size-2.5 animate-pop",strokeWidth:3.5}),a.status==="in_progress"&&t("span",{className:"size-1.5 animate-pulse rounded-full bg-accent"})]}),t("span",{className:d("min-w-0 flex-1 break-words leading-relaxed [overflow-wrap:anywhere]",a.status==="completed"&&"text-faint line-through decoration-faint/60",a.status==="in_progress"&&"font-medium text-ink",a.status==="pending"&&"text-dim"),children:a.content})]},`${a.status}-${a.content}`))})}function L(e){let{cn:d,style:c,useTheme:m}=_();m();let[a,l]=r("all"),u=g(()=>e.tools.filter((s)=>s.deferred).length,[e.tools]),p=e.tools.length-u,f=g(()=>{if(a==="deferred")return e.tools.filter((s)=>s.deferred);if(a==="active")return e.tools.filter((s)=>!s.deferred);return e.tools},[e.tools,a]);if(!e.tools.length)return t(k,{children:"当前会话没有可用工具。"});return n("div",{className:"space-y-2",children:[u>0&&n("div",{className:"flex items-center gap-1 text-[11px]",children:[n("button",{type:"button",onClick:()=>l("all"),className:d("rounded-lg px-2 py-1 transition-colors",a==="all"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["全部 (",e.tools.length,")"]}),n("button",{type:"button",onClick:()=>l("active"),className:d("rounded-lg px-2 py-1 transition-colors",a==="active"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["常驻 (",p,")"]}),n("button",{type:"button",onClick:()=>l("deferred"),className:d("rounded-lg px-2 py-1 transition-colors",a==="deferred"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["延迟加载 (",u,")"]})]}),t("div",{className:"space-y-1.5",children:f.map((s)=>t(te,{tool:s},`${s.group}-${s.name}`))})]})}function te(e){let{Chevron:d,CopyButton:c,Code:m,style:a,useTheme:l}=_();l();let[u,p]=r(!1),f=g(()=>u?JSON.stringify(e.tool.schema,null,2):"",[u,e.tool.schema]);return n("div",{"data-state":u?"open":"closed",className:a("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":u,onClick:()=>p((s)=>!s),className:"flex w-full items-center justify-between px-3 py-2 text-left text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 truncate font-mono text-ink",children:[t("span",{className:"truncate",children:e.tool.name}),e.tool.group&&t("span",{className:a("control.badge","font-sans text-[10px]"),children:e.tool.group}),e.tool.deferred&&t("span",{className:a("control.badge","font-sans text-[10px]"),children:"延迟加载"})]}),t(d,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),u&&n("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2 text-xs text-dim",children:[e.tool.deferred&&t("div",{className:a("surface.subtle","mb-2 px-2.5 py-1.5 text-[11px] text-faint"),children:"延迟加载:此工具默认以精简描述挂载,模型通过 toolsearch 取回定义后才向上下文注入完整参数 Schema。"}),e.tool.description&&t("pre",{className:"mb-2 max-h-60 overflow-y-auto font-sans text-xs leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:nr(e.tool.description)}),n("div",{className:a("surface.subtle","group/schema relative overflow-hidden rounded-lg p-2.5"),children:[t("div",{className:"absolute right-1.5 top-1.5 z-10",children:t(c,{text:f,size:"icon-xs",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink backdrop-blur-sm"})}),t("div",{className:"max-h-72 overflow-y-auto pr-6 text-dim",children:t(m,{code:nr(f),lang:"json",className:"text-[11px]! leading-relaxed! [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere]"})})]})]})]})}function ae(){try{let e=localStorage.getItem("basalt.contextSidebar.tab");if(e==="tools"||e==="todos"||e==="raw")return e}catch{}return"breakdown"}function se(e){let{style:d,useTheme:c}=_();return c(),n("div",{className:d("surface.panel","bg-panel/70 px-3 py-2"),children:[t("div",{className:"text-[10px] font-medium uppercase tracking-wider text-faint",children:e.label}),t("div",{className:"mt-0.5 truncate font-mono text-xs font-semibold tabular-nums text-ink",children:e.value})]})}function Oe(e){let{Button:d,StatusChip:c,Segmented:m,cn:a,style:l,useTheme:u}=_();u();let[p,f]=r(ae),[s,x]=r(()=>$n.get(e.session.id)),[v,h]=r(!1),[w,E]=r(0),[H,U]=r(!1);o(()=>{let b=setTimeout(()=>U(!0),140);return()=>clearTimeout(b)},[]),o(()=>{let b=$n.get(e.session.id);if(b)x(b);return ui((C,X)=>{if(C===e.session.id)x(X)})},[e.session.id]),o(()=>{let b=new AbortController;return h(!1),e.connection.request(`/api/sessions/${encodeURIComponent(e.session.id)}/context`,{signal:AbortSignal.any([b.signal,AbortSignal.timeout(15000)])}).then((C)=>{if(!b.signal.aborted)di(e.session.id,C),x(C)},()=>{if(!b.signal.aborted)h(!0)}),()=>b.abort()},[e.connection,e.session.id,e.session.updated,e.entries.length,w]);let N=ea(s?.items??[],s?.usableWindow,s?.calibratedTokens,s?.lastInputTokens,s?.hasPendingOutput),S=ta(N.percent),z=s?.lastCacheHitRate,M=s?.usage?.cacheHitRate,J=z===void 0?"—":`${(z*100).toFixed(1)}%`,q=M===void 0?"—":`${(M*100).toFixed(1)}%`,Z=(b)=>{f(b);try{localStorage.setItem("basalt.contextSidebar.tab",b)}catch{}},K=[{value:"breakdown",label:"构成"},{value:"tools",label:n("span",{className:"inline-flex items-center gap-1",children:["工具",s&&t("span",{className:"text-[10px] text-faint tabular-nums",children:s.tools.length})]})},{value:"todos",label:n("span",{className:"inline-flex items-center gap-1",children:["待办",e.session.todos.length>0&&t("span",{className:"text-[10px] text-faint tabular-nums",children:e.session.todos.length})]})},{value:"raw",label:"原始消息"}],V=n("div",{className:"px-3.5 pt-1 pb-3",children:[n("div",{className:"flex items-start justify-between gap-3",children:[n("div",{children:[t("div",{className:"text-[10.5px] font-medium uppercase tracking-wider text-faint",children:"上下文用量"}),n("div",{className:"mt-0.5 flex items-baseline gap-1.5",children:[t("span",{className:"font-mono text-xl font-semibold tabular-nums text-ink",children:s?N.totalTokens.toLocaleString():"—"}),n("span",{className:"font-mono text-xs text-dim",children:["/ ",s?.usableWindow.toLocaleString()??"—"]})]})]}),t(c,{tone:S==="overflow"||S==="near_limit"?"danger":S==="sealing"?"warning":"success",children:S==="overflow"?"预计超限":S==="near_limit"?"接近上限":S==="sealing"?"接近封存":"正常"})]}),N.percent!==null&&t("meter",{className:"sr-only","aria-label":"可用上下文窗口占比",min:0,max:100,value:Math.min(100,N.percent)}),t("div",{"aria-hidden":!0,className:a("relative mt-2.5 h-2 w-full overflow-hidden rounded-full bg-raised",!s&&"animate-pulse"),children:t("div",{className:"h-full rounded-full bg-accent transition-[width] duration-500 ease-out-quint",style:{width:`${Math.min(100,N.percent??0)}%`}})}),n("div",{className:"mt-2 flex items-center justify-between text-[11px]",children:[t("span",{className:"text-dim",children:N.percent===null?"暂无窗口数据":`${N.percent.toFixed(1)}% 可用窗口`}),n("span",{className:"text-faint",children:["总窗口 ",s?.contextWindow.toLocaleString()??"—"," · 80% 封存 · 97% 折叠"]})]}),s?.usage&&(s.usage.input>0||s.usage.output>0||s.usage.cacheRead>0||s.usage.cacheWrite>0||s.usage.cost>0)&&t("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[["Input",s.usage.input.toLocaleString()],["Output",s.usage.output.toLocaleString()],["缓存命中 当前 / 平均",`${J} / ${q}`],["平均 TPS",s.usage.tps!==void 0?`${s.usage.tps.toFixed(1)} tok/s`:"—"]].map(([b,C])=>t(se,{label:b,value:C},b))})]});return n(y,{children:[V,t("div",{className:"px-3 py-2",children:t(m,{value:p,onChange:Z,options:K,className:"w-full grid grid-cols-4"})}),n("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[v&&!s&&n("div",{role:"alert",className:"flex items-center justify-between rounded-xl border border-danger/30 bg-danger/8 px-3 py-2 text-xs text-danger",children:[t("span",{children:"上下文加载失败。"}),t(d,{size:"sm",variant:"ghost",onClick:()=>E((b)=>b+1),children:"重试"})]}),t("div",{children:!H?t(R,{}):n(y,{children:[p==="raw"&&t(O,{entries:e.entries}),p==="todos"&&t(D,{todos:e.session.todos}),p==="breakdown"&&(s?t(A,{items:N.items}):!v?t(R,{}):null),p==="tools"&&(s?t(L,{tools:s.tools??[]}):!v?t(R,{}):null)]})},p)]})]})}export{Oe as ContextSidebar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{pn}from"./chunk-sd3cdqcm.js";export{pn as default};
|