@softistx/pulsarix-widget 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{abnfDiagram-XWFEHMT6.9eyf87ze.js → abnfDiagram-XWFEHMT6.b9yk4x5x.js} +1 -1
- package/dist/chunks/architecture-WOLXFQ4H.aft3rkrr.js +1 -0
- package/dist/chunks/{architectureDiagram-CSQXQB3N.cy6247c8.js → architectureDiagram-CSQXQB3N.qz18rz0g.js} +1 -1
- package/dist/chunks/{blockDiagram-BEDRHYPZ.an5w7tk4.js → blockDiagram-BEDRHYPZ.bb08b9nt.js} +1 -1
- package/dist/chunks/{c4Diagram-M2UUVUY5.512525r3.js → c4Diagram-M2UUVUY5.px0epccd.js} +2 -2
- package/dist/chunks/{chat-markdown-COFhHMpe.fm39gs4e.js → chat-markdown-CrbWbK1O.k4nmgyey.js} +5 -5
- package/dist/chunks/{classDiagram-v2-KXABOMEV.5gw6azyv.js → classDiagram-v2-KXABOMEV.f02387t9.js} +2 -2
- package/dist/chunks/{cose-bilkent-JH36ORCC.9t42zmky.js → cose-bilkent-JH36ORCC.azq9k24r.js} +1 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.dk039jny.js +1 -0
- package/dist/chunks/{cynefinDiagram-NJNITYFG.dta2tfnh.js → cynefinDiagram-NJNITYFG.zt7gprt1.js} +1 -1
- package/dist/chunks/{dagre-KIHZ2IZ3.k7b2vmwy.js → dagre-KIHZ2IZ3.702bqbr9.js} +1 -1
- package/dist/chunks/{diagram-7YQZDPLS.cd2t0saz.js → diagram-7YQZDPLS.m7vf21j6.js} +1 -1
- package/dist/chunks/{diagram-QBROCOUO.1x4d8w7m.js → diagram-QBROCOUO.33e5hv7x.js} +3 -3
- package/dist/chunks/{diagram-RJJCUUZO.jk65d82z.js → diagram-RJJCUUZO.94k74bz7.js} +2 -2
- package/dist/chunks/{diagram-WERXNKYE.85c3en4j.js → diagram-WERXNKYE.7fe849z6.js} +1 -1
- package/dist/chunks/{diagram-YHHI257C.y494n4nm.js → diagram-YHHI257C.qjjjfq7w.js} +2 -2
- package/dist/chunks/{diagram-YR4HJLHV.z2n88j9s.js → diagram-YR4HJLHV.310x2we2.js} +1 -1
- package/dist/chunks/{ebnfDiagram-N527522P.cgfkzbkp.js → ebnfDiagram-N527522P.a4crteq1.js} +1 -1
- package/dist/chunks/{editor-shortcuts-dialog-Ch8GFC-h.n66q7eep.js → editor-shortcuts-dialog-B0ppoiza.x3p4h07t.js} +1 -1
- package/dist/chunks/editor.arg3zy29.js +4 -0
- package/dist/chunks/{elk-O5DQBFGD.188pnf8b.js → elk-O5DQBFGD.dx61etan.js} +1 -1
- package/dist/chunks/{emoji-picker-Cv6ZOgpd.cmp5h45n.js → emoji-picker-CbvQZ2ZL.nst616hd.js} +2 -2
- package/dist/chunks/{erDiagram-K3K3BIDK.abxf5cgs.js → erDiagram-K3K3BIDK.qzqv67zm.js} +5 -5
- package/dist/chunks/eventmodeling-K75KTNOO.gmm1bcak.js +1 -0
- package/dist/chunks/{flow-diagram-B6X1M34-.awp18a9v.js → flow-diagram-AiM6FiIm.73jr19pb.js} +1 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.fzwqg115.js +1 -0
- package/dist/chunks/{ganttDiagram-3PRQTZWP.p72ak8vx.js → ganttDiagram-3PRQTZWP.xngzb32h.js} +2 -2
- package/dist/chunks/gitGraph-VSP46ZUC.0m8jykgw.js +1 -0
- package/dist/chunks/{gitGraphDiagram-VXDFKS5L.vtq378bg.js → gitGraphDiagram-VXDFKS5L.1sm36z2q.js} +1 -1
- package/dist/chunks/{grid-E2QIVN74.8xqrr45y.js → grid-E2QIVN74.76pgtn2n.js} +1 -1
- package/dist/chunks/illustration-BOW28wq5.bkz28k1x.js +1 -0
- package/dist/chunks/{index.pb5tn7q8.js → index.0e4s8r4m.js} +1 -1
- package/dist/chunks/{index.8hmrz817.js → index.0k4tbjhp.js} +1 -1
- package/dist/chunks/{index.je7pqrtm.js → index.1d7qpsyx.js} +2 -2
- package/dist/chunks/{index.x22rwqsz.js → index.32jxrb9b.js} +2 -2
- package/dist/chunks/{index.yd3167gn.js → index.7gxz6d1f.js} +2 -2
- package/dist/chunks/{index.r8wc9n4q.js → index.7k5v3p25.js} +1 -1
- package/dist/chunks/{index.nphh2dtn.js → index.8f3x951p.js} +1 -1
- package/dist/chunks/{index.ybmxf4mt.js → index.9bf5qrah.js} +1 -1
- package/dist/chunks/{index.mjfjqm0b.js → index.a1bxkgd3.js} +10 -10
- package/dist/chunks/{index.cf9nd6xy.js → index.a6rz456z.js} +2 -2
- package/dist/chunks/{index.b0pypc3w.js → index.dnnzjw18.js} +1 -1
- package/dist/chunks/index.e35b4yh5.js +44 -0
- package/dist/chunks/{index.jgvp2nkv.js → index.fbeztcp3.js} +1 -1
- package/dist/chunks/{index.2jsv3483.js → index.hvdnkr5m.js} +2 -2
- package/dist/chunks/{index.3k4gyba0.js → index.nsckd1vt.js} +2 -2
- package/dist/chunks/{index.btq862bx.js → index.r0p3fm9f.js} +1 -1
- package/dist/chunks/{index.psaka010.js → index.rfyzb2yv.js} +1 -1
- package/dist/chunks/{index.vm7ezzet.js → index.t34t6kpe.js} +2 -2
- package/dist/chunks/{index.6tc2v7mk.js → index.wrjdgn4c.js} +2 -2
- package/dist/chunks/{index.qy1pndre.js → index.zm5x44tn.js} +1 -1
- package/dist/chunks/info-OHQRW6UA.e0a85drn.js +1 -0
- package/dist/chunks/{infoDiagram-EZ3ZOAHP.q0047zjz.js → infoDiagram-EZ3ZOAHP.pfd0fjwn.js} +1 -1
- package/dist/chunks/{ishikawaDiagram-S3EKX5GW.41wwb1jp.js → ishikawaDiagram-S3EKX5GW.h5kjez1x.js} +2 -2
- package/dist/chunks/{journeyDiagram-POQNLL5X.2c9swtn6.js → journeyDiagram-POQNLL5X.55cqc9p0.js} +2 -2
- package/dist/chunks/{kanban-definition-BH5XI6FM.xznh9d30.js → kanban-definition-BH5XI6FM.pkdvda4y.js} +1 -1
- package/dist/chunks/{markup-color-chrome-ykGNUl8y.955bjndb.js → markup-color-chrome-ykGNUl8y.0ds56d6x.js} +1 -1
- package/dist/chunks/{markup-custom-color-Dou38qUi.w8c65wn1.js → markup-custom-color-Dgm2hHI7.7darvajx.js} +1 -1
- package/dist/chunks/{mention-list-D4eNNVs0.2k5cdtgy.js → mention-list-CkAUzPBG.mtjgmmzb.js} +1 -1
- package/dist/chunks/{mermaid.core.d680cq0m.js → mermaid.core.j7s05j63.js} +4 -4
- package/dist/chunks/{mindmap-definition-WVAN44T4.k41b9d4r.js → mindmap-definition-WVAN44T4.x3jbxvft.js} +1 -1
- package/dist/chunks/packet-JDAUHWVQ.52409p3r.js +1 -0
- package/dist/chunks/{panel.yh0jnkha.js → panel.9tp7gr60.js} +1 -1
- package/dist/chunks/{pegDiagram-D4NLKWP3.x25624w6.js → pegDiagram-D4NLKWP3.xq15gqy9.js} +1 -1
- package/dist/chunks/pie-XZMESJXO.q5kre8cx.js +1 -0
- package/dist/chunks/{pieDiagram-36ENHN4W.j4fq9134.js → pieDiagram-36ENHN4W.8h0wam54.js} +2 -2
- package/dist/chunks/{plated-illustration-0ro04oJt.0ebg0x7r.js → plated-illustration-COZYWJ81.xy7ba5mq.js} +1 -1
- package/dist/chunks/{quadrantDiagram-ZQUDMS73.1vgwgk90.js → quadrantDiagram-ZQUDMS73.k28g8jpn.js} +2 -2
- package/dist/chunks/radar-ABXABTNO.yk872k2n.js +1 -0
- package/dist/chunks/railroad-I3PHUGI6.9wfa6vs3.js +1 -0
- package/dist/chunks/railroad-abnf-LNEFI6M7.70zznk3b.js +1 -0
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.4pvdng0p.js +1 -0
- package/dist/chunks/railroad-peg-JR7BVNR7.ev15ebp6.js +1 -0
- package/dist/chunks/{railroadDiagram-JIZHGYPL.pbv1rqfp.js → railroadDiagram-JIZHGYPL.e7p2vqgg.js} +1 -1
- package/dist/chunks/{render-VIF2ZAQL.2kz294jj.js → render-VIF2ZAQL.w5ytncsg.js} +1 -1
- package/dist/chunks/{requirementDiagram-AXW2TVFA.qnxmvqx8.js → requirementDiagram-AXW2TVFA.arekdz02.js} +2 -2
- package/dist/chunks/{sankeyDiagram-FBCJTAIF.whv6dy60.js → sankeyDiagram-FBCJTAIF.1d04xcmb.js} +2 -2
- package/dist/chunks/{sequenceDiagram-3LA2ROMG.w52darq5.js → sequenceDiagram-3LA2ROMG.j4xywwp1.js} +2 -2
- package/dist/chunks/{sizeCapture-2Q2CQKSF.zgscrz2v.js → sizeCapture-2Q2CQKSF.862bnf6p.js} +1 -1
- package/dist/chunks/{stateDiagram-v2-ATKHQDJO.zk8w1ht1.js → stateDiagram-v2-ATKHQDJO.xvvtr0y2.js} +2 -2
- package/dist/chunks/{swimlanes-YQL5WMAO.cn1pz0jc.js → swimlanes-YQL5WMAO.dtnjb4xt.js} +1 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.0q8kd5qn.js +8 -0
- package/dist/chunks/{timeline-definition-7Z437IG3.atpqnb0j.js → timeline-definition-7Z437IG3.zfhqzc4r.js} +1 -1
- package/dist/chunks/treeView-D4JQ5SDB.3fzswdjp.js +1 -0
- package/dist/chunks/treemap-SAJKECNS.cgh74bhn.js +1 -0
- package/dist/chunks/{usecaseDiagram-RDK6N6HP.ase4sfgd.js → usecaseDiagram-RDK6N6HP.ewxnyz4c.js} +2 -2
- package/dist/chunks/{vennDiagram-SHRQU5PJ.as8z3hh5.js → vennDiagram-SHRQU5PJ.wkzf1f00.js} +2 -2
- package/dist/chunks/wardley-7MLQ67FV.6q5tgt0s.js +1 -0
- package/dist/chunks/{wardleyDiagram-F3OXNVQS.8pf1xb65.js → wardleyDiagram-F3OXNVQS.srjfm4nb.js} +1 -1
- package/dist/chunks/{xychartDiagram-GDYJKCDI.z35xw169.js → xychartDiagram-GDYJKCDI.xfa2vexk.js} +2 -2
- package/dist/index.js +22 -15
- package/package.json +2 -2
- package/dist/chunks/architecture-WOLXFQ4H.230b0n6c.js +0 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.e9ycn4jb.js +0 -1
- package/dist/chunks/editor.yc8q5dd1.js +0 -4
- package/dist/chunks/eventmodeling-K75KTNOO.q3y4xbmj.js +0 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.af312t1k.js +0 -1
- package/dist/chunks/gitGraph-VSP46ZUC.e4envgw8.js +0 -1
- package/dist/chunks/illustration-BpmMAKpO.brt46gkr.js +0 -1
- package/dist/chunks/index.5vcex75v.js +0 -44
- package/dist/chunks/info-OHQRW6UA.yhwzx56w.js +0 -1
- package/dist/chunks/packet-JDAUHWVQ.gp9cmm94.js +0 -1
- package/dist/chunks/pie-XZMESJXO.fx385qqa.js +0 -1
- package/dist/chunks/radar-ABXABTNO.d58r1mqp.js +0 -1
- package/dist/chunks/railroad-I3PHUGI6.cwq84f31.js +0 -1
- package/dist/chunks/railroad-abnf-LNEFI6M7.7z7d547m.js +0 -1
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.geje0ygg.js +0 -1
- package/dist/chunks/railroad-peg-JR7BVNR7.f8xnzs1y.js +0 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.cy9ywqbn.js +0 -8
- package/dist/chunks/treeView-D4JQ5SDB.fj76b06b.js +0 -1
- package/dist/chunks/treemap-SAJKECNS.yk7967y9.js +0 -1
- package/dist/chunks/wardley-7MLQ67FV.r3k2k1ra.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e,n,m}from"./index.mjfjqm0b.js";import{wt}from"./index.fv9af3wd.js";import{Fe,Ke}from"./index.5vcex75v.js";var q=Ke(function(Z,K){(function(w,E){if(typeof Z==="object"&&typeof K==="object")K.exports=E();else if(typeof define==="function"&&define.amd)define([],E);else if(typeof Z==="object")Z.layoutBase=E();else w.layoutBase=E()})(Z,function(){return function(I){var w={};function E(o){if(w[o])return w[o].exports;var r=w[o]={i:o,l:!1,exports:{}};return I[o].call(r.exports,r,r.exports,E),r.l=!0,r.exports}return E.m=I,E.c=w,E.i=function(o){return o},E.d=function(o,r,t){if(!E.o(o,r))Object.defineProperty(o,r,{configurable:!1,enumerable:!0,get:t})},E.n=function(o){var r=o&&o.__esModule?function(){return o.default}:function(){return o};return E.d(r,"a",r),r},E.o=function(o,r){return Object.prototype.hasOwnProperty.call(o,r)},E.p="",E(E.s=26)}([function(I,w,E){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1000,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,I.exports=o},function(I,w,E){var o=E(2),r=E(8),t=E(9);function i(f,a,v){o.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=a}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;else if(this.target===f)return this.source;else throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(f,a){var v=this.getOtherEnd(f),s=a.getGraphManager().getRoot();while(!0){if(v.getOwner()==a)return v;if(v.getOwner()==s)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var f=[,,,,];if(this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),f),!this.isOverlapingSourceAndTarget){if(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1)this.lengthX=t.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=t.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},i.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=t.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=t.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},I.exports=i},function(I,w,E){function o(r){this.vGraphObject=r}I.exports=o},function(I,w,E){var o=E(2),r=E(10),t=E(13),i=E(0),l=E(16),f=E(4);function a(s,u,g,y){if(g==null&&y==null)y=u;if(o.call(this,y),s.graphManager!=null)s=s.graphManager;if(this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=y,this.edges=[],this.graphManager=s,g!=null&&u!=null)this.rect=new t(u.x,u.y,g.width,g.height);else this.rect=new t}a.prototype=Object.create(o.prototype);for(var v in o)a[v]=o[v];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(s){this.rect.width=s},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(s){this.rect.height=s},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(s,u){this.rect.x=s.x,this.rect.y=s.y,this.rect.width=u.width,this.rect.height=u.height},a.prototype.setCenter=function(s,u){this.rect.x=s-this.rect.width/2,this.rect.y=u-this.rect.height/2},a.prototype.setLocation=function(s,u){this.rect.x=s,this.rect.y=u},a.prototype.moveBy=function(s,u){this.rect.x+=s,this.rect.y+=u},a.prototype.getEdgeListToNode=function(s){var u=[],g,y=this;return y.edges.forEach(function(L){if(L.target==s){if(L.source!=y)throw"Incorrect edge source!";u.push(L)}}),u},a.prototype.getEdgesBetween=function(s){var u=[],g,y=this;return y.edges.forEach(function(L){if(!(L.source==y||L.target==y))throw"Incorrect edge source and/or target";if(L.target==s||L.source==s)u.push(L)}),u},a.prototype.getNeighborsList=function(){var s=new Set,u=this;return u.edges.forEach(function(g){if(g.source==u)s.add(g.target);else{if(g.target!=u)throw"Incorrect incidency!";s.add(g.source)}}),s},a.prototype.withChildren=function(){var s=new Set,u,g;if(s.add(this),this.child!=null){var y=this.child.getNodes();for(var L=0;L<y.length;L++)u=y[L],g=u.withChildren(),g.forEach(function(A){s.add(A)})}return s},a.prototype.getNoOfChildren=function(){var s=0,u;if(this.child==null)s=1;else{var g=this.child.getNodes();for(var y=0;y<g.length;y++)u=g[y],s+=u.getNoOfChildren()}if(s==0)s=1;return s},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},a.prototype.scatter=function(){var s,u,g=-i.INITIAL_WORLD_BOUNDARY,y=i.INITIAL_WORLD_BOUNDARY;s=i.WORLD_CENTER_X+l.nextDouble()*(y-g)+g;var L=-i.INITIAL_WORLD_BOUNDARY,A=i.INITIAL_WORLD_BOUNDARY;u=i.WORLD_CENTER_Y+l.nextDouble()*(A-L)+L,this.rect.x=s,this.rect.y=u},a.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var s=this.getChild();if(s.updateBounds(!0),this.rect.x=s.getLeft(),this.rect.y=s.getTop(),this.setWidth(s.getRight()-s.getLeft()),this.setHeight(s.getBottom()-s.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var u=s.getRight()-s.getLeft(),g=s.getBottom()-s.getTop();if(this.labelWidth>u)this.rect.x-=(this.labelWidth-u)/2,this.setWidth(this.labelWidth);if(this.labelHeight>g){if(this.labelPos=="center")this.rect.y-=(this.labelHeight-g)/2;else if(this.labelPos=="top")this.rect.y-=this.labelHeight-g;this.setHeight(this.labelHeight)}}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(s){var u=this.rect.x;if(u>i.WORLD_BOUNDARY)u=i.WORLD_BOUNDARY;else if(u<-i.WORLD_BOUNDARY)u=-i.WORLD_BOUNDARY;var g=this.rect.y;if(g>i.WORLD_BOUNDARY)g=i.WORLD_BOUNDARY;else if(g<-i.WORLD_BOUNDARY)g=-i.WORLD_BOUNDARY;var y=new f(u,g),L=s.inverseTransformPoint(y);this.setLocation(L.x,L.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},I.exports=a},function(I,w,E){function o(r,t){if(r==null&&t==null)this.x=0,this.y=0;else this.x=r,this.y=t}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(r){this.x=r},o.prototype.setY=function(r){this.y=r},o.prototype.getDifference=function(r){return new DimensionD(this.x-r.x,this.y-r.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(r){return this.x+=r.width,this.y+=r.height,this},I.exports=o},function(I,w,E){var o=E(2),r=E(10),t=E(0),i=E(6),l=E(3),f=E(1),a=E(13),v=E(12),s=E(11);function u(y,L,A){if(o.call(this,A),this.estimatedSize=r.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=y,L!=null&&L instanceof i)this.graphManager=L;else if(L!=null&&L instanceof Layout)this.graphManager=L.graphManager}u.prototype=Object.create(o.prototype);for(var g in o)u[g]=o[g];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(y,L,A){if(L==null&&A==null){var d=y;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(d)>-1)throw"Node already in graph!";return d.owner=this,this.getNodes().push(d),d}else{var N=y;if(!(this.getNodes().indexOf(L)>-1&&this.getNodes().indexOf(A)>-1))throw"Source or target not in graph!";if(!(L.owner==A.owner&&L.owner==this))throw"Both owners must be this graph!";if(L.owner!=A.owner)return null;if(N.source=L,N.target=A,N.isInterGraph=!1,this.getEdges().push(N),L.edges.push(N),A!=L)A.edges.push(N);return N}},u.prototype.remove=function(y){var L=y;if(y instanceof l){if(L==null)throw"Node is null!";if(!(L.owner!=null&&L.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var A=L.edges.slice(),d,N=A.length;for(var T=0;T<N;T++)if(d=A[T],d.isInterGraph)this.graphManager.remove(d);else d.source.owner.remove(d);var R=this.nodes.indexOf(L);if(R==-1)throw"Node not in owner node list!";this.nodes.splice(R,1)}else if(y instanceof f){var d=y;if(d==null)throw"Edge is null!";if(!(d.source!=null&&d.target!=null))throw"Source and/or target is null!";if(!(d.source.owner!=null&&d.target.owner!=null&&d.source.owner==this&&d.target.owner==this))throw"Source and/or target owner is invalid!";var h=d.source.edges.indexOf(d),c=d.target.edges.indexOf(d);if(!(h>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(d.source.edges.splice(h,1),d.target!=d.source)d.target.edges.splice(c,1);var R=d.source.owner.getEdges().indexOf(d);if(R==-1)throw"Not in owner's edge list!";d.source.owner.getEdges().splice(R,1)}},u.prototype.updateLeftTop=function(){var{MAX_VALUE:y,MAX_VALUE:L}=r,A,d,N,T=this.getNodes(),R=T.length;for(var h=0;h<R;h++){var c=T[h];if(A=c.getTop(),d=c.getLeft(),y>A)y=A;if(L>d)L=d}if(y==r.MAX_VALUE)return null;if(T[0].getParent().paddingLeft!=null)N=T[0].getParent().paddingLeft;else N=this.margin;return this.left=L-N,this.top=y-N,new v(this.left,this.top)},u.prototype.updateBounds=function(y){var L=r.MAX_VALUE,A=-r.MAX_VALUE,d=r.MAX_VALUE,N=-r.MAX_VALUE,T,R,h,c,p,D=this.nodes,O=D.length;for(var C=0;C<O;C++){var M=D[C];if(y&&M.child!=null)M.updateBounds();if(T=M.getLeft(),R=M.getRight(),h=M.getTop(),c=M.getBottom(),L>T)L=T;if(A<R)A=R;if(d>h)d=h;if(N<c)N=c}var G=new a(L,d,A-L,N-d);if(L==r.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(D[0].getParent().paddingLeft!=null)p=D[0].getParent().paddingLeft;else p=this.margin;this.left=G.x-p,this.right=G.x+G.width+p,this.top=G.y-p,this.bottom=G.y+G.height+p},u.calculateBounds=function(y){var L=r.MAX_VALUE,A=-r.MAX_VALUE,d=r.MAX_VALUE,N=-r.MAX_VALUE,T,R,h,c,p=y.length;for(var D=0;D<p;D++){var O=y[D];if(T=O.getLeft(),R=O.getRight(),h=O.getTop(),c=O.getBottom(),L>T)L=T;if(A<R)A=R;if(d>h)d=h;if(N<c)N=c}var C=new a(L,d,A-L,N-d);return C},u.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){var y=0,L=this.nodes,A=L.length;for(var d=0;d<A;d++){var N=L[d];y+=N.calcEstimatedSize()}if(y==0)this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=y/Math.sqrt(this.nodes.length);return this.estimatedSize},u.prototype.updateConnected=function(){var y=this;if(this.nodes.length==0){this.isConnected=!0;return}var L=new s,A=new Set,d=this.nodes[0],N,T,R=d.withChildren();R.forEach(function(C){L.push(C),A.add(C)});while(L.length!==0){d=L.shift(),N=d.getEdges();var h=N.length;for(var c=0;c<h;c++){var p=N[c];if(T=p.getOtherEndInGraph(d,this),T!=null&&!A.has(T)){var D=T.withChildren();D.forEach(function(C){L.push(C),A.add(C)})}}}if(this.isConnected=!1,A.size>=this.nodes.length){var O=0;if(A.forEach(function(C){if(C.owner==y)O++}),O==this.nodes.length)this.isConnected=!0}},I.exports=u},function(I,w,E){var o,r=E(1);function t(i){o=E(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),f=this.add(i,l);return this.setRootGraph(f),this.rootGraph},t.prototype.add=function(i,l,f,a,v){if(f==null&&a==null&&v==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{v=f,a=l,f=i;var s=a.getOwner(),u=v.getOwner();if(!(s!=null&&s.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(u!=null&&u.getGraphManager()==this))throw"Target not in this graph mgr!";if(s==u)return f.isInterGraph=!1,s.add(f,a,v);else{if(f.isInterGraph=!0,f.source=a,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(l.getEdges());var a,v=f.length;for(var s=0;s<v;s++)a=f[s],l.remove(a);var u=[];u=u.concat(l.getNodes());var g;v=u.length;for(var s=0;s<v;s++)g=u[s],l.remove(g);if(l==this.rootGraph)this.setRootGraph(null);var y=this.graphs.indexOf(l);this.graphs.splice(y,1),l.parent=null}else if(i instanceof r){if(a=i,a==null)throw"Edge is null!";if(!a.isInterGraph)throw"Not an inter-graph edge!";if(!(a.source!=null&&a.target!=null))throw"Source and/or target is null!";if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw"Source and/or target doesn't know this edge!";var y=a.source.edges.indexOf(a);if(a.source.edges.splice(y,1),y=a.target.edges.indexOf(a),a.target.edges.splice(y,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw"Not in owner graph manager's edge list!";var y=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(y,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){var i=[],l=this.getGraphs(),f=l.length;for(var a=0;a<f;a++)i=i.concat(l[a].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs(),f=l.length;for(var a=0;a<l.length;a++)i=i.concat(l[a].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=i,i.parent==null)i.parent=this.layout.newNode("Root node")},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var f=i.getOwner(),a;do{if(a=f.getParent(),a==null)break;if(a==l)return!0;if(f=a.getOwner(),f==null)break}while(!0);f=l.getOwner();do{if(a=f.getParent(),a==null)break;if(a==i)return!0;if(f=a.getOwner(),f==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){var i,l,f,a,v,s=this.getAllEdges(),u=s.length;for(var g=0;g<u;g++){if(i=s[g],l=i.source,f=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=f,l==f){i.lca=l.getOwner();continue}a=l.getOwner();while(i.lca==null){i.targetInLca=f,v=f.getOwner();while(i.lca==null){if(v==a){i.lca=v;break}if(v==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=v.getParent(),v=i.targetInLca.getOwner()}if(a==this.rootGraph)break;if(i.lca==null)i.sourceInLca=a.getParent(),a=i.sourceInLca.getOwner()}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var f=i.getOwner();do{if(f==null)break;var a=l.getOwner();do{if(a==null)break;if(a==f)return a;a=a.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},t.prototype.calcInclusionTreeDepths=function(i,l){if(i==null&&l==null)i=this.rootGraph,l=1;var f,a=i.getNodes(),v=a.length;for(var s=0;s<v;s++)if(f=a[s],f.inclusionTreeDepth=l,f.child!=null)this.calcInclusionTreeDepths(f.child,l+1)},t.prototype.includesInvalidEdge=function(){var i,l=this.edges.length;for(var f=0;f<l;f++)if(i=this.edges[f],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},I.exports=t},function(I,w,E){var o=E(0);function r(){}for(var t in o)r[t]=o[t];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=0.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=0.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,r.COOLING_ADAPTATION_FACTOR=0.33,r.ADAPTATION_LOWER_NODE_LIMIT=1000,r.ADAPTATION_UPPER_NODE_LIMIT=5000,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=r.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,I.exports=r},function(I,w,E){var o=E(12);function r(){}r.calcSeparationAmount=function(t,i,l,f){if(!t.intersects(i))throw"assert failed";var a=[,,];if(this.decideDirectionsForOverlappingNodes(t,i,a),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight())l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight());else if(i.getX()<=t.getX()&&i.getRight()>=t.getRight())l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight());if(t.getY()<=i.getY()&&t.getBottom()>=i.getBottom())l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom());else if(i.getY()<=t.getY()&&i.getBottom()>=t.getBottom())l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom());var v=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));if(i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX())v=1;var s=v*l[0],u=l[1]/v;if(l[0]<u)u=l[0];else s=l[1];l[0]=-1*a[0]*(u/2+f),l[1]=-1*a[1]*(s/2+f)},r.decideDirectionsForOverlappingNodes=function(t,i,l){if(t.getCenterX()<i.getCenterX())l[0]=-1;else l[0]=1;if(t.getCenterY()<i.getCenterY())l[1]=-1;else l[1]=1},r.getIntersection2=function(t,i,l){var f=t.getCenterX(),a=t.getCenterY(),v=i.getCenterX(),s=i.getCenterY();if(t.intersects(i))return l[0]=f,l[1]=a,l[2]=v,l[3]=s,!0;var u=t.getX(),g=t.getY(),y=t.getRight(),L=t.getX(),A=t.getBottom(),d=t.getRight(),N=t.getWidthHalf(),T=t.getHeightHalf(),R=i.getX(),h=i.getY(),c=i.getRight(),p=i.getX(),D=i.getBottom(),O=i.getRight(),C=i.getWidthHalf(),M=i.getHeightHalf(),G=!1,F=!1;if(f===v){if(a>s)return l[0]=f,l[1]=g,l[2]=v,l[3]=D,!1;else if(a<s)return l[0]=f,l[1]=A,l[2]=v,l[3]=h,!1}else if(a===s){if(f>v)return l[0]=u,l[1]=a,l[2]=c,l[3]=s,!1;else if(f<v)return l[0]=y,l[1]=a,l[2]=R,l[3]=s,!1}else{var P=t.height/t.width,b=i.height/i.width,U=(s-a)/(v-f),x=void 0,S=void 0,Y=void 0,X=void 0,H=void 0,_=void 0;if(-P===U)if(f>v)l[0]=L,l[1]=A,G=!0;else l[0]=y,l[1]=g,G=!0;else if(P===U)if(f>v)l[0]=u,l[1]=g,G=!0;else l[0]=d,l[1]=A,G=!0;if(-b===U)if(v>f)l[2]=p,l[3]=D,F=!0;else l[2]=c,l[3]=h,F=!0;else if(b===U)if(v>f)l[2]=R,l[3]=h,F=!0;else l[2]=O,l[3]=D,F=!0;if(G&&F)return!1;if(f>v)if(a>s)x=this.getCardinalDirection(P,U,4),S=this.getCardinalDirection(b,U,2);else x=this.getCardinalDirection(-P,U,3),S=this.getCardinalDirection(-b,U,1);else if(a>s)x=this.getCardinalDirection(-P,U,1),S=this.getCardinalDirection(-b,U,3);else x=this.getCardinalDirection(P,U,2),S=this.getCardinalDirection(b,U,4);if(!G)switch(x){case 1:X=g,Y=f+-T/U,l[0]=Y,l[1]=X;break;case 2:Y=d,X=a+N*U,l[0]=Y,l[1]=X;break;case 3:X=A,Y=f+T/U,l[0]=Y,l[1]=X;break;case 4:Y=L,X=a+-N*U,l[0]=Y,l[1]=X;break}if(!F)switch(S){case 1:_=h,H=v+-M/U,l[2]=H,l[3]=_;break;case 2:H=O,_=s+C*U,l[2]=H,l[3]=_;break;case 3:_=D,H=v+M/U,l[2]=H,l[3]=_;break;case 4:H=p,_=s+-C*U,l[2]=H,l[3]=_;break}}return!1},r.getCardinalDirection=function(t,i,l){if(t>i)return l;else return 1+l%4},r.getIntersection=function(t,i,l,f){if(f==null)return this.getIntersection2(t,i,l);var{x:a,y:v}=t,{x:s,y:u}=i,{x:g,y}=l,{x:L,y:A}=f,d=void 0,N=void 0,T=void 0,R=void 0,h=void 0,c=void 0,p=void 0,D=void 0,O=void 0;if(T=u-v,h=a-s,p=s*v-a*u,R=A-y,c=g-L,D=L*y-g*A,O=T*c-R*h,O===0)return null;return d=(h*D-c*p)/O,N=(R*p-T*D)/O,new o(d,N)},r.angleOfVector=function(t,i,l,f){var a=void 0;if(t!==l){if(a=Math.atan((f-i)/(l-t)),l<t)a+=Math.PI;else if(f<i)a+=this.TWO_PI}else if(f<i)a=this.ONE_AND_HALF_PI;else a=this.HALF_PI;return a},r.doIntersect=function(t,i,l,f){var{x:a,y:v}=t,{x:s,y:u}=i,{x:g,y}=l,{x:L,y:A}=f,d=(s-a)*(A-y)-(L-g)*(u-v);if(d===0)return!1;else{var N=((A-y)*(L-a)+(g-L)*(A-v))/d,T=((v-u)*(L-a)+(s-a)*(A-v))/d;return 0<N&&N<1&&0<T&&T<1}},r.HALF_PI=0.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,I.exports=r},function(I,w,E){function o(){}o.sign=function(r){if(r>0)return 1;else if(r<0)return-1;else return 0},o.floor=function(r){return r<0?Math.ceil(r):Math.floor(r)},o.ceil=function(r){return r<0?Math.floor(r):Math.ceil(r)},I.exports=o},function(I,w,E){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,I.exports=o},function(I,w,E){var o=function(){function a(v,s){for(var u=0;u<s.length;u++){var g=s[u];if(g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g)g.writable=!0;Object.defineProperty(v,g.key,g)}}return function(v,s,u){if(s)a(v.prototype,s);if(u)a(v,u);return v}}();function r(a,v){if(!(a instanceof v))throw TypeError("Cannot call a class as a function")}var t=function(v){return{value:v,next:null,prev:null}},i=function(v,s,u,g){if(v!==null)v.next=s;else g.head=s;if(u!==null)u.prev=s;else g.tail=s;return s.prev=v,s.next=u,g.length++,s},l=function(v,s){var{prev:u,next:g}=v;if(u!==null)u.next=g;else s.head=g;if(g!==null)g.prev=u;else s.tail=u;return v.prev=v.next=null,s.length--,v},f=function(){function a(v){var s=this;if(r(this,a),this.length=0,this.head=null,this.tail=null,v!=null)v.forEach(function(u){return s.push(u)})}return o(a,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(s,u){return i(u.prev,t(s),u,this)}},{key:"insertAfter",value:function(s,u){return i(u,t(s),u.next,this)}},{key:"insertNodeBefore",value:function(s,u){return i(u.prev,s,u,this)}},{key:"insertNodeAfter",value:function(s,u){return i(u,s,u.next,this)}},{key:"push",value:function(s){return i(this.tail,t(s),null,this)}},{key:"unshift",value:function(s){return i(null,t(s),this.head,this)}},{key:"remove",value:function(s){return l(s,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(s){if(s<=this.length()){var u=1,g=this.head;while(u<s)g=g.next,u++;return g.value}}},{key:"set_object_at",value:function(s,u){if(s<=this.length()){var g=1,y=this.head;while(g<s)y=y.next,g++;y.value=u}}}]),a}();I.exports=f},function(I,w,E){function o(r,t,i){if(this.x=null,this.y=null,r==null&&t==null&&i==null)this.x=0,this.y=0;else if(typeof r=="number"&&typeof t=="number"&&i==null)this.x=r,this.y=t;else if(r.constructor.name=="Point"&&t==null&&i==null)i=r,this.x=i.x,this.y=i.y}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(r,t,i){if(r.constructor.name=="Point"&&t==null&&i==null)i=r,this.setLocation(i.x,i.y);else if(typeof r=="number"&&typeof t=="number"&&i==null)if(parseInt(r)==r&&parseInt(t)==t)this.move(r,t);else this.x=Math.floor(r+0.5),this.y=Math.floor(t+0.5)},o.prototype.move=function(r,t){this.x=r,this.y=t},o.prototype.translate=function(r,t){this.x+=r,this.y+=t},o.prototype.equals=function(r){if(r.constructor.name=="Point"){var t=r;return this.x==t.x&&this.y==t.y}return this==r},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},I.exports=o},function(I,w,E){function o(r,t,i,l){if(this.x=0,this.y=0,this.width=0,this.height=0,r!=null&&t!=null&&i!=null&&l!=null)this.x=r,this.y=t,this.width=i,this.height=l}o.prototype.getX=function(){return this.x},o.prototype.setX=function(r){this.x=r},o.prototype.getY=function(){return this.y},o.prototype.setY=function(r){this.y=r},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(r){this.width=r},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(r){this.height=r},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(r){if(this.getRight()<r.x)return!1;if(this.getBottom()<r.y)return!1;if(r.getRight()<this.x)return!1;if(r.getBottom()<this.y)return!1;return!0},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},I.exports=o},function(I,w,E){var o=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(){}r.lastID=0,r.createID=function(t){if(r.isPrimitive(t))return t;if(t.uniqueID!=null)return t.uniqueID;return t.uniqueID=r.getString(),r.lastID++,t.uniqueID},r.getString=function(t){if(t==null)t=r.lastID;return"Object#"+t},r.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},I.exports=r},function(I,w,E){function o(g){if(Array.isArray(g)){for(var y=0,L=Array(g.length);y<g.length;y++)L[y]=g[y];return L}else return Array.from(g)}var r=E(0),t=E(6),i=E(3),l=E(1),f=E(5),a=E(4),v=E(17),s=E(27);function u(g){if(s.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null)this.isRemoteUse=g}u.RANDOM_SEED=1,u.prototype=Object.create(s.prototype),u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var g=new t(this);return this.graphManager=g,g},u.prototype.newGraph=function(g){return new f(null,this.graphManager,g)},u.prototype.newNode=function(g){return new i(this.graphManager,g)},u.prototype.newEdge=function(g){return new l(null,null,g)},u.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var g;if(this.checkLayoutSuccess())g=!1;else g=this.layout();if(r.ANIMATE==="during")return!1;if(g){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,g},u.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var g,y=this.graphManager.getAllEdges();for(var L=0;L<y.length;L++)g=y[L];var A,d=this.graphManager.getRoot().getNodes();for(var L=0;L<d.length;L++)A=d[L];this.update(this.graphManager.getRoot())}},u.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof i){var y=g;if(y.getChild()!=null){var L=y.getChild().getNodes();for(var A=0;A<L.length;A++)update(L[A])}if(y.vGraphObject!=null){var d=y.vGraphObject;d.update(y)}}else if(g instanceof l){var N=g;if(N.vGraphObject!=null){var T=N.vGraphObject;T.update(N)}}else if(g instanceof f){var R=g;if(R.vGraphObject!=null){var h=R.vGraphObject;h.update(R)}}},u.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},u.prototype.transform=function(g){if(g==null)this.transform(new a(0,0));else{var y=new v,L=this.graphManager.getRoot().updateLeftTop();if(L!=null){y.setWorldOrgX(g.x),y.setWorldOrgY(g.y),y.setDeviceOrgX(L.x),y.setDeviceOrgY(L.y);var A=this.getAllNodes(),d;for(var N=0;N<A.length;N++)d=A[N],d.transform(y)}}},u.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var y,L,A=g.getNodes();for(var d=0;d<A.length;d++)if(y=A[d],L=y.getChild(),L==null)y.scatter();else if(L.getNodes().length==0)y.scatter();else this.positionNodesRandomly(L),y.updateBounds()}},u.prototype.getFlatForest=function(){var g=[],y=!0,L=this.graphManager.getRoot().getNodes(),A=!0;for(var d=0;d<L.length;d++)if(L[d].getChild()!=null)A=!1;if(!A)return g;var N=new Set,T=[],R=new Map,h=[];h=h.concat(L);while(h.length>0&&y){T.push(h[0]);while(T.length>0&&y){var c=T[0];T.splice(0,1),N.add(c);var p=c.getEdges();for(var d=0;d<p.length;d++){var D=p[d].getOtherEnd(c);if(R.get(c)!=D)if(!N.has(D))T.push(D),R.set(D,c);else{y=!1;break}}}if(!y)g=[];else{var O=[].concat(o(N));g.push(O);for(var d=0;d<O.length;d++){var C=O[d],M=h.indexOf(C);if(M>-1)h.splice(M,1)}N=new Set,R=new Map}}return g},u.prototype.createDummyNodesForBendpoints=function(g){var y=[],L=g.source,A=this.graphManager.calcLowestCommonAncestor(g.source,g.target);for(var d=0;d<g.bendpoints.length;d++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),A.add(N);var T=this.newEdge(null);this.graphManager.add(T,L,N),y.add(N),L=N}var T=this.newEdge(null);if(this.graphManager.add(T,L,g.target),this.edgeToDummyNodes.set(g,y),g.isInterGraph())this.graphManager.remove(g);else A.remove(g);return y},u.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(o(this.edgeToDummyNodes.keys())).concat(g);for(var y=0;y<g.length;y++){var L=g[y];if(L.bendpoints.length>0){var A=this.edgeToDummyNodes.get(L);for(var d=0;d<A.length;d++){var N=A[d],T=new a(N.getCenterX(),N.getCenterY()),R=L.bendpoints.get(d);R.x=T.x,R.y=T.y,N.getOwner().remove(N)}this.graphManager.add(L,L.source,L.target)}}},u.transform=function(g,y,L,A){if(L!=null&&A!=null){var d=y;if(g<=50){var N=y/L;d-=(y-N)/50*(50-g)}else{var T=y*A;d+=(T-y)/50*(g-50)}return d}else{var R,h;if(g<=50)R=9*y/500,h=y/10;else R=9*y/50,h=-8*y;return R*g+h}},u.findCenterOfTree=function(g){var y=[];y=y.concat(g);var L=[],A=new Map,d=!1,N=null;if(y.length==1||y.length==2)d=!0,N=y[0];for(var T=0;T<y.length;T++){var R=y[T],h=R.getNeighborsList().size;if(A.set(R,R.getNeighborsList().size),h==1)L.push(R)}var c=[];c=c.concat(L);while(!d){var p=[];p=p.concat(c),c=[];for(var T=0;T<y.length;T++){var R=y[T],D=y.indexOf(R);if(D>=0)y.splice(D,1);var O=R.getNeighborsList();O.forEach(function(G){if(L.indexOf(G)<0){var F=A.get(G),P=F-1;if(P==1)c.push(G);A.set(G,P)}})}if(L=L.concat(c),y.length==1||y.length==2)d=!0,N=y[0]}return N},u.prototype.setGraphManager=function(g){this.graphManager=g},I.exports=u},function(I,w,E){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},I.exports=o},function(I,w,E){var o=E(4);function r(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var i=0,l=this.lworldExtX;if(l!=0)i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l;return i},r.prototype.transformY=function(t){var i=0,l=this.lworldExtY;if(l!=0)i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l;return i},r.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;if(l!=0)i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l;return i},r.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;if(l!=0)i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l;return i},r.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},I.exports=r},function(I,w,E){function o(s){if(Array.isArray(s)){for(var u=0,g=Array(s.length);u<s.length;u++)g[u]=s[u];return g}else return Array.from(s)}var r=E(15),t=E(7),i=E(0),l=E(8),f=E(9);function a(){r.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}a.prototype=Object.create(r.prototype);for(var v in r)a[v]=r[v];a.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){var s,u,g,y,L,A,d=this.getGraphManager().getAllEdges();for(var N=0;N<d.length;N++)if(s=d[N],s.idealLength=this.idealEdgeLength,s.isInterGraph){if(g=s.getSource(),y=s.getTarget(),L=s.getSourceInLca().getEstimatedSize(),A=s.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)s.idealLength+=L+A-2*i.SIMPLE_NODE_SIZE;u=s.getLca().getInclusionTreeDepth(),s.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+y.getInclusionTreeDepth()-2*u)}},a.prototype.initSpringEmbedder=function(){var s=this.getAllNodes().length;if(this.incremental){if(s>t.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR));this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL}else{if(s>t.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){var s=this.getAllEdges(),u;for(var g=0;g<s.length;g++)u=s[g],this.calcSpringForce(u,u.idealLength)},a.prototype.calcRepulsionForces=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,y,L,A,d=this.getAllNodes(),N;if(this.useFRGridVariant){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&s)this.updateGrid();N=new Set;for(g=0;g<d.length;g++)L=d[g],this.calculateRepulsionForceOfANode(L,N,s,u),N.add(L)}else for(g=0;g<d.length;g++){L=d[g];for(y=g+1;y<d.length;y++){if(A=d[y],L.getOwner()!=A.getOwner())continue;this.calcRepulsionForce(L,A)}}},a.prototype.calcGravitationalForces=function(){var s,u=this.getAllNodesToApplyGravitation();for(var g=0;g<u.length;g++)s=u[g],this.calcGravitationalForce(s)},a.prototype.moveNodes=function(){var s=this.getAllNodes(),u;for(var g=0;g<s.length;g++)u=s[g],u.move()},a.prototype.calcSpringForce=function(s,u){var g=s.getSource(),y=s.getTarget(),L,A,d,N;if(this.uniformLeafNodeSizes&&g.getChild()==null&&y.getChild()==null)s.updateLengthSimple();else if(s.updateLength(),s.isOverlapingSourceAndTarget)return;if(L=s.getLength(),L==0)return;A=this.springConstant*(L-u),d=A*(s.lengthX/L),N=A*(s.lengthY/L),g.springForceX+=d,g.springForceY+=N,y.springForceX-=d,y.springForceY-=N},a.prototype.calcRepulsionForce=function(s,u){var g=s.getRect(),y=u.getRect(),L=[,,],A=[,,,,],d,N,T,R,h,c,p;if(g.intersects(y)){l.calcSeparationAmount(g,y,L,t.DEFAULT_EDGE_LENGTH/2),c=2*L[0],p=2*L[1];var D=s.noOfChildren*u.noOfChildren/(s.noOfChildren+u.noOfChildren);s.repulsionForceX-=D*c,s.repulsionForceY-=D*p,u.repulsionForceX+=D*c,u.repulsionForceY+=D*p}else{if(this.uniformLeafNodeSizes&&s.getChild()==null&&u.getChild()==null)d=y.getCenterX()-g.getCenterX(),N=y.getCenterY()-g.getCenterY();else l.getIntersection(g,y,A),d=A[2]-A[0],N=A[3]-A[1];if(Math.abs(d)<t.MIN_REPULSION_DIST)d=f.sign(d)*t.MIN_REPULSION_DIST;if(Math.abs(N)<t.MIN_REPULSION_DIST)N=f.sign(N)*t.MIN_REPULSION_DIST;T=d*d+N*N,R=Math.sqrt(T),h=this.repulsionConstant*s.noOfChildren*u.noOfChildren/T,c=h*d/R,p=h*N/R,s.repulsionForceX-=c,s.repulsionForceY-=p,u.repulsionForceX+=c,u.repulsionForceY+=p}},a.prototype.calcGravitationalForce=function(s){var u,g,y,L,A,d,N,T;if(u=s.getOwner(),g=(u.getRight()+u.getLeft())/2,y=(u.getTop()+u.getBottom())/2,L=s.getCenterX()-g,A=s.getCenterY()-y,d=Math.abs(L)+s.getWidth()/2,N=Math.abs(A)+s.getHeight()/2,s.getOwner()==this.graphManager.getRoot()){if(T=u.getEstimatedSize()*this.gravityRangeFactor,d>T||N>T)s.gravitationForceX=-this.gravityConstant*L,s.gravitationForceY=-this.gravityConstant*A}else if(T=u.getEstimatedSize()*this.compoundGravityRangeFactor,d>T||N>T)s.gravitationForceX=-this.gravityConstant*L*this.compoundGravityConstant,s.gravitationForceY=-this.gravityConstant*A*this.compoundGravityConstant},a.prototype.isConverged=function(){var s,u=!1;if(this.totalIterations>this.maxIterations/3)u=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return s=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,s||u},a.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},a.prototype.calcNoOfChildrenForAllNodes=function(){var s,u=this.graphManager.getAllNodes();for(var g=0;g<u.length;g++)s=u[g],s.noOfChildren=s.getNoOfChildren()},a.prototype.calcGrid=function(s){var u=0,g=0;u=parseInt(Math.ceil((s.getRight()-s.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((s.getBottom()-s.getTop())/this.repulsionRange));var y=Array(u);for(var L=0;L<u;L++)y[L]=Array(g);for(var L=0;L<u;L++)for(var A=0;A<g;A++)y[L][A]=[];return y},a.prototype.addNodeToGrid=function(s,u,g){var y=0,L=0,A=0,d=0;y=parseInt(Math.floor((s.getRect().x-u)/this.repulsionRange)),L=parseInt(Math.floor((s.getRect().width+s.getRect().x-u)/this.repulsionRange)),A=parseInt(Math.floor((s.getRect().y-g)/this.repulsionRange)),d=parseInt(Math.floor((s.getRect().height+s.getRect().y-g)/this.repulsionRange));for(var N=y;N<=L;N++)for(var T=A;T<=d;T++)this.grid[N][T].push(s),s.setGridCoordinates(y,L,A,d)},a.prototype.updateGrid=function(){var s,u,g=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(s=0;s<g.length;s++)u=g[s],this.addNodeToGrid(u,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(s,u,g,y){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&g||y){var L=new Set;s.surrounding=[];var A,d=this.grid;for(var N=s.startX-1;N<s.finishX+2;N++)for(var T=s.startY-1;T<s.finishY+2;T++)if(!(N<0||T<0||N>=d.length||T>=d[0].length))for(var R=0;R<d[N][T].length;R++){if(A=d[N][T][R],s.getOwner()!=A.getOwner()||s==A)continue;if(!u.has(A)&&!L.has(A)){var h=Math.abs(s.getCenterX()-A.getCenterX())-(s.getWidth()/2+A.getWidth()/2),c=Math.abs(s.getCenterY()-A.getCenterY())-(s.getHeight()/2+A.getHeight()/2);if(h<=this.repulsionRange&&c<=this.repulsionRange)L.add(A)}}s.surrounding=[].concat(o(L))}for(N=0;N<s.surrounding.length;N++)this.calcRepulsionForce(s,s.surrounding[N])},a.prototype.calcRepulsionRange=function(){return 0},I.exports=a},function(I,w,E){var o=E(1),r=E(7);function t(l,f,a){o.call(this,l,f,a),this.idealLength=r.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];I.exports=t},function(I,w,E){var o=E(3);function r(i,l,f,a){o.call(this,i,l,f,a),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}r.prototype=Object.create(o.prototype);for(var t in o)r[t]=o[t];r.prototype.setGridCoordinates=function(i,l,f,a){this.startX=i,this.finishX=l,this.startY=f,this.finishY=a},I.exports=r},function(I,w,E){function o(r,t){if(this.width=0,this.height=0,r!==null&&t!==null)this.height=t,this.width=r}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(r){this.width=r},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(r){this.height=r},I.exports=o},function(I,w,E){var o=E(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(t,i){var l=o.createID(t);if(!this.contains(l))this.map[l]=i,this.keys.push(t)},r.prototype.contains=function(t){var i=o.createID(t);return this.map[t]!=null},r.prototype.get=function(t){var i=o.createID(t);return this.map[i]},r.prototype.keySet=function(){return this.keys},I.exports=r},function(I,w,E){var o=E(14);function r(){this.set={}}r.prototype.add=function(t){var i=o.createID(t);if(!this.contains(i))this.set[i]=t},r.prototype.remove=function(t){delete this.set[o.createID(t)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(t){return this.set[o.createID(t)]==t},r.prototype.isEmpty=function(){return this.size()===0},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(t){var i=Object.keys(this.set),l=i.length;for(var f=0;f<l;f++)t.push(this.set[i[f]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(t){var i=t.length;for(var l=0;l<i;l++){var f=t[l];this.add(f)}},I.exports=r},function(I,w,E){var o=function(){function l(f,a){for(var v=0;v<a.length;v++){var s=a[v];if(s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s)s.writable=!0;Object.defineProperty(f,s.key,s)}}return function(f,a,v){if(a)l(f.prototype,a);if(v)l(f,v);return f}}();function r(l,f){if(!(l instanceof f))throw TypeError("Cannot call a class as a function")}var t=E(11),i=function(){function l(f,a){if(r(this,l),a!==null||a!==void 0)this.compareFunction=this._defaultCompareFunction;var v=void 0;if(f instanceof t)v=f.size();else v=f.length;this._quicksort(f,0,v-1)}return o(l,[{key:"_quicksort",value:function(a,v,s){if(v<s){var u=this._partition(a,v,s);this._quicksort(a,v,u),this._quicksort(a,u+1,s)}}},{key:"_partition",value:function(a,v,s){var u=this._get(a,v),g=v,y=s;while(!0){while(this.compareFunction(u,this._get(a,y)))y--;while(this.compareFunction(this._get(a,g),u))g++;if(g<y)this._swap(a,g,y),g++,y--;else return y}}},{key:"_get",value:function(a,v){if(a instanceof t)return a.get_object_at(v);else return a[v]}},{key:"_set",value:function(a,v,s){if(a instanceof t)a.set_object_at(v,s);else a[v]=s}},{key:"_swap",value:function(a,v,s){var u=this._get(a,v);this._set(a,v,this._get(a,s)),this._set(a,s,u)}},{key:"_defaultCompareFunction",value:function(a,v){return v>a}}]),l}();I.exports=i},function(I,w,E){var o=function(){function i(l,f){for(var a=0;a<f.length;a++){var v=f[a];if(v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v)v.writable=!0;Object.defineProperty(l,v.key,v)}}return function(l,f,a){if(f)i(l.prototype,f);if(a)i(l,a);return l}}();function r(i,l){if(!(i instanceof l))throw TypeError("Cannot call a class as a function")}var t=function(){function i(l,f){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;r(this,i),this.sequence1=l,this.sequence2=f,this.match_score=a,this.mismatch_penalty=v,this.gap_penalty=s,this.iMax=l.length+1,this.jMax=f.length+1,this.grid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.grid[u]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[u][g]=0}this.tracebackGrid=Array(this.iMax);for(var y=0;y<this.iMax;y++){this.tracebackGrid[y]=Array(this.jMax);for(var L=0;L<this.jMax;L++)this.tracebackGrid[y][L]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var a=1;a<this.iMax;a++)this.grid[a][0]=this.grid[a-1][0]+this.gap_penalty,this.tracebackGrid[a][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var s=1;s<this.jMax;s++){var u=void 0;if(this.sequence1[v-1]===this.sequence2[s-1])u=this.grid[v-1][s-1]+this.match_score;else u=this.grid[v-1][s-1]+this.mismatch_penalty;var g=this.grid[v-1][s]+this.gap_penalty,y=this.grid[v][s-1]+this.gap_penalty,L=[u,g,y],A=this.arrayAllMaxIndexes(L);this.grid[v][s]=L[A[0]],this.tracebackGrid[v][s]=[A.includes(0),A.includes(1),A.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(f[0]){var a=f[0],v=this.tracebackGrid[a.pos[0]][a.pos[1]];if(v[0])f.push({pos:[a.pos[0]-1,a.pos[1]-1],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2});if(v[1])f.push({pos:[a.pos[0]-1,a.pos[1]],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:"-"+a.seq2});if(v[2])f.push({pos:[a.pos[0],a.pos[1]-1],seq1:"-"+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2});if(a.pos[0]===0&&a.pos[1]===0)this.alignments.push({sequence1:a.seq1,sequence2:a.seq2});f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,a){var v=[],s=-1;while((s=f.indexOf(a,s+1))!==-1)v.push(s);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),i}();I.exports=t},function(I,w,E){var o=function(){return};o.FDLayout=E(18),o.FDLayoutConstants=E(7),o.FDLayoutEdge=E(19),o.FDLayoutNode=E(20),o.DimensionD=E(21),o.HashMap=E(22),o.HashSet=E(23),o.IGeometry=E(8),o.IMath=E(9),o.Integer=E(10),o.Point=E(12),o.PointD=E(4),o.RandomSeed=E(16),o.RectangleD=E(13),o.Transform=E(17),o.UniqueIDGeneretor=E(14),o.Quicksort=E(24),o.LinkedList=E(11),o.LGraphObject=E(2),o.LGraph=E(5),o.LEdge=E(1),o.LGraphManager=E(6),o.LNode=E(3),o.Layout=E(15),o.LayoutConstants=E(0),o.NeedlemanWunsch=E(25),I.exports=o},function(I,w,E){function o(){this.listeners=[]}var r=o.prototype;r.addListener=function(t,i){this.listeners.push({event:t,callback:i})},r.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var f=this.listeners[l];if(f.event===t&&f.callback===i)this.listeners.splice(l,1)}},r.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var f=this.listeners[l];if(t===f.event)f.callback(i)}},I.exports=o}])})});var J=Ke(function(Q,z){(function(w,E){if(typeof Q==="object"&&typeof z==="object")z.exports=E(q());else if(typeof define==="function"&&define.amd)define(["layout-base"],E);else if(typeof Q==="object")Q.coseBase=E(q());else w.coseBase=E(w.layoutBase)})(Q,function(I){return function(w){var E={};function o(r){if(E[r])return E[r].exports;var t=E[r]={i:r,l:!1,exports:{}};return w[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=w,o.c=E,o.i=function(r){return r},o.d=function(r,t,i){if(!o.o(r,t))Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(t,"a",t),t},o.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},o.p="",o(o.s=7)}([function(w,E){w.exports=I},function(w,E,o){var r=o(0).FDLayoutConstants;function t(){}for(var i in r)t[i]=r[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,w.exports=t},function(w,E,o){var r=o(0).FDLayoutEdge;function t(l,f,a){r.call(this,l,f,a)}t.prototype=Object.create(r.prototype);for(var i in r)t[i]=r[i];w.exports=t},function(w,E,o){var r=o(0).LGraph;function t(l,f,a){r.call(this,l,f,a)}t.prototype=Object.create(r.prototype);for(var i in r)t[i]=r[i];w.exports=t},function(w,E,o){var r=o(0).LGraphManager;function t(l){r.call(this,l)}t.prototype=Object.create(r.prototype);for(var i in r)t[i]=r[i];w.exports=t},function(w,E,o){var r=o(0).FDLayoutNode,t=o(0).IMath;function i(f,a,v,s){r.call(this,f,a,v,s)}i.prototype=Object.create(r.prototype);for(var l in r)i[l]=r[l];i.prototype.move=function(){var f=this.graphManager.getLayout();if(this.displacementX=f.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=f.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>f.coolingFactor*f.maxNodeDisplacement)this.displacementX=f.coolingFactor*f.maxNodeDisplacement*t.sign(this.displacementX);if(Math.abs(this.displacementY)>f.coolingFactor*f.maxNodeDisplacement)this.displacementY=f.coolingFactor*f.maxNodeDisplacement*t.sign(this.displacementY);if(this.child==null)this.moveBy(this.displacementX,this.displacementY);else if(this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY);else this.propogateDisplacementToChildren(this.displacementX,this.displacementY);f.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(f,a){var v=this.getChild().getNodes(),s;for(var u=0;u<v.length;u++)if(s=v[u],s.getChild()==null)s.moveBy(f,a),s.displacementX+=f,s.displacementY+=a;else s.propogateDisplacementToChildren(f,a)},i.prototype.setPred1=function(f){this.pred1=f},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(f){this.next=f},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(f){this.processed=f},i.prototype.isProcessed=function(){return processed},w.exports=i},function(w,E,o){var r=o(0).FDLayout,t=o(4),i=o(3),l=o(5),f=o(2),a=o(1),v=o(0).FDLayoutConstants,s=o(0).LayoutConstants,u=o(0).Point,g=o(0).PointD,y=o(0).Layout,L=o(0).Integer,A=o(0).IGeometry,d=o(0).LGraph,N=o(0).Transform;function T(){r.call(this),this.toBeTiled={}}T.prototype=Object.create(r.prototype);for(var R in r)T[R]=r[R];T.prototype.newGraphManager=function(){var h=new t(this);return this.graphManager=h,h},T.prototype.newGraph=function(h){return new i(null,this.graphManager,h)},T.prototype.newNode=function(h){return new l(this.graphManager,h)},T.prototype.newEdge=function(h){return new f(null,null,h)},T.prototype.initParameters=function(){if(r.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(a.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=v.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=v.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=v.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=v.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=v.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=v.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/v.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=v.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1}},T.prototype.layout=function(){var h=s.DEFAULT_CREATE_BENDS_AS_NEEDED;if(h)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var h=this.getFlatForest();if(h.length>0)this.positionNodesRadially(h);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(D){return c.has(D)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}else if(a.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(C){return c.has(C)});this.graphManager.setAllNodesToApplyGravitation(p)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(this.layoutQuality==1)this.coolingAdjuster=this.coolingCycle/3;this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(O){return h.has(O)});this.graphManager.setAllNodesToApplyGravitation(c),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,D=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,D),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){var h=this.graphManager.getAllNodes(),c={};for(var p=0;p<h.length;p++){var D=h[p].rect,O=h[p].id;c[O]={id:O,x:D.getCenterX(),y:D.getCenterY(),w:D.width,h:D.height}}return c},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var h=!1;if(v.ANIMATE==="during")this.emit("layoutstarted");else{while(!h)h=this.tick();this.graphManager.updateBounds()}},T.prototype.calculateNodesToApplyGravitationTo=function(){var h=[],c,p=this.graphManager.getGraphs(),D=p.length,O;for(O=0;O<D;O++)if(c=p[O],c.updateConnected(),!c.isConnected)h=h.concat(c.getNodes());return h},T.prototype.createBendpoints=function(){var h=[];h=h.concat(this.graphManager.getAllEdges());var c=new Set,p;for(p=0;p<h.length;p++){var D=h[p];if(!c.has(D)){var O=D.getSource(),C=D.getTarget();if(O==C)D.getBendpoints().push(new g),D.getBendpoints().push(new g),this.createDummyNodesForBendpoints(D),c.add(D);else{var M=[];if(M=M.concat(O.getEdgeListToNode(C)),M=M.concat(C.getEdgeListToNode(O)),!c.has(M[0])){if(M.length>1){var G;for(G=0;G<M.length;G++){var F=M[G];F.getBendpoints().push(new g),this.createDummyNodesForBendpoints(F)}}M.forEach(function(P){c.add(P)})}}}if(c.size==h.length)break}},T.prototype.positionNodesRadially=function(h){var c=new u(0,0),p=Math.ceil(Math.sqrt(h.length)),D=0,O=0,C=0,M=new g(0,0);for(var G=0;G<h.length;G++){if(G%p==0){if(C=0,O=D,G!=0)O+=a.DEFAULT_COMPONENT_SEPERATION;D=0}var F=h[G],P=y.findCenterOfTree(F);if(c.x=C,c.y=O,M=T.radialLayout(F,P,c),M.y>D)D=Math.floor(M.y);C=Math.floor(M.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(s.WORLD_CENTER_X-M.x/2,s.WORLD_CENTER_Y-M.y/2))},T.radialLayout=function(h,c,p){var D=Math.max(this.maxDiagonalInTree(h),a.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(c,null,0,359,0,D);var O=d.calculateBounds(h),C=new N;C.setDeviceOrgX(O.getMinX()),C.setDeviceOrgY(O.getMinY()),C.setWorldOrgX(p.x),C.setWorldOrgY(p.y);for(var M=0;M<h.length;M++){var G=h[M];G.transform(C)}var F=new g(O.getMaxX(),O.getMaxY());return C.inverseTransformPoint(F)},T.branchRadialLayout=function(h,c,p,D,O,C){var M=(D-p+1)/2;if(M<0)M+=180;var G=(M+p)%360,F=G*A.TWO_PI/360,P=Math.cos(F),b=O*Math.cos(F),U=O*Math.sin(F);h.setCenter(b,U);var x=[];x=x.concat(h.getEdges());var S=x.length;if(c!=null)S--;var Y=0,X=x.length,H,_=h.getEdgesBetween(c);while(_.length>1){var W=_[0];_.splice(0,1);var k=x.indexOf(W);if(k>=0)x.splice(k,1);X--,S--}if(c!=null)H=(x.indexOf(_[0])+1)%X;else H=0;var B=Math.abs(D-p)/S;for(var V=H;Y!=S;V=++V%X){var et=x[V].getOtherEnd(h);if(et==c)continue;var rt=(p+Y*B)%360,ft=(rt+B)%360;T.branchRadialLayout(et,h,rt,ft,O+C,C),Y++}},T.maxDiagonalInTree=function(h){var c=L.MIN_VALUE;for(var p=0;p<h.length;p++){var D=h[p],O=D.getDiagonal();if(O>c)c=O}return c},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var h=this,c={};this.memberGroups={},this.idToDummyNode={};var p=[],D=this.graphManager.getAllNodes();for(var O=0;O<D.length;O++){var C=D[O],M=C.getParent();if(this.getNodeDegreeWithChildren(C)===0&&(M.id==null||!this.getToBeTiled(M)))p.push(C)}for(var O=0;O<p.length;O++){var C=p[O],G=C.getParent().id;if(typeof c[G]>"u")c[G]=[];c[G]=c[G].concat(C)}Object.keys(c).forEach(function(F){if(c[F].length>1){var P="DummyCompound_"+F;h.memberGroups[P]=c[F];var b=c[F][0].getParent(),U=new l(h.graphManager);U.id=P,U.paddingLeft=b.paddingLeft||0,U.paddingRight=b.paddingRight||0,U.paddingBottom=b.paddingBottom||0,U.paddingTop=b.paddingTop||0,h.idToDummyNode[P]=U;var x=h.getGraphManager().add(h.newGraph(),U),S=b.getChild();S.add(U);for(var Y=0;Y<c[F].length;Y++){var X=c[F][Y];S.remove(X),x.add(X)}}})},T.prototype.clearCompounds=function(){var h={},c={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)c[this.compoundOrder[p].id]=this.compoundOrder[p],h[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(h,c)},T.prototype.clearZeroDegreeMembers=function(){var h=this,c=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var D=h.idToDummyNode[p];c[p]=h.tileNodes(h.memberGroups[p],D.paddingLeft+D.paddingRight),D.rect.width=c[p].width,D.rect.height=c[p].height})},T.prototype.repopulateCompounds=function(){for(var h=this.compoundOrder.length-1;h>=0;h--){var c=this.compoundOrder[h],{id:p,paddingLeft:D,paddingTop:O}=c;this.adjustLocations(this.tiledMemberPack[p],c.rect.x,c.rect.y,D,O)}},T.prototype.repopulateZeroDegreeMembers=function(){var h=this,c=this.tiledZeroDegreePack;Object.keys(c).forEach(function(p){var D=h.idToDummyNode[p],{paddingLeft:O,paddingTop:C}=D;h.adjustLocations(c[p],D.rect.x,D.rect.y,O,C)})},T.prototype.getToBeTiled=function(h){var c=h.id;if(this.toBeTiled[c]!=null)return this.toBeTiled[c];var p=h.getChild();if(p==null)return this.toBeTiled[c]=!1,!1;var D=p.getNodes();for(var O=0;O<D.length;O++){var C=D[O];if(this.getNodeDegree(C)>0)return this.toBeTiled[c]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[c]=!1,!1}return this.toBeTiled[c]=!0,!0},T.prototype.getNodeDegree=function(h){var c=h.id,p=h.getEdges(),D=0;for(var O=0;O<p.length;O++){var C=p[O];if(C.getSource().id!==C.getTarget().id)D=D+1}return D},T.prototype.getNodeDegreeWithChildren=function(h){var c=this.getNodeDegree(h);if(h.getChild()==null)return c;var p=h.getChild().getNodes();for(var D=0;D<p.length;D++){var O=p[D];c+=this.getNodeDegreeWithChildren(O)}return c},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},T.prototype.fillCompexOrderByDFS=function(h){for(var c=0;c<h.length;c++){var p=h[c];if(p.getChild()!=null)this.fillCompexOrderByDFS(p.getChild().getNodes());if(this.getToBeTiled(p))this.compoundOrder.push(p)}},T.prototype.adjustLocations=function(h,c,p,D,O){c+=D,p+=O;var C=c;for(var M=0;M<h.rows.length;M++){var G=h.rows[M];c=C;var F=0;for(var P=0;P<G.length;P++){var b=G[P];if(b.rect.x=c,b.rect.y=p,c+=b.rect.width+h.horizontalPadding,b.rect.height>F)F=b.rect.height}p+=F+h.verticalPadding}},T.prototype.tileCompoundMembers=function(h,c){var p=this;this.tiledMemberPack=[],Object.keys(h).forEach(function(D){var O=c[D];p.tiledMemberPack[D]=p.tileNodes(h[D],O.paddingLeft+O.paddingRight),O.rect.width=p.tiledMemberPack[D].width,O.rect.height=p.tiledMemberPack[D].height})},T.prototype.tileNodes=function(h,c){var{TILING_PADDING_VERTICAL:p,TILING_PADDING_HORIZONTAL:D}=a,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:c,verticalPadding:p,horizontalPadding:D};h.sort(function(G,F){if(G.rect.width*G.rect.height>F.rect.width*F.rect.height)return-1;if(G.rect.width*G.rect.height<F.rect.width*F.rect.height)return 1;return 0});for(var C=0;C<h.length;C++){var M=h[C];if(O.rows.length==0)this.insertNodeToRow(O,M,0,c);else if(this.canAddHorizontal(O,M.rect.width,M.rect.height))this.insertNodeToRow(O,M,this.getShortestRowIndex(O),c);else this.insertNodeToRow(O,M,O.rows.length,c);this.shiftToLastRow(O)}return O},T.prototype.insertNodeToRow=function(h,c,p,D){var O=D;if(p==h.rows.length){var C=[];h.rows.push(C),h.rowWidth.push(O),h.rowHeight.push(0)}var M=h.rowWidth[p]+c.rect.width;if(h.rows[p].length>0)M+=h.horizontalPadding;if(h.rowWidth[p]=M,h.width<M)h.width=M;var G=c.rect.height;if(p>0)G+=h.verticalPadding;var F=0;if(G>h.rowHeight[p])F=h.rowHeight[p],h.rowHeight[p]=G,F=h.rowHeight[p]-F;h.height+=F,h.rows[p].push(c)},T.prototype.getShortestRowIndex=function(h){var c=-1,p=Number.MAX_VALUE;for(var D=0;D<h.rows.length;D++)if(h.rowWidth[D]<p)c=D,p=h.rowWidth[D];return c},T.prototype.getLongestRowIndex=function(h){var c=-1,p=Number.MIN_VALUE;for(var D=0;D<h.rows.length;D++)if(h.rowWidth[D]>p)c=D,p=h.rowWidth[D];return c},T.prototype.canAddHorizontal=function(h,c,p){var D=this.getShortestRowIndex(h);if(D<0)return!0;var O=h.rowWidth[D];if(O+h.horizontalPadding+c<=h.width)return!0;var C=0;if(h.rowHeight[D]<p){if(D>0)C=p+h.verticalPadding-h.rowHeight[D]}var M;if(h.width-O>=c+h.horizontalPadding)M=(h.height+C)/(O+c+h.horizontalPadding);else M=(h.height+C)/h.width;C=p+h.verticalPadding;var G;if(h.width<c)G=(h.height+C)/c;else G=(h.height+C)/h.width;if(G<1)G=1/G;if(M<1)M=1/M;return M<G},T.prototype.shiftToLastRow=function(h){var c=this.getLongestRowIndex(h),p=h.rowWidth.length-1,D=h.rows[c],O=D[D.length-1],C=O.width+h.horizontalPadding;if(h.width-h.rowWidth[p]>C&&c!=p){D.splice(-1,1),h.rows[p].push(O),h.rowWidth[c]=h.rowWidth[c]-C,h.rowWidth[p]=h.rowWidth[p]+C,h.width=h.rowWidth[instance.getLongestRowIndex(h)];var M=Number.MIN_VALUE;for(var G=0;G<D.length;G++)if(D[G].height>M)M=D[G].height;if(c>0)M+=h.verticalPadding;var F=h.rowHeight[c]+h.rowHeight[p];if(h.rowHeight[c]=M,h.rowHeight[p]<O.height+h.verticalPadding)h.rowHeight[p]=O.height+h.verticalPadding;var P=h.rowHeight[c]+h.rowHeight[p];h.height+=P-F,this.shiftToLastRow(h)}},T.prototype.tilingPreLayout=function(){if(a.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},T.prototype.tilingPostLayout=function(){if(a.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},T.prototype.reduceTrees=function(){var h=[],c=!0,p;while(c){var D=this.graphManager.getAllNodes(),O=[];c=!1;for(var C=0;C<D.length;C++)if(p=D[C],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null)O.push([p,p.getEdges()[0],p.getOwner()]),c=!0;if(c==!0){var M=[];for(var G=0;G<O.length;G++)if(O[G][0].getEdges().length==1)M.push(O[G]),O[G][0].getOwner().remove(O[G][0]);h.push(M),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=h},T.prototype.growTree=function(h){var c=h.length,p=h[c-1],D;for(var O=0;O<p.length;O++)D=p[O],this.findPlaceforPrunedNode(D),D[2].add(D[0]),D[2].add(D[1],D[1].source,D[1].target);h.splice(h.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},T.prototype.findPlaceforPrunedNode=function(h){var c,p,D=h[0];if(D==h[1].source)p=h[1].target;else p=h[1].source;var O=p.startX,C=p.finishX,M=p.startY,G=p.finishY,F=0,P=0,b=0,U=0,x=[F,b,P,U];if(M>0)for(var S=O;S<=C;S++)x[0]+=this.grid[S][M-1].length+this.grid[S][M].length-1;if(C<this.grid.length-1)for(var S=M;S<=G;S++)x[1]+=this.grid[C+1][S].length+this.grid[C][S].length-1;if(G<this.grid[0].length-1)for(var S=O;S<=C;S++)x[2]+=this.grid[S][G+1].length+this.grid[S][G].length-1;if(O>0)for(var S=M;S<=G;S++)x[3]+=this.grid[O-1][S].length+this.grid[O][S].length-1;var Y=L.MAX_VALUE,X,H;for(var _=0;_<x.length;_++)if(x[_]<Y)Y=x[_],X=1,H=_;else if(x[_]==Y)X++;if(X==3&&Y==0){if(x[0]==0&&x[1]==0&&x[2]==0)c=1;else if(x[0]==0&&x[1]==0&&x[3]==0)c=0;else if(x[0]==0&&x[2]==0&&x[3]==0)c=3;else if(x[1]==0&&x[2]==0&&x[3]==0)c=2}else if(X==2&&Y==0){var W=Math.floor(Math.random()*2);if(x[0]==0&&x[1]==0)if(W==0)c=0;else c=1;else if(x[0]==0&&x[2]==0)if(W==0)c=0;else c=2;else if(x[0]==0&&x[3]==0)if(W==0)c=0;else c=3;else if(x[1]==0&&x[2]==0)if(W==0)c=1;else c=2;else if(x[1]==0&&x[3]==0)if(W==0)c=1;else c=3;else if(W==0)c=2;else c=3}else if(X==4&&Y==0){var W=Math.floor(Math.random()*4);c=W}else c=H;if(c==0)D.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-v.DEFAULT_EDGE_LENGTH-D.getHeight()/2);else if(c==1)D.setCenter(p.getCenterX()+p.getWidth()/2+v.DEFAULT_EDGE_LENGTH+D.getWidth()/2,p.getCenterY());else if(c==2)D.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+v.DEFAULT_EDGE_LENGTH+D.getHeight()/2);else D.setCenter(p.getCenterX()-p.getWidth()/2-v.DEFAULT_EDGE_LENGTH-D.getWidth()/2,p.getCenterY())},w.exports=T},function(w,E,o){var r={};r.layoutBase=o(0),r.CoSEConstants=o(1),r.CoSEEdge=o(2),r.CoSEGraph=o(3),r.CoSEGraphManager=o(4),r.CoSELayout=o(6),r.CoSENode=o(5),w.exports=r}])})});var it=Ke(function(j,tt){(function(w,E){if(typeof j==="object"&&typeof tt==="object")tt.exports=E(J());else if(typeof define==="function"&&define.amd)define(["cose-base"],E);else if(typeof j==="object")j.cytoscapeCoseBilkent=E(J());else w.cytoscapeCoseBilkent=E(w.coseBase)})(j,function(I){return function(w){var E={};function o(r){if(E[r])return E[r].exports;var t=E[r]={i:r,l:!1,exports:{}};return w[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=w,o.c=E,o.i=function(r){return r},o.d=function(r,t,i){if(!o.o(r,t))Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(t,"a",t),t},o.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},o.p="",o(o.s=1)}([function(w,E){w.exports=I},function(w,E,o){var r=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,f=o(0).CoSENode,a=o(0).layoutBase.PointD,v=o(0).layoutBase.DimensionD,s={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:0.45,nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.5};function u(A,d){var N={};for(var T in A)N[T]=A[T];for(var T in d)N[T]=d[T];return N}function g(A){this.options=u(s,A),y(this.options)}var y=function(d){if(d.nodeRepulsion!=null)i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=d.nodeRepulsion;if(d.idealEdgeLength!=null)i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=d.idealEdgeLength;if(d.edgeElasticity!=null)i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=d.edgeElasticity;if(d.nestingFactor!=null)i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor;if(d.gravity!=null)i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=d.gravity;if(d.numIter!=null)i.MAX_ITERATIONS=t.MAX_ITERATIONS=d.numIter;if(d.gravityRange!=null)i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange;if(d.gravityCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound;if(d.gravityRangeCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound;if(d.initialEnergyOnIncremental!=null)i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental;if(d.quality=="draft")r.QUALITY=0;else if(d.quality=="proof")r.QUALITY=2;else r.QUALITY=1;i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!d.randomize,i.ANIMATE=t.ANIMATE=r.ANIMATE=d.animate,i.TILE=d.tile,i.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical==="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal==="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal};g.prototype.run=function(){var A,d,N=this.options,T=this.idToLNode={},R=this.layout=new l,h=this;h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var c=R.newGraphManager();this.gm=c;var p=this.options.eles.nodes(),D=this.options.eles.edges();this.root=c.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(p),R);for(var O=0;O<D.length;O++){var C=D[O],M=this.idToLNode[C.data("source")],G=this.idToLNode[C.data("target")];if(M!==G&&M.getEdgesBetween(G).length==0){var F=c.add(R.newEdge(),M,G);F.id=C.id()}}var P=function(x,S){if(typeof x==="number")x=S;var Y=x.data("id"),X=h.idToLNode[Y];return{x:X.getRect().getCenterX(),y:X.getRect().getCenterY()}},b=function U(){var x=function(){if(N.fit)N.cy.fit(N.eles,N.padding);if(!A)A=!0,h.cy.one("layoutready",N.ready),h.cy.trigger({type:"layoutready",layout:h})},S=h.options.refresh,Y;for(var X=0;X<S&&!Y;X++)Y=h.stopped||h.layout.tick();if(Y){if(R.checkLayoutSuccess()&&!R.isSubLayout)R.doPostLayout();if(R.tilingPostLayout)R.tilingPostLayout();if(R.isLayoutFinished=!0,h.options.eles.nodes().positions(P),x(),h.cy.one("layoutstop",h.options.stop),h.cy.trigger({type:"layoutstop",layout:h}),d)cancelAnimationFrame(d);A=!1;return}var H=h.layout.getPositionsData();N.eles.nodes().positions(function(_,W){if(typeof _==="number")_=W;if(!_.isParent()){var k=_.id(),B=H[k],V=_;while(B==null)if(B=H[V.data("parent")]||H["DummyCompound_"+V.data("parent")],H[k]=B,V=V.parent()[0],V==null)break;if(B!=null)return{x:B.x,y:B.y};else return{x:_.position("x"),y:_.position("y")}}}),x(),d=requestAnimationFrame(U)};if(R.addListener("layoutstarted",function(){if(h.options.animate==="during")d=requestAnimationFrame(b)}),R.runLayout(),this.options.animate!=="during")h.options.eles.nodes().not(":parent").layoutPositions(h,h.options,P),A=!1;return this},g.prototype.getTopMostNodes=function(A){var d={};for(var N=0;N<A.length;N++)d[A[N].id()]=!0;var T=A.filter(function(R,h){if(typeof R==="number")R=h;var c=R.parent()[0];while(c!=null){if(d[c.id()])return!1;c=c.parent()[0]}return!0});return T},g.prototype.processChildrenList=function(A,d,N){var T=d.length;for(var R=0;R<T;R++){var h=d[R],c=h.children(),p,D=h.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(h.outerWidth()!=null&&h.outerHeight()!=null)p=A.add(new f(N.graphManager,new a(h.position("x")-D.w/2,h.position("y")-D.h/2),new v(parseFloat(D.w),parseFloat(D.h))));else p=A.add(new f(this.graphManager));if(p.id=h.data("id"),p.paddingLeft=parseInt(h.css("padding")),p.paddingTop=parseInt(h.css("padding")),p.paddingRight=parseInt(h.css("padding")),p.paddingBottom=parseInt(h.css("padding")),this.options.nodeDimensionsIncludeLabels){if(h.isParent()){var O=h.boundingBox({includeLabels:!0,includeNodes:!1}).w,C=h.boundingBox({includeLabels:!0,includeNodes:!1}).h,M=h.css("text-halign");p.labelWidth=O,p.labelHeight=C,p.labelPos=M}}if(this.idToLNode[h.data("id")]=p,isNaN(p.rect.x))p.rect.x=0;if(isNaN(p.rect.y))p.rect.y=0;if(c!=null&&c.length>0){var G=N.getGraphManager().add(N.newGraph(),p);this.processChildrenList(G,c,N)}}},g.prototype.stop=function(){return this.stopped=!0,this};var L=function(d){d("layout","cose-bilkent",g)};if(typeof cytoscape<"u")L(cytoscape);w.exports=L}])})});var nt=Fe(it(),1);wt.use(nt.default);function st(I,w){I.forEach((E)=>{let o={id:E.id,labelText:E.label,height:E.height,width:E.width,padding:E.padding??0};Object.keys(E).forEach((r)=>{if(!["id","label","height","width","padding","x","y"].includes(r))o[r]=E[r]}),w.add({group:"nodes",data:o,position:{x:E.x??0,y:E.y??0}})})}e(st,"addNodes");function ot(I,w){I.forEach((E)=>{let o={id:E.id,source:E.start,target:E.end};Object.keys(E).forEach((r)=>{if(!["id","start","end"].includes(r))o[r]=E[r]}),w.add({group:"edges",data:o})})}e(ot,"addEdges");function at(I){return new Promise((w)=>{let E=m("body").append("div").attr("id","cy").attr("style","display:none"),o=wt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});E.remove(),st(I.nodes,o),ot(I.edges,o),o.nodes().forEach(function(t){t.layoutDimensions=()=>{let i=t.data();return{w:i.width,h:i.height}}});let r={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};o.layout(r).run(),o.ready((t)=>{n.info("Cytoscape ready",t),w(o)})})}e(at,"createCytoscapeInstance");function ht(I){return I.nodes().map((w)=>{let E=w.data(),o=w.position(),r={id:E.id,x:o.x,y:o.y};return Object.keys(E).forEach((t)=>{if(t!=="id")r[t]=E[t]}),r})}e(ht,"extractPositionedNodes");function lt(I){return I.edges().map((w)=>{let E=w.data(),o=w._private.rscratch,r={id:E.id,source:E.source,target:E.target,startX:o.startX,startY:o.startY,midX:o.midX,midY:o.midY,endX:o.endX,endY:o.endY};return Object.keys(E).forEach((t)=>{if(!["id","source","target"].includes(t))r[t]=E[t]}),r})}e(lt,"extractPositionedEdges");async function ut(I,w){n.debug("Starting cose-bilkent layout algorithm");try{gt(I);let E=await at(I),o=ht(E),r=lt(E);return n.debug(`Layout completed: ${o.length} nodes, ${r.length} edges`),{nodes:o,edges:r}}catch(E){throw n.error("Error in cose-bilkent layout algorithm:",E),E}}e(ut,"executeCoseBilkentLayout");function gt(I){if(!I)throw Error("Layout data is required");if(!I.config)throw Error("Configuration is required in layout data");if(!I.rootNode)throw Error("Root node is required");if(!I.nodes||!Array.isArray(I.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(I.edges))throw Error("Edges array is required in layout data");return!0}e(gt,"validateLayoutData");var ct=e(async(I,w,{insertCluster:E,insertEdge:o,insertEdgeLabel:r,insertMarkers:t,insertNode:i,log:l,positionEdgeLabel:f},{algorithm:a})=>{let v={},s={},u=w.select("g");t(u,I.markers,I.type,I.diagramId);let g=u.insert("g").attr("class","subgraphs"),y=u.insert("g").attr("class","edgePaths"),L=u.insert("g").attr("class","edgeLabels"),A=u.insert("g").attr("class","nodes");l.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(I.nodes.map(async(T)=>{if(T.isGroup){let R={...T};s[T.id]=R,v[T.id]=R,await E(g,T)}else{let R={...T};v[T.id]=R;let h=await i(A,T,{config:I.config,dir:I.direction||"TB"}),c=h.node().getBBox();R.width=c.width,R.height=c.height,R.domId=h,l.debug(`Node ${T.id} dimensions: ${c.width}x${c.height}`)}})),l.debug("Running cose-bilkent layout algorithm");let d={...I,nodes:I.nodes.map((T)=>{let R=v[T.id];return{...T,width:R.width,height:R.height}})},N=await ut(d,I.config);l.debug("Positioning nodes based on layout results"),N.nodes.forEach((T)=>{let R=v[T.id];if(R?.domId)R.domId.attr("transform",`translate(${T.x}, ${T.y})`),R.x=T.x,R.y=T.y,l.debug(`Positioned node ${R.id} at center (${T.x}, ${T.y})`)}),N.edges.forEach((T)=>{let R=I.edges.find((h)=>h.id===T.id);if(R)R.points=[{x:T.startX,y:T.startY},{x:T.midX,y:T.midY},{x:T.endX,y:T.endY}]}),l.debug("Inserting and positioning edges"),await Promise.all(I.edges.map(async(T)=>{let R=await r(L,T),h=v[T.start??""],c=v[T.end??""];if(h&&c){let p=N.edges.find((D)=>D.id===T.id);if(p){l.debug("APA01 positionedEdge",p);let D={...T},O=o(y,D,s,I.type,h,c,I.diagramId);f(D,O)}else{let D={...T,points:[{x:h.x||0,y:h.y||0},{x:c.x||0,y:c.y||0}]},O=o(y,D,s,I.type,h,c,I.diagramId);f(D,O)}}})),l.debug("Cose-bilkent rendering completed")},"render"),Et=ct;export{Et as render};
|
|
1
|
+
import{e,n,m}from"./index.a1bxkgd3.js";import{wt}from"./index.fv9af3wd.js";import{Fe,Ke}from"./index.e35b4yh5.js";var q=Ke(function(Z,K){(function(w,E){if(typeof Z==="object"&&typeof K==="object")K.exports=E();else if(typeof define==="function"&&define.amd)define([],E);else if(typeof Z==="object")Z.layoutBase=E();else w.layoutBase=E()})(Z,function(){return function(I){var w={};function E(o){if(w[o])return w[o].exports;var r=w[o]={i:o,l:!1,exports:{}};return I[o].call(r.exports,r,r.exports,E),r.l=!0,r.exports}return E.m=I,E.c=w,E.i=function(o){return o},E.d=function(o,r,t){if(!E.o(o,r))Object.defineProperty(o,r,{configurable:!1,enumerable:!0,get:t})},E.n=function(o){var r=o&&o.__esModule?function(){return o.default}:function(){return o};return E.d(r,"a",r),r},E.o=function(o,r){return Object.prototype.hasOwnProperty.call(o,r)},E.p="",E(E.s=26)}([function(I,w,E){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1000,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,I.exports=o},function(I,w,E){var o=E(2),r=E(8),t=E(9);function i(f,a,v){o.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=a}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;else if(this.target===f)return this.source;else throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(f,a){var v=this.getOtherEnd(f),s=a.getGraphManager().getRoot();while(!0){if(v.getOwner()==a)return v;if(v.getOwner()==s)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var f=[,,,,];if(this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),f),!this.isOverlapingSourceAndTarget){if(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1)this.lengthX=t.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=t.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},i.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=t.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=t.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},I.exports=i},function(I,w,E){function o(r){this.vGraphObject=r}I.exports=o},function(I,w,E){var o=E(2),r=E(10),t=E(13),i=E(0),l=E(16),f=E(4);function a(s,u,g,y){if(g==null&&y==null)y=u;if(o.call(this,y),s.graphManager!=null)s=s.graphManager;if(this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=y,this.edges=[],this.graphManager=s,g!=null&&u!=null)this.rect=new t(u.x,u.y,g.width,g.height);else this.rect=new t}a.prototype=Object.create(o.prototype);for(var v in o)a[v]=o[v];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(s){this.rect.width=s},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(s){this.rect.height=s},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(s,u){this.rect.x=s.x,this.rect.y=s.y,this.rect.width=u.width,this.rect.height=u.height},a.prototype.setCenter=function(s,u){this.rect.x=s-this.rect.width/2,this.rect.y=u-this.rect.height/2},a.prototype.setLocation=function(s,u){this.rect.x=s,this.rect.y=u},a.prototype.moveBy=function(s,u){this.rect.x+=s,this.rect.y+=u},a.prototype.getEdgeListToNode=function(s){var u=[],g,y=this;return y.edges.forEach(function(L){if(L.target==s){if(L.source!=y)throw"Incorrect edge source!";u.push(L)}}),u},a.prototype.getEdgesBetween=function(s){var u=[],g,y=this;return y.edges.forEach(function(L){if(!(L.source==y||L.target==y))throw"Incorrect edge source and/or target";if(L.target==s||L.source==s)u.push(L)}),u},a.prototype.getNeighborsList=function(){var s=new Set,u=this;return u.edges.forEach(function(g){if(g.source==u)s.add(g.target);else{if(g.target!=u)throw"Incorrect incidency!";s.add(g.source)}}),s},a.prototype.withChildren=function(){var s=new Set,u,g;if(s.add(this),this.child!=null){var y=this.child.getNodes();for(var L=0;L<y.length;L++)u=y[L],g=u.withChildren(),g.forEach(function(A){s.add(A)})}return s},a.prototype.getNoOfChildren=function(){var s=0,u;if(this.child==null)s=1;else{var g=this.child.getNodes();for(var y=0;y<g.length;y++)u=g[y],s+=u.getNoOfChildren()}if(s==0)s=1;return s},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},a.prototype.scatter=function(){var s,u,g=-i.INITIAL_WORLD_BOUNDARY,y=i.INITIAL_WORLD_BOUNDARY;s=i.WORLD_CENTER_X+l.nextDouble()*(y-g)+g;var L=-i.INITIAL_WORLD_BOUNDARY,A=i.INITIAL_WORLD_BOUNDARY;u=i.WORLD_CENTER_Y+l.nextDouble()*(A-L)+L,this.rect.x=s,this.rect.y=u},a.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var s=this.getChild();if(s.updateBounds(!0),this.rect.x=s.getLeft(),this.rect.y=s.getTop(),this.setWidth(s.getRight()-s.getLeft()),this.setHeight(s.getBottom()-s.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var u=s.getRight()-s.getLeft(),g=s.getBottom()-s.getTop();if(this.labelWidth>u)this.rect.x-=(this.labelWidth-u)/2,this.setWidth(this.labelWidth);if(this.labelHeight>g){if(this.labelPos=="center")this.rect.y-=(this.labelHeight-g)/2;else if(this.labelPos=="top")this.rect.y-=this.labelHeight-g;this.setHeight(this.labelHeight)}}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(s){var u=this.rect.x;if(u>i.WORLD_BOUNDARY)u=i.WORLD_BOUNDARY;else if(u<-i.WORLD_BOUNDARY)u=-i.WORLD_BOUNDARY;var g=this.rect.y;if(g>i.WORLD_BOUNDARY)g=i.WORLD_BOUNDARY;else if(g<-i.WORLD_BOUNDARY)g=-i.WORLD_BOUNDARY;var y=new f(u,g),L=s.inverseTransformPoint(y);this.setLocation(L.x,L.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},I.exports=a},function(I,w,E){function o(r,t){if(r==null&&t==null)this.x=0,this.y=0;else this.x=r,this.y=t}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(r){this.x=r},o.prototype.setY=function(r){this.y=r},o.prototype.getDifference=function(r){return new DimensionD(this.x-r.x,this.y-r.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(r){return this.x+=r.width,this.y+=r.height,this},I.exports=o},function(I,w,E){var o=E(2),r=E(10),t=E(0),i=E(6),l=E(3),f=E(1),a=E(13),v=E(12),s=E(11);function u(y,L,A){if(o.call(this,A),this.estimatedSize=r.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=y,L!=null&&L instanceof i)this.graphManager=L;else if(L!=null&&L instanceof Layout)this.graphManager=L.graphManager}u.prototype=Object.create(o.prototype);for(var g in o)u[g]=o[g];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(y,L,A){if(L==null&&A==null){var d=y;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(d)>-1)throw"Node already in graph!";return d.owner=this,this.getNodes().push(d),d}else{var N=y;if(!(this.getNodes().indexOf(L)>-1&&this.getNodes().indexOf(A)>-1))throw"Source or target not in graph!";if(!(L.owner==A.owner&&L.owner==this))throw"Both owners must be this graph!";if(L.owner!=A.owner)return null;if(N.source=L,N.target=A,N.isInterGraph=!1,this.getEdges().push(N),L.edges.push(N),A!=L)A.edges.push(N);return N}},u.prototype.remove=function(y){var L=y;if(y instanceof l){if(L==null)throw"Node is null!";if(!(L.owner!=null&&L.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var A=L.edges.slice(),d,N=A.length;for(var T=0;T<N;T++)if(d=A[T],d.isInterGraph)this.graphManager.remove(d);else d.source.owner.remove(d);var R=this.nodes.indexOf(L);if(R==-1)throw"Node not in owner node list!";this.nodes.splice(R,1)}else if(y instanceof f){var d=y;if(d==null)throw"Edge is null!";if(!(d.source!=null&&d.target!=null))throw"Source and/or target is null!";if(!(d.source.owner!=null&&d.target.owner!=null&&d.source.owner==this&&d.target.owner==this))throw"Source and/or target owner is invalid!";var h=d.source.edges.indexOf(d),c=d.target.edges.indexOf(d);if(!(h>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(d.source.edges.splice(h,1),d.target!=d.source)d.target.edges.splice(c,1);var R=d.source.owner.getEdges().indexOf(d);if(R==-1)throw"Not in owner's edge list!";d.source.owner.getEdges().splice(R,1)}},u.prototype.updateLeftTop=function(){var{MAX_VALUE:y,MAX_VALUE:L}=r,A,d,N,T=this.getNodes(),R=T.length;for(var h=0;h<R;h++){var c=T[h];if(A=c.getTop(),d=c.getLeft(),y>A)y=A;if(L>d)L=d}if(y==r.MAX_VALUE)return null;if(T[0].getParent().paddingLeft!=null)N=T[0].getParent().paddingLeft;else N=this.margin;return this.left=L-N,this.top=y-N,new v(this.left,this.top)},u.prototype.updateBounds=function(y){var L=r.MAX_VALUE,A=-r.MAX_VALUE,d=r.MAX_VALUE,N=-r.MAX_VALUE,T,R,h,c,p,D=this.nodes,O=D.length;for(var C=0;C<O;C++){var M=D[C];if(y&&M.child!=null)M.updateBounds();if(T=M.getLeft(),R=M.getRight(),h=M.getTop(),c=M.getBottom(),L>T)L=T;if(A<R)A=R;if(d>h)d=h;if(N<c)N=c}var G=new a(L,d,A-L,N-d);if(L==r.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(D[0].getParent().paddingLeft!=null)p=D[0].getParent().paddingLeft;else p=this.margin;this.left=G.x-p,this.right=G.x+G.width+p,this.top=G.y-p,this.bottom=G.y+G.height+p},u.calculateBounds=function(y){var L=r.MAX_VALUE,A=-r.MAX_VALUE,d=r.MAX_VALUE,N=-r.MAX_VALUE,T,R,h,c,p=y.length;for(var D=0;D<p;D++){var O=y[D];if(T=O.getLeft(),R=O.getRight(),h=O.getTop(),c=O.getBottom(),L>T)L=T;if(A<R)A=R;if(d>h)d=h;if(N<c)N=c}var C=new a(L,d,A-L,N-d);return C},u.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){var y=0,L=this.nodes,A=L.length;for(var d=0;d<A;d++){var N=L[d];y+=N.calcEstimatedSize()}if(y==0)this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=y/Math.sqrt(this.nodes.length);return this.estimatedSize},u.prototype.updateConnected=function(){var y=this;if(this.nodes.length==0){this.isConnected=!0;return}var L=new s,A=new Set,d=this.nodes[0],N,T,R=d.withChildren();R.forEach(function(C){L.push(C),A.add(C)});while(L.length!==0){d=L.shift(),N=d.getEdges();var h=N.length;for(var c=0;c<h;c++){var p=N[c];if(T=p.getOtherEndInGraph(d,this),T!=null&&!A.has(T)){var D=T.withChildren();D.forEach(function(C){L.push(C),A.add(C)})}}}if(this.isConnected=!1,A.size>=this.nodes.length){var O=0;if(A.forEach(function(C){if(C.owner==y)O++}),O==this.nodes.length)this.isConnected=!0}},I.exports=u},function(I,w,E){var o,r=E(1);function t(i){o=E(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),f=this.add(i,l);return this.setRootGraph(f),this.rootGraph},t.prototype.add=function(i,l,f,a,v){if(f==null&&a==null&&v==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{v=f,a=l,f=i;var s=a.getOwner(),u=v.getOwner();if(!(s!=null&&s.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(u!=null&&u.getGraphManager()==this))throw"Target not in this graph mgr!";if(s==u)return f.isInterGraph=!1,s.add(f,a,v);else{if(f.isInterGraph=!0,f.source=a,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(l.getEdges());var a,v=f.length;for(var s=0;s<v;s++)a=f[s],l.remove(a);var u=[];u=u.concat(l.getNodes());var g;v=u.length;for(var s=0;s<v;s++)g=u[s],l.remove(g);if(l==this.rootGraph)this.setRootGraph(null);var y=this.graphs.indexOf(l);this.graphs.splice(y,1),l.parent=null}else if(i instanceof r){if(a=i,a==null)throw"Edge is null!";if(!a.isInterGraph)throw"Not an inter-graph edge!";if(!(a.source!=null&&a.target!=null))throw"Source and/or target is null!";if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw"Source and/or target doesn't know this edge!";var y=a.source.edges.indexOf(a);if(a.source.edges.splice(y,1),y=a.target.edges.indexOf(a),a.target.edges.splice(y,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw"Not in owner graph manager's edge list!";var y=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(y,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){var i=[],l=this.getGraphs(),f=l.length;for(var a=0;a<f;a++)i=i.concat(l[a].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs(),f=l.length;for(var a=0;a<l.length;a++)i=i.concat(l[a].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=i,i.parent==null)i.parent=this.layout.newNode("Root node")},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var f=i.getOwner(),a;do{if(a=f.getParent(),a==null)break;if(a==l)return!0;if(f=a.getOwner(),f==null)break}while(!0);f=l.getOwner();do{if(a=f.getParent(),a==null)break;if(a==i)return!0;if(f=a.getOwner(),f==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){var i,l,f,a,v,s=this.getAllEdges(),u=s.length;for(var g=0;g<u;g++){if(i=s[g],l=i.source,f=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=f,l==f){i.lca=l.getOwner();continue}a=l.getOwner();while(i.lca==null){i.targetInLca=f,v=f.getOwner();while(i.lca==null){if(v==a){i.lca=v;break}if(v==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=v.getParent(),v=i.targetInLca.getOwner()}if(a==this.rootGraph)break;if(i.lca==null)i.sourceInLca=a.getParent(),a=i.sourceInLca.getOwner()}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var f=i.getOwner();do{if(f==null)break;var a=l.getOwner();do{if(a==null)break;if(a==f)return a;a=a.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},t.prototype.calcInclusionTreeDepths=function(i,l){if(i==null&&l==null)i=this.rootGraph,l=1;var f,a=i.getNodes(),v=a.length;for(var s=0;s<v;s++)if(f=a[s],f.inclusionTreeDepth=l,f.child!=null)this.calcInclusionTreeDepths(f.child,l+1)},t.prototype.includesInvalidEdge=function(){var i,l=this.edges.length;for(var f=0;f<l;f++)if(i=this.edges[f],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},I.exports=t},function(I,w,E){var o=E(0);function r(){}for(var t in o)r[t]=o[t];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=0.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=0.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,r.COOLING_ADAPTATION_FACTOR=0.33,r.ADAPTATION_LOWER_NODE_LIMIT=1000,r.ADAPTATION_UPPER_NODE_LIMIT=5000,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=r.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,I.exports=r},function(I,w,E){var o=E(12);function r(){}r.calcSeparationAmount=function(t,i,l,f){if(!t.intersects(i))throw"assert failed";var a=[,,];if(this.decideDirectionsForOverlappingNodes(t,i,a),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight())l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight());else if(i.getX()<=t.getX()&&i.getRight()>=t.getRight())l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight());if(t.getY()<=i.getY()&&t.getBottom()>=i.getBottom())l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom());else if(i.getY()<=t.getY()&&i.getBottom()>=t.getBottom())l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom());var v=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));if(i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX())v=1;var s=v*l[0],u=l[1]/v;if(l[0]<u)u=l[0];else s=l[1];l[0]=-1*a[0]*(u/2+f),l[1]=-1*a[1]*(s/2+f)},r.decideDirectionsForOverlappingNodes=function(t,i,l){if(t.getCenterX()<i.getCenterX())l[0]=-1;else l[0]=1;if(t.getCenterY()<i.getCenterY())l[1]=-1;else l[1]=1},r.getIntersection2=function(t,i,l){var f=t.getCenterX(),a=t.getCenterY(),v=i.getCenterX(),s=i.getCenterY();if(t.intersects(i))return l[0]=f,l[1]=a,l[2]=v,l[3]=s,!0;var u=t.getX(),g=t.getY(),y=t.getRight(),L=t.getX(),A=t.getBottom(),d=t.getRight(),N=t.getWidthHalf(),T=t.getHeightHalf(),R=i.getX(),h=i.getY(),c=i.getRight(),p=i.getX(),D=i.getBottom(),O=i.getRight(),C=i.getWidthHalf(),M=i.getHeightHalf(),G=!1,F=!1;if(f===v){if(a>s)return l[0]=f,l[1]=g,l[2]=v,l[3]=D,!1;else if(a<s)return l[0]=f,l[1]=A,l[2]=v,l[3]=h,!1}else if(a===s){if(f>v)return l[0]=u,l[1]=a,l[2]=c,l[3]=s,!1;else if(f<v)return l[0]=y,l[1]=a,l[2]=R,l[3]=s,!1}else{var P=t.height/t.width,b=i.height/i.width,U=(s-a)/(v-f),x=void 0,S=void 0,Y=void 0,X=void 0,H=void 0,_=void 0;if(-P===U)if(f>v)l[0]=L,l[1]=A,G=!0;else l[0]=y,l[1]=g,G=!0;else if(P===U)if(f>v)l[0]=u,l[1]=g,G=!0;else l[0]=d,l[1]=A,G=!0;if(-b===U)if(v>f)l[2]=p,l[3]=D,F=!0;else l[2]=c,l[3]=h,F=!0;else if(b===U)if(v>f)l[2]=R,l[3]=h,F=!0;else l[2]=O,l[3]=D,F=!0;if(G&&F)return!1;if(f>v)if(a>s)x=this.getCardinalDirection(P,U,4),S=this.getCardinalDirection(b,U,2);else x=this.getCardinalDirection(-P,U,3),S=this.getCardinalDirection(-b,U,1);else if(a>s)x=this.getCardinalDirection(-P,U,1),S=this.getCardinalDirection(-b,U,3);else x=this.getCardinalDirection(P,U,2),S=this.getCardinalDirection(b,U,4);if(!G)switch(x){case 1:X=g,Y=f+-T/U,l[0]=Y,l[1]=X;break;case 2:Y=d,X=a+N*U,l[0]=Y,l[1]=X;break;case 3:X=A,Y=f+T/U,l[0]=Y,l[1]=X;break;case 4:Y=L,X=a+-N*U,l[0]=Y,l[1]=X;break}if(!F)switch(S){case 1:_=h,H=v+-M/U,l[2]=H,l[3]=_;break;case 2:H=O,_=s+C*U,l[2]=H,l[3]=_;break;case 3:_=D,H=v+M/U,l[2]=H,l[3]=_;break;case 4:H=p,_=s+-C*U,l[2]=H,l[3]=_;break}}return!1},r.getCardinalDirection=function(t,i,l){if(t>i)return l;else return 1+l%4},r.getIntersection=function(t,i,l,f){if(f==null)return this.getIntersection2(t,i,l);var{x:a,y:v}=t,{x:s,y:u}=i,{x:g,y}=l,{x:L,y:A}=f,d=void 0,N=void 0,T=void 0,R=void 0,h=void 0,c=void 0,p=void 0,D=void 0,O=void 0;if(T=u-v,h=a-s,p=s*v-a*u,R=A-y,c=g-L,D=L*y-g*A,O=T*c-R*h,O===0)return null;return d=(h*D-c*p)/O,N=(R*p-T*D)/O,new o(d,N)},r.angleOfVector=function(t,i,l,f){var a=void 0;if(t!==l){if(a=Math.atan((f-i)/(l-t)),l<t)a+=Math.PI;else if(f<i)a+=this.TWO_PI}else if(f<i)a=this.ONE_AND_HALF_PI;else a=this.HALF_PI;return a},r.doIntersect=function(t,i,l,f){var{x:a,y:v}=t,{x:s,y:u}=i,{x:g,y}=l,{x:L,y:A}=f,d=(s-a)*(A-y)-(L-g)*(u-v);if(d===0)return!1;else{var N=((A-y)*(L-a)+(g-L)*(A-v))/d,T=((v-u)*(L-a)+(s-a)*(A-v))/d;return 0<N&&N<1&&0<T&&T<1}},r.HALF_PI=0.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,I.exports=r},function(I,w,E){function o(){}o.sign=function(r){if(r>0)return 1;else if(r<0)return-1;else return 0},o.floor=function(r){return r<0?Math.ceil(r):Math.floor(r)},o.ceil=function(r){return r<0?Math.floor(r):Math.ceil(r)},I.exports=o},function(I,w,E){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,I.exports=o},function(I,w,E){var o=function(){function a(v,s){for(var u=0;u<s.length;u++){var g=s[u];if(g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g)g.writable=!0;Object.defineProperty(v,g.key,g)}}return function(v,s,u){if(s)a(v.prototype,s);if(u)a(v,u);return v}}();function r(a,v){if(!(a instanceof v))throw TypeError("Cannot call a class as a function")}var t=function(v){return{value:v,next:null,prev:null}},i=function(v,s,u,g){if(v!==null)v.next=s;else g.head=s;if(u!==null)u.prev=s;else g.tail=s;return s.prev=v,s.next=u,g.length++,s},l=function(v,s){var{prev:u,next:g}=v;if(u!==null)u.next=g;else s.head=g;if(g!==null)g.prev=u;else s.tail=u;return v.prev=v.next=null,s.length--,v},f=function(){function a(v){var s=this;if(r(this,a),this.length=0,this.head=null,this.tail=null,v!=null)v.forEach(function(u){return s.push(u)})}return o(a,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(s,u){return i(u.prev,t(s),u,this)}},{key:"insertAfter",value:function(s,u){return i(u,t(s),u.next,this)}},{key:"insertNodeBefore",value:function(s,u){return i(u.prev,s,u,this)}},{key:"insertNodeAfter",value:function(s,u){return i(u,s,u.next,this)}},{key:"push",value:function(s){return i(this.tail,t(s),null,this)}},{key:"unshift",value:function(s){return i(null,t(s),this.head,this)}},{key:"remove",value:function(s){return l(s,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(s){if(s<=this.length()){var u=1,g=this.head;while(u<s)g=g.next,u++;return g.value}}},{key:"set_object_at",value:function(s,u){if(s<=this.length()){var g=1,y=this.head;while(g<s)y=y.next,g++;y.value=u}}}]),a}();I.exports=f},function(I,w,E){function o(r,t,i){if(this.x=null,this.y=null,r==null&&t==null&&i==null)this.x=0,this.y=0;else if(typeof r=="number"&&typeof t=="number"&&i==null)this.x=r,this.y=t;else if(r.constructor.name=="Point"&&t==null&&i==null)i=r,this.x=i.x,this.y=i.y}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(r,t,i){if(r.constructor.name=="Point"&&t==null&&i==null)i=r,this.setLocation(i.x,i.y);else if(typeof r=="number"&&typeof t=="number"&&i==null)if(parseInt(r)==r&&parseInt(t)==t)this.move(r,t);else this.x=Math.floor(r+0.5),this.y=Math.floor(t+0.5)},o.prototype.move=function(r,t){this.x=r,this.y=t},o.prototype.translate=function(r,t){this.x+=r,this.y+=t},o.prototype.equals=function(r){if(r.constructor.name=="Point"){var t=r;return this.x==t.x&&this.y==t.y}return this==r},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},I.exports=o},function(I,w,E){function o(r,t,i,l){if(this.x=0,this.y=0,this.width=0,this.height=0,r!=null&&t!=null&&i!=null&&l!=null)this.x=r,this.y=t,this.width=i,this.height=l}o.prototype.getX=function(){return this.x},o.prototype.setX=function(r){this.x=r},o.prototype.getY=function(){return this.y},o.prototype.setY=function(r){this.y=r},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(r){this.width=r},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(r){this.height=r},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(r){if(this.getRight()<r.x)return!1;if(this.getBottom()<r.y)return!1;if(r.getRight()<this.x)return!1;if(r.getBottom()<this.y)return!1;return!0},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},I.exports=o},function(I,w,E){var o=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(){}r.lastID=0,r.createID=function(t){if(r.isPrimitive(t))return t;if(t.uniqueID!=null)return t.uniqueID;return t.uniqueID=r.getString(),r.lastID++,t.uniqueID},r.getString=function(t){if(t==null)t=r.lastID;return"Object#"+t},r.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},I.exports=r},function(I,w,E){function o(g){if(Array.isArray(g)){for(var y=0,L=Array(g.length);y<g.length;y++)L[y]=g[y];return L}else return Array.from(g)}var r=E(0),t=E(6),i=E(3),l=E(1),f=E(5),a=E(4),v=E(17),s=E(27);function u(g){if(s.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null)this.isRemoteUse=g}u.RANDOM_SEED=1,u.prototype=Object.create(s.prototype),u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var g=new t(this);return this.graphManager=g,g},u.prototype.newGraph=function(g){return new f(null,this.graphManager,g)},u.prototype.newNode=function(g){return new i(this.graphManager,g)},u.prototype.newEdge=function(g){return new l(null,null,g)},u.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var g;if(this.checkLayoutSuccess())g=!1;else g=this.layout();if(r.ANIMATE==="during")return!1;if(g){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,g},u.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var g,y=this.graphManager.getAllEdges();for(var L=0;L<y.length;L++)g=y[L];var A,d=this.graphManager.getRoot().getNodes();for(var L=0;L<d.length;L++)A=d[L];this.update(this.graphManager.getRoot())}},u.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof i){var y=g;if(y.getChild()!=null){var L=y.getChild().getNodes();for(var A=0;A<L.length;A++)update(L[A])}if(y.vGraphObject!=null){var d=y.vGraphObject;d.update(y)}}else if(g instanceof l){var N=g;if(N.vGraphObject!=null){var T=N.vGraphObject;T.update(N)}}else if(g instanceof f){var R=g;if(R.vGraphObject!=null){var h=R.vGraphObject;h.update(R)}}},u.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},u.prototype.transform=function(g){if(g==null)this.transform(new a(0,0));else{var y=new v,L=this.graphManager.getRoot().updateLeftTop();if(L!=null){y.setWorldOrgX(g.x),y.setWorldOrgY(g.y),y.setDeviceOrgX(L.x),y.setDeviceOrgY(L.y);var A=this.getAllNodes(),d;for(var N=0;N<A.length;N++)d=A[N],d.transform(y)}}},u.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var y,L,A=g.getNodes();for(var d=0;d<A.length;d++)if(y=A[d],L=y.getChild(),L==null)y.scatter();else if(L.getNodes().length==0)y.scatter();else this.positionNodesRandomly(L),y.updateBounds()}},u.prototype.getFlatForest=function(){var g=[],y=!0,L=this.graphManager.getRoot().getNodes(),A=!0;for(var d=0;d<L.length;d++)if(L[d].getChild()!=null)A=!1;if(!A)return g;var N=new Set,T=[],R=new Map,h=[];h=h.concat(L);while(h.length>0&&y){T.push(h[0]);while(T.length>0&&y){var c=T[0];T.splice(0,1),N.add(c);var p=c.getEdges();for(var d=0;d<p.length;d++){var D=p[d].getOtherEnd(c);if(R.get(c)!=D)if(!N.has(D))T.push(D),R.set(D,c);else{y=!1;break}}}if(!y)g=[];else{var O=[].concat(o(N));g.push(O);for(var d=0;d<O.length;d++){var C=O[d],M=h.indexOf(C);if(M>-1)h.splice(M,1)}N=new Set,R=new Map}}return g},u.prototype.createDummyNodesForBendpoints=function(g){var y=[],L=g.source,A=this.graphManager.calcLowestCommonAncestor(g.source,g.target);for(var d=0;d<g.bendpoints.length;d++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),A.add(N);var T=this.newEdge(null);this.graphManager.add(T,L,N),y.add(N),L=N}var T=this.newEdge(null);if(this.graphManager.add(T,L,g.target),this.edgeToDummyNodes.set(g,y),g.isInterGraph())this.graphManager.remove(g);else A.remove(g);return y},u.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(o(this.edgeToDummyNodes.keys())).concat(g);for(var y=0;y<g.length;y++){var L=g[y];if(L.bendpoints.length>0){var A=this.edgeToDummyNodes.get(L);for(var d=0;d<A.length;d++){var N=A[d],T=new a(N.getCenterX(),N.getCenterY()),R=L.bendpoints.get(d);R.x=T.x,R.y=T.y,N.getOwner().remove(N)}this.graphManager.add(L,L.source,L.target)}}},u.transform=function(g,y,L,A){if(L!=null&&A!=null){var d=y;if(g<=50){var N=y/L;d-=(y-N)/50*(50-g)}else{var T=y*A;d+=(T-y)/50*(g-50)}return d}else{var R,h;if(g<=50)R=9*y/500,h=y/10;else R=9*y/50,h=-8*y;return R*g+h}},u.findCenterOfTree=function(g){var y=[];y=y.concat(g);var L=[],A=new Map,d=!1,N=null;if(y.length==1||y.length==2)d=!0,N=y[0];for(var T=0;T<y.length;T++){var R=y[T],h=R.getNeighborsList().size;if(A.set(R,R.getNeighborsList().size),h==1)L.push(R)}var c=[];c=c.concat(L);while(!d){var p=[];p=p.concat(c),c=[];for(var T=0;T<y.length;T++){var R=y[T],D=y.indexOf(R);if(D>=0)y.splice(D,1);var O=R.getNeighborsList();O.forEach(function(G){if(L.indexOf(G)<0){var F=A.get(G),P=F-1;if(P==1)c.push(G);A.set(G,P)}})}if(L=L.concat(c),y.length==1||y.length==2)d=!0,N=y[0]}return N},u.prototype.setGraphManager=function(g){this.graphManager=g},I.exports=u},function(I,w,E){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},I.exports=o},function(I,w,E){var o=E(4);function r(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var i=0,l=this.lworldExtX;if(l!=0)i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l;return i},r.prototype.transformY=function(t){var i=0,l=this.lworldExtY;if(l!=0)i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l;return i},r.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;if(l!=0)i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l;return i},r.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;if(l!=0)i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l;return i},r.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},I.exports=r},function(I,w,E){function o(s){if(Array.isArray(s)){for(var u=0,g=Array(s.length);u<s.length;u++)g[u]=s[u];return g}else return Array.from(s)}var r=E(15),t=E(7),i=E(0),l=E(8),f=E(9);function a(){r.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}a.prototype=Object.create(r.prototype);for(var v in r)a[v]=r[v];a.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){var s,u,g,y,L,A,d=this.getGraphManager().getAllEdges();for(var N=0;N<d.length;N++)if(s=d[N],s.idealLength=this.idealEdgeLength,s.isInterGraph){if(g=s.getSource(),y=s.getTarget(),L=s.getSourceInLca().getEstimatedSize(),A=s.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)s.idealLength+=L+A-2*i.SIMPLE_NODE_SIZE;u=s.getLca().getInclusionTreeDepth(),s.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+y.getInclusionTreeDepth()-2*u)}},a.prototype.initSpringEmbedder=function(){var s=this.getAllNodes().length;if(this.incremental){if(s>t.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR));this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL}else{if(s>t.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){var s=this.getAllEdges(),u;for(var g=0;g<s.length;g++)u=s[g],this.calcSpringForce(u,u.idealLength)},a.prototype.calcRepulsionForces=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,y,L,A,d=this.getAllNodes(),N;if(this.useFRGridVariant){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&s)this.updateGrid();N=new Set;for(g=0;g<d.length;g++)L=d[g],this.calculateRepulsionForceOfANode(L,N,s,u),N.add(L)}else for(g=0;g<d.length;g++){L=d[g];for(y=g+1;y<d.length;y++){if(A=d[y],L.getOwner()!=A.getOwner())continue;this.calcRepulsionForce(L,A)}}},a.prototype.calcGravitationalForces=function(){var s,u=this.getAllNodesToApplyGravitation();for(var g=0;g<u.length;g++)s=u[g],this.calcGravitationalForce(s)},a.prototype.moveNodes=function(){var s=this.getAllNodes(),u;for(var g=0;g<s.length;g++)u=s[g],u.move()},a.prototype.calcSpringForce=function(s,u){var g=s.getSource(),y=s.getTarget(),L,A,d,N;if(this.uniformLeafNodeSizes&&g.getChild()==null&&y.getChild()==null)s.updateLengthSimple();else if(s.updateLength(),s.isOverlapingSourceAndTarget)return;if(L=s.getLength(),L==0)return;A=this.springConstant*(L-u),d=A*(s.lengthX/L),N=A*(s.lengthY/L),g.springForceX+=d,g.springForceY+=N,y.springForceX-=d,y.springForceY-=N},a.prototype.calcRepulsionForce=function(s,u){var g=s.getRect(),y=u.getRect(),L=[,,],A=[,,,,],d,N,T,R,h,c,p;if(g.intersects(y)){l.calcSeparationAmount(g,y,L,t.DEFAULT_EDGE_LENGTH/2),c=2*L[0],p=2*L[1];var D=s.noOfChildren*u.noOfChildren/(s.noOfChildren+u.noOfChildren);s.repulsionForceX-=D*c,s.repulsionForceY-=D*p,u.repulsionForceX+=D*c,u.repulsionForceY+=D*p}else{if(this.uniformLeafNodeSizes&&s.getChild()==null&&u.getChild()==null)d=y.getCenterX()-g.getCenterX(),N=y.getCenterY()-g.getCenterY();else l.getIntersection(g,y,A),d=A[2]-A[0],N=A[3]-A[1];if(Math.abs(d)<t.MIN_REPULSION_DIST)d=f.sign(d)*t.MIN_REPULSION_DIST;if(Math.abs(N)<t.MIN_REPULSION_DIST)N=f.sign(N)*t.MIN_REPULSION_DIST;T=d*d+N*N,R=Math.sqrt(T),h=this.repulsionConstant*s.noOfChildren*u.noOfChildren/T,c=h*d/R,p=h*N/R,s.repulsionForceX-=c,s.repulsionForceY-=p,u.repulsionForceX+=c,u.repulsionForceY+=p}},a.prototype.calcGravitationalForce=function(s){var u,g,y,L,A,d,N,T;if(u=s.getOwner(),g=(u.getRight()+u.getLeft())/2,y=(u.getTop()+u.getBottom())/2,L=s.getCenterX()-g,A=s.getCenterY()-y,d=Math.abs(L)+s.getWidth()/2,N=Math.abs(A)+s.getHeight()/2,s.getOwner()==this.graphManager.getRoot()){if(T=u.getEstimatedSize()*this.gravityRangeFactor,d>T||N>T)s.gravitationForceX=-this.gravityConstant*L,s.gravitationForceY=-this.gravityConstant*A}else if(T=u.getEstimatedSize()*this.compoundGravityRangeFactor,d>T||N>T)s.gravitationForceX=-this.gravityConstant*L*this.compoundGravityConstant,s.gravitationForceY=-this.gravityConstant*A*this.compoundGravityConstant},a.prototype.isConverged=function(){var s,u=!1;if(this.totalIterations>this.maxIterations/3)u=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return s=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,s||u},a.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},a.prototype.calcNoOfChildrenForAllNodes=function(){var s,u=this.graphManager.getAllNodes();for(var g=0;g<u.length;g++)s=u[g],s.noOfChildren=s.getNoOfChildren()},a.prototype.calcGrid=function(s){var u=0,g=0;u=parseInt(Math.ceil((s.getRight()-s.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((s.getBottom()-s.getTop())/this.repulsionRange));var y=Array(u);for(var L=0;L<u;L++)y[L]=Array(g);for(var L=0;L<u;L++)for(var A=0;A<g;A++)y[L][A]=[];return y},a.prototype.addNodeToGrid=function(s,u,g){var y=0,L=0,A=0,d=0;y=parseInt(Math.floor((s.getRect().x-u)/this.repulsionRange)),L=parseInt(Math.floor((s.getRect().width+s.getRect().x-u)/this.repulsionRange)),A=parseInt(Math.floor((s.getRect().y-g)/this.repulsionRange)),d=parseInt(Math.floor((s.getRect().height+s.getRect().y-g)/this.repulsionRange));for(var N=y;N<=L;N++)for(var T=A;T<=d;T++)this.grid[N][T].push(s),s.setGridCoordinates(y,L,A,d)},a.prototype.updateGrid=function(){var s,u,g=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(s=0;s<g.length;s++)u=g[s],this.addNodeToGrid(u,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(s,u,g,y){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&g||y){var L=new Set;s.surrounding=[];var A,d=this.grid;for(var N=s.startX-1;N<s.finishX+2;N++)for(var T=s.startY-1;T<s.finishY+2;T++)if(!(N<0||T<0||N>=d.length||T>=d[0].length))for(var R=0;R<d[N][T].length;R++){if(A=d[N][T][R],s.getOwner()!=A.getOwner()||s==A)continue;if(!u.has(A)&&!L.has(A)){var h=Math.abs(s.getCenterX()-A.getCenterX())-(s.getWidth()/2+A.getWidth()/2),c=Math.abs(s.getCenterY()-A.getCenterY())-(s.getHeight()/2+A.getHeight()/2);if(h<=this.repulsionRange&&c<=this.repulsionRange)L.add(A)}}s.surrounding=[].concat(o(L))}for(N=0;N<s.surrounding.length;N++)this.calcRepulsionForce(s,s.surrounding[N])},a.prototype.calcRepulsionRange=function(){return 0},I.exports=a},function(I,w,E){var o=E(1),r=E(7);function t(l,f,a){o.call(this,l,f,a),this.idealLength=r.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];I.exports=t},function(I,w,E){var o=E(3);function r(i,l,f,a){o.call(this,i,l,f,a),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}r.prototype=Object.create(o.prototype);for(var t in o)r[t]=o[t];r.prototype.setGridCoordinates=function(i,l,f,a){this.startX=i,this.finishX=l,this.startY=f,this.finishY=a},I.exports=r},function(I,w,E){function o(r,t){if(this.width=0,this.height=0,r!==null&&t!==null)this.height=t,this.width=r}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(r){this.width=r},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(r){this.height=r},I.exports=o},function(I,w,E){var o=E(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(t,i){var l=o.createID(t);if(!this.contains(l))this.map[l]=i,this.keys.push(t)},r.prototype.contains=function(t){var i=o.createID(t);return this.map[t]!=null},r.prototype.get=function(t){var i=o.createID(t);return this.map[i]},r.prototype.keySet=function(){return this.keys},I.exports=r},function(I,w,E){var o=E(14);function r(){this.set={}}r.prototype.add=function(t){var i=o.createID(t);if(!this.contains(i))this.set[i]=t},r.prototype.remove=function(t){delete this.set[o.createID(t)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(t){return this.set[o.createID(t)]==t},r.prototype.isEmpty=function(){return this.size()===0},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(t){var i=Object.keys(this.set),l=i.length;for(var f=0;f<l;f++)t.push(this.set[i[f]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(t){var i=t.length;for(var l=0;l<i;l++){var f=t[l];this.add(f)}},I.exports=r},function(I,w,E){var o=function(){function l(f,a){for(var v=0;v<a.length;v++){var s=a[v];if(s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s)s.writable=!0;Object.defineProperty(f,s.key,s)}}return function(f,a,v){if(a)l(f.prototype,a);if(v)l(f,v);return f}}();function r(l,f){if(!(l instanceof f))throw TypeError("Cannot call a class as a function")}var t=E(11),i=function(){function l(f,a){if(r(this,l),a!==null||a!==void 0)this.compareFunction=this._defaultCompareFunction;var v=void 0;if(f instanceof t)v=f.size();else v=f.length;this._quicksort(f,0,v-1)}return o(l,[{key:"_quicksort",value:function(a,v,s){if(v<s){var u=this._partition(a,v,s);this._quicksort(a,v,u),this._quicksort(a,u+1,s)}}},{key:"_partition",value:function(a,v,s){var u=this._get(a,v),g=v,y=s;while(!0){while(this.compareFunction(u,this._get(a,y)))y--;while(this.compareFunction(this._get(a,g),u))g++;if(g<y)this._swap(a,g,y),g++,y--;else return y}}},{key:"_get",value:function(a,v){if(a instanceof t)return a.get_object_at(v);else return a[v]}},{key:"_set",value:function(a,v,s){if(a instanceof t)a.set_object_at(v,s);else a[v]=s}},{key:"_swap",value:function(a,v,s){var u=this._get(a,v);this._set(a,v,this._get(a,s)),this._set(a,s,u)}},{key:"_defaultCompareFunction",value:function(a,v){return v>a}}]),l}();I.exports=i},function(I,w,E){var o=function(){function i(l,f){for(var a=0;a<f.length;a++){var v=f[a];if(v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v)v.writable=!0;Object.defineProperty(l,v.key,v)}}return function(l,f,a){if(f)i(l.prototype,f);if(a)i(l,a);return l}}();function r(i,l){if(!(i instanceof l))throw TypeError("Cannot call a class as a function")}var t=function(){function i(l,f){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;r(this,i),this.sequence1=l,this.sequence2=f,this.match_score=a,this.mismatch_penalty=v,this.gap_penalty=s,this.iMax=l.length+1,this.jMax=f.length+1,this.grid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.grid[u]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[u][g]=0}this.tracebackGrid=Array(this.iMax);for(var y=0;y<this.iMax;y++){this.tracebackGrid[y]=Array(this.jMax);for(var L=0;L<this.jMax;L++)this.tracebackGrid[y][L]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var a=1;a<this.iMax;a++)this.grid[a][0]=this.grid[a-1][0]+this.gap_penalty,this.tracebackGrid[a][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var s=1;s<this.jMax;s++){var u=void 0;if(this.sequence1[v-1]===this.sequence2[s-1])u=this.grid[v-1][s-1]+this.match_score;else u=this.grid[v-1][s-1]+this.mismatch_penalty;var g=this.grid[v-1][s]+this.gap_penalty,y=this.grid[v][s-1]+this.gap_penalty,L=[u,g,y],A=this.arrayAllMaxIndexes(L);this.grid[v][s]=L[A[0]],this.tracebackGrid[v][s]=[A.includes(0),A.includes(1),A.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(f[0]){var a=f[0],v=this.tracebackGrid[a.pos[0]][a.pos[1]];if(v[0])f.push({pos:[a.pos[0]-1,a.pos[1]-1],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2});if(v[1])f.push({pos:[a.pos[0]-1,a.pos[1]],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:"-"+a.seq2});if(v[2])f.push({pos:[a.pos[0],a.pos[1]-1],seq1:"-"+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2});if(a.pos[0]===0&&a.pos[1]===0)this.alignments.push({sequence1:a.seq1,sequence2:a.seq2});f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,a){var v=[],s=-1;while((s=f.indexOf(a,s+1))!==-1)v.push(s);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),i}();I.exports=t},function(I,w,E){var o=function(){return};o.FDLayout=E(18),o.FDLayoutConstants=E(7),o.FDLayoutEdge=E(19),o.FDLayoutNode=E(20),o.DimensionD=E(21),o.HashMap=E(22),o.HashSet=E(23),o.IGeometry=E(8),o.IMath=E(9),o.Integer=E(10),o.Point=E(12),o.PointD=E(4),o.RandomSeed=E(16),o.RectangleD=E(13),o.Transform=E(17),o.UniqueIDGeneretor=E(14),o.Quicksort=E(24),o.LinkedList=E(11),o.LGraphObject=E(2),o.LGraph=E(5),o.LEdge=E(1),o.LGraphManager=E(6),o.LNode=E(3),o.Layout=E(15),o.LayoutConstants=E(0),o.NeedlemanWunsch=E(25),I.exports=o},function(I,w,E){function o(){this.listeners=[]}var r=o.prototype;r.addListener=function(t,i){this.listeners.push({event:t,callback:i})},r.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var f=this.listeners[l];if(f.event===t&&f.callback===i)this.listeners.splice(l,1)}},r.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var f=this.listeners[l];if(t===f.event)f.callback(i)}},I.exports=o}])})});var J=Ke(function(Q,z){(function(w,E){if(typeof Q==="object"&&typeof z==="object")z.exports=E(q());else if(typeof define==="function"&&define.amd)define(["layout-base"],E);else if(typeof Q==="object")Q.coseBase=E(q());else w.coseBase=E(w.layoutBase)})(Q,function(I){return function(w){var E={};function o(r){if(E[r])return E[r].exports;var t=E[r]={i:r,l:!1,exports:{}};return w[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=w,o.c=E,o.i=function(r){return r},o.d=function(r,t,i){if(!o.o(r,t))Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(t,"a",t),t},o.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},o.p="",o(o.s=7)}([function(w,E){w.exports=I},function(w,E,o){var r=o(0).FDLayoutConstants;function t(){}for(var i in r)t[i]=r[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,w.exports=t},function(w,E,o){var r=o(0).FDLayoutEdge;function t(l,f,a){r.call(this,l,f,a)}t.prototype=Object.create(r.prototype);for(var i in r)t[i]=r[i];w.exports=t},function(w,E,o){var r=o(0).LGraph;function t(l,f,a){r.call(this,l,f,a)}t.prototype=Object.create(r.prototype);for(var i in r)t[i]=r[i];w.exports=t},function(w,E,o){var r=o(0).LGraphManager;function t(l){r.call(this,l)}t.prototype=Object.create(r.prototype);for(var i in r)t[i]=r[i];w.exports=t},function(w,E,o){var r=o(0).FDLayoutNode,t=o(0).IMath;function i(f,a,v,s){r.call(this,f,a,v,s)}i.prototype=Object.create(r.prototype);for(var l in r)i[l]=r[l];i.prototype.move=function(){var f=this.graphManager.getLayout();if(this.displacementX=f.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=f.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>f.coolingFactor*f.maxNodeDisplacement)this.displacementX=f.coolingFactor*f.maxNodeDisplacement*t.sign(this.displacementX);if(Math.abs(this.displacementY)>f.coolingFactor*f.maxNodeDisplacement)this.displacementY=f.coolingFactor*f.maxNodeDisplacement*t.sign(this.displacementY);if(this.child==null)this.moveBy(this.displacementX,this.displacementY);else if(this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY);else this.propogateDisplacementToChildren(this.displacementX,this.displacementY);f.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(f,a){var v=this.getChild().getNodes(),s;for(var u=0;u<v.length;u++)if(s=v[u],s.getChild()==null)s.moveBy(f,a),s.displacementX+=f,s.displacementY+=a;else s.propogateDisplacementToChildren(f,a)},i.prototype.setPred1=function(f){this.pred1=f},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(f){this.next=f},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(f){this.processed=f},i.prototype.isProcessed=function(){return processed},w.exports=i},function(w,E,o){var r=o(0).FDLayout,t=o(4),i=o(3),l=o(5),f=o(2),a=o(1),v=o(0).FDLayoutConstants,s=o(0).LayoutConstants,u=o(0).Point,g=o(0).PointD,y=o(0).Layout,L=o(0).Integer,A=o(0).IGeometry,d=o(0).LGraph,N=o(0).Transform;function T(){r.call(this),this.toBeTiled={}}T.prototype=Object.create(r.prototype);for(var R in r)T[R]=r[R];T.prototype.newGraphManager=function(){var h=new t(this);return this.graphManager=h,h},T.prototype.newGraph=function(h){return new i(null,this.graphManager,h)},T.prototype.newNode=function(h){return new l(this.graphManager,h)},T.prototype.newEdge=function(h){return new f(null,null,h)},T.prototype.initParameters=function(){if(r.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(a.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=v.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=v.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=v.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=v.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=v.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=v.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/v.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=v.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1}},T.prototype.layout=function(){var h=s.DEFAULT_CREATE_BENDS_AS_NEEDED;if(h)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var h=this.getFlatForest();if(h.length>0)this.positionNodesRadially(h);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(D){return c.has(D)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}else if(a.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(C){return c.has(C)});this.graphManager.setAllNodesToApplyGravitation(p)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(this.layoutQuality==1)this.coolingAdjuster=this.coolingCycle/3;this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(O){return h.has(O)});this.graphManager.setAllNodesToApplyGravitation(c),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,D=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,D),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){var h=this.graphManager.getAllNodes(),c={};for(var p=0;p<h.length;p++){var D=h[p].rect,O=h[p].id;c[O]={id:O,x:D.getCenterX(),y:D.getCenterY(),w:D.width,h:D.height}}return c},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var h=!1;if(v.ANIMATE==="during")this.emit("layoutstarted");else{while(!h)h=this.tick();this.graphManager.updateBounds()}},T.prototype.calculateNodesToApplyGravitationTo=function(){var h=[],c,p=this.graphManager.getGraphs(),D=p.length,O;for(O=0;O<D;O++)if(c=p[O],c.updateConnected(),!c.isConnected)h=h.concat(c.getNodes());return h},T.prototype.createBendpoints=function(){var h=[];h=h.concat(this.graphManager.getAllEdges());var c=new Set,p;for(p=0;p<h.length;p++){var D=h[p];if(!c.has(D)){var O=D.getSource(),C=D.getTarget();if(O==C)D.getBendpoints().push(new g),D.getBendpoints().push(new g),this.createDummyNodesForBendpoints(D),c.add(D);else{var M=[];if(M=M.concat(O.getEdgeListToNode(C)),M=M.concat(C.getEdgeListToNode(O)),!c.has(M[0])){if(M.length>1){var G;for(G=0;G<M.length;G++){var F=M[G];F.getBendpoints().push(new g),this.createDummyNodesForBendpoints(F)}}M.forEach(function(P){c.add(P)})}}}if(c.size==h.length)break}},T.prototype.positionNodesRadially=function(h){var c=new u(0,0),p=Math.ceil(Math.sqrt(h.length)),D=0,O=0,C=0,M=new g(0,0);for(var G=0;G<h.length;G++){if(G%p==0){if(C=0,O=D,G!=0)O+=a.DEFAULT_COMPONENT_SEPERATION;D=0}var F=h[G],P=y.findCenterOfTree(F);if(c.x=C,c.y=O,M=T.radialLayout(F,P,c),M.y>D)D=Math.floor(M.y);C=Math.floor(M.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(s.WORLD_CENTER_X-M.x/2,s.WORLD_CENTER_Y-M.y/2))},T.radialLayout=function(h,c,p){var D=Math.max(this.maxDiagonalInTree(h),a.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(c,null,0,359,0,D);var O=d.calculateBounds(h),C=new N;C.setDeviceOrgX(O.getMinX()),C.setDeviceOrgY(O.getMinY()),C.setWorldOrgX(p.x),C.setWorldOrgY(p.y);for(var M=0;M<h.length;M++){var G=h[M];G.transform(C)}var F=new g(O.getMaxX(),O.getMaxY());return C.inverseTransformPoint(F)},T.branchRadialLayout=function(h,c,p,D,O,C){var M=(D-p+1)/2;if(M<0)M+=180;var G=(M+p)%360,F=G*A.TWO_PI/360,P=Math.cos(F),b=O*Math.cos(F),U=O*Math.sin(F);h.setCenter(b,U);var x=[];x=x.concat(h.getEdges());var S=x.length;if(c!=null)S--;var Y=0,X=x.length,H,_=h.getEdgesBetween(c);while(_.length>1){var W=_[0];_.splice(0,1);var k=x.indexOf(W);if(k>=0)x.splice(k,1);X--,S--}if(c!=null)H=(x.indexOf(_[0])+1)%X;else H=0;var B=Math.abs(D-p)/S;for(var V=H;Y!=S;V=++V%X){var et=x[V].getOtherEnd(h);if(et==c)continue;var rt=(p+Y*B)%360,ft=(rt+B)%360;T.branchRadialLayout(et,h,rt,ft,O+C,C),Y++}},T.maxDiagonalInTree=function(h){var c=L.MIN_VALUE;for(var p=0;p<h.length;p++){var D=h[p],O=D.getDiagonal();if(O>c)c=O}return c},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var h=this,c={};this.memberGroups={},this.idToDummyNode={};var p=[],D=this.graphManager.getAllNodes();for(var O=0;O<D.length;O++){var C=D[O],M=C.getParent();if(this.getNodeDegreeWithChildren(C)===0&&(M.id==null||!this.getToBeTiled(M)))p.push(C)}for(var O=0;O<p.length;O++){var C=p[O],G=C.getParent().id;if(typeof c[G]>"u")c[G]=[];c[G]=c[G].concat(C)}Object.keys(c).forEach(function(F){if(c[F].length>1){var P="DummyCompound_"+F;h.memberGroups[P]=c[F];var b=c[F][0].getParent(),U=new l(h.graphManager);U.id=P,U.paddingLeft=b.paddingLeft||0,U.paddingRight=b.paddingRight||0,U.paddingBottom=b.paddingBottom||0,U.paddingTop=b.paddingTop||0,h.idToDummyNode[P]=U;var x=h.getGraphManager().add(h.newGraph(),U),S=b.getChild();S.add(U);for(var Y=0;Y<c[F].length;Y++){var X=c[F][Y];S.remove(X),x.add(X)}}})},T.prototype.clearCompounds=function(){var h={},c={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)c[this.compoundOrder[p].id]=this.compoundOrder[p],h[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(h,c)},T.prototype.clearZeroDegreeMembers=function(){var h=this,c=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var D=h.idToDummyNode[p];c[p]=h.tileNodes(h.memberGroups[p],D.paddingLeft+D.paddingRight),D.rect.width=c[p].width,D.rect.height=c[p].height})},T.prototype.repopulateCompounds=function(){for(var h=this.compoundOrder.length-1;h>=0;h--){var c=this.compoundOrder[h],{id:p,paddingLeft:D,paddingTop:O}=c;this.adjustLocations(this.tiledMemberPack[p],c.rect.x,c.rect.y,D,O)}},T.prototype.repopulateZeroDegreeMembers=function(){var h=this,c=this.tiledZeroDegreePack;Object.keys(c).forEach(function(p){var D=h.idToDummyNode[p],{paddingLeft:O,paddingTop:C}=D;h.adjustLocations(c[p],D.rect.x,D.rect.y,O,C)})},T.prototype.getToBeTiled=function(h){var c=h.id;if(this.toBeTiled[c]!=null)return this.toBeTiled[c];var p=h.getChild();if(p==null)return this.toBeTiled[c]=!1,!1;var D=p.getNodes();for(var O=0;O<D.length;O++){var C=D[O];if(this.getNodeDegree(C)>0)return this.toBeTiled[c]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[c]=!1,!1}return this.toBeTiled[c]=!0,!0},T.prototype.getNodeDegree=function(h){var c=h.id,p=h.getEdges(),D=0;for(var O=0;O<p.length;O++){var C=p[O];if(C.getSource().id!==C.getTarget().id)D=D+1}return D},T.prototype.getNodeDegreeWithChildren=function(h){var c=this.getNodeDegree(h);if(h.getChild()==null)return c;var p=h.getChild().getNodes();for(var D=0;D<p.length;D++){var O=p[D];c+=this.getNodeDegreeWithChildren(O)}return c},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},T.prototype.fillCompexOrderByDFS=function(h){for(var c=0;c<h.length;c++){var p=h[c];if(p.getChild()!=null)this.fillCompexOrderByDFS(p.getChild().getNodes());if(this.getToBeTiled(p))this.compoundOrder.push(p)}},T.prototype.adjustLocations=function(h,c,p,D,O){c+=D,p+=O;var C=c;for(var M=0;M<h.rows.length;M++){var G=h.rows[M];c=C;var F=0;for(var P=0;P<G.length;P++){var b=G[P];if(b.rect.x=c,b.rect.y=p,c+=b.rect.width+h.horizontalPadding,b.rect.height>F)F=b.rect.height}p+=F+h.verticalPadding}},T.prototype.tileCompoundMembers=function(h,c){var p=this;this.tiledMemberPack=[],Object.keys(h).forEach(function(D){var O=c[D];p.tiledMemberPack[D]=p.tileNodes(h[D],O.paddingLeft+O.paddingRight),O.rect.width=p.tiledMemberPack[D].width,O.rect.height=p.tiledMemberPack[D].height})},T.prototype.tileNodes=function(h,c){var{TILING_PADDING_VERTICAL:p,TILING_PADDING_HORIZONTAL:D}=a,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:c,verticalPadding:p,horizontalPadding:D};h.sort(function(G,F){if(G.rect.width*G.rect.height>F.rect.width*F.rect.height)return-1;if(G.rect.width*G.rect.height<F.rect.width*F.rect.height)return 1;return 0});for(var C=0;C<h.length;C++){var M=h[C];if(O.rows.length==0)this.insertNodeToRow(O,M,0,c);else if(this.canAddHorizontal(O,M.rect.width,M.rect.height))this.insertNodeToRow(O,M,this.getShortestRowIndex(O),c);else this.insertNodeToRow(O,M,O.rows.length,c);this.shiftToLastRow(O)}return O},T.prototype.insertNodeToRow=function(h,c,p,D){var O=D;if(p==h.rows.length){var C=[];h.rows.push(C),h.rowWidth.push(O),h.rowHeight.push(0)}var M=h.rowWidth[p]+c.rect.width;if(h.rows[p].length>0)M+=h.horizontalPadding;if(h.rowWidth[p]=M,h.width<M)h.width=M;var G=c.rect.height;if(p>0)G+=h.verticalPadding;var F=0;if(G>h.rowHeight[p])F=h.rowHeight[p],h.rowHeight[p]=G,F=h.rowHeight[p]-F;h.height+=F,h.rows[p].push(c)},T.prototype.getShortestRowIndex=function(h){var c=-1,p=Number.MAX_VALUE;for(var D=0;D<h.rows.length;D++)if(h.rowWidth[D]<p)c=D,p=h.rowWidth[D];return c},T.prototype.getLongestRowIndex=function(h){var c=-1,p=Number.MIN_VALUE;for(var D=0;D<h.rows.length;D++)if(h.rowWidth[D]>p)c=D,p=h.rowWidth[D];return c},T.prototype.canAddHorizontal=function(h,c,p){var D=this.getShortestRowIndex(h);if(D<0)return!0;var O=h.rowWidth[D];if(O+h.horizontalPadding+c<=h.width)return!0;var C=0;if(h.rowHeight[D]<p){if(D>0)C=p+h.verticalPadding-h.rowHeight[D]}var M;if(h.width-O>=c+h.horizontalPadding)M=(h.height+C)/(O+c+h.horizontalPadding);else M=(h.height+C)/h.width;C=p+h.verticalPadding;var G;if(h.width<c)G=(h.height+C)/c;else G=(h.height+C)/h.width;if(G<1)G=1/G;if(M<1)M=1/M;return M<G},T.prototype.shiftToLastRow=function(h){var c=this.getLongestRowIndex(h),p=h.rowWidth.length-1,D=h.rows[c],O=D[D.length-1],C=O.width+h.horizontalPadding;if(h.width-h.rowWidth[p]>C&&c!=p){D.splice(-1,1),h.rows[p].push(O),h.rowWidth[c]=h.rowWidth[c]-C,h.rowWidth[p]=h.rowWidth[p]+C,h.width=h.rowWidth[instance.getLongestRowIndex(h)];var M=Number.MIN_VALUE;for(var G=0;G<D.length;G++)if(D[G].height>M)M=D[G].height;if(c>0)M+=h.verticalPadding;var F=h.rowHeight[c]+h.rowHeight[p];if(h.rowHeight[c]=M,h.rowHeight[p]<O.height+h.verticalPadding)h.rowHeight[p]=O.height+h.verticalPadding;var P=h.rowHeight[c]+h.rowHeight[p];h.height+=P-F,this.shiftToLastRow(h)}},T.prototype.tilingPreLayout=function(){if(a.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},T.prototype.tilingPostLayout=function(){if(a.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},T.prototype.reduceTrees=function(){var h=[],c=!0,p;while(c){var D=this.graphManager.getAllNodes(),O=[];c=!1;for(var C=0;C<D.length;C++)if(p=D[C],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null)O.push([p,p.getEdges()[0],p.getOwner()]),c=!0;if(c==!0){var M=[];for(var G=0;G<O.length;G++)if(O[G][0].getEdges().length==1)M.push(O[G]),O[G][0].getOwner().remove(O[G][0]);h.push(M),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=h},T.prototype.growTree=function(h){var c=h.length,p=h[c-1],D;for(var O=0;O<p.length;O++)D=p[O],this.findPlaceforPrunedNode(D),D[2].add(D[0]),D[2].add(D[1],D[1].source,D[1].target);h.splice(h.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},T.prototype.findPlaceforPrunedNode=function(h){var c,p,D=h[0];if(D==h[1].source)p=h[1].target;else p=h[1].source;var O=p.startX,C=p.finishX,M=p.startY,G=p.finishY,F=0,P=0,b=0,U=0,x=[F,b,P,U];if(M>0)for(var S=O;S<=C;S++)x[0]+=this.grid[S][M-1].length+this.grid[S][M].length-1;if(C<this.grid.length-1)for(var S=M;S<=G;S++)x[1]+=this.grid[C+1][S].length+this.grid[C][S].length-1;if(G<this.grid[0].length-1)for(var S=O;S<=C;S++)x[2]+=this.grid[S][G+1].length+this.grid[S][G].length-1;if(O>0)for(var S=M;S<=G;S++)x[3]+=this.grid[O-1][S].length+this.grid[O][S].length-1;var Y=L.MAX_VALUE,X,H;for(var _=0;_<x.length;_++)if(x[_]<Y)Y=x[_],X=1,H=_;else if(x[_]==Y)X++;if(X==3&&Y==0){if(x[0]==0&&x[1]==0&&x[2]==0)c=1;else if(x[0]==0&&x[1]==0&&x[3]==0)c=0;else if(x[0]==0&&x[2]==0&&x[3]==0)c=3;else if(x[1]==0&&x[2]==0&&x[3]==0)c=2}else if(X==2&&Y==0){var W=Math.floor(Math.random()*2);if(x[0]==0&&x[1]==0)if(W==0)c=0;else c=1;else if(x[0]==0&&x[2]==0)if(W==0)c=0;else c=2;else if(x[0]==0&&x[3]==0)if(W==0)c=0;else c=3;else if(x[1]==0&&x[2]==0)if(W==0)c=1;else c=2;else if(x[1]==0&&x[3]==0)if(W==0)c=1;else c=3;else if(W==0)c=2;else c=3}else if(X==4&&Y==0){var W=Math.floor(Math.random()*4);c=W}else c=H;if(c==0)D.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-v.DEFAULT_EDGE_LENGTH-D.getHeight()/2);else if(c==1)D.setCenter(p.getCenterX()+p.getWidth()/2+v.DEFAULT_EDGE_LENGTH+D.getWidth()/2,p.getCenterY());else if(c==2)D.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+v.DEFAULT_EDGE_LENGTH+D.getHeight()/2);else D.setCenter(p.getCenterX()-p.getWidth()/2-v.DEFAULT_EDGE_LENGTH-D.getWidth()/2,p.getCenterY())},w.exports=T},function(w,E,o){var r={};r.layoutBase=o(0),r.CoSEConstants=o(1),r.CoSEEdge=o(2),r.CoSEGraph=o(3),r.CoSEGraphManager=o(4),r.CoSELayout=o(6),r.CoSENode=o(5),w.exports=r}])})});var it=Ke(function(j,tt){(function(w,E){if(typeof j==="object"&&typeof tt==="object")tt.exports=E(J());else if(typeof define==="function"&&define.amd)define(["cose-base"],E);else if(typeof j==="object")j.cytoscapeCoseBilkent=E(J());else w.cytoscapeCoseBilkent=E(w.coseBase)})(j,function(I){return function(w){var E={};function o(r){if(E[r])return E[r].exports;var t=E[r]={i:r,l:!1,exports:{}};return w[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=w,o.c=E,o.i=function(r){return r},o.d=function(r,t,i){if(!o.o(r,t))Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(t,"a",t),t},o.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},o.p="",o(o.s=1)}([function(w,E){w.exports=I},function(w,E,o){var r=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,f=o(0).CoSENode,a=o(0).layoutBase.PointD,v=o(0).layoutBase.DimensionD,s={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:0.45,nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.5};function u(A,d){var N={};for(var T in A)N[T]=A[T];for(var T in d)N[T]=d[T];return N}function g(A){this.options=u(s,A),y(this.options)}var y=function(d){if(d.nodeRepulsion!=null)i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=d.nodeRepulsion;if(d.idealEdgeLength!=null)i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=d.idealEdgeLength;if(d.edgeElasticity!=null)i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=d.edgeElasticity;if(d.nestingFactor!=null)i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor;if(d.gravity!=null)i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=d.gravity;if(d.numIter!=null)i.MAX_ITERATIONS=t.MAX_ITERATIONS=d.numIter;if(d.gravityRange!=null)i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange;if(d.gravityCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound;if(d.gravityRangeCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound;if(d.initialEnergyOnIncremental!=null)i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental;if(d.quality=="draft")r.QUALITY=0;else if(d.quality=="proof")r.QUALITY=2;else r.QUALITY=1;i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!d.randomize,i.ANIMATE=t.ANIMATE=r.ANIMATE=d.animate,i.TILE=d.tile,i.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical==="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal==="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal};g.prototype.run=function(){var A,d,N=this.options,T=this.idToLNode={},R=this.layout=new l,h=this;h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var c=R.newGraphManager();this.gm=c;var p=this.options.eles.nodes(),D=this.options.eles.edges();this.root=c.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(p),R);for(var O=0;O<D.length;O++){var C=D[O],M=this.idToLNode[C.data("source")],G=this.idToLNode[C.data("target")];if(M!==G&&M.getEdgesBetween(G).length==0){var F=c.add(R.newEdge(),M,G);F.id=C.id()}}var P=function(x,S){if(typeof x==="number")x=S;var Y=x.data("id"),X=h.idToLNode[Y];return{x:X.getRect().getCenterX(),y:X.getRect().getCenterY()}},b=function U(){var x=function(){if(N.fit)N.cy.fit(N.eles,N.padding);if(!A)A=!0,h.cy.one("layoutready",N.ready),h.cy.trigger({type:"layoutready",layout:h})},S=h.options.refresh,Y;for(var X=0;X<S&&!Y;X++)Y=h.stopped||h.layout.tick();if(Y){if(R.checkLayoutSuccess()&&!R.isSubLayout)R.doPostLayout();if(R.tilingPostLayout)R.tilingPostLayout();if(R.isLayoutFinished=!0,h.options.eles.nodes().positions(P),x(),h.cy.one("layoutstop",h.options.stop),h.cy.trigger({type:"layoutstop",layout:h}),d)cancelAnimationFrame(d);A=!1;return}var H=h.layout.getPositionsData();N.eles.nodes().positions(function(_,W){if(typeof _==="number")_=W;if(!_.isParent()){var k=_.id(),B=H[k],V=_;while(B==null)if(B=H[V.data("parent")]||H["DummyCompound_"+V.data("parent")],H[k]=B,V=V.parent()[0],V==null)break;if(B!=null)return{x:B.x,y:B.y};else return{x:_.position("x"),y:_.position("y")}}}),x(),d=requestAnimationFrame(U)};if(R.addListener("layoutstarted",function(){if(h.options.animate==="during")d=requestAnimationFrame(b)}),R.runLayout(),this.options.animate!=="during")h.options.eles.nodes().not(":parent").layoutPositions(h,h.options,P),A=!1;return this},g.prototype.getTopMostNodes=function(A){var d={};for(var N=0;N<A.length;N++)d[A[N].id()]=!0;var T=A.filter(function(R,h){if(typeof R==="number")R=h;var c=R.parent()[0];while(c!=null){if(d[c.id()])return!1;c=c.parent()[0]}return!0});return T},g.prototype.processChildrenList=function(A,d,N){var T=d.length;for(var R=0;R<T;R++){var h=d[R],c=h.children(),p,D=h.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(h.outerWidth()!=null&&h.outerHeight()!=null)p=A.add(new f(N.graphManager,new a(h.position("x")-D.w/2,h.position("y")-D.h/2),new v(parseFloat(D.w),parseFloat(D.h))));else p=A.add(new f(this.graphManager));if(p.id=h.data("id"),p.paddingLeft=parseInt(h.css("padding")),p.paddingTop=parseInt(h.css("padding")),p.paddingRight=parseInt(h.css("padding")),p.paddingBottom=parseInt(h.css("padding")),this.options.nodeDimensionsIncludeLabels){if(h.isParent()){var O=h.boundingBox({includeLabels:!0,includeNodes:!1}).w,C=h.boundingBox({includeLabels:!0,includeNodes:!1}).h,M=h.css("text-halign");p.labelWidth=O,p.labelHeight=C,p.labelPos=M}}if(this.idToLNode[h.data("id")]=p,isNaN(p.rect.x))p.rect.x=0;if(isNaN(p.rect.y))p.rect.y=0;if(c!=null&&c.length>0){var G=N.getGraphManager().add(N.newGraph(),p);this.processChildrenList(G,c,N)}}},g.prototype.stop=function(){return this.stopped=!0,this};var L=function(d){d("layout","cose-bilkent",g)};if(typeof cytoscape<"u")L(cytoscape);w.exports=L}])})});var nt=Fe(it(),1);wt.use(nt.default);function st(I,w){I.forEach((E)=>{let o={id:E.id,labelText:E.label,height:E.height,width:E.width,padding:E.padding??0};Object.keys(E).forEach((r)=>{if(!["id","label","height","width","padding","x","y"].includes(r))o[r]=E[r]}),w.add({group:"nodes",data:o,position:{x:E.x??0,y:E.y??0}})})}e(st,"addNodes");function ot(I,w){I.forEach((E)=>{let o={id:E.id,source:E.start,target:E.end};Object.keys(E).forEach((r)=>{if(!["id","start","end"].includes(r))o[r]=E[r]}),w.add({group:"edges",data:o})})}e(ot,"addEdges");function at(I){return new Promise((w)=>{let E=m("body").append("div").attr("id","cy").attr("style","display:none"),o=wt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});E.remove(),st(I.nodes,o),ot(I.edges,o),o.nodes().forEach(function(t){t.layoutDimensions=()=>{let i=t.data();return{w:i.width,h:i.height}}});let r={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};o.layout(r).run(),o.ready((t)=>{n.info("Cytoscape ready",t),w(o)})})}e(at,"createCytoscapeInstance");function ht(I){return I.nodes().map((w)=>{let E=w.data(),o=w.position(),r={id:E.id,x:o.x,y:o.y};return Object.keys(E).forEach((t)=>{if(t!=="id")r[t]=E[t]}),r})}e(ht,"extractPositionedNodes");function lt(I){return I.edges().map((w)=>{let E=w.data(),o=w._private.rscratch,r={id:E.id,source:E.source,target:E.target,startX:o.startX,startY:o.startY,midX:o.midX,midY:o.midY,endX:o.endX,endY:o.endY};return Object.keys(E).forEach((t)=>{if(!["id","source","target"].includes(t))r[t]=E[t]}),r})}e(lt,"extractPositionedEdges");async function ut(I,w){n.debug("Starting cose-bilkent layout algorithm");try{gt(I);let E=await at(I),o=ht(E),r=lt(E);return n.debug(`Layout completed: ${o.length} nodes, ${r.length} edges`),{nodes:o,edges:r}}catch(E){throw n.error("Error in cose-bilkent layout algorithm:",E),E}}e(ut,"executeCoseBilkentLayout");function gt(I){if(!I)throw Error("Layout data is required");if(!I.config)throw Error("Configuration is required in layout data");if(!I.rootNode)throw Error("Root node is required");if(!I.nodes||!Array.isArray(I.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(I.edges))throw Error("Edges array is required in layout data");return!0}e(gt,"validateLayoutData");var ct=e(async(I,w,{insertCluster:E,insertEdge:o,insertEdgeLabel:r,insertMarkers:t,insertNode:i,log:l,positionEdgeLabel:f},{algorithm:a})=>{let v={},s={},u=w.select("g");t(u,I.markers,I.type,I.diagramId);let g=u.insert("g").attr("class","subgraphs"),y=u.insert("g").attr("class","edgePaths"),L=u.insert("g").attr("class","edgeLabels"),A=u.insert("g").attr("class","nodes");l.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(I.nodes.map(async(T)=>{if(T.isGroup){let R={...T};s[T.id]=R,v[T.id]=R,await E(g,T)}else{let R={...T};v[T.id]=R;let h=await i(A,T,{config:I.config,dir:I.direction||"TB"}),c=h.node().getBBox();R.width=c.width,R.height=c.height,R.domId=h,l.debug(`Node ${T.id} dimensions: ${c.width}x${c.height}`)}})),l.debug("Running cose-bilkent layout algorithm");let d={...I,nodes:I.nodes.map((T)=>{let R=v[T.id];return{...T,width:R.width,height:R.height}})},N=await ut(d,I.config);l.debug("Positioning nodes based on layout results"),N.nodes.forEach((T)=>{let R=v[T.id];if(R?.domId)R.domId.attr("transform",`translate(${T.x}, ${T.y})`),R.x=T.x,R.y=T.y,l.debug(`Positioned node ${R.id} at center (${T.x}, ${T.y})`)}),N.edges.forEach((T)=>{let R=I.edges.find((h)=>h.id===T.id);if(R)R.points=[{x:T.startX,y:T.startY},{x:T.midX,y:T.midY},{x:T.endX,y:T.endY}]}),l.debug("Inserting and positioning edges"),await Promise.all(I.edges.map(async(T)=>{let R=await r(L,T),h=v[T.start??""],c=v[T.end??""];if(h&&c){let p=N.edges.find((D)=>D.id===T.id);if(p){l.debug("APA01 positionedEdge",p);let D={...T},O=o(y,D,s,I.type,h,c,I.diagramId);f(D,O)}else{let D={...T,points:[{x:h.x||0,y:h.y||0},{x:c.x||0,y:c.y||0}]},O=o(y,D,s,I.type,h,c,I.diagramId);f(D,O)}}})),l.debug("Cose-bilkent rendering completed")},"render"),Et=ct;export{Et as render};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Qo}from"./index.7gxz6d1f.js";export{Qo as createCynefinServices};
|
package/dist/chunks/{cynefinDiagram-NJNITYFG.dta2tfnh.js → cynefinDiagram-NJNITYFG.zt7gprt1.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ee}from"./index.
|
|
1
|
+
import{ee}from"./index.r0p3fm9f.js";import{e,n,Me,F,k,j,A,L,R,I,M,D,O,Y,K}from"./index.a1bxkgd3.js";import{se}from"./index.7gxz6d1f.js";var ut=e(()=>({domains:new Map,transitions:[]}),"createDefaultData"),et=ut(),At=e(()=>et.domains,"getDomains"),Bt=e(()=>et.transitions,"getTransitions"),St=e((t)=>{if(!t)return;for(let o of t){let a=o.domain,r=(o.items??[]).map((l)=>({label:l.label}));et.domains.set(a,{name:a,items:r})}},"setDomains"),Mt=e((t)=>{if(!t)return;et.transitions=t.filter((o)=>{if(o.from===o.to)return n.warn(`Cynefin: self-loop transition on domain "${o.from}" is not meaningful and will be skipped.`),!1;return!0}).map((o)=>({from:o.from,to:o.to,label:o.label||void 0}))},"setTransitions"),zt=e(()=>K({...F.cynefin,...k().cynefin}),"getConfig"),Lt=e(()=>{A(),et=ut()},"clear"),at={getDomains:At,getTransitions:Bt,setDomains:St,setTransitions:Mt,getConfig:zt,clear:Lt,setAccTitle:L,getAccTitle:R,setDiagramTitle:D,getDiagramTitle:O,getAccDescription:M,setAccDescription:I},Nt=e((t)=>{ee(t,at),at.setDomains(t.domains),at.setTransitions(t.transitions)},"populate"),Pt={parse:e(async(t)=>{let o=await se("cynefin",t);n.debug(o),Nt(o)},"parse")};function tt(t){let o=t+1831565813|0;return o=Math.imul(o^o>>>15,o|1),o^=o+Math.imul(o^o>>>7,o|61),((o^o>>>14)>>>0)/4294967296}e(tt,"seededRandom");function gt(t){let o=0;for(let a=0;a<t.length;a++){let r=t.charCodeAt(a);o=(o<<5)-o+r,o|=0}return o}e(gt,"hashString");function ht(t,o){if(typeof t==="number"&&Number.isFinite(t)&&t!==0)return t;return gt(o)}e(ht,"resolveSeed");function xt(t,o,a,r){let l=t/2,p=r??t*0.015,nt=7,q=o/7,f=[];for(let i=0;i<=7;i++){let y=tt(a+i*17)*p*2-p;f.push({x:l+y,y:i*q})}let B=`M${f[0].x},${f[0].y}`;for(let i=0;i<f.length-1;i++){let y=f[i],c=f[i+1],m=(y.y+c.y)/2,C=i%2===0?1:-1,h=p*1.5*C*tt(a+i*31+7),U=y.x+h,Q=m,Z=c.x-h;B+=` C${U},${Q} ${Z},${m} ${c.x},${c.y}`}return B}e(xt,"generateFoldPath");function $t(t,o,a,r){let l=o/2,p=r??o*0.015,nt=7,q=t/7,f=[];for(let i=0;i<=7;i++){let y=tt(a+i*23)*p*2-p;f.push({x:i*q,y:l+y})}let B=`M${f[0].x},${f[0].y}`;for(let i=0;i<f.length-1;i++){let y=f[i],c=f[i+1],m=(y.x+c.x)/2,C=i%2===0?1:-1,h=p*1.5*C*tt(a+i*37+11),U=m,Q=y.y+h,Z=m,_=c.y-h;B+=` C${U},${Q} ${Z},${_} ${c.x},${c.y}`}return B}e($t,"generateHorizontalBoundary");function bt(t,o){let a=t/2,r=o*0.5,l=o,p=t*0.03;return[`M${a},${r}`,`C${a+p},${r+(l-r)*0.2}`,`${a-p*1.5},${r+(l-r)*0.55}`,`${a+p*0.5},${r+(l-r)*0.75}`,`C${a-p},${r+(l-r)*0.85}`,`${a+p*0.3},${r+(l-r)*0.95}`,`${a},${l}`].join(" ")}e(bt,"generateCliffPath");function wt(t,o,a,r){return[`M${t-a},${o}`,`A${a},${r} 0 1,1 ${t+a},${o}`,`A${a},${r} 0 1,1 ${t-a},${o}`,"Z"].join(" ")}e(wt,"generateConfusionPath");var yt={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},It=e((t,o)=>{let a=t/2,r=o/2;return{complex:{cx:a/2,cy:r/2,x:0,y:0,w:a,h:r},complicated:{cx:a+a/2,cy:r/2,x:a,y:0,w:a,h:r},chaotic:{cx:a/2,cy:r+r/2,x:0,y:r,w:a,h:r},clear:{cx:a+a/2,cy:r+r/2,x:a,y:r,w:a,h:r},confusion:{cx:a,cy:r,x:a*0.7,y:r*0.7,w:a*0.6,h:r*0.6}}},"getDomainLayouts"),Wt=e(()=>{let t=Me(),o=k();return K(t,o.themeVariables).cynefin},"getCynefinDomainColors"),st=3,Rt=e((t,o,a,r)=>{let l=r.db,p=l.getDomains(),nt=l.getTransitions(),q=l.getDiagramTitle(),f=l.getAccTitle(),B=l.getAccDescription(),i=l.getConfig(),y=Wt();n.debug("Rendering Cynefin diagram");let{width:c,height:m,padding:C,showDomainDescriptions:h,boundaryAmplitude:U}=i,Q=c+C*2,Z=m+C*2,_={complex:y.complexBg,complicated:y.complicatedBg,clear:y.clearBg,chaotic:y.chaoticBg,confusion:y.confusionBg},S=Y(o);if(j(S,Z,Q,i.useMaxWidth??!0),S.attr("viewBox",`0 0 ${Q} ${Z}`),f)S.append("title").text(f);if(B)S.append("desc").text(B);let z=S.append("g").attr("transform",`translate(${C}, ${C})`),J=It(c,m),ct=ht(i.seed,o),Ct=z.append("g").attr("class","cynefin-backgrounds"),rt=["complex","complicated","chaotic","clear"];for(let d of rt){let s=J[d];Ct.append("rect").attr("class","cynefinDomain").attr("x",s.x).attr("y",s.y).attr("width",s.w).attr("height",s.h).attr("fill",_[d]).attr("fill-opacity",0.4).attr("stroke","none")}let it=z.append("g").attr("class","cynefin-boundaries");it.append("path").attr("class","cynefinBoundary").attr("d",xt(c,m,ct,U)).attr("fill","none"),it.append("path").attr("class","cynefinBoundary").attr("d",$t(c,m,ct+100,U)).attr("fill","none"),it.append("path").attr("class","cynefinCliff").attr("d",bt(c,m)).attr("fill","none");let vt=c*0.15,Dt=m*0.15;z.append("path").attr("class","cynefinConfusion").attr("d",wt(c/2,m/2,vt,Dt)).attr("fill",_.confusion).attr("fill-opacity",0.5);let lt=z.append("g").attr("class","cynefin-labels");for(let d of rt){let s=J[d];lt.append("text").attr("class","cynefinDomainLabel").attr("x",s.cx).attr("y",h?s.cy-30:s.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d.charAt(0).toUpperCase()+d.slice(1))}if(lt.append("text").attr("class","cynefinDomainLabel").attr("x",c/2).attr("y",h?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let d=z.append("g").attr("class","cynefin-subtitles");for(let s of rt){let g=J[s],u=yt[s];d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.model),d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.practice)}d.append("text").attr("class","cynefinSubtitle").attr("x",c/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(yt.confusion.practice)}let dt=z.append("g").attr("class","cynefin-items"),N=26,ft=10,kt=["complex","complicated","chaotic","clear","confusion"];for(let d of kt){let s=p.get(d);if(!s||s.items.length===0)continue;let g=J[d],u=d==="confusion",E=s.items,H=0;if(u&&s.items.length>st)H=s.items.length-st,E=s.items.slice(0,st);let P;if(u){let b=h?22:14;P=g.cy+b}else P=g.cy+(h?25:15);if([...E].forEach((b,W)=>{let v=P+W*(N+4),V=dt.append("g"),G=V.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",N/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(b.label),w=b.label.length*7,x=G.node();if(x&&typeof x.getBBox==="function"){let ot=x.getBBox();if(ot.width>0)w=ot.width}let T=w+ft*2,X=g.cx-T/2;V.attr("transform",`translate(${X}, ${v})`),V.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",T).attr("height",N).attr("rx",4).attr("ry",4).attr("fill",_[d]).attr("fill-opacity",0.95),G.attr("x",T/2).attr("y",N/2)}),H>0){let b=P+E.length*(N+4),W=`+${H} more`,v=dt.append("g"),V=v.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",N/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(W),G=W.length*7,w=V.node();if(w&&typeof w.getBBox==="function"){let X=w.getBBox();if(X.width>0)G=X.width}let x=G+ft*2,T=g.cx-x/2;v.attr("transform",`translate(${T}, ${b})`),v.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",N).attr("rx",4).attr("ry",4).attr("fill",_[d]).attr("fill-opacity",0.6),V.attr("x",x/2).attr("y",N/2)}}if(nt.length>0){let d=S.select("defs").empty()?S.append("defs"):S.select("defs"),s=`cynefin-arrow-${o}`;d.append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let g=z.append("g").attr("class","cynefin-arrows");nt.forEach((u)=>{let E=J[u.from],H=J[u.to];if(!E||!H)return;if(u.from===u.to){n.warn(`Cynefin renderer: skipping self-loop on domain "${u.from}"`);return}let{cx:P,cy:b}=E,{cx:W,cy:v}=H,V=(P+W)/2,G=(b+v)/2,w=W-P,x=v-b,T=Math.sqrt(w*w+x*x),X=T*0.15,ot=-x/T,Tt=w/T,mt=V+ot*X,pt=G+Tt*X;if(g.append("path").attr("class","cynefinArrowLine").attr("d",`M${P},${b} Q${mt},${pt} ${W},${v}`).attr("fill","none").attr("marker-end",`url(#${s})`),u.label)g.append("text").attr("class","cynefinArrowLabel").attr("x",mt).attr("y",pt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(u.label)})}if(q)z.append("text").attr("class","cynefinTitle").attr("x",c/2).attr("y",-C/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(q)},"draw"),Ft={draw:Rt},Vt=e(()=>{let t=Me(),o=k();return K(t,o.themeVariables).cynefin},"getCynefinTheme"),_t=e(()=>{let t=Vt();return`
|
|
2
2
|
.cynefinDomain {
|
|
3
3
|
stroke: none;
|
|
4
4
|
}
|