/*! third party licenses: js/vendor.LICENSE.txt */ import{g as $}from"./vendor-BeFBwUwf.chunk.mjs";var k={exports:{}},W={exports:{}},V={exports:{}},tt=V.exports,Z;function et(){return Z||(Z=1,function(H,j){(function(I,C){H.exports=C()})(tt,function(){return function(I){var C={};function T(o){if(C[o])return C[o].exports;var e=C[o]={i:o,l:!1,exports:{}};return I[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=I,T.c=C,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)}([function(I,C,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,I.exports=o},function(I,C,T){var o=T(2),e=T(8),t=T(9);function i(a,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=a,this.target=n}i.prototype=Object.create(o.prototype);for(var h in o)i[h]=o[h];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(a){if(this.source===a)return this.target;if(this.target===a)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(a,n){for(var d=this.getOtherEnd(a),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var a=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),a),this.isOverlapingSourceAndTarget||(this.lengthX=a[0]-a[2],this.lengthY=a[1]-a[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))},i.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)},I.exports=i},function(I,C,T){function o(e){this.vGraphObject=e}I.exports=o},function(I,C,T){var o=T(2),e=T(10),t=T(13),i=T(0),h=T(16),a=T(4);function n(r,g,l,p){l==null&&p==null&&(p=g),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,l!=null&&g!=null?this.rect=new t(g.x,g.y,l.width,l.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new a(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new a(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,g){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=g.width,this.rect.height=g.height},n.prototype.setCenter=function(r,g){this.rect.x=r-this.rect.width/2,this.rect.y=g-this.rect.height/2},n.prototype.setLocation=function(r,g){this.rect.x=r,this.rect.y=g},n.prototype.moveBy=function(r,g){this.rect.x+=r,this.rect.y+=g},n.prototype.getEdgeListToNode=function(r){var g=[],l=this;return l.edges.forEach(function(p){if(p.target==r){if(p.source!=l)throw"Incorrect edge source!";g.push(p)}}),g},n.prototype.getEdgesBetween=function(r){var g=[],l=this;return l.edges.forEach(function(p){if(!(p.source==l||p.target==l))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&g.push(p)}),g},n.prototype.getNeighborsList=function(){var r=new Set,g=this;return g.edges.forEach(function(l){if(l.source==g)r.add(l.target);else{if(l.target!=g)throw"Incorrect incidency!";r.add(l.source)}}),r},n.prototype.withChildren=function(){var r=new Set,g,l;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;yg&&(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var g=this.rect.x;g>i.WORLD_BOUNDARY?g=i.WORLD_BOUNDARY:g<-i.WORLD_BOUNDARY&&(g=-i.WORLD_BOUNDARY);var l=this.rect.y;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var p=new a(g,l),y=r.inverseTransformPoint(p);this.setLocation(y.x,y.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},I.exports=n},function(I,C,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},I.exports=o},function(I,C,T){var o=T(2),e=T(10),t=T(0),i=T(6),h=T(3),a=T(1),n=T(13),d=T(12),r=T(11);function g(p,y,f){o.call(this,f),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof i?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}g.prototype=Object.create(o.prototype);for(var l in o)g[l]=o[l];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(p,y,f){if(y==null&&f==null){var v=p;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 N=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(f)>-1))throw"Source or target not in graph!";if(!(y.owner==f.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=f.owner?null:(N.source=y,N.target=f,N.isInterGraph=!1,this.getEdges().push(N),y.edges.push(N),f!=y&&f.edges.push(N),N)}},g.prototype.remove=function(p){var y=p;if(p instanceof h){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var f=y.edges.slice(),v,N=f.length,A=0;A-1&&u>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(s,1),v.target!=v.source&&v.target.edges.splice(u,1);var m=v.source.owner.getEdges().indexOf(v);if(m==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(m,1)}},g.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,y=e.MAX_VALUE,f,v,N,A=this.getNodes(),m=A.length,s=0;sf&&(p=f),y>v&&(y=v)}return p==e.MAX_VALUE?null:(A[0].getParent().paddingLeft!=null?N=A[0].getParent().paddingLeft:N=this.margin,this.left=y-N,this.top=p-N,new d(this.left,this.top))},g.prototype.updateBounds=function(p){for(var y=e.MAX_VALUE,f=-e.MAX_VALUE,v=e.MAX_VALUE,N=-e.MAX_VALUE,A,m,s,u,c,E=this.nodes,_=E.length,L=0;L<_;L++){var O=E[L];p&&O.child!=null&&O.updateBounds(),A=O.getLeft(),m=O.getRight(),s=O.getTop(),u=O.getBottom(),y>A&&(y=A),fs&&(v=s),NA&&(y=A),fs&&(v=s),N=this.nodes.length){var _=0;f.forEach(function(L){L.owner==p&&_++}),_==this.nodes.length&&(this.isConnected=!0)}},I.exports=g},function(I,C,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),h=this.layout.newNode(null),a=this.add(i,h);return this.setRootGraph(a),this.rootGraph},t.prototype.add=function(i,h,a,n,d){if(a==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(h==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(h.child!=null)throw"Already has a child!";return i.parent=h,h.child=i,i}else{d=a,n=h,a=i;var r=n.getOwner(),g=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(g!=null&&g.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==g)return a.isInterGraph=!1,r.add(a,n,d);if(a.isInterGraph=!0,a.source=n,a.target=d,this.edges.indexOf(a)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(a),!(a.source!=null&&a.target!=null))throw"Edge source and/or target is null!";if(!(a.source.edges.indexOf(a)==-1&&a.target.edges.indexOf(a)==-1))throw"Edge already in source and/or target incidency list!";return a.source.edges.push(a),a.target.edges.push(a),a}},t.prototype.remove=function(i){if(i instanceof o){var h=i;if(h.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(h==this.rootGraph||h.parent!=null&&h.parent.graphManager==this))throw"Invalid parent node!";var a=[];a=a.concat(h.getEdges());for(var n,d=a.length,r=0;r=i.getRight()?h[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(h[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?h[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(h[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*h[0],g=h[1]/d;h[0]r)return h[0]=a,h[1]=l,h[2]=d,h[3]=E,!1;if(nd)return h[0]=g,h[1]=n,h[2]=u,h[3]=r,!1;if(ad?(h[0]=y,h[1]=f,D=!0):(h[0]=p,h[1]=l,D=!0):x===M&&(a>d?(h[0]=g,h[1]=l,D=!0):(h[0]=v,h[1]=f,D=!0)),-F===M?d>a?(h[2]=c,h[3]=E,w=!0):(h[2]=u,h[3]=s,w=!0):F===M&&(d>a?(h[2]=m,h[3]=s,w=!0):(h[2]=_,h[3]=E,w=!0)),D&&w)return!1;if(a>d?n>r?(R=this.getCardinalDirection(x,M,4),G=this.getCardinalDirection(F,M,2)):(R=this.getCardinalDirection(-x,M,3),G=this.getCardinalDirection(-F,M,1)):n>r?(R=this.getCardinalDirection(-x,M,1),G=this.getCardinalDirection(-F,M,3)):(R=this.getCardinalDirection(x,M,2),G=this.getCardinalDirection(F,M,4)),!D)switch(R){case 1:P=l,S=a+-A/M,h[0]=S,h[1]=P;break;case 2:S=v,P=n+N*M,h[0]=S,h[1]=P;break;case 3:P=f,S=a+A/M,h[0]=S,h[1]=P;break;case 4:S=y,P=n+-N*M,h[0]=S,h[1]=P;break}if(!w)switch(G){case 1:U=s,b=d+-O/M,h[2]=b,h[3]=U;break;case 2:b=_,U=r+L*M,h[2]=b,h[3]=U;break;case 3:U=E,b=d+O/M,h[2]=b,h[3]=U;break;case 4:b=c,U=r+-L*M,h[2]=b,h[3]=U;break}}return!1},e.getCardinalDirection=function(t,i,h){return t>i?h:1+h%4},e.getIntersection=function(t,i,h,a){if(a==null)return this.getIntersection2(t,i,h);var n=t.x,d=t.y,r=i.x,g=i.y,l=h.x,p=h.y,y=a.x,f=a.y,v=void 0,N=void 0,A=void 0,m=void 0,s=void 0,u=void 0,c=void 0,E=void 0,_=void 0;return A=g-d,s=n-r,c=r*d-n*g,m=f-p,u=l-y,E=y*p-l*f,_=A*u-m*s,_===0?null:(v=(s*E-u*c)/_,N=(m*c-A*E)/_,new o(v,N))},e.angleOfVector=function(t,i,h,a){var n=void 0;return t!==h?(n=Math.atan((a-i)/(h-t)),h0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},I.exports=o},function(I,C,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,I.exports=o},function(I,C,T){var o=function(){function n(d,r){for(var g=0;g"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},I.exports=e},function(I,C,T){function o(l){if(Array.isArray(l)){for(var p=0,y=Array(l.length);p0&&p;){for(A.push(s[0]);A.length>0&&p;){var u=A[0];A.splice(0,1),N.add(u);for(var c=u.getEdges(),v=0;v-1&&s.splice(O,1)}N=new Set,m=new Map}}return l},g.prototype.createDummyNodesForBendpoints=function(l){for(var p=[],y=l.source,f=this.graphManager.calcLowestCommonAncestor(l.source,l.target),v=0;v0){for(var f=this.edgeToDummyNodes.get(y),v=0;v=0&&p.splice(E,1);var _=m.getNeighborsList();_.forEach(function(D){if(y.indexOf(D)<0){var w=f.get(D),x=w-1;x==1&&u.push(D),f.set(D,x)}})}y=y.concat(u),(p.length==1||p.length==2)&&(v=!0,N=p[0])}return N},g.prototype.setGraphManager=function(l){this.graphManager=l},I.exports=g},function(I,C,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},I.exports=o},function(I,C,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}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 i=0,h=this.lworldExtX;return h!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/h),i},e.prototype.transformY=function(t){var i=0,h=this.lworldExtY;return h!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/h),i},e.prototype.inverseTransformX=function(t){var i=0,h=this.ldeviceExtX;return h!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/h),i},e.prototype.inverseTransformY=function(t){var i=0,h=this.ldeviceExtY;return h!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/h),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},I.exports=e},function(I,C,T){function o(r){if(Array.isArray(r)){for(var g=0,l=Array(r.length);gt.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-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):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-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()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),g,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,p,y,f,v=this.getAllNodes(),N;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),N=new Set,l=0;lA||N>A)&&(r.gravitationForceX=-this.gravityConstant*y,r.gravitationForceY=-this.gravityConstant*f)):(A=g.getEstimatedSize()*this.compoundGravityRangeFactor,(v>A||N>A)&&(r.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*f*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,g=!1;return this.totalIterations>this.maxIterations/3&&(g=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=v.length||A>=v[0].length)){for(var m=0;ma}}]),h}();I.exports=i},function(I,C,T){var o=function(){function i(h,a){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=h,this.sequence2=a,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=h.length+1,this.jMax=a.length+1,this.grid=new Array(this.iMax);for(var g=0;g=0;h--){var a=this.listeners[h];a.event===t&&a.callback===i&&this.listeners.splice(h,1)}},e.emit=function(t,i){for(var h=0;ha.coolingFactor*a.maxNodeDisplacement&&(this.displacementX=a.coolingFactor*a.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementY=a.coolingFactor*a.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),a.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(a,n){for(var d=this.getChild().getNodes(),r,g=0;g0)this.positionNodesRadially(c);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(L){return s.has(L)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(_){return s.has(_)});this.graphManager.setAllNodesToApplyGravitation(u),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),u={},c=0;c1){var D;for(D=0;DE&&(E=Math.floor(O.y)),L=Math.floor(O.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(r.WORLD_CENTER_X-O.x/2,r.WORLD_CENTER_Y-O.y/2))},A.radialLayout=function(s,u,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(u,null,0,359,0,E);var _=v.calculateBounds(s),L=new N;L.setDeviceOrgX(_.getMinX()),L.setDeviceOrgY(_.getMinY()),L.setWorldOrgX(c.x),L.setWorldOrgY(c.y);for(var O=0;O1;){var U=b[0];b.splice(0,1);var Y=M.indexOf(U);Y>=0&&M.splice(Y,1),S--,R--}u!=null?P=(M.indexOf(b[0])+1)%S:P=0;for(var X=Math.abs(E-c)/R,B=P;G!=R;B=++B%S){var z=M[B].getOtherEnd(s);if(z!=u){var q=(c+G*X)%360,J=(q+X)%360;A.branchRadialLayout(z,s,q,J,_+L,L),G++}}},A.maxDiagonalInTree=function(s){for(var u=y.MIN_VALUE,c=0;cu&&(u=_)}return u},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var s=this,u={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),_=0;_"u"&&(u[D]=[]),u[D]=u[D].concat(L)}Object.keys(u).forEach(function(w){if(u[w].length>1){var x="DummyCompound_"+w;s.memberGroups[x]=u[w];var F=u[w][0].getParent(),M=new h(s.graphManager);M.id=x,M.paddingLeft=F.paddingLeft||0,M.paddingRight=F.paddingRight||0,M.paddingBottom=F.paddingBottom||0,M.paddingTop=F.paddingTop||0,s.idToDummyNode[x]=M;var R=s.getGraphManager().add(s.newGraph(),M),G=F.getChild();G.add(M);for(var S=0;S=0;s--){var u=this.compoundOrder[s],c=u.id,E=u.paddingLeft,_=u.paddingTop;this.adjustLocations(this.tiledMemberPack[c],u.rect.x,u.rect.y,E,_)}},A.prototype.repopulateZeroDegreeMembers=function(){var s=this,u=this.tiledZeroDegreePack;Object.keys(u).forEach(function(c){var E=s.idToDummyNode[c],_=E.paddingLeft,L=E.paddingTop;s.adjustLocations(u[c],E.rect.x,E.rect.y,_,L)})},A.prototype.getToBeTiled=function(s){var u=s.id;if(this.toBeTiled[u]!=null)return this.toBeTiled[u];var c=s.getChild();if(c==null)return this.toBeTiled[u]=!1,!1;for(var E=c.getNodes(),_=0;_0)return this.toBeTiled[u]=!1,!1;if(L.getChild()==null){this.toBeTiled[L.id]=!1;continue}if(!this.getToBeTiled(L))return this.toBeTiled[u]=!1,!1}return this.toBeTiled[u]=!0,!0},A.prototype.getNodeDegree=function(s){s.id;for(var u=s.getEdges(),c=0,E=0;Ew&&(w=F.rect.height)}c+=w+s.verticalPadding}},A.prototype.tileCompoundMembers=function(s,u){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var _=u[E];c.tiledMemberPack[E]=c.tileNodes(s[E],_.paddingLeft+_.paddingRight),_.rect.width=c.tiledMemberPack[E].width,_.rect.height=c.tiledMemberPack[E].height})},A.prototype.tileNodes=function(s,u){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,_={rows:[],rowWidth:[],rowHeight:[],width:0,height:u,verticalPadding:c,horizontalPadding:E};s.sort(function(D,w){return D.rect.width*D.rect.height>w.rect.width*w.rect.height?-1:D.rect.width*D.rect.height0&&(O+=s.horizontalPadding),s.rowWidth[c]=O,s.width0&&(D+=s.verticalPadding);var w=0;D>s.rowHeight[c]&&(w=s.rowHeight[c],s.rowHeight[c]=D,w=s.rowHeight[c]-w),s.height+=w,s.rows[c].push(u)},A.prototype.getShortestRowIndex=function(s){for(var u=-1,c=Number.MAX_VALUE,E=0;Ec&&(u=E,c=s.rowWidth[E]);return u},A.prototype.canAddHorizontal=function(s,u,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var _=s.rowWidth[E];if(_+s.horizontalPadding+u<=s.width)return!0;var L=0;s.rowHeight[E]0&&(L=c+s.verticalPadding-s.rowHeight[E]);var O;s.width-_>=u+s.horizontalPadding?O=(s.height+L)/(_+u+s.horizontalPadding):O=(s.height+L)/s.width,L=c+s.verticalPadding;var D;return s.widthL&&u!=c){E.splice(-1,1),s.rows[c].push(_),s.rowWidth[u]=s.rowWidth[u]-L,s.rowWidth[c]=s.rowWidth[c]+L,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var O=Number.MIN_VALUE,D=0;DO&&(O=E[D].height);u>0&&(O+=s.verticalPadding);var w=s.rowHeight[u]+s.rowHeight[c];s.rowHeight[u]=O,s.rowHeight[c]<_.height+s.verticalPadding&&(s.rowHeight[c]=_.height+s.verticalPadding);var x=s.rowHeight[u]+s.rowHeight[c];s.height+=x-w,this.shiftToLastRow(s)}},A.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},A.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},A.prototype.reduceTrees=function(){for(var s=[],u=!0,c;u;){var E=this.graphManager.getAllNodes(),_=[];u=!1;for(var L=0;L0)for(var G=_;G<=L;G++)R[0]+=this.grid[G][O-1].length+this.grid[G][O].length-1;if(L0)for(var G=O;G<=D;G++)R[3]+=this.grid[_-1][G].length+this.grid[_][G].length-1;for(var S=y.MAX_VALUE,P,b,U=0;U0){var D;D=N.getGraphManager().add(N.newGraph(),c),this.processChildrenList(D,u,N)}}},l.prototype.stop=function(){return this.stopped=!0,this};var y=function(f){f("layout","cose-bilkent",l)};typeof cytoscape<"u"&&y(cytoscape),C.exports=y}])})}(k)),k.exports}var st=ot();const ht=$(st);export{ht as c}; //# sourceMappingURL=cytoscape-cose-bilkent-BWab1rkW.chunk.mjs.map