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