@bkm016/basalt 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-7jezts2n.js → chunk-06s9pr82.js} +2 -2
- package/{chunk-jpnf71q7.js → chunk-095adzn5.js} +2 -2
- package/chunk-0a7ft50x.js +18 -0
- package/{chunk-vjne04dp.js → chunk-0nedq669.js} +4 -4
- package/chunk-0x9netvr.js +5 -0
- package/{chunk-9as0p561.js → chunk-15ve3nmv.js} +11 -11
- package/chunk-1dbfmejf.js +2 -0
- package/{chunk-hbnmymaq.js → chunk-1q6e3mj7.js} +2 -2
- package/{chunk-85v69h91.js → chunk-22az84sh.js} +2 -2
- package/{chunk-w0rr66z7.js → chunk-2q56egb8.js} +1 -1
- package/{chunk-fhxy6y34.js → chunk-2tf7qfbx.js} +2 -2
- package/{chunk-nw1xpt3s.js → chunk-2zbj8ny6.js} +2 -2
- package/chunk-302n9g7p.js +2 -0
- package/{chunk-bk4rpnm8.js → chunk-37ndxehw.js} +2 -2
- package/chunk-41das1ty.js +2 -0
- package/{chunk-6mges89p.js → chunk-44a7f5ta.js} +5 -5
- package/{chunk-jn5pqy5v.js → chunk-46vy2m29.js} +1 -1
- package/{chunk-1zj3zvw5.js → chunk-4k9t9jvx.js} +4 -4
- package/{chunk-eq4wqxzt.js → chunk-4rnmxtpx.js} +2 -2
- package/{chunk-1xfv4bd7.js → chunk-4w9zqv0k.js} +1 -1
- package/chunk-6d9r9p91.js +20 -0
- package/chunk-6f4ht2hw.js +2 -0
- package/{chunk-jj4hqbrx.js → chunk-6sea12mw.js} +3 -3
- package/chunk-74wwdx3y.js +3 -0
- package/{chunk-w6f2r052.js → chunk-77c2cqp2.js} +1 -1
- package/chunk-7chv3knf.js +2 -0
- package/chunk-86yr2c0r.js +3 -0
- package/{chunk-6sz5q3df.js → chunk-8cgz8xv7.js} +2 -2
- package/{chunk-tvm4zmgj.js → chunk-959z9efn.js} +2 -2
- package/{chunk-eyrtbbdd.js → chunk-9e8vhzy7.js} +1 -1
- package/chunk-b516bp7n.js +3 -0
- package/chunk-bja7p3em.js +25 -0
- package/chunk-bng72094.js +2 -0
- package/{chunk-ksk49hv0.js → chunk-bp61xdsc.js} +1 -1
- package/chunk-bq54argx.js +2 -0
- package/chunk-ct77cdg7.js +2 -0
- package/{chunk-02d3x4mj.js → chunk-dk6fgprw.js} +3 -3
- package/chunk-drett6hb.js +2 -0
- package/{chunk-4gtgqcct.js → chunk-edbq461k.js} +3 -3
- package/{chunk-p2pmdbt2.js → chunk-f0h2bv11.js} +12 -12
- package/{chunk-8mezk0cb.js → chunk-g2etemv5.js} +2 -2
- package/{chunk-n0ybj4h9.js → chunk-g5p9mj1r.js} +2 -2
- package/{chunk-fy82qxa1.js → chunk-gpnqmtbk.js} +1 -1
- package/{chunk-kpe7pnhy.js → chunk-h9zxqeqr.js} +4 -4
- package/{chunk-qfcr5g35.js → chunk-jjtt9aq8.js} +3 -3
- package/{chunk-5wnmbc1b.js → chunk-kbpbrr11.js} +2 -2
- package/chunk-m71pj3g1.js +2 -0
- package/chunk-mdkfm1ak.js +7 -0
- package/chunk-mf04h0yy.js +7 -0
- package/chunk-n22vd4at.js +2 -0
- package/{chunk-v7wcchy2.js → chunk-nbjnwd54.js} +1 -1
- package/{chunk-1h34mzh7.js → chunk-pryvvs96.js} +22 -22
- package/{chunk-2kxnw7vs.js → chunk-r1jn77q6.js} +2 -2
- package/{chunk-ypqjfv3a.js → chunk-rn3jwyh1.js} +2 -2
- package/chunk-sgrrxsnz.js +482 -0
- package/chunk-sgz87ht5.js +2 -0
- package/{chunk-stj493dn.js → chunk-snz19yc2.js} +2 -2
- package/{chunk-qs8zzg50.js → chunk-szj85dqe.js} +2 -2
- package/{chunk-nrsd810j.js → chunk-tfhp09nj.js} +2 -2
- package/{chunk-hc300148.js → chunk-tfhze1vq.js} +2 -2
- package/{chunk-01nve4qy.js → chunk-tjg0gcks.js} +1 -1
- package/{chunk-cbgpymt4.js → chunk-tnj2kqb8.js} +1 -1
- package/{chunk-3pf1d62g.js → chunk-vqm94hz2.js} +2 -2
- package/{chunk-82v8jh1h.js → chunk-xvm0y99b.js} +2 -2
- package/{chunk-rwks9zaw.js → chunk-y23dpz5e.js} +2 -2
- package/{chunk-ejjem0tc.js → chunk-y4pvhes1.js} +6 -6
- package/{chunk-bwawt15q.js → chunk-ydzag81d.js} +2 -2
- package/chunk-ymg7mtcx.js +3 -0
- package/chunk-yy1f9jxc.js +4044 -0
- package/{chunk-ntks40jd.js → chunk-z0c8ek0j.js} +5 -5
- package/chunk-zk91579b.js +3 -0
- package/{chunk-0fc9apfn.js → chunk-zx75vnw8.js} +18 -18
- package/compiled.js +85 -12
- package/package.json +1 -1
- package/ui-test-worker.js +53 -53
- package/web/{chunk-aeymdtm1.js → chunk-0jbf73pr.js} +3 -3
- package/web/{chunk-7vgh17es.js → chunk-0rhx7qb8.js} +1 -1
- package/web/{chunk-7adsmqv6.js → chunk-0rvwj2wh.js} +2 -2
- package/web/chunk-12qf1r6m.js +1 -0
- package/web/{chunk-dndd757x.js → chunk-14vmr99v.js} +3 -3
- package/web/{chunk-4f6a8dsk.js → chunk-16jc5m0f.js} +1 -1
- package/web/{chunk-bra33pt0.js → chunk-1m6fx2h7.js} +2 -2
- package/web/{chunk-hva7xyne.js → chunk-1xm9x7d6.js} +1 -1
- package/web/{chunk-8539865x.js → chunk-20jxvmbw.js} +1 -1
- package/web/chunk-2n5xbnrt.js +1 -0
- package/web/{chunk-bygwbpvq.js → chunk-2sef2wft.js} +2 -2
- package/web/{chunk-w9gnqkez.js → chunk-2x7vmhm0.js} +2 -2
- package/web/{chunk-19zd0tye.js → chunk-2y1avvqj.js} +8 -8
- package/web/chunk-36s08nye.js +1 -0
- package/web/chunk-3ctmehg4.js +1 -0
- package/web/{chunk-ncfzmf2g.js → chunk-3jjksgze.js} +1 -1
- package/web/{chunk-aebrw6cv.js → chunk-3p9w8sg5.js} +2 -2
- package/web/{chunk-sdr5wa4z.js → chunk-3wpxymxa.js} +3 -3
- package/web/{chunk-v34mr9ky.js → chunk-4py9sndw.js} +3 -3
- package/web/chunk-4swea9sn.js +1 -0
- package/web/chunk-4zz5a483.js +1 -0
- package/web/{chunk-3rkkp6ed.js → chunk-5cwxhhae.js} +5 -5
- package/web/{chunk-d57fm7k0.js → chunk-5ym5ffd5.js} +2 -2
- package/web/{chunk-gten0rpx.js → chunk-6e87m0nm.js} +2 -2
- package/web/{chunk-b99k8q22.js → chunk-6rsr2cyw.js} +8 -8
- package/web/chunk-6y55gk1n.js +1 -0
- package/web/chunk-7aep7k4v.js +1 -0
- package/web/{chunk-yf8ykk4v.js → chunk-8j4tzff5.js} +3 -3
- package/web/{chunk-ny436sqg.js → chunk-8tgavnwx.js} +1 -1
- package/web/{chunk-xvfeq8v2.js → chunk-97t3ngqf.js} +12 -12
- package/web/{chunk-gkmaryr4.js → chunk-980zhtht.js} +1 -1
- package/web/chunk-9k7fkx80.js +1 -0
- package/web/{chunk-hxbfkdjd.js → chunk-9wz8jne3.js} +1 -1
- package/web/chunk-a00vg115.js +1 -0
- package/web/chunk-a4gbxnm3.js +1 -0
- package/web/{chunk-6f2sz84q.js → chunk-a6g3nqp0.js} +1 -1
- package/web/{chunk-n9v14vyd.js → chunk-a9er7a7c.js} +22 -22
- package/web/chunk-atppv8fk.js +1 -0
- package/web/{chunk-xbyrgyy0.js → chunk-awkdw9rw.js} +2 -2
- package/web/{chunk-hqxc9m07.js → chunk-b4gcpsbg.js} +10 -10
- package/web/{chunk-qdd3bx8q.js → chunk-b9jry5a3.js} +1 -1
- package/web/{chunk-jyf7a7yp.js → chunk-ba9qy65y.js} +1 -1
- package/web/chunk-bq6mep6p.js +2 -0
- package/web/chunk-bwy3e58v.js +1 -0
- package/web/{chunk-aa46mrgh.js → chunk-c57f714b.js} +2 -2
- package/web/{chunk-b5zf1hs3.js → chunk-c6m4vfn5.js} +101 -101
- package/web/{chunk-5np514v5.js → chunk-cr04125j.js} +4 -4
- package/web/{chunk-ym7kv2hs.js → chunk-cr05dttm.js} +1 -1
- package/web/{chunk-2cyzaqjy.js → chunk-ct7z7bea.js} +3 -3
- package/web/{chunk-y2rzeb4v.js → chunk-ct90yf8z.js} +2 -2
- package/web/{chunk-yjs6jmdb.js → chunk-ddg8rz82.js} +3 -3
- package/web/{chunk-8cnjd0f2.js → chunk-dmha2y9c.js} +18 -18
- package/web/{chunk-jeafmjsm.js → chunk-e57h40qa.js} +6 -6
- package/web/chunk-eeesa5q1.js +1 -0
- package/web/{chunk-4wwd3pfz.js → chunk-eqndhs21.js} +2 -2
- package/web/{chunk-td83xf12.js → chunk-eqxy6535.js} +2 -2
- package/web/{chunk-wvrs986a.js → chunk-et1rsgmp.js} +3 -3
- package/web/chunk-f7jpakwh.js +1 -0
- package/web/{chunk-v1hfbjz9.js → chunk-fnvgdvrg.js} +4 -4
- package/web/chunk-fp62avjh.js +1 -0
- package/web/{chunk-6jb2zyp6.js → chunk-frnh4zqf.js} +2 -2
- package/web/chunk-g0be12na.js +1 -0
- package/web/{chunk-60mym60n.js → chunk-g7hqafb8.js} +1 -1
- package/web/{chunk-wqzbxzk3.js → chunk-ga07tv37.js} +1 -1
- package/web/chunk-gr163fex.js +1 -0
- package/web/chunk-gxtz10wf.js +1 -0
- package/web/{chunk-pjpre6de.js → chunk-h1k2kqbs.js} +6 -6
- package/web/{chunk-7tkgbbf9.js → chunk-h6k1x096.js} +2 -2
- package/web/{chunk-885kpj14.js → chunk-jccz14ye.js} +2 -2
- package/web/{chunk-d73zkc4q.js → chunk-jh33m2mq.js} +2 -2
- package/web/{chunk-g488hxx0.js → chunk-jh3k7xex.js} +3 -3
- package/web/{chunk-3qxxrwsp.js → chunk-jpem3qvs.js} +10 -10
- package/web/chunk-k9qnvx86.js +2 -0
- package/web/chunk-kcnj0gan.js +1 -0
- package/web/{chunk-2jfesv7m.js → chunk-ke8dffnk.js} +2 -2
- package/web/chunk-kpp5xqsb.js +1 -0
- package/web/chunk-m33yted6.js +1 -0
- package/web/chunk-me5jqqn6.js +1 -0
- package/web/{chunk-7v85yvb2.js → chunk-mkxeenph.js} +1 -1
- package/web/{chunk-mxkbmgcv.js → chunk-mnf4ngj9.js} +1 -1
- package/web/{chunk-30aeb767.js → chunk-mykrm8ba.js} +2 -2
- package/web/chunk-mzqqwbmr.js +1 -0
- package/web/chunk-npyrdsf8.css +1 -0
- package/web/chunk-p6e2vr51.js +34 -0
- package/web/{chunk-3n9ypydh.js → chunk-p7pa02k9.js} +2 -2
- package/web/chunk-q34as3v6.js +1 -0
- package/web/{chunk-7ksg3ccg.js → chunk-q4vy3dkk.js} +2 -2
- package/web/chunk-q6c8p73w.js +1 -0
- package/web/{chunk-h754ntg7.js → chunk-qb8mbptk.js} +1 -1
- package/web/{chunk-g4zm0crw.js → chunk-qbmtah1x.js} +1 -1
- package/web/chunk-qn93we3a.js +1 -0
- package/web/{chunk-c3fty2c2.js → chunk-qq06x2ce.js} +7 -7
- package/web/{chunk-fj753yzt.js → chunk-qq6m2my8.js} +2 -2
- package/web/chunk-r1f1egve.js +1 -0
- package/web/{chunk-80z8s8zb.js → chunk-s935z8er.js} +1 -1
- package/web/{chunk-3psgr0q8.js → chunk-sq75q603.js} +20 -20
- package/web/{chunk-qp3tjhaq.js → chunk-ss96cz1f.js} +1 -1
- package/web/{chunk-hn8m1vsg.js → chunk-t82sngk9.js} +7 -7
- package/web/chunk-tt9410zw.js +8 -0
- package/web/{chunk-act3rr85.js → chunk-v4cqc9f9.js} +1 -1
- package/web/chunk-ve8gy05p.js +1142 -0
- package/web/chunk-vg1ebkce.js +1 -0
- package/web/{chunk-k4dnjf8n.js → chunk-vk7ch6fh.js} +3 -3
- package/web/chunk-vnt34mkb.js +1 -0
- package/web/{chunk-kerfb21g.js → chunk-w28dn4dw.js} +1 -1
- package/web/{chunk-rdr6wt22.js → chunk-w4tfad6c.js} +4 -4
- package/web/{chunk-81s15c2e.js → chunk-wpxtkxjt.js} +2 -2
- package/web/{chunk-h24ybwp6.js → chunk-xcyqd7cn.js} +1 -1
- package/web/chunk-xe121vg7.js +1 -0
- package/web/chunk-xh4xn1az.js +1 -0
- package/web/{chunk-e94pd9rr.js → chunk-xk1vkcj4.js} +9 -9
- package/web/chunk-xrk5ewsn.js +1 -0
- package/web/{chunk-5g8md2wg.js → chunk-xvm66b7v.js} +4 -4
- package/web/{chunk-q1zxvjhs.js → chunk-xxmaqj1m.js} +2 -2
- package/web/chunk-xzwxcxb4.js +1 -0
- package/web/{chunk-xpecre7w.js → chunk-y9waq403.js} +4 -4
- package/web/chunk-ydhnkws0.js +1 -0
- package/web/{chunk-ar6jnhm5.js → chunk-yn4t5s9r.js} +1 -1
- package/web/chunk-ys2tns0p.js +1 -0
- package/web/chunk-zb61mf0a.js +1 -0
- package/web/{chunk-r6kk4vp1.js → chunk-ze6azq7z.js} +4 -4
- package/web/chunk-zh7193nq.js +2 -0
- package/web/chunk-zqcg6frm.js +1 -0
- package/web/{chunk-enwfd8d5.js → chunk-zxrbbbtp.js} +2 -2
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-2fyjph3f.js +0 -2
- package/chunk-37zystxb.js +0 -25
- package/chunk-3k627vf2.js +0 -3
- package/chunk-7er5pz7s.js +0 -479
- package/chunk-7g5smgjj.js +0 -2
- package/chunk-7m3jagqn.js +0 -2
- package/chunk-9c4gdg1q.js +0 -3
- package/chunk-b2bxqeb4.js +0 -2
- package/chunk-bpw6q7g0.js +0 -3
- package/chunk-cdw03j4t.js +0 -20
- package/chunk-ch1r3ted.js +0 -2
- package/chunk-cmwdjes8.js +0 -18
- package/chunk-db7ws33a.js +0 -7
- package/chunk-e1x629v0.js +0 -5
- package/chunk-j64dc767.js +0 -3
- package/chunk-m4bg1apa.js +0 -7
- package/chunk-nhm9z3d8.js +0 -2
- package/chunk-pnspvnyd.js +0 -2
- package/chunk-qnkrrwmg.js +0 -2
- package/chunk-r4gm8ngh.js +0 -2
- package/chunk-rks90mh1.js +0 -2
- package/chunk-t7te60m7.js +0 -2
- package/chunk-tv52xajf.js +0 -2
- package/chunk-wqqjzsjt.js +0 -3983
- package/chunk-xef4642x.js +0 -3
- package/web/chunk-04drx71p.js +0 -1
- package/web/chunk-0mdf1qja.js +0 -1
- package/web/chunk-0rdgt4jb.css +0 -1
- package/web/chunk-1m0kp0g3.js +0 -8
- package/web/chunk-3j2tcphs.js +0 -1
- package/web/chunk-3k9h7a73.js +0 -1142
- package/web/chunk-3m1bb2fw.js +0 -1
- package/web/chunk-55nvm2mj.js +0 -1
- package/web/chunk-5dkqfnh7.js +0 -2
- package/web/chunk-7ky5nrrr.js +0 -1
- package/web/chunk-8sdjgv3k.js +0 -1
- package/web/chunk-9bxtzwtc.js +0 -1
- package/web/chunk-9jy8nc4r.js +0 -1
- package/web/chunk-bcjgzwef.js +0 -1
- package/web/chunk-cxpnj495.js +0 -2
- package/web/chunk-d1btrqmw.js +0 -1
- package/web/chunk-d94t9z70.js +0 -1
- package/web/chunk-e68jw0bg.js +0 -1
- package/web/chunk-fr4fft89.js +0 -1
- package/web/chunk-gckmcef6.js +0 -1
- package/web/chunk-gnb09wmx.js +0 -1
- package/web/chunk-hrgqc1vr.js +0 -1
- package/web/chunk-j9c8fa82.js +0 -1
- package/web/chunk-jz5mmp64.js +0 -1
- package/web/chunk-kxeaj44h.js +0 -1
- package/web/chunk-m0136xav.js +0 -1
- package/web/chunk-m1rdyvb5.js +0 -1
- package/web/chunk-m6vyvgm5.js +0 -1
- package/web/chunk-my0ec787.js +0 -1
- package/web/chunk-nkpdd9hw.js +0 -1
- package/web/chunk-pbp1p5ex.js +0 -1
- package/web/chunk-ph75hddv.js +0 -1
- package/web/chunk-phdfyqaa.js +0 -1
- package/web/chunk-phxa5krt.js +0 -1
- package/web/chunk-r4zbw4zj.js +0 -2
- package/web/chunk-ry4ycah9.js +0 -1
- package/web/chunk-sqm16fat.js +0 -1
- package/web/chunk-tj1fn8v2.js +0 -1
- package/web/chunk-v0wtk059.js +0 -34
- package/web/chunk-v1qt3gq4.js +0 -1
- package/web/chunk-v854w9yn.js +0 -1
- package/web/chunk-ve56gxq0.js +0 -1
- package/web/chunk-w573ym17.js +0 -1
- package/web/chunk-x0mjydtp.js +0 -1
- package/web/chunk-zhybh04p.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t,a,l,I,St,_o,vt,Jt,Et,Yn,en}from"./chunk-b5zf1hs3.js";import{be,Pe,Je,Ee,dt,Vt,Y,me,lt,Wt,ct,lr,ma,fa,ha,yn,kt,ga,vn,Oe,bn,$t,Ct,xn,Gt,_n,ya,va,cr,xe,ba,wn,Ht,kn,ur,dr,Yt,xa,pr,_a,Ur,pt,mr,wa,ka,Ca,He,fr,hr,Cn,Sa,gr,h,et,mt,_e,Zt,re}from"./chunk-3n9ypydh.js";import{ua,da,W,Bn,io,pa,sr}from"./chunk-81s15c2e.js";import{Rt}from"./chunk-3k9h7a73.js";var yr={};Rt(yr,{default:()=>rr});var lo=/\s/;function mo(r){var e=r.length;while(e--&&lo.test(r.charAt(e)));return e}var te=mo;var ho=/^\s+/;function go(r){return r?r.slice(0,te(r)+1).replace(ho,""):r}var ne=go;var oe=NaN,vo=/^[-+]0x[0-9a-f]+$/i,bo=/^0b[01]+$/i,yo=/^0o[0-7]+$/i,wo=parseInt;function Eo(r){if(typeof r=="number")return r;if(dt(r))return oe;if(me(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=me(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=ne(r);var n=bo.test(r);return n||yo.test(r)?wo(r.slice(2),n?2:8):vo.test(r)?oe:+r}var ie=Eo;var ae=1/0,xo=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function Oo(r){if(!r)return r===0?r:0;if(r=ie(r),r===ae||r===-ae){var e=r<0?-1:1;return e*xo}return r===r?r:0}var V=Oo;function So(r){var e=V(r),n=e%1;return e===e?n?e-n:e:0}var fe=So;var se=Object.create,No=function(){function r(){}return function(e){if(!me(e))return{};if(se)return se(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}(),ue=No;function Po(r,e){var n=-1,o=r.length;e||(e=Array(o));while(++n<o)e[n]=r[n];return e}var vr=Po;function ko(r,e,n){if(e=="__proto__"&&lr)lr(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0});else r[e]=n}var M=ko;var To=Object.prototype,Co=To.hasOwnProperty;function Ao(r,e,n){var o=r[e];if(!(Co.call(r,e)&&kt(o,n))||n===void 0&&!(e in r))M(r,e,n)}var j=Ao;function Ro(r,e,n,o){var i=!n;n||(n={});var f=-1,s=e.length;while(++f<s){var u=e[f],d=o?o(n[u],r[u],u,n,r):void 0;if(d===void 0)d=r[u];if(i)M(n,u,d);else j(n,u,d)}return n}var k=Ro;function Mo(r,e,n){if(!me(n))return!1;var o=typeof e;if(o=="number"?Oe(n)&&yn(e,n.length):o=="string"&&(e in n))return kt(n[e],r);return!1}var C=Mo;function jo(r){return vn(function(e,n){var o=-1,i=n.length,f=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;if(f=r.length>3&&typeof f=="function"?(i--,f):void 0,s&&C(n[0],n[1],s))f=i<3?void 0:f,i=1;e=Object(e);while(++o<i){var u=n[o];if(u)r(e,u,o,f)}return e})}var de=jo;function Bo(r){var e=[];if(r!=null)for(var n in Object(r))e.push(n);return e}var ce=Bo;var Fo=Object.prototype,Go=Fo.hasOwnProperty;function Xo(r){if(!me(r))return ce(r);var e=bn(r),n=[];for(var o in r)if(!(o=="constructor"&&(e||!Go.call(r,o))))n.push(o);return n}var pe=Xo;function Uo(r){return Oe(r)?ya(r,!0):pe(r)}var L=Uo;function Vo(r){var e=r==null?0:r.length;return e?dr(r,1):[]}var N=Vo;function Yo(r){return ma(ga(r,void 0,N),r+"")}var le=Yo;var zo=va(Object.getPrototypeOf,Object),z=zo;var Wo="[object Object]",qo=Function.prototype,Ho=Object.prototype,he=qo.toString,Ko=Ho.hasOwnProperty,Jo=he.call(Object);function Zo(r){if(!Ee(r)||Je(r)!=Wo)return!1;var e=z(r);if(e===null)return!0;var n=Ko.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&he.call(n)==Jo}var ge=Zo;var $o="\\ud800-\\udfff",Qo="\\u0300-\\u036f",ri="\\ufe20-\\ufe2f",ei="\\u20d0-\\u20ff",ti=Qo+ri+ei,ni="\\ufe0e\\ufe0f",oi="\\u200d",ii=RegExp("["+oi+$o+ti+ni+"]");function ai(r){return ii.test(r)}var ve=ai;function fi(r,e){return r&&k(e,xe(e),r)}var ye=fi;function si(r,e){return r&&k(e,L(e),r)}var we=si;var Ne=typeof yr=="object"&&yr&&!yr.nodeType&&yr,Le=Ne&&typeof br=="object"&&br&&!br.nodeType&&br,ui=Le&&Le.exports===Ne,Ie=ui?be.Buffer:void 0,Se=Ie?Ie.allocUnsafe:void 0;function di(r,e){if(e)return r.slice();var n=r.length,o=Se?Se(n):new r.constructor(n);return r.copy(o),o}var rr=di;function ci(r,e){return k(r,pr(r),e)}var ke=ci;var pi=Object.getOwnPropertySymbols,li=!pi?xa:function(r){var e=[];while(r)ur(e,pr(r)),r=z(r);return e},wr=li;function mi(r,e){return k(r,wr(r),e)}var Te=mi;function hi(r){return _a(r,L,wr)}var Ce=hi;var gi=Object.prototype,vi=gi.hasOwnProperty;function bi(r){var e=r.length,n=new r.constructor(e);if(e&&typeof r[0]=="string"&&vi.call(r,"index"))n.index=r.index,n.input=r.input;return n}var Ae=bi;function yi(r){var e=new r.constructor(r.byteLength);return new mr(e).set(new mr(r)),e}var q=yi;function wi(r,e){var n=e?q(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}var Re=wi;var _i=/\w*$/;function Ei(r){var e=new r.constructor(r.source,_i.exec(r));return e.lastIndex=r.lastIndex,e}var Me=Ei;var je=Pe?Pe.prototype:void 0,Be=je?je.valueOf:void 0;function xi(r){return Be?Object(Be.call(r)):{}}var De=xi;function Oi(r,e){var n=e?q(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}var _r=Oi;var Li="[object Boolean]",Ii="[object Date]",Si="[object Map]",Ni="[object Number]",Pi="[object RegExp]",ki="[object Set]",Ti="[object String]",Ci="[object Symbol]",Ai="[object ArrayBuffer]",Ri="[object DataView]",Mi="[object Float32Array]",ji="[object Float64Array]",Bi="[object Int8Array]",Di="[object Int16Array]",Fi="[object Int32Array]",Gi="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Ui="[object Uint16Array]",Vi="[object Uint32Array]";function Yi(r,e,n){var o=r.constructor;switch(e){case Ai:return q(r);case Li:case Ii:return new o(+r);case Ri:return Re(r,n);case Mi:case ji:case Bi:case Di:case Fi:case Gi:case Xi:case Ui:case Vi:return _r(r,n);case Si:return new o;case Ni:case Ti:return new o(r);case Pi:return Me(r);case ki:return new o;case Ci:return De(r)}}var Fe=Yi;function zi(r){return typeof r.constructor=="function"&&!bn(r)?ue(z(r)):{}}var Er=zi;var Wi="[object Map]";function qi(r){return Ee(r)&&pt(r)==Wi}var Ge=qi;var Xe=Gt&&Gt.isMap,Hi=Xe?xn(Xe):Ge,Ue=Hi;var Ki="[object Set]";function Ji(r){return Ee(r)&&pt(r)==Ki}var Ve=Ji;var Ye=Gt&&Gt.isSet,Zi=Ye?xn(Ye):Ve,ze=Zi;var $i=1,Qi=2,ra=4,We="[object Arguments]",ea="[object Array]",ta="[object Boolean]",na="[object Date]",oa="[object Error]",qe="[object Function]",ia="[object GeneratorFunction]",aa="[object Map]",sa="[object Number]",Ke="[object Object]",ca="[object RegExp]",la="[object Set]",Ea="[object String]",Oa="[object Symbol]",La="[object WeakMap]",Ia="[object ArrayBuffer]",Na="[object DataView]",Pa="[object Float32Array]",Ta="[object Float64Array]",Aa="[object Int8Array]",Ra="[object Int16Array]",Ma="[object Int32Array]",ja="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",Fa="[object Uint32Array]",x={};x[We]=x[ea]=x[Ia]=x[Na]=x[ta]=x[na]=x[Pa]=x[Ta]=x[Aa]=x[Ra]=x[Ma]=x[aa]=x[sa]=x[Ke]=x[ca]=x[la]=x[Ea]=x[Oa]=x[ja]=x[Ba]=x[Da]=x[Fa]=!0;x[oa]=x[qe]=x[La]=!1;function xr(r,e,n,o,i,f){var s,u=e&$i,d=e&Qi,c=e&ra;if(n)s=i?n(r,o,i,f):n(r);if(s!==void 0)return s;if(!me(r))return r;var p=Y(r);if(p){if(s=Ae(r),!u)return vr(r,s)}else{var m=pt(r),g=m==qe||m==ia;if(Ct(r))return rr(r,u);if(m==Ke||m==We||g&&!i){if(s=d||g?{}:Er(r),!u)return d?Te(r,we(s,r)):ke(r,ye(s,r))}else{if(!x[m])return i?r:{};s=Fe(r,m,u)}}f||(f=new Yt);var b=f.get(r);if(b)return b;if(f.set(r,s),ze(r))r.forEach(function(v){s.add(xr(v,e,n,v,r,f))});else if(Ue(r))r.forEach(function(v,_){s.set(_,xr(v,e,n,_,r,f))});var w=c?d?Ce:Ur:d?L:xe,y=p?void 0:w(r);return fa(y||r,function(v,_){if(y)_=v,v=r[_];j(s,_,xr(v,e,n,_,r,f))}),s}var Ze=xr;var Ga=1,Xa=4;function Ua(r){return Ze(r,Ga|Xa)}var $e=Ua;var Va=function(){return be.Date.now()},kr=Va;var Qe=Object.prototype,Ya=Qe.hasOwnProperty,za=vn(function(r,e){r=Object(r);var n=-1,o=e.length,i=o>2?e[2]:void 0;if(i&&C(e[0],e[1],i))o=1;while(++n<o){var f=e[n],s=L(f),u=-1,d=s.length;while(++u<d){var c=s[u],p=r[c];if(p===void 0||kt(p,Qe[c])&&!Ya.call(r,c))r[c]=f[c]}}return r}),rt=za;function Wa(r,e,n){if(n!==void 0&&!kt(r[e],n)||n===void 0&&!(e in r))M(r,e,n)}var er=Wa;function qa(r,e){if(e==="constructor"&&typeof r[e]==="function")return;if(e=="__proto__")return;return r[e]}var tr=qa;function Ha(r){return k(r,L(r))}var tt=Ha;function Ka(r,e,n,o,i,f,s){var u=tr(r,n),d=tr(e,n),c=s.get(d);if(c){er(r,n,c);return}var p=f?f(u,d,n+"",r,e,s):void 0,m=p===void 0;if(m){var g=Y(d),b=!g&&Ct(d),w=!g&&!b&&_n(d);if(p=d,g||b||w)if(Y(u))p=u;else if(Sa(u))p=vr(u);else if(b)m=!1,p=rr(d,!0);else if(w)m=!1,p=_r(d,!0);else p=[];else if(ge(d)||$t(d)){if(p=u,$t(u))p=tt(u);else if(!me(u)||Wt(u))p=Er(d)}else m=!1}if(m)s.set(d,p),i(p,d,o,f,s),s.delete(d);er(r,n,p)}var nt=Ka;function ot(r,e,n,o,i){if(r===e)return;fr(e,function(f,s){if(i||(i=new Yt),me(f))nt(r,e,s,n,ot,o,i);else{var u=o?o(tr(r,s),f,s+"",r,e,i):void 0;if(u===void 0)u=f;er(r,s,u)}},L)}var it=ot;function Ja(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var X=Ja;function Za(r){return function(e,n,o){var i=Object(e);if(!Oe(e)){var f=He(n,3);e=xe(e),n=function(u){return f(i[u],u,i)}}var s=r(e,n,o);return s>-1?i[f?e[s]:s]:void 0}}var at=Za;var $a=Math.max;function Qa(r,e,n){var o=r==null?0:r.length;if(!o)return-1;var i=n==null?0:fe(n);if(i<0)i=$a(o+i,0);return ha(r,He(e,3),i)}var ft=Qa;var rf=at(ft),nr=rf;function ef(r,e){var n=-1,o=Oe(r)?Array(r.length):[];return Cn(r,function(i,f,s){o[++n]=e(i,f,s)}),o}var Or=ef;function tf(r,e){var n=Y(r)?Vt:Or;return n(r,He(e,3))}var E=tf;function nf(r,e){return r==null?r:fr(r,gr(e),L)}var st=nf;function of(r,e){return r&&hr(r,gr(e))}var ut=of;function af(r,e){return r>e}var ht=af;var ff=Object.prototype,sf=ff.hasOwnProperty;function uf(r,e){return r!=null&&sf.call(r,e)}var gt=uf;function df(r,e){return r!=null&&wa(r,e,gt)}var Lr=df;var cf="[object String]";function pf(r){return typeof r=="string"||!Y(r)&&Ee(r)&&Je(r)==cf}var bt=pf;function lf(r,e){return r<e}var Ir=lf;function mf(r,e){var n={};return e=He(e,3),hr(r,function(o,i,f){M(n,i,e(o,i,f))}),n}var H=mf;function hf(r,e,n){var o=-1,i=r.length;while(++o<i){var f=r[o],s=e(f);if(s!=null&&(u===void 0?s===s&&!dt(s):n(s,u)))var u=s,d=f}return d}var K=hf;function gf(r){return r&&r.length?K(r,lt,ht):void 0}var S=gf;var vf=de(function(r,e,n){it(r,e,n)}),or=vf;function bf(r){return r&&r.length?K(r,lt,Ir):void 0}var B=bf;function yf(r,e){return r&&r.length?K(r,He(e,2),Ir):void 0}var J=yf;function wf(r,e,n,o){if(!me(r))return r;e=wn(e,r);var i=-1,f=e.length,s=f-1,u=r;while(u!=null&&++i<f){var d=Ht(e[i]),c=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return r;if(i!=s){var p=u[d];if(c=o?o(p,d,u):void 0,c===void 0)c=me(p)?p:yn(e[i+1])?[]:{}}j(u,d,c),u=u[d]}return r}var yt=wf;function _f(r,e,n){var o=-1,i=e.length,f={};while(++o<i){var s=e[o],u=kn(r,s);if(n(u,s))yt(f,wn(s,r),u)}return f}var wt=_f;function Ef(r,e){var n=r.length;r.sort(e);while(n--)r[n]=r[n].value;return r}var _t=Ef;function xf(r,e){if(r!==e){var n=r!==void 0,o=r===null,i=r===r,f=dt(r),s=e!==void 0,u=e===null,d=e===e,c=dt(e);if(!u&&!c&&!f&&r>e||f&&s&&d&&!u&&!c||o&&s&&d||!n&&d||!i)return 1;if(!o&&!f&&!c&&r<e||c&&n&&i&&!o&&!f||u&&n&&i||!s&&i||!d)return-1}return 0}var xt=xf;function Of(r,e,n){var o=-1,i=r.criteria,f=e.criteria,s=i.length,u=n.length;while(++o<s){var d=xt(i[o],f[o]);if(d){if(o>=u)return d;var c=n[o];return d*(c=="desc"?-1:1)}}return r.index-e.index}var Ot=Of;function Lf(r,e,n){if(e.length)e=Vt(e,function(f){if(Y(f))return function(s){return kn(s,f.length===1?f[0]:f)};return f});else e=[lt];var o=-1;e=Vt(e,xn(He));var i=Or(r,function(f,s,u){var d=Vt(e,function(c){return c(f)});return{criteria:d,index:++o,value:f}});return _t(i,function(f,s){return Ot(f,s,n)})}var Lt=Lf;var If=Ca("length"),It=If;var Pt="\\ud800-\\udfff",Sf="\\u0300-\\u036f",Nf="\\ufe20-\\ufe2f",Pf="\\u20d0-\\u20ff",kf=Sf+Nf+Pf,Tf="\\ufe0e\\ufe0f",Cf="["+Pt+"]",Tr="["+kf+"]",Cr="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Tr+"|"+Cr+")",Tt="[^"+Pt+"]",At="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rf="\\u200d",jt=Af+"?",Bt="["+Tf+"]?",Mf="(?:"+Rf+"(?:"+[Tt,At,Mt].join("|")+")"+Bt+jt+")*",jf=Bt+jt+Mf,Bf="(?:"+[Tt+Tr+"?",Tr,At,Mt,Cf].join("|")+")",Nt=RegExp(Cr+"(?="+Cr+")|"+Bf+jf,"g");function Df(r){var e=Nt.lastIndex=0;while(Nt.test(r))++e;return e}var Dt=Df;function Ff(r){return ve(r)?Dt(r):It(r)}var Ft=Ff;function Gf(r,e){return wt(r,e,function(n,o){return ka(r,o)})}var Xt=Gf;var Xf=le(function(r,e){return r==null?{}:Xt(r,e)}),Z=Xf;var{ceil:Uf,max:Vf}=Math;function Yf(r,e,n,o){var i=-1,f=Vf(Uf((e-r)/(n||1)),0),s=Array(f);while(f--)s[o?f:++i]=r,r+=n;return s}var Ut=Yf;function zf(r){return function(e,n,o){if(o&&typeof o!="number"&&C(e,n,o))n=o=void 0;if(e=V(e),n===void 0)n=e,e=0;else n=V(n);return o=o===void 0?e<n?1:-1:V(o),Ut(e,n,o,r)}}var zt=zf;var Wf=zt(),P=Wf;var qf="[object Map]",Hf="[object Set]";function Kf(r){if(r==null)return 0;if(Oe(r))return bt(r)?Ft(r):r.length;var e=pt(r);if(e==qf||e==Hf)return r.size;return cr(r).length}var qt=Kf;var Jf=vn(function(r,e){if(r==null)return[];var n=e.length;if(n>1&&C(r,e[0],e[1]))e=[];else if(n>2&&C(e[0],e[1],e[2]))e=[e[0]];return Lt(r,dr(e,1),[])}),A=Jf;var Zf=0;function $f(r){var e=++Zf;return ba(r)+e}var Q=$f;function Qf(r,e,n){var o=-1,i=r.length,f=e.length,s={};while(++o<i){var u=o<f?e[o]:void 0;n(s,r[o],u)}return s}var Kt=Qf;function rs(r,e){return Kt(r||[],e||[],j)}var Ar=rs;class Rr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,e=r._prev;if(e!==r)return Qt(e),e}enqueue(r){var e=this._sentinel;if(r._prev&&r._next)Qt(r);r._next=e._next,e._next._prev=r,e._next=r,r._prev=e}toString(){var r=[],e=this._sentinel,n=e._prev;while(n!==e)r.push(JSON.stringify(n,es)),n=n._prev;return"["+r.join(", ")+"]"}}function Qt(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function es(r,e){if(r!=="_next"&&r!=="_prev")return e}var ts=ct(1);function rn(r,e){if(r.nodeCount()<=1)return[];var n=os(r,e||ts),o=ns(n.graph,n.buckets,n.zeroIdx);return N(E(o,function(i){return r.outEdges(i.v,i.w)}))}function ns(r,e,n){var o=[],i=e[e.length-1],f=e[0],s;while(r.nodeCount()){while(s=f.dequeue())Mr(r,e,n,s);while(s=i.dequeue())Mr(r,e,n,s);if(r.nodeCount()){for(var u=e.length-2;u>0;--u)if(s=e[u].dequeue(),s){o=o.concat(Mr(r,e,n,s,!0));break}}}return o}function Mr(r,e,n,o,i){var f=i?[]:void 0;return h(r.inEdges(o.v),function(s){var u=r.edge(s),d=r.node(s.v);if(i)f.push({v:s.v,w:s.w});d.out-=u,jr(e,n,d)}),h(r.outEdges(o.v),function(s){var u=r.edge(s),d=s.w,c=r.node(d);c.in-=u,jr(e,n,c)}),r.removeNode(o.v),f}function os(r,e){var n=new re,o=0,i=0;h(r.nodes(),function(u){n.setNode(u,{v:u,in:0,out:0})}),h(r.edges(),function(u){var d=n.edge(u.v,u.w)||0,c=e(u),p=d+c;n.setEdge(u.v,u.w,p),i=Math.max(i,n.node(u.v).out+=c),o=Math.max(o,n.node(u.w).in+=c)});var f=P(i+o+3).map(function(){return new Rr}),s=o+1;return h(n.nodes(),function(u){jr(f,s,n.node(u))}),{graph:n,buckets:f,zeroIdx:s}}function jr(r,e,n){if(!n.out)r[0].enqueue(n);else if(!n.in)r[r.length-1].enqueue(n);else r[n.out-n.in+e].enqueue(n)}function tn(r){var e=r.graph().acyclicer==="greedy"?rn(r,n(r)):is(r);h(e,function(o){var i=r.edge(o);r.removeEdge(o),i.forwardName=o.name,i.reversed=!0,r.setEdge(o.w,o.v,i,Q("rev"))});function n(o){return function(i){return o.edge(i).weight}}}function is(r){var e=[],n={},o={};function i(f){if(Object.prototype.hasOwnProperty.call(o,f))return;o[f]=!0,n[f]=!0,h(r.outEdges(f),function(s){if(Object.prototype.hasOwnProperty.call(n,s.w))e.push(s);else i(s.w)}),delete n[f]}return h(r.nodes(),i),e}function nn(r){h(r.edges(),function(e){var n=r.edge(e);if(n.reversed){r.removeEdge(e);var o=n.forwardName;delete n.reversed,delete n.forwardName,r.setEdge(e.w,e.v,n,o)}})}function T(r,e,n,o){var i;do i=Q(o);while(r.hasNode(i));return n.dummy=e,r.setNode(i,n),i}function an(r){var e=new re().setGraph(r.graph());return h(r.nodes(),function(n){e.setNode(n,r.node(n))}),h(r.edges(),function(n){var o=e.edge(n.v,n.w)||{weight:0,minlen:1},i=r.edge(n);e.setEdge(n.v,n.w,{weight:o.weight+i.weight,minlen:Math.max(o.minlen,i.minlen)})}),e}function Sr(r){var e=new re({multigraph:r.isMultigraph()}).setGraph(r.graph());return h(r.nodes(),function(n){if(!r.children(n).length)e.setNode(n,r.node(n))}),h(r.edges(),function(n){e.setEdge(n,r.edge(n))}),e}function Br(r,e){var{x:n,y:o}=r,i=e.x-n,f=e.y-o,s=r.width/2,u=r.height/2;if(!i&&!f)throw Error("Not possible to find intersection inside of the rectangle");var d,c;if(Math.abs(f)*s>Math.abs(i)*u){if(f<0)u=-u;d=u*i/f,c=u}else{if(i<0)s=-s;d=s,c=s*f/i}return{x:n+d,y:o+c}}function D(r){var e=E(P(Fr(r)+1),function(){return[]});return h(r.nodes(),function(n){var o=r.node(n),i=o.rank;if(!_e(i))e[i][o.order]=n}),e}function fn(r){var e=B(E(r.nodes(),function(n){return r.node(n).rank}));h(r.nodes(),function(n){var o=r.node(n);if(Lr(o,"rank"))o.rank-=e})}function sn(r){var e=B(E(r.nodes(),function(f){return r.node(f).rank})),n=[];h(r.nodes(),function(f){var s=r.node(f).rank-e;if(!n[s])n[s]=[];n[s].push(f)});var o=0,i=r.graph().nodeRankFactor;h(n,function(f,s){if(_e(f)&&s%i!==0)--o;else if(o)h(f,function(u){r.node(u).rank+=o})})}function Dr(r,e,n,o){var i={width:0,height:0};if(arguments.length>=4)i.rank=n,i.order=o;return T(r,"border",i,e)}function Fr(r){return S(E(r.nodes(),function(e){var n=r.node(e).rank;if(!_e(n))return n}))}function un(r,e){var n={lhs:[],rhs:[]};return h(r,function(o){if(e(o))n.lhs.push(o);else n.rhs.push(o)}),n}function dn(r,e){var n=kr();try{return e()}finally{console.log(r+" time: "+(kr()-n)+"ms")}}function cn(r,e){return e()}function ln(r){function e(n){var o=r.children(n),i=r.node(n);if(o.length)h(o,e);if(Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var f=i.minRank,s=i.maxRank+1;f<s;++f)pn(r,"borderLeft","_bl",n,i,f),pn(r,"borderRight","_br",n,i,f)}}h(r.children(),e)}function pn(r,e,n,o,i,f){var s={width:0,height:0,rank:f,borderType:e},u=i[e][f-1],d=T(r,"border",s,n);if(i[e][f]=d,r.setParent(d,o),u)r.setEdge(u,d,{weight:1})}function hn(r){var e=r.graph().rankdir.toLowerCase();if(e==="lr"||e==="rl")En(r)}function gn(r){var e=r.graph().rankdir.toLowerCase();if(e==="bt"||e==="rl")as(r);if(e==="lr"||e==="rl")fs(r),En(r)}function En(r){h(r.nodes(),function(e){mn(r.node(e))}),h(r.edges(),function(e){mn(r.edge(e))})}function mn(r){var e=r.width;r.width=r.height,r.height=e}function as(r){h(r.nodes(),function(e){Gr(r.node(e))}),h(r.edges(),function(e){var n=r.edge(e);if(h(n.points,Gr),Object.prototype.hasOwnProperty.call(n,"y"))Gr(n)})}function Gr(r){r.y=-r.y}function fs(r){h(r.nodes(),function(e){Xr(r.node(e))}),h(r.edges(),function(e){var n=r.edge(e);if(h(n.points,Xr),Object.prototype.hasOwnProperty.call(n,"x"))Xr(n)})}function Xr(r){var e=r.x;r.x=r.y,r.y=e}function On(r){r.graph().dummyChains=[],h(r.edges(),function(e){us(r,e)})}function us(r,e){var n=e.v,o=r.node(n).rank,i=e.w,f=r.node(i).rank,s=e.name,u=r.edge(e),d=u.labelRank;if(f===o+1)return;r.removeEdge(e);var c=void 0,p,m;for(m=0,++o;o<f;++m,++o){if(u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:e,rank:o},p=T(r,"edge",c,"_d"),o===d)c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos;if(r.setEdge(n,p,{weight:u.weight},s),m===0)r.graph().dummyChains.push(p);n=p}r.setEdge(n,i,{weight:u.weight},s)}function Ln(r){h(r.graph().dummyChains,function(e){var n=r.node(e),o=n.edgeLabel,i;r.setEdge(n.edgeObj,o);while(n.dummy){if(i=r.successors(e)[0],r.removeNode(e),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label")o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height;e=i,n=r.node(e)}})}function ir(r){var e={};function n(o){var i=r.node(o);if(Object.prototype.hasOwnProperty.call(e,o))return i.rank;e[o]=!0;var f=B(E(r.outEdges(o),function(s){return n(s.w)-r.edge(s).minlen}));if(f===Number.POSITIVE_INFINITY||f===void 0||f===null)f=0;return i.rank=f}h(r.sources(),n)}function U(r,e){return r.node(e.w).rank-r.node(e.v).rank-r.edge(e).minlen}function Nr(r){var e=new re({directed:!1}),n=r.nodes()[0],o=r.nodeCount();e.setNode(n,{});var i,f;while(ds(e,r)<o)i=cs(e,r),f=e.hasNode(i.v)?U(r,i):-U(r,i),ps(e,r,f);return e}function ds(r,e){function n(o){h(e.nodeEdges(o),function(i){var f=i.v,s=o===f?i.w:f;if(!r.hasNode(s)&&!U(e,i))r.setNode(s,{}),r.setEdge(o,s,{}),n(s)})}return h(r.nodes(),n),r.nodeCount()}function cs(r,e){return J(e.edges(),function(n){if(r.hasNode(n.v)!==r.hasNode(n.w))return U(e,n)})}function ps(r,e,n){h(r.nodes(),function(o){e.node(o).rank+=n})}var dh=ct(1);var vh=ct(1);Vr.CycleException=ar;function Vr(r){var e={},n={},o=[];function i(f){if(Object.prototype.hasOwnProperty.call(n,f))throw new ar;if(!Object.prototype.hasOwnProperty.call(e,f))n[f]=!0,e[f]=!0,h(r.predecessors(f),i),delete n[f],o.push(f)}if(h(r.sinks(),i),qt(e)!==r.nodeCount())throw new ar;return o}function ar(){}ar.prototype=Error();function Pr(r,e,n){if(!Y(e))e=[e];var o=(r.isDirected()?r.successors:r.neighbors).bind(r),i=[],f={};return h(e,function(s){if(!r.hasNode(s))throw Error("Graph does not have node: "+s);Sn(r,s,n==="post",f,o,i)}),i}function Sn(r,e,n,o,i,f){if(!Object.prototype.hasOwnProperty.call(o,e)){if(o[e]=!0,!n)f.push(e);if(h(i(e),function(s){Sn(r,s,n,o,i,f)}),n)f.push(e)}}function Yr(r,e){return Pr(r,e,"post")}function zr(r,e){return Pr(r,e,"pre")}G.initLowLimValues=qr;G.initCutValues=Wr;G.calcCutValue=Pn;G.leaveEdge=An;G.enterEdge=Rn;G.exchangeEdges=Mn;function G(r){r=an(r),ir(r);var e=Nr(r);qr(e),Wr(e,r);var n,o;while(n=An(e))o=Rn(e,r,n),Mn(e,r,n,o)}function Wr(r,e){var n=Yr(r,r.nodes());n=n.slice(0,n.length-1),h(n,function(o){vs(r,e,o)})}function vs(r,e,n){var o=r.node(n),i=o.parent;r.edge(n,i).cutvalue=Pn(r,e,n)}function Pn(r,e,n){var o=r.node(n),i=o.parent,f=!0,s=e.edge(n,i),u=0;if(!s)f=!1,s=e.edge(i,n);return u=s.weight,h(e.nodeEdges(n),function(d){var c=d.v===n,p=c?d.w:d.v;if(p!==i){var m=c===f,g=e.edge(d).weight;if(u+=m?g:-g,ys(r,n,p)){var b=r.edge(n,p).cutvalue;u+=m?-b:b}}}),u}function qr(r,e){if(arguments.length<2)e=r.nodes()[0];Tn(r,{},1,e)}function Tn(r,e,n,o,i){var f=n,s=r.node(o);if(e[o]=!0,h(r.neighbors(o),function(u){if(!Object.prototype.hasOwnProperty.call(e,u))n=Tn(r,e,n,u,o)}),s.low=f,s.lim=n++,i)s.parent=i;else delete s.parent;return n}function An(r){return nr(r.edges(),function(e){return r.edge(e).cutvalue<0})}function Rn(r,e,n){var{v:o,w:i}=n;if(!e.hasEdge(o,i))o=n.w,i=n.v;var f=r.node(o),s=r.node(i),u=f,d=!1;if(f.lim>s.lim)u=s,d=!0;var c=et(e.edges(),function(p){return d===Nn(r,r.node(p.v),u)&&d!==Nn(r,r.node(p.w),u)});return J(c,function(p){return U(e,p)})}function Mn(r,e,n,o){var{v:i,w:f}=n;r.removeEdge(i,f),r.setEdge(o.v,o.w,{}),qr(r),Wr(r,e),bs(r,e)}function bs(r,e){var n=nr(r.nodes(),function(i){return!e.node(i).parent}),o=zr(r,n);o=o.slice(1),h(o,function(i){var f=r.node(i).parent,s=e.edge(i,f),u=!1;if(!s)s=e.edge(f,i),u=!0;e.node(i).rank=e.node(f).rank+(u?s.minlen:-s.minlen)})}function ys(r,e,n){return r.hasEdge(e,n)}function Nn(r,e,n){return n.low<=e.lim&&e.lim<=n.lim}function Hr(r){switch(r.graph().ranker){case"network-simplex":jn(r);break;case"tight-tree":_s(r);break;case"longest-path":ws(r);break;default:jn(r)}}var ws=ir;function _s(r){ir(r),Nr(r)}function jn(r){G(r)}function Dn(r){var e=T(r,"root",{},"_root"),n=Es(r),o=S(mt(n))-1,i=2*o+1;r.graph().nestingRoot=e,h(r.edges(),function(s){r.edge(s).minlen*=i});var f=xs(r)+1;h(r.children(),function(s){Fn(r,e,i,f,o,n,s)}),r.graph().nodeRankFactor=i}function Fn(r,e,n,o,i,f,s){var u=r.children(s);if(!u.length){if(s!==e)r.setEdge(e,s,{weight:0,minlen:n});return}var d=Dr(r,"_bt"),c=Dr(r,"_bb"),p=r.node(s);if(r.setParent(d,s),p.borderTop=d,r.setParent(c,s),p.borderBottom=c,h(u,function(m){Fn(r,e,n,o,i,f,m);var g=r.node(m),b=g.borderTop?g.borderTop:m,w=g.borderBottom?g.borderBottom:m,y=g.borderTop?o:2*o,v=b!==w?1:i-f[s]+1;r.setEdge(d,b,{weight:y,minlen:v,nestingEdge:!0}),r.setEdge(w,c,{weight:y,minlen:v,nestingEdge:!0})}),!r.parent(s))r.setEdge(e,d,{weight:0,minlen:i+f[s]})}function Es(r){var e={};function n(o,i){var f=r.children(o);if(f&&f.length)h(f,function(s){n(s,i+1)});e[o]=i}return h(r.children(),function(o){n(o,1)}),e}function xs(r){return Zt(r.edges(),function(e,n){return e+r.edge(n).weight},0)}function Gn(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,h(r.edges(),function(n){var o=r.edge(n);if(o.nestingEdge)r.removeEdge(n)})}function Xn(r,e,n){var o={},i;h(n,function(f){var s=r.parent(f),u,d;while(s){if(u=r.parent(s),u)d=o[u],o[u]=s;else d=i,i=s;if(d&&d!==s){e.setEdge(d,s);return}s=u}})}function Un(r,e,n){var o=Ls(r),i=new re({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(f){return r.node(f)});return h(r.nodes(),function(f){var s=r.node(f),u=r.parent(f);if(s.rank===e||s.minRank<=e&&e<=s.maxRank){if(i.setNode(f),i.setParent(f,u||o),h(r[n](f),function(d){var c=d.v===f?d.w:d.v,p=i.edge(c,f),m=!_e(p)?p.weight:0;i.setEdge(c,f,{weight:r.edge(d).weight+m})}),Object.prototype.hasOwnProperty.call(s,"minRank"))i.setNode(f,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]})}}),i}function Ls(r){var e;while(r.hasNode(e=Q("_root")));return e}function Vn(r,e){var n=0;for(var o=1;o<e.length;++o)n+=Is(r,e[o-1],e[o]);return n}function Is(r,e,n){var o=Ar(n,E(n,function(c,p){return p})),i=N(E(e,function(c){return A(E(r.outEdges(c),function(p){return{pos:o[p.w],weight:r.edge(p).weight}}),"pos")})),f=1;while(f<n.length)f<<=1;var s=2*f-1;f-=1;var u=E(Array(s),function(){return 0}),d=0;return h(i.forEach(function(c){var p=c.pos+f;u[p]+=c.weight;var m=0;while(p>0){if(p%2)m+=u[p+1];p=p-1>>1,u[p]+=c.weight}d+=c.weight*m})),d}function zn(r){var e={},n=et(r.nodes(),function(u){return!r.children(u).length}),o=S(E(n,function(u){return r.node(u).rank})),i=E(P(o+1),function(){return[]});function f(u){if(Lr(e,u))return;e[u]=!0;var d=r.node(u);i[d.rank].push(u),h(r.successors(u),f)}var s=A(n,function(u){return r.node(u).rank});return h(s,f),i}function Wn(r,e){return E(e,function(n){var o=r.inEdges(n);if(!o.length)return{v:n};else{var i=Zt(o,function(f,s){var u=r.edge(s),d=r.node(s.v);return{sum:f.sum+u.weight*d.order,weight:f.weight+u.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}})}function qn(r,e){var n={};h(r,function(i,f){var s=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:f};if(!_e(i.barycenter))s.barycenter=i.barycenter,s.weight=i.weight}),h(e.edges(),function(i){var f=n[i.v],s=n[i.w];if(!_e(f)&&!_e(s))s.indegree++,f.out.push(n[i.w])});var o=et(n,function(i){return!i.indegree});return Ss(o)}function Ss(r){var e=[];function n(f){return function(s){if(s.merged)return;if(_e(s.barycenter)||_e(f.barycenter)||s.barycenter>=f.barycenter)Ns(f,s)}}function o(f){return function(s){if(s.in.push(f),--s.indegree===0)r.push(s)}}while(r.length){var i=r.pop();e.push(i),h(i.in.reverse(),n(i)),h(i.out,o(i))}return E(et(e,function(f){return!f.merged}),function(f){return Z(f,["vs","i","barycenter","weight"])})}function Ns(r,e){var n=0,o=0;if(r.weight)n+=r.barycenter*r.weight,o+=r.weight;if(e.weight)n+=e.barycenter*e.weight,o+=e.weight;r.vs=e.vs.concat(r.vs),r.barycenter=n/o,r.weight=o,r.i=Math.min(e.i,r.i),e.merged=!0}function Kn(r,e){var n=un(r,function(p){return Object.prototype.hasOwnProperty.call(p,"barycenter")}),o=n.lhs,i=A(n.rhs,function(p){return-p.i}),f=[],s=0,u=0,d=0;o.sort(Ps(!!e)),d=Hn(f,i,d),h(o,function(p){d+=p.vs.length,f.push(p.vs),s+=p.barycenter*p.weight,u+=p.weight,d=Hn(f,i,d)});var c={vs:N(f)};if(u)c.barycenter=s/u,c.weight=u;return c}function Hn(r,e,n){var o;while(e.length&&(o=X(e)).i<=n)e.pop(),r.push(o.vs),n++;return n}function Ps(r){return function(e,n){if(e.barycenter<n.barycenter)return-1;else if(e.barycenter>n.barycenter)return 1;return!r?e.i-n.i:n.i-e.i}}function Kr(r,e,n,o){var i=r.children(e),f=r.node(e),s=f?f.borderLeft:void 0,u=f?f.borderRight:void 0,d={};if(s)i=et(i,function(w){return w!==s&&w!==u});var c=Wn(r,i);h(c,function(w){if(r.children(w.v).length){var y=Kr(r,w.v,n,o);if(d[w.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter"))Ts(w,y)}});var p=qn(c,n);ks(p,d);var m=Kn(p,o);if(s){if(m.vs=N([s,m.vs,u]),r.predecessors(s).length){var g=r.node(r.predecessors(s)[0]),b=r.node(r.predecessors(u)[0]);if(!Object.prototype.hasOwnProperty.call(m,"barycenter"))m.barycenter=0,m.weight=0;m.barycenter=(m.barycenter*m.weight+g.order+b.order)/(m.weight+2),m.weight+=2}}return m}function ks(r,e){h(r,function(n){n.vs=N(n.vs.map(function(o){if(e[o])return e[o].vs;return o}))})}function Ts(r,e){if(!_e(r.barycenter))r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight;else r.barycenter=e.barycenter,r.weight=e.weight}function $n(r){var e=Fr(r),n=Jn(r,P(1,e+1),"inEdges"),o=Jn(r,P(e-1,-1,-1),"outEdges"),i=zn(r);Zn(r,i);var f=Number.POSITIVE_INFINITY,s;for(var u=0,d=0;d<4;++u,++d){Cs(u%2?n:o,u%4>=2),i=D(r);var c=Vn(r,i);if(c<f)d=0,s=$e(i),f=c}Zn(r,s)}function Jn(r,e,n){return E(e,function(o){return Un(r,o,n)})}function Cs(r,e){var n=new re;h(r,function(o){var i=o.graph().root,f=Kr(o,i,n,e);h(f.vs,function(s,u){o.node(s).order=u}),Xn(o,n,f.vs)})}function Zn(r,e){h(e,function(n){h(n,function(o,i){r.node(o).order=i})})}function Qn(r){var e=Rs(r);h(r.graph().dummyChains,function(n){var o=r.node(n),i=o.edgeObj,f=As(r,e,i.v,i.w),{path:s,lca:u}=f,d=0,c=s[d],p=!0;while(n!==i.w){if(o=r.node(n),p){while((c=s[d])!==u&&r.node(c).maxRank<o.rank)d++;if(c===u)p=!1}if(!p){while(d<s.length-1&&r.node(c=s[d+1]).minRank<=o.rank)d++;c=s[d]}r.setParent(n,c),n=r.successors(n)[0]}})}function As(r,e,n,o){var i=[],f=[],s=Math.min(e[n].low,e[o].low),u=Math.max(e[n].lim,e[o].lim),d,c;d=n;do d=r.parent(d),i.push(d);while(d&&(e[d].low>s||u>e[d].lim));c=d,d=o;while((d=r.parent(d))!==c)f.push(d);return{path:i.concat(f.reverse()),lca:c}}function Rs(r){var e={},n=0;function o(i){var f=n;h(r.children(i),o),e[i]={low:f,lim:n++}}return h(r.children(),o),e}function Ms(r,e){var n={};function o(i,f){var s=0,u=0,d=i.length,c=X(f);return h(f,function(p,m){var g=Bs(r,p),b=g?r.node(g).order:d;if(g||p===c)h(f.slice(u,m+1),function(w){h(r.predecessors(w),function(y){var v=r.node(y),_=v.order;if((_<s||b<_)&&!(v.dummy&&r.node(w).dummy))eo(n,y,w)})}),u=m+1,s=b}),f}return Zt(e,o),n}function js(r,e){var n={};function o(f,s,u,d,c){var p;h(P(s,u),function(m){if(p=f[m],r.node(p).dummy)h(r.predecessors(p),function(g){var b=r.node(g);if(b.dummy&&(b.order<d||b.order>c))eo(n,g,p)})})}function i(f,s){var u=-1,d,c=0;return h(s,function(p,m){if(r.node(p).dummy==="border"){var g=r.predecessors(p);if(g.length)d=r.node(g[0]).order,o(s,c,m,u,d),c=m,u=d}o(s,c,s.length,d,f.length)}),s}return Zt(e,i),n}function Bs(r,e){if(r.node(e).dummy)return nr(r.predecessors(e),function(n){return r.node(n).dummy})}function eo(r,e,n){if(e>n){var o=e;e=n,n=o}if(!Object.prototype.hasOwnProperty.call(r,e))Object.defineProperty(r,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=r[e];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ds(r,e,n){if(e>n){var o=e;e=n,n=o}return!!r[e]&&Object.prototype.hasOwnProperty.call(r[e],n)}function Fs(r,e,n,o){var i={},f={},s={};return h(e,function(u){h(u,function(d,c){i[d]=d,f[d]=d,s[d]=c})}),h(e,function(u){var d=-1;h(u,function(c){var p=o(c);if(p.length){p=A(p,function(y){return s[y]});var m=(p.length-1)/2;for(var g=Math.floor(m),b=Math.ceil(m);g<=b;++g){var w=p[g];if(f[c]===c&&d<s[w]&&!Ds(n,c,w))f[w]=c,f[c]=i[c]=i[w],d=s[w]}}})}),{root:i,align:f}}function Gs(r,e,n,o,i){var f={},s=Xs(r,e,n,i),u=i?"borderLeft":"borderRight";function d(m,g){var b=s.nodes(),w=b.pop(),y={};while(w){if(y[w])m(w);else y[w]=!0,b.push(w),b=b.concat(g(w));w=b.pop()}}function c(m){f[m]=s.inEdges(m).reduce(function(g,b){return Math.max(g,f[b.v]+s.edge(b))},0)}function p(m){var g=s.outEdges(m).reduce(function(w,y){return Math.min(w,f[y.w]-s.edge(y))},Number.POSITIVE_INFINITY),b=r.node(m);if(g!==Number.POSITIVE_INFINITY&&b.borderType!==u)f[m]=Math.max(f[m],g)}return d(c,s.predecessors.bind(s)),d(p,s.successors.bind(s)),h(o,function(m){f[m]=f[n[m]]}),f}function Xs(r,e,n,o){var i=new re,f=r.graph(),s=zs(f.nodesep,f.edgesep,o);return h(e,function(u){var d;h(u,function(c){var p=n[c];if(i.setNode(p),d){var m=n[d],g=i.edge(m,p);i.setEdge(m,p,Math.max(s(r,c,d),g||0))}d=c})}),i}function Us(r,e){return J(mt(e),function(n){var{NEGATIVE_INFINITY:o,POSITIVE_INFINITY:i}=Number;return st(n,function(f,s){var u=Ws(r,s)/2;o=Math.max(f+u,o),i=Math.min(f-u,i)}),o-i})}function Vs(r,e){var n=mt(e),o=B(n),i=S(n);h(["u","d"],function(f){h(["l","r"],function(s){var u=f+s,d=r[u],c;if(d===e)return;var p=mt(d);if(c=s==="l"?o-B(p):i-S(p),c)r[u]=H(d,function(m){return m+c})})})}function Ys(r,e){return H(r.ul,function(n,o){if(e)return r[e.toLowerCase()][o];else{var i=A(E(r,o));return(i[1]+i[2])/2}})}function to(r){var e=D(r),n=or(Ms(r,e),js(r,e)),o={},i;h(["u","d"],function(s){i=s==="u"?e:mt(e).reverse(),h(["l","r"],function(u){if(u==="r")i=E(i,function(m){return mt(m).reverse()});var d=(s==="u"?r.predecessors:r.successors).bind(r),c=Fs(r,i,n,d),p=Gs(r,i,c.root,c.align,u==="r");if(u==="r")p=H(p,function(m){return-m});o[s+u]=p})});var f=Us(r,o);return Vs(o,f),Ys(o,r.graph().align)}function zs(r,e,n){return function(o,i,f){var s=o.node(i),u=o.node(f),d=0,c;if(d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=-s.width/2;break;case"r":c=s.width/2;break}if(c)d+=n?c:-c;if(c=0,d+=(s.dummy?e:r)/2,d+=(u.dummy?e:r)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":c=u.width/2;break;case"r":c=-u.width/2;break}if(c)d+=n?c:-c;return c=0,d}}function Ws(r,e){return r.node(e).width}function oo(r){r=Sr(r),qs(r),ut(to(r),function(e,n){r.node(n).x=e})}function qs(r){var e=D(r),n=r.graph().ranksep,o=0;h(e,function(i){var f=S(E(i,function(s){return r.node(s).height}));h(i,function(s){r.node(s).y=o+f/2}),o+=f+n})}function $r(r,e){var n=e&&e.debugTiming?dn:cn;n("layout",()=>{var o=n(" buildLayoutGraph",()=>ou(r));n(" runLayout",()=>Hs(o,n)),n(" updateInputGraph",()=>Ks(r,o))})}function Hs(r,e){e(" makeSpaceForEdgeLabels",()=>iu(r)),e(" removeSelfEdges",()=>mu(r)),e(" acyclic",()=>tn(r)),e(" nestingGraph.run",()=>Dn(r)),e(" rank",()=>Hr(Sr(r))),e(" injectEdgeLabelProxies",()=>au(r)),e(" removeEmptyRanks",()=>sn(r)),e(" nestingGraph.cleanup",()=>Gn(r)),e(" normalizeRanks",()=>fn(r)),e(" assignRankMinMax",()=>fu(r)),e(" removeEdgeLabelProxies",()=>su(r)),e(" normalize.run",()=>On(r)),e(" parentDummyChains",()=>Qn(r)),e(" addBorderSegments",()=>ln(r)),e(" order",()=>$n(r)),e(" insertSelfEdges",()=>hu(r)),e(" adjustCoordinateSystem",()=>hn(r)),e(" position",()=>oo(r)),e(" positionSelfEdges",()=>gu(r)),e(" removeBorderNodes",()=>lu(r)),e(" normalize.undo",()=>Ln(r)),e(" fixupEdgeLabelCoords",()=>cu(r)),e(" undoCoordinateSystem",()=>gn(r)),e(" translateGraph",()=>uu(r)),e(" assignNodeIntersects",()=>du(r)),e(" reversePoints",()=>pu(r)),e(" acyclic.undo",()=>nn(r))}function Ks(r,e){h(r.nodes(),function(n){var o=r.node(n),i=e.node(n);if(o){if(o.x=i.x,o.y=i.y,e.children(n).length)o.width=i.width,o.height=i.height}}),h(r.edges(),function(n){var o=r.edge(n),i=e.edge(n);if(o.points=i.points,Object.prototype.hasOwnProperty.call(i,"x"))o.x=i.x,o.y=i.y}),r.graph().width=e.graph().width,r.graph().height=e.graph().height}var Js=["nodesep","edgesep","ranksep","marginx","marginy"],Zs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$s=["acyclicer","ranker","rankdir","align"],Qs=["width","height"],ru={width:0,height:0},eu=["minlen","weight","width","height","labeloffset"],tu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},nu=["labelpos"];function ou(r){var e=new re({multigraph:!0,compound:!0}),n=Zr(r.graph());return e.setGraph(or({},Zs,Jr(n,Js),Z(n,$s))),h(r.nodes(),function(o){var i=Zr(r.node(o));e.setNode(o,rt(Jr(i,Qs),ru)),e.setParent(o,r.parent(o))}),h(r.edges(),function(o){var i=Zr(r.edge(o));e.setEdge(o,or({},tu,Jr(i,eu),Z(i,nu)))}),e}function iu(r){var e=r.graph();e.ranksep/=2,h(r.edges(),function(n){var o=r.edge(n);if(o.minlen*=2,o.labelpos.toLowerCase()!=="c")if(e.rankdir==="TB"||e.rankdir==="BT")o.width+=o.labeloffset;else o.height+=o.labeloffset})}function au(r){h(r.edges(),function(e){var n=r.edge(e);if(n.width&&n.height){var o=r.node(e.v),i=r.node(e.w),f={rank:(i.rank-o.rank)/2+o.rank,e};T(r,"edge-proxy",f,"_ep")}})}function fu(r){var e=0;h(r.nodes(),function(n){var o=r.node(n);if(o.borderTop)o.minRank=r.node(o.borderTop).rank,o.maxRank=r.node(o.borderBottom).rank,e=S(e,o.maxRank)}),r.graph().maxRank=e}function su(r){h(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="edge-proxy")r.edge(n.e).labelRank=n.rank,r.removeNode(e)})}function uu(r){var e=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,f=r.graph(),s=f.marginx||0,u=f.marginy||0;function d(c){var{x:p,y:m,width:g,height:b}=c;e=Math.min(e,p-g/2),n=Math.max(n,p+g/2),o=Math.min(o,m-b/2),i=Math.max(i,m+b/2)}h(r.nodes(),function(c){d(r.node(c))}),h(r.edges(),function(c){var p=r.edge(c);if(Object.prototype.hasOwnProperty.call(p,"x"))d(p)}),e-=s,o-=u,h(r.nodes(),function(c){var p=r.node(c);p.x-=e,p.y-=o}),h(r.edges(),function(c){var p=r.edge(c);if(h(p.points,function(m){m.x-=e,m.y-=o}),Object.prototype.hasOwnProperty.call(p,"x"))p.x-=e;if(Object.prototype.hasOwnProperty.call(p,"y"))p.y-=o}),f.width=n-e+s,f.height=i-o+u}function du(r){h(r.edges(),function(e){var n=r.edge(e),o=r.node(e.v),i=r.node(e.w),f,s;if(!n.points)n.points=[],f=i,s=o;else f=n.points[0],s=n.points[n.points.length-1];n.points.unshift(Br(o,f)),n.points.push(Br(i,s))})}function cu(r){h(r.edges(),function(e){var n=r.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x")){if(n.labelpos==="l"||n.labelpos==="r")n.width-=n.labeloffset;switch(n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}}})}function pu(r){h(r.edges(),function(e){var n=r.edge(e);if(n.reversed)n.points.reverse()})}function lu(r){h(r.nodes(),function(e){if(r.children(e).length){var n=r.node(e),o=r.node(n.borderTop),i=r.node(n.borderBottom),f=r.node(X(n.borderLeft)),s=r.node(X(n.borderRight));n.width=Math.abs(s.x-f.x),n.height=Math.abs(i.y-o.y),n.x=f.x+n.width/2,n.y=o.y+n.height/2}}),h(r.nodes(),function(e){if(r.node(e).dummy==="border")r.removeNode(e)})}function mu(r){h(r.edges(),function(e){if(e.v===e.w){var n=r.node(e.v);if(!n.selfEdges)n.selfEdges=[];n.selfEdges.push({e,label:r.edge(e)}),r.removeEdge(e)}})}function hu(r){var e=D(r);h(e,function(n){var o=0;h(n,function(i,f){var s=r.node(i);s.order=f+o,h(s.selfEdges,function(u){T(r,"selfedge",{width:u.label.width,height:u.label.height,rank:s.rank,order:f+ ++o,e:u.e,label:u.label},"_se")}),delete s.selfEdges})})}function gu(r){h(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="selfedge"){var o=r.node(n.e.v),i=o.x+o.width/2,f=o.y,s=n.x-i,u=o.height/2;r.setEdge(n.e,n.label),r.removeNode(e),n.label.points=[{x:i+2*s/3,y:f-u},{x:i+5*s/6,y:f-u},{x:i+s,y:f},{x:i+5*s/6,y:f+u},{x:i+2*s/3,y:f+u}],n.label.x=n.x,n.label.y=n.y}})}function Jr(r,e){return H(Z(r,e),Number)}function Zr(r){var e={};return h(r,function(n,o){e[o.toLowerCase()]=n}),e}var fo=t((r,e,n)=>Math.max(e,Math.min(n,r)),"clamp"),so=t((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),vu=t((r)=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram"||r==="er"||r==="classDiagram","shouldMergeSelfLoopSegments"),bu=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],yu=t((r,e,n,o,i)=>{let f=[],s=new Set;if(n.forEach(({start:p,end:m})=>{if(p!==o)s.add(p);if(m!==o)s.add(m)}),s.forEach((p)=>{let m=r.node(p);if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)}),f.length===0)n.forEach(({edge:p})=>{(p.points??[]).forEach((m)=>{if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)})});if(f.length===0)return so(i);let u=f.reduce((p,m)=>({x:p.x+m.x/f.length,y:p.y+m.y/f.length}),{x:0,y:0}),d=u.x-e.x,c=u.y-e.y;if(Math.abs(d)>Math.abs(c))return d>0?"right":"left";if(Math.abs(c)>0)return c>0?"bottom":"top";return so(i)},"getSelfLoopSide"),wu=t((r,e="top",n=0,o=0)=>{let i=r.x,f=r.y-n,s=r.width/2,u=r.height/2,d=Math.max(36,Math.min(100,r.width*0.8)),c=fo(Math.max(o,r.width*0.35),36,d),p=fo(Math.min(r.width,r.height)*0.45,24,48);switch(e){case"bottom":{let m=f+u;return[{x:i-c/2,y:m},{x:i-c/2,y:m+p},{x:i+c/2,y:m+p},{x:i+c/2,y:m}]}case"right":{let m=i+s;return[{x:m,y:f-c/2},{x:m+p,y:f-c/2},{x:m+p,y:f+c/2},{x:m,y:f+c/2}]}case"left":{let m=i-s;return[{x:m,y:f-c/2},{x:m-p,y:f-c/2},{x:m-p,y:f+c/2},{x:m,y:f+c/2}]}case"top":default:{let m=f-u;return[{x:i-c/2,y:m},{x:i-c/2,y:m-p},{x:i+c/2,y:m-p},{x:i+c/2,y:m}]}}},"getSelfLoopPoints"),_u=t((r,e,n="top",o=0,i={})=>{let s=r.x,u=r.y-o,d=i.width??0,c=i.height??0;switch(n){case"bottom":return{x:s,y:Math.max(...e.map((p)=>p.y))+c/2+4};case"right":return{x:Math.max(...e.map((p)=>p.x))+d/2+4,y:u};case"left":return{x:Math.min(...e.map((p)=>p.x))-d/2-4,y:u};case"top":default:return{x:s,y:Math.min(...e.map((p)=>p.y))-c/2-4}}},"getSelfLoopLabelPosition"),no=t((r,e=0,{mergeSelfLoops:n=!0}={})=>{let o=new Map,i=[],f=r.graph()?.rankdir;return r.edges().forEach((s)=>{let u=r.edge(s);if(n&&u.selfLoop){let d=u.selfLoop.id;if(!o.has(d))o.set(d,[]);o.get(d).push({edge:u,start:s.v,end:s.w})}else i.push({edge:u,start:s.v,end:s.w})}),o.forEach((s)=>{if(s.length!==3){s.forEach((_)=>i.push(_));return}s.sort((_,R)=>_.edge.selfLoop.order-R.edge.selfLoop.order);let[u,d,c]=s,p=u.edge.originalEdge??d.edge.originalEdge??c.edge.originalEdge??d.edge,m=r.node(p.start);if(!m){s.forEach((_)=>i.push(_));return}let g={width:d.edge.width,height:d.edge.height},b=yu(r,m,s,p.start,f),w=wu(m,b,e,g.width??0),y=_u(m,w,b,e,g),v={...d.edge,...p,id:p.id,points:w,start:p.start,end:p.end,x:y.x,y:y.y,width:g.width,height:g.height,labelStyle:d.edge.labelStyle,fromCluster:u.edge.fromCluster??d.edge.fromCluster??c.edge.fromCluster,toCluster:u.edge.toCluster??d.edge.toCluster??c.edge.toCluster};delete v.selfLoop,delete v.originalEdge,i.push({edge:v,start:v.start,end:v.end})}),i},"getEdgesToRender"),co=t(async({element:r,graph:e,diagramType:n,id:o,parentCluster:i,siteConfig:f})=>{let s=e.graph().rankdir;a.trace("Dir in recursive render - dir:",s);let{clusters:u,edgePaths:d,edgeLabels:c,nodes:p,rootGroups:m}=ua(r,{edgePathsClass:"edgePaths"});if(!e.nodes())a.info("No nodes found for",e);else a.info("Recursive render XXX",e.nodes());if(e.edges().length>0)a.info("Recursive edges",e.edge(e.edges()[0]));let g=vu(n);await Promise.all(e.nodes().map(async function(y){let v=e.node(y);if(i!==void 0){let _=JSON.parse(JSON.stringify(i.clusterData));if(a.trace(`Setting data for parent cluster XXX
|
|
1
|
+
import{t,a,l,I,St,ko,vt,Jt,Et,Zn,en}from"./chunk-c6m4vfn5.js";import{be,Pe,Je,Ee,dt,Vt,Y,me,lt,Gt,ct,cr,ha,ga,ya,vn,kt,va,bn,Oe,xn,$t,Ct,_n,Wt,wn,ba,xa,ur,xe,_a,kn,Ht,Cn,dr,pr,Yt,wa,mr,ka,qr,pt,fr,Ca,Sa,Ta,He,hr,gr,Sn,Ea,yr,g,et,mt,_e,Zt,re}from"./chunk-p7pa02k9.js";import{pa,ma,G,Fn,so,fa,lr}from"./chunk-wpxtkxjt.js";import{Rt}from"./chunk-ve8gy05p.js";var br={};Rt(br,{default:()=>rr});var lo=/\s/;function mo(r){var e=r.length;while(e--&&lo.test(r.charAt(e)));return e}var te=mo;var ho=/^\s+/;function go(r){return r?r.slice(0,te(r)+1).replace(ho,""):r}var ne=go;var oe=NaN,vo=/^[-+]0x[0-9a-f]+$/i,bo=/^0b[01]+$/i,yo=/^0o[0-7]+$/i,wo=parseInt;function _o(r){if(typeof r=="number")return r;if(dt(r))return oe;if(me(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=me(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=ne(r);var n=bo.test(r);return n||yo.test(r)?wo(r.slice(2),n?2:8):vo.test(r)?oe:+r}var ie=_o;var ae=1/0,Eo=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function xo(r){if(!r)return r===0?r:0;if(r=ie(r),r===ae||r===-ae){var e=r<0?-1:1;return e*Eo}return r===r?r:0}var z=xo;function Oo(r){var e=z(r),n=e%1;return e===e?n?e-n:e:0}var fe=Oo;var se=Object.create,Lo=function(){function r(){}return function(e){if(!me(e))return{};if(se)return se(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}(),ue=Lo;function Io(r,e){var n=-1,o=r.length;e||(e=Array(o));while(++n<o)e[n]=r[n];return e}var sr=Io;function So(r,e,n){if(e=="__proto__"&&cr)cr(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0});else r[e]=n}var M=So;var Po=Object.prototype,To=Po.hasOwnProperty;function Co(r,e,n){var o=r[e];if(!(To.call(r,e)&&kt(o,n))||n===void 0&&!(e in r))M(r,e,n)}var j=Co;function Ao(r,e,n,o){var i=!n;n||(n={});var f=-1,s=e.length;while(++f<s){var u=e[f],d=o?o(n[u],r[u],u,n,r):void 0;if(d===void 0)d=r[u];if(i)M(n,u,d);else j(n,u,d)}return n}var k=Ao;function Ro(r,e,n){if(!me(n))return!1;var o=typeof e;if(o=="number"?Oe(n)&&vn(e,n.length):o=="string"&&(e in n))return kt(n[e],r);return!1}var C=Ro;function jo(r){return bn(function(e,n){var o=-1,i=n.length,f=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;if(f=r.length>3&&typeof f=="function"?(i--,f):void 0,s&&C(n[0],n[1],s))f=i<3?void 0:f,i=1;e=Object(e);while(++o<i){var u=n[o];if(u)r(e,u,o,f)}return e})}var de=jo;function Bo(r){var e=[];if(r!=null)for(var n in Object(r))e.push(n);return e}var ce=Bo;var Fo=Object.prototype,Go=Fo.hasOwnProperty;function Xo(r){if(!me(r))return ce(r);var e=xn(r),n=[];for(var o in r)if(!(o=="constructor"&&(e||!Go.call(r,o))))n.push(o);return n}var pe=Xo;function Uo(r){return Oe(r)?ba(r,!0):pe(r)}var L=Uo;function Vo(r){var e=r==null?0:r.length;return e?pr(r,1):[]}var N=Vo;function Yo(r){return ha(va(r,void 0,N),r+"")}var le=Yo;var zo=xa(Object.getPrototypeOf,Object),W=zo;var Wo="[object Object]",qo=Function.prototype,Ho=Object.prototype,he=qo.toString,Ko=Ho.hasOwnProperty,Jo=he.call(Object);function Zo(r){if(!Ee(r)||Je(r)!=Wo)return!1;var e=W(r);if(e===null)return!0;var n=Ko.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&he.call(n)==Jo}var ge=Zo;var $o="\\ud800-\\udfff",Qo="\\u0300-\\u036f",ri="\\ufe20-\\ufe2f",ei="\\u20d0-\\u20ff",ti=Qo+ri+ei,ni="\\ufe0e\\ufe0f",oi="\\u200d",ii=RegExp("["+oi+$o+ti+ni+"]");function ai(r){return ii.test(r)}var ve=ai;function fi(r,e){return r&&k(e,xe(e),r)}var ye=fi;function si(r,e){return r&&k(e,L(e),r)}var we=si;var Ne=typeof br=="object"&&br&&!br.nodeType&&br,Le=Ne&&typeof vr=="object"&&vr&&!vr.nodeType&&vr,ui=Le&&Le.exports===Ne,Ie=ui?be.Buffer:void 0,Se=Ie?Ie.allocUnsafe:void 0;function di(r,e){if(e)return r.slice();var n=r.length,o=Se?Se(n):new r.constructor(n);return r.copy(o),o}var rr=di;function ci(r,e){return k(r,mr(r),e)}var ke=ci;var pi=Object.getOwnPropertySymbols,li=!pi?wa:function(r){var e=[];while(r)dr(e,mr(r)),r=W(r);return e},wr=li;function mi(r,e){return k(r,wr(r),e)}var Te=mi;function hi(r){return ka(r,L,wr)}var Ce=hi;var gi=Object.prototype,vi=gi.hasOwnProperty;function bi(r){var e=r.length,n=new r.constructor(e);if(e&&typeof r[0]=="string"&&vi.call(r,"index"))n.index=r.index,n.input=r.input;return n}var Ae=bi;function yi(r){var e=new r.constructor(r.byteLength);return new fr(e).set(new fr(r)),e}var q=yi;function wi(r,e){var n=e?q(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}var Re=wi;var _i=/\w*$/;function Ei(r){var e=new r.constructor(r.source,_i.exec(r));return e.lastIndex=r.lastIndex,e}var Me=Ei;var je=Pe?Pe.prototype:void 0,Be=je?je.valueOf:void 0;function xi(r){return Be?Object(Be.call(r)):{}}var De=xi;function Oi(r,e){var n=e?q(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}var _r=Oi;var Li="[object Boolean]",Ii="[object Date]",Si="[object Map]",Ni="[object Number]",Pi="[object RegExp]",ki="[object Set]",Ti="[object String]",Ci="[object Symbol]",Ai="[object ArrayBuffer]",Ri="[object DataView]",Mi="[object Float32Array]",ji="[object Float64Array]",Bi="[object Int8Array]",Di="[object Int16Array]",Fi="[object Int32Array]",Gi="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Ui="[object Uint16Array]",Vi="[object Uint32Array]";function Yi(r,e,n){var o=r.constructor;switch(e){case Ai:return q(r);case Li:case Ii:return new o(+r);case Ri:return Re(r,n);case Mi:case ji:case Bi:case Di:case Fi:case Gi:case Xi:case Ui:case Vi:return _r(r,n);case Si:return new o;case Ni:case Ti:return new o(r);case Pi:return Me(r);case ki:return new o;case Ci:return De(r)}}var Fe=Yi;function zi(r){return typeof r.constructor=="function"&&!xn(r)?ue(W(r)):{}}var Er=zi;var Wi="[object Map]";function qi(r){return Ee(r)&&pt(r)==Wi}var Ge=qi;var Xe=Wt&&Wt.isMap,Hi=Xe?_n(Xe):Ge,Ue=Hi;var Ki="[object Set]";function Ji(r){return Ee(r)&&pt(r)==Ki}var Ve=Ji;var Ye=Wt&&Wt.isSet,Zi=Ye?_n(Ye):Ve,ze=Zi;var $i=1,Qi=2,ra=4,We="[object Arguments]",ea="[object Array]",ta="[object Boolean]",na="[object Date]",oa="[object Error]",qe="[object Function]",ia="[object GeneratorFunction]",aa="[object Map]",sa="[object Number]",Ke="[object Object]",ua="[object RegExp]",da="[object Set]",ca="[object String]",la="[object Symbol]",Oa="[object WeakMap]",La="[object ArrayBuffer]",Ia="[object DataView]",Na="[object Float32Array]",Pa="[object Float64Array]",Aa="[object Int8Array]",Ra="[object Int16Array]",Ma="[object Int32Array]",ja="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",Fa="[object Uint32Array]",x={};x[We]=x[ea]=x[La]=x[Ia]=x[ta]=x[na]=x[Na]=x[Pa]=x[Aa]=x[Ra]=x[Ma]=x[aa]=x[sa]=x[Ke]=x[ua]=x[da]=x[ca]=x[la]=x[ja]=x[Ba]=x[Da]=x[Fa]=!0;x[oa]=x[qe]=x[Oa]=!1;function xr(r,e,n,o,i,f){var s,u=e&$i,d=e&Qi,c=e&ra;if(n)s=i?n(r,o,i,f):n(r);if(s!==void 0)return s;if(!me(r))return r;var p=Y(r);if(p){if(s=Ae(r),!u)return sr(r,s)}else{var m=pt(r),h=m==qe||m==ia;if(Ct(r))return rr(r,u);if(m==Ke||m==We||h&&!i){if(s=d||h?{}:Er(r),!u)return d?Te(r,we(s,r)):ke(r,ye(s,r))}else{if(!x[m])return i?r:{};s=Fe(r,m,u)}}f||(f=new Yt);var b=f.get(r);if(b)return b;if(f.set(r,s),ze(r))r.forEach(function(v){s.add(xr(v,e,n,v,r,f))});else if(Ue(r))r.forEach(function(v,_){s.set(_,xr(v,e,n,_,r,f))});var w=c?d?Ce:qr:d?L:xe,y=p?void 0:w(r);return ga(y||r,function(v,_){if(y)_=v,v=r[_];j(s,_,xr(v,e,n,_,r,f))}),s}var Ze=xr;var Ga=1,Xa=4;function Ua(r){return Ze(r,Ga|Xa)}var $e=Ua;var Va=function(){return be.Date.now()},kr=Va;var Qe=Object.prototype,Ya=Qe.hasOwnProperty,za=bn(function(r,e){r=Object(r);var n=-1,o=e.length,i=o>2?e[2]:void 0;if(i&&C(e[0],e[1],i))o=1;while(++n<o){var f=e[n],s=L(f),u=-1,d=s.length;while(++u<d){var c=s[u],p=r[c];if(p===void 0||kt(p,Qe[c])&&!Ya.call(r,c))r[c]=f[c]}}return r}),rt=za;function Wa(r,e,n){if(n!==void 0&&!kt(r[e],n)||n===void 0&&!(e in r))M(r,e,n)}var er=Wa;function qa(r,e){if(e==="constructor"&&typeof r[e]==="function")return;if(e=="__proto__")return;return r[e]}var tr=qa;function Ha(r){return k(r,L(r))}var tt=Ha;function Ka(r,e,n,o,i,f,s){var u=tr(r,n),d=tr(e,n),c=s.get(d);if(c){er(r,n,c);return}var p=f?f(u,d,n+"",r,e,s):void 0,m=p===void 0;if(m){var h=Y(d),b=!h&&Ct(d),w=!h&&!b&&wn(d);if(p=d,h||b||w)if(Y(u))p=u;else if(Ea(u))p=sr(u);else if(b)m=!1,p=rr(d,!0);else if(w)m=!1,p=_r(d,!0);else p=[];else if(ge(d)||$t(d)){if(p=u,$t(u))p=tt(u);else if(!me(u)||Gt(u))p=Er(d)}else m=!1}if(m)s.set(d,p),i(p,d,o,f,s),s.delete(d);er(r,n,p)}var nt=Ka;function ot(r,e,n,o,i){if(r===e)return;hr(e,function(f,s){if(i||(i=new Yt),me(f))nt(r,e,s,n,ot,o,i);else{var u=o?o(tr(r,s),f,s+"",r,e,i):void 0;if(u===void 0)u=f;er(r,s,u)}},L)}var it=ot;function Ja(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var U=Ja;function Za(r){return function(e,n,o){var i=Object(e);if(!Oe(e)){var f=He(n,3);e=xe(e),n=function(u){return f(i[u],u,i)}}var s=r(e,n,o);return s>-1?i[f?e[s]:s]:void 0}}var at=Za;var $a=Math.max;function Qa(r,e,n){var o=r==null?0:r.length;if(!o)return-1;var i=n==null?0:fe(n);if(i<0)i=$a(o+i,0);return ya(r,He(e,3),i)}var ft=Qa;var rf=at(ft),nr=rf;function ef(r,e){var n=-1,o=Oe(r)?Array(r.length):[];return Sn(r,function(i,f,s){o[++n]=e(i,f,s)}),o}var Or=ef;function tf(r,e){var n=Y(r)?Vt:Or;return n(r,He(e,3))}var E=tf;function nf(r,e){return r==null?r:hr(r,yr(e),L)}var st=nf;function of(r,e){return r&&gr(r,yr(e))}var ut=of;function af(r,e){return r>e}var ht=af;var ff=Object.prototype,sf=ff.hasOwnProperty;function uf(r,e){return r!=null&&sf.call(r,e)}var gt=uf;function df(r,e){return r!=null&&Ca(r,e,gt)}var Lr=df;var cf="[object String]";function pf(r){return typeof r=="string"||!Y(r)&&Ee(r)&&Je(r)==cf}var bt=pf;function lf(r,e){return r<e}var Ir=lf;function mf(r,e){var n={};return e=He(e,3),gr(r,function(o,i,f){M(n,i,e(o,i,f))}),n}var H=mf;function hf(r,e,n){var o=-1,i=r.length;while(++o<i){var f=r[o],s=e(f);if(s!=null&&(u===void 0?s===s&&!dt(s):n(s,u)))var u=s,d=f}return d}var K=hf;function gf(r){return r&&r.length?K(r,lt,ht):void 0}var S=gf;var vf=de(function(r,e,n){it(r,e,n)}),or=vf;function bf(r){return r&&r.length?K(r,lt,Ir):void 0}var B=bf;function yf(r,e){return r&&r.length?K(r,He(e,2),Ir):void 0}var J=yf;function wf(r,e,n,o){if(!me(r))return r;e=kn(e,r);var i=-1,f=e.length,s=f-1,u=r;while(u!=null&&++i<f){var d=Ht(e[i]),c=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return r;if(i!=s){var p=u[d];if(c=o?o(p,d,u):void 0,c===void 0)c=me(p)?p:vn(e[i+1])?[]:{}}j(u,d,c),u=u[d]}return r}var yt=wf;function _f(r,e,n){var o=-1,i=e.length,f={};while(++o<i){var s=e[o],u=Cn(r,s);if(n(u,s))yt(f,kn(s,r),u)}return f}var wt=_f;function Ef(r,e){var n=r.length;r.sort(e);while(n--)r[n]=r[n].value;return r}var _t=Ef;function xf(r,e){if(r!==e){var n=r!==void 0,o=r===null,i=r===r,f=dt(r),s=e!==void 0,u=e===null,d=e===e,c=dt(e);if(!u&&!c&&!f&&r>e||f&&s&&d&&!u&&!c||o&&s&&d||!n&&d||!i)return 1;if(!o&&!f&&!c&&r<e||c&&n&&i&&!o&&!f||u&&n&&i||!s&&i||!d)return-1}return 0}var xt=xf;function Of(r,e,n){var o=-1,i=r.criteria,f=e.criteria,s=i.length,u=n.length;while(++o<s){var d=xt(i[o],f[o]);if(d){if(o>=u)return d;var c=n[o];return d*(c=="desc"?-1:1)}}return r.index-e.index}var Ot=Of;function Lf(r,e,n){if(e.length)e=Vt(e,function(f){if(Y(f))return function(s){return Cn(s,f.length===1?f[0]:f)};return f});else e=[lt];var o=-1;e=Vt(e,_n(He));var i=Or(r,function(f,s,u){var d=Vt(e,function(c){return c(f)});return{criteria:d,index:++o,value:f}});return _t(i,function(f,s){return Ot(f,s,n)})}var Lt=Lf;var If=Ta("length"),It=If;var Pt="\\ud800-\\udfff",Sf="\\u0300-\\u036f",Nf="\\ufe20-\\ufe2f",Pf="\\u20d0-\\u20ff",kf=Sf+Nf+Pf,Tf="\\ufe0e\\ufe0f",Cf="["+Pt+"]",Tr="["+kf+"]",Cr="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Tr+"|"+Cr+")",Tt="[^"+Pt+"]",At="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rf="\\u200d",jt=Af+"?",Bt="["+Tf+"]?",Mf="(?:"+Rf+"(?:"+[Tt,At,Mt].join("|")+")"+Bt+jt+")*",jf=Bt+jt+Mf,Bf="(?:"+[Tt+Tr+"?",Tr,At,Mt,Cf].join("|")+")",Nt=RegExp(Cr+"(?="+Cr+")|"+Bf+jf,"g");function Df(r){var e=Nt.lastIndex=0;while(Nt.test(r))++e;return e}var Dt=Df;function Ff(r){return ve(r)?Dt(r):It(r)}var Ft=Ff;function Gf(r,e){return wt(r,e,function(n,o){return Sa(r,o)})}var Xt=Gf;var Xf=le(function(r,e){return r==null?{}:Xt(r,e)}),Z=Xf;var{ceil:Uf,max:Vf}=Math;function Yf(r,e,n,o){var i=-1,f=Vf(Uf((e-r)/(n||1)),0),s=Array(f);while(f--)s[o?f:++i]=r,r+=n;return s}var Ut=Yf;function zf(r){return function(e,n,o){if(o&&typeof o!="number"&&C(e,n,o))n=o=void 0;if(e=z(e),n===void 0)n=e,e=0;else n=z(n);return o=o===void 0?e<n?1:-1:z(o),Ut(e,n,o,r)}}var zt=zf;var Wf=zt(),P=Wf;var qf="[object Map]",Hf="[object Set]";function Kf(r){if(r==null)return 0;if(Oe(r))return bt(r)?Ft(r):r.length;var e=pt(r);if(e==qf||e==Hf)return r.size;return ur(r).length}var qt=Kf;var Jf=bn(function(r,e){if(r==null)return[];var n=e.length;if(n>1&&C(r,e[0],e[1]))e=[];else if(n>2&&C(e[0],e[1],e[2]))e=[e[0]];return Lt(r,pr(e,1),[])}),A=Jf;var Zf=0;function $f(r){var e=++Zf;return _a(r)+e}var Q=$f;function Qf(r,e,n){var o=-1,i=r.length,f=e.length,s={};while(++o<i){var u=o<f?e[o]:void 0;n(s,r[o],u)}return s}var Kt=Qf;function rs(r,e){return Kt(r||[],e||[],j)}var Ar=rs;class Rr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,e=r._prev;if(e!==r)return Qt(e),e}enqueue(r){var e=this._sentinel;if(r._prev&&r._next)Qt(r);r._next=e._next,e._next._prev=r,e._next=r,r._prev=e}toString(){var r=[],e=this._sentinel,n=e._prev;while(n!==e)r.push(JSON.stringify(n,es)),n=n._prev;return"["+r.join(", ")+"]"}}function Qt(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function es(r,e){if(r!=="_next"&&r!=="_prev")return e}var ts=ct(1);function rn(r,e){if(r.nodeCount()<=1)return[];var n=os(r,e||ts),o=ns(n.graph,n.buckets,n.zeroIdx);return N(E(o,function(i){return r.outEdges(i.v,i.w)}))}function ns(r,e,n){var o=[],i=e[e.length-1],f=e[0],s;while(r.nodeCount()){while(s=f.dequeue())Mr(r,e,n,s);while(s=i.dequeue())Mr(r,e,n,s);if(r.nodeCount()){for(var u=e.length-2;u>0;--u)if(s=e[u].dequeue(),s){o=o.concat(Mr(r,e,n,s,!0));break}}}return o}function Mr(r,e,n,o,i){var f=i?[]:void 0;return g(r.inEdges(o.v),function(s){var u=r.edge(s),d=r.node(s.v);if(i)f.push({v:s.v,w:s.w});d.out-=u,jr(e,n,d)}),g(r.outEdges(o.v),function(s){var u=r.edge(s),d=s.w,c=r.node(d);c.in-=u,jr(e,n,c)}),r.removeNode(o.v),f}function os(r,e){var n=new re,o=0,i=0;g(r.nodes(),function(u){n.setNode(u,{v:u,in:0,out:0})}),g(r.edges(),function(u){var d=n.edge(u.v,u.w)||0,c=e(u),p=d+c;n.setEdge(u.v,u.w,p),i=Math.max(i,n.node(u.v).out+=c),o=Math.max(o,n.node(u.w).in+=c)});var f=P(i+o+3).map(function(){return new Rr}),s=o+1;return g(n.nodes(),function(u){jr(f,s,n.node(u))}),{graph:n,buckets:f,zeroIdx:s}}function jr(r,e,n){if(!n.out)r[0].enqueue(n);else if(!n.in)r[r.length-1].enqueue(n);else r[n.out-n.in+e].enqueue(n)}function tn(r){var e=r.graph().acyclicer==="greedy"?rn(r,n(r)):is(r);g(e,function(o){var i=r.edge(o);r.removeEdge(o),i.forwardName=o.name,i.reversed=!0,r.setEdge(o.w,o.v,i,Q("rev"))});function n(o){return function(i){return o.edge(i).weight}}}function is(r){var e=[],n={},o={};function i(f){if(Object.prototype.hasOwnProperty.call(o,f))return;o[f]=!0,n[f]=!0,g(r.outEdges(f),function(s){if(Object.prototype.hasOwnProperty.call(n,s.w))e.push(s);else i(s.w)}),delete n[f]}return g(r.nodes(),i),e}function nn(r){g(r.edges(),function(e){var n=r.edge(e);if(n.reversed){r.removeEdge(e);var o=n.forwardName;delete n.reversed,delete n.forwardName,r.setEdge(e.w,e.v,n,o)}})}function T(r,e,n,o){var i;do i=Q(o);while(r.hasNode(i));return n.dummy=e,r.setNode(i,n),i}function an(r){var e=new re().setGraph(r.graph());return g(r.nodes(),function(n){e.setNode(n,r.node(n))}),g(r.edges(),function(n){var o=e.edge(n.v,n.w)||{weight:0,minlen:1},i=r.edge(n);e.setEdge(n.v,n.w,{weight:o.weight+i.weight,minlen:Math.max(o.minlen,i.minlen)})}),e}function Sr(r){var e=new re({multigraph:r.isMultigraph()}).setGraph(r.graph());return g(r.nodes(),function(n){if(!r.children(n).length)e.setNode(n,r.node(n))}),g(r.edges(),function(n){e.setEdge(n,r.edge(n))}),e}function Br(r,e){var{x:n,y:o}=r,i=e.x-n,f=e.y-o,s=r.width/2,u=r.height/2;if(!i&&!f)throw Error("Not possible to find intersection inside of the rectangle");var d,c;if(Math.abs(f)*s>Math.abs(i)*u){if(f<0)u=-u;d=u*i/f,c=u}else{if(i<0)s=-s;d=s,c=s*f/i}return{x:n+d,y:o+c}}function D(r){var e=E(P(Fr(r)+1),function(){return[]});return g(r.nodes(),function(n){var o=r.node(n),i=o.rank;if(!_e(i))e[i][o.order]=n}),e}function fn(r){var e=B(E(r.nodes(),function(n){return r.node(n).rank}));g(r.nodes(),function(n){var o=r.node(n);if(Lr(o,"rank"))o.rank-=e})}function sn(r){var e=B(E(r.nodes(),function(f){return r.node(f).rank})),n=[];g(r.nodes(),function(f){var s=r.node(f).rank-e;if(!n[s])n[s]=[];n[s].push(f)});var o=0,i=r.graph().nodeRankFactor;g(n,function(f,s){if(_e(f)&&s%i!==0)--o;else if(o)g(f,function(u){r.node(u).rank+=o})})}function Dr(r,e,n,o){var i={width:0,height:0};if(arguments.length>=4)i.rank=n,i.order=o;return T(r,"border",i,e)}function Fr(r){return S(E(r.nodes(),function(e){var n=r.node(e).rank;if(!_e(n))return n}))}function un(r,e){var n={lhs:[],rhs:[]};return g(r,function(o){if(e(o))n.lhs.push(o);else n.rhs.push(o)}),n}function dn(r,e){var n=kr();try{return e()}finally{console.log(r+" time: "+(kr()-n)+"ms")}}function cn(r,e){return e()}function ln(r){function e(n){var o=r.children(n),i=r.node(n);if(o.length)g(o,e);if(Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var f=i.minRank,s=i.maxRank+1;f<s;++f)pn(r,"borderLeft","_bl",n,i,f),pn(r,"borderRight","_br",n,i,f)}}g(r.children(),e)}function pn(r,e,n,o,i,f){var s={width:0,height:0,rank:f,borderType:e},u=i[e][f-1],d=T(r,"border",s,n);if(i[e][f]=d,r.setParent(d,o),u)r.setEdge(u,d,{weight:1})}function hn(r){var e=r.graph().rankdir.toLowerCase();if(e==="lr"||e==="rl")yn(r)}function gn(r){var e=r.graph().rankdir.toLowerCase();if(e==="bt"||e==="rl")as(r);if(e==="lr"||e==="rl")fs(r),yn(r)}function yn(r){g(r.nodes(),function(e){mn(r.node(e))}),g(r.edges(),function(e){mn(r.edge(e))})}function mn(r){var e=r.width;r.width=r.height,r.height=e}function as(r){g(r.nodes(),function(e){Gr(r.node(e))}),g(r.edges(),function(e){var n=r.edge(e);if(g(n.points,Gr),Object.prototype.hasOwnProperty.call(n,"y"))Gr(n)})}function Gr(r){r.y=-r.y}function fs(r){g(r.nodes(),function(e){Xr(r.node(e))}),g(r.edges(),function(e){var n=r.edge(e);if(g(n.points,Xr),Object.prototype.hasOwnProperty.call(n,"x"))Xr(n)})}function Xr(r){var e=r.x;r.x=r.y,r.y=e}function En(r){r.graph().dummyChains=[],g(r.edges(),function(e){us(r,e)})}function us(r,e){var n=e.v,o=r.node(n).rank,i=e.w,f=r.node(i).rank,s=e.name,u=r.edge(e),d=u.labelRank;if(f===o+1)return;r.removeEdge(e);var c=void 0,p,m;for(m=0,++o;o<f;++m,++o){if(u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:e,rank:o},p=T(r,"edge",c,"_d"),o===d)c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos;if(r.setEdge(n,p,{weight:u.weight},s),m===0)r.graph().dummyChains.push(p);n=p}r.setEdge(n,i,{weight:u.weight},s)}function On(r){g(r.graph().dummyChains,function(e){var n=r.node(e),o=n.edgeLabel,i;r.setEdge(n.edgeObj,o);while(n.dummy){if(i=r.successors(e)[0],r.removeNode(e),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label")o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height;e=i,n=r.node(e)}})}function ir(r){var e={};function n(o){var i=r.node(o);if(Object.prototype.hasOwnProperty.call(e,o))return i.rank;e[o]=!0;var f=B(E(r.outEdges(o),function(s){return n(s.w)-r.edge(s).minlen}));if(f===Number.POSITIVE_INFINITY||f===void 0||f===null)f=0;return i.rank=f}g(r.sources(),n)}function V(r,e){return r.node(e.w).rank-r.node(e.v).rank-r.edge(e).minlen}function Nr(r){var e=new re({directed:!1}),n=r.nodes()[0],o=r.nodeCount();e.setNode(n,{});var i,f;while(ds(e,r)<o)i=cs(e,r),f=e.hasNode(i.v)?V(r,i):-V(r,i),ps(e,r,f);return e}function ds(r,e){function n(o){g(e.nodeEdges(o),function(i){var f=i.v,s=o===f?i.w:f;if(!r.hasNode(s)&&!V(e,i))r.setNode(s,{}),r.setEdge(o,s,{}),n(s)})}return g(r.nodes(),n),r.nodeCount()}function cs(r,e){return J(e.edges(),function(n){if(r.hasNode(n.v)!==r.hasNode(n.w))return V(e,n)})}function ps(r,e,n){g(r.nodes(),function(o){e.node(o).rank+=n})}var dh=ct(1);var vh=ct(1);Ur.CycleException=ar;function Ur(r){var e={},n={},o=[];function i(f){if(Object.prototype.hasOwnProperty.call(n,f))throw new ar;if(!Object.prototype.hasOwnProperty.call(e,f))n[f]=!0,e[f]=!0,g(r.predecessors(f),i),delete n[f],o.push(f)}if(g(r.sinks(),i),qt(e)!==r.nodeCount())throw new ar;return o}function ar(){}ar.prototype=Error();function Pr(r,e,n){if(!Y(e))e=[e];var o=(r.isDirected()?r.successors:r.neighbors).bind(r),i=[],f={};return g(e,function(s){if(!r.hasNode(s))throw Error("Graph does not have node: "+s);In(r,s,n==="post",f,o,i)}),i}function In(r,e,n,o,i,f){if(!Object.prototype.hasOwnProperty.call(o,e)){if(o[e]=!0,!n)f.push(e);if(g(i(e),function(s){In(r,s,n,o,i,f)}),n)f.push(e)}}function Vr(r,e){return Pr(r,e,"post")}function Yr(r,e){return Pr(r,e,"pre")}X.initLowLimValues=Wr;X.initCutValues=zr;X.calcCutValue=Pn;X.leaveEdge=An;X.enterEdge=Rn;X.exchangeEdges=Mn;function X(r){r=an(r),ir(r);var e=Nr(r);Wr(e),zr(e,r);var n,o;while(n=An(e))o=Rn(e,r,n),Mn(e,r,n,o)}function zr(r,e){var n=Vr(r,r.nodes());n=n.slice(0,n.length-1),g(n,function(o){vs(r,e,o)})}function vs(r,e,n){var o=r.node(n),i=o.parent;r.edge(n,i).cutvalue=Pn(r,e,n)}function Pn(r,e,n){var o=r.node(n),i=o.parent,f=!0,s=e.edge(n,i),u=0;if(!s)f=!1,s=e.edge(i,n);return u=s.weight,g(e.nodeEdges(n),function(d){var c=d.v===n,p=c?d.w:d.v;if(p!==i){var m=c===f,h=e.edge(d).weight;if(u+=m?h:-h,ys(r,n,p)){var b=r.edge(n,p).cutvalue;u+=m?-b:b}}}),u}function Wr(r,e){if(arguments.length<2)e=r.nodes()[0];Tn(r,{},1,e)}function Tn(r,e,n,o,i){var f=n,s=r.node(o);if(e[o]=!0,g(r.neighbors(o),function(u){if(!Object.prototype.hasOwnProperty.call(e,u))n=Tn(r,e,n,u,o)}),s.low=f,s.lim=n++,i)s.parent=i;else delete s.parent;return n}function An(r){return nr(r.edges(),function(e){return r.edge(e).cutvalue<0})}function Rn(r,e,n){var{v:o,w:i}=n;if(!e.hasEdge(o,i))o=n.w,i=n.v;var f=r.node(o),s=r.node(i),u=f,d=!1;if(f.lim>s.lim)u=s,d=!0;var c=et(e.edges(),function(p){return d===Nn(r,r.node(p.v),u)&&d!==Nn(r,r.node(p.w),u)});return J(c,function(p){return V(e,p)})}function Mn(r,e,n,o){var{v:i,w:f}=n;r.removeEdge(i,f),r.setEdge(o.v,o.w,{}),Wr(r),zr(r,e),bs(r,e)}function bs(r,e){var n=nr(r.nodes(),function(i){return!e.node(i).parent}),o=Yr(r,n);o=o.slice(1),g(o,function(i){var f=r.node(i).parent,s=e.edge(i,f),u=!1;if(!s)s=e.edge(f,i),u=!0;e.node(i).rank=e.node(f).rank+(u?s.minlen:-s.minlen)})}function ys(r,e,n){return r.hasEdge(e,n)}function Nn(r,e,n){return n.low<=e.lim&&e.lim<=n.lim}function Hr(r){switch(r.graph().ranker){case"network-simplex":jn(r);break;case"tight-tree":_s(r);break;case"longest-path":ws(r);break;default:jn(r)}}var ws=ir;function _s(r){ir(r),Nr(r)}function jn(r){X(r)}function Bn(r){var e=T(r,"root",{},"_root"),n=Es(r),o=S(mt(n))-1,i=2*o+1;r.graph().nestingRoot=e,g(r.edges(),function(s){r.edge(s).minlen*=i});var f=xs(r)+1;g(r.children(),function(s){Dn(r,e,i,f,o,n,s)}),r.graph().nodeRankFactor=i}function Dn(r,e,n,o,i,f,s){var u=r.children(s);if(!u.length){if(s!==e)r.setEdge(e,s,{weight:0,minlen:n});return}var d=Dr(r,"_bt"),c=Dr(r,"_bb"),p=r.node(s);if(r.setParent(d,s),p.borderTop=d,r.setParent(c,s),p.borderBottom=c,g(u,function(m){Dn(r,e,n,o,i,f,m);var h=r.node(m),b=h.borderTop?h.borderTop:m,w=h.borderBottom?h.borderBottom:m,y=h.borderTop?o:2*o,v=b!==w?1:i-f[s]+1;r.setEdge(d,b,{weight:y,minlen:v,nestingEdge:!0}),r.setEdge(w,c,{weight:y,minlen:v,nestingEdge:!0})}),!r.parent(s))r.setEdge(e,d,{weight:0,minlen:i+f[s]})}function Es(r){var e={};function n(o,i){var f=r.children(o);if(f&&f.length)g(f,function(s){n(s,i+1)});e[o]=i}return g(r.children(),function(o){n(o,1)}),e}function xs(r){return Zt(r.edges(),function(e,n){return e+r.edge(n).weight},0)}function Gn(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,g(r.edges(),function(n){var o=r.edge(n);if(o.nestingEdge)r.removeEdge(n)})}function Xn(r,e,n){var o={},i;g(n,function(f){var s=r.parent(f),u,d;while(s){if(u=r.parent(s),u)d=o[u],o[u]=s;else d=i,i=s;if(d&&d!==s){e.setEdge(d,s);return}s=u}})}function Un(r,e,n){var o=Ls(r),i=new re({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(f){return r.node(f)});return g(r.nodes(),function(f){var s=r.node(f),u=r.parent(f);if(s.rank===e||s.minRank<=e&&e<=s.maxRank){if(i.setNode(f),i.setParent(f,u||o),g(r[n](f),function(d){var c=d.v===f?d.w:d.v,p=i.edge(c,f),m=!_e(p)?p.weight:0;i.setEdge(c,f,{weight:r.edge(d).weight+m})}),Object.prototype.hasOwnProperty.call(s,"minRank"))i.setNode(f,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]})}}),i}function Ls(r){var e;while(r.hasNode(e=Q("_root")));return e}function Vn(r,e){var n=0;for(var o=1;o<e.length;++o)n+=Is(r,e[o-1],e[o]);return n}function Is(r,e,n){var o=Ar(n,E(n,function(c,p){return p})),i=N(E(e,function(c){return A(E(r.outEdges(c),function(p){return{pos:o[p.w],weight:r.edge(p).weight}}),"pos")})),f=1;while(f<n.length)f<<=1;var s=2*f-1;f-=1;var u=E(Array(s),function(){return 0}),d=0;return g(i.forEach(function(c){var p=c.pos+f;u[p]+=c.weight;var m=0;while(p>0){if(p%2)m+=u[p+1];p=p-1>>1,u[p]+=c.weight}d+=c.weight*m})),d}function Yn(r){var e={},n=et(r.nodes(),function(u){return!r.children(u).length}),o=S(E(n,function(u){return r.node(u).rank})),i=E(P(o+1),function(){return[]});function f(u){if(Lr(e,u))return;e[u]=!0;var d=r.node(u);i[d.rank].push(u),g(r.successors(u),f)}var s=A(n,function(u){return r.node(u).rank});return g(s,f),i}function zn(r,e){return E(e,function(n){var o=r.inEdges(n);if(!o.length)return{v:n};else{var i=Zt(o,function(f,s){var u=r.edge(s),d=r.node(s.v);return{sum:f.sum+u.weight*d.order,weight:f.weight+u.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}})}function Wn(r,e){var n={};g(r,function(i,f){var s=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:f};if(!_e(i.barycenter))s.barycenter=i.barycenter,s.weight=i.weight}),g(e.edges(),function(i){var f=n[i.v],s=n[i.w];if(!_e(f)&&!_e(s))s.indegree++,f.out.push(n[i.w])});var o=et(n,function(i){return!i.indegree});return Ss(o)}function Ss(r){var e=[];function n(f){return function(s){if(s.merged)return;if(_e(s.barycenter)||_e(f.barycenter)||s.barycenter>=f.barycenter)Ns(f,s)}}function o(f){return function(s){if(s.in.push(f),--s.indegree===0)r.push(s)}}while(r.length){var i=r.pop();e.push(i),g(i.in.reverse(),n(i)),g(i.out,o(i))}return E(et(e,function(f){return!f.merged}),function(f){return Z(f,["vs","i","barycenter","weight"])})}function Ns(r,e){var n=0,o=0;if(r.weight)n+=r.barycenter*r.weight,o+=r.weight;if(e.weight)n+=e.barycenter*e.weight,o+=e.weight;r.vs=e.vs.concat(r.vs),r.barycenter=n/o,r.weight=o,r.i=Math.min(e.i,r.i),e.merged=!0}function Hn(r,e){var n=un(r,function(p){return Object.prototype.hasOwnProperty.call(p,"barycenter")}),o=n.lhs,i=A(n.rhs,function(p){return-p.i}),f=[],s=0,u=0,d=0;o.sort(Ps(!!e)),d=qn(f,i,d),g(o,function(p){d+=p.vs.length,f.push(p.vs),s+=p.barycenter*p.weight,u+=p.weight,d=qn(f,i,d)});var c={vs:N(f)};if(u)c.barycenter=s/u,c.weight=u;return c}function qn(r,e,n){var o;while(e.length&&(o=U(e)).i<=n)e.pop(),r.push(o.vs),n++;return n}function Ps(r){return function(e,n){if(e.barycenter<n.barycenter)return-1;else if(e.barycenter>n.barycenter)return 1;return!r?e.i-n.i:n.i-e.i}}function Kr(r,e,n,o){var i=r.children(e),f=r.node(e),s=f?f.borderLeft:void 0,u=f?f.borderRight:void 0,d={};if(s)i=et(i,function(w){return w!==s&&w!==u});var c=zn(r,i);g(c,function(w){if(r.children(w.v).length){var y=Kr(r,w.v,n,o);if(d[w.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter"))Ts(w,y)}});var p=Wn(c,n);ks(p,d);var m=Hn(p,o);if(s){if(m.vs=N([s,m.vs,u]),r.predecessors(s).length){var h=r.node(r.predecessors(s)[0]),b=r.node(r.predecessors(u)[0]);if(!Object.prototype.hasOwnProperty.call(m,"barycenter"))m.barycenter=0,m.weight=0;m.barycenter=(m.barycenter*m.weight+h.order+b.order)/(m.weight+2),m.weight+=2}}return m}function ks(r,e){g(r,function(n){n.vs=N(n.vs.map(function(o){if(e[o])return e[o].vs;return o}))})}function Ts(r,e){if(!_e(r.barycenter))r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight;else r.barycenter=e.barycenter,r.weight=e.weight}function $n(r){var e=Fr(r),n=Kn(r,P(1,e+1),"inEdges"),o=Kn(r,P(e-1,-1,-1),"outEdges"),i=Yn(r);Jn(r,i);var f=Number.POSITIVE_INFINITY,s;for(var u=0,d=0;d<4;++u,++d){Cs(u%2?n:o,u%4>=2),i=D(r);var c=Vn(r,i);if(c<f)d=0,s=$e(i),f=c}Jn(r,s)}function Kn(r,e,n){return E(e,function(o){return Un(r,o,n)})}function Cs(r,e){var n=new re;g(r,function(o){var i=o.graph().root,f=Kr(o,i,n,e);g(f.vs,function(s,u){o.node(s).order=u}),Xn(o,n,f.vs)})}function Jn(r,e){g(e,function(n){g(n,function(o,i){r.node(o).order=i})})}function Qn(r){var e=Rs(r);g(r.graph().dummyChains,function(n){var o=r.node(n),i=o.edgeObj,f=As(r,e,i.v,i.w),{path:s,lca:u}=f,d=0,c=s[d],p=!0;while(n!==i.w){if(o=r.node(n),p){while((c=s[d])!==u&&r.node(c).maxRank<o.rank)d++;if(c===u)p=!1}if(!p){while(d<s.length-1&&r.node(c=s[d+1]).minRank<=o.rank)d++;c=s[d]}r.setParent(n,c),n=r.successors(n)[0]}})}function As(r,e,n,o){var i=[],f=[],s=Math.min(e[n].low,e[o].low),u=Math.max(e[n].lim,e[o].lim),d,c;d=n;do d=r.parent(d),i.push(d);while(d&&(e[d].low>s||u>e[d].lim));c=d,d=o;while((d=r.parent(d))!==c)f.push(d);return{path:i.concat(f.reverse()),lca:c}}function Rs(r){var e={},n=0;function o(i){var f=n;g(r.children(i),o),e[i]={low:f,lim:n++}}return g(r.children(),o),e}function Ms(r,e){var n={};function o(i,f){var s=0,u=0,d=i.length,c=U(f);return g(f,function(p,m){var h=Bs(r,p),b=h?r.node(h).order:d;if(h||p===c)g(f.slice(u,m+1),function(w){g(r.predecessors(w),function(y){var v=r.node(y),_=v.order;if((_<s||b<_)&&!(v.dummy&&r.node(w).dummy))ro(n,y,w)})}),u=m+1,s=b}),f}return Zt(e,o),n}function js(r,e){var n={};function o(f,s,u,d,c){var p;g(P(s,u),function(m){if(p=f[m],r.node(p).dummy)g(r.predecessors(p),function(h){var b=r.node(h);if(b.dummy&&(b.order<d||b.order>c))ro(n,h,p)})})}function i(f,s){var u=-1,d,c=0;return g(s,function(p,m){if(r.node(p).dummy==="border"){var h=r.predecessors(p);if(h.length)d=r.node(h[0]).order,o(s,c,m,u,d),c=m,u=d}o(s,c,s.length,d,f.length)}),s}return Zt(e,i),n}function Bs(r,e){if(r.node(e).dummy)return nr(r.predecessors(e),function(n){return r.node(n).dummy})}function ro(r,e,n){if(e>n){var o=e;e=n,n=o}if(!Object.prototype.hasOwnProperty.call(r,e))Object.defineProperty(r,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=r[e];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ds(r,e,n){if(e>n){var o=e;e=n,n=o}return!!r[e]&&Object.prototype.hasOwnProperty.call(r[e],n)}function Fs(r,e,n,o){var i={},f={},s={};return g(e,function(u){g(u,function(d,c){i[d]=d,f[d]=d,s[d]=c})}),g(e,function(u){var d=-1;g(u,function(c){var p=o(c);if(p.length){p=A(p,function(y){return s[y]});var m=(p.length-1)/2;for(var h=Math.floor(m),b=Math.ceil(m);h<=b;++h){var w=p[h];if(f[c]===c&&d<s[w]&&!Ds(n,c,w))f[w]=c,f[c]=i[c]=i[w],d=s[w]}}})}),{root:i,align:f}}function Gs(r,e,n,o,i){var f={},s=Xs(r,e,n,i),u=i?"borderLeft":"borderRight";function d(m,h){var b=s.nodes(),w=b.pop(),y={};while(w){if(y[w])m(w);else y[w]=!0,b.push(w),b=b.concat(h(w));w=b.pop()}}function c(m){f[m]=s.inEdges(m).reduce(function(h,b){return Math.max(h,f[b.v]+s.edge(b))},0)}function p(m){var h=s.outEdges(m).reduce(function(w,y){return Math.min(w,f[y.w]-s.edge(y))},Number.POSITIVE_INFINITY),b=r.node(m);if(h!==Number.POSITIVE_INFINITY&&b.borderType!==u)f[m]=Math.max(f[m],h)}return d(c,s.predecessors.bind(s)),d(p,s.successors.bind(s)),g(o,function(m){f[m]=f[n[m]]}),f}function Xs(r,e,n,o){var i=new re,f=r.graph(),s=zs(f.nodesep,f.edgesep,o);return g(e,function(u){var d;g(u,function(c){var p=n[c];if(i.setNode(p),d){var m=n[d],h=i.edge(m,p);i.setEdge(m,p,Math.max(s(r,c,d),h||0))}d=c})}),i}function Us(r,e){return J(mt(e),function(n){var{NEGATIVE_INFINITY:o,POSITIVE_INFINITY:i}=Number;return st(n,function(f,s){var u=Ws(r,s)/2;o=Math.max(f+u,o),i=Math.min(f-u,i)}),o-i})}function Vs(r,e){var n=mt(e),o=B(n),i=S(n);g(["u","d"],function(f){g(["l","r"],function(s){var u=f+s,d=r[u],c;if(d===e)return;var p=mt(d);if(c=s==="l"?o-B(p):i-S(p),c)r[u]=H(d,function(m){return m+c})})})}function Ys(r,e){return H(r.ul,function(n,o){if(e)return r[e.toLowerCase()][o];else{var i=A(E(r,o));return(i[1]+i[2])/2}})}function eo(r){var e=D(r),n=or(Ms(r,e),js(r,e)),o={},i;g(["u","d"],function(s){i=s==="u"?e:mt(e).reverse(),g(["l","r"],function(u){if(u==="r")i=E(i,function(m){return mt(m).reverse()});var d=(s==="u"?r.predecessors:r.successors).bind(r),c=Fs(r,i,n,d),p=Gs(r,i,c.root,c.align,u==="r");if(u==="r")p=H(p,function(m){return-m});o[s+u]=p})});var f=Us(r,o);return Vs(o,f),Ys(o,r.graph().align)}function zs(r,e,n){return function(o,i,f){var s=o.node(i),u=o.node(f),d=0,c;if(d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=-s.width/2;break;case"r":c=s.width/2;break}if(c)d+=n?c:-c;if(c=0,d+=(s.dummy?e:r)/2,d+=(u.dummy?e:r)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":c=u.width/2;break;case"r":c=-u.width/2;break}if(c)d+=n?c:-c;return c=0,d}}function Ws(r,e){return r.node(e).width}function to(r){r=Sr(r),qs(r),ut(eo(r),function(e,n){r.node(n).x=e})}function qs(r){var e=D(r),n=r.graph().ranksep,o=0;g(e,function(i){var f=S(E(i,function(s){return r.node(s).height}));g(i,function(s){r.node(s).y=o+f/2}),o+=f+n})}function $r(r,e){var n=e&&e.debugTiming?dn:cn;n("layout",()=>{var o=n(" buildLayoutGraph",()=>ou(r));n(" runLayout",()=>Hs(o,n)),n(" updateInputGraph",()=>Ks(r,o))})}function Hs(r,e){e(" makeSpaceForEdgeLabels",()=>iu(r)),e(" removeSelfEdges",()=>mu(r)),e(" acyclic",()=>tn(r)),e(" nestingGraph.run",()=>Bn(r)),e(" rank",()=>Hr(Sr(r))),e(" injectEdgeLabelProxies",()=>au(r)),e(" removeEmptyRanks",()=>sn(r)),e(" nestingGraph.cleanup",()=>Gn(r)),e(" normalizeRanks",()=>fn(r)),e(" assignRankMinMax",()=>fu(r)),e(" removeEdgeLabelProxies",()=>su(r)),e(" normalize.run",()=>En(r)),e(" parentDummyChains",()=>Qn(r)),e(" addBorderSegments",()=>ln(r)),e(" order",()=>$n(r)),e(" insertSelfEdges",()=>hu(r)),e(" adjustCoordinateSystem",()=>hn(r)),e(" position",()=>to(r)),e(" positionSelfEdges",()=>gu(r)),e(" removeBorderNodes",()=>lu(r)),e(" normalize.undo",()=>On(r)),e(" fixupEdgeLabelCoords",()=>cu(r)),e(" undoCoordinateSystem",()=>gn(r)),e(" translateGraph",()=>uu(r)),e(" assignNodeIntersects",()=>du(r)),e(" reversePoints",()=>pu(r)),e(" acyclic.undo",()=>nn(r))}function Ks(r,e){g(r.nodes(),function(n){var o=r.node(n),i=e.node(n);if(o){if(o.x=i.x,o.y=i.y,e.children(n).length)o.width=i.width,o.height=i.height}}),g(r.edges(),function(n){var o=r.edge(n),i=e.edge(n);if(o.points=i.points,Object.prototype.hasOwnProperty.call(i,"x"))o.x=i.x,o.y=i.y}),r.graph().width=e.graph().width,r.graph().height=e.graph().height}var Js=["nodesep","edgesep","ranksep","marginx","marginy"],Zs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$s=["acyclicer","ranker","rankdir","align"],Qs=["width","height"],ru={width:0,height:0},eu=["minlen","weight","width","height","labeloffset"],tu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},nu=["labelpos"];function ou(r){var e=new re({multigraph:!0,compound:!0}),n=Zr(r.graph());return e.setGraph(or({},Zs,Jr(n,Js),Z(n,$s))),g(r.nodes(),function(o){var i=Zr(r.node(o));e.setNode(o,rt(Jr(i,Qs),ru)),e.setParent(o,r.parent(o))}),g(r.edges(),function(o){var i=Zr(r.edge(o));e.setEdge(o,or({},tu,Jr(i,eu),Z(i,nu)))}),e}function iu(r){var e=r.graph();e.ranksep/=2,g(r.edges(),function(n){var o=r.edge(n);if(o.minlen*=2,o.labelpos.toLowerCase()!=="c")if(e.rankdir==="TB"||e.rankdir==="BT")o.width+=o.labeloffset;else o.height+=o.labeloffset})}function au(r){g(r.edges(),function(e){var n=r.edge(e);if(n.width&&n.height){var o=r.node(e.v),i=r.node(e.w),f={rank:(i.rank-o.rank)/2+o.rank,e};T(r,"edge-proxy",f,"_ep")}})}function fu(r){var e=0;g(r.nodes(),function(n){var o=r.node(n);if(o.borderTop)o.minRank=r.node(o.borderTop).rank,o.maxRank=r.node(o.borderBottom).rank,e=S(e,o.maxRank)}),r.graph().maxRank=e}function su(r){g(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="edge-proxy")r.edge(n.e).labelRank=n.rank,r.removeNode(e)})}function uu(r){var e=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,f=r.graph(),s=f.marginx||0,u=f.marginy||0;function d(c){var{x:p,y:m,width:h,height:b}=c;e=Math.min(e,p-h/2),n=Math.max(n,p+h/2),o=Math.min(o,m-b/2),i=Math.max(i,m+b/2)}g(r.nodes(),function(c){d(r.node(c))}),g(r.edges(),function(c){var p=r.edge(c);if(Object.prototype.hasOwnProperty.call(p,"x"))d(p)}),e-=s,o-=u,g(r.nodes(),function(c){var p=r.node(c);p.x-=e,p.y-=o}),g(r.edges(),function(c){var p=r.edge(c);if(g(p.points,function(m){m.x-=e,m.y-=o}),Object.prototype.hasOwnProperty.call(p,"x"))p.x-=e;if(Object.prototype.hasOwnProperty.call(p,"y"))p.y-=o}),f.width=n-e+s,f.height=i-o+u}function du(r){g(r.edges(),function(e){var n=r.edge(e),o=r.node(e.v),i=r.node(e.w),f,s;if(!n.points)n.points=[],f=i,s=o;else f=n.points[0],s=n.points[n.points.length-1];n.points.unshift(Br(o,f)),n.points.push(Br(i,s))})}function cu(r){g(r.edges(),function(e){var n=r.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x")){if(n.labelpos==="l"||n.labelpos==="r")n.width-=n.labeloffset;switch(n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}}})}function pu(r){g(r.edges(),function(e){var n=r.edge(e);if(n.reversed)n.points.reverse()})}function lu(r){g(r.nodes(),function(e){if(r.children(e).length){var n=r.node(e),o=r.node(n.borderTop),i=r.node(n.borderBottom),f=r.node(U(n.borderLeft)),s=r.node(U(n.borderRight));n.width=Math.abs(s.x-f.x),n.height=Math.abs(i.y-o.y),n.x=f.x+n.width/2,n.y=o.y+n.height/2}}),g(r.nodes(),function(e){if(r.node(e).dummy==="border")r.removeNode(e)})}function mu(r){g(r.edges(),function(e){if(e.v===e.w){var n=r.node(e.v);if(!n.selfEdges)n.selfEdges=[];n.selfEdges.push({e,label:r.edge(e)}),r.removeEdge(e)}})}function hu(r){var e=D(r);g(e,function(n){var o=0;g(n,function(i,f){var s=r.node(i);s.order=f+o,g(s.selfEdges,function(u){T(r,"selfedge",{width:u.label.width,height:u.label.height,rank:s.rank,order:f+ ++o,e:u.e,label:u.label},"_se")}),delete s.selfEdges})})}function gu(r){g(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="selfedge"){var o=r.node(n.e.v),i=o.x+o.width/2,f=o.y,s=n.x-i,u=o.height/2;r.setEdge(n.e,n.label),r.removeNode(e),n.label.points=[{x:i+2*s/3,y:f-u},{x:i+5*s/6,y:f-u},{x:i+s,y:f},{x:i+5*s/6,y:f+u},{x:i+2*s/3,y:f+u}],n.label.x=n.x,n.label.y=n.y}})}function Jr(r,e){return H(Z(r,e),Number)}function Zr(r){var e={};return g(r,function(n,o){e[o.toLowerCase()]=n}),e}var no=t((r,e,n)=>Math.max(e,Math.min(n,r)),"clamp"),fo=t((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),vu=t((r)=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram"||r==="er"||r==="classDiagram","shouldMergeSelfLoopSegments"),bu=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],yu=t((r,e,n,o,i)=>{let f=[],s=new Set;if(n.forEach(({start:p,end:m})=>{if(p!==o)s.add(p);if(m!==o)s.add(m)}),s.forEach((p)=>{let m=r.node(p);if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)}),f.length===0)n.forEach(({edge:p})=>{(p.points??[]).forEach((m)=>{if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)})});if(f.length===0)return fo(i);let u=f.reduce((p,m)=>({x:p.x+m.x/f.length,y:p.y+m.y/f.length}),{x:0,y:0}),d=u.x-e.x,c=u.y-e.y;if(Math.abs(d)>Math.abs(c))return d>0?"right":"left";if(Math.abs(c)>0)return c>0?"bottom":"top";return fo(i)},"getSelfLoopSide"),wu=t((r,e="top",n=0,o=0)=>{let i=r.x,f=r.y-n,s=r.width/2,u=r.height/2,d=Math.max(36,Math.min(100,r.width*0.8)),c=no(Math.max(o,r.width*0.35),36,d),p=no(Math.min(r.width,r.height)*0.45,24,48);switch(e){case"bottom":{let m=f+u;return[{x:i-c/2,y:m},{x:i-c/2,y:m+p},{x:i+c/2,y:m+p},{x:i+c/2,y:m}]}case"right":{let m=i+s;return[{x:m,y:f-c/2},{x:m+p,y:f-c/2},{x:m+p,y:f+c/2},{x:m,y:f+c/2}]}case"left":{let m=i-s;return[{x:m,y:f-c/2},{x:m-p,y:f-c/2},{x:m-p,y:f+c/2},{x:m,y:f+c/2}]}case"top":default:{let m=f-u;return[{x:i-c/2,y:m},{x:i-c/2,y:m-p},{x:i+c/2,y:m-p},{x:i+c/2,y:m}]}}},"getSelfLoopPoints"),_u=t((r,e,n="top",o=0,i={})=>{let s=r.x,u=r.y-o,d=i.width??0,c=i.height??0;switch(n){case"bottom":return{x:s,y:Math.max(...e.map((p)=>p.y))+c/2+4};case"right":return{x:Math.max(...e.map((p)=>p.x))+d/2+4,y:u};case"left":return{x:Math.min(...e.map((p)=>p.x))-d/2-4,y:u};case"top":default:return{x:s,y:Math.min(...e.map((p)=>p.y))-c/2-4}}},"getSelfLoopLabelPosition"),ao=t((r,e=0,{mergeSelfLoops:n=!0}={})=>{let o=new Map,i=[],f=r.graph()?.rankdir;return r.edges().forEach((s)=>{let u=r.edge(s);if(n&&u.selfLoop){let d=u.selfLoop.id;if(!o.has(d))o.set(d,[]);o.get(d).push({edge:u,start:s.v,end:s.w})}else i.push({edge:u,start:s.v,end:s.w})}),o.forEach((s)=>{if(s.length!==3){s.forEach((_)=>i.push(_));return}s.sort((_,R)=>_.edge.selfLoop.order-R.edge.selfLoop.order);let[u,d,c]=s,p=u.edge.originalEdge??d.edge.originalEdge??c.edge.originalEdge??d.edge,m=r.node(p.start);if(!m){s.forEach((_)=>i.push(_));return}let h={width:d.edge.width,height:d.edge.height},b=yu(r,m,s,p.start,f),w=wu(m,b,e,h.width??0),y=_u(m,w,b,e,h),v={...d.edge,...p,id:p.id,points:w,start:p.start,end:p.end,x:y.x,y:y.y,width:h.width,height:h.height,labelStyle:d.edge.labelStyle,fromCluster:u.edge.fromCluster??d.edge.fromCluster??c.edge.fromCluster,toCluster:u.edge.toCluster??d.edge.toCluster??c.edge.toCluster};delete v.selfLoop,delete v.originalEdge,i.push({edge:v,start:v.start,end:v.end})}),i},"getEdgesToRender"),co=t(async({element:r,graph:e,diagramType:n,id:o,parentCluster:i,siteConfig:f})=>{let s=e.graph().rankdir;a.trace("Dir in recursive render - dir:",s);let{clusters:u,edgePaths:d,edgeLabels:c,nodes:p,rootGroups:m}=pa(r,{edgePathsClass:"edgePaths"});if(!e.nodes())a.info("No nodes found for",e);else a.info("Recursive render XXX",e.nodes());if(e.edges().length>0)a.info("Recursive edges",e.edge(e.edges()[0]));let h=vu(n);await Promise.all(e.nodes().map(async function(y){let v=e.node(y);if(i!==void 0){let _=JSON.parse(JSON.stringify(i.clusterData));if(a.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,y,`
|
|
3
3
|
data=`,_.height,`
|
|
4
|
-
Parent cluster`,i.height),e.setNode(i.id,_),!e.parent(y))a.trace("Setting parent",y,i.id),e.setParent(y,i.id,_)}if(a.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),v?.clusterNode){a.info("Cluster identified XBX",y,v.width,e.node(y));let{ranksep:_,nodesep:R}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:_+25,nodesep:R});let Qr=await Lu({element:p,graph:v.graph,diagramType:n,id:o,parentCluster:e.node(y),siteConfig:f}),ee=Qr.elem;I(v,ee),v.diff=Qr.diff||0,a.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),
|
|
4
|
+
Parent cluster`,i.height),e.setNode(i.id,_),!e.parent(y))a.trace("Setting parent",y,i.id),e.setParent(y,i.id,_)}if(a.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),v?.clusterNode){a.info("Cluster identified XBX",y,v.width,e.node(y));let{ranksep:_,nodesep:R}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:_+25,nodesep:R});let Qr=await Lu({element:p,graph:v.graph,diagramType:n,id:o,parentCluster:e.node(y),siteConfig:f}),ee=Qr.elem;I(v,ee),v.diff=Qr.diff||0,a.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),ko(ee,v)}else if(e.children(y).length>0)a.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",e),a.trace(Fn(v.id,e)),G.set(v.id,{id:Fn(v.id,e),node:v});else a.trace("Node - the non recursive path XAX",y,p,e.node(y),s),await ma(p,e.node(y),{config:f,dir:s})})),await t(async()=>{let y=e.edges().map(async function(v){let _=e.edge(v.v,v.w,v.name);if(a.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),a.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),a.info("Fix",G,"ids:",v.v,v.w,"Translating: ",G.get(v.v),G.get(v.w)),h&&_.selfLoop){if(_.selfLoop.order!==1)return;let R={..._.originalEdge,..._,id:_.selfLoop.id,startLabelLeft:_.originalEdge?.startLabelLeft??_.startLabelLeft,startLabelRight:_.originalEdge?.startLabelRight??_.startLabelRight,endLabelLeft:_.originalEdge?.endLabelLeft??_.endLabelLeft,endLabelRight:_.originalEdge?.endLabelRight??_.endLabelRight};await Et(c,R),_.width=R.width,_.height=R.height,_.labelStyle=R.labelStyle;return}await Et(c,_)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:w}=St(f);return{elem:m,graph:e,groups:{clusters:u,edgePaths:d,edgeLabels:c,nodes:p,rootGroups:m},diagramType:n,id:o,mergeSelfLoops:h,subGraphTitleTotalMargin:w}},"measureDagreGraph"),po=t((r)=>{a.info("############################################# XXX"),a.info("### Layout ### XXX"),a.info("############################################# XXX"),$r(r)},"runDagreGraphLayout"),Eu=t((r,e,n)=>{let o=r.node(e);if(!o)return;let i={...o};if(o?.clusterNode)i.y=(o.y??0)+n;else if(r.children(e).length>0)i.height=(o.height??0)+n;else i.y=(o.y??0)+n/2;return i},"normalizeDagreNode"),uo=t((r,e)=>{bu.forEach((n)=>{if(e[n]!==void 0)r[n]=e[n]})},"applyDagreNodeLayout"),xu=t((r,e,n,o)=>({...r,start:r.start??e,end:r.end??n,points:(r.points??[]).map((i)=>({...i,y:typeof i.y==="number"?i.y+o:i.y}))}),"normalizeDagreEdge"),Do=t((r,e)=>{let{graph:n,mergeSelfLoops:o,subGraphTitleTotalMargin:i=0}=e,f=new Map(r.nodes.map((u)=>[u.id,u]));fa(n).forEach((u)=>{let d=Eu(n,u,i);if(!d)return;uo(n.node(u),d);let c=f.get(u);if(c)uo(c,d)});let s=i/2;return r.edges=ao(n,s,{mergeSelfLoops:o}).map(({edge:u,start:d,end:c})=>xu(u,d,c,s)),r},"applyDagreLayoutResult"),Ou=t(async({elem:r,graph:e,groups:{clusters:n,edgePaths:o},diagramType:i,id:f,mergeSelfLoops:s,subGraphTitleTotalMargin:u})=>{let d=0;await Promise.all(fa(e).map(async function(m){let h=e.node(m);if(a.info("Position XBX => "+m+": ("+h.x,","+h.y,") width: ",h.width," height: ",h.height),h?.clusterNode)h.y+=u,a.info("A tainted cluster node XBX1",m,h.id,h.width,h.height,h.x,h.y,e.parent(m)),G.get(h.id).node=h,vt(h);else if(e.children(m).length>0){a.info("A pure cluster node XBX1",m,h.id,h.x,h.y,h.width,h.height,e.parent(m)),h.height+=u,e.node(h.parentId);let b=h?.padding/2||0,w=h?.labelBBox?.height||0,y=w-b||0;a.debug("OffsetY",y,"labelHeight",w,"halfPadding",b),await Jt(n,h),G.get(h.id).node=h}else{let b=e.node(h.parentId);h.y+=u/2,a.info("A regular node XBX1 - using the padding",h.id,"parent",h.parentId,h.width,h.height,h.x,h.y,"offsetY",h.offsetY,"parent",b,b?.offsetY,h),vt(h)}}));let c=u/2;return ao(e,c,{mergeSelfLoops:s}).forEach(function({edge:m,start:h,end:b}){a.info("Edge "+h+" -> "+b+": "+JSON.stringify(m),m),m.points.forEach((_)=>_.y+=c);let w=e.node(h),y=e.node(b),v=en(o,m,G,i,w,y,f);Zn(m,v)}),e.nodes().forEach(function(m){let h=e.node(m);if(a.info(m,h.type,h.diff),h.isGroup)d=h.diff}),a.warn("Returning from recursive render XAX",r,d),{elem:r,diff:d}},"paintDagreLayoutCore"),Lu=t(async(r)=>{let e=await co(r);return po(e.graph),await Ou(e)},"renderDagreSubgraph"),io=t((r)=>{let e=new re({multigraph:!0,compound:!0}).setGraph({rankdir:r.direction,nodesep:r.config?.nodeSpacing||r.nodeSpacing||r.config?.flowchart?.nodeSpacing,ranksep:r.config?.rankSpacing||r.rankSpacing||r.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return r.nodes.forEach((n)=>{if(e.setNode(n.id,{...n}),n.parentId)e.setParent(n.id,n.parentId)}),a.debug("Edges:",r.edges),r.edges.forEach((n)=>{if(n.start===n.end){let o=n.start,i=o+"---"+o+"---1",f=o+"---"+o+"---2",s=e.node(o);e.setNode(i,{domId:i,id:i,parentId:s.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(i,s.parentId),e.setNode(f,{domId:f,id:f,parentId:s.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(f,s.parentId);let u=structuredClone(n),d=structuredClone(n),c=structuredClone(n),p=structuredClone(n);if(d.originalEdge=u,d.selfLoop={id:u.id,order:0},c.originalEdge=u,c.selfLoop={id:u.id,order:1},p.originalEdge=u,p.selfLoop={id:u.id,order:2},d.label="",d.arrowTypeEnd="none",d.endLabelLeft="",d.endLabelRight="",d.startLabelLeft="",d.id=o+"-cyclic-special-1",c.startLabelRight="",c.startLabelLeft="",c.endLabelLeft="",c.endLabelRight="",c.arrowTypeStart="none",c.arrowTypeEnd="none",c.id=o+"-cyclic-special-mid",p.label="",p.startLabelRight="",p.startLabelLeft="",p.arrowTypeStart="none",s.isGroup)d.fromCluster=o,p.toCluster=o;p.id=o+"-cyclic-special-2",p.arrowTypeStart="none",e.setEdge(o,i,d,o+"-cyclic-special-0"),e.setEdge(i,f,c,o+"-cyclic-special-1"),e.setEdge(f,o,p,o+"-cyclic-special-2")}else e.setEdge(n.start,n.end,{...n},n.id)}),so(e),{graph:e}},"prepareLayoutForDagre"),No=t(async(r,{element:e,preparedLayout:n})=>{let o=n??io(r),i=l(),f=await co({element:e,graph:o.graph,diagramType:r.type,id:r.diagramId,parentCluster:void 0,siteConfig:i});return o.measuredLayout=f,f},"measureDagreLayout"),Mo=t((r,e)=>{let n=e.preparedLayout?.measuredLayout;if(!n)throw Error("runDagreLayoutCore requires measureDagreLayout to run first");return po(n.graph),Do(r,n),n},"runDagreLayoutCore"),Iu=t((r,{measure:e})=>fa(e.graph).map((n)=>e.graph.node(n)).filter(Boolean),"getDagrePaintNodes"),Su=t((r,e,{measure:n})=>r?n.graph.node(r):void 0,"getDagreEdgeNode"),oo=lr({prepareLayout:io,measureLayout:No,runLayoutCore:Mo,paintOptions:{clusterDb:G,getNodes:Iu,getEdgeNode:Su,skipNode:t((r,{measure:e})=>!e.graph.hasNode(r.id),"skipNode"),isCluster:t((r,{measure:e})=>e.graph.hasNode(r.id)&&(e.graph.children(r.id)??[]).length>0,"isCluster")}});export{ao,Do,io,No,Mo,oo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var n=Object.freeze(JSON.parse('{"displayName":"JSON","name":"json","patterns":[{"include":"#value"}],"repository":{"array":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.array.begin.json"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.array.end.json"}},"name":"meta.structure.array.json","patterns":[{"include":"#value"},{"match":",","name":"punctuation.separator.array.json"},{"match":"[^]\\\\s]","name":"invalid.illegal.expected-array-separator.json"}]},"comments":{"patterns":[{"begin":"/\\\\*\\\\*(?!/)","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.documentation.json"},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.json"},{"captures":{"1":{"name":"punctuation.definition.comment.json"}},"match":"(//).*$\\\\n?","name":"comment.line.double-slash.js"}]},"constant":{"match":"\\\\b(?:true|false|null)\\\\b","name":"constant.language.json"},"number":{"match":"-?(?:0|[1-9]\\\\d*)(?:(?:\\\\.\\\\d+)?(?:[Ee][-+]?\\\\d+)?)?","name":"constant.numeric.json"},"object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.json"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.json"}},"name":"meta.structure.dictionary.json","patterns":[{"include":"#objectkey"},{"include":"#comments"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.dictionary.key-value.json"}},"end":"(,)|(?=})","endCaptures":{"1":{"name":"punctuation.separator.dictionary.pair.json"}},"name":"meta.structure.dictionary.value.json","patterns":[{"include":"#value"},{"match":"[^,\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json"}]},{"match":"[^}\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json"}]},"objectkey":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.support.type.property-name.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.support.type.property-name.end.json"}},"name":"string.json support.type.property-name.json","patterns":[{"include":"#stringcontent"}]},"string":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.json"}},"name":"string.quoted.double.json","patterns":[{"include":"#stringcontent"}]},"stringcontent":{"patterns":[{"match":"\\\\\\\\(?:[\\"/\\\\\\\\bfnrt]|u\\\\h{4})","name":"constant.character.escape.json"},{"match":"\\\\\\\\.","name":"invalid.illegal.unrecognized-string-escape.json"}]},"value":{"patterns":[{"include":"#constant"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"},{"include":"#comments"}]}},"scopeName":"source.json"}')),
|
|
2
|
-
export{
|
|
1
|
+
var n=Object.freeze(JSON.parse('{"displayName":"JSON","name":"json","patterns":[{"include":"#value"}],"repository":{"array":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.array.begin.json"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.array.end.json"}},"name":"meta.structure.array.json","patterns":[{"include":"#value"},{"match":",","name":"punctuation.separator.array.json"},{"match":"[^]\\\\s]","name":"invalid.illegal.expected-array-separator.json"}]},"comments":{"patterns":[{"begin":"/\\\\*\\\\*(?!/)","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.documentation.json"},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.json"},{"captures":{"1":{"name":"punctuation.definition.comment.json"}},"match":"(//).*$\\\\n?","name":"comment.line.double-slash.js"}]},"constant":{"match":"\\\\b(?:true|false|null)\\\\b","name":"constant.language.json"},"number":{"match":"-?(?:0|[1-9]\\\\d*)(?:(?:\\\\.\\\\d+)?(?:[Ee][-+]?\\\\d+)?)?","name":"constant.numeric.json"},"object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.json"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.json"}},"name":"meta.structure.dictionary.json","patterns":[{"include":"#objectkey"},{"include":"#comments"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.dictionary.key-value.json"}},"end":"(,)|(?=})","endCaptures":{"1":{"name":"punctuation.separator.dictionary.pair.json"}},"name":"meta.structure.dictionary.value.json","patterns":[{"include":"#value"},{"match":"[^,\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json"}]},{"match":"[^}\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json"}]},"objectkey":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.support.type.property-name.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.support.type.property-name.end.json"}},"name":"string.json support.type.property-name.json","patterns":[{"include":"#stringcontent"}]},"string":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.json"}},"name":"string.quoted.double.json","patterns":[{"include":"#stringcontent"}]},"stringcontent":{"patterns":[{"match":"\\\\\\\\(?:[\\"/\\\\\\\\bfnrt]|u\\\\h{4})","name":"constant.character.escape.json"},{"match":"\\\\\\\\.","name":"invalid.illegal.unrecognized-string-escape.json"}]},"value":{"patterns":[{"include":"#constant"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"},{"include":"#comments"}]}},"scopeName":"source.json"}')),ki=[n];
|
|
2
|
+
export{ki};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{_,o,
|
|
2
|
-
`);let c=V(n),l=c.append("g"),m=
|
|
3
|
-
`;if(d.frontmatterLineOffset)m.setFrontmatterLineOffset?.(d.frontmatterLineOffset);return await f.parse(b),new i(l,b,m,f,u)}async render(n,s){await this.renderer.draw(this.text,n,s,this)}getParser(){return this.parser}getType(){return this.type}},ar=[],Lo=t(()=>{ar.forEach((i)=>{i()}),ar=[]},"attachFunctions"),Ao=t((i)=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function
|
|
1
|
+
import{_,o,W,r,e,y}from"./chunk-ve8gy05p.js";import{t,a,Gr,Re,$i,Bi,Tn,xr,Da,co,se,Kt,N,Fi,on,ht,Na,uo,po,mo,zi,Ui,x,fo,Wr,ke,F,Ma,go,Hr,Oa,p,V,nt,rt,In,un,Dr,Kr,ii,_o,si,Xi,U,M,wo,jt,li,eo}from"./chunk-c6m4vfn5.js";import{ra}from"./chunk-xxmaqj1m.js";function ze(i){let n=i?.constructor;return i===(typeof n==="function"?n.prototype:Object.prototype)}function De(i){if(i==null)return!0;if(ii(i)){if(typeof i.splice!=="function"&&typeof i!=="string"&&!Dr(i)&&!un(i)&&!Kr(i))return!1;return i.length===0}if(typeof i==="object"||typeof i==="function"){if(i instanceof Map||i instanceof Set)return i.size===0;let n=Object.keys(i);if(ze(i))return n.filter((s)=>s!=="constructor").length===0;return n.length===0}return!0}var Z="comm",le="rule",fe="decl";var Fe="@media",Oe="@import";var Be="@supports";var Pe="@namespace",oe="@keyframes";var me="@layer",Ne="@scope";var Ve=Math.abs,X=String.fromCharCode;function ue(i){return i.trim()}function ne(i,n,s){return i.replace(n,s)}function H(i,n){return i.charCodeAt(n)|0}function j(i,n,s){return i.slice(n,s)}function R(i){return i.length}function pe(i){return i.length}function J(i,n){return n.push(i),i}var ge=1,ee=1,Ge=0,O=0,T=0,te="";function ve(i,n,s,d,c,l,m,f){return{value:i,root:n,parent:s,type:d,props:c,children:l,line:ge,column:ee,length:m,return:"",siblings:f}}function He(){return T}function Ue(){if(T=O>0?H(te,--O):0,ee--,T===10)ee=1,ge--;return T}function B(){if(T=O<Ge?H(te,O++):0,ee++,T===10)ee=1,ge++;return T}function Y(){return H(te,O)}function de(){return O}function he(i,n){return j(te,i,n)}function re(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function We(i){return ge=ee=1,Ge=R(te=i),O=0,[]}function je(i){return te="",i}function ye(i){return ue(he(O-1,Me(i===91?i+2:i===40?i+1:i)))}function Ye(i){while(T=Y())if(T<33)B();else break;return re(i)>2||re(T)>3?"":" "}function qe(i,n){while(--n&&B())if(T<48||T>102||T>57&&T<65||T>70&&T<97)break;return he(i,de()+(n<6&&Y()==32&&B()==32))}function Me(i){while(B())switch(T){case i:return O;case 34:case 39:if(i!==34&&i!==39)Me(T);break;case 40:if(i===41)Me(i);break;case 92:B();break}return O}function Xe(i,n){while(B())if(i+T===57)break;else if(i+T===84&&Y()===47)break;return"/*"+he(n,O-1)+"*"+X(i===47?i:B())}function Ke(i){while(!re(Y()))B();return he(i,O)}function Je(i){return je(we("",null,null,null,[""],i=We(i),0,[0],i))}function we(i,n,s,d,c,l,m,f,u){var v=0,w=0,b=m,h=0,C=0,A=0,k=1,E=1,D=1,I=0,S=0,P="",Q=c,G=l,z=d,g=P;while(E)switch(A=S,S=B()){case 40:if(A!=108&&H(g,b-1)==58)I++,g+="(";else g+=ye(S);break;case 41:I--,g+=")";break;case 34:case 39:case 91:g+=ye(S);break;case 9:case 10:case 13:case 32:if(I>0){g+=X(S);break}g+=Ye(A);break;case 92:g+=qe(de()-1,7);continue;case 47:switch(Y()){case 42:case 47:if(J(bt(Xe(B(),de()),n,s,u),u),(re(A||1)==5||re(Y()||1)==5)&&R(g)&&j(g,-1,void 0)!==" ")g+=" ";break;default:g+="/"}break;case 123*k:f[v++]=R(g)*D;case 125*k:case 59:case 0:if(I>0&&S){g+=X(S);break}switch(S){case 0:case 125:E=0;case 59+w:if(D==-1)g=ne(g,/\f/g,"");if(C>0&&(R(g)-b||k===0))J(C>32?Ze(g+";",d,s,b-1,u):Ze(ne(g," ","")+";",d,s,b-2,u),u);break;case 59:g+=";";default:if(J(z=Qe(g,n,s,v,w,c,f,P,Q=[],G=[],b,l),l),S===123)if(w===0)we(g,n,z,z,Q,l,b,f,G);else{switch(h){case 99:if(H(g,3)===110)break;case 108:if(H(g,2)===97)break;default:w=0;case 100:case 109:case 115:}if(w)we(i,z,z,d&&J(Qe(i,z,z,0,0,c,f,P,c,Q=[],b,G),G),c,G,b,f,d?Q:G);else we(g,z,z,z,[""],G,0,f,G)}}v=w=C=0,k=D=1,P=g="",b=m;break;case 58:b=1+R(g),C=A;default:if(k<1){if(S==123)--k;else if(S==125&&k++==0&&Ue()==125)continue}switch(g+=X(S),S*k){case 38:D=w>0?1:(g+="\f",-1);break;case 44:if(I>0)break;f[v++]=(R(g)-1)*D,D=1;break;case 64:if(Y()===45)g+=ye(B());h=Y(),w=b=R(P=g+=Ke(de())),S++;break;case 45:if(A===45&&R(g)==2)k=0}}return l}function Qe(i,n,s,d,c,l,m,f,u,v,w,b){var h=c-1,C=c===0?l:[""],A=pe(C);for(var k=0,E=0,D=0;k<d;++k)for(var I=0,S=j(i,h+1,h=Ve(E=m[k])),P=i;I<A;++I)if(P=ue(E>0?C[I]+" "+S:ne(S,/&\f/g,C[I])))u[D++]=P;return ve(i,n,s,c===0?le:f,u,v,w,b)}function bt(i,n,s,d){return ve(i,n,s,Z,X(He()),j(i,2,-2),0,d)}function Ze(i,n,s,d,c){return ve(i,n,s,fe,j(i,0,d),j(i,d+1,-1),d,c)}function xe(i,n){var s="";for(var d=0;d<i.length;d++)s+=n(i[d],d,i,n)||"";return s}function er(i,n,s,d){switch(i.type){case me:if(i.children.length)break;case Oe:case Pe:case fe:return i.return=i.return||i.value;case Z:return"";case oe:return i.return=i.value+"{"+xe(i.children,d)+"}";case le:if(!R(i.value=i.props.join(",")))return""}return R(s=xe(i.children,d))?i.return=i.value+"{"+s+"}":""}function rr(i){var n=pe(i);return function(s,d,c,l){var m="";for(var f=0;f<n;f++)m+=i[f](s,d,c,l)||"";return m}}var nr="c4",St=t((i)=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),Et=t(async()=>{let{diagram:i}=await (_("et1rsgmp"),import("./chunk-et1rsgmp.js"));return{id:nr,diagram:i}},"loader"),Tt={id:nr,detector:St,loader:Et},Ct=Tt,sr="flowchart-v2",kt=t((i)=>/^\s*(graph|flowchart)/.test(i),"detector"),Dt=t(async()=>{let{diagram:i}=await (_("a00vg115"),import("./chunk-a00vg115.js"));return{id:sr,diagram:i}},"loader"),Mt={id:sr,detector:kt,loader:Dt},_t=Mt,dr="agentflow",Lt=t((i)=>/^\s*agentflow-beta\b/.test(i),"detector"),At=t(async()=>{let{diagram:i}=await (_("xk1vkcj4"),import("./chunk-xk1vkcj4.js"));return{id:dr,diagram:i}},"loader"),It={id:dr,detector:Lt,loader:At},Rt=It,cr="swimlane",$t=t((i)=>/^\s*swimlane-beta\b/.test(i),"detector"),zt=t(async()=>{let{diagram:i}=await (_("tt9410zw"),import("./chunk-tt9410zw.js"));return{id:cr,diagram:i}},"loader"),Ft={id:cr,detector:$t,loader:zt},Ot=Ft,lr="er",Bt=t((i)=>/^\s*erDiagram/.test(i),"detector"),Pt=t(async()=>{let{diagram:i}=await (_("jpem3qvs"),import("./chunk-jpem3qvs.js"));return{id:lr,diagram:i}},"loader"),Nt={id:lr,detector:Bt,loader:Pt},Vt=Nt,fr="gitGraph",Gt=t((i)=>/^\s*gitGraph/.test(i),"detector"),Ht=t(async()=>{let{diagram:i}=await (_("4py9sndw"),import("./chunk-4py9sndw.js"));return{id:fr,diagram:i}},"loader"),Ut={id:fr,detector:Gt,loader:Ht},Wt=Ut,mr="gantt",Yt=t((i)=>/^\s*gantt/.test(i),"detector"),qt=t(async()=>{let{diagram:i}=await (_("0jbf73pr"),import("./chunk-0jbf73pr.js"));return{id:mr,diagram:i}},"loader"),Xt={id:mr,detector:Yt,loader:qt},Qt=Xt,ur="info",Zt=t((i)=>/^\s*info/.test(i),"detector"),Jt=t(async()=>{let{diagram:i}=await (_("yn4t5s9r"),import("./chunk-yn4t5s9r.js"));return{id:ur,diagram:i}},"loader"),ea={id:ur,detector:Zt,loader:Jt},pr="pie",ta=t((i)=>/^\s*pie/.test(i),"detector"),aa=t(async()=>{let{diagram:i}=await (_("3p9w8sg5"),import("./chunk-3p9w8sg5.js"));return{id:pr,diagram:i}},"loader"),ia={id:pr,detector:ta,loader:aa},gr="quadrantChart",oa=t((i)=>/^\s*quadrantChart/.test(i),"detector"),na=t(async()=>{let{diagram:i}=await (_("fnvgdvrg"),import("./chunk-fnvgdvrg.js"));return{id:gr,diagram:i}},"loader"),sa={id:gr,detector:oa,loader:na},da=sa,vr="xychart",ca=t((i)=>/^\s*xychart(-beta)?/.test(i),"detector"),la=t(async()=>{let{diagram:i}=await (_("h1k2kqbs"),import("./chunk-h1k2kqbs.js"));return{id:vr,diagram:i}},"loader"),fa={id:vr,detector:ca,loader:la},ma=fa,hr="requirement",ua=t((i)=>/^\s*requirement(Diagram)?/.test(i),"detector"),pa=t(async()=>{let{diagram:i}=await (_("2y1avvqj"),import("./chunk-2y1avvqj.js"));return{id:hr,diagram:i}},"loader"),ga={id:hr,detector:ua,loader:pa},va=ga,yr="sequence",ha=t((i)=>/^\s*sequenceDiagram/.test(i),"detector"),ya=t(async()=>{let{diagram:i}=await (_("97t3ngqf"),import("./chunk-97t3ngqf.js"));return{id:yr,diagram:i}},"loader"),wa={id:yr,detector:ha,loader:ya},xa=wa,wr="classDiagram",ba=t((i)=>/^\s*classDiagram/.test(i),"detector"),Sa=t(async()=>{let{diagram:i}=await (_("5cwxhhae"),import("./chunk-5cwxhhae.js"));return{id:wr,diagram:i}},"loader"),Ea={id:wr,detector:ba,loader:Sa},Ta=Ea,br="stateDiagram",Ca=t((i)=>/^\s*stateDiagram/.test(i),"detector"),ka=t(async()=>{let{diagram:i}=await (_("ct7z7bea"),import("./chunk-ct7z7bea.js"));return{id:br,diagram:i}},"loader"),_a={id:br,detector:Ca,loader:ka},La=_a,Sr="journey",Aa=t((i)=>/^\s*journey/.test(i),"detector"),Ia=t(async()=>{let{diagram:i}=await (_("q4vy3dkk"),import("./chunk-q4vy3dkk.js"));return{id:Sr,diagram:i}},"loader"),Ra={id:Sr,detector:Aa,loader:Ia},$a=Ra,be=4,ce=75,za=t((i)=>{let n=[];for(let c of i.split(/\s+/)){let l=[...c];while(l.length>ce)n.push(l.slice(0,ce).join("")),l=l.slice(ce);if(l.length>0)n.push(l.join(""))}let s=[],d="";for(let c of n){let l=d?`${d} ${c}`:c;if([...l].length>ce)s.push(d),d=c;else d=l}if(d)s.push(d);if(s.length>be){s.length=be;let c=s[be-1]??"";s[be-1]=`${[...c].slice(0,ce-3).join("")}...`}return s},"wrapErrorMessage"),Fa=t((i,n,s,d)=>{a.debug(`rendering svg for syntax error
|
|
2
|
+
`);let c=V(n),l=c.append("g"),m=za(d?.db.getErrorMessage?.()??""),f=m.length>0?500+m.length*56:512;c.attr("viewBox",`0 0 2412 ${f}`),F(c,100,f,!0),l.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),l.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),l.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),l.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),l.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),l.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),l.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),l.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${s}`),m.forEach((u,v)=>{l.append("text").attr("class","error-text").attr("x",1440).attr("y",510+v*56).attr("font-size","42px").style("text-anchor","middle").text(u)})},"draw"),Er={draw:Fa},Ba=Er,_e,Pa={clear(){_e=void 0},setErrorMessage(i){_e=i},getErrorMessage(){return _e}},Va={db:Pa,renderer:Er,parser:{parse:t(()=>{return},"parse")}},Ga=Va,Tr="flowchart-elk",Ha=t((i,n={})=>{if(/^\s*flowchart-elk/.test(i))return n.layout="elk",!0;return!1},"detector"),Ua=t(async()=>{let{diagram:i}=await (_("a00vg115"),import("./chunk-a00vg115.js"));return{id:Tr,diagram:i}},"loader"),Wa={id:Tr,detector:Ha,loader:Ua},ja=Wa,Cr="timeline",Ya=t((i)=>/^\s*timeline/.test(i),"detector"),qa=t(async()=>{let{diagram:i}=await (_("vk7ch6fh"),import("./chunk-vk7ch6fh.js"));return{id:Cr,diagram:i}},"loader"),Xa={id:Cr,detector:Ya,loader:qa},Ka=Xa,kr="mindmap",Qa=t((i)=>/^\s*mindmap/.test(i),"detector"),Za=t(async()=>{let{diagram:i}=await (_("y9waq403"),import("./chunk-y9waq403.js"));return{id:kr,diagram:i}},"loader"),Ja={id:kr,detector:Qa,loader:Za},ei=Ja,Mr="kanban",ri=t((i)=>/^\s*kanban/.test(i),"detector"),ti=t(async()=>{let{diagram:i}=await (_("qq06x2ce"),import("./chunk-qq06x2ce.js"));return{id:Mr,diagram:i}},"loader"),ai={id:Mr,detector:ri,loader:ti},oi=ai,_r="sankey",ni=t((i)=>/^\s*sankey(-beta)?/.test(i),"detector"),di=t(async()=>{let{diagram:i}=await (_("2x7vmhm0"),import("./chunk-2x7vmhm0.js"));return{id:_r,diagram:i}},"loader"),ci={id:_r,detector:ni,loader:di},fi=ci,Lr="packet",mi=t((i)=>/^\s*packet(-beta)?/.test(i),"detector"),ui=t(async()=>{let{diagram:i}=await (_("a6g3nqp0"),import("./chunk-a6g3nqp0.js"));return{id:Lr,diagram:i}},"loader"),pi={id:Lr,detector:mi,loader:ui},Ar="radar",gi=t((i)=>/^\s*radar-beta/.test(i),"detector"),vi=t(async()=>{let{diagram:i}=await (_("1xm9x7d6"),import("./chunk-1xm9x7d6.js"));return{id:Ar,diagram:i}},"loader"),hi={id:Ar,detector:gi,loader:vi},Ir="block",yi=t((i)=>/^\s*block(-beta)?/.test(i),"detector"),wi=t(async()=>{let{diagram:i}=await (_("xvm66b7v"),import("./chunk-xvm66b7v.js"));return{id:Ir,diagram:i}},"loader"),xi={id:Ir,detector:yi,loader:wi},bi=xi,Rr="treeView",Si=t((i)=>/^\s*treeView-beta/.test(i),"detector"),Ei=t(async()=>{let{diagram:i}=await (_("3wpxymxa"),import("./chunk-3wpxymxa.js"));return{id:Rr,diagram:i}},"loader"),Ti={id:Rr,detector:Si,loader:Ei},Ci=Ti,$r="architecture",ki=t((i)=>/^\s*architecture/.test(i),"detector"),Di=t(async()=>{let{diagram:i}=await (_("8j4tzff5"),import("./chunk-8j4tzff5.js"));return{id:$r,diagram:i}},"loader"),Mi={id:$r,detector:ki,loader:Di},_i=Mi,zr="eventmodeling",Li=t((i)=>/^\s*eventmodeling/.test(i),"detector"),Ai=t(async()=>{let{diagram:i}=await (_("jh3k7xex"),import("./chunk-jh3k7xex.js"));return{id:zr,diagram:i}},"loader"),Ii={id:zr,detector:Li,loader:Ai},Ri=Ii,Fr="ishikawa",Oi=t((i)=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),Pi=t(async()=>{let{diagram:i}=await (_("e57h40qa"),import("./chunk-e57h40qa.js"));return{id:Fr,diagram:i}},"loader"),Ni={id:Fr,detector:Oi,loader:Pi},Or="venn",Vi=t((i)=>/^\s*venn-beta/.test(i),"detector"),Gi=t(async()=>{let{diagram:i}=await (_("p6e2vr51"),import("./chunk-p6e2vr51.js"));return{id:Or,diagram:i}},"loader"),Hi={id:Or,detector:Vi,loader:Gi},Wi=Hi,Br="treemap",ji=t((i)=>/^\s*treemap/.test(i),"detector"),Yi=t(async()=>{let{diagram:i}=await (_("v4cqc9f9"),import("./chunk-v4cqc9f9.js"));return{id:Br,diagram:i}},"loader"),qi={id:Br,detector:ji,loader:Yi},Pr="usecase",Ki=t((i)=>/^\s*usecase-beta(?:\s|$)/.test(i),"detector"),Qi=t(async()=>{let{diagram:i}=await (_("dmha2y9c"),import("./chunk-dmha2y9c.js"));return{id:Pr,diagram:i}},"loader"),Zi={id:Pr,detector:Ki,loader:Qi},Nr="wardley",Ji=t((i)=>/^\s*wardley-beta/i.test(i),"detector"),ro=t(async()=>{let{diagram:i}=await (_("jh33m2mq"),import("./chunk-jh33m2mq.js"));return{id:Nr,diagram:i}},"loader"),to={id:Nr,detector:Ji,loader:ro},ao=to,Vr="cynefin",io=t((i)=>/^\s*cynefin-beta(?:[\s:]|$)/.test(i),"detector"),oo=t(async()=>{let{diagram:i}=await (_("g7hqafb8"),import("./chunk-g7hqafb8.js"));return{id:Vr,diagram:i}},"loader"),no={id:Vr,detector:io,loader:oo},Ur="railroad",so=t((i)=>/^\s*railroad-beta/i.test(i),"detector"),lo=t(async()=>{let{diagram:i}=await (_("zqcg6frm"),import("./chunk-zqcg6frm.js"));return{id:Ur,diagram:i}},"loader"),vo={id:Ur,detector:so,loader:lo},jr="railroadEbnf",ho=t((i)=>/^\s*railroad-ebnf-beta/i.test(i),"detector"),yo=t(async()=>{let{diagram:i}=await (_("xe121vg7"),import("./chunk-xe121vg7.js"));return{id:jr,diagram:i}},"loader"),xo={id:jr,detector:ho,loader:yo},Yr="railroadAbnf",bo=t((i)=>/^\s*railroad-abnf-beta/i.test(i),"detector"),So=t(async()=>{let{diagram:i}=await (_("9k7fkx80"),import("./chunk-9k7fkx80.js"));return{id:Yr,diagram:i}},"loader"),Eo={id:Yr,detector:bo,loader:So},qr="railroadPeg",To=t((i)=>/^\s*railroad-peg-beta/i.test(i),"detector"),Co=t(async()=>{let{diagram:i}=await (_("atppv8fk"),import("./chunk-atppv8fk.js"));return{id:qr,diagram:i}},"loader"),ko={id:qr,detector:To,loader:Co},tr=!1,Te=t(()=>{if(tr)return;tr=!0,Hr("error",Ga,(i)=>i.toLowerCase().trim()==="error"),Hr("---",{db:{clear:t(()=>{},"clear")},styles:{},renderer:{draw:t(()=>{},"draw")},parser:{parse:t(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:t(()=>null,"init")},(i)=>i.toLowerCase().trimStart().startsWith("---")),Da(ja,ei,_i),Da(Rt,Ct,oi,Ta,Vt,Qt,ea,ia,va,xa,Ot,_t,Ka,Wt,La,$a,da,fi,pi,ma,bi,Ri,Ci,hi,Ni,qi,vo,xo,Eo,ko,Wi,ao,no,Zi)},"addDiagrams"),Do=t(async()=>{a.debug("Loading registered diagrams");let n=(await Promise.allSettled(Object.entries(Tn).map(async([s,{detector:d,loader:c}])=>{if(!c)return;try{Oa(s)}catch{try{let{diagram:l,id:m}=await c();Hr(m,l,d)}catch(l){throw a.error(`Failed to load external diagram with key ${s}. Removing from detectors.`),delete Tn[s],l}}}))).filter((s)=>s.status==="rejected");if(n.length>0){a.error(`Failed to load ${n.length} external diagrams`);for(let s of n)a.error(s);throw Error(`Failed to load ${n.length} external diagrams`)}},"loadRegisteredDiagrams"),Mo="graphics-document document";function Xr(i,n){if(i.attr("role",Mo),n!=="")i.attr("aria-roledescription",n)}t(Xr,"setA11yDiagramInfo");function Qr(i,n,s,d){if(i.insert===void 0)return;if(s){let c=`chart-desc-${d}`;i.attr("aria-describedby",c),i.insert("desc",":first-child").attr("id",c).text(s)}if(n){let c=`chart-title-${d}`;i.attr("aria-labelledby",c),i.insert("title",":first-child").attr("id",c).text(n)}}t(Qr,"addSVGa11yTitleDescription");var Se=class i{constructor(n,s,d,c,l){this.type=n,this.text=s,this.db=d,this.parser=c,this.renderer=l}static{t(this,"Diagram")}static async fromText(n,s={}){let d=typeof n==="string"?{raw:n,cleaned:n}:n,c=x(),l=xr(d.cleaned,c);try{Oa(l)}catch{let h=co(l);if(!h)throw new Bi(`Diagram ${l} not found.`);let{id:C,diagram:A}=await h();Hr(C,A)}let{db:m,parser:f,renderer:u,init:v}=Oa(l);if(f.parser)f.parser.yy=m;if(m.clear?.(),v?.(c),s.title)m.setDiagramTitle?.(s.title);let w=d.cleaned;if(m.preserveCommentsWhenParsing&&d.withComments){let h=c.maxTextSize??N.maxTextSize;if(d.withComments.length>h)a.warn(`Comment-preserving source exceeds maxTextSize (${d.withComments.length} > ${h}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`);else w=d.withComments}let b=wo(w)+`
|
|
3
|
+
`;if(d.frontmatterLineOffset)m.setFrontmatterLineOffset?.(d.frontmatterLineOffset);return await f.parse(b),new i(l,b,m,f,u)}async render(n,s){await this.renderer.draw(this.text,n,s,this)}getParser(){return this.parser}getType(){return this.type}},ar=[],Lo=t(()=>{ar.forEach((i)=>{i()}),ar=[]},"attachFunctions"),Ao=t((i)=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Zr(i){let n=$i(i);if(!n)return{text:i,metadata:{}};let s=n.indent,d=s?n.body.split(`
|
|
4
4
|
`).map((m)=>m.startsWith(s)?m.slice(s.length):m).join(`
|
|
5
|
-
`):n.body,c=rt(d,{schema:nt})??{};c=typeof c==="object"&&!Array.isArray(c)?c:{};let l={};if(c.displayMode)l.displayMode=c.displayMode.toString();if(c.title)l.title=c.title.toString();if(c.config)l.config=c.config;return{text:i.slice(n.length),metadata:l}}t(
|
|
6
|
-
`).replace(/<(\w+)([^>]*)>/g,(n,s,d)=>"<"+s+d.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Ro=t((i)=>{let{text:n,metadata:s}=
|
|
5
|
+
`):n.body,c=rt(d,{schema:nt})??{};c=typeof c==="object"&&!Array.isArray(c)?c:{};let l={};if(c.displayMode)l.displayMode=c.displayMode.toString();if(c.title)l.title=c.title.toString();if(c.config)l.config=c.config;return{text:i.slice(n.length),metadata:l}}t(Zr,"extractFrontMatter");var Io=t((i)=>i.replace(/\r\n?/g,`
|
|
6
|
+
`).replace(/<(\w+)([^>]*)>/g,(n,s,d)=>"<"+s+d.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Ro=t((i)=>{let{text:n,metadata:s}=Zr(i),{displayMode:d,title:c,config:l={}}=s;if(d){if(!l.gantt)l.gantt={};l.gantt.displayMode=d}return{title:c,config:l,text:n}},"processFrontmatter"),$o=t((i)=>{let n=M.detectInit(i)??{},s=M.detectDirective(i,"wrap");if(Array.isArray(s))n.wrap=s.some(({type:d})=>d==="wrap");else if(s?.type==="wrap")n.wrap=!0;return{text:_o(i),directive:n}},"processDirectives");function Ie(i){let n=i,s=Io(i),d=Ro(s),c=$o(d.text),l=U(d.config,c.directive),m=c.text,f=Ao(m),u=s.length>d.text.length?(s.substring(0,s.length-d.text.length).match(/\n/g)??[]).length:0;return{code:{raw:n,cleaned:f,withComments:m,frontmatterLineOffset:u},title:d.title,config:l}}t(Ie,"preprocessDiagram");function Jr(i){let n=new TextEncoder().encode(i),s=Array.from(n,(d)=>String.fromCodePoint(d)).join("");return btoa(s)}t(Jr,"toBase64");var zo=50000,Fo="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Oo="sandbox",Bo="loose",Po="http://www.w3.org/2000/svg",No="http://www.w3.org/1999/xlink",Vo="http://www.w3.org/1999/xhtml",Go="100%",Ho="100%",Uo="border:0;margin:0;",Wo="margin:0",jo="allow-top-navigation-by-user-activation allow-popups",Yo='The "iframe" tag is not supported by your browser.',qo=["foreignobject"],Xo=["dominant-baseline"];function $e(i){let n=Ie(i);Wr();let s;try{s=xr(n.code.cleaned,x())}catch{s=void 0}return Na(s),fo(n.config??{}),n}t($e,"processAndSetConfigs");async function et(i,n){Te();try{let{code:s,config:d}=$e(i);return{diagramType:(await Se.fromText(s)).type,config:d}}catch(s){if(n?.suppressErrors)return!1;throw s}finally{Na(void 0)}}t(et,"parse");var ir=t((i,n,s=[])=>{let d=Fi(`{ ${s.join(" !important; ")} !important; }`);return`.${i} ${n} ${d}`},"cssImportantStyles"),Ko=t((i,n=new Map)=>{let s=new CSSStyleSheet;if(i.fontFamily!==void 0)s.insertRule(`:root { --mermaid-font-family: ${i.fontFamily}}`,s.cssRules.length);if(i.altFontFamily!==void 0)s.insertRule(`:root { --mermaid-alt-font-family: ${i.altFontFamily}}`,s.cssRules.length);if(n instanceof Map){let f=ke(i)?["> *","span"]:["rect","polygon","ellipse","circle","path"];n.forEach((u)=>{if(!De(u.styles))f.forEach((v)=>{s.insertRule(ir(u.id,v,u.styles),s.cssRules.length)});if(!De(u.textStyles))s.insertRule(ir(u.id,"tspan",(u?.textStyles||[]).map((v)=>v.replace("color","fill"))),s.cssRules.length)})}let d="";if(i.themeCSS!==void 0)if(typeof s.replaceSync==="function"){let c=new CSSStyleSheet;c.replaceSync(i.themeCSS),d=Ma(c)+`
|
|
7
7
|
`}else d+=`${i.themeCSS}
|
|
8
|
-
`;return d+
|
|
8
|
+
`;return d+Ma(s)},"createCssStyles"),Qo=t((i,n)=>xe(Je(`${i}{${n}}`),rr([t(function(d,c,l,m){if(d.type==="rule"&&Array.isArray(d.props)){if(d.parent&&d.parent.type===oe)return;d.props=d.props.map((f)=>{if(f===i&&Array.isArray(d.children)&&d.children.every((v)=>{if(v.type!=="decl")return!1;return new Set(["font-family","font-size","fill"]).has(v.props)}))return f;if(!((f.startsWith(`${i} `)||f.startsWith(`${i}>`))&&!f.startsWith(`${i} ||`)))return`${i} ${f}`;return f})}else if(d.type.startsWith("@")){if(![Fe,Be,me,Ne,"@container","@starting-style",oe].includes(d.type))a.warn(`Removing unsupported at-rule ${d.type} from CSS`),d.type=Z}},"addNamespace"),er])),"compileCSS"),Zo=t((i,n,s,d)=>{let c=Ko(i,s),l=go(n,c,{...i.themeVariables,theme:i.theme,look:i.look},d);return Qo(d,l)},"createUserStyles"),Jo=t((i="",n,s)=>{let d=i;if(!s&&!n)d=d.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#');return d=jt(d),d=d.replace(/<br>/g,"<br/>"),d},"cleanUpSvgCode"),en=t((i="",n)=>{let s=n?.viewBox?.baseVal?.height?n.viewBox.baseVal.height+"px":Ho,d=Jr(`<body style="${Wo}">${i}</body>`);return`<iframe style="width:${Go};height:${s};${Uo}" src="data:text/html;charset=UTF-8;base64,${d}" sandbox="${jo}">
|
|
9
9
|
${Yo}
|
|
10
|
-
</iframe>`},"putIntoIFrame"),or=t((i,n,s,d,c)=>{let l=i.append("div");if(l.attr("id",s),d)l.attr("style",d);let m=l.append("svg").attr("id",n).attr("width","100%").attr("xmlns",Po);if(c)m.attr("xmlns:xlink",c);return m.append("g"),i},"appendDivSvgG");function Ae(i,n){return i.append("iframe").attr("id",n).attr("style","width: 100%; height: 100%;").attr("sandbox","")}t(Ae,"sandboxedIframe");var rn=t((i,n,s,d)=>{i.getElementById(n)?.remove(),i.getElementById(s)?.remove(),i.getElementById(d)?.remove()},"removeExistingElements"),tn=t(async function(i,n,s){Te();let d=$e(n),c=d.code;n=c.cleaned;let l=x();if(a.debug(l),n.length>(l?.maxTextSize??zo))n=Fo,c={raw:n,cleaned:n};let m=`#${i}`,f="i"+i,u="#"+f,v="d"+i,w="#"+v,b=t(()=>{let ie=p(C?u:w).node();if(ie&&"remove"in ie)ie.remove()},"removeTempElements"),h=p(document.body),C=l.securityLevel===Oo,A=l.securityLevel===Bo,k=l.fontFamily;if(s!==void 0){if(s)s.innerHTML="";if(C){let L=Ae(p(s),f);h=p(L.nodes()[0].contentDocument.body),h.node().style.margin="0"}else h=p(s);or(h,i,v,`font-family: ${k}`,No)}else{if(rn(document,i,v,f),C){let L=Ae(p(document.body),f);h=p(L.nodes()[0].contentDocument.body),h.node().style.margin="0"}else h=p("body");or(h,i,v)}let E,D;try{E=await Se.fromText(c,{title:d.title})}catch(L){if(l.suppressErrorRendering)throw b(),L;E=await Se.fromText("error"),D=L,E.db.setErrorMessage?.(
|
|
10
|
+
</iframe>`},"putIntoIFrame"),or=t((i,n,s,d,c)=>{let l=i.append("div");if(l.attr("id",s),d)l.attr("style",d);let m=l.append("svg").attr("id",n).attr("width","100%").attr("xmlns",Po);if(c)m.attr("xmlns:xlink",c);return m.append("g"),i},"appendDivSvgG");function Ae(i,n){return i.append("iframe").attr("id",n).attr("style","width: 100%; height: 100%;").attr("sandbox","")}t(Ae,"sandboxedIframe");var rn=t((i,n,s,d)=>{i.getElementById(n)?.remove(),i.getElementById(s)?.remove(),i.getElementById(d)?.remove()},"removeExistingElements"),tn=t(async function(i,n,s){Te();let d=$e(n),c=d.code;n=c.cleaned;let l=x();if(a.debug(l),n.length>(l?.maxTextSize??zo))n=Fo,c={raw:n,cleaned:n};let m=`#${i}`,f="i"+i,u="#"+f,v="d"+i,w="#"+v,b=t(()=>{let ie=p(C?u:w).node();if(ie&&"remove"in ie)ie.remove()},"removeTempElements"),h=p(document.body),C=l.securityLevel===Oo,A=l.securityLevel===Bo,k=l.fontFamily;if(s!==void 0){if(s)s.innerHTML="";if(C){let L=Ae(p(s),f);h=p(L.nodes()[0].contentDocument.body),h.node().style.margin="0"}else h=p(s);or(h,i,v,`font-family: ${k}`,No)}else{if(rn(document,i,v,f),C){let L=Ae(p(document.body),f);h=p(L.nodes()[0].contentDocument.body),h.node().style.margin="0"}else h=p("body");or(h,i,v)}let E,D;try{E=await Se.fromText(c,{title:d.title})}catch(L){if(l.suppressErrorRendering)throw b(),L;E=await Se.fromText("error"),D=L,E.db.setErrorMessage?.(Xi(L))}let I=h.select(w).node(),S=E.type,P=I.firstChild,Q=P.firstChild,G=E.renderer.getClasses?.(n,E),z=Zo(l,S,G,m),g=document.createElement("style");g.innerHTML=z,P.insertBefore(g,Q);try{await E.renderer.draw(n,i,"12.2.0",E)}catch(L){if(l.suppressErrorRendering)b();else Ba.draw(n,i,"12.2.0");throw L}let gt=h.select(`${w} svg`),vt=E.db.getAccTitle?.(),yt=E.db.getAccDescription?.();at(S,gt,vt,yt);let wt=t(()=>{h.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",Vo);let L=h.select(w).node().innerHTML;if(a.debug("config.arrowMarkerAbsolute",l.arrowMarkerAbsolute),L=Jo(L,C,ht(l.arrowMarkerAbsolute)),C){let ie=h.select(w+" svg").node();L=en(L,ie)}else if(!A)L=Re.sanitize(L,{ADD_TAGS:qo,ADD_ATTR:Xo,HTML_INTEGRATION_POINTS:{foreignobject:!0}});return Lo(),L},"serializeSvg")();if(D)throw D;return b(),{diagramType:S,svg:wt,bindFunctions:E.db.bindFunctions}},"renderDiagram"),an=t(async function(i,n,s){try{return await tn(i,n,s)}finally{Na(void 0)}},"render");function tt(i={}){let n=se({},i);if(n?.fontFamily&&!n.themeVariables?.fontFamily){if(!n.themeVariables)n.themeVariables={};n.themeVariables.fontFamily=n.fontFamily}po(n);let s=on.theme;if(n?.theme&&Object.hasOwn(Kt,n.theme))n.themeVariables=Kt[n.theme].getThemeVariables(n.themeVariables);else if(n){if(n.theme!=null&&n.theme!=="null")n.theme=s;n.themeVariables=Kt[s].getThemeVariables(n.themeVariables)}let d=typeof n==="object"?uo(n):zi();Gr(d.logLevel),Te()}t(tt,"initialize");var nn=t((i,n={})=>{let{code:s}=Ie(i);return Se.fromText(s,n)},"getDiagramFromText");function at(i,n,s,d){Xr(n,i),Qr(n,s,d,n.attr("id"))}t(at,"addA11yInfo");var K=Object.freeze({render:an,parse:et,getDiagramFromText:nn,initialize:tt,getConfig:x,setConfig:Ui,getSiteConfig:zi,updateSiteConfig:mo,reset:t(()=>{Wr()},"reset"),globalReset:t(()=>{Wr(on)},"globalReset"),defaultConfig:on});Gr(x().logLevel);Wr(x());var sn=t((i,n,s)=>{if(a.warn(i),si(i)){if(s)s(i.str,i.hash);n.push({...i,message:i.str,error:i})}else{if(s)s(i);if(i instanceof Error)n.push({str:i.message,message:i.message,hash:i.name,error:i})}},"handleError"),it=t(async function(i={querySelector:".mermaid"}){try{await dn(i)}catch(n){if(si(n))a.error(n.str);if(q.parseError)q.parseError(n);if(!i.suppressErrors)throw a.error("Use the suppressErrors option to suppress these errors"),n}},"run"),dn=t(async function({postRenderCallback:i,querySelector:n,nodes:s}={querySelector:".mermaid"}){let d=K.getConfig();a.debug(`${!i?"No ":""}Callback function found`);let c;if(s)c=s;else if(n)c=document.querySelectorAll(n);else throw Error("Nodes and querySelector are both undefined");if(a.debug(`Found ${c.length} diagrams`),d?.startOnLoad!==void 0)a.debug("Start On Load: "+d?.startOnLoad),K.updateSiteConfig({startOnLoad:d?.startOnLoad});let l=new M.InitIDGenerator(d.deterministicIds,d.deterministicIDSeed),m,f=[];for(let u of Array.from(c)){if(a.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let v=`mermaid-${l.next()}`;m=u.innerHTML,m=li(M.entityDecode(m)).trim().replace(/<br\s*\/?>/gi,"<br/>");let w=M.detectInit(m);if(w)a.debug("Detected early reinit: ",w);try{let{svg:b,bindFunctions:h}=await ct(v,m,u);if(u.innerHTML=b,i)await i(v);if(h)h(u)}catch(b){sn(b,f,q.parseError)}}if(f.length>0)throw f[0]},"runThrowsErrors"),ot=t(function(i){K.initialize(i)},"initialize"),cn=t(async function(i,n,s){if(a.warn("mermaid.init is deprecated. Please use run instead."),i)ot(i);let d={postRenderCallback:s,querySelector:".mermaid"};if(typeof n==="string")d.querySelector=n;else if(n)if(n instanceof HTMLElement)d.nodes=[n];else d.nodes=n;await it(d)},"init"),ln=t(async(i,{lazyLoad:n=!0}={})=>{if(Te(),Da(...i),n===!1)await Do()},"registerExternalDiagrams"),st=t(function(){if(q.startOnLoad){let{startOnLoad:i}=K.getConfig();if(i)q.run().catch((n)=>a.error("Mermaid failed to initialize",n))}},"contentLoaded");if(typeof document<"u")window.addEventListener("load",st,!1);var fn=t(function(i){q.parseError=i},"setParseErrorHandler"),Ee=[],Le=!1,dt=t(async()=>{if(Le)return;Le=!0;while(Ee.length>0){let i=Ee.shift();if(i)try{await i()}catch(n){a.error("Error executing queue",n)}}Le=!1},"executeQueue"),mn=t(async(i,n)=>new Promise((s,d)=>{let c=t(()=>new Promise((l,m)=>{K.parse(i,n).then((f)=>{l(f),s(f)},(f)=>{a.error("Error parsing",f),q.parseError?.(f),m(f),d(f)})}),"performCall");Ee.push(c),dt().catch(d)}),"parse"),ct=t((i,n,s)=>new Promise((d,c)=>{let l=t(()=>new Promise((m,f)=>{K.render(i,n,s).then((u)=>{m(u),d(u)},(u)=>{a.error("Error parsing",u),q.parseError?.(u),f(u),c(u)})}),"performCall");Ee.push(l),dt().catch(c)}),"render"),pn=t(()=>Object.keys(Tn).map((i)=>({id:i})),"getRegisteredDiagramsMetadata"),q={startOnLoad:!0,mermaidAPI:K,parse:mn,render:ct,init:cn,run:it,registerExternalDiagrams:ln,registerLayoutLoaders:eo,initialize:ot,parseError:void 0,contentLoaded:st,setParseErrorHandler:fn,detectType:xr,registerIconPacks:In,getRegisteredDiagramsMetadata:pn},Ce=q;/*! Check if previously processed *//*!
|
|
11
11
|
* Wait for document loaded before starting the execution
|
|
12
12
|
*/function lt(i,n){if(!(n instanceof Error)||!("hash"in n))return;let s=n.hash;if(typeof s!=="object"||s===null)return;if(!("token"in s)||s.token!=="LINK_ID")return;if(!("text"in s)||typeof s.text!=="string"||!s.text.endsWith("@"))return;if(!("line"in s)||typeof s.line!=="number"||!Number.isInteger(s.line))return;let d=i.split(`
|
|
13
13
|
`),c=d[s.line];if(c===void 0)return;let l=c.lastIndexOf(s.text);if(l<0)return;let m=l+s.text.length-1;return d[s.line]=`${c.slice(0,m)}@${c.slice(m+1)}`,d.join(`
|
|
@@ -18,4 +18,4 @@ import{_,o,G,r,e,y}from"./chunk-3k9h7a73.js";import{t,a,qr,Re,Pi,Oi,Sn,br,La,so,
|
|
|
18
18
|
.edgeLabel, .edgeLabel p, .edgeLabel rect { border-radius: 999px; font-size: 12px; }
|
|
19
19
|
.edgeLabel p { padding: 1px 6px; }
|
|
20
20
|
.cluster rect { rx: 12px; ry: 12px; stroke-dasharray: 4 3; }
|
|
21
|
-
`}var gn=60,ae=new Map;function ut(i,n,s=""){return`${n}:${s}:${i}`}function vn(i,n){if(ae.size>=gn){let s=ae.keys().next().value;if(s!==void 0)ae.delete(s)}ae.set(i,n)}var pt;function hn(i,n,s){let d=s??i;if(pt===d)return;Ce.initialize({startOnLoad:!1,suppressErrorRendering:!0,securityLevel:"strict",theme:"base",themeVariables:ft(i,n),themeCSS:mt(i),fontFamily:n?.fonts?.sans||"var(--font-sans)",flowchart:{useMaxWidth:!1,curve:"basis",padding:14,nodeSpacing:44,rankSpacing:56},sequence:{useMaxWidth:!1},state:{useMaxWidth:!1},class:{useMaxWidth:!1},er:{useMaxWidth:!1},gantt:{useMaxWidth:!1},mindmap:{useMaxWidth:!1},timeline:{useMaxWidth:!1}}),pt=d}var yn=0,wn=32;async function xn(i,n,s,d,c){hn(n,d,c);let l=`${s}-${++yn}`,m=i,f=0;try{while(!0)try{let{svg:u}=await Ce.render(l,m);return u.replace(/filter="url\(#[^"]+\)"/g,"").replace(/filter:\s*url\(#[^)]+\);?/g,"")}catch(u){let v=f<wn?lt(m,u):void 0;if(!v)throw u;m=v,f+=1}}finally{document.getElementById(`d${l}`)?.remove()}}var bn=(i)=>i instanceof Error?i.message:String(i);function Ts(i){let n=y(),s=n.useTheme?.(),d=n.useColorScheme?.(),c=s?.resolved??d??"light",l=s?.tokens,m=s?.themeID?`${s.themeID}-${c}`:c,f=`mermaid-${
|
|
21
|
+
`}var gn=60,ae=new Map;function ut(i,n,s=""){return`${n}:${s}:${i}`}function vn(i,n){if(ae.size>=gn){let s=ae.keys().next().value;if(s!==void 0)ae.delete(s)}ae.set(i,n)}var pt;function hn(i,n,s){let d=s??i;if(pt===d)return;Ce.initialize({startOnLoad:!1,suppressErrorRendering:!0,securityLevel:"strict",theme:"base",themeVariables:ft(i,n),themeCSS:mt(i),fontFamily:n?.fonts?.sans||"var(--font-sans)",flowchart:{useMaxWidth:!1,curve:"basis",padding:14,nodeSpacing:44,rankSpacing:56},sequence:{useMaxWidth:!1},state:{useMaxWidth:!1},class:{useMaxWidth:!1},er:{useMaxWidth:!1},gantt:{useMaxWidth:!1},mindmap:{useMaxWidth:!1},timeline:{useMaxWidth:!1}}),pt=d}var yn=0,wn=32;async function xn(i,n,s,d,c){hn(n,d,c);let l=`${s}-${++yn}`,m=i,f=0;try{while(!0)try{let{svg:u}=await Ce.render(l,m);return u.replace(/filter="url\(#[^"]+\)"/g,"").replace(/filter:\s*url\(#[^)]+\);?/g,"")}catch(u){let v=f<wn?lt(m,u):void 0;if(!v)throw u;m=v,f+=1}}finally{document.getElementById(`d${l}`)?.remove()}}var bn=(i)=>i instanceof Error?i.message:String(i);function Ts(i){let n=y(),s=n.useTheme?.(),d=n.useColorScheme?.(),c=s?.resolved??d??"light",l=s?.tokens,m=s?.themeID?`${s.themeID}-${c}`:c,f=`mermaid-${W().replace(/[^\w-]/g,"")}`,u=i.code.trim(),[v,w]=r(()=>ae.get(ut(u,c,m))),[b,h]=r(),[C,A]=r(!v);return o(()=>{let k=ut(u,c,m),E=ae.get(k);if(E){w(E),h(void 0),A(!1);return}let D=!0;A(!0);let I=setTimeout(async()=>{try{if(i.streaming&&!await Ce.parse(u,{suppressErrors:!0})){if(D)A(!1);return}let S=await xn(u,c,f,l,m);if(vn(k,S),!D)return;w(S),h(void 0)}catch(S){if(D)h(bn(S))}if(D)A(!1)},i.streaming?200:0);return()=>{D=!1,clearTimeout(I)}},[u,c,m,l,i.streaming,f]),e(ra,{title:"流程图",code:i.code,codeLang:"mermaid",rendered:Boolean(v),pending:C,streaming:i.streaming,error:b,children:e("div",{role:"img","aria-label":"Mermaid 流程图",className:"flex overflow-x-auto px-6 py-7 [background-image:radial-gradient(var(--color-line)_1px,transparent_1px)] [background-size:16px_16px] [&_svg]:mx-auto [&_svg]:h-auto [&_svg]:max-w-full",dangerouslySetInnerHTML:{__html:v??""}})})}export{Ts as MermaidBlock};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{pi}from"./chunk-mykrm8ba.js";export{pi as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ri}from"./chunk-a9er7a7c.js";export{Ri as createInfoServices};
|