mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
1 lines • 152 kB
JavaScript
import{a as Ne}from"./chunk-MBJCTAW2.mjs";import{a as _e}from"./chunk-4KE642ED.mjs";import{a as je}from"./chunk-RPR3SYFS.mjs";import"./chunk-P6UA7CIO.mjs";import"./chunk-4AZJR7FE.mjs";import"./chunk-XAVRVNBM.mjs";import"./chunk-JHXWDPGM.mjs";import"./chunk-V4WPH7A7.mjs";import{a as tr}from"./chunk-U7M5BGKE.mjs";import{a as He,b as We,c as ue,g as de}from"./chunk-IXVBHSNP.mjs";import{l as Ke}from"./chunk-3R3PQ5PD.mjs";import"./chunk-TI4EEUUG.mjs";import{O as Ve,Q as Be,R as ze,S as $e,T as ke,U as Ze,V as Je,W as qe,Y as ge,c as fe,ha as Qe,l as Ye,t as Ue,y as Xe}from"./chunk-F632ZYSZ.mjs";import"./chunk-WSUO5DN6.mjs";import"./chunk-JCWWVGLQ.mjs";import"./chunk-L6MQJ2ZU.mjs";import"./chunk-5ZJXQJOJ.mjs";import"./chunk-YPUTD6PB.mjs";import"./chunk-6BY5RJGC.mjs";import{a as L,b as Ae,e as yr}from"./chunk-GTKDMUJJ.mjs";var xe=Ae((se,we)=>{"use strict";L(function(C,T){typeof se=="object"&&typeof we=="object"?we.exports=T():typeof define=="function"&&define.amd?define([],T):typeof se=="object"?se.layoutBase=T():C.layoutBase=T()},"webpackUniversalModuleDefinition")(se,function(){return function(D){var C={};function T(g){if(C[g])return C[g].exports;var o=C[g]={i:g,l:!1,exports:{}};return D[g].call(o.exports,o,o.exports,T),o.l=!0,o.exports}return L(T,"__webpack_require__"),T.m=D,T.c=C,T.i=function(g){return g},T.d=function(g,o,n){T.o(g,o)||Object.defineProperty(g,o,{configurable:!1,enumerable:!0,get:n})},T.n=function(g){var o=g&&g.__esModule?L(function(){return g.default},"getDefault"):L(function(){return g},"getModuleExports");return T.d(o,"a",o),o},T.o=function(g,o){return Object.prototype.hasOwnProperty.call(g,o)},T.p="",T(T.s=28)}([function(D,C,T){"use strict";function g(){}L(g,"LayoutConstants"),g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,D.exports=g},function(D,C,T){"use strict";var g=T(2),o=T(8),n=T(9);function r(c,t,u){g.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=c,this.target=t}L(r,"LEdge"),r.prototype=Object.create(g.prototype);for(var a in g)r[a]=g[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(c){if(this.source===c)return this.target;if(this.target===c)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(c,t){for(var u=this.getOtherEnd(c),i=t.getGraphManager().getRoot();;){if(u.getOwner()==t)return u;if(u.getOwner()==i)break;u=u.getOwner().getParent()}return null},r.prototype.updateLength=function(){var c=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),c),this.isOverlapingSourceAndTarget||(this.lengthX=c[0]-c[2],this.lengthY=c[1]-c[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},D.exports=r},function(D,C,T){"use strict";function g(o){this.vGraphObject=o}L(g,"LGraphObject"),D.exports=g},function(D,C,T){"use strict";var g=T(2),o=T(10),n=T(13),r=T(0),a=T(16),c=T(5);function t(i,e,l,f){l==null&&f==null&&(f=e),g.call(this,f),i.graphManager!=null&&(i=i.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=i,l!=null&&e!=null?this.rect=new n(e.x,e.y,l.width,l.height):this.rect=new n}L(t,"LNode"),t.prototype=Object.create(g.prototype);for(var u in g)t[u]=g[u];t.prototype.getEdges=function(){return this.edges},t.prototype.getChild=function(){return this.child},t.prototype.getOwner=function(){return this.owner},t.prototype.getWidth=function(){return this.rect.width},t.prototype.setWidth=function(i){this.rect.width=i},t.prototype.getHeight=function(){return this.rect.height},t.prototype.setHeight=function(i){this.rect.height=i},t.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},t.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},t.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},t.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},t.prototype.getRect=function(){return this.rect},t.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},t.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},t.prototype.setRect=function(i,e){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=e.width,this.rect.height=e.height},t.prototype.setCenter=function(i,e){this.rect.x=i-this.rect.width/2,this.rect.y=e-this.rect.height/2},t.prototype.setLocation=function(i,e){this.rect.x=i,this.rect.y=e},t.prototype.moveBy=function(i,e){this.rect.x+=i,this.rect.y+=e},t.prototype.getEdgeListToNode=function(i){var e=[],l,f=this;return f.edges.forEach(function(h){if(h.target==i){if(h.source!=f)throw"Incorrect edge source!";e.push(h)}}),e},t.prototype.getEdgesBetween=function(i){var e=[],l,f=this;return f.edges.forEach(function(h){if(!(h.source==f||h.target==f))throw"Incorrect edge source and/or target";(h.target==i||h.source==i)&&e.push(h)}),e},t.prototype.getNeighborsList=function(){var i=new Set,e=this;return e.edges.forEach(function(l){if(l.source==e)i.add(l.target);else{if(l.target!=e)throw"Incorrect incidency!";i.add(l.source)}}),i},t.prototype.withChildren=function(){var i=new Set,e,l;if(i.add(this),this.child!=null)for(var f=this.child.getNodes(),h=0;h<f.length;h++)e=f[h],l=e.withChildren(),l.forEach(function(A){i.add(A)});return i},t.prototype.getNoOfChildren=function(){var i=0,e;if(this.child==null)i=1;else for(var l=this.child.getNodes(),f=0;f<l.length;f++)e=l[f],i+=e.getNoOfChildren();return i==0&&(i=1),i},t.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},t.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},t.prototype.scatter=function(){var i,e,l=-r.INITIAL_WORLD_BOUNDARY,f=r.INITIAL_WORLD_BOUNDARY;i=r.WORLD_CENTER_X+a.nextDouble()*(f-l)+l;var h=-r.INITIAL_WORLD_BOUNDARY,A=r.INITIAL_WORLD_BOUNDARY;e=r.WORLD_CENTER_Y+a.nextDouble()*(A-h)+h,this.rect.x=i,this.rect.y=e},t.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var e=i.getRight()-i.getLeft(),l=i.getBottom()-i.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>e?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(e+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(l+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>l?(this.rect.y-=(this.labelHeight-l)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(l+this.labelHeight))}}},t.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},t.prototype.transform=function(i){var e=this.rect.x;e>r.WORLD_BOUNDARY?e=r.WORLD_BOUNDARY:e<-r.WORLD_BOUNDARY&&(e=-r.WORLD_BOUNDARY);var l=this.rect.y;l>r.WORLD_BOUNDARY?l=r.WORLD_BOUNDARY:l<-r.WORLD_BOUNDARY&&(l=-r.WORLD_BOUNDARY);var f=new c(e,l),h=i.inverseTransformPoint(f);this.setLocation(h.x,h.y)},t.prototype.getLeft=function(){return this.rect.x},t.prototype.getRight=function(){return this.rect.x+this.rect.width},t.prototype.getTop=function(){return this.rect.y},t.prototype.getBottom=function(){return this.rect.y+this.rect.height},t.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},D.exports=t},function(D,C,T){"use strict";var g=T(0);function o(){}L(o,"FDLayoutConstants");for(var n in g)o[n]=g[n];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=o.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,D.exports=o},function(D,C,T){"use strict";function g(o,n){o==null&&n==null?(this.x=0,this.y=0):(this.x=o,this.y=n)}L(g,"PointD"),g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(o){this.x=o},g.prototype.setY=function(o){this.y=o},g.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},D.exports=g},function(D,C,T){"use strict";var g=T(2),o=T(10),n=T(0),r=T(7),a=T(3),c=T(1),t=T(13),u=T(12),i=T(11);function e(f,h,A){g.call(this,A),this.estimatedSize=o.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=f,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}L(e,"LGraph"),e.prototype=Object.create(g.prototype);for(var l in g)e[l]=g[l];e.prototype.getNodes=function(){return this.nodes},e.prototype.getEdges=function(){return this.edges},e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getParent=function(){return this.parent},e.prototype.getLeft=function(){return this.left},e.prototype.getRight=function(){return this.right},e.prototype.getTop=function(){return this.top},e.prototype.getBottom=function(){return this.bottom},e.prototype.isConnected=function(){return this.isConnected},e.prototype.add=function(f,h,A){if(h==null&&A==null){var v=f;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var y=f;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(A)>-1))throw"Source or target not in graph!";if(!(h.owner==A.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=A.owner?null:(y.source=h,y.target=A,y.isInterGraph=!1,this.getEdges().push(y),h.edges.push(y),A!=h&&A.edges.push(y),y)}},e.prototype.remove=function(f){var h=f;if(f instanceof a){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var A=h.edges.slice(),v,y=A.length,N=0;N<y;N++)v=A[N],v.isInterGraph?this.graphManager.remove(v):v.source.owner.remove(v);var S=this.nodes.indexOf(h);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(f instanceof c){var v=f;if(v==null)throw"Edge is null!";if(!(v.source!=null&&v.target!=null))throw"Source and/or target is null!";if(!(v.source.owner!=null&&v.target.owner!=null&&v.source.owner==this&&v.target.owner==this))throw"Source and/or target owner is invalid!";var M=v.source.edges.indexOf(v),b=v.target.edges.indexOf(v);if(!(M>-1&&b>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(M,1),v.target!=v.source&&v.target.edges.splice(b,1);var S=v.source.owner.getEdges().indexOf(v);if(S==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(S,1)}},e.prototype.updateLeftTop=function(){for(var f=o.MAX_VALUE,h=o.MAX_VALUE,A,v,y,N=this.getNodes(),S=N.length,M=0;M<S;M++){var b=N[M];A=b.getTop(),v=b.getLeft(),f>A&&(f=A),h>v&&(h=v)}return f==o.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?y=N[0].getParent().paddingLeft:y=this.margin,this.left=h-y,this.top=f-y,new u(this.left,this.top))},e.prototype.updateBounds=function(f){for(var h=o.MAX_VALUE,A=-o.MAX_VALUE,v=o.MAX_VALUE,y=-o.MAX_VALUE,N,S,M,b,$,X=this.nodes,et=X.length,R=0;R<et;R++){var J=X[R];f&&J.child!=null&&J.updateBounds(),N=J.getLeft(),S=J.getRight(),M=J.getTop(),b=J.getBottom(),h>N&&(h=N),A<S&&(A=S),v>M&&(v=M),y<b&&(y=b)}var s=new t(h,v,A-h,y-v);h==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),X[0].getParent().paddingLeft!=null?$=X[0].getParent().paddingLeft:$=this.margin,this.left=s.x-$,this.right=s.x+s.width+$,this.top=s.y-$,this.bottom=s.y+s.height+$},e.calculateBounds=function(f){for(var h=o.MAX_VALUE,A=-o.MAX_VALUE,v=o.MAX_VALUE,y=-o.MAX_VALUE,N,S,M,b,$=f.length,X=0;X<$;X++){var et=f[X];N=et.getLeft(),S=et.getRight(),M=et.getTop(),b=et.getBottom(),h>N&&(h=N),A<S&&(A=S),v>M&&(v=M),y<b&&(y=b)}var R=new t(h,v,A-h,y-v);return R},e.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){for(var f=0,h=this.nodes,A=h.length,v=0;v<A;v++){var y=h[v];f+=y.calcEstimatedSize()}return f==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=f/Math.sqrt(this.nodes.length),this.estimatedSize},e.prototype.updateConnected=function(){var f=this;if(this.nodes.length==0){this.isConnected=!0;return}var h=new i,A=new Set,v=this.nodes[0],y,N,S=v.withChildren();for(S.forEach(function(R){h.push(R),A.add(R)});h.length!==0;){v=h.shift(),y=v.getEdges();for(var M=y.length,b=0;b<M;b++){var $=y[b];if(N=$.getOtherEndInGraph(v,this),N!=null&&!A.has(N)){var X=N.withChildren();X.forEach(function(R){h.push(R),A.add(R)})}}}if(this.isConnected=!1,A.size>=this.nodes.length){var et=0;A.forEach(function(R){R.owner==f&&et++}),et==this.nodes.length&&(this.isConnected=!0)}},D.exports=e},function(D,C,T){"use strict";var g,o=T(1);function n(r){g=T(6),this.layout=r,this.graphs=[],this.edges=[]}L(n,"LGraphManager"),n.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),c=this.add(r,a);return this.setRootGraph(c),this.rootGraph},n.prototype.add=function(r,a,c,t,u){if(c==null&&t==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=c,t=a,c=r;var i=t.getOwner(),e=u.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(e!=null&&e.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==e)return c.isInterGraph=!1,i.add(c,t,u);if(c.isInterGraph=!0,c.source=t,c.target=u,this.edges.indexOf(c)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(c),!(c.source!=null&&c.target!=null))throw"Edge source and/or target is null!";if(!(c.source.edges.indexOf(c)==-1&&c.target.edges.indexOf(c)==-1))throw"Edge already in source and/or target incidency list!";return c.source.edges.push(c),c.target.edges.push(c),c}},n.prototype.remove=function(r){if(r instanceof g){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var c=[];c=c.concat(a.getEdges());for(var t,u=c.length,i=0;i<u;i++)t=c[i],a.remove(t);var e=[];e=e.concat(a.getNodes());var l;u=e.length;for(var i=0;i<u;i++)l=e[i],a.remove(l);a==this.rootGraph&&this.setRootGraph(null);var f=this.graphs.indexOf(a);this.graphs.splice(f,1),a.parent=null}else if(r instanceof o){if(t=r,t==null)throw"Edge is null!";if(!t.isInterGraph)throw"Not an inter-graph edge!";if(!(t.source!=null&&t.target!=null))throw"Source and/or target is null!";if(!(t.source.edges.indexOf(t)!=-1&&t.target.edges.indexOf(t)!=-1))throw"Source and/or target doesn't know this edge!";var f=t.source.edges.indexOf(t);if(t.source.edges.splice(f,1),f=t.target.edges.indexOf(t),t.target.edges.splice(f,1),!(t.source.owner!=null&&t.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(t.source.owner.getGraphManager().edges.indexOf(t)==-1)throw"Not in owner graph manager's edge list!";var f=t.source.owner.getGraphManager().edges.indexOf(t);t.source.owner.getGraphManager().edges.splice(f,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),c=a.length,t=0;t<c;t++)r=r.concat(a[t].getNodes());this.allNodes=r}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){for(var r=[],a=this.getGraphs(),c=a.length,t=0;t<a.length;t++)r=r.concat(a[t].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var c=r.getOwner(),t;do{if(t=c.getParent(),t==null)break;if(t==a)return!0;if(c=t.getOwner(),c==null)break}while(!0);c=a.getOwner();do{if(t=c.getParent(),t==null)break;if(t==r)return!0;if(c=t.getOwner(),c==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var r,a,c,t,u,i=this.getAllEdges(),e=i.length,l=0;l<e;l++){if(r=i[l],a=r.source,c=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=c,a==c){r.lca=a.getOwner();continue}for(t=a.getOwner();r.lca==null;){for(r.targetInLca=c,u=c.getOwner();r.lca==null;){if(u==t){r.lca=u;break}if(u==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=u.getParent(),u=r.targetInLca.getOwner()}if(t==this.rootGraph)break;r.lca==null&&(r.sourceInLca=t.getParent(),t=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var c=r.getOwner();do{if(c==null)break;var t=a.getOwner();do{if(t==null)break;if(t==c)return t;t=t.getParent().getOwner()}while(!0);c=c.getParent().getOwner()}while(!0);return c},n.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var c,t=r.getNodes(),u=t.length,i=0;i<u;i++)c=t[i],c.inclusionTreeDepth=a,c.child!=null&&this.calcInclusionTreeDepths(c.child,a+1)},n.prototype.includesInvalidEdge=function(){for(var r,a=[],c=this.edges.length,t=0;t<c;t++)r=this.edges[t],this.isOneAncestorOfOther(r.source,r.target)&&a.push(r);for(var t=0;t<a.length;t++)this.remove(a[t]);return!1},D.exports=n},function(D,C,T){"use strict";var g=T(12);function o(){}L(o,"IGeometry"),o.calcSeparationAmount=function(n,r,a,c){if(!n.intersects(r))throw"assert failed";var t=new Array(2);this.decideDirectionsForOverlappingNodes(n,r,t),a[0]=Math.min(n.getRight(),r.getRight())-Math.max(n.x,r.x),a[1]=Math.min(n.getBottom(),r.getBottom())-Math.max(n.y,r.y),n.getX()<=r.getX()&&n.getRight()>=r.getRight()?a[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(a[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(a[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var u=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(u=1);var i=u*a[0],e=a[1]/u;a[0]<e?e=a[0]:i=a[1],a[0]=-1*t[0]*(e/2+c),a[1]=-1*t[1]*(i/2+c)},o.decideDirectionsForOverlappingNodes=function(n,r,a){n.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,n.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},o.getIntersection2=function(n,r,a){var c=n.getCenterX(),t=n.getCenterY(),u=r.getCenterX(),i=r.getCenterY();if(n.intersects(r))return a[0]=c,a[1]=t,a[2]=u,a[3]=i,!0;var e=n.getX(),l=n.getY(),f=n.getRight(),h=n.getX(),A=n.getBottom(),v=n.getRight(),y=n.getWidthHalf(),N=n.getHeightHalf(),S=r.getX(),M=r.getY(),b=r.getRight(),$=r.getX(),X=r.getBottom(),et=r.getRight(),R=r.getWidthHalf(),J=r.getHeightHalf(),s=!1,m=!1;if(c===u){if(t>i)return a[0]=c,a[1]=l,a[2]=u,a[3]=X,!1;if(t<i)return a[0]=c,a[1]=A,a[2]=u,a[3]=M,!1}else if(t===i){if(c>u)return a[0]=e,a[1]=t,a[2]=b,a[3]=i,!1;if(c<u)return a[0]=f,a[1]=t,a[2]=S,a[3]=i,!1}else{var p=n.height/n.width,E=r.height/r.width,d=(i-t)/(u-c),O=void 0,x=void 0,G=void 0,F=void 0,I=void 0,Z=void 0;if(-p===d?c>u?(a[0]=h,a[1]=A,s=!0):(a[0]=f,a[1]=l,s=!0):p===d&&(c>u?(a[0]=e,a[1]=l,s=!0):(a[0]=v,a[1]=A,s=!0)),-E===d?u>c?(a[2]=$,a[3]=X,m=!0):(a[2]=b,a[3]=M,m=!0):E===d&&(u>c?(a[2]=S,a[3]=M,m=!0):(a[2]=et,a[3]=X,m=!0)),s&&m)return!1;if(c>u?t>i?(O=this.getCardinalDirection(p,d,4),x=this.getCardinalDirection(E,d,2)):(O=this.getCardinalDirection(-p,d,3),x=this.getCardinalDirection(-E,d,1)):t>i?(O=this.getCardinalDirection(-p,d,1),x=this.getCardinalDirection(-E,d,3)):(O=this.getCardinalDirection(p,d,2),x=this.getCardinalDirection(E,d,4)),!s)switch(O){case 1:F=l,G=c+-N/d,a[0]=G,a[1]=F;break;case 2:G=v,F=t+y*d,a[0]=G,a[1]=F;break;case 3:F=A,G=c+N/d,a[0]=G,a[1]=F;break;case 4:G=h,F=t+-y*d,a[0]=G,a[1]=F;break}if(!m)switch(x){case 1:Z=M,I=u+-J/d,a[2]=I,a[3]=Z;break;case 2:I=et,Z=i+R*d,a[2]=I,a[3]=Z;break;case 3:Z=X,I=u+J/d,a[2]=I,a[3]=Z;break;case 4:I=$,Z=i+-R*d,a[2]=I,a[3]=Z;break}}return!1},o.getCardinalDirection=function(n,r,a){return n>r?a:1+a%4},o.getIntersection=function(n,r,a,c){if(c==null)return this.getIntersection2(n,r,a);var t=n.x,u=n.y,i=r.x,e=r.y,l=a.x,f=a.y,h=c.x,A=c.y,v=void 0,y=void 0,N=void 0,S=void 0,M=void 0,b=void 0,$=void 0,X=void 0,et=void 0;return N=e-u,M=t-i,$=i*u-t*e,S=A-f,b=l-h,X=h*f-l*A,et=N*b-S*M,et===0?null:(v=(M*X-b*$)/et,y=(S*$-N*X)/et,new g(v,y))},o.angleOfVector=function(n,r,a,c){var t=void 0;return n!==a?(t=Math.atan((c-r)/(a-n)),a<n?t+=Math.PI:c<r&&(t+=this.TWO_PI)):c<r?t=this.ONE_AND_HALF_PI:t=this.HALF_PI,t},o.doIntersect=function(n,r,a,c){var t=n.x,u=n.y,i=r.x,e=r.y,l=a.x,f=a.y,h=c.x,A=c.y,v=(i-t)*(A-f)-(h-l)*(e-u);if(v===0)return!1;var y=((A-f)*(h-t)+(l-h)*(A-u))/v,N=((u-e)*(h-t)+(i-t)*(A-u))/v;return 0<y&&y<1&&0<N&&N<1},o.findCircleLineIntersections=function(n,r,a,c,t,u,i){var e=(a-n)*(a-n)+(c-r)*(c-r),l=2*((n-t)*(a-n)+(r-u)*(c-r)),f=(n-t)*(n-t)+(r-u)*(r-u)-i*i,h=l*l-4*e*f;if(h>=0){var A=(-l+Math.sqrt(l*l-4*e*f))/(2*e),v=(-l-Math.sqrt(l*l-4*e*f))/(2*e),y=null;return A>=0&&A<=1?[A]:v>=0&&v<=1?[v]:y}else return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,D.exports=o},function(D,C,T){"use strict";function g(){}L(g,"IMath"),g.sign=function(o){return o>0?1:o<0?-1:0},g.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},g.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},D.exports=g},function(D,C,T){"use strict";function g(){}L(g,"Integer"),g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,D.exports=g},function(D,C,T){"use strict";var g=function(){function t(u,i){for(var e=0;e<i.length;e++){var l=i[e];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(u,l.key,l)}}return L(t,"defineProperties"),function(u,i,e){return i&&t(u.prototype,i),e&&t(u,e),u}}();function o(t,u){if(!(t instanceof u))throw new TypeError("Cannot call a class as a function")}L(o,"_classCallCheck");var n=L(function(u){return{value:u,next:null,prev:null}},"nodeFrom"),r=L(function(u,i,e,l){return u!==null?u.next=i:l.head=i,e!==null?e.prev=i:l.tail=i,i.prev=u,i.next=e,l.length++,i},"add"),a=L(function(u,i){var e=u.prev,l=u.next;return e!==null?e.next=l:i.head=l,l!==null?l.prev=e:i.tail=e,u.prev=u.next=null,i.length--,u},"_remove"),c=function(){function t(u){var i=this;o(this,t),this.length=0,this.head=null,this.tail=null,u?.forEach(function(e){return i.push(e)})}return L(t,"LinkedList"),g(t,[{key:"size",value:L(function(){return this.length},"size")},{key:"insertBefore",value:L(function(i,e){return r(e.prev,n(i),e,this)},"insertBefore")},{key:"insertAfter",value:L(function(i,e){return r(e,n(i),e.next,this)},"insertAfter")},{key:"insertNodeBefore",value:L(function(i,e){return r(e.prev,i,e,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:L(function(i,e){return r(e,i,e.next,this)},"insertNodeAfter")},{key:"push",value:L(function(i){return r(this.tail,n(i),null,this)},"push")},{key:"unshift",value:L(function(i){return r(null,n(i),this.head,this)},"unshift")},{key:"remove",value:L(function(i){return a(i,this)},"remove")},{key:"pop",value:L(function(){return a(this.tail,this).value},"pop")},{key:"popNode",value:L(function(){return a(this.tail,this)},"popNode")},{key:"shift",value:L(function(){return a(this.head,this).value},"shift")},{key:"shiftNode",value:L(function(){return a(this.head,this)},"shiftNode")},{key:"get_object_at",value:L(function(i){if(i<=this.length()){for(var e=1,l=this.head;e<i;)l=l.next,e++;return l.value}},"get_object_at")},{key:"set_object_at",value:L(function(i,e){if(i<=this.length()){for(var l=1,f=this.head;l<i;)f=f.next,l++;f.value=e}},"set_object_at")}]),t}();D.exports=c},function(D,C,T){"use strict";function g(o,n,r){this.x=null,this.y=null,o==null&&n==null&&r==null?(this.x=0,this.y=0):typeof o=="number"&&typeof n=="number"&&r==null?(this.x=o,this.y=n):o.constructor.name=="Point"&&n==null&&r==null&&(r=o,this.x=r.x,this.y=r.y)}L(g,"Point"),g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.getLocation=function(){return new g(this.x,this.y)},g.prototype.setLocation=function(o,n,r){o.constructor.name=="Point"&&n==null&&r==null?(r=o,this.setLocation(r.x,r.y)):typeof o=="number"&&typeof n=="number"&&r==null&&(parseInt(o)==o&&parseInt(n)==n?this.move(o,n):(this.x=Math.floor(o+.5),this.y=Math.floor(n+.5)))},g.prototype.move=function(o,n){this.x=o,this.y=n},g.prototype.translate=function(o,n){this.x+=o,this.y+=n},g.prototype.equals=function(o){if(o.constructor.name=="Point"){var n=o;return this.x==n.x&&this.y==n.y}return this==o},g.prototype.toString=function(){return new g().constructor.name+"[x="+this.x+",y="+this.y+"]"},D.exports=g},function(D,C,T){"use strict";function g(o,n,r,a){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&n!=null&&r!=null&&a!=null&&(this.x=o,this.y=n,this.width=r,this.height=a)}L(g,"RectangleD"),g.prototype.getX=function(){return this.x},g.prototype.setX=function(o){this.x=o},g.prototype.getY=function(){return this.y},g.prototype.setY=function(o){this.y=o},g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(o){this.width=o},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(o){this.height=o},g.prototype.getRight=function(){return this.x+this.width},g.prototype.getBottom=function(){return this.y+this.height},g.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},g.prototype.getCenterX=function(){return this.x+this.width/2},g.prototype.getMinX=function(){return this.getX()},g.prototype.getMaxX=function(){return this.getX()+this.width},g.prototype.getCenterY=function(){return this.y+this.height/2},g.prototype.getMinY=function(){return this.getY()},g.prototype.getMaxY=function(){return this.getY()+this.height},g.prototype.getWidthHalf=function(){return this.width/2},g.prototype.getHeightHalf=function(){return this.height/2},D.exports=g},function(D,C,T){"use strict";var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function o(){}L(o,"UniqueIDGeneretor"),o.lastID=0,o.createID=function(n){return o.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=o.getString(),o.lastID++),n.uniqueID)},o.getString=function(n){return n==null&&(n=o.lastID),"Object#"+n},o.isPrimitive=function(n){var r=typeof n>"u"?"undefined":g(n);return n==null||r!="object"&&r!="function"},D.exports=o},function(D,C,T){"use strict";function g(l){if(Array.isArray(l)){for(var f=0,h=Array(l.length);f<l.length;f++)h[f]=l[f];return h}else return Array.from(l)}L(g,"_toConsumableArray");var o=T(0),n=T(7),r=T(3),a=T(1),c=T(6),t=T(5),u=T(17),i=T(29);function e(l){i.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,l!=null&&(this.isRemoteUse=l)}L(e,"Layout"),e.RANDOM_SEED=1,e.prototype=Object.create(i.prototype),e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},e.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},e.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},e.prototype.newGraphManager=function(){var l=new n(this);return this.graphManager=l,l},e.prototype.newGraph=function(l){return new c(null,this.graphManager,l)},e.prototype.newNode=function(l){return new r(this.graphManager,l)},e.prototype.newEdge=function(l){return new a(null,null,l)},e.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},e.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var l;return this.checkLayoutSuccess()?l=!1:l=this.layout(),o.ANIMATE==="during"?!1:(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},e.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},e.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var l,f=this.graphManager.getAllEdges(),h=0;h<f.length;h++)l=f[h];for(var A,v=this.graphManager.getRoot().getNodes(),h=0;h<v.length;h++)A=v[h];this.update(this.graphManager.getRoot())}},e.prototype.update=function(l){if(l==null)this.update2();else if(l instanceof r){var f=l;if(f.getChild()!=null)for(var h=f.getChild().getNodes(),A=0;A<h.length;A++)update(h[A]);if(f.vGraphObject!=null){var v=f.vGraphObject;v.update(f)}}else if(l instanceof a){var y=l;if(y.vGraphObject!=null){var N=y.vGraphObject;N.update(y)}}else if(l instanceof c){var S=l;if(S.vGraphObject!=null){var M=S.vGraphObject;M.update(S)}}},e.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},e.prototype.transform=function(l){if(l==null)this.transform(new t(0,0));else{var f=new u,h=this.graphManager.getRoot().updateLeftTop();if(h!=null){f.setWorldOrgX(l.x),f.setWorldOrgY(l.y),f.setDeviceOrgX(h.x),f.setDeviceOrgY(h.y);for(var A=this.getAllNodes(),v,y=0;y<A.length;y++)v=A[y],v.transform(f)}}},e.prototype.positionNodesRandomly=function(l){if(l==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var f,h,A=l.getNodes(),v=0;v<A.length;v++)f=A[v],h=f.getChild(),h==null||h.getNodes().length==0?f.scatter():(this.positionNodesRandomly(h),f.updateBounds())},e.prototype.getFlatForest=function(){for(var l=[],f=!0,h=this.graphManager.getRoot().getNodes(),A=!0,v=0;v<h.length;v++)h[v].getChild()!=null&&(A=!1);if(!A)return l;var y=new Set,N=[],S=new Map,M=[];for(M=M.concat(h);M.length>0&&f;){for(N.push(M[0]);N.length>0&&f;){var b=N[0];N.splice(0,1),y.add(b);for(var $=b.getEdges(),v=0;v<$.length;v++){var X=$[v].getOtherEnd(b);if(S.get(b)!=X)if(!y.has(X))N.push(X),S.set(X,b);else{f=!1;break}}}if(!f)l=[];else{var et=[].concat(g(y));l.push(et);for(var v=0;v<et.length;v++){var R=et[v],J=M.indexOf(R);J>-1&&M.splice(J,1)}y=new Set,S=new Map}}return l},e.prototype.createDummyNodesForBendpoints=function(l){for(var f=[],h=l.source,A=this.graphManager.calcLowestCommonAncestor(l.source,l.target),v=0;v<l.bendpoints.length;v++){var y=this.newNode(null);y.setRect(new Point(0,0),new Dimension(1,1)),A.add(y);var N=this.newEdge(null);this.graphManager.add(N,h,y),f.add(y),h=y}var N=this.newEdge(null);return this.graphManager.add(N,h,l.target),this.edgeToDummyNodes.set(l,f),l.isInterGraph()?this.graphManager.remove(l):A.remove(l),f},e.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(g(this.edgeToDummyNodes.keys())).concat(l);for(var f=0;f<l.length;f++){var h=l[f];if(h.bendpoints.length>0){for(var A=this.edgeToDummyNodes.get(h),v=0;v<A.length;v++){var y=A[v],N=new t(y.getCenterX(),y.getCenterY()),S=h.bendpoints.get(v);S.x=N.x,S.y=N.y,y.getOwner().remove(y)}this.graphManager.add(h,h.source,h.target)}}},e.transform=function(l,f,h,A){if(h!=null&&A!=null){var v=f;if(l<=50){var y=f/h;v-=(f-y)/50*(50-l)}else{var N=f*A;v+=(N-f)/50*(l-50)}return v}else{var S,M;return l<=50?(S=9*f/500,M=f/10):(S=9*f/50,M=-8*f),S*l+M}},e.findCenterOfTree=function(l){var f=[];f=f.concat(l);var h=[],A=new Map,v=!1,y=null;(f.length==1||f.length==2)&&(v=!0,y=f[0]);for(var N=0;N<f.length;N++){var S=f[N],M=S.getNeighborsList().size;A.set(S,S.getNeighborsList().size),M==1&&h.push(S)}var b=[];for(b=b.concat(h);!v;){var $=[];$=$.concat(b),b=[];for(var N=0;N<f.length;N++){var S=f[N],X=f.indexOf(S);X>=0&&f.splice(X,1);var et=S.getNeighborsList();et.forEach(function(s){if(h.indexOf(s)<0){var m=A.get(s),p=m-1;p==1&&b.push(s),A.set(s,p)}})}h=h.concat(b),(f.length==1||f.length==2)&&(v=!0,y=f[0])}return y},e.prototype.setGraphManager=function(l){this.graphManager=l},D.exports=e},function(D,C,T){"use strict";function g(){}L(g,"RandomSeed"),g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},D.exports=g},function(D,C,T){"use strict";var g=T(5);function o(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}L(o,"Transform"),o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(n){this.lworldExtX=n},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(n){this.lworldExtY=n},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},o.prototype.transformX=function(n){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/a),r},o.prototype.transformY=function(n){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/a),r},o.prototype.inverseTransformX=function(n){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/a),r},o.prototype.inverseTransformY=function(n){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/a),r},o.prototype.inverseTransformPoint=function(n){var r=new g(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},D.exports=o},function(D,C,T){"use strict";function g(i){if(Array.isArray(i)){for(var e=0,l=Array(i.length);e<i.length;e++)l[e]=i[e];return l}else return Array.from(i)}L(g,"_toConsumableArray");var o=T(15),n=T(4),r=T(0),a=T(8),c=T(9);function t(){o.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}L(t,"FDLayout"),t.prototype=Object.create(o.prototype);for(var u in o)t[u]=o[u];t.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},t.prototype.calcIdealEdgeLengths=function(){for(var i,e,l,f,h,A,v,y=this.getGraphManager().getAllEdges(),N=0;N<y.length;N++)i=y[N],e=i.idealLength,i.isInterGraph&&(f=i.getSource(),h=i.getTarget(),A=i.getSourceInLca().getEstimatedSize(),v=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(i.idealLength+=A+v-2*r.SIMPLE_NODE_SIZE),l=i.getLca().getInclusionTreeDepth(),i.idealLength+=e*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(f.getInclusionTreeDepth()+h.getInclusionTreeDepth()-2*l))},t.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;this.incremental?(i>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(i>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(i-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},t.prototype.calcSpringForces=function(){for(var i=this.getAllEdges(),e,l=0;l<i.length;l++)e=i[l],this.calcSpringForce(e,e.idealLength)},t.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,f,h,A,v=this.getAllNodes(),y;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&i&&this.updateGrid(),y=new Set,l=0;l<v.length;l++)h=v[l],this.calculateRepulsionForceOfANode(h,y,i,e),y.add(h);else for(l=0;l<v.length;l++)for(h=v[l],f=l+1;f<v.length;f++)A=v[f],h.getOwner()==A.getOwner()&&this.calcRepulsionForce(h,A)},t.prototype.calcGravitationalForces=function(){for(var i,e=this.getAllNodesToApplyGravitation(),l=0;l<e.length;l++)i=e[l],this.calcGravitationalForce(i)},t.prototype.moveNodes=function(){for(var i=this.getAllNodes(),e,l=0;l<i.length;l++)e=i[l],e.move()},t.prototype.calcSpringForce=function(i,e){var l=i.getSource(),f=i.getTarget(),h,A,v,y;if(this.uniformLeafNodeSizes&&l.getChild()==null&&f.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;h=i.getLength(),h!=0&&(A=i.edgeElasticity*(h-e),v=A*(i.lengthX/h),y=A*(i.lengthY/h),l.springForceX+=v,l.springForceY+=y,f.springForceX-=v,f.springForceY-=y)},t.prototype.calcRepulsionForce=function(i,e){var l=i.getRect(),f=e.getRect(),h=new Array(2),A=new Array(4),v,y,N,S,M,b,$;if(l.intersects(f)){a.calcSeparationAmount(l,f,h,n.DEFAULT_EDGE_LENGTH/2),b=2*h[0],$=2*h[1];var X=i.noOfChildren*e.noOfChildren/(i.noOfChildren+e.noOfChildren);i.repulsionForceX-=X*b,i.repulsionForceY-=X*$,e.repulsionForceX+=X*b,e.repulsionForceY+=X*$}else this.uniformLeafNodeSizes&&i.getChild()==null&&e.getChild()==null?(v=f.getCenterX()-l.getCenterX(),y=f.getCenterY()-l.getCenterY()):(a.getIntersection(l,f,A),v=A[2]-A[0],y=A[3]-A[1]),Math.abs(v)<n.MIN_REPULSION_DIST&&(v=c.sign(v)*n.MIN_REPULSION_DIST),Math.abs(y)<n.MIN_REPULSION_DIST&&(y=c.sign(y)*n.MIN_REPULSION_DIST),N=v*v+y*y,S=Math.sqrt(N),M=(i.nodeRepulsion/2+e.nodeRepulsion/2)*i.noOfChildren*e.noOfChildren/N,b=M*v/S,$=M*y/S,i.repulsionForceX-=b,i.repulsionForceY-=$,e.repulsionForceX+=b,e.repulsionForceY+=$},t.prototype.calcGravitationalForce=function(i){var e,l,f,h,A,v,y,N;e=i.getOwner(),l=(e.getRight()+e.getLeft())/2,f=(e.getTop()+e.getBottom())/2,h=i.getCenterX()-l,A=i.getCenterY()-f,v=Math.abs(h)+i.getWidth()/2,y=Math.abs(A)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()?(N=e.getEstimatedSize()*this.gravityRangeFactor,(v>N||y>N)&&(i.gravitationForceX=-this.gravityConstant*h,i.gravitationForceY=-this.gravityConstant*A)):(N=e.getEstimatedSize()*this.compoundGravityRangeFactor,(v>N||y>N)&&(i.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*A*this.compoundGravityConstant))},t.prototype.isConverged=function(){var i,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||e},t.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},t.prototype.calcNoOfChildrenForAllNodes=function(){for(var i,e=this.graphManager.getAllNodes(),l=0;l<e.length;l++)i=e[l],i.noOfChildren=i.getNoOfChildren()},t.prototype.calcGrid=function(i){var e=0,l=0;e=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));for(var f=new Array(e),h=0;h<e;h++)f[h]=new Array(l);for(var h=0;h<e;h++)for(var A=0;A<l;A++)f[h][A]=new Array;return f},t.prototype.addNodeToGrid=function(i,e,l){var f=0,h=0,A=0,v=0;f=parseInt(Math.floor((i.getRect().x-e)/this.repulsionRange)),h=parseInt(Math.floor((i.getRect().width+i.getRect().x-e)/this.repulsionRange)),A=parseInt(Math.floor((i.getRect().y-l)/this.repulsionRange)),v=parseInt(Math.floor((i.getRect().height+i.getRect().y-l)/this.repulsionRange));for(var y=f;y<=h;y++)for(var N=A;N<=v;N++)this.grid[y][N].push(i),i.setGridCoordinates(f,h,A,v)},t.prototype.updateGrid=function(){var i,e,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),i=0;i<l.length;i++)e=l[i],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},t.prototype.calculateRepulsionForceOfANode=function(i,e,l,f){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&l||f){var h=new Set;i.surrounding=new Array;for(var A,v=this.grid,y=i.startX-1;y<i.finishX+2;y++)for(var N=i.startY-1;N<i.finishY+2;N++)if(!(y<0||N<0||y>=v.length||N>=v[0].length)){for(var S=0;S<v[y][N].length;S++)if(A=v[y][N][S],!(i.getOwner()!=A.getOwner()||i==A)&&!e.has(A)&&!h.has(A)){var M=Math.abs(i.getCenterX()-A.getCenterX())-(i.getWidth()/2+A.getWidth()/2),b=Math.abs(i.getCenterY()-A.getCenterY())-(i.getHeight()/2+A.getHeight()/2);M<=this.repulsionRange&&b<=this.repulsionRange&&h.add(A)}}i.surrounding=[].concat(g(h))}for(y=0;y<i.surrounding.length;y++)this.calcRepulsionForce(i,i.surrounding[y])},t.prototype.calcRepulsionRange=function(){return 0},D.exports=t},function(D,C,T){"use strict";var g=T(1),o=T(4);function n(a,c,t){g.call(this,a,c,t),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}L(n,"FDLayoutEdge"),n.prototype=Object.create(g.prototype);for(var r in g)n[r]=g[r];D.exports=n},function(D,C,T){"use strict";var g=T(3),o=T(4);function n(a,c,t,u){g.call(this,a,c,t,u),this.nodeRepulsion=o.DEFAULT_REPULSION_STRENGTH,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=[]}L(n,"FDLayoutNode"),n.prototype=Object.create(g.prototype);for(var r in g)n[r]=g[r];n.prototype.setGridCoordinates=function(a,c,t,u){this.startX=a,this.finishX=c,this.startY=t,this.finishY=u},D.exports=n},function(D,C,T){"use strict";function g(o,n){this.width=0,this.height=0,o!==null&&n!==null&&(this.height=n,this.width=o)}L(g,"DimensionD"),g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(o){this.width=o},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(o){this.height=o},D.exports=g},function(D,C,T){"use strict";var g=T(14);function o(){this.map={},this.keys=[]}L(o,"HashMap"),o.prototype.put=function(n,r){var a=g.createID(n);this.contains(a)||(this.map[a]=r,this.keys.push(n))},o.prototype.contains=function(n){var r=g.createID(n);return this.map[n]!=null},o.prototype.get=function(n){var r=g.createID(n);return this.map[r]},o.prototype.keySet=function(){return this.keys},D.exports=o},function(D,C,T){"use strict";var g=T(14);function o(){this.set={}}L(o,"HashSet"),o.prototype.add=function(n){var r=g.createID(n);this.contains(r)||(this.set[r]=n)},o.prototype.remove=function(n){delete this.set[g.createID(n)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(n){return this.set[g.createID(n)]==n},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(n){for(var r=Object.keys(this.set),a=r.length,c=0;c<a;c++)n.push(this.set[r[c]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(n){for(var r=n.length,a=0;a<r;a++){var c=n[a];this.add(c)}},D.exports=o},function(D,C,T){"use strict";function g(){}L(g,"Matrix"),g.multMat=function(o,n){for(var r=[],a=0;a<o.length;a++){r[a]=[];for(var c=0;c<n[0].length;c++){r[a][c]=0;for(var t=0;t<o[0].length;t++)r[a][c]+=o[a][t]*n[t][c]}}return r},g.transpose=function(o){for(var n=[],r=0;r<o[0].length;r++){n[r]=[];for(var a=0;a<o.length;a++)n[r][a]=o[a][r]}return n},g.multCons=function(o,n){for(var r=[],a=0;a<o.length;a++)r[a]=o[a]*n;return r},g.minusOp=function(o,n){for(var r=[],a=0;a<o.length;a++)r[a]=o[a]-n[a];return r},g.dotProduct=function(o,n){for(var r=0,a=0;a<o.length;a++)r+=o[a]*n[a];return r},g.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},g.normalize=function(o){for(var n=[],r=this.mag(o),a=0;a<o.length;a++)n[a]=o[a]/r;return n},