=0;V--){if(function(Nt,Mt){return Nt&&Mt}(V0;){var J=void 0,Rt=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=J&&Lt!==J;Lt--){var vt=(Lt!==n?Math.abs(r[Lt]):0)+(Lt!==J+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=ht+tt*vt){this.s[Lt]=0;break}}Lt===J?Rt=3:Lt===n-1?Rt=1:(Rt=2,J=Lt)}switch(J++,Rt){case 1:{var at=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Tt=c.hypot(this.s[ut],at),At=this.s[ut]/Tt,Dt=at/Tt;this.s[ut]=Tt,ut!==J&&(at=-Dt*r[ut-1],r[ut-1]=At*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Ct=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Ct,JMath.abs(a)?(r=a/o,r=Math.abs(o)*Math.sqrt(1+r*r)):a!=0?(r=o/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},w.exports=c},function(w,P,N){var c=function(){function r(e,f){for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,r),this.sequence1=e,this.sequence2=f,this.match_score=i,this.mismatch_penalty=p,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var l=0;l=0;e--){var f=this.listeners[e];f.event===a&&f.callback===r&&this.listeners.splice(e,1)}},o.emit=function(a,r){for(var e=0;e{var P={45:(a,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),a.exports=f},806:(a,r,e)=>{var f=e(551).FDLayoutConstants;function i(){}L(i,"CoSEConstants");for(var p in f)i[p]=f[p];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=f.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=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i},767:(a,r,e)=>{var f=e(551).FDLayoutEdge;function i(t,l,s){f.call(this,t,l,s)}L(i,"CoSEEdge"),i.prototype=Object.create(f.prototype);for(var p in f)i[p]=f[p];a.exports=i},880:(a,r,e)=>{var f=e(551).LGraph;function i(t,l,s){f.call(this,t,l,s)}L(i,"CoSEGraph"),i.prototype=Object.create(f.prototype);for(var p in f)i[p]=f[p];a.exports=i},578:(a,r,e)=>{var f=e(551).LGraphManager;function i(t){f.call(this,t)}L(i,"CoSEGraphManager"),i.prototype=Object.create(f.prototype);for(var p in f)i[p]=f[p];a.exports=i},765:(a,r,e)=>{var f=e(551).FDLayout,i=e(578),p=e(880),t=e(991),l=e(767),s=e(806),g=e(902),h=e(551).FDLayoutConstants,T=e(551).LayoutConstants,u=e(551).Point,d=e(551).PointD,C=e(551).DimensionD,F=e(551).Layout,A=e(551).Integer,Y=e(551).IGeometry,Q=e(551).LGraph,z=e(551).Transform,K=e(551).LinkedList;function x(){f.call(this),this.toBeTiled={},this.constraints={}}L(x,"CoSELayout"),x.prototype=Object.create(f.prototype);for(var it in f)x[it]=f[it];x.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},x.prototype.newGraph=function(n){return new p(null,this.graphManager,n)},x.prototype.newNode=function(n){return new t(this.graphManager,n)},x.prototype.newEdge=function(n){return new l(null,null,n)},x.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.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)},x.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(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){if(s.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(R){return m.has(R)});this.graphManager.setAllNodesToApplyGravitation(v)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(v),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.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)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2: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()),s.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var v=!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(v,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},v=0;v0&&this.updateDisplacements();for(var v=0;v0&&(E.fixedNodeWeight=R)}}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(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,v=0;v