PageSourceSearch

https://www.lighthouseacademy.ai/_next/static/chunks/2420.c51e128abf97ada8.js

js lighthouseacademy.ai collected 2026-10-04 23:38:45 UTC 30,037 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2420],{45021:function(t,e,i){var o;t.exports=(o=i(50969),function(t){var e={};function i(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=7)}([function(t,e){t.exports=o},function(t,e,i){var o=i(0).FDLayoutConstants;function r(){}for(var n in o)r[n]=o[n];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=o.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=r},function(t,e,i){var o=i(0).FDLayoutEdge;function r(t,e,i){o.call(this,t,e,i)}for(var n in r.prototype=Object.create(o.prototype),o)r[n]=o[n];t.exports=r},function(t,e,i){var o=i(0).LGraph;function r(t,e,i){o.call(this,t,e,i)}for(var n in r.prototype=Object.create(o.prototype),o)r[n]=o[n];t.exports=r},function(t,e,i){var o=i(0).LGraphManager;function r(t){o.call(this,t)}for(var n in r.prototype=Object.create(o.prototype),o)r[n]=o[n];t.exports=r},function(t,e,i){var o=i(0).FDLayoutNode,r=i(0).IMath;function n(t,e,i,r){o.call(this,t,e,i,r)}for(var a in n.prototype=Object.create(o.prototype),o)n[a]=o[a];n.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),null==this.child?this.moveBy(this.displacementX,this.displacementY):0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.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},n.prototype.propogateDisplacementToChildren=function(t,e){for(var i,o=this.getChild().getNodes(),r=0;r<o.length;r++)null==(i=o[r]).getChild()?(i.moveBy(t,e),i.displacementX+=t,i.displacementY+=e):i.propogateDisplacementToChildren(t,e)},n.prototype.setPred1=function(t){this.pred1=t},n.prototype.getPred1=function(){return pred1},n.prototype.getPred2=function(){return pred2},n.prototype.setNext=function(t){this.next=t},n.prototype.getNext=function(){return next},n.prototype.setProcessed=function(t){this.processed=t},n.prototype.isProcessed=function(){return processed},t.exports=n},function(t,e,i){var o=i(0).FDLayout,r=i(4),n=i(3),a=i(5),s=i(2),d=i(1),h=i(0).FDLayoutConstants,l=i(0).LayoutConstants,g=i(0).Point,c=i(0).PointD,u=i(0).Layout,p=i(0).Integer,f=i(0).IGeometry,y=i(0).LGraph,E=i(0).Transform;function T(){o.call(this),this.toBeTiled={}}for(var m in T.prototype=Object.create(o.prototype),o)T[m]=o[m];T.prototype.newGraphManager=function(){var t=new r(this);return this.graphManager=t,t},T.prototype.newGraph=function(t){return new n(null,this.graphManager,t)},T.prototype.newNode=function(t){return new a(this.graphManager,t)},T.prototype.newEdge=function(t){return new s(null,null,t)},T.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.isSubLayout||(d.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=d.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=d.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=h.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=h.DEFAULT_REPULSION_STRENGTH,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)},T.prototype.layout=function(){return l.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBen
1dpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.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(d.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e)}}else{var i=this.getFlatForest();if(i.length>0)this.positionNodesRadially(i);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.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 t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),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 i=!this.isTreeGrowing&&!this.isGrowthFinished,o=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,o),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i<t.length;i++){var o=t[i].rect,r=t[i].id;e[r]={id:r,x:o.getCenterX(),y:o.getCenterY(),w:o.width,h:o.height}}return e},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;
1if("during"===h.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},T.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,i=[],o=this.graphManager.getGraphs(),r=o.length;for(e=0;e<r;e++)(t=o[e]).updateConnected(),t.isConnected||(i=i.concat(t.getNodes()));return i},T.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e=new Set;for(n=0;n<t.length;n++){var i=t[n];if(!e.has(i)){var o=i.getSource(),r=i.getTarget();if(o==r)i.getBendpoints().push(new c),i.getBendpoints().push(new c),this.createDummyNodesForBendpoints(i),e.add(i);else{var n,a,s=[];if(s=(s=s.concat(o.getEdgeListToNode(r))).concat(r.getEdgeListToNode(o)),!e.has(s[0])){if(s.length>1)for(a=0;a<s.length;a++){var d=s[a];d.getBendpoints().push(new c),this.createDummyNodesForBendpoints(d)}s.forEach(function(t){e.add(t)})}}}if(e.size==t.length)break}},T.prototype.positionNodesRadially=function(t){for(var e=new g(0,0),i=Math.ceil(Math.sqrt(t.length)),o=0,r=0,n=0,a=new c(0,0),s=0;s<t.length;s++){s%i==0&&(n=0,r=o,0!=s&&(r+=d.DEFAULT_COMPONENT_SEPERATION),o=0);var h=t[s],p=u.findCenterOfTree(h);e.x=n,e.y=r,(a=T.radialLayout(h,p,e)).y>o&&(o=Math.floor(a.y)),n=Math.floor(a.x+d.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(l.WORLD_CENTER_X-a.x/2,l.WORLD_CENTER_Y-a.y/2))},T.radialLayout=function(t,e,i){var o=Math.max(this.maxDiagonalInTree(t),d.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(e,null,0,359,0,o);var r=y.calculateBounds(t),n=new E;n.setDeviceOrgX(r.getMinX()),n.setDeviceOrgY(r.getMinY()),n.setWorldOrgX(i.x),n.setWorldOrgY(i.y);for(var a=0;a<t.length;a++)t[a].transform(n);var s=new c(r.getMaxX(),r.getMaxY());return n.inverseTransformPoint(s)},T.branchRadialLayout=function(t,e,i,o,r,n){var a,s=(o-i+1)/2;s<0&&(s+=180);var d=(s+i)%360*f.TWO_PI/360,h=r*Math.cos(d),l=r*Math.sin(d);t.setCenter(h,l);var g=[],c=(g=g.concat(t.getEdges())).length;null!=e&&c--;for(var u=0,p=g.length,y=t.getEdgesBetween(e);y.length>1;){var E=y[0];y.splice(0,1);var m=g.indexOf(E);m>=0&&g.splice(m,1),p--,c--}a=null!=e?(g.indexOf(y[0])+1)%p:0;for(var N=Math.abs(o-i)/c,v=a;u!=c;v=++v%p){var L=g[v].getOtherEnd(t);if(L!=e){var A=(i+u*N)%360,w=(A+N)%360;T.branchRadialLayout(L,t,A,w,r+n,n),u++}}},T.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;i<t.length;i++){var o=t[i].getDiagonal();o>e&&(e=o)}return e},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],o=this.graphManager.getAllNodes(),r=0;r<o.length;r++){var n=o[r],s=n.getParent();0!==this.getNodeDegreeWithChildren(n)||void 0!=s.id&&this.getToBeTiled(s)||i.push(n)}for(var r=0;r<i.length;r++){var n=i[r],d=n.getParent().id;void 0===e[d]&&(e[d]=[]),e[d]=e[d].concat(n)}Object.keys(e).forEach(function(i){if(e[i].length>1){var o="DummyCompound_"+i;t.memberGroups[o]=e[i];var r=e[i][0].getParent(),n=new a(t.graphManager);n.id=o,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,t.idToDummyNode[o]=n;var s=t.getGraphManager().add(t.newGraph(),n),d=r.getChild();d.add(n);for(var h=0;h<e[i].length;h++){var l=e[i][h];d.remove(l),s.add(l)}}})},T.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var i=0;i<this.compoundOrder.length;i++)e[this.compoundOrder[i].id]=this.compoundOrder[i],t[this.compoundOrder[i].id]=[].concat(this.compoundOrder[i].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[i].getChild()),this.compoundOrder[i].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},T.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(i){var o=t.idToDummyNode[i];e[i]=t.tileNodes(t.memberGroups[i],o.paddingLeft+o.paddingRight),o.rect.width=e[i].width,o.rect.height=e[i].height})},T.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,o=e.paddingLeft,r=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,o,r)}},T.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var o=t.idToDummyNode[i],r=o.paddingLeft,n=o.paddingTop;t.adjustLocations(e[i],o.rect.x,o.rect.y,r,n)})}
1,T.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var o=i.getNodes(),r=0;r<o.length;r++){var n=o[r];if(this.getNodeDegree(n)>0)return this.toBeTiled[e]=!1,!1;if(null==n.getChild()){this.toBeTiled[n.id]=!1;continue}if(!this.getToBeTiled(n))return this.toBeTiled[e]=!1,!1}return this.toBeTiled[e]=!0,!0},T.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,o=0;o<e.length;o++){var r=e[o];r.getSource().id!==r.getTarget().id&&(i+=1)}return i},T.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var i=t.getChild().getNodes(),o=0;o<i.length;o++){var r=i[o];e+=this.getNodeDegreeWithChildren(r)}return e},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},T.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var i=t[e];null!=i.getChild()&&this.fillCompexOrderByDFS(i.getChild().getNodes()),this.getToBeTiled(i)&&this.compoundOrder.push(i)}},T.prototype.adjustLocations=function(t,e,i,o,r){e+=o,i+=r;for(var n=e,a=0;a<t.rows.length;a++){var s=t.rows[a];e=n;for(var d=0,h=0;h<s.length;h++){var l=s[h];l.rect.x=e,l.rect.y=i,e+=l.rect.width+t.horizontalPadding,l.rect.height>d&&(d=l.rect.height)}i+=d+t.verticalPadding}},T.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(o){var r=e[o];i.tiledMemberPack[o]=i.tileNodes(t[o],r.paddingLeft+r.paddingRight),r.rect.width=i.tiledMemberPack[o].width,r.rect.height=i.tiledMemberPack[o].height})},T.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:d.TILING_PADDING_VERTICAL,horizontalPadding:d.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0});for(var o=0;o<t.length;o++){var r=t[o];0==i.rows.length?this.insertNodeToRow(i,r,0,e):this.canAddHorizontal(i,r.rect.width,r.rect.height)?this.insertNodeToRow(i,r,this.getShortestRowIndex(i),e):this.insertNodeToRow(i,r,i.rows.length,e),this.shiftToLastRow(i)}return i},T.prototype.insertNodeToRow=function(t,e,i,o){i==t.rows.length&&(t.rows.push([]),t.rowWidth.push(o),t.rowHeight.push(0));var r=t.rowWidth[i]+e.rect.width;t.rows[i].length>0&&(r+=t.horizontalPadding),t.rowWidth[i]=r,t.width<r&&(t.width=r);var n=e.rect.height;i>0&&(n+=t.verticalPadding);var a=0;n>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=n,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},T.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]<i&&(e=o,i=t.rowWidth[o]);return e},T.prototype.getLongestRowIndex=function(t){for(var e=-1,i=Number.MIN_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]>i&&(e=o,i=t.rowWidth[o]);return e},T.prototype.canAddHorizontal=function(t,e,i){var o,r,n=this.getShortestRowIndex(t);if(n<0)return!0;var a=t.rowWidth[n];if(a+t.horizontalPadding+e<=t.width)return!0;var s=0;return t.rowHeight[n]<i&&n>0&&(s=i+t.verticalPadding-t.rowHeight[n]),o=t.width-a>=e+t.horizontalPadding?(t.height+s)/(a+e+t.horizontalPadding):(t.height+s)/t.width,s=i+t.verticalPadding,(r=t.width<e?(t.height+s)/e:(t.height+s)/t.width)<1&&(r=1/r),o<1&&(o=1/o),o<r},T.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),i=t.rowWidth.length-1,o=t.rows[e],r=o[o.length-1],n=r.width+t.horizontalPadding;if(t.width-t.rowWidth[i]>n&&e!=i){o.splice(-1,1),t.rows[i].push(r),t.rowWidth[e]=t.rowWidth[e]-n,t.rowWidth[i]=t.rowWidth[i]+n,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;s<o.length;s++)o[s].height>a&&(a=o[s].height);e>0&&(a+=t.verticalPadding);var d=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=a,t.rowHeight[i]<r.height+t.verticalPadding&&(t.rowHeight[i]=r.height+t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.height+=h-d,this.shiftToLastRow(t)}},T.prototype.tilingPreLayout=function(){d.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},T.prototype.tilingPostLayout=function(){d.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},T.prototype.reduceTrees=function(){for(var t,e=[],i=!0;i;){var o=this.graphManager.getAllNodes(),r=[];i=!1;for(var n=0;n<o.length;n++)1!=(t=o[n]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(r.push([t,t.getEdges()[0],t.getOwner()]),i=!0);if(!0==i){for(var a=[],s=0;s<r.length;s++)1==r[s][0].getEdges().length&&(a.push(r[s]),r[s][0].getOwner().remove(r[s][0]));e.push(a),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},T.prototype.growTree=function(t){for(var e,i=t.length,o=t[i-1],r=0;r<o.length;r++)e=o[r],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},T.prototype.findPlaceforPrunedNode=function(t){var e,i,o,r,n=t[0],a=(i=n==t[1].source?t[1].target:t[1].source).startX,s=i.finishX,d=i.startY,l=i.finishY,g=[0,0,0,0];if(d>0)for(var c=a;c<=s;c++)g[0]+=this.grid[c][d-1].length+this.grid[c][d].length-1;if(s<this.grid.length-1)for(var c=d;c<=l;c++)g[1]+=this.grid[s+1][c].length+this.grid[s][c].length-1;if(l<this.grid[0].length-1)for(var c=a;c<=s;c++)g[2]+=this.grid[c][l+1].length+this.grid[c][l].length-1;if(a>0)for(var c=d;c<=l;c++)g[3]+=this.grid[a-1][c].length+this.grid[a][c].length-1;for(var u=p.MAX_VALUE,f=0;f<g.length;f++)g[f]<u?(u=g[f],o=1,r=f):g[f]==u&&o++;if(3==o&&0==u)0==g[0]&&0==g[1]&&0==g[2]?e=1:0==g[0]&&0==g[1]&&0==g[3]?e=0:0==g[0]&&0==g[2]&&0==g[3]?e=3:0==g[1]&&0==g[2]&&0==g[3]&&(e=2);else if(2==o&&0==u){var y=Math.floor(2*Math.random());e=0==g[0]&&0==g[1]?0==y?0:1:0==g[0]&&0==g[2]?0==y?0:2:0==g[0]&&0==g[3]?0==y?0:3:0==g[1]&&0==g[2]?0==y?1:2:0==g[1]&&0==g[3]?0==y?1:3:0==y?2:3}else if(4==o&&0==u){var y=Math.floor(4*Math.random());e=y}else e=r;0==e?n.setCenter(i.getCenterX(),i.getCenterY()-i.getHeight()/2-h.DEFAULT_EDGE_LENGTH-n.getHeight()/2):1==e?n.setCenter(i.getCenterX()+i.getWidth()/2+h.DEFAULT_EDGE_LENGTH+n.getWidth()/2,i.getCenterY()):2==e?n.setCenter(i.getCenterX(),i.getCenterY()+i.getHeight()/2+h.DEFAULT_EDGE_LENGTH+n.getHeight()/2):n.setCenter(i.getCenterX()-i.getWidth()/2-h.DEFAULT_EDGE_LENGTH-n.getWidth()/2,i.getCenterY())},t.exports=T}
1,function(t,e,i){var o={};o.layoutBase=i(0),o.CoSEConstants=i(1),o.CoSEEdge=i(2),o.CoSEGraph=i(3),o.CoSEGraphManager=i(4),o.CoSELayout=i(6),o.CoSENode=i(5),t.exports=o}]))},56670:function(t,e,i){var o;t.exports=(o=i(45021),function(t){var e={};function i(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e){t.exports=o},function(t,e,i){var o=i(0).layoutBase.LayoutConstants,r=i(0).layoutBase.FDLayoutConstants,n=i(0).CoSEConstants,a=i(0).CoSELayout,s=i(0).CoSENode,d=i(0).layoutBase.PointD,h=i(0).layoutBase.DimensionD,l={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function g(t){this.options=function(t,e){var i={};
1for(var o in t)i[o]=t[o];for(var o in e)i[o]=e[o];return i}(l,t),c(this.options)}var c=function(t){null!=t.nodeRepulsion&&(n.DEFAULT_REPULSION_STRENGTH=r.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(n.DEFAULT_EDGE_LENGTH=r.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(n.DEFAULT_SPRING_STRENGTH=r.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(n.DEFAULT_GRAVITY_STRENGTH=r.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(n.MAX_ITERATIONS=r.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(n.DEFAULT_GRAVITY_RANGE_FACTOR=r.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(n.DEFAULT_COOLING_FACTOR_INCREMENTAL=r.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?o.QUALITY=0:"proof"==t.quality?o.QUALITY=2:o.QUALITY=1,n.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!t.randomize,n.ANIMATE=r.ANIMATE=o.ANIMATE=t.animate,n.TILE=t.tile,n.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,n.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};g.prototype.run=function(){var t,e,i=this.options;this.idToLNode={};var o=this.layout=new a,r=this;r.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var n=o.newGraphManager();this.gm=n;var s=this.options.eles.nodes(),d=this.options.eles.edges();this.root=n.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),o);for(var h=0;h<d.length;h++){var l=d[h],g=this.idToLNode[l.data("source")],c=this.idToLNode[l.data("target")];g!==c&&0==g.getEdgesBetween(c).length&&(n.add(o.newEdge(),g,c).id=l.id())}var u=function(t,e){"number"==typeof t&&(t=e);var i=t.data("id"),o=r.idToLNode[i];return{x:o.getRect().getCenterX(),y:o.getRect().getCenterY()}},p=function n(){for(var a,s=function(){i.fit&&i.cy.fit(i.eles,i.padding),t||(t=!0,r.cy.one("layoutready",i.ready),r.cy.trigger({type:"layoutready",layout:r}))},d=r.options.refresh,h=0;h<d&&!a;h++)a=r.stopped||r.layout.tick();if(a){o.checkLayoutSuccess()&&!o.isSubLayout&&o.doPostLayout(),o.tilingPostLayout&&o.tilingPostLayout(),o.isLayoutFinished=!0,r.options.eles.nodes().positions(u),s(),r.cy.one("layoutstop",r.options.stop),r.cy.trigger({type:"layoutstop",layout:r}),e&&cancelAnimationFrame(e),t=!1;return}var l=r.layout.getPositionsData();i.eles.nodes().positions(function(t,e){if("number"==typeof t&&(t=e),!t.isParent()){for(var i=t.id(),o=l[i],r=t;null==o&&(o=l[r.data("parent")]||l["DummyCompound_"+r.data("parent")],l[i]=o,void 0!=(r=r.parent()[0])););return null!=o?{x:o.x,y:o.y}:{x:t.position("x"),y:t.position("y")}}}),s(),e=requestAnimationFrame(n)};return o.addListener("layoutstarted",function(){"during"===r.options.animate&&(e=requestAnimationFrame(p))}),o.runLayout(),"during"!==this.options.animate&&(r.options.eles.nodes().not(":parent").layoutPositions(r,r.options,u),t=!1),this},g.prototype.getTopMostNodes=function(t){for(var e={},i=0;i<t.length;i++)e[t[i].id()]=!0;return t.filter(function(t,i){"number"==typeof t&&(t=i);for(var o=t.parent()[0];null!=o;){if(e[o.id()])return!1;o=o.parent()[0]}return!0})},g.prototype.processChildrenList=function(t,e,i){for(var o=e.length,r=0;r<o;r++){var n,a,l=e[r],g=l.children(),c=l.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((n=null!=l.outerWidth()&&null!=l.outerHeight()?t.add(new s(i.graphManager,new d(l.position("x")-c.w/2,l.position("y")-c.h/2),new h(parseFloat(c.w),parseFloat(c.h)))):t.add(new s(this.graphManager))).id=l.data("id"),n.paddingLeft=parseInt(l.css("padding")),n.paddingTop=parseInt(l.css("padding")),n.paddingRight=parseInt(l.css("padding")),n.paddingBottom=parseInt(l.css("padding")),this.options.nodeDimensionsIncludeLabels&&l.isParent()){var u=l.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=l.boundingBox({includeLabels:!0,includeNodes:!1}).h,f=l.css("text-halign");n.labelWidth=u,n.labelHeight=p,n.labelPos=f}this.idToLNode[l.data("id")]=n,isNaN(n.rect.x)&&(n.rect.x=0),isNaN(n.rect.y)&&(n.rect.y=0),null!=g&&g.length>0&&(a=i.getGraphManager().add(i.newGraph(),n),this.processChildrenList(a,g,i))}},g.prototype.stop=function(){return this.stopped=!0,this};var u=function(t){t("layout","cose-bilkent",g)};"undefined"!=typeof cytoscape&&u(cytoscape),t.exports=u}]))}
1,52420:function(t,e,i){i.r(e),i.d(e,{render:function(){return p}});var o=i(99573),r=i(8088),n=i(56670),a=i(53082);function s(t,e){t.forEach(t=>{var i,o,r;let n={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:null!==(i=t.padding)&&void 0!==i?i:0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(n[e]=t[e])}),e.add({group:"nodes",data:n,position:{x:null!==(o=t.x)&&void 0!==o?o:0,y:null!==(r=t.y)&&void 0!==r?r:0}})})}function d(t,e){t.forEach(t=>{let i={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(i[e]=t[e])}),e.add({group:"edges",data:i})})}function h(t){return new Promise(e=>{let i=(0,a.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),n=(0,r.Z)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});i.remove(),s(t.nodes,n),d(t.edges,n),n.nodes().forEach(function(t){t.layoutDimensions=()=>{let e=t.data();return{w:e.width,h:e.height}}}),n.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),n.ready(t=>{o.cM.info("Cytoscape ready",t),e(n)})})}function l(t){return t.nodes().map(t=>{let e=t.data(),i=t.position(),o={id:e.id,x:i.x,y:i.y};return Object.keys(e).forEach(t=>{"id"!==t&&(o[t]=e[t])}),o})}function g(t){return t.edges().map(t=>{let e=t.data(),i=t._private.rscratch,o={id:e.id,source:e.source,target:e.target,startX:i.startX,startY:i.startY,midX:i.midX,midY:i.midY,endX:i.endX,endY:i.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(o[t]=e[t])}),o})}async function c(t,e){o.cM.debug("Starting cose-bilkent layout algorithm");try{u(t);let e=await h(t),i=l(e),r=g(e);return o.cM.debug("Layout completed: ".concat(i.length," nodes, ").concat(r.length," edges")),{nodes:i,edges:r}}catch(t){throw o.cM.error("Error in cose-bilkent layout algorithm:",t),t}}function u(t){if(!t)throw Error("Layout data is required");if(!t.config)throw Error("Configuration is required in layout data");if(!t.rootNode)throw Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw Error("Edges array is required in layout data");return!0}r.Z.use(n),(0,o.eW)(s,"addNodes"),(0,o.eW)(d,"addEdges"),(0,o.eW)(h,"createCytoscapeInstance"),(0,o.eW)(l,"extractPositionedNodes"),(0,o.eW)(g,"extractPositionedEdges"),(0,o.eW)(c,"executeCoseBilkentLayout"),(0,o.eW)(u,"validateLayoutData");var p=(0,o.eW)(async(t,e,i,o)=>{let{insertCluster:r,insertEdge:n,insertEdgeLabel:a,insertMarkers:s,insertNode:d,log:h,positionEdgeLabel:l}=i,{algorithm:g}=o,u={},p={},f=e.select("g");s(f,t.markers,t.type,t.diagramId);let y=f.insert("g").attr("class","subgraphs"),E=f.insert("g").attr("class","edgePaths"),T=f.insert("g").attr("class","edgeLabels"),m=f.insert("g").attr("class","nodes");h.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){let t={...e};p[e.id]=t,u[e.id]=t,await r(y,e)}else{let i={...e};u[e.id]=i;let o=await d(m,e,{config:t.config,dir:t.direction||"TB"}),r=o.node().getBBox();i.width=r.width,i.height=r.height,i.domId=o,h.debug("Node ".concat(e.id," dimensions: ").concat(r.width,"x").concat(r.height))}})),h.debug("Running cose-bilkent layout algorithm");let N={...t,nodes:t.nodes.map(t=>{let e=u[t.id];return{...t,width:e.width,height:e.height}})},v=await c(N,t.config);h.debug("Positioning nodes based on layout results"),v.nodes.forEach(t=>{let e=u[t.id];(null==e?void 0:e.domId)&&(e.domId.attr("transform","translate(".concat(t.x,", ").concat(t.y,")")),e.x=t.x,e.y=t.y,h.debug("Positioned node ".concat(e.id," at center (").concat(t.x,", ").concat(t.y,")")))}
1),v.edges.forEach(e=>{let i=t.edges.find(t=>t.id===e.id);i&&(i.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),h.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{var i,o;await a(T,e);let r=u[null!==(i=e.start)&&void 0!==i?i:""],s=u[null!==(o=e.end)&&void 0!==o?o:""];if(r&&s){let i=v.edges.find(t=>t.id===e.id);if(i){h.debug("APA01 positionedEdge",i);let o={...e},a=n(E,o,p,t.type,r,s,t.diagramId);l(o,a)}else{let i={...e,points:[{x:r.x||0,y:r.y||0},{x:s.x||0,y:s.y||0}]},o=n(E,i,p,t.type,r,s,t.diagramId);l(i,o)}}})),h.debug("Cose-bilkent rendering completed")},"render")}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.