UNPKG

@mixer/webpack-bundle-compare

Version:
2 lines 463 kB
/*! For license information please see 218.bundle.js.LICENSE.txt */ (self.webpackChunk_mixer_webpack_bundle_compare=self.webpackChunk_mixer_webpack_bundle_compare||[]).push([[218],{4182:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),i=0;i<r.length;i++)null==(n=r[i]).getChild()?(n.displacementX+=e,n.displacementY+=t):n.propogateDisplacementToChildren(e,t)},a.prototype.move=function(){var e=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),e.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},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(1),a=n(0).LinkedList,o=n(0).Matrix,s=n(0).SVD;function l(){}l.handleConstraints=function(e){var t={};t.fixedNodeConstraint=e.constraints.fixedNodeConstraint,t.alignmentConstraint=e.constraints.alignmentConstraint,t.relativePlacementConstraint=e.constraints.relativePlacementConstraint;for(var n=new Map,l=new Map,u=[],h=[],c=e.getAllNodes(),d=0,p=0;p<c.length;p++){var g=c[p];null==g.getChild()&&(l.set(g.id,d++),u.push(g.getCenterX()),h.push(g.getCenterY()),n.set(g.id,g))}t.relativePlacementConstraint&&t.relativePlacementConstraint.forEach((function(e){e.gap||0==e.gap||(e.left?e.gap=i.DEFAULT_EDGE_LENGTH+n.get(e.left).getWidth()/2+n.get(e.right).getWidth()/2:e.gap=i.DEFAULT_EDGE_LENGTH+n.get(e.top).getHeight()/2+n.get(e.bottom).getHeight()/2)}));var f=function(e){var t=0,n=0;return e.forEach((function(e){t+=u[l.get(e)],n+=h[l.get(e)]})),{x:t/e.size,y:n/e.size}},v=function(e,t,n,i,o){var s=new Map;e.forEach((function(e,t){s.set(t,0)})),e.forEach((function(e,t){e.forEach((function(e){s.set(e.id,s.get(e.id)+1)}))}));var c=new Map,d=new Map,p=new a;s.forEach((function(e,r){0==e?(p.push(r),n||("horizontal"==t?c.set(r,l.has(r)?u[l.get(r)]:i.get(r)):c.set(r,l.has(r)?h[l.get(r)]:i.get(r)))):c.set(r,Number.NEGATIVE_INFINITY),n&&d.set(r,new Set([r]))})),n&&o.forEach((function(e){var r=[];if(e.forEach((function(e){n.has(e)&&r.push(e)})),r.length>0){var a=0;r.forEach((function(e){"horizontal"==t?(c.set(e,l.has(e)?u[l.get(e)]:i.get(e)),a+=c.get(e)):(c.set(e,l.has(e)?h[l.get(e)]:i.get(e)),a+=c.get(e))})),a/=r.length,e.forEach((function(e){n.has(e)||c.set(e,a)}))}else{var o=0;e.forEach((function(e){o+="horizontal"==t?l.has(e)?u[l.get(e)]:i.get(e):l.has(e)?h[l.get(e)]:i.get(e)})),o/=e.length,e.forEach((function(e){c.set(e,o)}))}}));for(var g=function(){var r=p.shift();e.get(r).forEach((function(e){if(c.get(e.id)<c.get(r)+e.gap)if(n&&n.has(e.id)){var a;if(a="horizontal"==t?l.has(e.id)?u[l.get(e.id)]:i.get(e.id):l.has(e.id)?h[l.get(e.id)]:i.get(e.id),c.set(e.id,a),a<c.get(r)+e.gap){var o=c.get(r)+e.gap-a;d.get(r).forEach((function(e){c.set(e,c.get(e)-o)}))}}else c.set(e.id,c.get(r)+e.gap);s.set(e.id,s.get(e.id)-1),0==s.get(e.id)&&p.push(e.id),n&&d.set(e.id,function(e,t){var n=new Set(e),r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;n.add(l)}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(d.get(r),d.get(e.id)))}))};0!=p.length;)g();if(n){var f=new Set;e.forEach((function(e,t){0==e.length&&f.add(t)}));var v=[];d.forEach((function(e,t){if(f.has(t)){var i=!1,a=!0,o=!1,s=void 0;try{for(var l,u=e[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var h=l.value;n.has(h)&&(i=!0)}}catch(e){o=!0,s=e}finally{try{!a&&u.return&&u.return()}finally{if(o)throw s}}if(!i){var c=!1,d=void 0;v.forEach((function(t,n){t.has([].concat(r(e))[0])&&(c=!0,d=n)})),c?e.forEach((function(e){v[d].add(e)})):v.push(new Set(e))}}})),v.forEach((function(e,n){var r=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY,d=!0,p=!1,g=void 0;try{for(var f,v=e[Symbol.iterator]();!(d=(f=v.next()).done);d=!0){var y,m=f.value;y="horizontal"==t?l.has(m)?u[l.get(m)]:i.get(m):l.has(m)?h[l.get(m)]:i.get(m);var b=c.get(m);y<r&&(r=y),y>o&&(o=y),b<a&&(a=b),b>s&&(s=b)}}catch(e){p=!0,g=e}finally{try{!d&&v.return&&v.return()}finally{if(p)throw g}}var x=(r+o)/2-(a+s)/2,w=!0,E=!1,T=void 0;try{for(var N,C=e[Symbol.iterator]();!(w=(N=C.next()).done);w=!0){var _=N.value;c.set(_,c.get(_)+x)}}catch(e){E=!0,T=e}finally{try{!w&&C.return&&C.return()}finally{if(E)throw T}}}))}return c},y=function(e){var t=0,n=0,r=0,i=0;if(e.forEach((function(e){e.left?u[l.get(e.left)]-u[l.get(e.right)]>=0?t++:n++:h[l.get(e.top)]-h[l.get(e.bottom)]>=0?r++:i++})),t>n&&r>i)for(var a=0;a<l.size;a++)u[a]=-1*u[a],h[a]=-1*h[a];else if(t>n)for(var o=0;o<l.size;o++)u[o]=-1*u[o];else if(r>i)for(var s=0;s<l.size;s++)h[s]=-1*h[s]},m=function(e){var t=[],n=new a,r=new Set,i=0;return e.forEach((function(a,o){if(!r.has(o)){t[i]=[];var s=o;for(n.push(s),r.add(s),t[i].push(s);0!=n.length;)s=n.shift(),e.get(s).forEach((function(e){r.has(e.id)||(n.push(e.id),r.add(e.id),t[i].push(e.id))}));i++}})),t},b=function(e){var t=new Map;return e.forEach((function(e,n){t.set(n,[])})),e.forEach((function(e,n){e.forEach((function(e){t.get(n).push(e),t.get(e.id).push({id:n,gap:e.gap,direction:e.direction})}))})),t},x=function(e){var t=new Map;return e.forEach((function(e,n){t.set(n,[])})),e.forEach((function(e,n){e.forEach((function(e){t.get(e.id).push({id:n,gap:e.gap,direction:e.direction})}))})),t},w=[],E=[],T=!1,N=!1,C=new Set,_=new Map,M=new Map,D=[];if(t.fixedNodeConstraint&&t.fixedNodeConstraint.forEach((function(e){C.add(e.nodeId)})),t.relativePlacementConstraint&&(t.relativePlacementConstraint.forEach((function(e){e.left?(_.has(e.left)?_.get(e.left).push({id:e.right,gap:e.gap,direction:"horizontal"}):_.set(e.left,[{id:e.right,gap:e.gap,direction:"horizontal"}]),_.has(e.right)||_.set(e.right,[])):(_.has(e.top)?_.get(e.top).push({id:e.bottom,gap:e.gap,direction:"vertical"}):_.set(e.top,[{id:e.bottom,gap:e.gap,direction:"vertical"}]),_.has(e.bottom)||_.set(e.bottom,[]))})),M=b(_),D=m(M)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(t.fixedNodeConstraint&&t.fixedNodeConstraint.length>1)t.fixedNodeConstraint.forEach((function(e,t){w[t]=[e.position.x,e.position.y],E[t]=[u[l.get(e.nodeId)],h[l.get(e.nodeId)]]})),T=!0;else if(t.alignmentConstraint)!function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach((function(e){i.add(e)}));var a,o=new Set([].concat(r(i)).filter((function(e){return C.has(e)})));a=o.size>0?u[l.get(o.values().next().value)]:f(i).x,n[t].forEach((function(t){w[e]=[a,h[l.get(t)]],E[e]=[u[l.get(t)],h[l.get(t)]],e++}))},a=0;a<n.length;a++)i(a);T=!0}if(t.alignmentConstraint.horizontal){for(var o=t.alignmentConstraint.horizontal,s=function(t){var n=new Set;o[t].forEach((function(e){n.add(e)}));var i,a=new Set([].concat(r(n)).filter((function(e){return C.has(e)})));i=a.size>0?u[l.get(a.values().next().value)]:f(n).y,o[t].forEach((function(t){w[e]=[u[l.get(t)],i],E[e]=[u[l.get(t)],h[l.get(t)]],e++}))},c=0;c<o.length;c++)s(c);T=!0}t.relativePlacementConstraint&&(N=!0)}();else if(t.relativePlacementConstraint){for(var A=0,I=0,L=0;L<D.length;L++)D[L].length>A&&(A=D[L].length,I=L);if(A<M.size/2)y(t.relativePlacementConstraint),T=!1,N=!1;else{var S=new Map,P=new Map,O=[];D[I].forEach((function(e){_.get(e).forEach((function(t){"horizontal"==t.direction?(S.has(e)?S.get(e).push(t):S.set(e,[t]),S.has(t.id)||S.set(t.id,[]),O.push({left:e,right:t.id})):(P.has(e)?P.get(e).push(t):P.set(e,[t]),P.has(t.id)||P.set(t.id,[]),O.push({top:e,bottom:t.id}))}))})),y(O),N=!1;var k=v(S,"horizontal"),R=v(P,"vertical");D[I].forEach((function(e,t){E[t]=[u[l.get(e)],h[l.get(e)]],w[t]=[],k.has(e)?w[t][0]=k.get(e):w[t][0]=u[l.get(e)],R.has(e)?w[t][1]=R.get(e):w[t][1]=h[l.get(e)]})),T=!0}}if(T){for(var B,F=o.transpose(w),z=o.transpose(E),V=0;V<F.length;V++)F[V]=o.multGamma(F[V]),z[V]=o.multGamma(z[V]);var G=o.multMat(F,o.transpose(z)),Y=s.svd(G);B=o.multMat(Y.V,o.transpose(Y.U));for(var X=0;X<l.size;X++){var U=[u[X],h[X]],H=[B[0][0],B[1][0]],q=[B[0][1],B[1][1]];u[X]=o.dotProduct(U,H),h[X]=o.dotProduct(U,q)}N&&y(t.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(t.fixedNodeConstraint&&t.fixedNodeConstraint.length>0){var j={x:0,y:0};t.fixedNodeConstraint.forEach((function(e,t){var n,r,i=(r={x:u[l.get(e.nodeId)],y:h[l.get(e.nodeId)]},{x:(n=e.position).x-r.x,y:n.y-r.y});j.x+=i.x,j.y+=i.y})),j.x/=t.fixedNodeConstraint.length,j.y/=t.fixedNodeConstraint.length,u.forEach((function(e,t){u[t]+=j.x})),h.forEach((function(e,t){h[t]+=j.y})),t.fixedNodeConstraint.forEach((function(e){u[l.get(e.nodeId)]=e.position.x,h[l.get(e.nodeId)]=e.position.y}))}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var W=t.alignmentConstraint.vertical,K=function(e){var t=new Set;W[e].forEach((function(e){t.add(e)}));var n,i=new Set([].concat(r(t)).filter((function(e){return C.has(e)})));n=i.size>0?u[l.get(i.values().next().value)]:f(t).x,t.forEach((function(e){C.has(e)||(u[l.get(e)]=n)}))},Z=0;Z<W.length;Z++)K(Z);if(t.alignmentConstraint.horizontal)for(var Q=t.alignmentConstraint.horizontal,$=function(e){var t=new Set;Q[e].forEach((function(e){t.add(e)}));var n,i=new Set([].concat(r(t)).filter((function(e){return C.has(e)})));n=i.size>0?h[l.get(i.values().next().value)]:f(t).y,t.forEach((function(e){C.has(e)||(h[l.get(e)]=n)}))},J=0;J<Q.length;J++)$(J)}t.relativePlacementConstraint&&function(){var e=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=new Set;if(C.forEach((function(e){s.add(e),c.add(e)})),t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var d=t.alignmentConstraint.vertical,p=function(t){r.set("dummy"+t,[]),d[t].forEach((function(n){e.set(n,"dummy"+t),r.get("dummy"+t).push(n),C.has(n)&&s.add("dummy"+t)})),a.set("dummy"+t,u[l.get(d[t][0])])},g=0;g<d.length;g++)p(g);if(t.alignmentConstraint.horizontal)for(var f=t.alignmentConstraint.horizontal,y=function(e){i.set("dummy"+e,[]),f[e].forEach((function(t){n.set(t,"dummy"+e),i.get("dummy"+e).push(t),C.has(t)&&c.add("dummy"+e)})),o.set("dummy"+e,h[l.get(f[e][0])])},w=0;w<f.length;w++)y(w)}var E=new Map,T=new Map,N=function(t){_.get(t).forEach((function(r){var i=void 0,a=void 0;"horizontal"==r.direction?(i=e.get(t)?e.get(t):t,a=e.get(r.id)?{id:e.get(r.id),gap:r.gap,direction:r.direction}:r,E.has(i)?E.get(i).push(a):E.set(i,[a]),E.has(a.id)||E.set(a.id,[])):(i=n.get(t)?n.get(t):t,a=n.get(r.id)?{id:n.get(r.id),gap:r.gap,direction:r.direction}:r,T.has(i)?T.get(i).push(a):T.set(i,[a]),T.has(a.id)||T.set(a.id,[]))}))},M=!0,D=!1,A=void 0;try{for(var I,L=_.keys()[Symbol.iterator]();!(M=(I=L.next()).done);M=!0)N(I.value)}catch(e){D=!0,A=e}finally{try{!M&&L.return&&L.return()}finally{if(D)throw A}}var S=b(E),P=b(T),O=m(S),k=m(P),R=x(E),B=x(T),F=[],z=[];O.forEach((function(e,t){F[t]=[],e.forEach((function(e){0==R.get(e).length&&F[t].push(e)}))})),k.forEach((function(e,t){z[t]=[],e.forEach((function(e){0==B.get(e).length&&z[t].push(e)}))}));var V=v(E,"horizontal",s,a,F),G=v(T,"vertical",c,o,z),Y=function(e){r.get(e)?r.get(e).forEach((function(t){u[l.get(t)]=V.get(e)})):u[l.get(e)]=V.get(e)},X=!0,U=!1,H=void 0;try{for(var q,j=V.keys()[Symbol.iterator]();!(X=(q=j.next()).done);X=!0)Y(q.value)}catch(e){U=!0,H=e}finally{try{!X&&j.return&&j.return()}finally{if(U)throw H}}var W=function(e){i.get(e)?i.get(e).forEach((function(t){h[l.get(t)]=G.get(e)})):h[l.get(e)]=G.get(e)},K=!0,Z=!1,Q=void 0;try{for(var $,J=G.keys()[Symbol.iterator]();!(K=($=J.next()).done);K=!0)W($.value)}catch(e){Z=!0,Q=e}finally{try{!K&&J.return&&J.return()}finally{if(Z)throw Q}}}()}for(var ee=0;ee<c.length;ee++){var te=c[ee];null==te.getChild()&&te.setCenter(u[l.get(te.id)],h[l.get(te.id)])}},e.exports=l},function(e,t,n){"use strict";var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),l=n(1),u=n(6),h=n(0).FDLayoutConstants,c=n(0).LayoutConstants,d=n(0).Point,p=n(0).PointD,g=n(0).Layout,f=n(0).Integer,v=n(0).IGeometry,y=n(0).LGraph,m=n(0).Transform,b=n(0).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var w in x.prototype=Object.create(r.prototype),r)x[w]=r[w];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=h.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},x.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)})),this.graphManager.setAllNodesToApplyGravitation(n));else{var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(u.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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 e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.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=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===h.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),t=0;t<e.length;t++)e[t].move()},x.prototype.initConstraintVariables=function(){var e=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var t=this.graphManager.getAllNodes(),n=0;n<t.length;n++){var r=t[n];this.idToNodeMap.set(r.id,r)}var i=function t(n){for(var r,i=n.getChild().getNodes(),a=0,o=0;o<i.length;o++)null==(r=i[o]).getChild()?e.fixedNodeSet.has(r.id)&&(a+=100):a+=t(r);return a};if(this.constraints.fixedNodeConstraint)for(this.constraints.fixedNodeConstraint.forEach((function(t){e.fixedNodeSet.add(t.nodeId)})),t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)if(null!=(r=t[n]).getChild()){var a=i(r);a>0&&(r.fixedNodeWeight=a)}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach((function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var u=this.constraints.alignmentConstraint.vertical;for(n=0;n<u.length;n++)this.dummyToNodeForVerticalAlignment.set("dummy"+n,[]),u[n].forEach((function(t){o.set(t,"dummy"+n),e.dummyToNodeForVerticalAlignment.get("dummy"+n).push(t),e.fixedNodeSet.has(t)&&e.fixedNodesOnHorizontal.add("dummy"+n)}))}if(this.constraints.alignmentConstraint.horizontal){var h=this.constraints.alignmentConstraint.horizontal;for(n=0;n<h.length;n++)this.dummyToNodeForHorizontalAlignment.set("dummy"+n,[]),h[n].forEach((function(t){s.set(t,"dummy"+n),e.dummyToNodeForHorizontalAlignment.get("dummy"+n).push(t),e.fixedNodeSet.has(t)&&e.fixedNodesOnVertical.add("dummy"+n)}))}}if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(e){var t,n,r;for(r=e.length-1;r>=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach((function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}}));else{var c=new Map,d=new Map;this.constraints.relativePlacementConstraint.forEach((function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;c.has(t)?c.get(t).push(n):c.set(t,[n]),c.has(n)?c.get(n).push(t):c.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;d.has(r)?d.get(r).push(i):d.set(r,[i]),d.has(i)?d.get(i).push(r):d.set(i,[r])}}));var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach((function(s,l){if(!a.has(l)){n[o]=[],r[o]=!1;var u=l;for(i.push(u),a.add(u),n[o].push(u);0!=i.length;)u=i.shift(),t.has(u)&&(r[o]=!0),e.get(u).forEach((function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))}));o++}})),{components:n,isFixed:r}},g=p(c,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=g.components,this.fixedComponentsOnHorizontal=g.isFixed;var f=p(d,e.fixedNodesOnVertical);this.componentsOnVertical=f.components,this.fixedComponentsOnVertical=f.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach((function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n<t.length;n++){for(var r=0,i=0;i<t[n].length;i++){if(this.fixedNodeSet.has(t[n][i])){r=0;break}r+=this.idToNodeMap.get(t[n][i]).displacementX}var a=r/t[n].length;for(i=0;i<t[n].length;i++)this.idToNodeMap.get(t[n][i]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal){var o=this.constraints.alignmentConstraint.horizontal;for(n=0;n<o.length;n++){var s=0;for(i=0;i<o[n].length;i++){if(this.fixedNodeSet.has(o[n][i])){s=0;break}s+=this.idToNodeMap.get(o[n][i]).displacementY}var u=s/o[n].length;for(i=0;i<o[n].length;i++)this.idToNodeMap.get(o[n][i]).displacementY=u}}}if(this.constraints.relativePlacementConstraint)if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach((function(t){if(!e.fixedNodesOnHorizontal.has(t)){var n=0;n=e.dummyToNodeForVerticalAlignment.has(t)?e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(t)[0]).displacementX:e.idToNodeMap.get(t).displacementX,e.nodeToRelativeConstraintMapHorizontal.get(t).forEach((function(r){var i;r.right?(i=e.nodeToTempPositionMapHorizontal.get(r.right)-e.nodeToTempPositionMapHorizontal.get(t)-n)<r.gap&&(n-=r.gap-i):(i=e.nodeToTempPositionMapHorizontal.get(t)-e.nodeToTempPositionMapHorizontal.get(r.left)+n)<r.gap&&(n+=r.gap-i)})),e.nodeToTempPositionMapHorizontal.set(t,e.nodeToTempPositionMapHorizontal.get(t)+n),e.dummyToNodeForVerticalAlignment.has(t)?e.dummyToNodeForVerticalAlignment.get(t).forEach((function(t){e.idToNodeMap.get(t).displacementX=n})):e.idToNodeMap.get(t).displacementX=n}})),this.nodesInRelativeVertical.forEach((function(t){if(!e.fixedNodesOnHorizontal.has(t)){var n=0;n=e.dummyToNodeForHorizontalAlignment.has(t)?e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(t)[0]).displacementY:e.idToNodeMap.get(t).displacementY,e.nodeToRelativeConstraintMapVertical.get(t).forEach((function(r){var i;r.bottom?(i=e.nodeToTempPositionMapVertical.get(r.bottom)-e.nodeToTempPositionMapVertical.get(t)-n)<r.gap&&(n-=r.gap-i):(i=e.nodeToTempPositionMapVertical.get(t)-e.nodeToTempPositionMapVertical.get(r.top)+n)<r.gap&&(n+=r.gap-i)})),e.nodeToTempPositionMapVertical.set(t,e.nodeToTempPositionMapVertical.get(t)+n),e.dummyToNodeForHorizontalAlignment.has(t)?e.dummyToNodeForHorizontalAlignment.get(t).forEach((function(t){e.idToNodeMap.get(t).displacementY=n})):e.idToNodeMap.get(t).displacementY=n}}));else{for(n=0;n<this.componentsOnHorizontal.length;n++){var h=this.componentsOnHorizontal[n];if(this.fixedComponentsOnHorizontal[n])for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?this.dummyToNodeForVerticalAlignment.get(h[i]).forEach((function(t){e.idToNodeMap.get(t).displacementX=0})):this.idToNodeMap.get(h[i]).displacementX=0;else{var c=0,d=0;for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?(c+=(g=this.dummyToNodeForVerticalAlignment.get(h[i])).length*this.idToNodeMap.get(g[0]).displacementX,d+=g.length):(c+=this.idToNodeMap.get(h[i]).displacementX,d++);var p=c/d;for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?this.dummyToNodeForVerticalAlignment.get(h[i]).forEach((function(t){e.idToNodeMap.get(t).displacementX=p})):this.idToNodeMap.get(h[i]).displacementX=p}}for(n=0;n<this.componentsOnVertical.length;n++)if(h=this.componentsOnVertical[n],this.fixedComponentsOnVertical[n])for(i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?this.dummyToNodeForHorizontalAlignment.get(h[i]).forEach((function(t){e.idToNodeMap.get(t).displacementY=0})):this.idToNodeMap.get(h[i]).displacementY=0;else{for(c=0,d=0,i=0;i<h.length;i++){var g;this.dummyToNodeForHorizontalAlignment.has(h[i])?(c+=(g=this.dummyToNodeForHorizontalAlignment.get(h[i])).length*this.idToNodeMap.get(g[0]).displacementY,d+=g.length):(c+=this.idToNodeMap.get(h[i]).displacementY,d++)}for(p=c/d,i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?this.dummyToNodeForHorizontalAlignment.get(h[i]).forEach((function(t){e.idToNodeMap.get(t).displacementY=p})):this.idToNodeMap.get(h[i]).displacementY=p}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var e,t,n=[],r=this.graphManager.getGraphs(),i=r.length;for(t=0;t<i;t++)(e=r[t]).updateConnected(),e.isConnected||(n=n.concat(e.getNodes()));return n},x.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t,n=new Set;for(t=0;t<e.length;t++){var r=e[t];if(!n.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new p),r.getBendpoints().push(new p),this.createDummyNodesForBendpoints(r),n.add(r);else{var o=[];if(o=(o=o.concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i)),!n.has(o[0])){var s;if(o.length>1)for(s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}o.forEach((function(e){n.add(e)}))}}}if(n.size==e.length)break}},x.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new p(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,0!=s&&(i+=l.DEFAULT_COMPONENT_SEPERATION),r=0);var u=e[s],h=g.findCenterOfTree(u);t.x=a,t.y=i,(o=x.radialLayout(u,h,t)).y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(c.WORLD_CENTER_X-o.x/2,c.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=y.calculateBounds(e),a=new m;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new p(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},x.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*v.TWO_PI/360,l=(Math.cos(s),i*Math.cos(s)),u=i*Math.sin(s);e.setCenter(l,u);var h=[],c=(h=h.concat(e.getEdges())).length;null!=t&&c--;for(var d,p=0,g=h.length,f=e.getEdgesBetween(t);f.length>1;){var y=f[0];f.splice(0,1);var m=h.indexOf(y);m>=0&&h.splice(m,1),g--,c--}d=null!=t?(h.indexOf(f[0])+1)%g:0;for(var b=Math.abs(r-n)/c,w=d;p!=c;w=++w%g){var E=h[w].getOtherEnd(e);if(E!=t){var T=(n+p*b)%360,N=(T+b)%360;x.branchRadialLayout(E,e,T,N,i+a,a),p++}}},x.maxDiagonalInTree=function(e){for(var t=f.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=(s=r[i]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=a.id&&this.getToBeTiled(a)||n.push(s)}for(i=0;i<n.length;i++){var s,l=(s=n[i]).getParent().id;void 0===t[l]&&(t[l]=[]),t[l]=t[l].concat(s)}Object.keys(t).forEach((function(n){if(t[n].length>1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u<t[n].length;u++){var h=t[n][u];l.remove(h),s.add(h)}}}))},x.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},x.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach((function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height}))},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},x.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach((function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)}))},x.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[t]=!0,!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},x.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null==e.getChild())return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];null!=n.getChild()&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},x.prototype.adjustLocations=function(e,t,n,r,i){n+=i;for(var a=t+=r,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var l=0,u=0;u<s.length;u++){var h=s[u];h.rect.x=t,h.rect.y=n,t+=h.rect.width+e.horizontalPadding,h.rect.height>l&&(l=h.rect.height)}n+=l+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach((function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},x.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort((function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height<t.rect.width*t.rect.height?1:0}));for(var r=0;r<e.length;r++){var i=e[r];0==n.rows.length?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},x.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},x.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a,o,s=0;return e.rowHeight[r]<n&&r>0&&(s=n+e.verticalPadding-e.rowHeight[r]),a=e.width-i>=t+e.horizontalPadding?(e.height+s)/(i+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(o=e.width<t?(e.height+s)/t:(e.height+s)/e.width)<1&&(o=1/o),a<1&&(a=1/a),a<o},x.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var u=e.rowHeight[t]+e.rowHeight[n];e.height+=u-l,this.shiftToLastRow(e)}},x.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var e,t=[],n=!0;n;){var r=this.graphManager.getAllNodes(),i=[];n=!1;for(var a=0;a<r.length;a++)1!=(e=r[a]).getEdges().length||e.getEdges()[0].isInterGraph||null!=e.getChild()||(i.push([e,e.getEdges()[0],e.getOwner()]),n=!0);if(1==n){for(var o=[],s=0;s<i.length;s++)1==i[s][0].getEdges().length&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));t.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},x.prototype.growTree=function(e){for(var t,n=e[e.length-1],r=0;r<n.length;r++)t=n[r],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0],i=(n=r==e[1].source?e[1].target:e[1].source).startX,a=n.finishX,o=n.startY,s=n.finishY,l=[0,0,0,0];if(o>0)for(var u=i;u<=a;u++)l[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a<this.grid.length-1)for(u=o;u<=s;u++)l[1]+=this.grid[a+1][u].length+this.grid[a][u].length-1;if(s<this.grid[0].length-1)for(u=i;u<=a;u++)l[2]+=this.grid[u][s+1].length+this.grid[u][s].length-1;if(i>0)for(u=o;u<=s;u++)l[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var c,d,p=f.MAX_VALUE,g=0;g<l.length;g++)l[g]<p?(p=l[g],c=1,d=g):l[g]==p&&c++;if(3==c&&0==p)0==l[0]&&0==l[1]&&0==l[2]?t=1:0==l[0]&&0==l[1]&&0==l[3]?t=0:0==l[0]&&0==l[2]&&0==l[3]?t=3:0==l[1]&&0==l[2]&&0==l[3]&&(t=2);else if(2==c&&0==p){var v=Math.floor(2*Math.random());t=0==l[0]&&0==l[1]?0==v?0:1:0==l[0]&&0==l[2]?0==v?0:2:0==l[0]&&0==l[3]?0==v?0:3:0==l[1]&&0==l[2]?0==v?1:2:0==l[1]&&0==l[3]?0==v?1:3:0==v?2:3}else t=4==c&&0==p?v=Math.floor(4*Math.random()):d;0==t?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-h.DEFAULT_EDGE_LENGTH-r.getHeight()/2):1==t?r.setCenter(n.getCenterX()+n.getWidth()/2+h.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):2==t?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+h.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-h.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=x},function(e,t,n){"use strict";var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(7),r.CoSENode=n(5),r.ConstraintHandler=n(6),e.exports=r}])},e.exports=r(n(2241))},4867:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).layoutBase.LinkedList,i={getTopMostNodes:function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter((function(e,n){"number"==typeof e&&(e=n);for(var r=e.parent()[0];null!=r;){if(t[r.id()])return!1;r=r.parent()[0]}return!0}))},connectComponents:function(e,t,n,i){var a=new r,o=new Set,s=[],l=void 0,u=void 0,h=void 0,c=!1,d=1,p=[],g=[],f=function(){var r=e.collection();g.push(r);var i=n[0],f=e.collection();f.merge(i).merge(i.descendants().intersection(t)),s.push(i),f.forEach((function(e){a.push(e),o.add(e),r.merge(e)}));for(var v=function(){i=a.shift();var u=e.collection();i.neighborhood().nodes().forEach((function(e){t.intersection(i.edgesWith(e)).length>0&&u.merge(e)}));for(var h=0;h<u.length;h++){var c=u[h];null==(l=n.intersection(c.union(c.ancestors())))||o.has(l[0])||l.union(l.descendants()).forEach((function(e){a.push(e),o.add(e),r.merge(e),n.has(e)&&s.push(e)}))}};0!=a.length;)v();if(r.forEach((function(e){t.intersection(e.connectedEdges()).forEach((function(e){r.has(e.source())&&r.has(e.target())&&r.merge(e)}))})),s.length==n.length&&(c=!0),!c||c&&d>1){u=s[0],h=u.connectedEdges().length,s.forEach((function(e){e.connectedEdges().length<h&&(h=e.connectedEdges().length,u=e)})),p.push(u.id());var y=e.collection();y.merge(s[0]),s.forEach((function(e){y.merge(e)})),s=[],n=n.difference(y),d++}};do{f()}while(!c);return i&&p.length>0&&i.set("dummy"+(i.size+1),p),g},calcBoundingBox:function(e,t,n,r){for(var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=void 0,u=void 0,h=void 0,c=void 0,d=e.descendants().not(":parent"),p=d.length,g=0;g<p;g++){var f=d[g];i>(l=t[r.get(f.id())]-f.width()/2)&&(i=l),a<(u=t[r.get(f.id())]+f.width()/2)&&(a=u),o>(h=n[r.get(f.id())]-f.height()/2)&&(o=h),s<(c=n[r.get(f.id())]+f.height()/2)&&(s=c)}var v={};return v.topLeftX=i,v.topLeftY=o,v.width=a-i,v.height=s-o,v}};e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(3),a=n(1),o=n(5).spectralLayout,s=n(4).coseLayout,l=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(e){return 4500},idealEdgeLength:function(e){return 50},edgeElasticity:function(e){return.45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=i({},l,t)}return r(e,[{key:"run",value:function(){var e=this.options,t=e.cy,n=e.eles,r=[],i=[],l=void 0;(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint)&&(e.tile=!1,e.packComponents=!1);var u=void 0,h=!1;if(t.layoutUtilities&&e.packComponents&&e.randomize&&((u=t.layoutUtilities("get"))||(u=t.layoutUtilities()),h=!0),n.nodes().length>0){if(h){var c=a.getTopMostNodes(e.eles.nodes());if(l=a.connectComponents(t,e.eles,c),e.randomize&&l.forEach((function(t){e.eles=t,r.push(o(e))})),"default"==e.quality||"proof"==e.quality){var d=t.collection();if(e.tile){var p=new Map,g=0,f={nodeIndexes:p,xCoords:[],yCoords:[]},v=[];if(l.forEach((function(e,t){0==e.edges().length&&(e.nodes().forEach((function(t,n){d.merge(e.nodes()[n]),t.isParent()||(f.nodeIndexes.set(e.nodes()[n].id(),g++),f.xCoords.push(e.nodes()[0].position().x),f.yCoords.push(e.nodes()[0].position().y))})),v.push(t))})),d.length>1){l.push(d),r.push(f);for(var y=v.length-1;y>=0;y--)l.splice(v[y],1),r.splice(v[y],1)}}l.forEach((function(t,n){e.eles=t,i.push(s(e,r[n]))}))}if(l.length>1){var m=[];l.forEach((function(t,n){var o=void 0;"draft"==e.quality&&(o=r[n].nodeIndexes);var s={nodes:[],edges:[]},l=void 0;t.nodes().forEach((function(t){if("draft"==e.quality)if(t.isParent()){var u=a.calcBoundingBox(t,r[n].xCoords,r[n].yCoords,o);s.nodes.push({x:u.topLeftX,y:u.topLeftY,width:u.width,height:u.height})}else l=o.get(t.id()),s.nodes.push({x:r[n].xCoords[l]-t.boundingbox().w/2,y:r[n].yCoords[l]-t.boundingbox().h/2,width:t.boundingbox().w,height:t.boundingbox().h});else s.nodes.push({x:i[n][t.id()].getLeft(),y:i[n][t.id()].getTop(),width:i[n][t.id()].getWidth(),height:i[n][t.id()].getHeight()})})),t.edges().forEach((function(t){var l=t.source(),u=t.target();if("draft"==e.quality){var h=o.get(l.id()),c=o.get(u.id()),d=[],p=[];if(l.isParent()){var g=a.calcBoundingBox(l,r[n].xCoords,r[n].yCoords,o);d.push(g.topLeftX+g.width/2),d.push(g.topLeftY+g.height/2)}else d.push(r[n].xCoords[h]),d.push(r[n].yCoords[h]);if(u.isParent()){var f=a.calcBoundingBox(u,r[n].xCoords,r[n].yCoords,o);p.push(f.topLeftX+f.width/2),p.push(f.topLeftY+f.height/2)}else p.push(r[n].xCoords[c]),p.push(r[n].yCoords[c]);s.edges.push({startX:d[0],startY:d[1],endX:p[0],endY:p[1]})}else s.edges.push({startX:i[n][l.id()].getCenterX(),startY:i[n][l.id()].getCenterY(),endX:i[n][u.id()].getCenterX(),endY:i[n][u.id()].getCenterY()})})),m.push(s)}));var b=u.packComponents(m).shifts;"draft"==e.quality?r.forEach((function(e,t){var n=e.xCoords.map((function(e){return e+b[t].dx})),r=e.yCoords.map((function(e){return e+b[t].dy}));e.xCoords=n,e.yCoords=r})):i.forEach((function(e,t){Object.keys(e).forEach((function(n){var r=e[n];r.setCenter(r.getCenterX()+b[t].dx,r.getCenterY()+b[t].dy)}))}))}}else{if(e.randomize){var x=o(e);r.push(x)}"default"!=e.quality&&"proof"!=e.quality||i.push(s(e,r[0]))}if(!e.fixedNodeConstraint){var w=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,N=Number.NEGATIVE_INFINITY;if("draft"==e.quality){r.forEach((function(e){e.xCoords.forEach((function(e){e<w&&(w=e),e>E&&(E=e)})),e.yCoords.forEach((function(e){e<T&&(T=e),e>N&&(N=e)}))}));var C=e.eles.boundingBox(),_=C.x1+C.w/2-(E+w)/2,M=C.y1+C.h/2-(N+T)/2;r.forEach((function(e){e.xCoords=e.xCoords.map((function(e){return e+_})),e.yCoords=e.yCoords.map((function(e){return e+M}))}))}else{i.forEach((function(e){Object.keys(e).forEach((function(t){var n=e[t];n.getCenterX()<w&&(w=n.getCenterX()),n.getCenterX()>E&&(E=n.getCenterX()),n.getCenterY()<T&&(T=n.getCenterY()),n.getCenterY()>N&&(N=n.getCenterY())}))}));var D=e.eles.boundingBox(),A=D.x1+D.w/2-(E+w)/2,I=D.y1+D.h/2-(N+T)/2;i.forEach((function(e,t){Object.keys(e).forEach((function(t){var n=e[t];n.setCenter(n.getCenterX()+A,n.getCenterY()+I)}))}))}}}"default"==e.quality||"proof"==e.quality||e.randomize?(e.eles=n,n.nodes().not(":parent").layoutPositions(this,e,(function(t,n){if("default"==e.quality||"proof"==e.quality){"number"==typeof t&&(t=n);var a=void 0,o=t.data("id");return i.forEach((function(e){o in e&&(a={x:e[o].getRect().getCenterX(),y:e[o].getRect().getCenterY()})})),{x:a.x,y:a.y}}var s=void 0;return r.forEach((function(e){var n=e.nodeIndexes.get(t.id());null!=n&&(s={x:e.xCoords[n],y:e.yCoords[n]})})),null==s&&(s={x:t.position("x"),y:t.position("y")}),{x:s.x,y:s.y}}))):console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),e}();e.exports=u},function(e,t,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}},function(e,t,n){"use strict";var r=n(1),i=n(0).CoSELayout,a=n(0).CoSENode,o=n(0).layoutBase.PointD,s=n(0).layoutBase.DimensionD,l=n(0).layoutBase.LayoutConstants,u=n(0).layoutBase.FDLayoutConstants,h=n(0).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.eles,c=n.nodes(),d=n.edges(),p=void 0,g=void 0,f=void 0,v={};e.randomize&&(p=t.nodeIndexes,g=t.xCoords,f=t.yCoords);var y=function(e){return"function"==typeof e},m=function(e,t){return y(e)?e(t):e};null!=e.nestingFac