@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{H}from"./chunk-jyf7a7yp.js";import{t,a,M,x,O,gt,C,S,E,T,A,L,R,l,p,V,Vi,Ln,at,U,Fe,Le}from"./chunk-b5zf1hs3.js";import{Q}from"./chunk-n9v14vyd.js";import{ft,yr}from"./chunk-hn8m1vsg.js";import{Ce,Se}from"./chunk-3k9h7a73.js";var ut=Se(function(rt,st){(function(i,s){if(typeof rt==="object"&&typeof st==="object")st.exports=s(yr());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof rt==="object")rt.cytoscapeFcose=s(yr());else i.cytoscapeFcose=s(i.coseBase)})(rt,function(e){return(()=>{var i={658:(N)=>{N.exports=Object.assign!=null?Object.assign.bind(Object):function(z){for(var v=arguments.length,b=Array(v>1?v-1:0),c=1;c<v;c++)b[c-1]=arguments[c];return b.forEach(function(y){Object.keys(y).forEach(function(d){return z[d]=y[d]})}),z}},548:(N,z,v)=>{var b=function(){function d(f,u){var g=[],r=!0,B=!1,F=void 0;try{for(var o=f[Symbol.iterator](),h;!(r=(h=o.next()).done);r=!0)if(g.push(h.value),u&&g.length===u)break}catch(k){B=!0,F=k}finally{try{if(!r&&o.return)o.return()}finally{if(B)throw F}}return g}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return d(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=v(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(d){var f={};for(var u=0;u<d.length;u++)f[d[u].id()]=!0;var g=d.filter(function(r,B){if(typeof r==="number")r=B;var F=r.parent()[0];while(F!=null){if(f[F.id()])return!1;F=F.parent()[0]}return!0});return g},y.connectComponents=function(d,f,u,g){var r=new c,B=new Set,F=[],o=void 0,h=void 0,k=void 0,n=!1,P=1,X=[],D=[],j=function(){var I=d.collection();D.push(I);var Y=u[0],J=d.collection();J.merge(Y).merge(Y.descendants().intersection(f)),F.push(Y),J.forEach(function(re){r.push(re),B.add(re),I.merge(re)});var Z=function(){Y=r.shift();var ue=d.collection();Y.neighborhood().nodes().forEach(function(q){if(f.intersection(Y.edgesWith(q)).length>0)ue.merge(q)});for(var Ae=0;Ae<ue.length;Ae++){var Pe=ue[Ae];if(o=u.intersection(Pe.union(Pe.ancestors())),o!=null&&!B.has(o[0])){var de=o.union(o.descendants());de.forEach(function(q){if(r.push(q),B.add(q),I.merge(q),u.has(q))F.push(q)})}}};while(r.length!=0)Z();if(I.forEach(function(re){f.intersection(re.connectedEdges()).forEach(function(ue){if(I.has(ue.source())&&I.has(ue.target()))I.merge(ue)})}),F.length==u.length)n=!0;if(!n||n&&P>1){h=F[0],k=h.connectedEdges().length,F.forEach(function(re){if(re.connectedEdges().length<k)k=re.connectedEdges().length,h=re}),X.push(h.id());var se=d.collection();se.merge(F[0]),F.forEach(function(re){se.merge(re)}),F=[],u=u.difference(se),P++}};do j();while(!n);if(g){if(X.length>0)g.set("dummy"+(g.size+1),X)}return D},y.relocateComponent=function(d,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:B,NEGATIVE_INFINITY:F}=Number;if(u.quality=="draft"){var o=!0,h=!1,k=void 0;try{for(var n=f.nodeIndexes[Symbol.iterator](),P;!(o=(P=n.next()).done);o=!0){var X=P.value,D=b(X,2),j=D[0],_=D[1],I=u.cy.getElementById(j);if(I){var Y=I.boundingBox(),J=f.xCoords[_]-Y.w/2,Z=f.xCoords[_]+Y.w/2,se=f.yCoords[_]-Y.h/2,re=f.yCoords[_]+Y.h/2;if(J<g)g=J;if(Z>r)r=Z;if(se<B)B=se;if(re>F)F=re}}}catch(q){h=!0,k=q}finally{try{if(!o&&n.return)n.return()}finally{if(h)throw k}}var ue=d.x-(r+g)/2,Ae=d.y-(F+B)/2;f.xCoords=f.xCoords.map(function(q){return q+ue}),f.yCoords=f.yCoords.map(function(q){return q+Ae})}else{Object.keys(f).forEach(function(q){var oe=f[q],Ne=oe.getRect().x,ke=oe.getRect().x+oe.getRect().width,De=oe.getRect().y,xe=oe.getRect().y+oe.getRect().height;if(Ne<g)g=Ne;if(ke>r)r=ke;if(De<B)B=De;if(xe>F)F=xe});var Pe=d.x-(r+g)/2,de=d.y-(F+B)/2;Object.keys(f).forEach(function(q){var oe=f[q];oe.setCenter(oe.getCenterX()+Pe,oe.getCenterY()+de)})}}},y.calcBoundingBox=function(d,f,u,g){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:B,MAX_SAFE_INTEGER:F,MIN_SAFE_INTEGER:o}=Number,h=void 0,k=void 0,n=void 0,P=void 0,X=d.descendants().not(":parent"),D=X.length;for(var j=0;j<D;j++){var _=X[j];if(h=f[g.get(_.id())]-_.width()/2,k=f[g.get(_.id())]+_.width()/2,n=u[g.get(_.id())]-_.height()/2,P=u[g.get(_.id())]+_.height()/2,r>h)r=h;if(B<k)B=k;if(F>n)F=n;if(o<P)o=P}var I={};return I.topLeftX=r,I.topLeftY=F,I.width=B-r,I.height=o-F,I},y.calcParentsWithoutChildren=function(d,f){var u=d.collection();return f.nodes(":parent").forEach(function(g){var r=!1;if(g.children().forEach(function(B){if(B.css("display")!="none")r=!0}),!r)u.merge(g)}),u},N.exports=y},816:(N,z,v)=>{var b=v(548),c=v(140).CoSELayout,y=v(140).CoSENode,d=v(140).layoutBase.PointD,f=v(140).layoutBase.DimensionD,u=v(140).layoutBase.LayoutConstants,g=v(140).layoutBase.FDLayoutConstants,r=v(140).CoSEConstants,B=function(o,h){var{cy:k,eles:n}=o,P=n.nodes(),X=n.edges(),D=void 0,j=void 0,_=void 0,I={};if(o.randomize)D=h.nodeIndexes,j=h.xCoords,_=h.yCoords;var Y=function(q){return typeof q==="function"},J=function(q,oe){if(Y(q))return q(oe);else return q},Z=b.calcParentsWithoutChildren(k,n),se=function de(q,oe,Ne,ke){var De=oe.length;for(var xe=0;xe<De;xe++){var W=oe[xe],Te=null;if(W.intersection(Z).length==0)Te=W.children();var ie=void 0,ve=W.layoutDimensions({nodeDimensionsIncludeLabels:ke.nodeDimensionsIncludeLabels});if(W.outerWidth()!=null&&W.outerHeight()!=null)if(ke.randomize)if(!W.isParent())ie=q.add(new y(Ne.graphManager,new d(j[D.get(W.id())]-ve.w/2,_[D.get(W.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var Me=b.calcBoundingBox(W,j,_,D);if(W.intersection(Z).length==0)ie=q.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(Me.width,Me.height)));else ie=q.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else ie=q.add(new y(Ne.graphManager,new d(W.position("x")-ve.w/2,W.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else ie=q.add(new y(this.graphManager));if(ie.id=W.data("id"),ie.nodeRepulsion=J(ke.nodeRepulsion,W),ie.paddingLeft=parseInt(W.css("padding")),ie.paddingTop=parseInt(W.css("padding")),ie.paddingRight=parseInt(W.css("padding")),ie.paddingBottom=parseInt(W.css("padding")),ke.nodeDimensionsIncludeLabels)ie.labelWidth=W.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ie.labelHeight=W.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ie.labelPosVertical=W.css("text-valign"),ie.labelPosHorizontal=W.css("text-halign");if(I[W.data("id")]=ie,isNaN(ie.rect.x))ie.rect.x=0;if(isNaN(ie.rect.y))ie.rect.y=0;if(Te!=null&&Te.length>0){var ze=void 0;ze=Ne.getGraphManager().add(Ne.newGraph(),ie),de(ze,Te,Ne,ke)}}},re=function(q,oe,Ne){var ke=0,De=0;for(var xe=0;xe<Ne.length;xe++){var W=Ne[xe],Te=I[W.data("source")],ie=I[W.data("target")];if(Te&&ie&&Te!==ie&&Te.getEdgesBetween(ie).length==0){var ve=oe.add(q.newEdge(),Te,ie);ve.id=W.id(),ve.idealLength=J(o.idealEdgeLength,W),ve.edgeElasticity=J(o.edgeElasticity,W),ke+=ve.idealLength,De++}}if(o.idealEdgeLength!=null){if(De>0)r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ke/De;else if(!Y(o.idealEdgeLength))r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50;r.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH}},ue=function(q,oe){if(oe.fixedNodeConstraint)q.constraints.fixedNodeConstraint=oe.fixedNodeConstraint;if(oe.alignmentConstraint)q.constraints.alignmentConstraint=oe.alignmentConstraint;if(oe.relativePlacementConstraint)q.constraints.relativePlacementConstraint=oe.relativePlacementConstraint};if(o.nestingFactor!=null)r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)r.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)r.MAX_ITERATIONS=g.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)r.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)r.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)r.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=g.ANIMATE=u.ANIMATE=o.animate,r.TILE=o.tile,r.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!1;if(o.step=="enforced")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!1;if(o.step=="cose")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)r.TREE_REDUCTION_ON_INCREMENTAL=!1;else r.TREE_REDUCTION_ON_INCREMENTAL=!0;var Ae=new c,Pe=Ae.newGraphManager();return se(Pe.addRoot(),b.getTopMostNodes(P),Ae,o),re(Ae,Pe,X),ue(Ae,o),Ae.runLayout(),I};N.exports={coseLayout:B}},212:(N,z,v)=>{var b=function(){function o(h,k){for(var n=0;n<k.length;n++){var P=k[n];if(P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P)P.writable=!0;Object.defineProperty(h,P.key,P)}}return function(h,k,n){if(k)o(h.prototype,k);if(n)o(h,n);return h}}();function c(o,h){if(!(o instanceof h))throw TypeError("Cannot call a class as a function")}var y=v(658),d=v(548),f=v(657),u=f.spectralLayout,g=v(816),r=g.coseLayout,B=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),F=function(){function o(h){c(this,o),this.options=y({},B,h)}return b(o,[{key:"run",value:function(){var k=this,n=this.options,{cy:P,eles:X}=n,D=[],j=void 0,_=void 0,I=[],Y=void 0,J=[];if(n.fixedNodeConstraint&&(!Array.isArray(n.fixedNodeConstraint)||n.fixedNodeConstraint.length==0))n.fixedNodeConstraint=void 0;if(n.alignmentConstraint){if(n.alignmentConstraint.vertical&&(!Array.isArray(n.alignmentConstraint.vertical)||n.alignmentConstraint.vertical.length==0))n.alignmentConstraint.vertical=void 0;if(n.alignmentConstraint.horizontal&&(!Array.isArray(n.alignmentConstraint.horizontal)||n.alignmentConstraint.horizontal.length==0))n.alignmentConstraint.horizontal=void 0}if(n.relativePlacementConstraint&&(!Array.isArray(n.relativePlacementConstraint)||n.relativePlacementConstraint.length==0))n.relativePlacementConstraint=void 0;var Z=n.fixedNodeConstraint||n.alignmentConstraint||n.relativePlacementConstraint;if(Z)n.tile=!1,n.packComponents=!1;var se=void 0,re=!1;if(P.layoutUtilities&&n.packComponents){if(se=P.layoutUtilities("get"),!se)se=P.layoutUtilities();re=!0}if(X.nodes().length>0)if(!re){var ue=n.eles.boundingBox();if(J.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),n.randomize){var Ae=u(n);D.push(Ae)}if(n.quality=="default"||n.quality=="proof")I.push(r(n,D[0])),d.relocateComponent(J[0],I[0],n);else d.relocateComponent(J[0],D[0],n)}else{var Pe=d.getTopMostNodes(n.eles.nodes());if(Y=d.connectComponents(P,n.eles,Pe),Y.forEach(function(K){var G=K.boundingBox();J.push({x:G.x1+G.w/2,y:G.y1+G.h/2})}),n.randomize)Y.forEach(function(K){n.eles=K,D.push(u(n))});if(n.quality=="default"||n.quality=="proof"){var de=P.collection();if(n.tile){var q=new Map,oe=[],Ne=[],ke=0,De={nodeIndexes:q,xCoords:oe,yCoords:Ne},xe=[];if(Y.forEach(function(K,G){if(K.edges().length==0)K.nodes().forEach(function(pe,le){if(de.merge(K.nodes()[le]),!pe.isParent())De.nodeIndexes.set(K.nodes()[le].id(),ke++),De.xCoords.push(K.nodes()[0].position().x),De.yCoords.push(K.nodes()[0].position().y)}),xe.push(G)}),de.length>1){var W=de.boundingBox();J.push({x:W.x1+W.w/2,y:W.y1+W.h/2}),Y.push(de),D.push(De);for(var Te=xe.length-1;Te>=0;Te--)Y.splice(xe[Te],1),D.splice(xe[Te],1),J.splice(xe[Te],1)}}Y.forEach(function(K,G){n.eles=K,I.push(r(n,D[G])),d.relocateComponent(J[G],I[G],n)})}else Y.forEach(function(K,G){d.relocateComponent(J[G],D[G],n)});var ie=new Set;if(Y.length>1){var ve=[],Me=X.filter(function(K){return K.css("display")=="none"});Y.forEach(function(K,G){var pe=void 0;if(n.quality=="draft")pe=D[G].nodeIndexes;if(K.nodes().not(Me).length>0){var le={};le.edges=[],le.nodes=[];var me=void 0;if(K.nodes().not(Me).forEach(function(fe){if(n.quality=="draft")if(!fe.isParent())me=pe.get(fe.id()),le.nodes.push({x:D[G].xCoords[me]-fe.boundingbox().w/2,y:D[G].yCoords[me]-fe.boundingbox().h/2,width:fe.boundingbox().w,height:fe.boundingbox().h});else{var he=d.calcBoundingBox(fe,D[G].xCoords,D[G].yCoords,pe);le.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(I[G][fe.id()])le.nodes.push({x:I[G][fe.id()].getLeft(),y:I[G][fe.id()].getTop(),width:I[G][fe.id()].getWidth(),height:I[G][fe.id()].getHeight()})}),K.edges().forEach(function(fe){var he=fe.source(),Ee=fe.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(n.quality=="draft"){var Be=pe.get(he.id()),et=pe.get(Ee.id()),Oe=[],Ye=[];if(he.isParent()){var We=d.calcBoundingBox(he,D[G].xCoords,D[G].yCoords,pe);Oe.push(We.topLeftX+We.width/2),Oe.push(We.topLeftY+We.height/2)}else Oe.push(D[G].xCoords[Be]),Oe.push(D[G].yCoords[Be]);if(Ee.isParent()){var Je=d.calcBoundingBox(Ee,D[G].xCoords,D[G].yCoords,pe);Ye.push(Je.topLeftX+Je.width/2),Ye.push(Je.topLeftY+Je.height/2)}else Ye.push(D[G].xCoords[et]),Ye.push(D[G].yCoords[et]);le.edges.push({startX:Oe[0],startY:Oe[1],endX:Ye[0],endY:Ye[1]})}else if(I[G][he.id()]&&I[G][Ee.id()])le.edges.push({startX:I[G][he.id()].getCenterX(),startY:I[G][he.id()].getCenterY(),endX:I[G][Ee.id()].getCenterX(),endY:I[G][Ee.id()].getCenterY()})}}),le.nodes.length>0)ve.push(le),ie.add(G)}});var ze=se.packComponents(ve,n.randomize).shifts;if(n.quality=="draft")D.forEach(function(K,G){var pe=K.xCoords.map(function(me){return me+ze[G].dx}),le=K.yCoords.map(function(me){return me+ze[G].dy});K.xCoords=pe,K.yCoords=le});else{var Ke=0;ie.forEach(function(K){Object.keys(I[K]).forEach(function(G){var pe=I[K][G];pe.setCenter(pe.getCenterX()+ze[Ke].dx,pe.getCenterY()+ze[Ke].dy)}),Ke++})}}}var je=function(G,pe){if(n.quality=="default"||n.quality=="proof"){if(typeof G==="number")G=pe;var le=void 0,me=void 0,fe=G.data("id");if(I.forEach(function(Ee){if(fe in Ee)le={x:Ee[fe].getRect().getCenterX(),y:Ee[fe].getRect().getCenterY()},me=Ee[fe]}),n.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")le.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")le.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")le.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")le.y-=me.labelHeight/2}}if(le==null)le={x:G.position("x"),y:G.position("y")};return{x:le.x,y:le.y}}else{var he=void 0;if(D.forEach(function(Ee){var Be=Ee.nodeIndexes.get(G.id());if(Be!=null)he={x:Ee.xCoords[Be],y:Ee.yCoords[Be]}}),he==null)he={x:G.position("x"),y:G.position("y")};return{x:he.x,y:he.y}}};if(n.quality=="default"||n.quality=="proof"||n.randomize){var nt=d.calcParentsWithoutChildren(P,X),qe=X.filter(function(K){return K.css("display")=="none"});if(n.eles=X.not(qe),X.nodes().not(":parent").not(qe).layoutPositions(k,n,je),nt.length>0)nt.forEach(function(K){K.position(je(K))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();N.exports=F},657:(N,z,v)=>{var b=v(548),c=v(140).layoutBase.Matrix,y=v(140).layoutBase.SVD,d=function(u){var{cy:g,eles:r}=u,B=r.nodes(),F=r.nodes(":parent"),o=new Map,h=new Map,k=new Map,n=[],P=[],X=[],D=[],j=[],_=[],I=[],Y=[],J=void 0,Z=void 0,se=1e8,re=0.000000001,{piTol:ue,samplingType:Ae,nodeSeparation:Pe}=u,de=void 0,q=function(){var ee=0,te=0,ne=!1;while(te<de){ee=Math.floor(Math.random()*Z),ne=!1;for(var ae=0;ae<te;ae++)if(D[ae]==ee){ne=!0;break}if(!ne)D[te]=ee,te++;else continue}},oe=function(ee,te,ne){var ae=[],we=0,ge=0,ce=0,Ie=void 0,be=[],$e=0,_e=1;for(var Ue=0;Ue<Z;Ue++)be[Ue]=se;ae[ge]=ee,be[ee]=0;while(ge>=we){ce=ae[we++];var Xe=n[ce];for(var He=0;He<Xe.length;He++)if(Ie=h.get(Xe[He]),be[Ie]==se)be[Ie]=be[ce]+1,ae[++ge]=Ie;_[ce][te]=be[ce]*Pe}if(ne){for(var Ge=0;Ge<Z;Ge++)if(_[Ge][te]<j[Ge])j[Ge]=_[Ge][te];for(var tt=0;tt<Z;tt++)if(j[tt]>$e)$e=j[tt],_e=tt}return _e},Ne=function(ee){var te=void 0;if(!ee){q();for(var ne=0;ne<de;ne++)oe(D[ne],ne,ee,!1)}else{te=Math.floor(Math.random()*Z),J=te;for(var ae=0;ae<Z;ae++)j[ae]=se;for(var we=0;we<de;we++)D[we]=te,te=oe(te,we,ee)}for(var ge=0;ge<Z;ge++)for(var ce=0;ce<de;ce++)_[ge][ce]*=_[ge][ce];for(var Ie=0;Ie<de;Ie++)I[Ie]=[];for(var be=0;be<de;be++)for(var $e=0;$e<de;$e++)I[be][$e]=_[D[$e]][be]},ke=function(){var ee=y.svd(I),{S:te,U:ne,V:ae}=ee,we=te[0]*te[0]*te[0],ge=[];for(var ce=0;ce<de;ce++){ge[ce]=[];for(var Ie=0;Ie<de;Ie++)if(ge[ce][Ie]=0,ce==Ie)ge[ce][Ie]=te[ce]/(te[ce]*te[ce]+we/(te[ce]*te[ce]))}Y=c.multMat(c.multMat(ae,ge),c.transpose(ne))},De=function(){var ee=void 0,te=void 0,ne=[],ae=[],we=[],ge=[];for(var ce=0;ce<Z;ce++)ne[ce]=Math.random(),ae[ce]=Math.random();ne=c.normalize(ne),ae=c.normalize(ae);var Ie=0,be=re,$e=re,_e=void 0;while(!0){Ie++;for(var Ue=0;Ue<Z;Ue++)we[Ue]=ne[Ue];if(ne=c.multGamma(c.multL(c.multGamma(we),_,Y)),ee=c.dotProduct(we,ne),ne=c.normalize(ne),be=c.dotProduct(we,ne),_e=Math.abs(be/$e),_e<=1+ue&&_e>=1)break;$e=be}for(var Xe=0;Xe<Z;Xe++)we[Xe]=ne[Xe];Ie=0,$e=re;while(!0){Ie++;for(var He=0;He<Z;He++)ge[He]=ae[He];if(ge=c.minusOp(ge,c.multCons(we,c.dotProduct(we,ge))),ae=c.multGamma(c.multL(c.multGamma(ge),_,Y)),te=c.dotProduct(ge,ae),ae=c.normalize(ae),be=c.dotProduct(ge,ae),_e=Math.abs(be/$e),_e<=1+ue&&_e>=1)break;$e=be}for(var Ge=0;Ge<Z;Ge++)ge[Ge]=ae[Ge];P=c.multCons(we,Math.sqrt(Math.abs(ee))),X=c.multCons(ge,Math.sqrt(Math.abs(te)))};b.connectComponents(g,r,b.getTopMostNodes(B),o),F.forEach(function(ye){b.connectComponents(g,r,b.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var W=0;W<B.length;W++)if(!B[W].isParent())h.set(B[W].id(),xe++);var Te=!0,ie=!1,ve=void 0;try{for(var Me=o.keys()[Symbol.iterator](),ze;!(Te=(ze=Me.next()).done);Te=!0){var Ke=ze.value;h.set(Ke,xe++)}}catch(ye){ie=!0,ve=ye}finally{try{if(!Te&&Me.return)Me.return()}finally{if(ie)throw ve}}for(var je=0;je<h.size;je++)n[je]=[];F.forEach(function(ye){var ee=ye.children().intersection(r);while(ee.nodes(":childless").length==0)ee=ee.nodes()[0].children().intersection(r);var te=0,ne=ee.nodes(":childless")[0].connectedEdges().length;ee.nodes(":childless").forEach(function(ae,we){if(ae.connectedEdges().length<ne)ne=ae.connectedEdges().length,te=we}),k.set(ye.id(),ee.nodes(":childless")[te].id())}),B.forEach(function(ye){var ee=void 0;if(ye.isParent())ee=h.get(k.get(ye.id()));else ee=h.get(ye.id());ye.neighborhood().nodes().forEach(function(te){if(r.intersection(ye.edgesWith(te)).length>0)if(te.isParent())n[ee].push(k.get(te.id()));else n[ee].push(te.id())})});var nt=function(ee){var te=h.get(ee),ne=void 0;o.get(ee).forEach(function(ae){if(g.getElementById(ae).isParent())ne=k.get(ae);else ne=ae;n[te].push(ne),n[h.get(ne)].push(ee)})},qe=!0,K=!1,G=void 0;try{for(var pe=o.keys()[Symbol.iterator](),le;!(qe=(le=pe.next()).done);qe=!0){var me=le.value;nt(me)}}catch(ye){K=!0,G=ye}finally{try{if(!qe&&pe.return)pe.return()}finally{if(K)throw G}}Z=h.size;var fe=void 0;if(Z>2){de=Z<u.sampleSize?Z:u.sampleSize;for(var he=0;he<Z;he++)_[he]=[];for(var Ee=0;Ee<de;Ee++)Y[Ee]=[];if(u.quality=="draft"||u.step=="all")Ne(Ae),ke(),De(),fe={nodeIndexes:h,xCoords:P,yCoords:X};else h.forEach(function(ye,ee){P.push(g.getElementById(ee).position("x")),X.push(g.getElementById(ee).position("y"))}),fe={nodeIndexes:h,xCoords:P,yCoords:X};return fe}else{var Be=h.keys(),et=g.getElementById(Be.next().value),Oe=et.position(),Ye=et.outerWidth();if(P.push(Oe.x),X.push(Oe.y),Z==2){var We=g.getElementById(Be.next().value),Je=We.outerWidth();P.push(Oe.x+Ye/2+Je/2+u.idealEdgeLength),X.push(Oe.y)}return fe={nodeIndexes:h,xCoords:P,yCoords:X},fe}};N.exports={spectralLayout:d}},579:(N,z,v)=>{var b=v(212),c=function(d){if(!d)return;d("layout","fcose",b)};if(typeof cytoscape<"u")c(cytoscape);N.exports=c},140:(N)=>{N.exports=e}},s={};function w(N){var z=s[N];if(z!==void 0)return z.exports;var v=s[N]={exports:{}};return i[N](v,v.exports,w),v.exports}var m=w(579);return m})()})});var xt=Ce(ut(),1);var ht={L:"left",R:"right",T:"top",B:"bottom"},vt={L:t((e)=>`${e},${e/2} 0,${e} 0,0`,"L"),R:t((e)=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:t((e)=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:t((e)=>`${e/2},0 ${e},${e} 0,${e}`,"B")},ot={L:t((e,i)=>e-i+2,"L"),R:t((e,i)=>e-2,"R"),T:t((e,i)=>e-i+2,"T"),B:t((e,i)=>e-2,"B")},kt=t(function(e){if(Re(e))return e==="L"?"R":"L";else return e==="T"?"B":"T"},"getOppositeArchitectureDirection"),pt=t(function(e){let i=e;return i==="L"||i==="R"||i==="T"||i==="B"},"isArchitectureDirection"),Re=t(function(e){let i=e;return i==="L"||i==="R"},"isArchitectureDirectionX"),Ve=t(function(e){let i=e;return i==="T"||i==="B"},"isArchitectureDirectionY"),dt=t(function(e,i){let s=Re(e)&&Ve(i),w=Ve(e)&&Re(i);return s||w},"isArchitectureDirectionXY"),Dt=t(function(e){let i=e[0],s=e[1],w=Re(i)&&Ve(s),m=Ve(i)&&Re(s);return w||m},"isArchitecturePairXY"),Rt=t(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),lt=t(function(e,i){let s=`${e}${i}`;return Rt(s)?s:void 0},"getArchitectureDirectionPair"),Mt=t(function([e,i],s){let w=s[0],m=s[1];if(Re(w))if(Ve(m))return[e+(w==="L"?-1:1),i+(m==="T"?1:-1)];else return[e+(w==="L"?-1:1),i];else if(Re(m))return[e+(m==="L"?1:-1),i+(w==="T"?1:-1)];else return[e,i+(w==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ft=t(function(e){if(e==="LT"||e==="TL")return[1,1];else if(e==="BL"||e==="LB")return[1,-1];else if(e==="BR"||e==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),$t=t(function(e,i){if(dt(e,i))return"bend";else if(Re(e))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Pt=t(function(e){return e.type==="service"},"isArchitectureService"),Ot=t(function(e){return e.type==="junction"},"isArchitectureJunction"),mt=t((e,i)=>{let[s,w]=[e,i].sort();return`${JSON.stringify(s)}-${JSON.stringify(w)}`},"architectureGroupAlignmentKey"),yt=t((e)=>e.data(),"edgeData"),Qe=t((e)=>e.data(),"nodeData"),Gt=M.architecture,Et=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getAccDescription=A,this.setAccDescription=T,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",C()}addService({id:e,icon:i,in:s,title:w,iconText:m}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(s)==="node")throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:i,iconText:m,title:w,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Pt)}addJunction({id:e,in:i}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(i!==void 0){if(e===i)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(i)==="node")throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:i})}getJunctions(){return[...this.nodes.values()].filter(Ot)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:i,in:s,title:w}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(s)==="node")throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:i,title:w,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:i,lhsDir:s,rhsDir:w,lhsInto:m,rhsInto:N,lhsGroup:z,rhsGroup:v,title:b}){if(!pt(s))throw Error(`Invalid direction given for left hand side of edge ${e}--${i}. Expected (L,R,T,B) got ${String(s)}`);if(!pt(w))throw Error(`Invalid direction given for right hand side of edge ${e}--${i}. Expected (L,R,T,B) got ${String(w)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(i)&&!this.groups.has(i))throw Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);let c=this.nodes.get(e).in,y=this.nodes.get(i).in;if(z&&c&&y&&c==y)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(v&&c&&y&&c==y)throw Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:s,lhsInto:m,lhsGroup:z,rhsId:i,rhsDir:w,rhsInto:N,rhsGroup:v,title:b};this.edges.push(d);let f=this.nodes.get(e),u=this.nodes.get(i);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let i=new Set;e.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${e.direction} references [${s}], which is not a service or junction`);if(i.has(s))throw Error(`align ${e.direction} lists [${s}] more than once`);i.add(s)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,i=new Map;for(let[z,v]of this.nodes.entries()){let b=new Map;for(let c of v.edges){let y=this.getNode(c.lhsId)?.in,d=this.getNode(c.rhsId)?.in;if(y&&d&&y!==d){let f=$t(c.lhsDir,c.rhsDir);if(f!=="bend")e.set(mt(y,d),f)}if(c.lhsId===z){let f=lt(c.lhsDir,c.rhsDir);if(f)b.set(f,c.rhsId)}else{let f=lt(c.rhsDir,c.lhsDir);if(f)b.set(f,c.lhsId)}}i.set(z,b)}let s=new Set,w=new Set(i.keys()),m=t((z)=>{let v=new Map([[z,[0,0]]]),b=[z];while(b.length>0){let c=b.shift();if(c){s.add(c),w.delete(c);let y=i.get(c);if(!y)throw Error(`BFS error: adjacency list for id ${c} not found. Please report this as a bug.`);let d=v.get(c);if(!d)throw Error(`BFS error: position for id ${c} not found in spatial map. Please report this as a bug.`);let[f,u]=d;y.forEach((g,r)=>{if(!s.has(g))v.set(g,Mt([f,u],r)),b.push(g)})}}return v},"BFS"),N=[];while(w.size>0){let z=w.values().next().value;N.push(m(z))}this.dataStructures={adjList:i,spatialMaps:N,groupAlignments:e}}return this.dataStructures}setElementForId(e,i){this.elements.set(e,i)}getElementById(e){return this.elements.get(e)}getConfig(){return U({...Gt,...x().architecture})}getConfigField(e){return this.getConfig()[e]}},zt=t((e,i)=>{H(e,i),e.groups.map((s)=>i.addGroup(s)),e.services.map((s)=>i.addService({...s,type:"service"})),e.junctions.map((s)=>i.addJunction({...s,type:"junction"})),e.edges.map((s)=>i.addEdge(s)),e.alignments?.map((s)=>i.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),wt={parser:{yy:void 0},parse:t(async(e)=>{let i=await Q("architecture",e);a.debug(i);let s=wt.parser?.yy;if(!(s instanceof Et))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");zt(i,s)},"parse")},Bt=t((e)=>`
|
|
1
|
+
import{H}from"./chunk-ba9qy65y.js";import{t,a,N,x,O,gt,C,S,E,T,A,L,R,l,p,V,Wi,In,at,U,Fe,Le}from"./chunk-c6m4vfn5.js";import{J}from"./chunk-a9er7a7c.js";import{ft,vr}from"./chunk-t82sngk9.js";import{Ce,Se}from"./chunk-ve8gy05p.js";var ut=Se(function(rt,st){(function(i,s){if(typeof rt==="object"&&typeof st==="object")st.exports=s(vr());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof rt==="object")rt.cytoscapeFcose=s(vr());else i.cytoscapeFcose=s(i.coseBase)})(rt,function(e){return(()=>{var i={658:(k)=>{k.exports=Object.assign!=null?Object.assign.bind(Object):function(z){for(var v=arguments.length,b=Array(v>1?v-1:0),c=1;c<v;c++)b[c-1]=arguments[c];return b.forEach(function(y){Object.keys(y).forEach(function(d){return z[d]=y[d]})}),z}},548:(k,z,v)=>{var b=function(){function d(f,u){var g=[],r=!0,B=!1,F=void 0;try{for(var o=f[Symbol.iterator](),h;!(r=(h=o.next()).done);r=!0)if(g.push(h.value),u&&g.length===u)break}catch(D){B=!0,F=D}finally{try{if(!r&&o.return)o.return()}finally{if(B)throw F}}return g}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return d(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=v(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(d){var f={};for(var u=0;u<d.length;u++)f[d[u].id()]=!0;var g=d.filter(function(r,B){if(typeof r==="number")r=B;var F=r.parent()[0];while(F!=null){if(f[F.id()])return!1;F=F.parent()[0]}return!0});return g},y.connectComponents=function(d,f,u,g){var r=new c,B=new Set,F=[],o=void 0,h=void 0,D=void 0,n=!1,P=1,X=[],M=[],j=function(){var I=d.collection();M.push(I);var Y=u[0],Z=d.collection();Z.merge(Y).merge(Y.descendants().intersection(f)),F.push(Y),Z.forEach(function(re){r.push(re),B.add(re),I.merge(re)});var Q=function(){Y=r.shift();var ue=d.collection();Y.neighborhood().nodes().forEach(function(q){if(f.intersection(Y.edgesWith(q)).length>0)ue.merge(q)});for(var Ae=0;Ae<ue.length;Ae++){var Pe=ue[Ae];if(o=u.intersection(Pe.union(Pe.ancestors())),o!=null&&!B.has(o[0])){var de=o.union(o.descendants());de.forEach(function(q){if(r.push(q),B.add(q),I.merge(q),u.has(q))F.push(q)})}}};while(r.length!=0)Q();if(I.forEach(function(re){f.intersection(re.connectedEdges()).forEach(function(ue){if(I.has(ue.source())&&I.has(ue.target()))I.merge(ue)})}),F.length==u.length)n=!0;if(!n||n&&P>1){h=F[0],D=h.connectedEdges().length,F.forEach(function(re){if(re.connectedEdges().length<D)D=re.connectedEdges().length,h=re}),X.push(h.id());var se=d.collection();se.merge(F[0]),F.forEach(function(re){se.merge(re)}),F=[],u=u.difference(se),P++}};do j();while(!n);if(g){if(X.length>0)g.set("dummy"+(g.size+1),X)}return M},y.relocateComponent=function(d,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:B,NEGATIVE_INFINITY:F}=Number;if(u.quality=="draft"){var o=!0,h=!1,D=void 0;try{for(var n=f.nodeIndexes[Symbol.iterator](),P;!(o=(P=n.next()).done);o=!0){var X=P.value,M=b(X,2),j=M[0],_=M[1],I=u.cy.getElementById(j);if(I){var Y=I.boundingBox(),Z=f.xCoords[_]-Y.w/2,Q=f.xCoords[_]+Y.w/2,se=f.yCoords[_]-Y.h/2,re=f.yCoords[_]+Y.h/2;if(Z<g)g=Z;if(Q>r)r=Q;if(se<B)B=se;if(re>F)F=re}}}catch(q){h=!0,D=q}finally{try{if(!o&&n.return)n.return()}finally{if(h)throw D}}var ue=d.x-(r+g)/2,Ae=d.y-(F+B)/2;f.xCoords=f.xCoords.map(function(q){return q+ue}),f.yCoords=f.yCoords.map(function(q){return q+Ae})}else{Object.keys(f).forEach(function(q){var oe=f[q],Ne=oe.getRect().x,ke=oe.getRect().x+oe.getRect().width,De=oe.getRect().y,xe=oe.getRect().y+oe.getRect().height;if(Ne<g)g=Ne;if(ke>r)r=ke;if(De<B)B=De;if(xe>F)F=xe});var Pe=d.x-(r+g)/2,de=d.y-(F+B)/2;Object.keys(f).forEach(function(q){var oe=f[q];oe.setCenter(oe.getCenterX()+Pe,oe.getCenterY()+de)})}}},y.calcBoundingBox=function(d,f,u,g){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:B,MAX_SAFE_INTEGER:F,MIN_SAFE_INTEGER:o}=Number,h=void 0,D=void 0,n=void 0,P=void 0,X=d.descendants().not(":parent"),M=X.length;for(var j=0;j<M;j++){var _=X[j];if(h=f[g.get(_.id())]-_.width()/2,D=f[g.get(_.id())]+_.width()/2,n=u[g.get(_.id())]-_.height()/2,P=u[g.get(_.id())]+_.height()/2,r>h)r=h;if(B<D)B=D;if(F>n)F=n;if(o<P)o=P}var I={};return I.topLeftX=r,I.topLeftY=F,I.width=B-r,I.height=o-F,I},y.calcParentsWithoutChildren=function(d,f){var u=d.collection();return f.nodes(":parent").forEach(function(g){var r=!1;if(g.children().forEach(function(B){if(B.css("display")!="none")r=!0}),!r)u.merge(g)}),u},k.exports=y},816:(k,z,v)=>{var b=v(548),c=v(140).CoSELayout,y=v(140).CoSENode,d=v(140).layoutBase.PointD,f=v(140).layoutBase.DimensionD,u=v(140).layoutBase.LayoutConstants,g=v(140).layoutBase.FDLayoutConstants,r=v(140).CoSEConstants,B=function(o,h){var{cy:D,eles:n}=o,P=n.nodes(),X=n.edges(),M=void 0,j=void 0,_=void 0,I={};if(o.randomize)M=h.nodeIndexes,j=h.xCoords,_=h.yCoords;var Y=function(q){return typeof q==="function"},Z=function(q,oe){if(Y(q))return q(oe);else return q},Q=b.calcParentsWithoutChildren(D,n),se=function de(q,oe,Ne,ke){var De=oe.length;for(var xe=0;xe<De;xe++){var W=oe[xe],Te=null;if(W.intersection(Q).length==0)Te=W.children();var ie=void 0,ve=W.layoutDimensions({nodeDimensionsIncludeLabels:ke.nodeDimensionsIncludeLabels});if(W.outerWidth()!=null&&W.outerHeight()!=null)if(ke.randomize)if(!W.isParent())ie=q.add(new y(Ne.graphManager,new d(j[M.get(W.id())]-ve.w/2,_[M.get(W.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var Me=b.calcBoundingBox(W,j,_,M);if(W.intersection(Q).length==0)ie=q.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(Me.width,Me.height)));else ie=q.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else ie=q.add(new y(Ne.graphManager,new d(W.position("x")-ve.w/2,W.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else ie=q.add(new y(this.graphManager));if(ie.id=W.data("id"),ie.nodeRepulsion=Z(ke.nodeRepulsion,W),ie.paddingLeft=parseInt(W.css("padding")),ie.paddingTop=parseInt(W.css("padding")),ie.paddingRight=parseInt(W.css("padding")),ie.paddingBottom=parseInt(W.css("padding")),ke.nodeDimensionsIncludeLabels)ie.labelWidth=W.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ie.labelHeight=W.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ie.labelPosVertical=W.css("text-valign"),ie.labelPosHorizontal=W.css("text-halign");if(I[W.data("id")]=ie,isNaN(ie.rect.x))ie.rect.x=0;if(isNaN(ie.rect.y))ie.rect.y=0;if(Te!=null&&Te.length>0){var ze=void 0;ze=Ne.getGraphManager().add(Ne.newGraph(),ie),de(ze,Te,Ne,ke)}}},re=function(q,oe,Ne){var ke=0,De=0;for(var xe=0;xe<Ne.length;xe++){var W=Ne[xe],Te=I[W.data("source")],ie=I[W.data("target")];if(Te&&ie&&Te!==ie&&Te.getEdgesBetween(ie).length==0){var ve=oe.add(q.newEdge(),Te,ie);ve.id=W.id(),ve.idealLength=Z(o.idealEdgeLength,W),ve.edgeElasticity=Z(o.edgeElasticity,W),ke+=ve.idealLength,De++}}if(o.idealEdgeLength!=null){if(De>0)r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ke/De;else if(!Y(o.idealEdgeLength))r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50;r.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH}},ue=function(q,oe){if(oe.fixedNodeConstraint)q.constraints.fixedNodeConstraint=oe.fixedNodeConstraint;if(oe.alignmentConstraint)q.constraints.alignmentConstraint=oe.alignmentConstraint;if(oe.relativePlacementConstraint)q.constraints.relativePlacementConstraint=oe.relativePlacementConstraint};if(o.nestingFactor!=null)r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)r.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)r.MAX_ITERATIONS=g.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)r.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)r.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)r.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=g.ANIMATE=u.ANIMATE=o.animate,r.TILE=o.tile,r.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!1;if(o.step=="enforced")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!1;if(o.step=="cose")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)r.TREE_REDUCTION_ON_INCREMENTAL=!1;else r.TREE_REDUCTION_ON_INCREMENTAL=!0;var Ae=new c,Pe=Ae.newGraphManager();return se(Pe.addRoot(),b.getTopMostNodes(P),Ae,o),re(Ae,Pe,X),ue(Ae,o),Ae.runLayout(),I};k.exports={coseLayout:B}},212:(k,z,v)=>{var b=function(){function o(h,D){for(var n=0;n<D.length;n++){var P=D[n];if(P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P)P.writable=!0;Object.defineProperty(h,P.key,P)}}return function(h,D,n){if(D)o(h.prototype,D);if(n)o(h,n);return h}}();function c(o,h){if(!(o instanceof h))throw TypeError("Cannot call a class as a function")}var y=v(658),d=v(548),f=v(657),u=f.spectralLayout,g=v(816),r=g.coseLayout,B=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),F=function(){function o(h){c(this,o),this.options=y({},B,h)}return b(o,[{key:"run",value:function(){var D=this,n=this.options,{cy:P,eles:X}=n,M=[],j=void 0,_=void 0,I=[],Y=void 0,Z=[];if(n.fixedNodeConstraint&&(!Array.isArray(n.fixedNodeConstraint)||n.fixedNodeConstraint.length==0))n.fixedNodeConstraint=void 0;if(n.alignmentConstraint){if(n.alignmentConstraint.vertical&&(!Array.isArray(n.alignmentConstraint.vertical)||n.alignmentConstraint.vertical.length==0))n.alignmentConstraint.vertical=void 0;if(n.alignmentConstraint.horizontal&&(!Array.isArray(n.alignmentConstraint.horizontal)||n.alignmentConstraint.horizontal.length==0))n.alignmentConstraint.horizontal=void 0}if(n.relativePlacementConstraint&&(!Array.isArray(n.relativePlacementConstraint)||n.relativePlacementConstraint.length==0))n.relativePlacementConstraint=void 0;var Q=n.fixedNodeConstraint||n.alignmentConstraint||n.relativePlacementConstraint;if(Q)n.tile=!1,n.packComponents=!1;var se=void 0,re=!1;if(P.layoutUtilities&&n.packComponents){if(se=P.layoutUtilities("get"),!se)se=P.layoutUtilities();re=!0}if(X.nodes().length>0)if(!re){var ue=n.eles.boundingBox();if(Z.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),n.randomize){var Ae=u(n);M.push(Ae)}if(n.quality=="default"||n.quality=="proof")I.push(r(n,M[0])),d.relocateComponent(Z[0],I[0],n);else d.relocateComponent(Z[0],M[0],n)}else{var Pe=d.getTopMostNodes(n.eles.nodes());if(Y=d.connectComponents(P,n.eles,Pe),Y.forEach(function(K){var G=K.boundingBox();Z.push({x:G.x1+G.w/2,y:G.y1+G.h/2})}),n.randomize)Y.forEach(function(K){n.eles=K,M.push(u(n))});if(n.quality=="default"||n.quality=="proof"){var de=P.collection();if(n.tile){var q=new Map,oe=[],Ne=[],ke=0,De={nodeIndexes:q,xCoords:oe,yCoords:Ne},xe=[];if(Y.forEach(function(K,G){if(K.edges().length==0)K.nodes().forEach(function(pe,le){if(de.merge(K.nodes()[le]),!pe.isParent())De.nodeIndexes.set(K.nodes()[le].id(),ke++),De.xCoords.push(K.nodes()[0].position().x),De.yCoords.push(K.nodes()[0].position().y)}),xe.push(G)}),de.length>1){var W=de.boundingBox();Z.push({x:W.x1+W.w/2,y:W.y1+W.h/2}),Y.push(de),M.push(De);for(var Te=xe.length-1;Te>=0;Te--)Y.splice(xe[Te],1),M.splice(xe[Te],1),Z.splice(xe[Te],1)}}Y.forEach(function(K,G){n.eles=K,I.push(r(n,M[G])),d.relocateComponent(Z[G],I[G],n)})}else Y.forEach(function(K,G){d.relocateComponent(Z[G],M[G],n)});var ie=new Set;if(Y.length>1){var ve=[],Me=X.filter(function(K){return K.css("display")=="none"});Y.forEach(function(K,G){var pe=void 0;if(n.quality=="draft")pe=M[G].nodeIndexes;if(K.nodes().not(Me).length>0){var le={};le.edges=[],le.nodes=[];var me=void 0;if(K.nodes().not(Me).forEach(function(fe){if(n.quality=="draft")if(!fe.isParent())me=pe.get(fe.id()),le.nodes.push({x:M[G].xCoords[me]-fe.boundingbox().w/2,y:M[G].yCoords[me]-fe.boundingbox().h/2,width:fe.boundingbox().w,height:fe.boundingbox().h});else{var he=d.calcBoundingBox(fe,M[G].xCoords,M[G].yCoords,pe);le.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(I[G][fe.id()])le.nodes.push({x:I[G][fe.id()].getLeft(),y:I[G][fe.id()].getTop(),width:I[G][fe.id()].getWidth(),height:I[G][fe.id()].getHeight()})}),K.edges().forEach(function(fe){var he=fe.source(),Ee=fe.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(n.quality=="draft"){var Be=pe.get(he.id()),et=pe.get(Ee.id()),Oe=[],Ye=[];if(he.isParent()){var We=d.calcBoundingBox(he,M[G].xCoords,M[G].yCoords,pe);Oe.push(We.topLeftX+We.width/2),Oe.push(We.topLeftY+We.height/2)}else Oe.push(M[G].xCoords[Be]),Oe.push(M[G].yCoords[Be]);if(Ee.isParent()){var Je=d.calcBoundingBox(Ee,M[G].xCoords,M[G].yCoords,pe);Ye.push(Je.topLeftX+Je.width/2),Ye.push(Je.topLeftY+Je.height/2)}else Ye.push(M[G].xCoords[et]),Ye.push(M[G].yCoords[et]);le.edges.push({startX:Oe[0],startY:Oe[1],endX:Ye[0],endY:Ye[1]})}else if(I[G][he.id()]&&I[G][Ee.id()])le.edges.push({startX:I[G][he.id()].getCenterX(),startY:I[G][he.id()].getCenterY(),endX:I[G][Ee.id()].getCenterX(),endY:I[G][Ee.id()].getCenterY()})}}),le.nodes.length>0)ve.push(le),ie.add(G)}});var ze=se.packComponents(ve,n.randomize).shifts;if(n.quality=="draft")M.forEach(function(K,G){var pe=K.xCoords.map(function(me){return me+ze[G].dx}),le=K.yCoords.map(function(me){return me+ze[G].dy});K.xCoords=pe,K.yCoords=le});else{var Ke=0;ie.forEach(function(K){Object.keys(I[K]).forEach(function(G){var pe=I[K][G];pe.setCenter(pe.getCenterX()+ze[Ke].dx,pe.getCenterY()+ze[Ke].dy)}),Ke++})}}}var je=function(G,pe){if(n.quality=="default"||n.quality=="proof"){if(typeof G==="number")G=pe;var le=void 0,me=void 0,fe=G.data("id");if(I.forEach(function(Ee){if(fe in Ee)le={x:Ee[fe].getRect().getCenterX(),y:Ee[fe].getRect().getCenterY()},me=Ee[fe]}),n.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")le.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")le.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")le.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")le.y-=me.labelHeight/2}}if(le==null)le={x:G.position("x"),y:G.position("y")};return{x:le.x,y:le.y}}else{var he=void 0;if(M.forEach(function(Ee){var Be=Ee.nodeIndexes.get(G.id());if(Be!=null)he={x:Ee.xCoords[Be],y:Ee.yCoords[Be]}}),he==null)he={x:G.position("x"),y:G.position("y")};return{x:he.x,y:he.y}}};if(n.quality=="default"||n.quality=="proof"||n.randomize){var nt=d.calcParentsWithoutChildren(P,X),qe=X.filter(function(K){return K.css("display")=="none"});if(n.eles=X.not(qe),X.nodes().not(":parent").not(qe).layoutPositions(D,n,je),nt.length>0)nt.forEach(function(K){K.position(je(K))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();k.exports=F},657:(k,z,v)=>{var b=v(548),c=v(140).layoutBase.Matrix,y=v(140).layoutBase.SVD,d=function(u){var{cy:g,eles:r}=u,B=r.nodes(),F=r.nodes(":parent"),o=new Map,h=new Map,D=new Map,n=[],P=[],X=[],M=[],j=[],_=[],I=[],Y=[],Z=void 0,Q=void 0,se=1e8,re=0.000000001,{piTol:ue,samplingType:Ae,nodeSeparation:Pe}=u,de=void 0,q=function(){var ee=0,te=0,ne=!1;while(te<de){ee=Math.floor(Math.random()*Q),ne=!1;for(var ae=0;ae<te;ae++)if(M[ae]==ee){ne=!0;break}if(!ne)M[te]=ee,te++;else continue}},oe=function(ee,te,ne){var ae=[],we=0,ge=0,ce=0,Ie=void 0,be=[],$e=0,_e=1;for(var Ue=0;Ue<Q;Ue++)be[Ue]=se;ae[ge]=ee,be[ee]=0;while(ge>=we){ce=ae[we++];var Xe=n[ce];for(var He=0;He<Xe.length;He++)if(Ie=h.get(Xe[He]),be[Ie]==se)be[Ie]=be[ce]+1,ae[++ge]=Ie;_[ce][te]=be[ce]*Pe}if(ne){for(var Ge=0;Ge<Q;Ge++)if(_[Ge][te]<j[Ge])j[Ge]=_[Ge][te];for(var tt=0;tt<Q;tt++)if(j[tt]>$e)$e=j[tt],_e=tt}return _e},Ne=function(ee){var te=void 0;if(!ee){q();for(var ne=0;ne<de;ne++)oe(M[ne],ne,ee,!1)}else{te=Math.floor(Math.random()*Q),Z=te;for(var ae=0;ae<Q;ae++)j[ae]=se;for(var we=0;we<de;we++)M[we]=te,te=oe(te,we,ee)}for(var ge=0;ge<Q;ge++)for(var ce=0;ce<de;ce++)_[ge][ce]*=_[ge][ce];for(var Ie=0;Ie<de;Ie++)I[Ie]=[];for(var be=0;be<de;be++)for(var $e=0;$e<de;$e++)I[be][$e]=_[M[$e]][be]},ke=function(){var ee=y.svd(I),{S:te,U:ne,V:ae}=ee,we=te[0]*te[0]*te[0],ge=[];for(var ce=0;ce<de;ce++){ge[ce]=[];for(var Ie=0;Ie<de;Ie++)if(ge[ce][Ie]=0,ce==Ie)ge[ce][Ie]=te[ce]/(te[ce]*te[ce]+we/(te[ce]*te[ce]))}Y=c.multMat(c.multMat(ae,ge),c.transpose(ne))},De=function(){var ee=void 0,te=void 0,ne=[],ae=[],we=[],ge=[];for(var ce=0;ce<Q;ce++)ne[ce]=Math.random(),ae[ce]=Math.random();ne=c.normalize(ne),ae=c.normalize(ae);var Ie=0,be=re,$e=re,_e=void 0;while(!0){Ie++;for(var Ue=0;Ue<Q;Ue++)we[Ue]=ne[Ue];if(ne=c.multGamma(c.multL(c.multGamma(we),_,Y)),ee=c.dotProduct(we,ne),ne=c.normalize(ne),be=c.dotProduct(we,ne),_e=Math.abs(be/$e),_e<=1+ue&&_e>=1)break;$e=be}for(var Xe=0;Xe<Q;Xe++)we[Xe]=ne[Xe];Ie=0,$e=re;while(!0){Ie++;for(var He=0;He<Q;He++)ge[He]=ae[He];if(ge=c.minusOp(ge,c.multCons(we,c.dotProduct(we,ge))),ae=c.multGamma(c.multL(c.multGamma(ge),_,Y)),te=c.dotProduct(ge,ae),ae=c.normalize(ae),be=c.dotProduct(ge,ae),_e=Math.abs(be/$e),_e<=1+ue&&_e>=1)break;$e=be}for(var Ge=0;Ge<Q;Ge++)ge[Ge]=ae[Ge];P=c.multCons(we,Math.sqrt(Math.abs(ee))),X=c.multCons(ge,Math.sqrt(Math.abs(te)))};b.connectComponents(g,r,b.getTopMostNodes(B),o),F.forEach(function(ye){b.connectComponents(g,r,b.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var W=0;W<B.length;W++)if(!B[W].isParent())h.set(B[W].id(),xe++);var Te=!0,ie=!1,ve=void 0;try{for(var Me=o.keys()[Symbol.iterator](),ze;!(Te=(ze=Me.next()).done);Te=!0){var Ke=ze.value;h.set(Ke,xe++)}}catch(ye){ie=!0,ve=ye}finally{try{if(!Te&&Me.return)Me.return()}finally{if(ie)throw ve}}for(var je=0;je<h.size;je++)n[je]=[];F.forEach(function(ye){var ee=ye.children().intersection(r);while(ee.nodes(":childless").length==0)ee=ee.nodes()[0].children().intersection(r);var te=0,ne=ee.nodes(":childless")[0].connectedEdges().length;ee.nodes(":childless").forEach(function(ae,we){if(ae.connectedEdges().length<ne)ne=ae.connectedEdges().length,te=we}),D.set(ye.id(),ee.nodes(":childless")[te].id())}),B.forEach(function(ye){var ee=void 0;if(ye.isParent())ee=h.get(D.get(ye.id()));else ee=h.get(ye.id());ye.neighborhood().nodes().forEach(function(te){if(r.intersection(ye.edgesWith(te)).length>0)if(te.isParent())n[ee].push(D.get(te.id()));else n[ee].push(te.id())})});var nt=function(ee){var te=h.get(ee),ne=void 0;o.get(ee).forEach(function(ae){if(g.getElementById(ae).isParent())ne=D.get(ae);else ne=ae;n[te].push(ne),n[h.get(ne)].push(ee)})},qe=!0,K=!1,G=void 0;try{for(var pe=o.keys()[Symbol.iterator](),le;!(qe=(le=pe.next()).done);qe=!0){var me=le.value;nt(me)}}catch(ye){K=!0,G=ye}finally{try{if(!qe&&pe.return)pe.return()}finally{if(K)throw G}}Q=h.size;var fe=void 0;if(Q>2){de=Q<u.sampleSize?Q:u.sampleSize;for(var he=0;he<Q;he++)_[he]=[];for(var Ee=0;Ee<de;Ee++)Y[Ee]=[];if(u.quality=="draft"||u.step=="all")Ne(Ae),ke(),De(),fe={nodeIndexes:h,xCoords:P,yCoords:X};else h.forEach(function(ye,ee){P.push(g.getElementById(ee).position("x")),X.push(g.getElementById(ee).position("y"))}),fe={nodeIndexes:h,xCoords:P,yCoords:X};return fe}else{var Be=h.keys(),et=g.getElementById(Be.next().value),Oe=et.position(),Ye=et.outerWidth();if(P.push(Oe.x),X.push(Oe.y),Q==2){var We=g.getElementById(Be.next().value),Je=We.outerWidth();P.push(Oe.x+Ye/2+Je/2+u.idealEdgeLength),X.push(Oe.y)}return fe={nodeIndexes:h,xCoords:P,yCoords:X},fe}};k.exports={spectralLayout:d}},579:(k,z,v)=>{var b=v(212),c=function(d){if(!d)return;d("layout","fcose",b)};if(typeof cytoscape<"u")c(cytoscape);k.exports=c},140:(k)=>{k.exports=e}},s={};function w(k){var z=s[k];if(z!==void 0)return z.exports;var v=s[k]={exports:{}};return i[k](v,v.exports,w),v.exports}var m=w(579);return m})()})});var xt=Ce(ut(),1);var ht={L:"left",R:"right",T:"top",B:"bottom"},vt={L:t((e)=>`${e},${e/2} 0,${e} 0,0`,"L"),R:t((e)=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:t((e)=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:t((e)=>`${e/2},0 ${e},${e} 0,${e}`,"B")},ot={L:t((e,i)=>e-i+2,"L"),R:t((e,i)=>e-2,"R"),T:t((e,i)=>e-i+2,"T"),B:t((e,i)=>e-2,"B")},kt=t(function(e){if(Re(e))return e==="L"?"R":"L";else return e==="T"?"B":"T"},"getOppositeArchitectureDirection"),pt=t(function(e){let i=e;return i==="L"||i==="R"||i==="T"||i==="B"},"isArchitectureDirection"),Re=t(function(e){let i=e;return i==="L"||i==="R"},"isArchitectureDirectionX"),Ve=t(function(e){let i=e;return i==="T"||i==="B"},"isArchitectureDirectionY"),dt=t(function(e,i){let s=Re(e)&&Ve(i),w=Ve(e)&&Re(i);return s||w},"isArchitectureDirectionXY"),Dt=t(function(e){let i=e[0],s=e[1],w=Re(i)&&Ve(s),m=Ve(i)&&Re(s);return w||m},"isArchitecturePairXY"),Rt=t(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),lt=t(function(e,i){let s=`${e}${i}`;return Rt(s)?s:void 0},"getArchitectureDirectionPair"),Mt=t(function([e,i],s){let w=s[0],m=s[1];if(Re(w))if(Ve(m))return[e+(w==="L"?-1:1),i+(m==="T"?1:-1)];else return[e+(w==="L"?-1:1),i];else if(Re(m))return[e+(m==="L"?1:-1),i+(w==="T"?1:-1)];else return[e,i+(w==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ft=t(function(e){if(e==="LT"||e==="TL")return[1,1];else if(e==="BL"||e==="LB")return[1,-1];else if(e==="BR"||e==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),$t=t(function(e,i){if(dt(e,i))return"bend";else if(Re(e))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Pt=t(function(e){return e.type==="service"},"isArchitectureService"),Ot=t(function(e){return e.type==="junction"},"isArchitectureJunction"),mt=t((e,i)=>{let[s,w]=[e,i].sort();return`${JSON.stringify(s)}-${JSON.stringify(w)}`},"architectureGroupAlignmentKey"),yt=t((e)=>e.data(),"edgeData"),Qe=t((e)=>e.data(),"nodeData"),Gt=N.architecture,Et=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getAccDescription=A,this.setAccDescription=T,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",C()}addService({id:e,icon:i,in:s,title:w,iconText:m}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(s)==="node")throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:i,iconText:m,title:w,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Pt)}addJunction({id:e,in:i}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(i!==void 0){if(e===i)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(i)==="node")throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:i})}getJunctions(){return[...this.nodes.values()].filter(Ot)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:i,in:s,title:w}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(s)==="node")throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:i,title:w,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:i,lhsDir:s,rhsDir:w,lhsInto:m,rhsInto:k,lhsGroup:z,rhsGroup:v,title:b}){if(!pt(s))throw Error(`Invalid direction given for left hand side of edge ${e}--${i}. Expected (L,R,T,B) got ${String(s)}`);if(!pt(w))throw Error(`Invalid direction given for right hand side of edge ${e}--${i}. Expected (L,R,T,B) got ${String(w)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(i)&&!this.groups.has(i))throw Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);let c=this.nodes.get(e).in,y=this.nodes.get(i).in;if(z&&c&&y&&c==y)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(v&&c&&y&&c==y)throw Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:s,lhsInto:m,lhsGroup:z,rhsId:i,rhsDir:w,rhsInto:k,rhsGroup:v,title:b};this.edges.push(d);let f=this.nodes.get(e),u=this.nodes.get(i);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let i=new Set;e.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${e.direction} references [${s}], which is not a service or junction`);if(i.has(s))throw Error(`align ${e.direction} lists [${s}] more than once`);i.add(s)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,i=new Map;for(let[z,v]of this.nodes.entries()){let b=new Map;for(let c of v.edges){let y=this.getNode(c.lhsId)?.in,d=this.getNode(c.rhsId)?.in;if(y&&d&&y!==d){let f=$t(c.lhsDir,c.rhsDir);if(f!=="bend")e.set(mt(y,d),f)}if(c.lhsId===z){let f=lt(c.lhsDir,c.rhsDir);if(f)b.set(f,c.rhsId)}else{let f=lt(c.rhsDir,c.lhsDir);if(f)b.set(f,c.lhsId)}}i.set(z,b)}let s=new Set,w=new Set(i.keys()),m=t((z)=>{let v=new Map([[z,[0,0]]]),b=[z];while(b.length>0){let c=b.shift();if(c){s.add(c),w.delete(c);let y=i.get(c);if(!y)throw Error(`BFS error: adjacency list for id ${c} not found. Please report this as a bug.`);let d=v.get(c);if(!d)throw Error(`BFS error: position for id ${c} not found in spatial map. Please report this as a bug.`);let[f,u]=d;y.forEach((g,r)=>{if(!s.has(g))v.set(g,Mt([f,u],r)),b.push(g)})}}return v},"BFS"),k=[];while(w.size>0){let z=w.values().next().value;k.push(m(z))}this.dataStructures={adjList:i,spatialMaps:k,groupAlignments:e}}return this.dataStructures}setElementForId(e,i){this.elements.set(e,i)}getElementById(e){return this.elements.get(e)}getConfig(){return U({...Gt,...x().architecture})}getConfigField(e){return this.getConfig()[e]}},zt=t((e,i)=>{H(e,i),e.groups.map((s)=>i.addGroup(s)),e.services.map((s)=>i.addService({...s,type:"service"})),e.junctions.map((s)=>i.addJunction({...s,type:"junction"})),e.edges.map((s)=>i.addEdge(s)),e.alignments?.map((s)=>i.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),wt={parser:{yy:void 0},parse:t(async(e)=>{let i=await J("architecture",e);a.debug(i);let s=wt.parser?.yy;if(!(s instanceof Et))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");zt(i,s)},"parse")},Bt=t((e)=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${e.archEdgeWidth};
|
|
4
4
|
stroke: ${e.archEdgeColor};
|
|
@@ -29,8 +29,8 @@ import{H}from"./chunk-jyf7a7yp.js";import{t,a,M,x,O,gt,C,S,E,T,A,L,R,l,p,V,Vi,Ln
|
|
|
29
29
|
display: -webkit-box;
|
|
30
30
|
-webkit-box-orient: vertical;
|
|
31
31
|
}
|
|
32
|
-
`,"getStyles"),_t=Bt;function ct(e,i){if(e===0)return i();let s=Math.random,w=e>>>0;Math.random=function(){w=w+1831565813>>>0;let m=w;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296};try{return i()}finally{Math.random=s}}t(ct,"withSeededRandom");var Ze=t((e)=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),it={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Ze('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:Ze('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:Ze('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:Ze('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:Ze('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:
|
|
32
|
+
`,"getStyles"),_t=Bt;function ct(e,i){if(e===0)return i();let s=Math.random,w=e>>>0;Math.random=function(){w=w+1831565813>>>0;let m=w;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296};try{return i()}finally{Math.random=s}}t(ct,"withSeededRandom");var Ze=t((e)=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),it={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Ze('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:Ze('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:Ze('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:Ze('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:Ze('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Wi,blank:{body:Ze("")}}},Yt=t(async function(e,i,s,w){let m=s.getConfigField("padding"),k=s.getConfigField("iconSize"),z=k/2,v=k/6,b=v/2;await Promise.all(i.edges().map(async(c)=>{let{source:y,sourceDir:d,sourceArrow:f,sourceGroup:u,target:g,targetDir:r,targetArrow:B,targetGroup:F,label:o}=yt(c),{x:h,y:D}=c[0].sourceEndpoint(),{x:n,y:P}=c[0].midpoint(),{x:X,y:M}=c[0].targetEndpoint(),j=m+4;if(u)if(Re(d))h+=d==="L"?-j:j;else D+=d==="T"?-j:j+18;if(F)if(Re(r))X+=r==="L"?-j:j;else M+=r==="T"?-j:j+18;if(!u&&s.getNode(y)?.type==="junction")if(Re(d))h+=d==="L"?z:-z;else D+=d==="T"?z:-z;if(!F&&s.getNode(g)?.type==="junction")if(Re(r))X+=r==="L"?z:-z;else M+=r==="T"?z:-z;if(c[0]._private.rscratch){let _=e.insert("g");if(_.insert("path").attr("d",`M ${h},${D} L ${n},${P} L${X},${M} `).attr("class","edge").attr("id",`${w}-${Fe(y,g,{prefix:"L"})}`),f){let I=Re(d)?ot[d](h,v):h-b,Y=Ve(d)?ot[d](D,v):D-b;_.insert("polygon").attr("points",vt[d](v)).attr("transform",`translate(${I},${Y})`).attr("class","arrow")}if(B){let I=Re(r)?ot[r](X,v):X-b,Y=Ve(r)?ot[r](M,v):M-b;_.insert("polygon").attr("points",vt[r](v)).attr("transform",`translate(${I},${Y})`).attr("class","arrow")}if(o){let I=!dt(d,r)?Re(d)?"X":"Y":"XY",Y=0;if(I==="X")Y=Math.abs(h-X);else if(I==="Y")Y=Math.abs(D-M)/1.5;else Y=Math.abs(h-X)/2;let Z=_.append("g");if(await Le(Z,o,{useHtmlLabels:!1,width:Y,classes:"architecture-service-label"},l()),Z.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),I==="X")Z.attr("transform","translate("+n+", "+P+")");else if(I==="Y")Z.attr("transform","translate("+n+", "+P+") rotate(-90)");else if(I==="XY"){let Q=lt(d,r);if(Q&&Dt(Q)){let se=Z.node().getBoundingClientRect(),[re,ue]=Ft(Q);Z.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*re*ue*45})`);let Ae=Z.node().getBoundingClientRect();Z.attr("transform",`
|
|
33
33
|
translate(${n}, ${P-se.height/2})
|
|
34
34
|
translate(${re*Ae.width/2}, ${ue*Ae.height/2})
|
|
35
35
|
rotate(${-1*re*ue*45}, 0, ${se.height/2})
|
|
36
|
-
`)}}}}}))},"drawEdges"),Ut=t(async function(e,i,s,w){let N=s.getConfigField("padding")*0.75,z=s.getConfigField("fontSize"),b=s.getConfigField("iconSize")/2;await Promise.all(i.nodes().map(async(c)=>{let y=Qe(c);if(y.type==="group"){let{h:d,w:f,x1:u,y1:g}=c.boundingBox(),r=e.append("rect");r.attr("id",`${w}-group-${y.id}`).attr("x",u+b).attr("y",g+b).attr("width",f).attr("height",d).attr("class","node-bkg");let B=e.append("g"),F=u,o=g;if(y.icon){let h=B.append("g");h.html(`<g>${await at(y.icon,{height:N,width:N,fallbackPrefix:it.prefix})}</g>`),h.attr("transform","translate("+(F+b+1)+", "+(o+b+1)+")"),F+=N,o+=z/2-1-2}if(y.label){let h=B.append("g");await Le(h,y.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},l()),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),h.attr("transform","translate("+(F+b+4)+", "+(o+b+2)+")")}s.setElementForId(y.id,r)}}))},"drawGroups"),Ht=t(async function(e,i,s,w){let m=l();for(let N of s){let z=i.append("g"),v=e.getConfigField("iconSize");if(N.title){let d=z.append("g");await Le(d,N.title,{useHtmlLabels:!1,width:v*1.5,classes:"architecture-service-label"},m),d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),d.attr("transform","translate("+v/2+", "+v+")")}let b=z.append("g");if(N.icon)b.html(`<g>${await at(N.icon,{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);else if(N.iconText){b.html(`<g>${await at("blank",{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);let u=b.append("g").append("foreignObject").attr("width",v).attr("height",v).append("div").attr("class","node-icon-text").attr("style",`height: ${v}px;`).append("div").html(O(N.iconText,m)),g=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((v-2)/g)};`)}else b.append("path").attr("class","node-bkg").attr("id",`${w}-node-${N.id}`).attr("d",`M0,${v} V5 Q0,0 5,0 H${v-5} Q${v},0 ${v},5 V${v} Z`);z.attr("id",`${w}-service-${N.id}`).attr("class","architecture-service");let{width:c,height:y}=z.node().getBBox();N.width=c,N.height=y,e.setElementForId(N.id,z)}return 0},"drawServices"),Vt=t(function(e,i,s,w){s.forEach((m)=>{let N=i.append("g"),z=e.getConfigField("iconSize");N.append("g").append("rect").attr("id",`${w}-node-${m.id}`).attr("fill-opacity","0").attr("width",z).attr("height",z),N.attr("class","architecture-junction");let{width:b,height:c}=N._groups[0][0].getBBox();N.width=b,N.height=c,e.setElementForId(m.id,N)})},"drawJunctions");Ln([{name:it.prefix,icons:it}]);ft.use(xt.default);function Tt(e,i,s){e.forEach((w)=>{i.add({group:"nodes",data:{type:"service",id:w.id,icon:w.icon,label:w.title,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-service"})})}t(Tt,"addServices");function At(e,i,s){e.forEach((w)=>{i.add({group:"nodes",data:{type:"junction",id:w.id,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-junction"})})}t(At,"addJunctions");function Lt(e,i){i.nodes().map((s)=>{let w=Qe(s);if(w.type==="group")return;w.x=s.position().x,w.y=s.position().y,e.getElementById(w.id).attr("transform","translate("+(w.x||0)+","+(w.y||0)+")")})}t(Lt,"positionNodes");function Ct(e,i){e.forEach((s)=>{i.add({group:"nodes",data:{type:"group",id:s.id,icon:s.icon,label:s.title,parent:s.in},classes:"node-group"})})}t(Ct,"addGroups");function It(e,i){e.forEach((s)=>{let{lhsId:w,rhsId:m,lhsInto:N,lhsGroup:z,rhsInto:v,lhsDir:b,rhsDir:c,rhsGroup:y,title:d}=s,f=dt(s.lhsDir,s.rhsDir)?"segments":"straight",u={id:`${w}-${m}`,label:d,source:w,sourceDir:b,sourceArrow:N,sourceGroup:z,sourceEndpoint:b==="L"?"0 50%":b==="R"?"100% 50%":b==="T"?"50% 0":"50% 100%",target:m,targetDir:c,targetArrow:v,targetGroup:y,targetEndpoint:c==="L"?"0 50%":c==="R"?"100% 50%":c==="T"?"50% 0":"50% 100%"};i.add({group:"edges",data:u,classes:f})})}t(It,"addEdges");function bt(e,i,s,w=[]){let m=t((f,u)=>{let g=new Map;for(let[r,B]of f.entries()){let F=`${r}`,o=0,h=[...B.entries()];if(h.length===1){g.set(F,h[0][1]);continue}for(let k=0;k<h.length-1;k++)for(let n=k+1;n<h.length;n++){let[P,X]=h[k],[D,j]=h[n];if(s.get(mt(P,D))===u)g.set(F,[...g.get(F)??[],...X,...j]);else if(P==="default"||D==="default")g.set(F,[...g.get(F)??[],...X,...j]);else{let I=`${F}-${o++}`;g.set(I,X);let Y=`${F}-${o++}`;g.set(Y,j)}}}return g},"flattenAlignments"),N=i.map((f)=>{let u=new Map,g=new Map;return f.forEach(([r,B],F)=>{let o=e.getNode(F)?.in??"default",h=u.get(B)??new Map;if(!u.has(B))u.set(B,h);let k=g.get(r)??new Map;if(!g.has(r))g.set(r,k);for(let n of[h,k]){let P=n.get(o)??[];if(!n.has(o))n.set(o,P);P.push(F)}}),{horiz:[...m(u,"horizontal").values()].filter((r)=>r.length>1),vert:[...m(g,"vertical").values()].filter((r)=>r.length>1)}}),[z,v]=N.reduce(([f,u],{horiz:g,vert:r})=>[[...f,...g],[...u,...r]],[[],[]]),b=new Set;w.forEach((f)=>f.members.forEach((u)=>b.add(u)));let c=t((f)=>f.filter((u)=>!u.some((g)=>b.has(g))),"dropOverlapping"),y=c(z),d=c(v);return w.forEach((f)=>{if(f.members.length<2)return;if(f.direction==="row")y.push([...f.members]);else d.push([...f.members])}),{horizontal:y,vertical:d}}t(bt,"getAlignments");function Nt(e,i,s=[]){let w=[],m=i.getConfigField("iconSize"),N=i.getConfigField("idealEdgeLengthMultiplier"),z=N*m,v=new Set;s.forEach((y)=>{for(let d=0;d<y.members.length-1;d++){let f=y.members[d],u=y.members[d+1];if(v.add(`${f}|${u}`),v.add(`${u}|${f}`),y.direction==="row")w.push({left:f,right:u,gap:z});else w.push({top:f,bottom:u,gap:z})}});let b=t((y)=>`${y[0]},${y[1]}`,"posToStr"),c=t((y)=>y.split(",").map((d)=>parseInt(d)),"strToPos");return e.forEach((y)=>{let d=new Map([...y.entries()].map(([r,B])=>[b(B),r])),f=[b([0,0])],u={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};while(f.length>0){let r=f.shift();if(r){u[r]=1;let B=d.get(r);if(B){let F=c(r);Object.entries(g).forEach(([o,h])=>{let k=b([F[0]+h[0],F[1]+h[1]]),n=d.get(k);if(n&&!u[k]){if(f.push(k),v.has(`${B}|${n}`))return;w.push({[ht[o]]:n,[ht[kt(o)]]:B,gap:N*m})}})}}}}),w}t(Nt,"getRelativeConstraints");function St(e,i,s,w,m,{spatialMaps:N,groupAlignments:z}){return new Promise((v)=>{let b=p("body").append("div").attr("id","cy").attr("style","display:none"),c=ft({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[0.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${m.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${m.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});b.remove(),Ct(s,c),Tt(e,c,m),At(i,c,m),It(w,c);let y=m.getLayoutHints(),d=bt(m,N,z,y),f=Nt(N,m,y),u=m.getConfigField("iconSize"),g=m.getConfigField("idealEdgeLengthMultiplier")*u,r=0.5*u,B=m.getConfigField("edgeElasticity"),F=m.getConfigField("seed"),o=c.layout({name:"fcose",quality:"proof",randomize:m.getConfigField("randomize"),nodeSeparation:m.getConfigField("nodeSeparation"),numIter:m.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:X}=Qe(n);return P===X?g:r},edgeElasticity(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:X}=Qe(n);return P===X?B:0.001},alignmentConstraint:d,relativePlacementConstraint:f});o.one("layoutstop",()=>{function h(k,n,P,X){let D,j,{x:_,y:I}=k,{x:Y,y:J}=n;j=(X-I+(_-P)*(I-J)/(_-Y))/Math.sqrt(1+Math.pow((I-J)/(_-Y),2)),D=Math.sqrt(Math.pow(X-I,2)+Math.pow(P-_,2)-Math.pow(j,2));let Z=Math.sqrt(Math.pow(Y-_,2)+Math.pow(J-I,2));D=D/Z;let se=(Y-_)*(X-I)-(J-I)*(P-_);switch(!0){case se>=0:se=1;break;case se<0:se=-1;break}let re=(Y-_)*(P-_)+(J-I)*(X-I);switch(!0){case re>=0:re=1;break;case re<0:re=-1;break}return j=Math.abs(j)*se,D=D*re,{distances:j,weights:D}}t(h,"getSegmentWeights"),c.startBatch();for(let k of Object.values(c.edges()))if(k.data?.()){let{x:n,y:P}=k.source().position(),{x:X,y:D}=k.target().position();if(n!==X&&P!==D){let j=k.sourceEndpoint(),_=k.targetEndpoint(),{sourceDir:I}=yt(k),[Y,J]=Ve(I)?[j.x,_.y]:[_.x,j.y],{weights:Z,distances:se}=h(j,_,Y,J);k.style("segment-distances",se),k.style("segment-weights",Z)}}c.endBatch(),ct(F,()=>o.run())});try{ct(F,()=>o.run())}catch(h){if(h instanceof RangeError&&h.message.includes("Invalid array length"))throw Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw h}c.ready((h)=>{a.info("Ready",h),v(c)})})}t(St,"layoutArchitecture");var Xt=t(async(e,i,s,w)=>{let m=w.db;m.setDiagramId(i);let N=m.getServices(),z=m.getJunctions(),v=m.getGroups(),b=m.getEdges(),c=m.getDataStructures(),y=V(i),d=y.append("g");d.attr("class","architecture-edges");let f=y.append("g");f.attr("class","architecture-services");let u=y.append("g");u.attr("class","architecture-groups"),await Ht(m,f,N,i),Vt(m,f,z,i);let g=await St(N,z,v,b,m,c);await Yt(d,g,m,i),await Ut(u,g,m,i),Lt(m,g),gt(void 0,y,m.getConfigField("padding"),m.getConfigField("useMaxWidth"))},"draw"),jt={draw:Xt},ar={parser:wt,get db(){return new Et},renderer:jt,styles:_t};export{ar as diagram};
|
|
36
|
+
`)}}}}}))},"drawEdges"),Ut=t(async function(e,i,s,w){let k=s.getConfigField("padding")*0.75,z=s.getConfigField("fontSize"),b=s.getConfigField("iconSize")/2;await Promise.all(i.nodes().map(async(c)=>{let y=Qe(c);if(y.type==="group"){let{h:d,w:f,x1:u,y1:g}=c.boundingBox(),r=e.append("rect");r.attr("id",`${w}-group-${y.id}`).attr("x",u+b).attr("y",g+b).attr("width",f).attr("height",d).attr("class","node-bkg");let B=e.append("g"),F=u,o=g;if(y.icon){let h=B.append("g");h.html(`<g>${await at(y.icon,{height:k,width:k,fallbackPrefix:it.prefix})}</g>`),h.attr("transform","translate("+(F+b+1)+", "+(o+b+1)+")"),F+=k,o+=z/2-1-2}if(y.label){let h=B.append("g");await Le(h,y.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},l()),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),h.attr("transform","translate("+(F+b+4)+", "+(o+b+2)+")")}s.setElementForId(y.id,r)}}))},"drawGroups"),Ht=t(async function(e,i,s,w){let m=l();for(let k of s){let z=i.append("g"),v=e.getConfigField("iconSize");if(k.title){let d=z.append("g");await Le(d,k.title,{useHtmlLabels:!1,width:v*1.5,classes:"architecture-service-label"},m),d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),d.attr("transform","translate("+v/2+", "+v+")")}let b=z.append("g");if(k.icon)b.html(`<g>${await at(k.icon,{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);else if(k.iconText){b.html(`<g>${await at("blank",{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);let u=b.append("g").append("foreignObject").attr("width",v).attr("height",v).append("div").attr("class","node-icon-text").attr("style",`height: ${v}px;`).append("div").html(O(k.iconText,m)),g=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((v-2)/g)};`)}else b.append("path").attr("class","node-bkg").attr("id",`${w}-node-${k.id}`).attr("d",`M0,${v} V5 Q0,0 5,0 H${v-5} Q${v},0 ${v},5 V${v} Z`);z.attr("id",`${w}-service-${k.id}`).attr("class","architecture-service");let{width:c,height:y}=z.node().getBBox();k.width=c,k.height=y,e.setElementForId(k.id,z)}return 0},"drawServices"),Vt=t(function(e,i,s,w){s.forEach((m)=>{let k=i.append("g"),z=e.getConfigField("iconSize");k.append("g").append("rect").attr("id",`${w}-node-${m.id}`).attr("fill-opacity","0").attr("width",z).attr("height",z),k.attr("class","architecture-junction");let{width:b,height:c}=k._groups[0][0].getBBox();k.width=b,k.height=c,e.setElementForId(m.id,k)})},"drawJunctions");In([{name:it.prefix,icons:it}]);ft.use(xt.default);function Tt(e,i,s){e.forEach((w)=>{i.add({group:"nodes",data:{type:"service",id:w.id,icon:w.icon,label:w.title,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-service"})})}t(Tt,"addServices");function At(e,i,s){e.forEach((w)=>{i.add({group:"nodes",data:{type:"junction",id:w.id,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-junction"})})}t(At,"addJunctions");function Lt(e,i){i.nodes().map((s)=>{let w=Qe(s);if(w.type==="group")return;w.x=s.position().x,w.y=s.position().y,e.getElementById(w.id).attr("transform","translate("+(w.x||0)+","+(w.y||0)+")")})}t(Lt,"positionNodes");function Ct(e,i){e.forEach((s)=>{i.add({group:"nodes",data:{type:"group",id:s.id,icon:s.icon,label:s.title,parent:s.in},classes:"node-group"})})}t(Ct,"addGroups");function It(e,i){e.forEach((s)=>{let{lhsId:w,rhsId:m,lhsInto:k,lhsGroup:z,rhsInto:v,lhsDir:b,rhsDir:c,rhsGroup:y,title:d}=s,f=dt(s.lhsDir,s.rhsDir)?"segments":"straight",u={id:`${w}-${m}`,label:d,source:w,sourceDir:b,sourceArrow:k,sourceGroup:z,sourceEndpoint:b==="L"?"0 50%":b==="R"?"100% 50%":b==="T"?"50% 0":"50% 100%",target:m,targetDir:c,targetArrow:v,targetGroup:y,targetEndpoint:c==="L"?"0 50%":c==="R"?"100% 50%":c==="T"?"50% 0":"50% 100%"};i.add({group:"edges",data:u,classes:f})})}t(It,"addEdges");function bt(e,i,s,w=[]){let m=t((f,u)=>{let g=new Map;for(let[r,B]of f.entries()){let F=`${r}`,o=0,h=[...B.entries()];if(h.length===1){g.set(F,h[0][1]);continue}for(let D=0;D<h.length-1;D++)for(let n=D+1;n<h.length;n++){let[P,X]=h[D],[M,j]=h[n];if(s.get(mt(P,M))===u)g.set(F,[...g.get(F)??[],...X,...j]);else if(P==="default"||M==="default")g.set(F,[...g.get(F)??[],...X,...j]);else{let I=`${F}-${o++}`;g.set(I,X);let Y=`${F}-${o++}`;g.set(Y,j)}}}return g},"flattenAlignments"),k=i.map((f)=>{let u=new Map,g=new Map;return f.forEach(([r,B],F)=>{let o=e.getNode(F)?.in??"default",h=u.get(B)??new Map;if(!u.has(B))u.set(B,h);let D=g.get(r)??new Map;if(!g.has(r))g.set(r,D);for(let n of[h,D]){let P=n.get(o)??[];if(!n.has(o))n.set(o,P);P.push(F)}}),{horiz:[...m(u,"horizontal").values()].filter((r)=>r.length>1),vert:[...m(g,"vertical").values()].filter((r)=>r.length>1)}}),[z,v]=k.reduce(([f,u],{horiz:g,vert:r})=>[[...f,...g],[...u,...r]],[[],[]]),b=new Set;w.forEach((f)=>f.members.forEach((u)=>b.add(u)));let c=t((f)=>f.filter((u)=>!u.some((g)=>b.has(g))),"dropOverlapping"),y=c(z),d=c(v);return w.forEach((f)=>{if(f.members.length<2)return;if(f.direction==="row")y.push([...f.members]);else d.push([...f.members])}),{horizontal:y,vertical:d}}t(bt,"getAlignments");function Nt(e,i,s=[]){let w=[],m=i.getConfigField("iconSize"),k=i.getConfigField("idealEdgeLengthMultiplier"),z=k*m,v=new Set;s.forEach((y)=>{for(let d=0;d<y.members.length-1;d++){let f=y.members[d],u=y.members[d+1];if(v.add(`${f}|${u}`),v.add(`${u}|${f}`),y.direction==="row")w.push({left:f,right:u,gap:z});else w.push({top:f,bottom:u,gap:z})}});let b=t((y)=>`${y[0]},${y[1]}`,"posToStr"),c=t((y)=>y.split(",").map((d)=>parseInt(d)),"strToPos");return e.forEach((y)=>{let d=new Map([...y.entries()].map(([r,B])=>[b(B),r])),f=[b([0,0])],u={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};while(f.length>0){let r=f.shift();if(r){u[r]=1;let B=d.get(r);if(B){let F=c(r);Object.entries(g).forEach(([o,h])=>{let D=b([F[0]+h[0],F[1]+h[1]]),n=d.get(D);if(n&&!u[D]){if(f.push(D),v.has(`${B}|${n}`))return;w.push({[ht[o]]:n,[ht[kt(o)]]:B,gap:k*m})}})}}}}),w}t(Nt,"getRelativeConstraints");function St(e,i,s,w,m,{spatialMaps:k,groupAlignments:z}){return new Promise((v)=>{let b=p("body").append("div").attr("id","cy").attr("style","display:none"),c=ft({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[0.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${m.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${m.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});b.remove(),Ct(s,c),Tt(e,c,m),At(i,c,m),It(w,c);let y=m.getLayoutHints(),d=bt(m,k,z,y),f=Nt(k,m,y),u=m.getConfigField("iconSize"),g=m.getConfigField("idealEdgeLengthMultiplier")*u,r=0.5*u,B=m.getConfigField("edgeElasticity"),F=m.getConfigField("seed"),o=c.layout({name:"fcose",quality:"proof",randomize:m.getConfigField("randomize"),nodeSeparation:m.getConfigField("nodeSeparation"),numIter:m.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(h){let[D,n]=h.connectedNodes(),{parent:P}=Qe(D),{parent:X}=Qe(n);return P===X?g:r},edgeElasticity(h){let[D,n]=h.connectedNodes(),{parent:P}=Qe(D),{parent:X}=Qe(n);return P===X?B:0.001},alignmentConstraint:d,relativePlacementConstraint:f});o.one("layoutstop",()=>{function h(D,n,P,X){let M,j,{x:_,y:I}=D,{x:Y,y:Z}=n;j=(X-I+(_-P)*(I-Z)/(_-Y))/Math.sqrt(1+Math.pow((I-Z)/(_-Y),2)),M=Math.sqrt(Math.pow(X-I,2)+Math.pow(P-_,2)-Math.pow(j,2));let Q=Math.sqrt(Math.pow(Y-_,2)+Math.pow(Z-I,2));M=M/Q;let se=(Y-_)*(X-I)-(Z-I)*(P-_);switch(!0){case se>=0:se=1;break;case se<0:se=-1;break}let re=(Y-_)*(P-_)+(Z-I)*(X-I);switch(!0){case re>=0:re=1;break;case re<0:re=-1;break}return j=Math.abs(j)*se,M=M*re,{distances:j,weights:M}}t(h,"getSegmentWeights"),c.startBatch();for(let D of Object.values(c.edges()))if(D.data?.()){let{x:n,y:P}=D.source().position(),{x:X,y:M}=D.target().position();if(n!==X&&P!==M){let j=D.sourceEndpoint(),_=D.targetEndpoint(),{sourceDir:I}=yt(D),[Y,Z]=Ve(I)?[j.x,_.y]:[_.x,j.y],{weights:Q,distances:se}=h(j,_,Y,Z);D.style("segment-distances",se),D.style("segment-weights",Q)}}c.endBatch(),ct(F,()=>o.run())});try{ct(F,()=>o.run())}catch(h){if(h instanceof RangeError&&h.message.includes("Invalid array length"))throw Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw h}c.ready((h)=>{a.info("Ready",h),v(c)})})}t(St,"layoutArchitecture");var Xt=t(async(e,i,s,w)=>{let m=w.db;m.setDiagramId(i);let k=m.getServices(),z=m.getJunctions(),v=m.getGroups(),b=m.getEdges(),c=m.getDataStructures(),y=V(i),d=y.append("g");d.attr("class","architecture-edges");let f=y.append("g");f.attr("class","architecture-services");let u=y.append("g");u.attr("class","architecture-groups"),await Ht(m,f,k,i),Vt(m,f,z,i);let g=await St(k,z,v,b,m,c);await Yt(d,g,m,i),await Ut(u,g,m,i),Lt(m,g),gt(void 0,y,m.getConfigField("padding"),m.getConfigField("useMaxWidth"))},"draw"),jt={draw:Xt},ar={parser:wt,get db(){return new Et},renderer:jt,styles:_t};export{ar as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h,o,i,r,m,e,n,y,nn,ne}from"./chunk-ve8gy05p.js";import{$r,Br,Fr}from"./chunk-1m6fx2h7.js";var ee={global:"全局",project:"项目",custom:"自定义",builtin:"内置"};function F({skill:s,issue:x,connection:v}){let{Button:E,CopyButton:j,style:u,useTheme:R}=y();R();let[l,k]=r(),[L,P]=r(),[f,O]=r(0);return o(()=>{let p=!0;P(void 0),k(void 0);let b=new URLSearchParams;if(s.projectID)b.set("projectID",s.projectID);if(s.location)b.set("location",s.location);let S=b.toString()?`?${b.toString()}`:"";return Promise.all([v.request(`/api/skills/${encodeURIComponent(s.name)}/content${S}`),v.request(`/api/skills/${encodeURIComponent(s.name)}/files${S}`)]).then(([g,D])=>{if(p)k({text:g.text,files:D.files})}).catch((g)=>{if(p)P(g instanceof Error?g.message:"读取失败")}),()=>{p=!1}},[v,s.name,s.projectID,s.location,f]),n("div",{className:"min-w-0 space-y-5 text-sm text-ink",children:[e("p",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-dim",children:s.description||"暂无描述"}),n("div",{children:[n("p",{className:"break-all text-xs text-dim",children:[ee[s.scope],s.projectName?` · ${s.projectName}`:""]}),n("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[e("code",{className:u("markdown.inlineCode","min-w-0 flex-1 break-all text-xs"),children:s.location}),e(j,{text:s.location,label:"复制完整路径",className:"size-10"})]})]}),n("ul",{className:"space-y-1 break-words text-xs text-dim",children:[e("li",{children:"启用状态按名称生效,影响所有同名技能的新会话可用性。"}),s.disableModelInvocation&&e("li",{children:"仅手动:可由用户调用,不向模型自动提供。"}),s.platforms&&n("li",{children:["平台限制:",s.platforms.join("、")]}),s.disabled&&e("li",{children:"已禁用:不会提供给新会话。"}),x?.overriddenBy&&n("li",{className:"break-all",children:["被覆盖:同名技能优先使用 ",x.overriddenBy]})]}),s.commands?.length?n("div",{children:[e("h3",{className:"font-medium",children:"bin 命令"}),e("p",{className:"mt-1 text-xs text-dim",children:"技能目录中的可执行命令。"}),e("ul",{className:"mt-2 space-y-1 font-mono text-xs",children:s.commands.map((p)=>e("li",{className:"break-all",children:p},p))})]}):null,L?n("div",{role:"alert",className:"space-y-2",children:[n("p",{className:"break-words text-danger",children:["读取失败:",L]}),e(E,{className:"h-10",onClick:()=>O(f+1),children:"重试"})]}):!l?e("p",{role:"status",className:"text-dim",children:"正在读取文件…"}):n(m,{children:[n("section",{children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e("h3",{className:"font-medium",children:"SKILL.md 原文"}),e(j,{text:l.text,label:"复制 SKILL.md 原文",className:"size-10"})]}),n("p",{className:"mb-2 text-xs text-faint",children:[l.text.length.toLocaleString()," 字符 · 约 ",Math.ceil(l.text.length/4).toLocaleString()," ","tokens(估算)"]}),e("pre",{className:u("surface.subtle",u("chat.toolOutput"),"rounded-lg bg-raised p-3 text-xs leading-5 break-all"),children:l.text})]}),n("section",{children:[n("h3",{className:"font-medium",children:["目录文件 · ",l.files.length,l.files.length===200?"(最多显示 200 个)":""]}),e("ul",{className:"mt-2 space-y-1 font-mono text-xs text-dim",children:l.files.map((p)=>e("li",{className:"break-all",children:p},p))})]})]})]})}var A="all",G="non-project";function me({connection:s}){let{Button:x,Select:v,Dialog:E,CatalogRow:j,style:u,useTheme:R}=y();R();let[l,k]=r([]),[L,P]=r([]),[f,O]=r(A),[p,b]=r([]),[S,g]=r(),[D,H]=r(""),[w,B]=r(),[N,q]=r(!0),[K,z]=r(),[W,Q]=r(),d=i(0),I=i(!1),C=h(async(t=!1)=>{let c=++d.current;I.current=!0,q(!0);try{if(t)await s.request("/api/skills/rescan",{method:"POST"});let[a,U,T]=await Promise.all([s.request("/api/skills?all=true"),s.request("/api/skills/settings"),s.request("/api/projects")]);if(c!==d.current)return;k(a.skills),P(T),b(a.issues),g(U),Q(new Date),z(void 0)}catch(a){if(c===d.current)z(a instanceof Error?a.message:"读取失败")}finally{if(c===d.current)I.current=!1,q(!1)}},[s]);o(()=>(C(),()=>{d.current++}),[C]);async function V(t){if(I.current)return;I.current=!0;let c=++d.current;q(!0);try{let a=await s.request("/api/skills/settings",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(c!==d.current)return;g(a),await C()}catch(a){if(c!==d.current)return;z(a instanceof Error?a.message:"保存设置失败"),I.current=!1,q(!1)}}let X=D.trim().toLocaleLowerCase(),J=f===A?l:l.filter((t)=>{if(t.scope!=="project")return!0;return f!==G&&t.projectID===f}),M=J.filter((t)=>`${t.name} ${t.description??""}`.toLocaleLowerCase().includes(X)),_=(t)=>p.find((c)=>c.kind==="overridden"&&(c.path==="<built-in>"?t.scope==="builtin":c.path.replace(/\\/g,"/")===`${t.location.replace(/\\/g,"/")}/SKILL.md`));return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:u("settings.groupTitle"),children:"技能"}),e("p",{"aria-live":"polite",className:u("settings.groupDesc"),children:W&&`找到 ${J.length} 个 · ${W.toLocaleTimeString("zh-CN",{hour12:!1})}`})]}),n("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e(v,{value:f,disabled:N,onValueChange:(t)=>{B(void 0),O(t)},groups:[{options:[{value:A,label:"全部来源"},{value:G,label:"非项目技能"}]},...$r(L)],className:"w-44"}),n(x,{variant:"ghost",disabled:N,onClick:()=>C(!0),className:"h-9 px-2.5 text-xs",children:[e(ne,{className:`size-3.5 ${N?"animate-spin":""}`}),e("span",{className:"ml-1",children:"重新扫描"})]})]})]}),K&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法更新技能:",K]}),e(x,{disabled:N,onClick:()=>C(),children:"重试"})]}),e(Br,{label:"搜索技能",placeholder:"搜索技能",value:D,onChange:H}),e("div",{className:u("settings.groupBox"),children:N&&!l.length?e(Fr,{}):M.length===0?e("p",{className:"p-4 text-sm text-dim",children:"没有找到匹配的技能"}):e("ul",{className:"divide-y divide-line",children:M.map((t)=>{let c=_(t),a=t.disabled;return e("li",{children:e(j,{name:t.name,selectLabel:`查看技能 ${t.name}`,onSelect:()=>B(t),description:t.description,inactive:a,aside:n(m,{children:[c&&n("span",{className:"flex items-center gap-1 text-xs text-warning",children:[e(nn,{className:"size-3.5"}),"被覆盖"]}),e("span",{className:u("control.badge"),children:t.scope==="project"?"项目":t.scope==="builtin"?"内置":"全局"})]}),toggle:{checked:!a,label:`启用技能 ${t.name}`,disabled:N,onCheckedChange:(U)=>{if(!S)return;let T=S.disabled??[],Y=U?T.filter((Z)=>Z!==t.name):[...T,t.name];V({...S,disabled:Y})}}})},`${t.scope}:${t.projectID??""}:${t.name}`)})})})]}),e(E,{open:Boolean(w),onOpenChange:(t)=>{if(!t)B(void 0)},title:w?.name??"",size:"lg",footer:e("div",{className:"flex w-full justify-end",children:e(x,{variant:"primary",onClick:()=>B(void 0),children:"关闭"})}),children:w&&e(F,{skill:w,issue:_(w),connection:s})})]})}export{me as SkillsSection};
|