@bkm016/basalt 0.1.1 → 0.1.3
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 +16 -22
- package/chunk-06hdzq5n.js +2 -0
- package/chunk-09rj27b2.js +2 -0
- package/{chunk-qnr1f5pj.js → chunk-0y7ne3d0.js} +2 -2
- package/{chunk-vgvq3q12.js → chunk-10xzzn07.js} +2 -2
- package/{chunk-6qertm2t.js → chunk-1qpces5a.js} +1 -1
- package/{chunk-nt2gntad.js → chunk-1zdwrgd4.js} +1 -1
- package/{chunk-sh74qzvt.js → chunk-27gntzs5.js} +4 -4
- package/{chunk-1v7st27a.js → chunk-2esbgxps.js} +14 -14
- package/{chunk-exnn1867.js → chunk-362g64pd.js} +1 -1
- package/{chunk-1aspj1hn.js → chunk-3cjsd292.js} +2 -2
- package/chunk-5c9j8qe4.js +478 -0
- package/{chunk-8dxzqwq3.js → chunk-5j1krv9v.js} +1 -1
- package/{chunk-vkkj4awb.js → chunk-6hssbcgj.js} +1 -1
- package/{chunk-1b7gbe8g.js → chunk-75m78j7x.js} +2 -2
- package/{chunk-kfq8wyd3.js → chunk-8296hw9m.js} +1 -1
- package/{chunk-szat3vp4.js → chunk-8d46jtbj.js} +2 -2
- package/{chunk-qczbfccb.js → chunk-8tjad3r0.js} +4 -4
- package/{chunk-agntrqs9.js → chunk-97rzj7f6.js} +1 -1
- package/{chunk-k7w7ac9q.js → chunk-981f9dw8.js} +8 -8
- package/{chunk-xysny0ve.js → chunk-aefadsy6.js} +2 -2
- package/{chunk-jhd54p1b.js → chunk-bannb9xm.js} +1 -1
- package/{chunk-0qqb6v41.js → chunk-bxn5kmpz.js} +120 -120
- package/{chunk-a3tqx584.js → chunk-c7x1zq39.js} +1 -1
- package/{chunk-rv06x0kn.js → chunk-cjc90f84.js} +1 -1
- package/{chunk-x3dnb9sz.js → chunk-d2j735sd.js} +2 -2
- package/{chunk-yskm0hsy.js → chunk-d8gtbw9g.js} +1 -1
- package/{chunk-rm3kcxq9.js → chunk-fjtvjrkg.js} +13 -13
- package/{chunk-h6sw8fbt.js → chunk-fm0k0qtz.js} +1 -1
- package/{chunk-1yzt0qm0.js → chunk-fw2bpqmw.js} +1 -1
- package/{chunk-45cz26ap.js → chunk-gp7y0fja.js} +13 -13
- package/{chunk-2bb01ddq.js → chunk-gzxnene8.js} +1 -1
- package/{chunk-a8nyk4k9.js → chunk-hwr56pfj.js} +1 -1
- package/{chunk-0hbjv3y6.js → chunk-jwdb0ccj.js} +3 -3
- package/{chunk-kf8hq21a.js → chunk-k23t7vhs.js} +5 -5
- package/{chunk-bhqyxyap.js → chunk-k506w58v.js} +1 -1
- package/{chunk-44ek81ad.js → chunk-k6w6y71k.js} +2 -2
- package/chunk-m40gxwq4.js +5 -0
- package/chunk-m8vkwdgr.js +5 -0
- package/{chunk-f7egr55n.js → chunk-mvfsxdx6.js} +13 -13
- package/{chunk-pvncysbb.js → chunk-nbb9trwz.js} +1 -1
- package/{chunk-0szjy61m.js → chunk-pbcy6zdt.js} +1 -1
- package/chunk-pmqtkqsf.js +2 -0
- package/{chunk-hat3s3pr.js → chunk-pxsrqrd0.js} +1 -1
- package/{chunk-xsbxykr4.js → chunk-qe0teyn1.js} +1 -1
- package/{chunk-2zqny2sy.js → chunk-r7fpkb49.js} +1 -1
- package/{chunk-3m7qwfm3.js → chunk-rtzqqngy.js} +3 -3
- package/{chunk-6e49xsf5.js → chunk-shadcb9z.js} +2 -2
- package/{chunk-cv5wsd9m.js → chunk-t6zs4kw0.js} +2 -2
- package/{chunk-hcn9cf6v.js → chunk-v258nxcz.js} +1 -1
- package/{chunk-a6r4z44b.js → chunk-vk1gxk1t.js} +1 -1
- package/{chunk-s37s3k24.js → chunk-x1xss1d7.js} +2 -2
- package/{chunk-dakrpbe6.js → chunk-x4874m8e.js} +2 -2
- package/{chunk-wx7kdf0b.js → chunk-xfvvh1s5.js} +1 -1
- package/{chunk-0yytz0r1.js → chunk-y0m980k3.js} +5 -5
- package/{chunk-dhm42y04.js → chunk-y58ygzn9.js} +3 -3
- package/{chunk-2wkaw73s.js → chunk-y648fzx0.js} +5 -5
- package/{chunk-32at88hc.js → chunk-y7nma9rk.js} +1 -1
- package/{chunk-pmc3y1z8.js → chunk-ykens1hy.js} +1 -1
- package/{chunk-q8zx3kt6.js → chunk-z55bmysw.js} +1 -1
- package/{chunk-qx0m82rw.js → chunk-zmsgwr3s.js} +1 -1
- package/{chunk-501zkf9b.js → chunk-ztsjgssj.js} +1 -1
- package/compiled.js +5 -5
- package/package.json +1 -1
- package/ui-test-worker.js +63 -63
- package/web/{chunk-b4wbk7vc.js → chunk-0xc2c540.js} +3 -3
- package/web/{chunk-dt462hk9.js → chunk-0z0jycs8.js} +1 -1
- package/web/chunk-166qe5j6.js +2 -0
- package/web/chunk-1c95wfvq.js +1 -0
- package/web/{chunk-qnaqf0cr.js → chunk-23c1df7e.js} +1 -1
- package/web/{chunk-jrcyc9s9.js → chunk-24h1rfje.js} +1 -1
- package/web/{chunk-fscafg24.js → chunk-2hd1pe9w.js} +5 -5
- package/web/chunk-329rtxa9.js +1 -0
- package/web/{chunk-9yakxvjb.js → chunk-33qwz9bc.js} +2 -2
- package/web/{chunk-qd8bxxdj.js → chunk-3qjnwsph.js} +1 -1
- package/web/{chunk-p3b9crsa.js → chunk-47q4hmfp.js} +2 -2
- package/web/{chunk-y49fhfda.js → chunk-4fzj0azw.js} +1 -1
- package/web/{chunk-22a4ety5.js → chunk-5b2nw6j1.js} +1 -1
- package/web/{chunk-bgnnrpna.js → chunk-5hmfk69r.js} +4 -4
- package/web/{chunk-tqmwd9qp.js → chunk-5qqw2e0t.js} +1 -1
- package/web/{chunk-3jhyzmnf.js → chunk-61jahh35.js} +3 -3
- package/web/chunk-6gxf3vsg.js +1 -0
- package/web/{chunk-qefasa1j.js → chunk-6parf7sy.js} +1 -1
- package/web/{chunk-2m12wyrb.js → chunk-7520nrbb.js} +1 -1
- package/web/{chunk-9p12mgs6.js → chunk-7ba8vrfc.js} +1 -1
- package/web/{chunk-fm2ybfj5.js → chunk-7qxhk1kz.js} +4 -4
- package/web/{chunk-w880psmw.js → chunk-7v5rxabp.js} +1 -1
- package/web/{chunk-kdyjnwdx.js → chunk-7xk0ntav.js} +2 -2
- package/web/{chunk-q0p5xqe1.js → chunk-7yc083xj.js} +4 -4
- package/web/{chunk-b1pe46zz.js → chunk-89fkdgbp.js} +1 -1
- package/web/{chunk-v28fx2nd.js → chunk-8qgpfxkz.js} +1 -1
- package/web/{chunk-2ps6mepk.js → chunk-90xqeczk.js} +3 -3
- package/web/{chunk-fz06t6km.js → chunk-97b62pvb.js} +1 -1
- package/web/{chunk-a1z5qx1r.js → chunk-9a3q0jsh.js} +3 -3
- package/web/{chunk-xjxv8dg8.js → chunk-9bgey148.js} +4 -4
- package/web/{chunk-70qwwwak.js → chunk-9xh96b33.js} +1 -1
- package/web/{chunk-e6jxqbv7.js → chunk-a5sg33w2.js} +1 -1
- package/web/chunk-a91vxtx4.js +1 -0
- package/web/{chunk-pf2ab8p8.js → chunk-acybsx44.js} +1 -1
- package/web/chunk-agec7jj4.js +1 -0
- package/web/{chunk-e53wfgb8.js → chunk-axkyft9f.js} +1 -1
- package/web/{chunk-bc78qf1m.js → chunk-b0a8nbj0.js} +5 -5
- package/web/chunk-c516cghj.js +1 -0
- package/web/chunk-cqp1d4p0.js +1 -0
- package/web/{chunk-05w4fyzc.js → chunk-cwtdnacf.js} +1 -1
- package/web/chunk-dg1vas6z.js +8 -0
- package/web/{chunk-0mrkjnte.js → chunk-ds7srg4p.js} +1 -1
- package/web/{chunk-bjkc94mv.js → chunk-ep37qp12.js} +1 -1
- package/web/{chunk-90kp4pnz.js → chunk-eqsd8zta.js} +1 -1
- package/web/{chunk-ss1bcb0n.js → chunk-es28k2t7.js} +2 -2
- package/web/chunk-fc0nx23g.js +1 -0
- package/web/chunk-fhnypcrm.js +1139 -0
- package/web/{chunk-2scce33n.js → chunk-fv60p68p.js} +1 -1
- package/web/{chunk-rpmpttbk.js → chunk-g46f421r.js} +1 -1
- package/web/{chunk-2msj52w6.js → chunk-h18tnrf2.js} +1 -1
- package/web/{chunk-a5x2zveg.js → chunk-h288yd5w.js} +1 -1
- package/web/{chunk-8p4tc9f4.js → chunk-hszjc2ny.js} +3 -3
- package/web/{chunk-4ks96e4r.js → chunk-j0bwwc1g.js} +1 -1
- package/web/{chunk-9dxjafp2.js → chunk-jqa39f8t.js} +2 -2
- package/web/chunk-jvbbrnpa.js +1 -0
- package/web/{chunk-wptv8atc.js → chunk-jzfd7cyh.js} +1 -1
- package/web/chunk-ka9ak8wr.js +1 -0
- package/web/{chunk-9an7cjd9.js → chunk-mb4qx9hy.js} +2 -2
- package/web/chunk-mnjd59jk.js +1 -0
- package/web/{chunk-xbty0rv7.js → chunk-mwj9tpkz.js} +1 -1
- package/web/{chunk-taynqrgq.js → chunk-n8gfjj9a.js} +2 -2
- package/web/{chunk-20q90epj.js → chunk-n8sky2q6.js} +1 -1
- package/web/chunk-ng0nbfhh.js +1 -0
- package/web/chunk-nz9nxk48.js +1 -0
- package/web/{chunk-0vt9fg48.js → chunk-p9hsd3rn.js} +2 -2
- package/web/chunk-phw908hn.js +1 -0
- package/web/chunk-pjmmma1k.js +1 -0
- package/web/chunk-q7yn4m3t.js +1 -0
- package/web/chunk-qh15dxav.css +1 -0
- package/web/chunk-qnhqexe0.js +1 -0
- package/web/{chunk-bj90t5gh.js → chunk-rcx1aee5.js} +4 -4
- package/web/chunk-rjqj6ffe.js +1 -0
- package/web/{chunk-g4azyef7.js → chunk-rks7ksv3.js} +1 -1
- package/web/{chunk-q5ke7a33.js → chunk-sb1cjpq8.js} +1 -1
- package/web/{chunk-e32y85kx.js → chunk-sgvp8vge.js} +1 -1
- package/web/chunk-sjjwte12.js +1 -0
- package/web/{chunk-xrxne80b.js → chunk-sn9ecfvy.js} +1 -1
- package/web/{chunk-z7dcbxws.js → chunk-t7bwsdbr.js} +1 -1
- package/web/{chunk-fk0dh93x.js → chunk-tse9gvyq.js} +5 -5
- package/web/{chunk-a3verqw9.js → chunk-tx8240k4.js} +5 -5
- package/web/{chunk-dzwxgqgm.js → chunk-vd6y2pcm.js} +2 -2
- package/web/{chunk-5vw9rs4r.js → chunk-vpa55vje.js} +3 -3
- package/web/{chunk-y0m8hrwz.js → chunk-vymqrpm3.js} +77 -77
- package/web/{chunk-tmvakq7n.js → chunk-w7snhcyg.js} +4 -4
- package/web/{chunk-qh7265qw.js → chunk-wdtnhpd6.js} +2 -2
- package/web/{chunk-3ee04tmm.js → chunk-wmvd6j0b.js} +5 -5
- package/web/{chunk-yd46jhqv.js → chunk-xnq41dgs.js} +1 -1
- package/web/{chunk-45fzdcgz.js → chunk-xvsmtetz.js} +5 -5
- package/web/{chunk-ca682sm6.js → chunk-y3ajqthy.js} +14 -14
- package/web/{chunk-f26smjjf.js → chunk-yd1ez3wd.js} +1 -1
- package/web/chunk-yfbxtg5p.js +1 -0
- package/web/{chunk-4v8en1yw.js → chunk-ywp4s71k.js} +1 -1
- package/web/{chunk-gqw3f02j.js → chunk-z4x331rx.js} +5 -5
- package/web/{chunk-jwzd9tzk.js → chunk-z6bpamwq.js} +2 -2
- package/web/{chunk-hev4hq89.js → chunk-zmdnxn6m.js} +2 -2
- package/web/{icon-yx2p2pye.svg → icon-1wgy7kzy.svg} +13 -13
- package/web/icon.svg +13 -13
- package/web/index.html +2 -2
- package/web/install.sh +0 -0
- package/web/sw.js +9 -0
- package/worker.js +1 -1
- package/chunk-09vr609h.js +0 -2
- package/chunk-58vz2qsq.js +0 -2
- package/chunk-c25s4w6a.js +0 -5
- package/chunk-t057xfrt.js +0 -5
- package/chunk-wjd9fr23.js +0 -2
- package/chunk-zef13k3h.js +0 -471
- package/web/chunk-2pver6r4.js +0 -1
- package/web/chunk-37ajk6zg.js +0 -2
- package/web/chunk-4wkm9fda.js +0 -1
- package/web/chunk-amzgyy1k.js +0 -1
- package/web/chunk-cff5hcm8.js +0 -8
- package/web/chunk-esp1mmgr.js +0 -1
- package/web/chunk-ew3cgdtd.js +0 -1
- package/web/chunk-gjq1pxw3.js +0 -1
- package/web/chunk-h5ejbf6e.js +0 -1
- package/web/chunk-jjh5jvva.js +0 -1
- package/web/chunk-k5btcvbg.js +0 -1
- package/web/chunk-kpvgecwy.js +0 -1
- package/web/chunk-kq40ss39.js +0 -1
- package/web/chunk-q7dsnvpf.js +0 -1
- package/web/chunk-rg426vkf.js +0 -1
- package/web/chunk-ry9256r7.js +0 -1
- package/web/chunk-scpwc9ev.js +0 -1
- package/web/chunk-ssy07dd2.js +0 -1
- package/web/chunk-tgpbhzn9.js +0 -1
- package/web/chunk-vt40e1kp.js +0 -1136
- package/web/chunk-w53rba6g.js +0 -1
- package/web/chunk-w86n42dy.js +0 -1
- package/web/chunk-wtawdeej.css +0 -1
- package/web/chunk-zde7mj43.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l}from"./chunk-
|
|
1
|
+
import{l}from"./chunk-fhnypcrm.js";var c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],gn=l("circle-check",c);
|
|
2
2
|
export{gn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{yi}from"./chunk-n8gfjj9a.js";export{yi as createWardleyServices};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,y,mt,C,S,E,T,A,I,L,s,Tn,p,J,jn,po,Ia,Ra,Vn}from"./chunk-
|
|
1
|
+
import{e,y,mt,C,S,E,T,A,I,L,s,Tn,p,J,jn,po,Ia,Ra,Vn}from"./chunk-vymqrpm3.js";import{On,mn}from"./chunk-ttg6tbwx.js";import{Xe}from"./chunk-n8sky2q6.js";function rt(n,c){let m=0;if(c===void 0){for(let x of n)if(x=+x)m+=x}else{let x=-1;for(let _ of n)if(_=+c(_,++x,n))m+=_}return m}function dt(n){var c=n.length/6|0,m=Array(c),x=0;while(x<c)m[x]="#"+n.slice(x*6,++x*6);return m}var pt=dt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Pt(n){return n.source}function At(n){return n.target}function Tt(n){let c=Pt,m=At,x=Ia,_=Ra,P=null,g=null,N=jn(a);function a(){let i,f=po.call(arguments),v=c.apply(this,f),k=m.apply(this,f);if(P==null)g=n(i=N());if(g.lineStart(),f[0]=v,g.point(+x.apply(this,f),+_.apply(this,f)),f[0]=k,g.point(+x.apply(this,f),+_.apply(this,f)),g.lineEnd(),i)return g=null,i+""||null}return a.source=function(i){return arguments.length?(c=i,a):c},a.target=function(i){return arguments.length?(m=i,a):m},a.x=function(i){return arguments.length?(x=typeof i==="function"?i:J(+i),a):x},a.y=function(i){return arguments.length?(_=typeof i==="function"?i:J(+i),a):_},a.context=function(i){return arguments.length?(i==null?P=g=null:g=n(P=i),a):P},a}function vt(){return Tt(Vn)}function Ct(n){return n.target.depth}function yt(n){return n.depth}function gt(n,c){return c-1-n.height}function st(n,c){return n.sourceLinks.length?n.depth:c-1}function xt(n){return n.targetLinks.length?n.depth:n.sourceLinks.length?mn(n.sourceLinks,Ct)-1:0}function et(n){return function(){return n}}function _t(n,c){return ot(n.source,c.source)||n.index-c.index}function St(n,c){return ot(n.target,c.target)||n.index-c.index}function ot(n,c){return n.y0-c.y0}function kt(n){return n.value}function Bt(n){return n.index}function Ot(n){return n.nodes}function Rt(n){return n.links}function wt(n,c){let m=n.get(c);if(!m)throw Error("missing: "+c);return m}function Lt({nodes:n}){for(let c of n){let m=c.y0,x=m;for(let _ of c.sourceLinks)_.y0=m+_.width/2,m+=_.width;for(let _ of c.targetLinks)_.y1=x+_.width/2,x+=_.width}}function it(){let n=0,c=0,m=1,x=1,_=24,P=8,g,N=Bt,a=st,i,f,v=Ot,k=Rt,h=6;function w(){let t={nodes:v.apply(null,arguments),links:k.apply(null,arguments)};return G(t),M(t),W(t),U(t),z(t),Lt(t),t}w.update=function(t){return Lt(t),t},w.nodeId=function(t){return arguments.length?(N=typeof t==="function"?t:et(t),w):N},w.nodeAlign=function(t){return arguments.length?(a=typeof t==="function"?t:et(t),w):a},w.nodeSort=function(t){return arguments.length?(i=t,w):i},w.nodeWidth=function(t){return arguments.length?(_=+t,w):_},w.nodePadding=function(t){return arguments.length?(P=g=+t,w):P},w.nodes=function(t){return arguments.length?(v=typeof t==="function"?t:et(t),w):v},w.links=function(t){return arguments.length?(k=typeof t==="function"?t:et(t),w):k},w.linkSort=function(t){return arguments.length?(f=t,w):f},w.size=function(t){return arguments.length?(n=c=0,m=+t[0],x=+t[1],w):[m-n,x-c]},w.extent=function(t){return arguments.length?(n=+t[0][0],m=+t[1][0],c=+t[0][1],x=+t[1][1],w):[[n,c],[m,x]]},w.iterations=function(t){return arguments.length?(h=+t,w):h};function G({nodes:t,links:l}){for(let[r,o]of t.entries())o.index=r,o.sourceLinks=[],o.targetLinks=[];let u=new Map(t.map((r,o)=>[N(r,o,t),r]));for(let[r,o]of l.entries()){o.index=r;let{source:d,target:b}=o;if(typeof d!=="object")d=o.source=wt(u,d);if(typeof b!=="object")b=o.target=wt(u,b);d.sourceLinks.push(o),b.targetLinks.push(o)}if(f!=null)for(let{sourceLinks:r,targetLinks:o}of t)r.sort(f),o.sort(f)}function M({nodes:t}){for(let l of t)l.value=l.fixedValue===void 0?Math.max(rt(l.sourceLinks,kt),rt(l.targetLinks,kt)):l.fixedValue}function W({nodes:t}){let l=t.length,u=new Set(t),r=new Set,o=0;while(u.size){for(let d of u){d.depth=o;for(let{target:b}of d.sourceLinks)r.add(b)}if(++o>l)throw Error("circular link");u=r,r=new Set}}function U({nodes:t}){let l=t.length,u=new Set(t),r=new Set,o=0;while(u.size){for(let d of u){d.height=o;for(let{source:b}of d.targetLinks)r.add(b)}if(++o>l)throw Error("circular link");u=r,r=new Set}}function q({nodes:t}){let l=On(t,(o)=>o.depth)+1,u=(m-n-_)/(l-1),r=Array(l);for(let o of t){let d=Math.max(0,Math.min(l-1,Math.floor(a.call(null,o,l))));if(o.layer=d,o.x0=n+d*u,o.x1=o.x0+_,r[d])r[d].push(o);else r[d]=[o]}if(i)for(let o of r)o.sort(i);return r}function Z(t){let l=mn(t,(u)=>(x-c-(u.length-1)*g)/rt(u,kt));for(let u of t){let r=c;for(let o of u){o.y0=r,o.y1=r+o.value*l,r=o.y1+g;for(let d of o.sourceLinks)d.width=d.value*l}r=(x-r+g)/(u.length+1);for(let o=0;o<u.length;++o){let d=u[o];d.y0+=r*(o+1),d.y1+=r*(o+1)}Q(u)}}function z(t){let l=q(t);g=Math.min(P,(x-c)/(On(l,(u)=>u.length)-1)),Z(l);for(let u=0;u<h;++u){let r=Math.pow(0.99,u),o=Math.max(1-r,(u+1)/h);D(l,r,o),B(l,r,o)}}function B(t,l,u){for(let r=1,o=t.length;r<o;++r){let d=t[r];for(let b of d){let K=0,Y=0;for(let{source:R,value:ht}of b.targetLinks){let nt=ht*(b.layer-R.layer);K+=O(R,b)*nt,Y+=nt}if(!(Y>0))continue;let F=(K/Y-b.y0)*l;b.y0+=F,b.y1+=F,tt(b)}if(i===void 0)d.sort(ot);H(d,u)}}function D(t,l,u){for(let r=t.length,o=r-2;o>=0;--o){let d=t[o];for(let b of d){let K=0,Y=0;for(let{target:R,value:ht}of b.sourceLinks){let nt=ht*(R.layer-b.layer);K+=V(b,R)*nt,Y+=nt}if(!(Y>0))continue;let F=(K/Y-b.y0)*l;b.y0+=F,b.y1+=F,tt(b)}if(i===void 0)d.sort(ot);H(d,u)}}function H(t,l){let u=t.length>>1,r=t[u];j(t,r.y0-g,u-1,l),X(t,r.y1+g,u+1,l),j(t,x,t.length-1,l),X(t,c,0,l)}function X(t,l,u,r){for(;u<t.length;++u){let o=t[u],d=(l-o.y0)*r;if(d>0.000001)o.y0+=d,o.y1+=d;l=o.y1+g}}function j(t,l,u,r){for(;u>=0;--u){let o=t[u],d=(o.y1-l)*r;if(d>0.000001)o.y0-=d,o.y1-=d;l=o.y0-g}}function tt({sourceLinks:t,targetLinks:l}){if(f===void 0){for(let{source:{sourceLinks:u}}of l)u.sort(St);for(let{target:{targetLinks:u}}of t)u.sort(_t)}}function Q(t){if(f===void 0)for(let{sourceLinks:l,targetLinks:u}of t)l.sort(St),u.sort(_t)}function O(t,l){let u=t.y0-(t.sourceLinks.length-1)*g/2;for(let{target:r,width:o}of t.sourceLinks){if(r===l)break;u+=o+g}for(let{source:r,width:o}of l.targetLinks){if(r===t)break;u-=o}return u}function V(t,l){let u=l.y0-(l.targetLinks.length-1)*g/2;for(let{source:r,width:o}of l.targetLinks){if(r===t)break;u+=o+g}for(let{target:r,width:o}of t.sourceLinks){if(r===l)break;u-=o}return u}return w}function Nt(n){return[n.source.x1,n.y0]}function Gt(n){return[n.target.x0,n.y1]}function at(){return vt().source(Nt).target(Gt)}var bt=function(){var n=e(function(N,a,i,f){for(i=i||{},f=N.length;f--;i[N[f]]=a);return i},"o"),c=[1,9],m=[1,10],x=[1,5,10,12],_={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:e(function(a,i,f,v,k,h,w){var G=h.length-1;switch(k){case 7:let M=v.findOrCreateNode(h[G-4].trim().replaceAll('""','"')),W=v.findOrCreateNode(h[G-2].trim().replaceAll('""','"')),U=parseFloat(h[G].trim());v.addLink(M,W,U);break;case 8:case 9:case 11:this.$=h[G];break;case 10:this.$=h[G-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:c,20:m},{1:[2,6],7:11,10:[1,12]},n(m,[2,4],{9:13,5:[1,14]}),{12:[1,15]},n(x,[2,8]),n(x,[2,9]),{19:[1,16]},n(x,[2,11]),{1:[2,1]},{1:[2,5]},n(m,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:c,20:m},{15:18,16:7,17:8,18:c,20:m},{18:[1,19]},n(m,[2,3]),{12:[1,20]},n(x,[2,10]),{15:21,16:7,17:8,18:c,20:m},n([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:e(function(a,i){if(i.recoverable)this.trace(a);else{var f=Error(a);throw f.hash=i,f}},"parseError"),parse:e(function(a){var i=this,f=[0],v=[],k=[null],h=[],w=this.table,G="",M=0,W=0,U=0,q=2,Z=1,z=h.slice.call(arguments,1),B=Object.create(this.lexer),D={yy:{}};for(var H in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,H))D.yy[H]=this.yy[H];if(B.setInput(a,D.yy),D.yy.lexer=B,D.yy.parser=this,typeof B.yylloc>"u")B.yylloc={};var X=B.yylloc;h.push(X);var j=B.options&&B.options.ranges;if(typeof D.yy.parseError==="function")this.parseError=D.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function tt(R){f.length=f.length-2*R,k.length=k.length-R,h.length=h.length-R}e(tt,"popStack");function Q(){var R=v.pop()||B.lex()||Z;if(typeof R!=="number"){if(R instanceof Array)v=R,R=v.pop();R=i.symbols_[R]||R}return R}e(Q,"lex");var O,V,t,l,u,r,o={},d,b,K,Y;while(!0){if(t=f[f.length-1],this.defaultActions[t])l=this.defaultActions[t];else{if(O===null||typeof O>"u")O=Q();l=w[t]&&w[t][O]}if(typeof l>"u"||!l.length||!l[0]){var F="";Y=[];for(d in w[t])if(this.terminals_[d]&&d>q)Y.push("'"+this.terminals_[d]+"'");if(B.showPosition)F="Parse error on line "+(M+1)+`:
|
|
2
2
|
`+B.showPosition()+`
|
|
3
3
|
Expecting `+Y.join(", ")+", got '"+(this.terminals_[O]||O)+"'";else F="Parse error on line "+(M+1)+": Unexpected "+(O==Z?"end of input":"'"+(this.terminals_[O]||O)+"'");this.parseError(F,{text:B.match,token:this.terminals_[O]||O,line:B.yylineno,loc:X,expected:Y})}if(l[0]instanceof Array&&l.length>1)throw Error("Parse Error: multiple actions possible at state: "+t+", token: "+O);switch(l[0]){case 1:if(f.push(O),k.push(B.yytext),h.push(B.yylloc),f.push(l[1]),O=null,!V){if(W=B.yyleng,G=B.yytext,M=B.yylineno,X=B.yylloc,U>0)U--}else O=V,V=null;break;case 2:if(b=this.productions_[l[1]][1],o.$=k[k.length-b],o._$={first_line:h[h.length-(b||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(b||1)].first_column,last_column:h[h.length-1].last_column},j)o._$.range=[h[h.length-(b||1)].range[0],h[h.length-1].range[1]];if(r=this.performAction.apply(o,[G,W,M,D.yy,l[1],k,h].concat(z)),typeof r<"u")return r;if(b)f=f.slice(0,-1*b*2),k=k.slice(0,-1*b),h=h.slice(0,-1*b);f.push(this.productions_[l[1]][0]),k.push(o.$),h.push(o._$),K=w[f[f.length-2]][f[f.length-1]],f.push(K);break;case 3:return!0}}return!0},"parse")},P=function(){var N={EOF:1,parseError:e(function(i,f){if(this.yy.parser)this.yy.parser.parseError(i,f);else throw Error(i)},"parseError"),setInput:e(function(a,i){if(this.yy=i||this.yy||{},this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var i=a.match(/(?:\r\n?|\n).*/g);if(i)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),a},"input"),unput:e(function(a){var i=a.length,f=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var v=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),f.length-1)this.yylineno-=f.length-1;var k=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:f?(f.length===v.length?this.yylloc.first_column:0)+v[v.length-f.length].length-f[0].length:this.yylloc.first_column-i},this.options.ranges)this.yylloc.range=[k[0],k[0]+this.yyleng-i];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(a){this.unput(this.match.slice(a))},"less"),pastInput:e(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var a=this.match;if(a.length<20)a+=this._input.substr(0,20-a.length);return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var a=this.pastInput(),i=Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{e,r,
|
|
1
|
+
import{e,r,le,b,y,B,C,s,p,Da,Rn,sn,Na,Er,Ar,Lr,Ir,Ma,Pa,Oa,$a,Ba,Fa,za,Ua,ja,qa,Va,Ga,Wa,Ha,Ya,Za,Xa,ln,Qa,ce,ae,ie,Ye,Ze,St,ht,Tt,Hn,Jt,Yn}from"./chunk-vymqrpm3.js";import{Q}from"./chunk-7xk0ntav.js";import{je}from"./chunk-7520nrbb.js";import{Ot}from"./chunk-166qe5j6.js";function Te(t){return Array.isArray(t)}function Ne(t){if(Rn(t))return t;let l=sn(t);if(!Qe(t))return{};if(Te(t)){let n=Array.from(t);if(t.length>0&&typeof t[0]==="string"&&Object.hasOwn(t,"index"))n.index=t.index,n.input=t.input;return n}if(ln(t)){let n=t;return new n.constructor(n.buffer,n.byteOffset,n.length)}if(l==="[object ArrayBuffer]")return new ArrayBuffer(t.byteLength);if(l==="[object DataView]"){let n=t,{buffer:g,byteOffset:f,byteLength:i}=n,d=new ArrayBuffer(i),w=new Uint8Array(g,f,i);return new Uint8Array(d).set(w),new DataView(d)}if(l==="[object Boolean]"||l==="[object Number]"||l==="[object String]"){let g=new t.constructor(t.valueOf());if(l==="[object String]")et(g,t);else pe(g,t);return g}if(l==="[object Date]")return new Date(Number(t));if(l==="[object RegExp]"){let n=t,g=new RegExp(n.source,n.flags);return g.lastIndex=n.lastIndex,g}if(l==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(t));if(l==="[object Map]"){let n=t,g=new Map;return n.forEach((f,i)=>{g.set(i,f)}),g}if(l==="[object Set]"){let n=t,g=new Set;return n.forEach((f)=>{g.add(f)}),g}if(l==="[object Arguments]"){let n=t,g={};return pe(g,n),g.length=n.length,g[Symbol.iterator]=n[Symbol.iterator],g}let u={};return tt(u,t),pe(u,t),$e(u,t),u}function Qe(t){switch(sn(t)){case Ir:case Ba:case Fa:case Ua:case Lr:case Pa:case Za:case Xa:case Wa:case Ha:case Ya:case Oa:case Ar:case za:case Na:case $a:case Er:case Ma:case ja:case qa:case Va:case Ga:return!0;default:return!1}}function pe(t,l){for(let u in l)if(Object.hasOwn(l,u))t[u]=l[u]}function $e(t,l){let u=Object.getOwnPropertySymbols(l);for(let n=0;n<u.length;n++){let g=u[n];if(Object.prototype.propertyIsEnumerable.call(l,g))t[g]=l[g]}}function et(t,l){let u=l.valueOf().length;for(let n in l)if(Object.hasOwn(l,n)&&(Number.isNaN(Number(n))||Number(n)>=u))t[n]=l[n]}function tt(t,l){let u=Object.getPrototypeOf(l);if(u!==null){if(typeof l.constructor==="function")Object.setPrototypeOf(t,u)}}var be=function(){var t=e(function(R,S,o,h){for(o=o||{},h=R.length;h--;o[R[h]]=S);return o},"o"),l=[1,15],u=[1,7],n=[1,13],g=[1,14],f=[1,19],i=[1,16],d=[1,17],w=[1,18],E=[8,30],L=[8,10,21,28,29,30,31,39,43,46],m=[1,23],_=[1,24],T=[8,10,15,16,21,28,29,30,31,39,43,46],k=[8,10,15,16,21,27,28,29,30,31,39,43,46],I=[1,49],N={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(S,o,h,x,D,a,H){var c=a.length-1;switch(D){case 4:x.getLogger().debug("Rule: separator (NL) ");break;case 5:x.getLogger().debug("Rule: separator (Space) ");break;case 6:x.getLogger().debug("Rule: separator (EOF) ");break;case 7:x.getLogger().debug("Rule: hierarchy: ",a[c-1]),x.setHierarchy(a[c-1]);break;case 8:x.getLogger().debug("Stop NL ");break;case 9:x.getLogger().debug("Stop EOF ");break;case 10:x.getLogger().debug("Stop NL2 ");break;case 11:x.getLogger().debug("Stop EOF2 ");break;case 12:x.getLogger().debug("Rule: statement: ",a[c]),typeof a[c].length==="number"?this.$=a[c]:this.$=[a[c]];break;case 13:x.getLogger().debug("Rule: statement #2: ",a[c-1]),this.$=[a[c-1]].concat(a[c]);break;case 14:x.getLogger().debug("Rule: link: ",a[c],S),this.$={edgeTypeStr:a[c],label:""};break;case 15:x.getLogger().debug("Rule: LABEL link: ",a[c-3],a[c-1],a[c]),this.$={edgeTypeStr:a[c],label:a[c-1]};break;case 18:let V=parseInt(a[c]),j=x.generateId();this.$={id:j,type:"space",label:"",width:V,children:[]};break;case 23:x.getLogger().debug("Rule: (nodeStatement link node) ",a[c-2],a[c-1],a[c]," typestr: ",a[c-1].edgeTypeStr);let G=x.edgeStrToEdgeData(a[c-1].edgeTypeStr),se=x.edgeStrToEdgeStartData(a[c-1].edgeTypeStr),q=x.edgeStrToThickness(a[c-1].edgeTypeStr),ne=x.edgeStrToPattern(a[c-1].edgeTypeStr);this.$=[{id:a[c-2].id,label:a[c-2].label,type:a[c-2].type,directions:a[c-2].directions},{id:a[c-2].id+"-"+a[c].id,start:a[c-2].id,end:a[c].id,label:a[c-1].label,type:"edge",thickness:q,pattern:ne,directions:a[c].directions,arrowTypeEnd:G,arrowTypeStart:se},{id:a[c].id,label:a[c].label,type:x.typeStr2Type(a[c].typeStr),directions:a[c].directions}];break;case 24:x.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[c-1],a[c]),this.$={id:a[c-1].id,label:a[c-1].label,type:x.typeStr2Type(a[c-1].typeStr),directions:a[c-1].directions,widthInColumns:parseInt(a[c],10)};break;case 25:x.getLogger().debug("Rule: nodeStatement (node) ",a[c]),this.$={id:a[c].id,label:a[c].label,type:x.typeStr2Type(a[c].typeStr),directions:a[c].directions,widthInColumns:1};break;case 26:x.getLogger().debug("APA123",this?this:"na"),x.getLogger().debug("COLUMNS: ",a[c]),this.$={type:"column-setting",columns:a[c]==="auto"?-1:parseInt(a[c])};break;case 27:x.getLogger().debug("Rule: id-block statement : ",a[c-2],a[c-1]);let O=x.generateId();this.$={...a[c-2],type:"composite",children:a[c-1]};break;case 28:x.getLogger().debug("Rule: blockStatement : ",a[c-2],a[c-1],a[c]);let K=x.generateId();this.$={id:K,type:"composite",label:"",children:a[c-1]};break;case 29:x.getLogger().debug("Rule: node (NODE_ID separator): ",a[c]),this.$={id:a[c]};break;case 30:x.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[c-1],a[c]),this.$={id:a[c-1],label:a[c].label,typeStr:a[c].typeStr,directions:a[c].directions};break;case 31:x.getLogger().debug("Rule: dirList: ",a[c]),this.$=[a[c]];break;case 32:x.getLogger().debug("Rule: dirList: ",a[c-1],a[c]),this.$=[a[c-1]].concat(a[c]);break;case 33:x.getLogger().debug("Rule: nodeShapeNLabel: ",a[c-2],a[c-1],a[c]),this.$={typeStr:a[c-2]+a[c],label:a[c-1]};break;case 34:x.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[c-3],a[c-2]," #3:",a[c-1],a[c]),this.$={typeStr:a[c-3]+a[c],label:a[c-2],directions:a[c-1]};break;case 35:case 36:this.$={type:"classDef",id:a[c-1].trim(),css:a[c].trim()};break;case 37:this.$={type:"applyClass",id:a[c-1].trim(),styleClass:a[c].trim()};break;case 38:this.$={type:"applyStyles",id:a[c-1].trim(),stylesStr:a[c].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:l,11:3,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:n,29:g,31:f,39:i,43:d,46:w},{8:[1,20]},t(E,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:l,21:u,28:n,29:g,31:f,39:i,43:d,46:w}),t(L,[2,16],{14:22,15:m,16:_}),t(L,[2,17]),t(L,[2,18]),t(L,[2,19]),t(L,[2,20]),t(L,[2,21]),t(L,[2,22]),t(T,[2,25],{27:[1,25]}),t(L,[2,26]),{19:26,26:12,31:f},{10:l,11:27,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:n,29:g,31:f,39:i,43:d,46:w},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(k,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(E,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},t(T,[2,24]),{10:l,11:37,13:4,14:22,15:m,16:_,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:n,29:g,31:f,39:i,43:d,46:w},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(k,[2,30]),{18:[1,43]},{18:[1,44]},t(T,[2,23]),{18:[1,45]},{30:[1,46]},t(L,[2,28]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),{36:[1,47]},{33:48,34:I},{15:[1,50]},t(L,[2,27]),t(k,[2,33]),{38:[1,51]},{33:52,34:I,38:[2,31]},{31:[2,15]},t(k,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(S,o){if(o.recoverable)this.trace(S);else{var h=Error(S);throw h.hash=o,h}},"parseError"),parse:e(function(S){var o=this,h=[0],x=[],D=[null],a=[],H=this.table,c="",V=0,j=0,G=0,se=2,q=1,ne=a.slice.call(arguments,1),O=Object.create(this.lexer),K={yy:{}};for(var oe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,oe))K.yy[oe]=this.yy[oe];if(O.setInput(S,K.yy),K.yy.lexer=O,K.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var ue=O.yylloc;a.push(ue);var qe=O.options&&O.options.ranges;if(typeof K.yy.parseError==="function")this.parseError=K.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Je(F){h.length=h.length-2*F,D.length=D.length-F,a.length=a.length-F}e(Je,"popStack");function _e(){var F=x.pop()||O.lex()||q;if(typeof F!=="number"){if(F instanceof Array)x=F,F=x.pop();F=o.symbols_[F]||F}return F}e(_e,"lex");var A,he,W,P,zt,ge,U={},J,Y,De,Z;while(!0){if(W=h[h.length-1],this.defaultActions[W])P=this.defaultActions[W];else{if(A===null||typeof A>"u")A=_e();P=H[W]&&H[W][A]}if(typeof P>"u"||!P.length||!P[0]){var de="";Z=[];for(J in H[W])if(this.terminals_[J]&&J>se)Z.push("'"+this.terminals_[J]+"'");if(O.showPosition)de="Parse error on line "+(V+1)+`:
|
|
2
2
|
`+O.showPosition()+`
|
|
3
|
-
Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else de="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(de,{text:O.match,token:this.terminals_[A]||A,line:O.yylineno,loc:ue,expected:Z})}if(P[0]instanceof Array&&P.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(P[0]){case 1:if(h.push(A),D.push(O.yytext),a.push(O.yylloc),h.push(P[1]),A=null,!he){if(j=O.yyleng,c=O.yytext,V=O.yylineno,ue=O.yylloc,G>0)G--}else A=he,he=null;break;case 2:if(Y=this.productions_[P[1]][1],U.$=D[D.length-Y],U._$={first_line:a[a.length-(Y||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(Y||1)].first_column,last_column:a[a.length-1].last_column},qe)U._$.range=[a[a.length-(Y||1)].range[0],a[a.length-1].range[1]];if(ge=this.performAction.apply(U,[c,j,V,K.yy,P[1],D,a].concat(
|
|
3
|
+
Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else de="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(de,{text:O.match,token:this.terminals_[A]||A,line:O.yylineno,loc:ue,expected:Z})}if(P[0]instanceof Array&&P.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(P[0]){case 1:if(h.push(A),D.push(O.yytext),a.push(O.yylloc),h.push(P[1]),A=null,!he){if(j=O.yyleng,c=O.yytext,V=O.yylineno,ue=O.yylloc,G>0)G--}else A=he,he=null;break;case 2:if(Y=this.productions_[P[1]][1],U.$=D[D.length-Y],U._$={first_line:a[a.length-(Y||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(Y||1)].first_column,last_column:a[a.length-1].last_column},qe)U._$.range=[a[a.length-(Y||1)].range[0],a[a.length-1].range[1]];if(ge=this.performAction.apply(U,[c,j,V,K.yy,P[1],D,a].concat(ne)),typeof ge<"u")return ge;if(Y)h=h.slice(0,-1*Y*2),D=D.slice(0,-1*Y),a=a.slice(0,-1*Y);h.push(this.productions_[P[1]][0]),D.push(U.$),a.push(U._$),De=H[h[h.length-2]][h[h.length-1]],h.push(De);break;case 3:return!0}}return!0},"parse")},v=function(){var R={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(S,o){if(this.yy=o||this.yy||{},this._input=S,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 S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var o=S.match(/(?:\r\n?|\n).*/g);if(o)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),S},"input"),unput:e(function(S){var o=S.length,h=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var x=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),h.length-1)this.yylineno-=h.length-1;var D=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:h?(h.length===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[D[0],D[0]+this.yyleng-o];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(S){this.unput(this.match.slice(S))},"less"),pastInput:e(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var S=this.match;if(S.length<20)S+=this._input.substr(0,20-S.length);return(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var S=this.pastInput(),o=Array(S.length+1).join("-");return S+this.upcomingInput()+`
|
|
5
5
|
`+o+"^"},"showPosition"),test_match:e(function(S,o){var h,x,D;if(this.options.backtrack_lexer){if(D={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)D.yylloc.range=this.yylloc.range.slice(0)}if(x=S[0].match(/(?:\r\n?|\n).*/g),x)this.yylineno+=x.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,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(S[0].length),this.matched+=S[0],h=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var a in D)this[a]=D[a];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var S,o,h,x;if(!this._more)this.yytext="",this.match="";var D=this._currentRules();for(var a=0;a<D.length;a++)if(h=this._input.match(this.rules[D[a]]),h&&(!o||h[0].length>o[0].length)){if(o=h,x=a,this.options.backtrack_lexer)if(S=this.test_match(h,D[a]),S!==!1)return S;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(S=this.test_match(o,D[x]),S!==!1)return S;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 o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>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(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(o,h,x,D){var a=D;switch(x){case 0:return o.getLogger().debug("Found block-beta"),10;break;case 1:return o.getLogger().debug("Found id-block"),29;break;case 2:return o.getLogger().debug("Found block"),10;break;case 3:o.getLogger().debug(".",h.yytext);break;case 4:o.getLogger().debug("_",h.yytext);break;case 5:return 5;case 6:return h.yytext=-1,28;break;case 7:return h.yytext=h.yytext.replace(/columns\s+/,""),o.getLogger().debug("COLUMNS (LEX)",h.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:o.getLogger().debug("LEX: POPPING STR:",h.yytext),this.popState();break;case 13:return o.getLogger().debug("LEX: STR end:",h.yytext),"STR";break;case 14:return h.yytext=h.yytext.replace(/space\:/,""),o.getLogger().debug("SPACE NUM (LEX)",h.yytext),21;break;case 15:return h.yytext="1",o.getLogger().debug("COLUMNS (LEX)",h.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),o.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),o.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),o.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),o.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),o.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),o.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),o.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),o.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),o.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),o.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),o.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),o.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return o.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return o.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return o.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return o.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return o.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return o.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return o.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),o.getLogger().debug("LEX ARR START"),37;break;case 74:return o.getLogger().debug("Lex: NODE_ID",h.yytext),31;break;case 75:return o.getLogger().debug("Lex: EOF",h.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:o.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:o.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return o.getLogger().debug("LEX: NODE_DESCR:",h.yytext),"NODE_DESCR";break;case 83:o.getLogger().debug("LEX POPPING"),this.popState();break;case 84:o.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (right): dir:",h.yytext),"DIR";break;case 86:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (left):",h.yytext),"DIR";break;case 87:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (x):",h.yytext),"DIR";break;case 88:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (y):",h.yytext),"DIR";break;case 89:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (up):",h.yytext),"DIR";break;case 90:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (down):",h.yytext),"DIR";break;case 91:return h.yytext="]>",o.getLogger().debug("Lex (ARROW_DIR end):",h.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return o.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 93:return o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 94:return o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 95:return o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 96:return o.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 97:return o.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 98:return o.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return o.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),o.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 102:return this.popState(),o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 103:return this.popState(),o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 104:return o.getLogger().debug("Lex: COLON",h.yytext),h.yytext=h.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return R}();N.lexer=v;function z(){this.yy={}}return e(z,"Parser"),z.prototype=N,N.Parser=z,new z}();be.parser=be;var rt=be,M=new Map,me=[],Se=new Map,Ie="color",Oe="fill",st="bgFill",ve=",",ee=new Map,Le="",it=e((t)=>y.sanitizeText(t,s()),"sanitizeText"),at=e(function(t,l=""){let u=ee.get(t);if(!u)u={id:t,styles:[],textStyles:[]},ee.set(t,u);if(l!==void 0&&l!==null)l.split(ve).forEach((n)=>{let g=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ie).exec(n)){let i=g.replace(Oe,st).replace(Ie,Oe);u.textStyles.push(i)}u.styles.push(g)})},"addStyleClass"),nt=e(function(t,l=""){let u=M.get(t);if(l!==void 0&&l!==null)u.styles=l.split(ve)},"addStyle2Node"),ot=e(function(t,l){t.split(",").forEach(function(u){let n=M.get(u);if(n===void 0){let g=u.trim();n={id:g,type:"na",children:[]},M.set(g,n)}if(!n.classes)n.classes=[];n.classes.push(l)})},"setCssClass"),Ae=0,ze=e((t,l)=>{let u=t.flat(),n=[],f=u.find((i)=>i?.type==="column-setting")?.columns??-1;for(let i of u){if(typeof f==="number"&&f>0&&i.type!=="column-setting"&&typeof i.widthInColumns==="number"&&i.widthInColumns>f)r.warn(`Block ${i.id} width ${i.widthInColumns} exceeds configured column width ${f}`);if(i.label)i.label=it(i.label);if(i.type==="classDef"){at(i.id,i.css);continue}if(i.type==="applyClass"){ot(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){if(i?.stylesStr)nt(i.id,i?.stylesStr);continue}if(i.type==="column-setting")l.columns=i.columns??-1;else if(i.type==="edge"){let d=(Se.get(i.id)??0)+1;Se.set(i.id,d),i.id=d+"-"+i.id,me.push(i)}else{if(!i.label)if(i.type==="composite")i.label="";else i.label=i.id;let d=M.get(i.id);if(d===void 0){if(i.type==="composite")i.colorIndex=Ae++;M.set(i.id,i)}else{if(i.type!=="na")d.type=i.type;if(i.label!==i.id)d.label=i.label}if(i.children)ze(i.children,i);if(i.type==="space"){let w=i.width??1;for(let E=0;E<w;E++){let L=Ne(i);L.id=L.id+"-"+E,M.set(L.id,L),n.push(L)}}else if(d===void 0)n.push(i)}}l.children=n},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=e(()=>{r.debug("Clear called"),C(),X={id:"root",type:"composite",children:[],columns:-1},M=new Map([["root",X]]),ke=[],ee=new Map,me=[],Se=new Map,Le="",Ae=0},"clear");function Be(t){switch(r.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return r.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}e(Be,"typeStr2Type");function Re(t){switch(r.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}e(Re,"edgeTypeStr2Type");function Pe(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}e(Pe,"edgeStrToEdgeData");function Fe(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}e(Fe,"edgeStrToEdgeStartData");function Me(t){return t.includes("==")?"thick":"normal"}e(Me,"edgeStrToThickness");function Ke(t){if(t.includes(".-"))return"dotted";return"solid"}e(Ke,"edgeStrToPattern");var Ce=0,ct=e(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=e((t)=>{X.children=t,ze(t,X),ke=X.children},"setHierarchy"),gt=e((t)=>{let l=M.get(t);if(!l)return-1;if(l.columns)return l.columns;if(!l.children)return-1;return l.children.length},"getColumns"),dt=e(()=>[...M.values()],"getBlocksFlat"),pt=e(()=>ke||[],"getBlocks"),ft=e(()=>me,"getEdges"),bt=e((t)=>M.get(t),"getBlock"),xt=e((t)=>{M.set(t.id,t)},"setBlock"),mt=e((t)=>{Le=t},"setDiagramId"),Lt=e(()=>Le,"getDiagramId"),kt=e(()=>r,"getLogger"),yt=e(function(){return ee},"getClasses"),wt={getConfig:e(()=>b().block,"getConfig"),typeStr2Type:Be,edgeTypeStr2Type:Re,edgeStrToEdgeData:Pe,edgeStrToEdgeStartData:Fe,edgeStrToThickness:Me,edgeStrToPattern:Ke,getLogger:kt,getBlocksFlat:dt,getBlocks:pt,getEdges:ft,setHierarchy:ut,getBlock:bt,setBlock:xt,getColumns:gt,getClasses:yt,clear:lt,generateId:ct,setDiagramId:mt,getDiagramId:Lt},Et=wt,_t=e((t)=>{let{theme:l,bkgColorArray:u,borderColorArray:n}=t;if(!ae(l,n))return"";let g=ie(t.look),f=le(u),i="";for(let d=0;d<Ye(t.THEME_COLOR_LIMIT,n);d++){let w=n[d%n.length],E=f?`fill: ${u[d%u.length]};`:"",L=`[data-look="${g}"][data-color-id="color-${d}"]`;i+=`
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>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(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(o,h,x,D){var a=D;switch(x){case 0:return o.getLogger().debug("Found block-beta"),10;break;case 1:return o.getLogger().debug("Found id-block"),29;break;case 2:return o.getLogger().debug("Found block"),10;break;case 3:o.getLogger().debug(".",h.yytext);break;case 4:o.getLogger().debug("_",h.yytext);break;case 5:return 5;case 6:return h.yytext=-1,28;break;case 7:return h.yytext=h.yytext.replace(/columns\s+/,""),o.getLogger().debug("COLUMNS (LEX)",h.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:o.getLogger().debug("LEX: POPPING STR:",h.yytext),this.popState();break;case 13:return o.getLogger().debug("LEX: STR end:",h.yytext),"STR";break;case 14:return h.yytext=h.yytext.replace(/space\:/,""),o.getLogger().debug("SPACE NUM (LEX)",h.yytext),21;break;case 15:return h.yytext="1",o.getLogger().debug("COLUMNS (LEX)",h.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),o.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),o.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),o.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),o.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),o.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),o.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),o.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),o.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),o.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),o.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),o.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),o.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),o.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return o.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return o.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return o.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return o.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return o.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return o.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return o.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return o.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),o.getLogger().debug("LEX ARR START"),37;break;case 74:return o.getLogger().debug("Lex: NODE_ID",h.yytext),31;break;case 75:return o.getLogger().debug("Lex: EOF",h.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:o.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:o.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return o.getLogger().debug("LEX: NODE_DESCR:",h.yytext),"NODE_DESCR";break;case 83:o.getLogger().debug("LEX POPPING"),this.popState();break;case 84:o.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (right): dir:",h.yytext),"DIR";break;case 86:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (left):",h.yytext),"DIR";break;case 87:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (x):",h.yytext),"DIR";break;case 88:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (y):",h.yytext),"DIR";break;case 89:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (up):",h.yytext),"DIR";break;case 90:return h.yytext=h.yytext.replace(/^,\s*/,""),o.getLogger().debug("Lex (down):",h.yytext),"DIR";break;case 91:return h.yytext="]>",o.getLogger().debug("Lex (ARROW_DIR end):",h.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return o.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 93:return o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 94:return o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 95:return o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 96:return o.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 97:return o.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 98:return o.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return o.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),o.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 102:return this.popState(),o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 103:return this.popState(),o.getLogger().debug("Lex: LINK",h.yytext),15;break;case 104:return o.getLogger().debug("Lex: COLON",h.yytext),h.yytext=h.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return R}();N.lexer=v;function z(){this.yy={}}return e(z,"Parser"),z.prototype=N,N.Parser=z,new z}();be.parser=be;var rt=be,M=new Map,me=[],Se=new Map,Ie="color",Oe="fill",st="bgFill",ve=",",ee=new Map,Le="",it=e((t)=>y.sanitizeText(t,s()),"sanitizeText"),at=e(function(t,l=""){let u=ee.get(t);if(!u)u={id:t,styles:[],textStyles:[]},ee.set(t,u);if(l!==void 0&&l!==null)l.split(ve).forEach((n)=>{let g=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ie).exec(n)){let i=g.replace(Oe,st).replace(Ie,Oe);u.textStyles.push(i)}u.styles.push(g)})},"addStyleClass"),nt=e(function(t,l=""){let u=M.get(t);if(l!==void 0&&l!==null)u.styles=l.split(ve)},"addStyle2Node"),ot=e(function(t,l){t.split(",").forEach(function(u){let n=M.get(u);if(n===void 0){let g=u.trim();n={id:g,type:"na",children:[]},M.set(g,n)}if(!n.classes)n.classes=[];n.classes.push(l)})},"setCssClass"),Ae=0,ze=e((t,l)=>{let u=t.flat(),n=[],f=u.find((i)=>i?.type==="column-setting")?.columns??-1;for(let i of u){if(typeof f==="number"&&f>0&&i.type!=="column-setting"&&typeof i.widthInColumns==="number"&&i.widthInColumns>f)r.warn(`Block ${i.id} width ${i.widthInColumns} exceeds configured column width ${f}`);if(i.label)i.label=it(i.label);if(i.type==="classDef"){at(i.id,i.css);continue}if(i.type==="applyClass"){ot(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){if(i?.stylesStr)nt(i.id,i?.stylesStr);continue}if(i.type==="column-setting")l.columns=i.columns??-1;else if(i.type==="edge"){let d=(Se.get(i.id)??0)+1;Se.set(i.id,d),i.id=d+"-"+i.id,me.push(i)}else{if(!i.label)if(i.type==="composite")i.label="";else i.label=i.id;let d=M.get(i.id);if(d===void 0){if(i.type==="composite")i.colorIndex=Ae++;M.set(i.id,i)}else{if(i.type!=="na")d.type=i.type;if(i.label!==i.id)d.label=i.label}if(i.children)ze(i.children,i);if(i.type==="space"){let w=i.width??1;for(let E=0;E<w;E++){let L=Ne(i);L.id=L.id+"-"+E,M.set(L.id,L),n.push(L)}}else if(d===void 0)n.push(i)}}l.children=n},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=e(()=>{r.debug("Clear called"),C(),X={id:"root",type:"composite",children:[],columns:-1},M=new Map([["root",X]]),ke=[],ee=new Map,me=[],Se=new Map,Le="",Ae=0},"clear");function Be(t){switch(r.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return r.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}e(Be,"typeStr2Type");function Re(t){switch(r.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}e(Re,"edgeTypeStr2Type");function Pe(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}e(Pe,"edgeStrToEdgeData");function Fe(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}e(Fe,"edgeStrToEdgeStartData");function Me(t){return t.includes("==")?"thick":"normal"}e(Me,"edgeStrToThickness");function Ke(t){if(t.includes(".-"))return"dotted";return"solid"}e(Ke,"edgeStrToPattern");var Ce=0,ct=e(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=e((t)=>{X.children=t,ze(t,X),ke=X.children},"setHierarchy"),gt=e((t)=>{let l=M.get(t);if(!l)return-1;if(l.columns)return l.columns;if(!l.children)return-1;return l.children.length},"getColumns"),dt=e(()=>[...M.values()],"getBlocksFlat"),pt=e(()=>ke||[],"getBlocks"),ft=e(()=>me,"getEdges"),bt=e((t)=>M.get(t),"getBlock"),xt=e((t)=>{M.set(t.id,t)},"setBlock"),mt=e((t)=>{Le=t},"setDiagramId"),Lt=e(()=>Le,"getDiagramId"),kt=e(()=>r,"getLogger"),yt=e(function(){return ee},"getClasses"),wt={getConfig:e(()=>b().block,"getConfig"),typeStr2Type:Be,edgeTypeStr2Type:Re,edgeStrToEdgeData:Pe,edgeStrToEdgeStartData:Fe,edgeStrToThickness:Me,edgeStrToPattern:Ke,getLogger:kt,getBlocksFlat:dt,getBlocks:pt,getEdges:ft,setHierarchy:ut,getBlock:bt,setBlock:xt,getColumns:gt,getClasses:yt,clear:lt,generateId:ct,setDiagramId:mt,getDiagramId:Lt},Et=wt,_t=e((t)=>{let{theme:l,bkgColorArray:u,borderColorArray:n}=t;if(!ae(l,n))return"";let g=ie(t.look),f=ce(u),i="";for(let d=0;d<Ye(t.THEME_COLOR_LIMIT,n);d++){let w=n[d%n.length],E=f?`fill: ${u[d%u.length]};`:"",L=`[data-look="${g}"][data-color-id="color-${d}"]`;i+=`
|
|
7
7
|
|
|
8
8
|
${L}.node rect.composite {
|
|
9
9
|
stroke: ${w};
|
|
10
10
|
${E}
|
|
11
11
|
}
|
|
12
|
-
`}return i},"genColor"),fe=e((t,l)=>{let u=
|
|
12
|
+
`}return i},"genColor"),fe=e((t,l)=>{let u=Ot,n=u(t,"r"),g=u(t,"g"),f=u(t,"b");return le(n,g,f,l)},"fade"),Dt=e((t)=>`${_t(t)}
|
|
13
13
|
.label {
|
|
14
14
|
font-family: ${t.fontFamily};
|
|
15
15
|
color: ${t.nodeTextColor||t.textColor};
|
|
@@ -137,4 +137,4 @@ Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else de="Parse er
|
|
|
137
137
|
fill: ${t.textColor};
|
|
138
138
|
}
|
|
139
139
|
${je()}
|
|
140
|
-
`,"getStyles"),Nt=Dt;function xe(t,l){if(t===0||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(l<0||!Number.isInteger(l))throw Error("Position must be a non-negative integer."+l);if(t<0)return{px:l,py:0};if(t===1)return{px:0,py:l};let u=l%t,n=Math.floor(l/t);return{px:u,py:n}}e(xe,"calculateBlockPosition");var It=e((t)=>{let l=0,u=0;for(let n of t.children){let{width:g,height:f,x:i,y:d}=n.size??{width:0,height:0,x:0,y:0};if(r.debug("getMaxChildSize abc95 child:",n.id,"width:",g,"height:",f,"x:",i,"y:",d,n.type),n.type==="space")continue;let w=g/(n.widthInColumns??1);if(w>l)l=w;if(f>u)u=f}return{width:l,height:u}},"getMaxChildSize");function te(t,l,u=0,n=0,g=8){if(r.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",u),!t?.size?.width)t.size={width:u,height:n,x:0,y:0};let f=0,i=0;if(t.children?.length>0){for(let k of t.children)te(k,l,0,0,g);let d=It(t);f=d.width,i=d.height,r.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",f,i);for(let k of t.children)if(k.size)r.debug(`abc95 Setting size of children of ${t.id} id=${k.id} ${f} ${i} ${JSON.stringify(k.size)}`),k.size.width=f*(k.widthInColumns??1)+g*((k.widthInColumns??1)-1),k.size.height=i,k.size.x=0,k.size.y=0,r.debug(`abc95 updating size of ${t.id} children child:${k.id} maxWidth:${f} maxHeight:${i}`);for(let k of t.children)te(k,l,f,i,g);let w=t.columns??-1,E=0;for(let k of t.children)E+=k.widthInColumns??1;let L=t.children.length;if(w>0&&w<E)L=w;let m=Math.ceil(E/L),_=L*(f+g)+g,T=m*(i+g)+g;if(_<u){r.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${u} siblingHeight ${n} width ${_}`),_=u,T=n;let k=(u-L*g-g)/L,I=(n-m*g-g)/m;r.debug("Size indata abc88",t.id,"childWidth",k,"maxWidth",f),r.debug("Size indata abc88",t.id,"childHeight",I,"maxHeight",i),r.debug("Size indata abc88 xSize",L,"padding",g);for(let N of t.children)if(N.size)N.size.width=k,N.size.height=I,N.size.x=0,N.size.y=0}if(r.debug(`abc95 (finale calc) ${t.id} xSize ${L} ySize ${m} columns ${w}${t.children.length} width=${Math.max(_,t.size?.width||0)}`),_<(t?.size?.width||0)){_=t?.size?.width||0;let k=w>0?Math.min(t.children.length,w):t.children.length;if(k>0){let I=(_-k*g-g)/k;r.debug("abc95 (growing to fit) width",t.id,_,t.size?.width,I);for(let N of t.children)if(N.size)N.size.width=I}}t.size={width:_,height:T,x:0,y:0}}r.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}e(te,"setBlockSizes");function ye(t,l,u=8){r.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let n=t.columns??-1;if(r.debug("layoutBlocks columns abc95",t.id,"=>",n,t),t.children&&t.children.length>0){let g=t?.children[0]?.size?.width??0,f=t.children.length*g+(t.children.length-1)*u;r.debug("widthOfChildren 88",f,"posX");let i=new Map;{let m=0;for(let _ of t.children){if(!_.size)continue;let{py:T}=xe(n,m),k=i.get(T)??0;if(_.size.height>k)i.set(T,_.size.height);let I=_?.widthInColumns??1;if(n>0)I=Math.min(I,n-m%n);m+=I}}let d=new Map;{let m=0,_=[...i.keys()].sort((T,k)=>T-k);for(let T of _)d.set(T,m),m+=(i.get(T)??0)+u}let w=0;r.debug("abc91 block?.size?.x",t.id,t?.size?.x);let E=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,L=0;for(let m of t.children){let _=t;if(!m.size)continue;let{width:T,height:k}=m.size,{px:I,py:N}=xe(n,w);if(N!=L)L=N,E=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,r.debug("New row in layout for block",t.id," and child ",m.id,L);if(r.debug(`abc89 layout blocks (child) id: ${m.id} Pos: ${w} (px, py) ${I},${N} (${_?.size?.x},${_?.size?.y}) parent: ${_.id} width: ${T}${u}`),_.size){let z=T/2;m.size.x=E+u+z,r.debug(`abc91 layout blocks (calc) px, pyid:${m.id} startingPos=X${E} new startingPosX${m.size.x} ${z} padding=${u} width=${T} halfWidth=${z} => x:${m.size.x} y:${m.size.y} ${m.widthInColumns} (width * (child?.w || 1)) / 2 ${T*(m?.widthInColumns??1)/2}`),E=m.size.x+z;let R=d.get(N)??0,S=i.get(N)??k;m.size.y=_.size.y-_.size.height/2+R+S/2+u,r.debug(`abc88 layout blocks (calc) px, pyid:${m.id}startingPosX${E}${u}${z}=>x:${m.size.x}y:${m.size.y}${m.widthInColumns}(width * (child?.w || 1)) / 2${T*(m?.widthInColumns??1)/2}`)}if(m.children)ye(m,l,u);let v=m?.widthInColumns??1;if(n>0)v=Math.min(v,n-w%n);w+=v,r.debug("abc88 columnsPos",m,w)}}r.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}e(ye,"layoutBlocks");function we(t,{minX:l,minY:u,maxX:n,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:f,y:i,width:d,height:w}=t.size;if(f-d/2<l)l=f-d/2;if(i-w/2<u)u=i-w/2;if(f+d/2>n)n=f+d/2;if(i+w/2>g)g=i+w/2}if(t.children)for(let f of t.children)({minX:l,minY:u,maxX:n,maxY:g}=we(f,{minX:l,minY:u,maxX:n,maxY:g}));return{minX:l,minY:u,maxX:n,maxY:g}}e(we,"findBounds");function We(t){let l=t.getBlock("root");if(!l)return;let u=s()?.block?.padding??8;te(l,t,0,0,u),ye(l,t,u),r.debug("getBlocks",JSON.stringify(l,null,2));let{minX:n,minY:g,maxX:f,maxY:i}=we(l),d=i-g,w=f-n;return{x:n,y:g,width:w,height:d}}e(We,"layout");function Ee(t,l,u=!1){let n=t,g="default";if((n?.classes?.length||0)>0)g=(n?.classes??[]).join(" ");g=g+" flowchart-label";let f=(n?.classes??[]).flatMap((k)=>l.getClasses().get(k)?.styles??[]),i=0,d="rect",w;switch(n.type){case"round":i=5,d="rect";break;case"composite":i=0,d="composite",w=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}let E=Qa(n?.styles??[]),L=n.label,m=n.size??{width:0,height:0,x:0,y:0},_=l.getDiagramId();return{labelStyle:E.labelStyle,shape:d,label:L,labelText:L,rx:i,ry:i,class:g,cssClasses:g,cssStyles:n?.styles??[],cssCompiledStyles:f,style:E.style,id:n.id,domId:_?`${_}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:m.width||void 0,height:m.height||void 0,wrappingWidth:m.width||Number.POSITIVE_INFINITY,x:m.x,y:m.y,positioned:u,intersect:void 0,padding:w??b()?.block?.padding??0,widthInColumns:n.widthInColumns??1,colorIndex:n.colorIndex,look:b().look}}e(Ee,"getNodeFromBlock");async function Ve(t,l,u){let n=Ee(l,u,!1);if(l.type==="group")return;let g=b(),f=await St(t,n,{config:g}),i=f.node()?.getBBox()??{width:0,height:0},d=u.getBlock(n.id);d.size={width:i.width,height:i.height,x:0,y:0,node:f},u.setBlock(d),f.remove()}e(Ve,"calculateBlockSize");async function Ue(t,l,u){let n=Ee(l,u,!0);if(u.getBlock(n.id).type!=="space"){let f=b(),i=await St(t,n,{config:f});if(n.colorIndex!==void 0)Ze(i,n.colorIndex,f.theme,f.themeVariables?.borderColorArray);l.intersect=n?.intersect,ht(n)}}e(Ue,"insertBlockPositioned");async function re(t,l,u,n){for(let g of l)if(await n(t,g,u),g.children)await re(t,g.children,u,n)}e(re,"performOperations");async function He(t,l,u){await re(t,l,u,Ve)}e(He,"calculateBlockSizes");async function Xe(t,l,u){await re(t,l,u,Ue)}e(Xe,"insertBlocks");async function Ge(t,l,u,n,g){let f=new Q({multigraph:!0,compound:!0});f.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let i of u)if(i.size)f.setNode(i.id,{width:i.size.width,height:i.size.height,intersect:i.intersect});for(let i of l)if(i.start&&i.end){let d=n.getBlock(i.start),w=n.getBlock(i.end);if(d?.size&&w?.size){let E=d.size,L=w.size,m=[{x:E.x,y:E.y},{x:E.x+(L.x-E.x)/2,y:E.y+(L.y-E.y)/2},{x:L.x,y:L.y}],_=g?`${g}-${i.id}`:i.id,T=i.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",k=i.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",I=`${T} ${k} flowchart-link LS-a1 LE-b1`;if(
|
|
140
|
+
`,"getStyles"),Nt=Dt;function xe(t,l){if(t===0||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(l<0||!Number.isInteger(l))throw Error("Position must be a non-negative integer."+l);if(t<0)return{px:l,py:0};if(t===1)return{px:0,py:l};let u=l%t,n=Math.floor(l/t);return{px:u,py:n}}e(xe,"calculateBlockPosition");var It=e((t)=>{let l=0,u=0;for(let n of t.children){let{width:g,height:f,x:i,y:d}=n.size??{width:0,height:0,x:0,y:0};if(r.debug("getMaxChildSize abc95 child:",n.id,"width:",g,"height:",f,"x:",i,"y:",d,n.type),n.type==="space")continue;let w=g/(n.widthInColumns??1);if(w>l)l=w;if(f>u)u=f}return{width:l,height:u}},"getMaxChildSize");function te(t,l,u=0,n=0,g=8){if(r.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",u),!t?.size?.width)t.size={width:u,height:n,x:0,y:0};let f=0,i=0;if(t.children?.length>0){for(let k of t.children)te(k,l,0,0,g);let d=It(t);f=d.width,i=d.height,r.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",f,i);for(let k of t.children)if(k.size)r.debug(`abc95 Setting size of children of ${t.id} id=${k.id} ${f} ${i} ${JSON.stringify(k.size)}`),k.size.width=f*(k.widthInColumns??1)+g*((k.widthInColumns??1)-1),k.size.height=i,k.size.x=0,k.size.y=0,r.debug(`abc95 updating size of ${t.id} children child:${k.id} maxWidth:${f} maxHeight:${i}`);for(let k of t.children)te(k,l,f,i,g);let w=t.columns??-1,E=0;for(let k of t.children)E+=k.widthInColumns??1;let L=t.children.length;if(w>0&&w<E)L=w;let m=Math.ceil(E/L),_=L*(f+g)+g,T=m*(i+g)+g;if(_<u){r.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${u} siblingHeight ${n} width ${_}`),_=u,T=n;let k=(u-L*g-g)/L,I=(n-m*g-g)/m;r.debug("Size indata abc88",t.id,"childWidth",k,"maxWidth",f),r.debug("Size indata abc88",t.id,"childHeight",I,"maxHeight",i),r.debug("Size indata abc88 xSize",L,"padding",g);for(let N of t.children)if(N.size)N.size.width=k,N.size.height=I,N.size.x=0,N.size.y=0}if(r.debug(`abc95 (finale calc) ${t.id} xSize ${L} ySize ${m} columns ${w}${t.children.length} width=${Math.max(_,t.size?.width||0)}`),_<(t?.size?.width||0)){_=t?.size?.width||0;let k=w>0?Math.min(t.children.length,w):t.children.length;if(k>0){let I=(_-k*g-g)/k;r.debug("abc95 (growing to fit) width",t.id,_,t.size?.width,I);for(let N of t.children)if(N.size)N.size.width=I}}t.size={width:_,height:T,x:0,y:0}}r.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}e(te,"setBlockSizes");function ye(t,l,u=8){r.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let n=t.columns??-1;if(r.debug("layoutBlocks columns abc95",t.id,"=>",n,t),t.children&&t.children.length>0){let g=t?.children[0]?.size?.width??0,f=t.children.length*g+(t.children.length-1)*u;r.debug("widthOfChildren 88",f,"posX");let i=new Map;{let m=0;for(let _ of t.children){if(!_.size)continue;let{py:T}=xe(n,m),k=i.get(T)??0;if(_.size.height>k)i.set(T,_.size.height);let I=_?.widthInColumns??1;if(n>0)I=Math.min(I,n-m%n);m+=I}}let d=new Map;{let m=0,_=[...i.keys()].sort((T,k)=>T-k);for(let T of _)d.set(T,m),m+=(i.get(T)??0)+u}let w=0;r.debug("abc91 block?.size?.x",t.id,t?.size?.x);let E=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,L=0;for(let m of t.children){let _=t;if(!m.size)continue;let{width:T,height:k}=m.size,{px:I,py:N}=xe(n,w);if(N!=L)L=N,E=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,r.debug("New row in layout for block",t.id," and child ",m.id,L);if(r.debug(`abc89 layout blocks (child) id: ${m.id} Pos: ${w} (px, py) ${I},${N} (${_?.size?.x},${_?.size?.y}) parent: ${_.id} width: ${T}${u}`),_.size){let z=T/2;m.size.x=E+u+z,r.debug(`abc91 layout blocks (calc) px, pyid:${m.id} startingPos=X${E} new startingPosX${m.size.x} ${z} padding=${u} width=${T} halfWidth=${z} => x:${m.size.x} y:${m.size.y} ${m.widthInColumns} (width * (child?.w || 1)) / 2 ${T*(m?.widthInColumns??1)/2}`),E=m.size.x+z;let R=d.get(N)??0,S=i.get(N)??k;m.size.y=_.size.y-_.size.height/2+R+S/2+u,r.debug(`abc88 layout blocks (calc) px, pyid:${m.id}startingPosX${E}${u}${z}=>x:${m.size.x}y:${m.size.y}${m.widthInColumns}(width * (child?.w || 1)) / 2${T*(m?.widthInColumns??1)/2}`)}if(m.children)ye(m,l,u);let v=m?.widthInColumns??1;if(n>0)v=Math.min(v,n-w%n);w+=v,r.debug("abc88 columnsPos",m,w)}}r.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}e(ye,"layoutBlocks");function we(t,{minX:l,minY:u,maxX:n,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:f,y:i,width:d,height:w}=t.size;if(f-d/2<l)l=f-d/2;if(i-w/2<u)u=i-w/2;if(f+d/2>n)n=f+d/2;if(i+w/2>g)g=i+w/2}if(t.children)for(let f of t.children)({minX:l,minY:u,maxX:n,maxY:g}=we(f,{minX:l,minY:u,maxX:n,maxY:g}));return{minX:l,minY:u,maxX:n,maxY:g}}e(we,"findBounds");function We(t){let l=t.getBlock("root");if(!l)return;let u=s()?.block?.padding??8;te(l,t,0,0,u),ye(l,t,u),r.debug("getBlocks",JSON.stringify(l,null,2));let{minX:n,minY:g,maxX:f,maxY:i}=we(l),d=i-g,w=f-n;return{x:n,y:g,width:w,height:d}}e(We,"layout");function Ee(t,l,u=!1){let n=t,g="default";if((n?.classes?.length||0)>0)g=(n?.classes??[]).join(" ");g=g+" flowchart-label";let f=(n?.classes??[]).flatMap((k)=>l.getClasses().get(k)?.styles??[]),i=0,d="rect",w;switch(n.type){case"round":i=5,d="rect";break;case"composite":i=0,d="composite",w=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}let E=Qa(n?.styles??[]),L=n.label,m=n.size??{width:0,height:0,x:0,y:0},_=l.getDiagramId();return{labelStyle:E.labelStyle,shape:d,label:L,labelText:L,rx:i,ry:i,class:g,cssClasses:g,cssStyles:n?.styles??[],cssCompiledStyles:f,style:E.style,id:n.id,domId:_?`${_}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:m.width||void 0,height:m.height||void 0,wrappingWidth:m.width||Number.POSITIVE_INFINITY,x:m.x,y:m.y,positioned:u,intersect:void 0,padding:w??b()?.block?.padding??0,widthInColumns:n.widthInColumns??1,colorIndex:n.colorIndex,look:b().look}}e(Ee,"getNodeFromBlock");async function Ve(t,l,u){let n=Ee(l,u,!1);if(l.type==="group")return;let g=b(),f=await St(t,n,{config:g}),i=f.node()?.getBBox()??{width:0,height:0},d=u.getBlock(n.id);d.size={width:i.width,height:i.height,x:0,y:0,node:f},u.setBlock(d),f.remove()}e(Ve,"calculateBlockSize");async function Ue(t,l,u){let n=Ee(l,u,!0);if(u.getBlock(n.id).type!=="space"){let f=b(),i=await St(t,n,{config:f});if(n.colorIndex!==void 0)Ze(i,n.colorIndex,f.theme,f.themeVariables?.borderColorArray);l.intersect=n?.intersect,ht(n)}}e(Ue,"insertBlockPositioned");async function re(t,l,u,n){for(let g of l)if(await n(t,g,u),g.children)await re(t,g.children,u,n)}e(re,"performOperations");async function He(t,l,u){await re(t,l,u,Ve)}e(He,"calculateBlockSizes");async function Xe(t,l,u){await re(t,l,u,Ue)}e(Xe,"insertBlocks");async function Ge(t,l,u,n,g){let f=new Q({multigraph:!0,compound:!0});f.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let i of u)if(i.size)f.setNode(i.id,{width:i.size.width,height:i.size.height,intersect:i.intersect});for(let i of l)if(i.start&&i.end){let d=n.getBlock(i.start),w=n.getBlock(i.end);if(d?.size&&w?.size){let E=d.size,L=w.size,m=[{x:E.x,y:E.y},{x:E.x+(L.x-E.x)/2,y:E.y+(L.y-E.y)/2},{x:L.x,y:L.y}],_=g?`${g}-${i.id}`:i.id,T=i.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",k=i.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",I=`${T} ${k} flowchart-link LS-a1 LE-b1`;if(Jt(t,{...i,id:_,arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:m,classes:I},{},"block",f.node(i.start),f.node(i.end),g),i.label)await Tt(t,{...i,label:i.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:m,classes:I}),Hn({...i,x:m[1].x,y:m[1].y},{originalPath:m})}}}e(Ge,"insertEdges");var Ct=e(function(t,l){return l.db.getClasses()},"getClasses"),vt=e(async function(t,l,u,n){let{securityLevel:g,block:f}=b(),i=n.db;i.setDiagramId(l);let d;if(g==="sandbox")d=p("#i"+l);let w=g==="sandbox"?p(d.nodes()[0].contentDocument.body):p("body"),E=g==="sandbox"?w.select(`[id="${l}"]`):p(`[id="${l}"]`);Da(E,b()),Yn(E,["point","circle","cross"],n.type,l);let m=i.getBlocks(),_=i.getBlocksFlat(),T=i.getEdges(),k=E.insert("g").attr("class","block");await He(k,m,i);let I=We(i);await Xe(k,m,i),await Ge(k,T,_,i,l);let N=k.node()?.getBBox(),v=N&&Number.isFinite(N.width)&&Number.isFinite(N.height)?N:I;if(v){let z=Math.max(1,Math.round(0.125*(v.width/v.height))),R=v.height+z+10,S=v.width+10,{useMaxWidth:o}=f;B(E,R,S,!!o),r.debug("Here Bounds",I,v),E.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),At={draw:vt,getClasses:Ct},nr={parser:rt,db:Et,renderer:At,styles:Nt};export{nr as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{W}from"./chunk-
|
|
1
|
+
import{W}from"./chunk-89fkdgbp.js";import{e,r,D,b,B,C,S,E,T,A,I,L,V,U}from"./chunk-vymqrpm3.js";import{X}from"./chunk-n8gfjj9a.js";var M=D.packet,F=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T}static{e(this,"PacketDB")}getConfig(){let t=U({...M,...b().packet});if(t.showBits)t.paddingY+=10;return t}getPacket(){return this.packet}pushWord(t){if(t.length>0)this.packet.push(t)}clear(){C(),this.packet=[]}},Y=1e4,O=e((t,a)=>{W(t,a);let i=-1,s=[],l=1,{bitsPerRow:d}=a.getConfig();for(let{start:o,end:n,bits:g,label:f}of t.blocks){if(o!==void 0&&n!==void 0&&n<o)throw Error(`Packet block ${o} - ${n} is invalid. End must be greater than start.`);if(o??=i+1,o!==i+1)throw Error(`Packet block ${o} - ${n??o} is not contiguous. It should start from ${i+1}.`);if(g===0)throw Error(`Packet block ${o} is invalid. Cannot have a zero bit field.`);n??=o+(g??1)-1,g??=n-o+1,i=n,r.debug(`Packet block ${o} - ${i} with label ${f}`);while(s.length<=d+1&&a.getPacket().length<Y){let[p,h]=j({start:o,end:n,bits:g,label:f},l,d);if(s.push(p),p.end+1===l*d)a.pushWord(s),s=[],l++;if(!h)break;({start:o,end:n,bits:g,label:f}=h)}}a.pushWord(s)},"populate"),j=e((t,a,i)=>{if(t.start===void 0)throw Error("start should have been set during first phase");if(t.end===void 0)throw Error("end should have been set during first phase");if(t.start>t.end)throw Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=a*i)return[t,void 0];let s=a*i-1,l=a*i;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:l,end:t.end,label:t.label,bits:t.end-l}]},"getNextFittingBlock"),P={parser:{yy:void 0},parse:e(async(t)=>{let a=await X("packet",t),i=P.parser?.yy;if(!(i instanceof F))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");r.debug(a),O(a,i)},"parse")},G=e((t,a,i,s)=>{let l=s.db,d=l.getConfig(),{rowHeight:o,paddingY:n,bitWidth:g,bitsPerRow:f}=d,p=l.getPacket(),h=l.getDiagramTitle(),w=o+n,c=w*(p.length+1)-(h?0:o),k=g*f+2,m=V(a);m.attr("viewBox",`0 0 ${k} ${c}`),B(m,c,k,d.useMaxWidth);for(let[y,u]of p.entries())H(m,u,y,d);m.append("text").text(h).attr("x",k/2).attr("y",c-w/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),H=e((t,a,i,{rowHeight:s,paddingX:l,paddingY:d,bitWidth:o,bitsPerRow:n,showBits:g,bitOrder:f})=>{let p=t.append("g"),h=i*(s+d)+d,w=f==="descending";for(let c of a){let k=c.end-c.start+1,m=c.start%n,u=(w?n-m-k:m)*o+1,v=k*o-l;if(p.append("rect").attr("x",u).attr("y",h).attr("width",v).attr("height",s).attr("class","packetBlock"),p.append("text").attr("x",u+v/2).attr("y",h+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),!g)continue;let[_,N]=w?[c.end,c.start]:[c.start,c.end],x=k===1,z=h-2;if(p.append("text").attr("x",u+(x?v/2:0)).attr("y",z).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",x?"middle":"start").text(_),!x)p.append("text").attr("x",u+v).attr("y",z).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(N)}},"drawWord"),K={draw:G},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=e(({packet:t}={})=>{let a=U(q,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${a.byteFontSize};
|
|
4
4
|
}
|
|
@@ -21,4 +21,4 @@ import{W}from"./chunk-b1pe46zz.js";import{e,r,D,b,B,C,S,E,T,A,I,L,q,U}from"./chu
|
|
|
21
21
|
stroke-width: ${a.blockStrokeWidth};
|
|
22
22
|
fill: ${a.blockFillColor};
|
|
23
23
|
}
|
|
24
|
-
`},"styles"),ot={parser:P,get db(){return new F},renderer:K,styles:
|
|
24
|
+
`},"styles"),ot={parser:P,get db(){return new F},renderer:K,styles:J};export{ot as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e,r,B}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e,r,B}from"./chunk-vymqrpm3.js";var se=e((t,i,o,n)=>{t.attr("class",o);let{width:h,height:a,x:w,y:x}=u(t,i);B(t,a,h,n);let c=m(w,x,h,a,i);t.attr("viewBox",c),r.debug(`viewBox configured: ${c} with padding: ${i}`)},"setupViewPortForSVG"),u=e((t,i)=>{let o=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:o.width+i*2,height:o.height+i*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),m=e((t,i,o,n,h)=>`${t-h} ${i-h} ${o} ${n}`,"createViewBox");
|
|
2
|
+
export{se};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
|
|
2
|
-
<title>Basalt</title>
|
|
3
|
-
<style>
|
|
4
|
-
.a { fill: #2D343A } .b { fill: #4C525A } .c { fill: #22272A }
|
|
5
|
-
@media (prefers-color-scheme: dark) { .a { fill: #AAB2B9 } .b { fill: #DFE3E6 } .c { fill: #858E96 } }
|
|
6
|
-
</style>
|
|
7
|
-
<g transform="translate(-566 -72)">
|
|
8
|
-
<path class="a" d="M608 369 641 220Q644 201 661 192L802 124Q819 115 836 124L949 181Q956 184 952 192L897 302Q895 307 890 312L806 387Q802 391 797 394L677 463Q672 467 668 462L618 400Q605 386 608 369Z"/>
|
|
9
|
-
<path class="b" d="M967 198Q969 192 975 195L1015 217Q1028 224 1029 239L1031 300Q1031 306 1025 306H922Q914 306 918 298Z"/>
|
|
10
|
-
<path class="c" d="M908 321H1028Q1034 321 1034 327L1035 394Q1036 405 1029 414L927 530Q922 536 917 530L822 404Q818 398 824 393L901 324Q904 321 908 321Z"/>
|
|
11
|
-
<path class="c" d="M800 410Q805 406 809 411L899 529Q903 536 896 537H748Q729 537 718 524L686 486Q681 479 689 475Z"/>
|
|
12
|
-
</g>
|
|
13
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
|
|
2
|
+
<title>Basalt</title>
|
|
3
|
+
<style>
|
|
4
|
+
.a { fill: #2D343A } .b { fill: #4C525A } .c { fill: #22272A }
|
|
5
|
+
@media (prefers-color-scheme: dark) { .a { fill: #AAB2B9 } .b { fill: #DFE3E6 } .c { fill: #858E96 } }
|
|
6
|
+
</style>
|
|
7
|
+
<g transform="translate(-566 -72)">
|
|
8
|
+
<path class="a" d="M608 369 641 220Q644 201 661 192L802 124Q819 115 836 124L949 181Q956 184 952 192L897 302Q895 307 890 312L806 387Q802 391 797 394L677 463Q672 467 668 462L618 400Q605 386 608 369Z"/>
|
|
9
|
+
<path class="b" d="M967 198Q969 192 975 195L1015 217Q1028 224 1029 239L1031 300Q1031 306 1025 306H922Q914 306 918 298Z"/>
|
|
10
|
+
<path class="c" d="M908 321H1028Q1034 321 1034 327L1035 394Q1036 405 1029 414L927 530Q922 536 917 530L822 404Q818 398 824 393L901 324Q904 321 908 321Z"/>
|
|
11
|
+
<path class="c" d="M800 410Q805 406 809 411L899 529Q903 536 896 537H748Q729 537 718 524L686 486Q681 479 689 475Z"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
package/web/icon.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
|
|
2
|
-
<title>Basalt</title>
|
|
3
|
-
<style>
|
|
4
|
-
.a { fill: #2D343A } .b { fill: #4C525A } .c { fill: #22272A }
|
|
5
|
-
@media (prefers-color-scheme: dark) { .a { fill: #AAB2B9 } .b { fill: #DFE3E6 } .c { fill: #858E96 } }
|
|
6
|
-
</style>
|
|
7
|
-
<g transform="translate(-566 -72)">
|
|
8
|
-
<path class="a" d="M608 369 641 220Q644 201 661 192L802 124Q819 115 836 124L949 181Q956 184 952 192L897 302Q895 307 890 312L806 387Q802 391 797 394L677 463Q672 467 668 462L618 400Q605 386 608 369Z"/>
|
|
9
|
-
<path class="b" d="M967 198Q969 192 975 195L1015 217Q1028 224 1029 239L1031 300Q1031 306 1025 306H922Q914 306 918 298Z"/>
|
|
10
|
-
<path class="c" d="M908 321H1028Q1034 321 1034 327L1035 394Q1036 405 1029 414L927 530Q922 536 917 530L822 404Q818 398 824 393L901 324Q904 321 908 321Z"/>
|
|
11
|
-
<path class="c" d="M800 410Q805 406 809 411L899 529Q903 536 896 537H748Q729 537 718 524L686 486Q681 479 689 475Z"/>
|
|
12
|
-
</g>
|
|
13
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
|
|
2
|
+
<title>Basalt</title>
|
|
3
|
+
<style>
|
|
4
|
+
.a { fill: #2D343A } .b { fill: #4C525A } .c { fill: #22272A }
|
|
5
|
+
@media (prefers-color-scheme: dark) { .a { fill: #AAB2B9 } .b { fill: #DFE3E6 } .c { fill: #858E96 } }
|
|
6
|
+
</style>
|
|
7
|
+
<g transform="translate(-566 -72)">
|
|
8
|
+
<path class="a" d="M608 369 641 220Q644 201 661 192L802 124Q819 115 836 124L949 181Q956 184 952 192L897 302Q895 307 890 312L806 387Q802 391 797 394L677 463Q672 467 668 462L618 400Q605 386 608 369Z"/>
|
|
9
|
+
<path class="b" d="M967 198Q969 192 975 195L1015 217Q1028 224 1029 239L1031 300Q1031 306 1025 306H922Q914 306 918 298Z"/>
|
|
10
|
+
<path class="c" d="M908 321H1028Q1034 321 1034 327L1035 394Q1036 405 1029 414L927 530Q922 536 917 530L822 404Q818 398 824 393L901 324Q904 321 908 321Z"/>
|
|
11
|
+
<path class="c" d="M800 410Q805 406 809 411L899 529Q903 536 896 537H748Q729 537 718 524L686 486Q681 479 689 475Z"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
package/web/index.html
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
<base href="/" />
|
|
13
13
|
<title>Basalt</title>
|
|
14
14
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
15
|
-
<link rel="icon" href="./icon-
|
|
15
|
+
<link rel="icon" href="./icon-1wgy7kzy.svg" type="image/svg+xml" />
|
|
16
16
|
<link rel="apple-touch-icon" href="./apple-touch-icon-7dkm33qp.png" />
|
|
17
17
|
|
|
18
|
-
<link rel="stylesheet" crossorigin href="./chunk-
|
|
18
|
+
<link rel="stylesheet" crossorigin href="./chunk-qh15dxav.css"><script type="module" crossorigin src="./chunk-fhnypcrm.js"></script></head>
|
|
19
19
|
<body>
|
|
20
20
|
<div id="root"></div>
|
|
21
21
|
|
package/web/install.sh
CHANGED
|
File without changes
|
package/web/sw.js
CHANGED
|
@@ -41,6 +41,15 @@ self.addEventListener("fetch", (event) => {
|
|
|
41
41
|
try {
|
|
42
42
|
const response = await fetch(request)
|
|
43
43
|
if (response.ok) {
|
|
44
|
+
const copy = response.clone()
|
|
45
|
+
const html = await copy.text().catch(() => "")
|
|
46
|
+
// 检测到服务端处于 Bun 开发态(含 HMR 脚本标记)时,清理缓存并自卸载,交还给开发服务器直出
|
|
47
|
+
if (html.includes("data-bun-dev-server-script")) {
|
|
48
|
+
const keys = await caches.keys()
|
|
49
|
+
await Promise.all(keys.map((key) => caches.delete(key)))
|
|
50
|
+
await self.registration.unregister()
|
|
51
|
+
return response
|
|
52
|
+
}
|
|
44
53
|
const cache = await caches.open(CACHE_NAME)
|
|
45
54
|
void cache.put("/", response.clone())
|
|
46
55
|
}
|
package/worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$e,Tt,Kr,Ht,
|
|
2
|
+
import{$e,Tt,Kr,Ht,vi,Go,zo}from"./chunk-k23t7vhs.js";var S="backfill";function c(t){return t.query("SELECT sum((SELECT max(seq) FROM store.entries WHERE session_id = sessions.id)) AS n FROM store.sessions").get()?.n??0}function k(t){let e=Kr(t,S);return e?JSON.parse(e):void 0}function y(t,e){Ht(t,S,JSON.stringify(e))}class b{db;indexer;batch;todo;page;state;constructor(t,e,s=500){this.db=t;this.indexer=e;this.batch=s;this.todo=t.query("SELECT session_id FROM main.backfill_todo WHERE ord = ?"),this.page=t.query("SELECT seq, time, body FROM store.entries WHERE session_id = ? AND seq > ? ORDER BY seq LIMIT ?"),this.state=k(t)}get running(){return this.state?.state==="running"}begin(t){this.db.transaction(()=>{let e=this.db.query("SELECT max(id) AS id FROM store.search_queue").get()?.id??0;Ht(this.db,"queue_done",e),this.db.run("DELETE FROM main.backfill_todo"),this.db.run("INSERT INTO main.backfill_todo (ord, session_id) SELECT row_number() OVER (ORDER BY updated DESC, id), id FROM store.sessions");let s=this.db.query("SELECT count(*) AS n FROM main.backfill_todo").get()?.n??0,r=c(this.db);this.state={state:s?"running":"done",reason:t,ord:1,seq:-1,total:r,sessionsTotal:s,done:0,sessionsDone:0,startedAt:Date.now()},y(this.db,this.state)})()}step(t){let e=this.state;if(e?.state!=="running")return!1;let s={...e};return this.db.transaction(()=>{let r=this.batch;while(r>0&&s.state==="running"){let n=this.todo.get(s.ord)?.session_id;if(n===void 0){s.state="done",this.db.run("DELETE FROM main.backfill_todo");break}if(s.seq<0)this.indexer.reindex(n,0),s.seq=0;let a=this.page.all(n,s.seq,r);for(let i of a)if(this.indexer.indexRow(n,i.seq,i.time,i.body),s.seq=i.seq,s.done++,r--,performance.now()>t){r=0;break}if(r>0)s.ord++,s.seq=-1,s.sessionsDone++;if(performance.now()>t)break}y(this.db,s)})(),this.state=s,!0}}var T=2000,M=30000;class E{options;db;layout;reset;indexer;backfill;terms;queueRows;queueMax;sliceMs;backfillSliceMs;queueBatch;termRefreshMs;queueDone;termCursor;termStale;lastTermRefresh=Number.NEGATIVE_INFINITY;rateStart;estimate;closed=!1;constructor(t){this.options=t;let e=vi(t.indexPath,t.storePath,t.features);if(this.db=e.db,this.layout=e.layout,this.reset=e.reset,this.sliceMs=t.sliceMs??20,this.backfillSliceMs=t.backfillSliceMs??200,this.queueBatch=t.queueBatch??200,this.termRefreshMs=t.termRefreshMs??60000,this.indexer=new Go(this.db,this.layout),this.terms=new zo(this.db),this.backfill=new b(this.db,this.indexer,t.batch??500),this.queueRows=this.db.query("SELECT id, session_id, seq FROM store.search_queue WHERE id > ? ORDER BY id LIMIT ?"),this.queueMax=this.db.query("SELECT max(id) AS id FROM store.search_queue"),!this.backfill.state)this.backfill.begin(this.reset?"rebuild":"initial");this.queueDone=Number(Kr(this.db,"queue_done")??0),this.termStale=Number(Kr(this.db,"term_stale")??0)===1}step(t){if(this.closed)return!1;if(this.drainQueue(t??performance.now()+this.sliceMs))return!0;if(this.backfill.running){this.rateStart??={time:performance.now(),done:this.backfill.state?.done??0};let e=this.indexer.outChanges;if(this.backfill.step(t??performance.now()+this.backfillSliceMs),this.markTerms(e),!this.backfill.running)this.lastTermRefresh=Number.NEGATIVE_INFINITY;return!0}return this.refreshTerms(t??performance.now()+this.sliceMs)}drain(){while(this.step());}drainQueue(t){let e=!1;return this.db.transaction(()=>{let s=this.queueRows.all(this.queueDone,this.queueBatch);if(!s.length)return;e=!0;let r=this.indexer.outChanges,n=new Set,a=this.queueDone;for(let i of s){let h=`${i.seq}\x00${i.session_id}`;if(!n.has(h))n.add(h),this.indexer.reindex(i.session_id,i.seq);if(a=i.id,performance.now()>t)break}Ht(this.db,"queue_done",a),this.markTerms(r),this.queueDone=a})(),e}markTerms(t){if(this.indexer.outChanges===t||this.termStale)return;this.termStale=!0,Ht(this.db,"term_stale",1)}refreshTerms(t){if(this.termCursor===void 0){if(!this.termStale||performance.now()-this.lastTermRefresh<this.termRefreshMs)return!1;this.termCursor="",this.termStale=!1,this.indexer.outChanges=0,Ht(this.db,"term_stale",0)}while(this.termCursor!==void 0&&performance.now()<=t){let e=this.termCursor;this.db.transaction(()=>{this.termCursor=this.terms.step(e,T)})()}if(this.termCursor===void 0)this.lastTermRefresh=performance.now();return!0}status(){let t=this.queueMax.get()?.id??this.queueDone,e=this.backfill.state,s;if(e?.state==="running"&&this.rateStart){let n=(performance.now()-this.rateStart.time)/1000,a=(e.done-this.rateStart.done)/n;if(n>0.5&&a>0)s=Math.max(0,Math.round(Math.max(0,e.total-e.done)/a))}let r=e?{state:e.state,reason:e.reason,total:e.total,done:e.done,sessionsTotal:e.sessionsTotal,sessionsDone:e.sessionsDone,startedAt:e.startedAt}:void 0;if(!this.estimate||performance.now()-this.estimate.time>M)this.estimate={time:performance.now(),entries:c(this.db)};return{queueDone:this.queueDone,lag:Math.max(0,t-this.queueDone),entries:this.estimate.entries,...r?{backfill:r}:{},...s!==void 0?{etaSec:s}:{},layout:this.layout,reset:this.reset}}withIndex(t){return t(this.db)}close(){if(this.closed)return;this.closed=!0,this.db.close()}}var g=1000,x=100;function R(t){let e,s,r,n=!1,a=!1,i=0,h=[],l=(u)=>t.postMessage(u),d=(u)=>{if(a)return;if(r)clearTimeout(r);r=setTimeout(q,u)},p=()=>{if(!s||Atomics.load(s,$e)!==1)return;Atomics.store(s,Tt,1),Atomics.notify(s,Tt);while(Atomics.load(s,$e)===1)Atomics.wait(s,$e,1,1e4);Atomics.store(s,Tt,0)};function q(){if(r=void 0,a||!e)return;p();let u=!1;try{u=e.step()}catch(f){l({type:"error",message:f instanceof Error?f.message:String(f),fatal:!1}),n=!1,d(g);return}let o=performance.now();if(u){if(n=!0,o-i>=x)i=o,l({type:"status",status:e.status()});d(0);return}n=!1,i=o;let m=e.status();l({type:"status",status:m});for(let f of h.splice(0))l({type:"flushed",id:f,status:m});d(g)}t.onmessage=(u)=>{let o=u.data;if(o.type==="init"){s=new Int32Array(o.flags);try{e=new E(o.options)}catch(m){l({type:"error",message:m instanceof Error?m.message:String(m),fatal:!0});return}l({type:"status",status:e.status()}),d(0)}else if(o.type==="dirty"){if(!n)d(0)}else if(o.type==="pause")p();else if(o.type==="flush"){if(h.push(o.id),!n)d(0)}else if(o.type==="stop"){if(a=!0,r)clearTimeout(r);e?.close(),l({type:"stopped"})}}}if(!Bun.isMainThread)R(globalThis);export{E as SearchEngine};
|
package/chunk-09vr609h.js
DELETED
package/chunk-58vz2qsq.js
DELETED
package/chunk-c25s4w6a.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{i,t}from"./chunk-qnr1f5pj.js";var R=t(function(m){Object.defineProperty(m,"__esModule",{value:!0});m.Allow=m.ALL=m.COLLECTION=m.ATOM=m.SPECIAL=m.INF=m._INFINITY=m.INFINITY=m.NAN=m.BOOL=m.NULL=m.OBJ=m.ARR=m.NUM=m.STR=void 0;m.STR=1;m.NUM=2;m.ARR=4;m.OBJ=8;m.NULL=16;m.BOOL=32;m.NAN=64;m.INFINITY=128;m._INFINITY=256;m.INF=m.INFINITY|m._INFINITY;m.SPECIAL=m.NULL|m.BOOL|m.INF|m.NAN;m.ATOM=m.STR|m.NUM|m.SPECIAL;m.COLLECTION=m.ARR|m.OBJ;m.ALL=m.ATOM|m.COLLECTION;m.Allow={STR:m.STR,NUM:m.NUM,ARR:m.ARR,OBJ:m.OBJ,NULL:m.NULL,BOOL:m.BOOL,NAN:m.NAN,INFINITY:m.INFINITY,_INFINITY:m._INFINITY,INF:m.INF,SPECIAL:m.SPECIAL,ATOM:m.ATOM,COLLECTION:m.COLLECTION,ALL:m.ALL};m.default=m.Allow});var W=t(function(o){var G=o&&o.__createBinding||(Object.create?function(r,s,u,e){if(e===void 0)e=u;var c=Object.getOwnPropertyDescriptor(s,u);if(!c||("get"in c?!s.__esModule:c.writable||c.configurable))c={enumerable:!0,get:function(){return s[u]}};Object.defineProperty(r,e,c)}:function(r,s,u,e){if(e===void 0)e=u;r[e]=s[u]}),H=o&&o.__exportStar||function(r,s){for(var u in r)if(u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u))G(s,r,u)};Object.defineProperty(o,"__esModule",{value:!0});o.Allow=o.MalformedJSON=o.PartialJSON=o.parseJSON=o.parse=void 0;var n=R();Object.defineProperty(o,"Allow",{enumerable:!0,get:function(){return n.Allow}});H(R(),o);class B extends Error{}o.PartialJSON=B;class P extends Error{}o.MalformedJSON=P;function v(r,s=n.Allow.ALL){if(typeof r!=="string")throw TypeError(`expecting str, got ${typeof r}`);if(!r.trim())throw Error(`${r} is empty`);return K(r.trim(),s)}o.parseJSON=v;var K=(r,s)=>{let u=r.length,e=0,c=(a)=>{throw new B(`${a} at position ${e}`)},p=(a)=>{throw new P(`${a} at position ${e}`)},l=()=>{if(O(),e>=u)c("Unexpected end of input");if(r[e]==='"')return U();if(r[e]==="{")return D();if(r[e]==="[")return q();if(r.substring(e,e+4)==="null"||n.Allow.NULL&s&&u-e<4&&"null".startsWith(r.substring(e)))return e+=4,null;if(r.substring(e,e+4)==="true"||n.Allow.BOOL&s&&u-e<4&&"true".startsWith(r.substring(e)))return e+=4,!0;if(r.substring(e,e+5)==="false"||n.Allow.BOOL&s&&u-e<5&&"false".startsWith(r.substring(e)))return e+=5,!1;if(r.substring(e,e+8)==="Infinity"||n.Allow.INFINITY&s&&u-e<8&&"Infinity".startsWith(r.substring(e)))return e+=8,1/0;if(r.substring(e,e+9)==="-Infinity"||n.Allow._INFINITY&s&&1<u-e&&u-e<9&&"-Infinity".startsWith(r.substring(e)))return e+=9,-1/0;if(r.substring(e,e+3)==="NaN"||n.Allow.NAN&s&&u-e<3&&"NaN".startsWith(r.substring(e)))return e+=3,NaN;return V()},U=()=>{let a=e,f=!1;e++;while(e<u&&(r[e]!=='"'||f&&r[e-1]==="\\"))f=r[e]==="\\"?!f:!1,e++;if(r.charAt(e)=='"')try{return JSON.parse(r.substring(a,++e-Number(f)))}catch(N){p(String(N))}else if(n.Allow.STR&s)try{return JSON.parse(r.substring(a,e-Number(f))+'"')}catch(N){return JSON.parse(r.substring(a,r.lastIndexOf("\\"))+'"')}c("Unterminated string literal")},D=()=>{e++,O();let a={};try{while(r[e]!=="}"){if(O(),e>=u&&n.Allow.OBJ&s)return a;let f=U();O(),e++;try{let N=l();a[f]=N}catch(N){if(n.Allow.OBJ&s)return a;else throw N}if(O(),r[e]===",")e++}}catch(f){if(n.Allow.OBJ&s)return a;else c("Expected '}' at end of object")}return e++,a},q=()=>{e++;let a=[];try{while(r[e]!=="]")if(a.push(l()),O(),r[e]===",")e++}catch(f){if(n.Allow.ARR&s)return a;c("Expected ']' at end of array")}return e++,a},V=()=>{if(e===0){if(r==="-")p("Not sure what '-' is");try{return JSON.parse(r)}catch(f){if(n.Allow.NUM&s)try{return JSON.parse(r.substring(0,r.lastIndexOf("e")))}catch(N){}p(String(f))}}let a=e;if(r[e]==="-")e++;while(r[e]&&",]}".indexOf(r[e])===-1)e++;if(e==u&&!(n.Allow.NUM&s))c("Unterminated number literal");try{return JSON.parse(r.substring(a,e))}catch(f){if(r.substring(a,e)==="-")c("Not sure what '-' is");try{return JSON.parse(r.substring(a,r.lastIndexOf("e")))}catch(N){p(String(N))}}},O=()=>{while(e<u&&`
|
|
3
|
-
\r `.includes(r[e]))e++};return l()},Q=v;o.parse=Q});var M=i(W(),1),X=new Set(['"',"\\","/","b","f","n","r","t","u"]);function Z(r){let s=r.codePointAt(0);return s!==void 0&&s>=0&&s<=31}function S(r){switch(r){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
4
|
-
`:return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:return`\\u${r.codePointAt(0)?.toString(16).padStart(4,"0")??"0000"}`}}function No(r){let s="",u=!1;for(let e=0;e<r.length;e++){let c=r[e];if(!u){if(s+=c,c==='"')u=!0;continue}if(c==='"'){s+=c,u=!1;continue}if(c==="\\"){let p=r[e+1];if(p===void 0){s+="\\\\";continue}if(p==="u"){let l=r.slice(e+2,e+6);if(/^[0-9a-fA-F]{4}$/.test(l)){s+=`\\u${l}`,e+=5;continue}}if(X.has(p)){s+=`\\${p}`,e+=1;continue}s+="\\\\";continue}s+=Z(c)?S(c):c}return s}function zr(r){try{return JSON.parse(r)}catch(s){let u=No(r);if(u!==r)return JSON.parse(u);throw s}}function F(r){if(!r||r.trim()==="")return{};try{return zr(r)}catch{try{return M.parse(r)??{}}catch{try{return M.parse(No(r))??{}}catch{return{}}}}}
|
|
5
|
-
export{No,zr,F};
|
package/chunk-t057xfrt.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{X,B}from"./chunk-k7w7ac9q.js";import{t,p}from"./chunk-qnr1f5pj.js";var Fe=t(function(me){var{hasOwn:Q}=X(),{streamCollector:ne}=X();me.streamCollector=ne;var{buildQueryString:J,HttpResponse:G}=B(),A=p("https"),{Readable:se}=p("stream"),O=p("http2");function M(e){let o=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(o){if(o instanceof Error){let r=Error("Request aborted");return r.name="AbortError",r.cause=o,r}let s=Error(String(o));return s.name="AbortError",s}let n=Error("Request aborted");return n.name="AbortError",n}var re=["ECONNRESET","EPIPE","ETIMEDOUT"],Y=(e)=>{let o={};for(let n in e){if(!Q(e,n))continue;let s=e[n];o[n]=Array.isArray(s)?s.join(","):s}return o},l={setTimeout:(e,o)=>setTimeout(e,o),clearTimeout:(e)=>clearTimeout(e)},j=1000,ie=(e,o,n=0)=>{if(!n)return-1;let s=(r)=>{let c=l.setTimeout(()=>{e.destroy(),o(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:"TimeoutError"}))},n-r),a=(u)=>{if(u?.connecting)u.on("connect",()=>{l.clearTimeout(c)});else l.clearTimeout(c)};if(e.socket)a(e.socket);else e.on("socket",a)};if(n<2000)return s(0),0;return l.setTimeout(s.bind(null,j),j)},ce=(e,o,n=0,s,r)=>{if(n)return l.setTimeout(()=>{let c=`@smithy/node-http-handler - [${s?"ERROR":"WARN"}] a request has exceeded the configured ${n} ms requestTimeout.`;if(s){let a=Object.assign(Error(c),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(a),o(a)}else c+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",r?.warn?.(c)},n);return-1},ae=3000,ue=(e,{keepAlive:o,keepAliveMsecs:n},s=ae)=>{if(o!==!0)return-1;let r=()=>{if(e.socket)e.socket.setKeepAlive(o,n||0);else e.on("socket",(c)=>{c.setKeepAlive(o,n||0)})};if(s===0)return r(),0;return l.setTimeout(r,s)},W=3000,fe=(e,o,n=0)=>{let s=(r)=>{let c=n-r,a=()=>{e.destroy(),o(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(c,a),e.on("close",()=>e.socket?.removeListener("timeout",a));else e.setTimeout(c,a)};if(0<n&&n<6000)return s(0),0;return l.setTimeout(s.bind(null,n===0?0:W),W)},z=6000;async function Z(e,o,n=z,s=!1){let r=o.headers,c=r?r.Expect||r.expect:void 0,a=-1,u=!0;if(!s&&c==="100-continue")u=await Promise.race([new Promise((f)=>{a=Number(l.setTimeout(()=>f(!0),Math.max(z,n)))}),new Promise((f)=>{e.on("continue",()=>{l.clearTimeout(a),f(!0)}),e.on("response",()=>{l.clearTimeout(a),f(!1)}),e.on("error",()=>{l.clearTimeout(a),f(!1)})})]);if(u)de(e,o.body)}function de(e,o){if(o instanceof se){o.pipe(e);return}if(o){let n=Buffer.isBuffer(o);if(n||typeof o==="string"){if(n&&o.byteLength===0)e.end();else e.end(o);return}let r=o;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(o));return}e.end()}var he=0,L=void 0,V=void 0;class U{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function")return e;return new U(e)}static checkSocketUsage(e,o,n=console){let{sockets:s,requests:r,maxSockets:c}=e;if(typeof c!=="number"||c===1/0)return o;let a=15000;if(Date.now()-a<o)return o;if(s&&r)for(let u in s){if(!Q(s,u))continue;let f=s[u]?.length??0,m=r[u]?.length??0;if(f>=c&&m>=2*c)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${f} and ${m} additional requests are enqueued.
|
|
3
|
-
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
4
|
-
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return o}constructor(e){this.configProvider=new Promise((o,n)=>{if(typeof e==="function")e().then((s)=>{o(this.resolveDefaultConfig(s))}).catch(n);else o(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:o,requestTimeout:n}={}){if(!this.config)this.config=await this.configProvider;let s=this.config,r=s.logger,c=e.protocol==="https:";if(!c&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((a,u)=>{let f=void 0,m=-1,g=-1,w=-1,v=-1,C=-1,_=()=>{l.clearTimeout(m),l.clearTimeout(g),l.clearTimeout(w),l.clearTimeout(v),l.clearTimeout(C)},F=async(i)=>{await f,_(),a(i)},E=async(i)=>{await f,_(),u(i)};if(o?.aborted){let i=M(o);E(i);return}let D=e.headers,H=D?(D.Expect??D.expect)==="100-continue":!1,P=c?s.httpsAgent:s.httpAgent;if(H&&!this.externalAgent)P=new(c?A.Agent:L)({keepAlive:!1,maxSockets:1/0});m=l.setTimeout(()=>{this.socketWarningTimestamp=U.checkSocketUsage(P,this.socketWarningTimestamp,r)},s.socketAcquisitionWarningTimeout??(s.requestTimeout??2000)+(s.connectionTimeout??1000));let I=e.query?J(e.query):"",b=void 0;if(e.username!=null||e.password!=null){let i=e.username??"",d=e.password??"";b=`${i}:${d}`}let k=e.path;if(I)k+=`?${I}`;if(e.fragment)k+=`#${e.fragment}`;let y=e.hostname??"";if(y[0]==="["&&y.endsWith("]"))y=e.hostname.slice(1,-1);else y=e.hostname;let S={headers:e.headers,host:y,method:e.method,path:k,port:e.port,agent:P,auth:b},T=(c?A.request:V)(S,(i)=>{let d=new G({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:Y(i.headers),body:i});F({response:d})});if(T.on("error",(i)=>{if(re.includes(i.code))E(Object.assign(i,{name:"TimeoutError"}));else E(i)}),o){let i=()=>{T.destroy();let d=M(o);E(d)};if(typeof o.addEventListener==="function"){let d=o;d.addEventListener("abort",i,{once:!0}),T.once("close",()=>d.removeEventListener("abort",i))}else o.onabort=i}let R=n??s.requestTimeout;g=ie(T,E,s.connectionTimeout),w=ce(T,E,R,s.throwOnRequestTimeout,r??console),v=fe(T,E,s.socketTimeout);let h=S.agent;if(typeof h==="object"&&"keepAlive"in h)C=ue(T,{keepAlive:h.keepAlive,keepAliveMsecs:h.keepAliveMsecs});f=Z(T,e,R,this.externalAgent).catch((i)=>(_(),u(i)))})}updateHttpClientConfig(e,o){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{if(e===Symbol.for("logger"))return{...n,logger:n.logger??o};return{...n,[e]:o}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:o,connectionTimeout:n,socketTimeout:s,socketAcquisitionWarningTimeout:r,httpAgent:c,httpsAgent:a,throwOnRequestTimeout:u,logger:f}=e||{},m=!0,g=50;return{connectionTimeout:n,requestTimeout:o,socketTimeout:s,socketAcquisitionWarningTimeout:r,throwOnRequestTimeout:u,httpAgentProvider:async()=>{let w=p("http"),{Agent:v,request:C}=w.default??w;if(V=C,L=v,c instanceof L||typeof c?.destroy==="function")return this.externalAgent=!0,c;return new L({keepAlive:!0,maxSockets:50,...c})},httpsAgent:(()=>{if(a instanceof A.Agent||typeof a?.destroy==="function")return this.externalAgent=!0,a;return new A.Agent({keepAlive:!0,maxSockets:50,...a})})(),logger:f}}}var le=new Uint16Array(1);class N{id=le[0]++;total=0;max=0;session;refs=0;constructor(e){e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(this.session.destroyed)return;if(this.refs-=1,this.refs===0)this.session.unref();if(this.refs<0)throw Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){if(!this.session.closed)this.session.close()}destroy(){if(this.refs=0,!this.session.destroyed)this.session.setTimeout(0),this.session.destroy()}useCount(){return this.refs}}class ee{sessions=[];maxConcurrency=0;constructor(e){this.sessions=(e??[]).map((o)=>new N(o))}poll(){let e=!1;for(let o of this.sessions){if(o.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||o.useCount()<this.maxConcurrency)return o}if(e){for(let o of this.sessions)if(o.deref().destroyed)this.remove(o)}}offerLast(e){this.sessions.push(e)}remove(e){let o=this.sessions.indexOf(e);if(o>-1)this.sessions.splice(o,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}class te{config;connectOptions;connectionPools=new Map;constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(e,o){let n=this.getUrlString(e),s=this.getPool(n);if(!this.config.disableConcurrency&&!o.isEventStream){let f=s.poll();if(f)return f.retain(),f}let r=new N(this.connect(n)),c=r.deref();if(this.config.maxConcurrency)c.settings({maxConcurrentStreams:this.config.maxConcurrency},(f)=>{if(f)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});let a=()=>{this.removeFromPoolAndClose(n,r)},u=()=>{this.removeFromPoolAndCheckedDestroy(n,r)};if(c.on("goaway",a),c.on("error",u),c.on("frameError",u),c.on("close",u),o.requestTimeout)c.setTimeout(o.requestTimeout,u);return s.offerLast(r),r.retain(),r}release(e,o){o.free()}createIsolatedSession(e,o){let n=this.getUrlString(e),s=new N(this.connect(n)),r=s.deref();r.settings({maxConcurrentStreams:1});let c=()=>{s.destroy()};r.on("error",c),r.on("frameError",c),r.on("close",c);let a=o.requestTimeout??300000;return r.setTimeout(a,c),s.retain(),s}destroy(){for(let[e,o]of this.connectionPools){for(let n of[...o])n.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e;for(let o of this.connectionPools.values())o.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}setNodeHttp2ConnectOptions(e){this.connectOptions=e}debug(){let e={};for(let[o,n]of this.connectionPools){let s=[];for(let r of n)s.push({id:r.id,active:r.useCount(),maxConcurrent:r.max,totalRequests:r.total});e[o]={sessions:s}}return e}removeFromPoolAndClose(e,o){this.connectionPools.get(e)?.remove(o),o.close()}removeFromPoolAndCheckedDestroy(e,o){this.connectionPools.get(e)?.remove(o),o.destroy()}getPool(e){if(!this.connectionPools.has(e)){let o=new ee;if(this.config.maxConcurrency)o.setMaxConcurrency(this.config.maxConcurrency);this.connectionPools.set(e,o)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}connect(e){return this.connectOptions===void 0?O.connect(e):O.connect(e,this.connectOptions)}}var{constants:K}=O;class q{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new te({});static create(e){if(typeof e?.handle==="function")return e;return new q(e)}constructor(e){this.configProvider=new Promise((o,n)=>{if(typeof e==="function")e().then((s)=>{o(s||{})}).catch(n);else o(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:o,requestTimeout:n,isEventStream:s}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:f,maxConcurrentStreams:m,nodeHttp2ConnectOptions:g}=this.config;if(this.connectionManager.setDisableConcurrentStreams(f??!1),m)this.connectionManager.setMaxConcurrentStreams(m);if(g)this.connectionManager.setNodeHttp2ConnectOptions(g)}let{requestTimeout:r,disableConcurrentStreams:c}=this.config,a=c||s,u=n??r;return new Promise((f,m)=>{let g=!1,w=void 0,v=async(i)=>{await w,f(i)},C=async(i)=>{await w,m(i)};if(o?.aborted){g=!0;let i=M(o);C(i);return}let{hostname:_,method:F,port:E,protocol:D,query:H}=e,P="";if(e.username!=null||e.password!=null){let i=e.username??"",d=e.password??"";P=`${i}:${d}@`}let I=`${D}//${P}${_}${E?`:${E}`:""}`,b={destination:new URL(I)},k={requestTimeout:this.config?.sessionTimeout,isEventStream:s},y=a?this.connectionManager.createIsolatedSession(b,k):this.connectionManager.lease(b,k),S=y.deref(),x=(i)=>{if(a)y.destroy();g=!0,C(i)},T=H?J(H):"",R=e.path;if(T)R+=`?${T}`;if(e.fragment)R+=`#${e.fragment}`;let h=S.request({...e.headers,[K.HTTP2_HEADER_PATH]:R,[K.HTTP2_HEADER_METHOD]:F});if(u)h.setTimeout(u,()=>{h.close();let i=Error(`Stream timed out because of no activity for ${u} ms`);i.name="TimeoutError",x(i)});if(o){let i=()=>{h.close();let d=M(o);x(d)};if(typeof o.addEventListener==="function"){let d=o;d.addEventListener("abort",i,{once:!0}),h.once("close",()=>d.removeEventListener("abort",i))}else o.onabort=i}h.on("frameError",(i,d,oe)=>{x(Error(`Frame type id ${i} in stream id ${oe} has failed with code ${d}.`))}),h.on("error",x),h.on("aborted",()=>{x(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${h.rstCode}.`))}),h.on("response",(i)=>{let d=new G({statusCode:i[":status"]??-1,headers:Y(i),body:h});if(g=!0,v({response:d}),a)S.close(),h.on("end",()=>{y.destroy()})}),h.on("close",()=>{if(a)y.destroy();else this.connectionManager.release(b,y);if(!g){let i=Error("Unexpected error: http2 request did not get a response");if(S.destroyed)i.name="TimeoutError";x(i)}}),w=Z(h,e,u)})}updateHttpClientConfig(e,o){this.config=void 0,this.configProvider=this.configProvider.then((n)=>({...n,[e]:o}))}httpHandlerConfigs(){return this.config??{}}}me.DEFAULT_REQUEST_TIMEOUT=he;me.NodeHttp2Handler=q;me.NodeHttpHandler=U});
|
|
5
|
-
export{Fe};
|
package/chunk-wjd9fr23.js
DELETED