@ensocode/server 0.2.12 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/out/node_modules/@earendil-works/pi-coding-agent/node_modules/.bin/jiti +2 -2
  2. package/out/node_modules/@earendil-works/pi-coding-agent/node_modules/.bin/pi-ai +2 -2
  3. package/out/node_modules/@earendil-works/pi-coding-agent/node_modules/.bin/semver +2 -2
  4. package/out/node_modules/@earendil-works/pi-coding-agent/node_modules/.bin/yaml +2 -2
  5. package/out/node_modules/@rahularya01/pi-cursor/node_modules/.bin/pi +2 -2
  6. package/out/node_modules/@rahularya01/pi-cursor/node_modules/.bin/pi-ai +2 -2
  7. package/out/renderer/assets/{abnfDiagram-VCTEODGH-DSknDX4E.js → abnfDiagram-VCTEODGH-BDMrRlBj.js} +1 -1
  8. package/out/renderer/assets/{arc-zTFUKTRJ.js → arc-BHxAM6vy.js} +1 -1
  9. package/out/renderer/assets/{architectureDiagram-5GKGNRK7-C3ozR2n4.js → architectureDiagram-5GKGNRK7-DQrws1sS.js} +1 -1
  10. package/out/renderer/assets/{blockDiagram-I7D4REHJ-CP8IPcaX.js → blockDiagram-I7D4REHJ-DNVn9Vt7.js} +1 -1
  11. package/out/renderer/assets/{c4Diagram-7LVT6UL2-Dg7E4owk.js → c4Diagram-7LVT6UL2--LtDB-qV.js} +1 -1
  12. package/out/renderer/assets/channel-DIfxeADv.js +1 -0
  13. package/out/renderer/assets/{chunk-2Q5K7J3B-DJGGTYcL.js → chunk-2Q5K7J3B-t33NDV5v.js} +1 -1
  14. package/out/renderer/assets/{chunk-5VM5RSS4-BtSsuqjz.js → chunk-5VM5RSS4-aCGmL6_s.js} +1 -1
  15. package/out/renderer/assets/{chunk-F27PBJKO-BWV_yV1h.js → chunk-F27PBJKO-DQvndxlp.js} +1 -1
  16. package/out/renderer/assets/{chunk-IMKFNOWR-Ck5oy1zk.js → chunk-IMKFNOWR-rH1b7xzl.js} +1 -1
  17. package/out/renderer/assets/{chunk-JWPE2WC7-B-S2-0Sm.js → chunk-JWPE2WC7-B7-2fQn6.js} +1 -1
  18. package/out/renderer/assets/{chunk-POPQ4Y6H-R_8Vekxl.js → chunk-POPQ4Y6H-CVYzlJTE.js} +1 -1
  19. package/out/renderer/assets/{chunk-SVP7TREG-tsjEM3PC.js → chunk-SVP7TREG-v3eUqihT.js} +1 -1
  20. package/out/renderer/assets/{chunk-TICWLB2K-DUvlZ-eV.js → chunk-TICWLB2K-Dq2BsFU4.js} +1 -1
  21. package/out/renderer/assets/{chunk-XXDRQBXY-Dyxh1s1Z.js → chunk-XXDRQBXY-DjMnIDLm.js} +1 -1
  22. package/out/renderer/assets/classDiagram-ZZMXUADV-D8Q2hInV.js +1 -0
  23. package/out/renderer/assets/classDiagram-v2-VYDZK3BY-D8Q2hInV.js +1 -0
  24. package/out/renderer/assets/{cose-bilkent-JH36ORCC-BtT54hjs.js → cose-bilkent-JH36ORCC-DAUPCDab.js} +1 -1
  25. package/out/renderer/assets/{cynefin-OW5HDTMX-Cs8squh2.js → cynefin-OW5HDTMX-DBni0eSw.js} +1 -1
  26. package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-fbUAGuvo.js → cynefinDiagram-5FMLGOSQ-n0u0erlW.js} +1 -1
  27. package/out/renderer/assets/{cytoscape-fcose-Bz_Tpcw2.js → cytoscape-fcose-DVQaQP2R.js} +1 -1
  28. package/out/renderer/assets/{dagre-GXQ25YYZ-Fhu5QOEm.js → dagre-GXQ25YYZ-B-0jlzO1.js} +1 -1
  29. package/out/renderer/assets/{diagram-S7CK7UJ4-DK47UH_g.js → diagram-S7CK7UJ4-BxXw3viF.js} +1 -1
  30. package/out/renderer/assets/{diagram-UQ7AKVKN-DtVjeJ2g.js → diagram-UQ7AKVKN-BCCjG-ot.js} +1 -1
  31. package/out/renderer/assets/{diagram-VSXAHHWV-q-yK0nOP.js → diagram-VSXAHHWV-BK0zhBZp.js} +1 -1
  32. package/out/renderer/assets/{diagram-VX7I27RA-A7YCLSM9.js → diagram-VX7I27RA-DylHuw1A.js} +1 -1
  33. package/out/renderer/assets/{diagram-Z3DM3KII-C8JKpOpD.js → diagram-Z3DM3KII-biplaxsX.js} +1 -1
  34. package/out/renderer/assets/{ebnfDiagram-PWID7BFC-BB8uppX2.js → ebnfDiagram-PWID7BFC-DzoKjl97.js} +1 -1
  35. package/out/renderer/assets/{erDiagram-RLTQ6QDP-bsoIoJ_o.js → erDiagram-RLTQ6QDP-CxhgKPs-.js} +1 -1
  36. package/out/renderer/assets/{flowDiagram-HODETNUW-D1-YOWb-.js → flowDiagram-HODETNUW-DCi3FHwP.js} +1 -1
  37. package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-BfLmFDZ-.js → ganttDiagram-EL5Y4UJY-BCmOcEsS.js} +1 -1
  38. package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-Cm8h40L_.js → gitGraphDiagram-WWUBYQGX-CWwjuui-.js} +1 -1
  39. package/out/renderer/assets/{globals-BKWml662.js → globals-BwNQF72D.js} +1 -1
  40. package/out/renderer/assets/{index-EZ5OaOIy.js → index-CzysFMwH.js} +3 -3
  41. package/out/renderer/assets/{infoDiagram-27XIBGKW-yWJunXz9.js → infoDiagram-27XIBGKW-C2vV0S3R.js} +1 -1
  42. package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-DxwTsrS1.js → ishikawaDiagram-5VMMS53U-BSWVe4Qr.js} +1 -1
  43. package/out/renderer/assets/{journeyDiagram-3NMN7TZE-CuB5mhXa.js → journeyDiagram-3NMN7TZE-D_D_AgW8.js} +1 -1
  44. package/out/renderer/assets/{kanban-definition-UXKFOSKX-Cmva56gL.js → kanban-definition-UXKFOSKX-Dp-tJLJV.js} +1 -1
  45. package/out/renderer/assets/{layout-DoAgDBEn.js → layout-BGyL6Nz9.js} +1 -1
  46. package/out/renderer/assets/{linear-CZwdsMB7.js → linear-NiGqkXcf.js} +1 -1
  47. package/out/renderer/assets/{mermaid.core-DU532gMP.js → mermaid.core-CAbX6U-E.js} +5 -5
  48. package/out/renderer/assets/{mindmap-definition-YA3MSWOX-DK3MTfhw.js → mindmap-definition-YA3MSWOX-C_KTsCSk.js} +1 -1
  49. package/out/renderer/assets/{pegDiagram-XKGWAZYB-D6n-lh1R.js → pegDiagram-XKGWAZYB-BlEf-4SS.js} +1 -1
  50. package/out/renderer/assets/{pieDiagram-E7YTZNPT-CxpB_WP9.js → pieDiagram-E7YTZNPT-C2l9VhhT.js} +1 -1
  51. package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-eGxakEz6.js → quadrantDiagram-AXDQQJYC-Bkm2D1II.js} +1 -1
  52. package/out/renderer/assets/{railroadDiagram-O6MQD6OU-Bn8WVtzF.js → railroadDiagram-O6MQD6OU-Cy9AsJch.js} +1 -1
  53. package/out/renderer/assets/{requirementDiagram-BXWQKSXE-k1J6FH4-.js → requirementDiagram-BXWQKSXE-DaqpZJ20.js} +1 -1
  54. package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-zs75kBxO.js → sankeyDiagram-P5KCCOFB-DShER0Cl.js} +1 -1
  55. package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-l16uPywk.js → sequenceDiagram-WJ2MYXX4-fA8_5PiI.js} +1 -1
  56. package/out/renderer/assets/{settings-PBZusE8m.js → settings-BwM2TgQ9.js} +2 -2
  57. package/out/renderer/assets/{sizeCapture-INFHLROL-qNGUa7l4.js → sizeCapture-INFHLROL-CpzQOV5k.js} +1 -1
  58. package/out/renderer/assets/{stateDiagram-D77RDMKH-XunN8EqP.js → stateDiagram-D77RDMKH-CIEGNnJO.js} +1 -1
  59. package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-DYbIahny.js +1 -0
  60. package/out/renderer/assets/{swimlanes-42K2YHIH-BFbz49DP.js → swimlanes-42K2YHIH-CAeLgkB1.js} +1 -1
  61. package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-BLHkQmpd.js +8 -0
  62. package/out/renderer/assets/{timeline-definition-24CTP7MA-BZe7g-xh.js → timeline-definition-24CTP7MA-CkWIsYs6.js} +1 -1
  63. package/out/renderer/assets/{vennDiagram-4TSXK5OY-HhmToh-J.js → vennDiagram-4TSXK5OY-Cus6U3uz.js} +1 -1
  64. package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-C7Xrbo9d.js → wardleyDiagram-VM6X3IG4-BJg1coTW.js} +1 -1
  65. package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-CzFFFEO6.js → xychartDiagram-S5SC5T6Z-DjRPfyub.js} +1 -1
  66. package/out/renderer/index.html +2 -2
  67. package/out/renderer/settings.html +3 -3
  68. package/out/server/agent.js +1 -1
  69. package/out/server/index.js +4 -4
  70. package/package.json +1 -1
  71. package/out/renderer/assets/channel-CwD8Sdta.js +0 -1
  72. package/out/renderer/assets/classDiagram-ZZMXUADV-C_zVt_Ll.js +0 -1
  73. package/out/renderer/assets/classDiagram-v2-VYDZK3BY-C_zVt_Ll.js +0 -1
  74. package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-DtHEdXeq.js +0 -1
  75. package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-DyNtRiPo.js +0 -8
@@ -1 +1 @@
1
- import{g as Ee}from"./globals-BKWml662.js";var _t={exports:{}},te={exports:{}},ee={exports:{}},ye=ee.exports,ve;function Te(){return ve||(ve=1,(function(kt,se){(function(gt,A){kt.exports=A()})(ye,function(){return(function(k){var gt={};function A(T){if(gt[T])return gt[T].exports;var l=gt[T]={i:T,l:!1,exports:{}};return k[T].call(l.exports,l,l.exports,A),l.l=!0,l.exports}return A.m=k,A.c=gt,A.i=function(T){return T},A.d=function(T,l,n){A.o(T,l)||Object.defineProperty(T,l,{configurable:!1,enumerable:!0,get:n})},A.n=function(T){var l=T&&T.__esModule?function(){return T.default}:function(){return T};return A.d(l,"a",l),l},A.o=function(T,l){return Object.prototype.hasOwnProperty.call(T,l)},A.p="",A(A.s=28)})([(function(k,gt,A){function T(){}T.QUALITY=1,T.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,T.DEFAULT_INCREMENTAL=!1,T.DEFAULT_ANIMATION_ON_LAYOUT=!0,T.DEFAULT_ANIMATION_DURING_LAYOUT=!1,T.DEFAULT_ANIMATION_PERIOD=50,T.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,T.DEFAULT_GRAPH_MARGIN=15,T.NODE_DIMENSIONS_INCLUDE_LABELS=!1,T.SIMPLE_NODE_SIZE=40,T.SIMPLE_NODE_HALF_SIZE=T.SIMPLE_NODE_SIZE/2,T.EMPTY_COMPOUND_NODE_SIZE=40,T.MIN_EDGE_LENGTH=1,T.WORLD_BOUNDARY=1e6,T.INITIAL_WORLD_BOUNDARY=T.WORLD_BOUNDARY/1e3,T.WORLD_CENTER_X=1200,T.WORLD_CENTER_Y=900,k.exports=T}),(function(k,gt,A){var T=A(2),l=A(8),n=A(9);function r(u,i,y){T.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=u,this.target=i}r.prototype=Object.create(T.prototype);for(var a in T)r[a]=T[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(u,i){for(var y=this.getOtherEnd(u),t=i.getGraphManager().getRoot();;){if(y.getOwner()==i)return y;if(y.getOwner()==t)break;y=y.getOwner().getParent()}return null},r.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},k.exports=r}),(function(k,gt,A){function T(l){this.vGraphObject=l}k.exports=T}),(function(k,gt,A){var T=A(2),l=A(10),n=A(13),r=A(0),a=A(16),u=A(5);function i(t,s,o,f){o==null&&f==null&&(f=s),T.call(this,f),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}i.prototype=Object.create(T.prototype);for(var y in T)i[y]=T[y];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},i.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},i.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},i.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},i.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(f){if(f.target==t){if(f.source!=o)throw"Incorrect edge source!";s.push(f)}}),s},i.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(f){if(!(f.source==o||f.target==o))throw"Incorrect edge source and/or target";(f.target==t||f.source==t)&&s.push(f)}),s},i.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},i.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var f=this.child.getNodes(),h=0;h<f.length;h++)s=f[h],o=s.withChildren(),o.forEach(function(N){t.add(N)});return t},i.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),f=0;f<o.length;f++)s=o[f],t+=s.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},i.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,f=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+a.nextDouble()*(f-o)+o;var h=-r.INITIAL_WORLD_BOUNDARY,N=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+a.nextDouble()*(N-h)+h,this.rect.x=t,this.rect.y=s},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var f=new u(s,o),h=t.inverseTransformPoint(f);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},k.exports=i}),(function(k,gt,A){var T=A(0);function l(){}for(var n in T)l[n]=T[n];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,k.exports=l}),(function(k,gt,A){function T(l,n){l==null&&n==null?(this.x=0,this.y=0):(this.x=l,this.y=n)}T.prototype.getX=function(){return this.x},T.prototype.getY=function(){return this.y},T.prototype.setX=function(l){this.x=l},T.prototype.setY=function(l){this.y=l},T.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},T.prototype.getCopy=function(){return new T(this.x,this.y)},T.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},k.exports=T}),(function(k,gt,A){var T=A(2),l=A(10),n=A(0),r=A(7),a=A(3),u=A(1),i=A(13),y=A(12),t=A(11);function s(f,h,N){T.call(this,N),this.estimatedSize=l.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=f,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(T.prototype);for(var o in T)s[o]=T[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(f,h,N){if(h==null&&N==null){var c=f;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var d=f;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(N)>-1))throw"Source or target not in graph!";if(!(h.owner==N.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=N.owner?null:(d.source=h,d.target=N,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),N!=h&&N.edges.push(d),d)}},s.prototype.remove=function(f){var h=f;if(f instanceof a){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var N=h.edges.slice(),c,d=N.length,m=0;m<d;m++)c=N[m],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var G=this.nodes.indexOf(h);if(G==-1)throw"Node not in owner node list!";this.nodes.splice(G,1)}else if(f instanceof u){var c=f;if(c==null)throw"Edge is null!";if(!(c.source!=null&&c.target!=null))throw"Source and/or target is null!";if(!(c.source.owner!=null&&c.target.owner!=null&&c.source.owner==this&&c.target.owner==this))throw"Source and/or target owner is invalid!";var L=c.source.edges.indexOf(c),U=c.target.edges.indexOf(c);if(!(L>-1&&U>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(L,1),c.target!=c.source&&c.target.edges.splice(U,1);var G=c.source.owner.getEdges().indexOf(c);if(G==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(G,1)}},s.prototype.updateLeftTop=function(){for(var f=l.MAX_VALUE,h=l.MAX_VALUE,N,c,d,m=this.getNodes(),G=m.length,L=0;L<G;L++){var U=m[L];N=U.getTop(),c=U.getLeft(),f>N&&(f=N),h>c&&(h=c)}return f==l.MAX_VALUE?null:(m[0].getParent().paddingLeft!=null?d=m[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=f-d,new y(this.left,this.top))},s.prototype.updateBounds=function(f){for(var h=l.MAX_VALUE,N=-l.MAX_VALUE,c=l.MAX_VALUE,d=-l.MAX_VALUE,m,G,L,U,J,V=this.nodes,j=V.length,D=0;D<j;D++){var et=V[D];f&&et.child!=null&&et.updateBounds(),m=et.getLeft(),G=et.getRight(),L=et.getTop(),U=et.getBottom(),h>m&&(h=m),N<G&&(N=G),c>L&&(c=L),d<U&&(d=U)}var e=new i(h,c,N-h,d-c);h==l.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),V[0].getParent().paddingLeft!=null?J=V[0].getParent().paddingLeft:J=this.margin,this.left=e.x-J,this.right=e.x+e.width+J,this.top=e.y-J,this.bottom=e.y+e.height+J},s.calculateBounds=function(f){for(var h=l.MAX_VALUE,N=-l.MAX_VALUE,c=l.MAX_VALUE,d=-l.MAX_VALUE,m,G,L,U,J=f.length,V=0;V<J;V++){var j=f[V];m=j.getLeft(),G=j.getRight(),L=j.getTop(),U=j.getBottom(),h>m&&(h=m),N<G&&(N=G),c>L&&(c=L),d<U&&(d=U)}var D=new i(h,c,N-h,d-c);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var f=0,h=this.nodes,N=h.length,c=0;c<N;c++){var d=h[c];f+=d.calcEstimatedSize()}return f==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=f/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var f=this;if(this.nodes.length==0){this.isConnected=!0;return}var h=new t,N=new Set,c=this.nodes[0],d,m,G=c.withChildren();for(G.forEach(function(D){h.push(D),N.add(D)});h.length!==0;){c=h.shift(),d=c.getEdges();for(var L=d.length,U=0;U<L;U++){var J=d[U];if(m=J.getOtherEndInGraph(c,this),m!=null&&!N.has(m)){var V=m.withChildren();V.forEach(function(D){h.push(D),N.add(D)})}}}if(this.isConnected=!1,N.size>=this.nodes.length){var j=0;N.forEach(function(D){D.owner==f&&j++}),j==this.nodes.length&&(this.isConnected=!0)}},k.exports=s}),(function(k,gt,A){var T,l=A(1);function n(r){T=A(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),u=this.add(r,a);return this.setRootGraph(u),this.rootGraph},n.prototype.add=function(r,a,u,i,y){if(u==null&&i==null&&y==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{y=u,i=a,u=r;var t=i.getOwner(),s=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return u.isInterGraph=!1,t.add(u,i,y);if(u.isInterGraph=!0,u.source=i,u.target=y,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},n.prototype.remove=function(r){if(r instanceof T){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(a.getEdges());for(var i,y=u.length,t=0;t<y;t++)i=u[t],a.remove(i);var s=[];s=s.concat(a.getNodes());var o;y=s.length;for(var t=0;t<y;t++)o=s[t],a.remove(o);a==this.rootGraph&&this.setRootGraph(null);var f=this.graphs.indexOf(a);this.graphs.splice(f,1),a.parent=null}else if(r instanceof l){if(i=r,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var f=i.source.edges.indexOf(i);if(i.source.edges.splice(f,1),f=i.target.edges.indexOf(i),i.target.edges.splice(f,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var f=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(f,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),u=a.length,i=0;i<u;i++)r=r.concat(a[i].getNodes());this.allNodes=r}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],a=this.getGraphs();a.length;for(var u=0;u<a.length;u++)r=r.concat(a[u].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var u=r.getOwner(),i;do{if(i=u.getParent(),i==null)break;if(i==a)return!0;if(u=i.getOwner(),u==null)break}while(!0);u=a.getOwner();do{if(i=u.getParent(),i==null)break;if(i==r)return!0;if(u=i.getOwner(),u==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var r,a,u,i,y,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],a=r.source,u=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=u,a==u){r.lca=a.getOwner();continue}for(i=a.getOwner();r.lca==null;){for(r.targetInLca=u,y=u.getOwner();r.lca==null;){if(y==i){r.lca=y;break}if(y==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=y.getParent(),y=r.targetInLca.getOwner()}if(i==this.rootGraph)break;r.lca==null&&(r.sourceInLca=i.getParent(),i=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var u=r.getOwner();do{if(u==null)break;var i=a.getOwner();do{if(i==null)break;if(i==u)return i;i=i.getParent().getOwner()}while(!0);u=u.getParent().getOwner()}while(!0);return u},n.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var u,i=r.getNodes(),y=i.length,t=0;t<y;t++)u=i[t],u.inclusionTreeDepth=a,u.child!=null&&this.calcInclusionTreeDepths(u.child,a+1)},n.prototype.includesInvalidEdge=function(){for(var r,a=[],u=this.edges.length,i=0;i<u;i++)r=this.edges[i],this.isOneAncestorOfOther(r.source,r.target)&&a.push(r);for(var i=0;i<a.length;i++)this.remove(a[i]);return!1},k.exports=n}),(function(k,gt,A){var T=A(12);function l(){}l.calcSeparationAmount=function(n,r,a,u){if(!n.intersects(r))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(n,r,i),a[0]=Math.min(n.getRight(),r.getRight())-Math.max(n.x,r.x),a[1]=Math.min(n.getBottom(),r.getBottom())-Math.max(n.y,r.y),n.getX()<=r.getX()&&n.getRight()>=r.getRight()?a[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(a[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(a[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var y=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(y=1);var t=y*a[0],s=a[1]/y;a[0]<s?s=a[0]:t=a[1],a[0]=-1*i[0]*(s/2+u),a[1]=-1*i[1]*(t/2+u)},l.decideDirectionsForOverlappingNodes=function(n,r,a){n.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,n.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},l.getIntersection2=function(n,r,a){var u=n.getCenterX(),i=n.getCenterY(),y=r.getCenterX(),t=r.getCenterY();if(n.intersects(r))return a[0]=u,a[1]=i,a[2]=y,a[3]=t,!0;var s=n.getX(),o=n.getY(),f=n.getRight(),h=n.getX(),N=n.getBottom(),c=n.getRight(),d=n.getWidthHalf(),m=n.getHeightHalf(),G=r.getX(),L=r.getY(),U=r.getRight(),J=r.getX(),V=r.getBottom(),j=r.getRight(),D=r.getWidthHalf(),et=r.getHeightHalf(),e=!1,E=!1;if(u===y){if(i>t)return a[0]=u,a[1]=o,a[2]=y,a[3]=V,!1;if(i<t)return a[0]=u,a[1]=N,a[2]=y,a[3]=L,!1}else if(i===t){if(u>y)return a[0]=s,a[1]=i,a[2]=U,a[3]=t,!1;if(u<y)return a[0]=f,a[1]=i,a[2]=G,a[3]=t,!1}else{var g=n.height/n.width,p=r.height/r.width,v=(t-i)/(y-u),w=void 0,C=void 0,R=void 0,P=void 0,O=void 0,z=void 0;if(-g===v?u>y?(a[0]=h,a[1]=N,e=!0):(a[0]=f,a[1]=o,e=!0):g===v&&(u>y?(a[0]=s,a[1]=o,e=!0):(a[0]=c,a[1]=N,e=!0)),-p===v?y>u?(a[2]=J,a[3]=V,E=!0):(a[2]=U,a[3]=L,E=!0):p===v&&(y>u?(a[2]=G,a[3]=L,E=!0):(a[2]=j,a[3]=V,E=!0)),e&&E)return!1;if(u>y?i>t?(w=this.getCardinalDirection(g,v,4),C=this.getCardinalDirection(p,v,2)):(w=this.getCardinalDirection(-g,v,3),C=this.getCardinalDirection(-p,v,1)):i>t?(w=this.getCardinalDirection(-g,v,1),C=this.getCardinalDirection(-p,v,3)):(w=this.getCardinalDirection(g,v,2),C=this.getCardinalDirection(p,v,4)),!e)switch(w){case 1:P=o,R=u+-m/v,a[0]=R,a[1]=P;break;case 2:R=c,P=i+d*v,a[0]=R,a[1]=P;break;case 3:P=N,R=u+m/v,a[0]=R,a[1]=P;break;case 4:R=h,P=i+-d*v,a[0]=R,a[1]=P;break}if(!E)switch(C){case 1:z=L,O=y+-et/v,a[2]=O,a[3]=z;break;case 2:O=j,z=t+D*v,a[2]=O,a[3]=z;break;case 3:z=V,O=y+et/v,a[2]=O,a[3]=z;break;case 4:O=J,z=t+-D*v,a[2]=O,a[3]=z;break}}return!1},l.getCardinalDirection=function(n,r,a){return n>r?a:1+a%4},l.getIntersection=function(n,r,a,u){if(u==null)return this.getIntersection2(n,r,a);var i=n.x,y=n.y,t=r.x,s=r.y,o=a.x,f=a.y,h=u.x,N=u.y,c=void 0,d=void 0,m=void 0,G=void 0,L=void 0,U=void 0,J=void 0,V=void 0,j=void 0;return m=s-y,L=i-t,J=t*y-i*s,G=N-f,U=o-h,V=h*f-o*N,j=m*U-G*L,j===0?null:(c=(L*V-U*J)/j,d=(G*J-m*V)/j,new T(c,d))},l.angleOfVector=function(n,r,a,u){var i=void 0;return n!==a?(i=Math.atan((u-r)/(a-n)),a<n?i+=Math.PI:u<r&&(i+=this.TWO_PI)):u<r?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},l.doIntersect=function(n,r,a,u){var i=n.x,y=n.y,t=r.x,s=r.y,o=a.x,f=a.y,h=u.x,N=u.y,c=(t-i)*(N-f)-(h-o)*(s-y);if(c===0)return!1;var d=((N-f)*(h-i)+(o-h)*(N-y))/c,m=((y-s)*(h-i)+(t-i)*(N-y))/c;return 0<d&&d<1&&0<m&&m<1},l.findCircleLineIntersections=function(n,r,a,u,i,y,t){var s=(a-n)*(a-n)+(u-r)*(u-r),o=2*((n-i)*(a-n)+(r-y)*(u-r)),f=(n-i)*(n-i)+(r-y)*(r-y)-t*t,h=o*o-4*s*f;if(h>=0){var N=(-o+Math.sqrt(o*o-4*s*f))/(2*s),c=(-o-Math.sqrt(o*o-4*s*f))/(2*s),d=null;return N>=0&&N<=1?[N]:c>=0&&c<=1?[c]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,k.exports=l}),(function(k,gt,A){function T(){}T.sign=function(l){return l>0?1:l<0?-1:0},T.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},T.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},k.exports=T}),(function(k,gt,A){function T(){}T.MAX_VALUE=2147483647,T.MIN_VALUE=-2147483648,k.exports=T}),(function(k,gt,A){var T=(function(){function i(y,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(y,o.key,o)}}return function(y,t,s){return t&&i(y.prototype,t),s&&i(y,s),y}})();function l(i,y){if(!(i instanceof y))throw new TypeError("Cannot call a class as a function")}var n=function(y){return{value:y,next:null,prev:null}},r=function(y,t,s,o){return y!==null?y.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=y,t.next=s,o.length++,t},a=function(y,t){var s=y.prev,o=y.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,y.prev=y.next=null,t.length--,y},u=(function(){function i(y){var t=this;l(this,i),this.length=0,this.head=null,this.tail=null,y?.forEach(function(s){return t.push(s)})}return T(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,n(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,n(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return r(null,n(t),this.head,this)}},{key:"remove",value:function(t){return a(t,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,f=this.head;o<t;)f=f.next,o++;f.value=s}}}]),i})();k.exports=u}),(function(k,gt,A){function T(l,n,r){this.x=null,this.y=null,l==null&&n==null&&r==null?(this.x=0,this.y=0):typeof l=="number"&&typeof n=="number"&&r==null?(this.x=l,this.y=n):l.constructor.name=="Point"&&n==null&&r==null&&(r=l,this.x=r.x,this.y=r.y)}T.prototype.getX=function(){return this.x},T.prototype.getY=function(){return this.y},T.prototype.getLocation=function(){return new T(this.x,this.y)},T.prototype.setLocation=function(l,n,r){l.constructor.name=="Point"&&n==null&&r==null?(r=l,this.setLocation(r.x,r.y)):typeof l=="number"&&typeof n=="number"&&r==null&&(parseInt(l)==l&&parseInt(n)==n?this.move(l,n):(this.x=Math.floor(l+.5),this.y=Math.floor(n+.5)))},T.prototype.move=function(l,n){this.x=l,this.y=n},T.prototype.translate=function(l,n){this.x+=l,this.y+=n},T.prototype.equals=function(l){if(l.constructor.name=="Point"){var n=l;return this.x==n.x&&this.y==n.y}return this==l},T.prototype.toString=function(){return new T().constructor.name+"[x="+this.x+",y="+this.y+"]"},k.exports=T}),(function(k,gt,A){function T(l,n,r,a){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&n!=null&&r!=null&&a!=null&&(this.x=l,this.y=n,this.width=r,this.height=a)}T.prototype.getX=function(){return this.x},T.prototype.setX=function(l){this.x=l},T.prototype.getY=function(){return this.y},T.prototype.setY=function(l){this.y=l},T.prototype.getWidth=function(){return this.width},T.prototype.setWidth=function(l){this.width=l},T.prototype.getHeight=function(){return this.height},T.prototype.setHeight=function(l){this.height=l},T.prototype.getRight=function(){return this.x+this.width},T.prototype.getBottom=function(){return this.y+this.height},T.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},T.prototype.getCenterX=function(){return this.x+this.width/2},T.prototype.getMinX=function(){return this.getX()},T.prototype.getMaxX=function(){return this.getX()+this.width},T.prototype.getCenterY=function(){return this.y+this.height/2},T.prototype.getMinY=function(){return this.getY()},T.prototype.getMaxY=function(){return this.getY()+this.height},T.prototype.getWidthHalf=function(){return this.width/2},T.prototype.getHeightHalf=function(){return this.height/2},k.exports=T}),(function(k,gt,A){var T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function l(){}l.lastID=0,l.createID=function(n){return l.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=l.getString(),l.lastID++),n.uniqueID)},l.getString=function(n){return n==null&&(n=l.lastID),"Object#"+n},l.isPrimitive=function(n){var r=typeof n>"u"?"undefined":T(n);return n==null||r!="object"&&r!="function"},k.exports=l}),(function(k,gt,A){function T(o){if(Array.isArray(o)){for(var f=0,h=Array(o.length);f<o.length;f++)h[f]=o[f];return h}else return Array.from(o)}var l=A(0),n=A(7),r=A(3),a=A(1),u=A(6),i=A(5),y=A(17),t=A(29);function s(o){t.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new n(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new u(null,this.graphManager,o)},s.prototype.newNode=function(o){return new r(this.graphManager,o)},s.prototype.newEdge=function(o){return new a(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),l.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),f=0;f<o.length;f++)o[f];for(var h=this.graphManager.getRoot().getNodes(),f=0;f<h.length;f++)h[f];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var f=o;if(f.getChild()!=null)for(var h=f.getChild().getNodes(),N=0;N<h.length;N++)update(h[N]);if(f.vGraphObject!=null){var c=f.vGraphObject;c.update(f)}}else if(o instanceof a){var d=o;if(d.vGraphObject!=null){var m=d.vGraphObject;m.update(d)}}else if(o instanceof u){var G=o;if(G.vGraphObject!=null){var L=G.vGraphObject;L.update(G)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new i(0,0));else{var f=new y,h=this.graphManager.getRoot().updateLeftTop();if(h!=null){f.setWorldOrgX(o.x),f.setWorldOrgY(o.y),f.setDeviceOrgX(h.x),f.setDeviceOrgY(h.y);for(var N=this.getAllNodes(),c,d=0;d<N.length;d++)c=N[d],c.transform(f)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var f,h,N=o.getNodes(),c=0;c<N.length;c++)f=N[c],h=f.getChild(),h==null||h.getNodes().length==0?f.scatter():(this.positionNodesRandomly(h),f.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],f=!0,h=this.graphManager.getRoot().getNodes(),N=!0,c=0;c<h.length;c++)h[c].getChild()!=null&&(N=!1);if(!N)return o;var d=new Set,m=[],G=new Map,L=[];for(L=L.concat(h);L.length>0&&f;){for(m.push(L[0]);m.length>0&&f;){var U=m[0];m.splice(0,1),d.add(U);for(var J=U.getEdges(),c=0;c<J.length;c++){var V=J[c].getOtherEnd(U);if(G.get(U)!=V)if(!d.has(V))m.push(V),G.set(V,U);else{f=!1;break}}}if(!f)o=[];else{var j=[].concat(T(d));o.push(j);for(var c=0;c<j.length;c++){var D=j[c],et=L.indexOf(D);et>-1&&L.splice(et,1)}d=new Set,G=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var f=[],h=o.source,N=this.graphManager.calcLowestCommonAncestor(o.source,o.target),c=0;c<o.bendpoints.length;c++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),N.add(d);var m=this.newEdge(null);this.graphManager.add(m,h,d),f.add(d),h=d}var m=this.newEdge(null);return this.graphManager.add(m,h,o.target),this.edgeToDummyNodes.set(o,f),o.isInterGraph()?this.graphManager.remove(o):N.remove(o),f},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(T(this.edgeToDummyNodes.keys())).concat(o);for(var f=0;f<o.length;f++){var h=o[f];if(h.bendpoints.length>0){for(var N=this.edgeToDummyNodes.get(h),c=0;c<N.length;c++){var d=N[c],m=new i(d.getCenterX(),d.getCenterY()),G=h.bendpoints.get(c);G.x=m.x,G.y=m.y,d.getOwner().remove(d)}this.graphManager.add(h,h.source,h.target)}}},s.transform=function(o,f,h,N){if(h!=null&&N!=null){var c=f;if(o<=50){var d=f/h;c-=(f-d)/50*(50-o)}else{var m=f*N;c+=(m-f)/50*(o-50)}return c}else{var G,L;return o<=50?(G=9*f/500,L=f/10):(G=9*f/50,L=-8*f),G*o+L}},s.findCenterOfTree=function(o){var f=[];f=f.concat(o);var h=[],N=new Map,c=!1,d=null;(f.length==1||f.length==2)&&(c=!0,d=f[0]);for(var m=0;m<f.length;m++){var G=f[m],L=G.getNeighborsList().size;N.set(G,G.getNeighborsList().size),L==1&&h.push(G)}var U=[];for(U=U.concat(h);!c;){var J=[];J=J.concat(U),U=[];for(var m=0;m<f.length;m++){var G=f[m],V=f.indexOf(G);V>=0&&f.splice(V,1);var j=G.getNeighborsList();j.forEach(function(e){if(h.indexOf(e)<0){var E=N.get(e),g=E-1;g==1&&U.push(e),N.set(e,g)}})}h=h.concat(U),(f.length==1||f.length==2)&&(c=!0,d=f[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},k.exports=s}),(function(k,gt,A){function T(){}T.seed=1,T.x=0,T.nextDouble=function(){return T.x=Math.sin(T.seed++)*1e4,T.x-Math.floor(T.x)},k.exports=T}),(function(k,gt,A){var T=A(5);function l(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(n){this.lworldExtX=n},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(n){this.lworldExtY=n},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},l.prototype.transformX=function(n){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/a),r},l.prototype.transformY=function(n){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/a),r},l.prototype.inverseTransformX=function(n){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/a),r},l.prototype.inverseTransformY=function(n){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/a),r},l.prototype.inverseTransformPoint=function(n){var r=new T(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},k.exports=l}),(function(k,gt,A){function T(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var l=A(15),n=A(4),r=A(0),a=A(8),u=A(9);function i(){l.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}i.prototype=Object.create(l.prototype);for(var y in l)i[y]=l[y];i.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,f,h,N,c,d=this.getGraphManager().getAllEdges(),m=0;m<d.length;m++)t=d[m],s=t.idealLength,t.isInterGraph&&(f=t.getSource(),h=t.getTarget(),N=t.getSourceInLca().getEstimatedSize(),c=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=N+c-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(f.getInclusionTreeDepth()+h.getInclusionTreeDepth()-2*o))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,f,h,N,c=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;o<c.length;o++)h=c[o],this.calculateRepulsionForceOfANode(h,d,t,s),d.add(h);else for(o=0;o<c.length;o++)for(h=c[o],f=o+1;f<c.length;f++)N=c[f],h.getOwner()==N.getOwner()&&this.calcRepulsionForce(h,N)},i.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},i.prototype.calcSpringForce=function(t,s){var o=t.getSource(),f=t.getTarget(),h,N,c,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&f.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;h=t.getLength(),h!=0&&(N=t.edgeElasticity*(h-s),c=N*(t.lengthX/h),d=N*(t.lengthY/h),o.springForceX+=c,o.springForceY+=d,f.springForceX-=c,f.springForceY-=d)},i.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),f=s.getRect(),h=new Array(2),N=new Array(4),c,d,m,G,L,U,J;if(o.intersects(f)){a.calcSeparationAmount(o,f,h,n.DEFAULT_EDGE_LENGTH/2),U=2*h[0],J=2*h[1];var V=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=V*U,t.repulsionForceY-=V*J,s.repulsionForceX+=V*U,s.repulsionForceY+=V*J}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(c=f.getCenterX()-o.getCenterX(),d=f.getCenterY()-o.getCenterY()):(a.getIntersection(o,f,N),c=N[2]-N[0],d=N[3]-N[1]),Math.abs(c)<n.MIN_REPULSION_DIST&&(c=u.sign(c)*n.MIN_REPULSION_DIST),Math.abs(d)<n.MIN_REPULSION_DIST&&(d=u.sign(d)*n.MIN_REPULSION_DIST),m=c*c+d*d,G=Math.sqrt(m),L=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/m,U=L*c/G,J=L*d/G,t.repulsionForceX-=U,t.repulsionForceY-=J,s.repulsionForceX+=U,s.repulsionForceY+=J},i.prototype.calcGravitationalForce=function(t){var s,o,f,h,N,c,d,m;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,f=(s.getTop()+s.getBottom())/2,h=t.getCenterX()-o,N=t.getCenterY()-f,c=Math.abs(h)+t.getWidth()/2,d=Math.abs(N)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(m=s.getEstimatedSize()*this.gravityRangeFactor,(c>m||d>m)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*N)):(m=s.getEstimatedSize()*this.compoundGravityRangeFactor,(c>m||d>m)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*N*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var f=new Array(s),h=0;h<s;h++)f[h]=new Array(o);for(var h=0;h<s;h++)for(var N=0;N<o;N++)f[h][N]=new Array;return f},i.prototype.addNodeToGrid=function(t,s,o){var f=0,h=0,N=0,c=0;f=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),N=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),c=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=f;d<=h;d++)for(var m=N;m<=c;m++)this.grid[d][m].push(t),t.setGridCoordinates(f,h,N,c)},i.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,s,o,f){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o||f){var h=new Set;t.surrounding=new Array;for(var N,c=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var m=t.startY-1;m<t.finishY+2;m++)if(!(d<0||m<0||d>=c.length||m>=c[0].length)){for(var G=0;G<c[d][m].length;G++)if(N=c[d][m][G],!(t.getOwner()!=N.getOwner()||t==N)&&!s.has(N)&&!h.has(N)){var L=Math.abs(t.getCenterX()-N.getCenterX())-(t.getWidth()/2+N.getWidth()/2),U=Math.abs(t.getCenterY()-N.getCenterY())-(t.getHeight()/2+N.getHeight()/2);L<=this.repulsionRange&&U<=this.repulsionRange&&h.add(N)}}t.surrounding=[].concat(T(h))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},i.prototype.calcRepulsionRange=function(){return 0},k.exports=i}),(function(k,gt,A){var T=A(1),l=A(4);function n(a,u,i){T.call(this,a,u,i),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(T.prototype);for(var r in T)n[r]=T[r];k.exports=n}),(function(k,gt,A){var T=A(3),l=A(4);function n(a,u,i,y){T.call(this,a,u,i,y),this.nodeRepulsion=l.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}n.prototype=Object.create(T.prototype);for(var r in T)n[r]=T[r];n.prototype.setGridCoordinates=function(a,u,i,y){this.startX=a,this.finishX=u,this.startY=i,this.finishY=y},k.exports=n}),(function(k,gt,A){function T(l,n){this.width=0,this.height=0,l!==null&&n!==null&&(this.height=n,this.width=l)}T.prototype.getWidth=function(){return this.width},T.prototype.setWidth=function(l){this.width=l},T.prototype.getHeight=function(){return this.height},T.prototype.setHeight=function(l){this.height=l},k.exports=T}),(function(k,gt,A){var T=A(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(n,r){var a=T.createID(n);this.contains(a)||(this.map[a]=r,this.keys.push(n))},l.prototype.contains=function(n){return T.createID(n),this.map[n]!=null},l.prototype.get=function(n){var r=T.createID(n);return this.map[r]},l.prototype.keySet=function(){return this.keys},k.exports=l}),(function(k,gt,A){var T=A(14);function l(){this.set={}}l.prototype.add=function(n){var r=T.createID(n);this.contains(r)||(this.set[r]=n)},l.prototype.remove=function(n){delete this.set[T.createID(n)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(n){return this.set[T.createID(n)]==n},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(n){for(var r=Object.keys(this.set),a=r.length,u=0;u<a;u++)n.push(this.set[r[u]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(n){for(var r=n.length,a=0;a<r;a++){var u=n[a];this.add(u)}},k.exports=l}),(function(k,gt,A){function T(){}T.multMat=function(l,n){for(var r=[],a=0;a<l.length;a++){r[a]=[];for(var u=0;u<n[0].length;u++){r[a][u]=0;for(var i=0;i<l[0].length;i++)r[a][u]+=l[a][i]*n[i][u]}}return r},T.transpose=function(l){for(var n=[],r=0;r<l[0].length;r++){n[r]=[];for(var a=0;a<l.length;a++)n[r][a]=l[a][r]}return n},T.multCons=function(l,n){for(var r=[],a=0;a<l.length;a++)r[a]=l[a]*n;return r},T.minusOp=function(l,n){for(var r=[],a=0;a<l.length;a++)r[a]=l[a]-n[a];return r},T.dotProduct=function(l,n){for(var r=0,a=0;a<l.length;a++)r+=l[a]*n[a];return r},T.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},T.normalize=function(l){for(var n=[],r=this.mag(l),a=0;a<l.length;a++)n[a]=l[a]/r;return n},T.multGamma=function(l){for(var n=[],r=0,a=0;a<l.length;a++)r+=l[a];r*=-1/l.length;for(var u=0;u<l.length;u++)n[u]=r+l[u];return n},T.multL=function(l,n,r){for(var a=[],u=[],i=[],y=0;y<n[0].length;y++){for(var t=0,s=0;s<n.length;s++)t+=-.5*n[s][y]*l[s];u[y]=t}for(var o=0;o<r.length;o++){for(var f=0,h=0;h<r.length;h++)f+=r[o][h]*u[h];i[o]=f}for(var N=0;N<n.length;N++){for(var c=0,d=0;d<n[0].length;d++)c+=n[N][d]*i[d];a[N]=c}return a},k.exports=T}),(function(k,gt,A){var T=(function(){function a(u,i){for(var y=0;y<i.length;y++){var t=i[y];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(u,t.key,t)}}return function(u,i,y){return i&&a(u.prototype,i),y&&a(u,y),u}})();function l(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}var n=A(11),r=(function(){function a(u,i){l(this,a),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var y=void 0;u instanceof n?y=u.size():y=u.length,this._quicksort(u,0,y-1)}return T(a,[{key:"_quicksort",value:function(i,y,t){if(y<t){var s=this._partition(i,y,t);this._quicksort(i,y,s),this._quicksort(i,s+1,t)}}},{key:"_partition",value:function(i,y,t){for(var s=this._get(i,y),o=y,f=t;;){for(;this.compareFunction(s,this._get(i,f));)f--;for(;this.compareFunction(this._get(i,o),s);)o++;if(o<f)this._swap(i,o,f),o++,f--;else return f}}},{key:"_get",value:function(i,y){return i instanceof n?i.get_object_at(y):i[y]}},{key:"_set",value:function(i,y,t){i instanceof n?i.set_object_at(y,t):i[y]=t}},{key:"_swap",value:function(i,y,t){var s=this._get(i,y);this._set(i,y,this._get(i,t)),this._set(i,t,s)}},{key:"_defaultCompareFunction",value:function(i,y){return y>i}}]),a})();k.exports=r}),(function(k,gt,A){function T(){}T.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var n=Math.min(this.m,this.n);this.s=(function(Et){for(var Nt=[];Et-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Et){var Nt=function Xt(xt){if(xt.length==0)return 0;for(var Ht=[],Rt=0;Rt<xt[0];Rt++)Ht.push(Xt(xt.slice(1)));return Ht};return Nt(Et)})([this.m,n]),this.V=(function(Et){var Nt=function Xt(xt){if(xt.length==0)return 0;for(var Ht=[],Rt=0;Rt<xt[0];Rt++)Ht.push(Xt(xt.slice(1)));return Ht};return Nt(Et)})([this.n,this.n]);for(var r=(function(Et){for(var Nt=[];Et-- >0;)Nt.push(0);return Nt})(this.n),a=(function(Et){for(var Nt=[];Et-- >0;)Nt.push(0);return Nt})(this.m),u=!0,i=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,y);t++){if(t<i){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=T.hypot(this.s[t],l[s][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)l[o][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var f=t+1;f<this.n;f++){if((function(Et,Nt){return Et&&Nt})(t<i,this.s[t]!==0)){for(var h=0,N=t;N<this.m;N++)h+=l[N][t]*l[N][f];h=-h/l[t][t];for(var c=t;c<this.m;c++)l[c][f]+=h*l[c][t]}r[f]=l[t][f]}if((function(Et,Nt){return Nt})(u,t<i))for(var d=t;d<this.m;d++)this.U[d][t]=l[d][t];if(t<y){r[t]=0;for(var m=t+1;m<this.n;m++)r[t]=T.hypot(r[t],r[m]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var G=t+1;G<this.n;G++)r[G]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Et,Nt){return Et&&Nt})(t+1<this.m,r[t]!==0)){for(var L=t+1;L<this.m;L++)a[L]=0;for(var U=t+1;U<this.n;U++)for(var J=t+1;J<this.m;J++)a[J]+=r[U]*l[J][U];for(var V=t+1;V<this.n;V++)for(var j=-r[V]/r[t+1],D=t+1;D<this.m;D++)l[D][V]+=j*a[D]}for(var et=t+1;et<this.n;et++)this.V[et][t]=r[et]}}var e=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=l[i][i]),this.m<e&&(this.s[e-1]=0),y+1<e&&(r[y]=l[y][e-1]),r[e-1]=0;{for(var E=i;E<n;E++){for(var g=0;g<this.m;g++)this.U[g][E]=0;this.U[E][E]=1}for(var p=i-1;p>=0;p--)if(this.s[p]!==0){for(var v=p+1;v<n;v++){for(var w=0,C=p;C<this.m;C++)w+=this.U[C][p]*this.U[C][v];w=-w/this.U[p][p];for(var R=p;R<this.m;R++)this.U[R][v]+=w*this.U[R][p]}for(var P=p;P<this.m;P++)this.U[P][p]=-this.U[P][p];this.U[p][p]=1+this.U[p][p];for(var O=0;O<p-1;O++)this.U[O][p]=0}else{for(var z=0;z<this.m;z++)this.U[z][p]=0;this.U[p][p]=1}}for(var b=this.n-1;b>=0;b--){if((function(Et,Nt){return Et&&Nt})(b<y,r[b]!==0))for(var F=b+1;F<n;F++){for(var $=0,Y=b+1;Y<this.n;Y++)$+=this.V[Y][b]*this.V[Y][F];$=-$/this.V[b+1][b];for(var M=b+1;M<this.n;M++)this.V[M][F]+=$*this.V[M][b]}for(var S=0;S<this.n;S++)this.V[S][b]=0;this.V[b][b]=1}for(var H=e-1,q=Math.pow(2,-52),nt=Math.pow(2,-966);e>0;){var B=void 0,Dt=void 0;for(B=e-2;B>=-1&&B!==-1;B--)if(Math.abs(r[B])<=nt+q*(Math.abs(this.s[B])+Math.abs(this.s[B+1]))){r[B]=0;break}if(B===e-2)Dt=4;else{var yt=void 0;for(yt=e-1;yt>=B&&yt!==B;yt--){var ut=(yt!==e?Math.abs(r[yt]):0)+(yt!==B+1?Math.abs(r[yt-1]):0);if(Math.abs(this.s[yt])<=nt+q*ut){this.s[yt]=0;break}}yt===B?Dt=3:yt===e-1?Dt=1:(Dt=2,B=yt)}switch(B++,Dt){case 1:{var _=r[e-2];r[e-2]=0;for(var lt=e-2;lt>=B;lt--){var pt=T.hypot(this.s[lt],_),mt=this.s[lt]/pt,Mt=_/pt;this.s[lt]=pt,lt!==B&&(_=-Mt*r[lt-1],r[lt-1]=mt*r[lt-1]);for(var dt=0;dt<this.n;dt++)pt=mt*this.V[dt][lt]+Mt*this.V[dt][e-1],this.V[dt][e-1]=-Mt*this.V[dt][lt]+mt*this.V[dt][e-1],this.V[dt][lt]=pt}}break;case 2:{var At=r[B-1];r[B-1]=0;for(var wt=B;wt<e;wt++){var bt=T.hypot(this.s[wt],At),Gt=this.s[wt]/bt,Ft=At/bt;this.s[wt]=bt,At=-Ft*r[wt],r[wt]=Gt*r[wt];for(var It=0;It<this.m;It++)bt=Gt*this.U[It][wt]+Ft*this.U[It][B-1],this.U[It][B-1]=-Ft*this.U[It][wt]+Gt*this.U[It][B-1],this.U[It][wt]=bt}}break;case 3:{var Pt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[e-1]),Math.abs(this.s[e-2])),Math.abs(r[e-2])),Math.abs(this.s[B])),Math.abs(r[B])),Yt=this.s[e-1]/Pt,I=this.s[e-2]/Pt,x=r[e-2]/Pt,X=this.s[B]/Pt,Z=r[B]/Pt,W=((I+Yt)*(I-Yt)+x*x)/2,tt=Yt*x*(Yt*x),ht=0;(function(Et,Nt){return Et||Nt})(W!==0,tt!==0)&&(ht=Math.sqrt(W*W+tt),W<0&&(ht=-ht),ht=tt/(W+ht));for(var rt=(X+Yt)*(X-Yt)+ht,K=X*Z,Q=B;Q<e-1;Q++){var ft=T.hypot(rt,K),Lt=rt/ft,vt=K/ft;Q!==B&&(r[Q-1]=ft),rt=Lt*this.s[Q]+vt*r[Q],r[Q]=Lt*r[Q]-vt*this.s[Q],K=vt*this.s[Q+1],this.s[Q+1]=Lt*this.s[Q+1];for(var Ot=0;Ot<this.n;Ot++)ft=Lt*this.V[Ot][Q]+vt*this.V[Ot][Q+1],this.V[Ot][Q+1]=-vt*this.V[Ot][Q]+Lt*this.V[Ot][Q+1],this.V[Ot][Q]=ft;if(ft=T.hypot(rt,K),Lt=rt/ft,vt=K/ft,this.s[Q]=ft,rt=Lt*r[Q]+vt*this.s[Q+1],this.s[Q+1]=-vt*r[Q]+Lt*this.s[Q+1],K=vt*r[Q+1],r[Q+1]=Lt*r[Q+1],Q<this.m-1)for(var ot=0;ot<this.m;ot++)ft=Lt*this.U[ot][Q]+vt*this.U[ot][Q+1],this.U[ot][Q+1]=-vt*this.U[ot][Q]+Lt*this.U[ot][Q+1],this.U[ot][Q]=ft}r[e-2]=rt}break;case 4:{if(this.s[B]<=0){this.s[B]=this.s[B]<0?-this.s[B]:0;for(var it=0;it<=H;it++)this.V[it][B]=-this.V[it][B]}for(;B<H&&!(this.s[B]>=this.s[B+1]);){var Tt=this.s[B];if(this.s[B]=this.s[B+1],this.s[B+1]=Tt,B<this.n-1)for(var st=0;st<this.n;st++)Tt=this.V[st][B+1],this.V[st][B+1]=this.V[st][B],this.V[st][B]=Tt;if(B<this.m-1)for(var at=0;at<this.m;at++)Tt=this.U[at][B+1],this.U[at][B+1]=this.U[at][B],this.U[at][B]=Tt;B++}e--}break}}var Ut={U:this.U,V:this.V,S:this.s};return Ut},T.hypot=function(l,n){var r=void 0;return Math.abs(l)>Math.abs(n)?(r=n/l,r=Math.abs(l)*Math.sqrt(1+r*r)):n!=0?(r=l/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},k.exports=T}),(function(k,gt,A){var T=(function(){function r(a,u){for(var i=0;i<u.length;i++){var y=u[i];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}return function(a,u,i){return u&&r(a.prototype,u),i&&r(a,i),a}})();function l(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(a,u){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=a,this.sequence2=u,this.match_score=i,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var f=0;f<this.iMax;f++){this.tracebackGrid[f]=new Array(this.jMax);for(var h=0;h<this.jMax;h++)this.tracebackGrid[f][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return T(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var y=1;y<this.iMax;y++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[y-1]===this.sequence2[t-1]?s=this.grid[y-1][t-1]+this.match_score:s=this.grid[y-1][t-1]+this.mismatch_penalty;var o=this.grid[y-1][t]+this.gap_penalty,f=this.grid[y][t-1]+this.gap_penalty,h=[s,o,f],N=this.arrayAllMaxIndexes(h);this.grid[y][t]=h[N[0]],this.tracebackGrid[y][t]=[N.includes(0),N.includes(1),N.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var u=[];for(u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});u[0];){var i=u[0],y=this.tracebackGrid[i.pos[0]][i.pos[1]];y[0]&&u.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),y[1]&&u.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),y[2]&&u.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),u.shift()}return this.alignments}},{key:"getAllIndexes",value:function(u,i){for(var y=[],t=-1;(t=u.indexOf(i,t+1))!==-1;)y.push(t);return y}},{key:"arrayAllMaxIndexes",value:function(u){return this.getAllIndexes(u,Math.max.apply(null,u))}}]),r})();k.exports=n}),(function(k,gt,A){var T=function(){};T.FDLayout=A(18),T.FDLayoutConstants=A(4),T.FDLayoutEdge=A(19),T.FDLayoutNode=A(20),T.DimensionD=A(21),T.HashMap=A(22),T.HashSet=A(23),T.IGeometry=A(8),T.IMath=A(9),T.Integer=A(10),T.Point=A(12),T.PointD=A(5),T.RandomSeed=A(16),T.RectangleD=A(13),T.Transform=A(17),T.UniqueIDGeneretor=A(14),T.Quicksort=A(25),T.LinkedList=A(11),T.LGraphObject=A(2),T.LGraph=A(6),T.LEdge=A(1),T.LGraphManager=A(7),T.LNode=A(3),T.Layout=A(15),T.LayoutConstants=A(0),T.NeedlemanWunsch=A(27),T.Matrix=A(24),T.SVD=A(26),k.exports=T}),(function(k,gt,A){function T(){this.listeners=[]}var l=T.prototype;l.addListener=function(n,r){this.listeners.push({event:n,callback:r})},l.removeListener=function(n,r){for(var a=this.listeners.length;a>=0;a--){var u=this.listeners[a];u.event===n&&u.callback===r&&this.listeners.splice(a,1)}},l.emit=function(n,r){for(var a=0;a<this.listeners.length;a++){var u=this.listeners[a];n===u.event&&u.callback(r)}},k.exports=T})])})})(ee)),ee.exports}var Ne=te.exports,ce;function me(){return ce||(ce=1,(function(kt,se){(function(gt,A){kt.exports=A(Te())})(Ne,function(k){return(()=>{var gt={45:((n,r,a)=>{var u={};u.layoutBase=a(551),u.CoSEConstants=a(806),u.CoSEEdge=a(767),u.CoSEGraph=a(880),u.CoSEGraphManager=a(578),u.CoSELayout=a(765),u.CoSENode=a(991),u.ConstraintHandler=a(902),n.exports=u}),806:((n,r,a)=>{var u=a(551).FDLayoutConstants;function i(){}for(var y in u)i[y]=u[y];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=u.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,n.exports=i}),767:((n,r,a)=>{var u=a(551).FDLayoutEdge;function i(t,s,o){u.call(this,t,s,o)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i}),880:((n,r,a)=>{var u=a(551).LGraph;function i(t,s,o){u.call(this,t,s,o)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i}),578:((n,r,a)=>{var u=a(551).LGraphManager;function i(t){u.call(this,t)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i}),765:((n,r,a)=>{var u=a(551).FDLayout,i=a(578),y=a(880),t=a(991),s=a(767),o=a(806),f=a(902),h=a(551).FDLayoutConstants,N=a(551).LayoutConstants,c=a(551).Point,d=a(551).PointD,m=a(551).DimensionD,G=a(551).Layout,L=a(551).Integer,U=a(551).IGeometry,J=a(551).LGraph,V=a(551).Transform,j=a(551).LinkedList;function D(){u.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(u.prototype);for(var et in u)D[et]=u[et];D.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},D.prototype.newGraph=function(e){return new y(null,this.graphManager,e)},D.prototype.newNode=function(e){return new t(this.graphManager,e)},D.prototype.newEdge=function(e){return new s(null,null,e)},D.prototype.initParameters=function(){u.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.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)},D.prototype.initSpringEmbedder=function(){u.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var e=N.DEFAULT_CREATE_BENDS_AS_NEEDED;return e&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(w){return E.has(w)});this.graphManager.setAllNodesToApplyGravitation(g)}}else{var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(p){return E.has(p)});this.graphManager.setAllNodesToApplyGravitation(g),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(f.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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 e=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(v){return e.has(v)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.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()),o.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 g=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(g,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),E={},g=0;g<e.length;g++){var p=e[g].rect,v=e[g].id;E[v]={id:v,x:p.getCenterX(),y:p.getCenterY(),w:p.width,h:p.height}}return E},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var e=this.getAllNodes(),E,g=0;g<e.length;g++)E=e[g],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var g=0;g<e.length;g++)E=e[g],E.move()},D.prototype.initConstraintVariables=function(){var e=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),g=0;g<E.length;g++){var p=E[g];this.idToNodeMap.set(p.id,p)}var v=function M(S){for(var H=S.getChild().getNodes(),q,nt=0,B=0;B<H.length;B++)q=H[B],q.getChild()==null?e.fixedNodeSet.has(q.id)&&(nt+=100):nt+=M(q);return nt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(H){e.fixedNodeSet.add(H.nodeId)});for(var E=this.graphManager.getAllNodes(),p,g=0;g<E.length;g++)if(p=E[g],p.getChild()!=null){var w=v(p);w>0&&(p.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var C=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){e.fixedNodesOnHorizontal.add(M),e.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var P=this.constraints.alignmentConstraint.vertical,g=0;g<P.length;g++)this.dummyToNodeForVerticalAlignment.set("dummy"+g,[]),P[g].forEach(function(S){C.set(S,"dummy"+g),e.dummyToNodeForVerticalAlignment.get("dummy"+g).push(S),e.fixedNodeSet.has(S)&&e.fixedNodesOnHorizontal.add("dummy"+g)});if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,g=0;g<O.length;g++)this.dummyToNodeForHorizontalAlignment.set("dummy"+g,[]),O[g].forEach(function(S){R.set(S,"dummy"+g),e.dummyToNodeForHorizontalAlignment.get("dummy"+g).push(S),e.fixedNodeSet.has(S)&&e.fixedNodesOnVertical.add("dummy"+g)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(M){var S,H,q;for(q=M.length-1;q>=2*M.length/3;q--)S=Math.floor(Math.random()*(q+1)),H=M[q],M[q]=M[S],M[S]=H;return M},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(M){if(M.left){var S=C.has(M.left)?C.get(M.left):M.left,H=C.has(M.right)?C.get(M.right):M.right;e.nodesInRelativeHorizontal.includes(S)||(e.nodesInRelativeHorizontal.push(S),e.nodeToRelativeConstraintMapHorizontal.set(S,[]),e.dummyToNodeForVerticalAlignment.has(S)?e.nodeToTempPositionMapHorizontal.set(S,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(S)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(S,e.idToNodeMap.get(S).getCenterX())),e.nodesInRelativeHorizontal.includes(H)||(e.nodesInRelativeHorizontal.push(H),e.nodeToRelativeConstraintMapHorizontal.set(H,[]),e.dummyToNodeForVerticalAlignment.has(H)?e.nodeToTempPositionMapHorizontal.set(H,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(H,e.idToNodeMap.get(H).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(S).push({right:H,gap:M.gap}),e.nodeToRelativeConstraintMapHorizontal.get(H).push({left:S,gap:M.gap})}else{var q=R.has(M.top)?R.get(M.top):M.top,nt=R.has(M.bottom)?R.get(M.bottom):M.bottom;e.nodesInRelativeVertical.includes(q)||(e.nodesInRelativeVertical.push(q),e.nodeToRelativeConstraintMapVertical.set(q,[]),e.dummyToNodeForHorizontalAlignment.has(q)?e.nodeToTempPositionMapVertical.set(q,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(q)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(q,e.idToNodeMap.get(q).getCenterY())),e.nodesInRelativeVertical.includes(nt)||(e.nodesInRelativeVertical.push(nt),e.nodeToRelativeConstraintMapVertical.set(nt,[]),e.dummyToNodeForHorizontalAlignment.has(nt)?e.nodeToTempPositionMapVertical.set(nt,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(nt)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(nt,e.idToNodeMap.get(nt).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(q).push({bottom:nt,gap:M.gap}),e.nodeToRelativeConstraintMapVertical.get(nt).push({top:q,gap:M.gap})}});else{var z=new Map,b=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var S=C.has(M.left)?C.get(M.left):M.left,H=C.has(M.right)?C.get(M.right):M.right;z.has(S)?z.get(S).push(H):z.set(S,[H]),z.has(H)?z.get(H).push(S):z.set(H,[S])}else{var q=R.has(M.top)?R.get(M.top):M.top,nt=R.has(M.bottom)?R.get(M.bottom):M.bottom;b.has(q)?b.get(q).push(nt):b.set(q,[nt]),b.has(nt)?b.get(nt).push(q):b.set(nt,[q])}});var F=function(S,H){var q=[],nt=[],B=new j,Dt=new Set,yt=0;return S.forEach(function(ut,_){if(!Dt.has(_)){q[yt]=[],nt[yt]=!1;var lt=_;for(B.push(lt),Dt.add(lt),q[yt].push(lt);B.length!=0;){lt=B.shift(),H.has(lt)&&(nt[yt]=!0);var pt=S.get(lt);pt.forEach(function(mt){Dt.has(mt)||(B.push(mt),Dt.add(mt),q[yt].push(mt))})}yt++}}),{components:q,isFixed:nt}},$=F(z,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=$.components,this.fixedComponentsOnHorizontal=$.isFixed;var Y=F(b,e.fixedNodesOnVertical);this.componentsOnVertical=Y.components,this.fixedComponentsOnVertical=Y.isFixed}}},D.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(Y){var M=e.idToNodeMap.get(Y.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,g=0;g<E.length;g++){for(var p=0,v=0;v<E[g].length;v++){if(this.fixedNodeSet.has(E[g][v])){p=0;break}p+=this.idToNodeMap.get(E[g][v]).displacementX}for(var w=p/E[g].length,v=0;v<E[g].length;v++)this.idToNodeMap.get(E[g][v]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal)for(var C=this.constraints.alignmentConstraint.horizontal,g=0;g<C.length;g++){for(var R=0,v=0;v<C[g].length;v++){if(this.fixedNodeSet.has(C[g][v])){R=0;break}R+=this.idToNodeMap.get(C[g][v]).displacementY}for(var P=R/C[g].length,v=0;v<C[g].length;v++)this.idToNodeMap.get(C[g][v]).displacementY=P}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(Y){if(!e.fixedNodesOnHorizontal.has(Y)){var M=0;e.dummyToNodeForVerticalAlignment.has(Y)?M=e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(Y)[0]).displacementX:M=e.idToNodeMap.get(Y).displacementX,e.nodeToRelativeConstraintMapHorizontal.get(Y).forEach(function(S){if(S.right){var H=e.nodeToTempPositionMapHorizontal.get(S.right)-e.nodeToTempPositionMapHorizontal.get(Y)-M;H<S.gap&&(M-=S.gap-H)}else{var H=e.nodeToTempPositionMapHorizontal.get(Y)-e.nodeToTempPositionMapHorizontal.get(S.left)+M;H<S.gap&&(M+=S.gap-H)}}),e.nodeToTempPositionMapHorizontal.set(Y,e.nodeToTempPositionMapHorizontal.get(Y)+M),e.dummyToNodeForVerticalAlignment.has(Y)?e.dummyToNodeForVerticalAlignment.get(Y).forEach(function(S){e.idToNodeMap.get(S).displacementX=M}):e.idToNodeMap.get(Y).displacementX=M}}),this.nodesInRelativeVertical.forEach(function(Y){if(!e.fixedNodesOnHorizontal.has(Y)){var M=0;e.dummyToNodeForHorizontalAlignment.has(Y)?M=e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(Y)[0]).displacementY:M=e.idToNodeMap.get(Y).displacementY,e.nodeToRelativeConstraintMapVertical.get(Y).forEach(function(S){if(S.bottom){var H=e.nodeToTempPositionMapVertical.get(S.bottom)-e.nodeToTempPositionMapVertical.get(Y)-M;H<S.gap&&(M-=S.gap-H)}else{var H=e.nodeToTempPositionMapVertical.get(Y)-e.nodeToTempPositionMapVertical.get(S.top)+M;H<S.gap&&(M+=S.gap-H)}}),e.nodeToTempPositionMapVertical.set(Y,e.nodeToTempPositionMapVertical.get(Y)+M),e.dummyToNodeForHorizontalAlignment.has(Y)?e.dummyToNodeForHorizontalAlignment.get(Y).forEach(function(S){e.idToNodeMap.get(S).displacementY=M}):e.idToNodeMap.get(Y).displacementY=M}});else{for(var g=0;g<this.componentsOnHorizontal.length;g++){var O=this.componentsOnHorizontal[g];if(this.fixedComponentsOnHorizontal[g])for(var v=0;v<O.length;v++)this.dummyToNodeForVerticalAlignment.has(O[v])?this.dummyToNodeForVerticalAlignment.get(O[v]).forEach(function(S){e.idToNodeMap.get(S).displacementX=0}):this.idToNodeMap.get(O[v]).displacementX=0;else{for(var z=0,b=0,v=0;v<O.length;v++)if(this.dummyToNodeForVerticalAlignment.has(O[v])){var F=this.dummyToNodeForVerticalAlignment.get(O[v]);z+=F.length*this.idToNodeMap.get(F[0]).displacementX,b+=F.length}else z+=this.idToNodeMap.get(O[v]).displacementX,b++;for(var $=z/b,v=0;v<O.length;v++)this.dummyToNodeForVerticalAlignment.has(O[v])?this.dummyToNodeForVerticalAlignment.get(O[v]).forEach(function(S){e.idToNodeMap.get(S).displacementX=$}):this.idToNodeMap.get(O[v]).displacementX=$}}for(var g=0;g<this.componentsOnVertical.length;g++){var O=this.componentsOnVertical[g];if(this.fixedComponentsOnVertical[g])for(var v=0;v<O.length;v++)this.dummyToNodeForHorizontalAlignment.has(O[v])?this.dummyToNodeForHorizontalAlignment.get(O[v]).forEach(function(H){e.idToNodeMap.get(H).displacementY=0}):this.idToNodeMap.get(O[v]).displacementY=0;else{for(var z=0,b=0,v=0;v<O.length;v++)if(this.dummyToNodeForHorizontalAlignment.has(O[v])){var F=this.dummyToNodeForHorizontalAlignment.get(O[v]);z+=F.length*this.idToNodeMap.get(F[0]).displacementY,b+=F.length}else z+=this.idToNodeMap.get(O[v]).displacementY,b++;for(var $=z/b,v=0;v<O.length;v++)this.dummyToNodeForHorizontalAlignment.has(O[v])?this.dummyToNodeForHorizontalAlignment.get(O[v]).forEach(function(B){e.idToNodeMap.get(B).displacementY=$}):this.idToNodeMap.get(O[v]).displacementY=$}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],E,g=this.graphManager.getGraphs(),p=g.length,v;for(v=0;v<p;v++)E=g[v],E.updateConnected(),E.isConnected||(e=e.concat(E.getNodes()));return e},D.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var E=new Set,g;for(g=0;g<e.length;g++){var p=e[g];if(!E.has(p)){var v=p.getSource(),w=p.getTarget();if(v==w)p.getBendpoints().push(new d),p.getBendpoints().push(new d),this.createDummyNodesForBendpoints(p),E.add(p);else{var C=[];if(C=C.concat(v.getEdgeListToNode(w)),C=C.concat(w.getEdgeListToNode(v)),!E.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var P=C[R];P.getBendpoints().push(new d),this.createDummyNodesForBendpoints(P)}}C.forEach(function(O){E.add(O)})}}}if(E.size==e.length)break}},D.prototype.positionNodesRadially=function(e){for(var E=new c(0,0),g=Math.ceil(Math.sqrt(e.length)),p=0,v=0,w=0,C=new d(0,0),R=0;R<e.length;R++){R%g==0&&(w=0,v=p,R!=0&&(v+=o.DEFAULT_COMPONENT_SEPERATION),p=0);var P=e[R],O=G.findCenterOfTree(P);E.x=w,E.y=v,C=D.radialLayout(P,O,E),C.y>p&&(p=Math.floor(C.y)),w=Math.floor(C.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(N.WORLD_CENTER_X-C.x/2,N.WORLD_CENTER_Y-C.y/2))},D.radialLayout=function(e,E,g){var p=Math.max(this.maxDiagonalInTree(e),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(E,null,0,359,0,p);var v=J.calculateBounds(e),w=new V;w.setDeviceOrgX(v.getMinX()),w.setDeviceOrgY(v.getMinY()),w.setWorldOrgX(g.x),w.setWorldOrgY(g.y);for(var C=0;C<e.length;C++){var R=e[C];R.transform(w)}var P=new d(v.getMaxX(),v.getMaxY());return w.inverseTransformPoint(P)},D.branchRadialLayout=function(e,E,g,p,v,w){var C=(p-g+1)/2;C<0&&(C+=180);var R=(C+g)%360,P=R*U.TWO_PI/360,O=v*Math.cos(P),z=v*Math.sin(P);e.setCenter(O,z);var b=[];b=b.concat(e.getEdges());var F=b.length;E!=null&&F--;for(var $=0,Y=b.length,M,S=e.getEdgesBetween(E);S.length>1;){var H=S[0];S.splice(0,1);var q=b.indexOf(H);q>=0&&b.splice(q,1),Y--,F--}E!=null?M=(b.indexOf(S[0])+1)%Y:M=0;for(var nt=Math.abs(p-g)/F,B=M;$!=F;B=++B%Y){var Dt=b[B].getOtherEnd(e);if(Dt!=E){var yt=(g+$*nt)%360,ut=(yt+nt)%360;D.branchRadialLayout(Dt,e,yt,ut,v+w,w),$++}}},D.maxDiagonalInTree=function(e){for(var E=L.MIN_VALUE,g=0;g<e.length;g++){var p=e[g],v=p.getDiagonal();v>E&&(E=v)}return E},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var e=this,E={};this.memberGroups={},this.idToDummyNode={};for(var g=[],p=this.graphManager.getAllNodes(),v=0;v<p.length;v++){var w=p[v],C=w.getParent();this.getNodeDegreeWithChildren(w)===0&&(C.id==null||!this.getToBeTiled(C))&&g.push(w)}for(var v=0;v<g.length;v++){var w=g[v],R=w.getParent().id;typeof E[R]>"u"&&(E[R]=[]),E[R]=E[R].concat(w)}Object.keys(E).forEach(function(P){if(E[P].length>1){var O="DummyCompound_"+P;e.memberGroups[O]=E[P];var z=E[P][0].getParent(),b=new t(e.graphManager);b.id=O,b.paddingLeft=z.paddingLeft||0,b.paddingRight=z.paddingRight||0,b.paddingBottom=z.paddingBottom||0,b.paddingTop=z.paddingTop||0,e.idToDummyNode[O]=b;var F=e.getGraphManager().add(e.newGraph(),b),$=z.getChild();$.add(b);for(var Y=0;Y<E[P].length;Y++){var M=E[P][Y];$.remove(M),F.add(M)}}})},D.prototype.clearCompounds=function(){var e={},E={};this.performDFSOnCompounds();for(var g=0;g<this.compoundOrder.length;g++)E[this.compoundOrder[g].id]=this.compoundOrder[g],e[this.compoundOrder[g].id]=[].concat(this.compoundOrder[g].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[g].getChild()),this.compoundOrder[g].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,E)},D.prototype.clearZeroDegreeMembers=function(){var e=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(g){var p=e.idToDummyNode[g];if(E[g]=e.tileNodes(e.memberGroups[g],p.paddingLeft+p.paddingRight),p.rect.width=E[g].width,p.rect.height=E[g].height,p.setCenter(E[g].centerX,E[g].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var v=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(v+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>v?(p.rect.x-=(p.labelWidth-v)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-v)/2):p.labelPosHorizontal=="right"&&p.setWidth(v+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var E=this.compoundOrder[e],g=E.id,p=E.paddingLeft,v=E.paddingTop,w=E.labelMarginLeft,C=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[g],E.rect.x,E.rect.y,p,v,w,C)}},D.prototype.repopulateZeroDegreeMembers=function(){var e=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(g){var p=e.idToDummyNode[g],v=p.paddingLeft,w=p.paddingTop,C=p.labelMarginLeft,R=p.labelMarginTop;e.adjustLocations(E[g],p.rect.x,p.rect.y,v,w,C,R)})},D.prototype.getToBeTiled=function(e){var E=e.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var g=e.getChild();if(g==null)return this.toBeTiled[E]=!1,!1;for(var p=g.getNodes(),v=0;v<p.length;v++){var w=p[v];if(this.getNodeDegree(w)>0)return this.toBeTiled[E]=!1,!1;if(w.getChild()==null){this.toBeTiled[w.id]=!1;continue}if(!this.getToBeTiled(w))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},D.prototype.getNodeDegree=function(e){e.id;for(var E=e.getEdges(),g=0,p=0;p<E.length;p++){var v=E[p];v.getSource().id!==v.getTarget().id&&(g=g+1)}return g},D.prototype.getNodeDegreeWithChildren=function(e){var E=this.getNodeDegree(e);if(e.getChild()==null)return E;for(var g=e.getChild().getNodes(),p=0;p<g.length;p++){var v=g[p];E+=this.getNodeDegreeWithChildren(v)}return E},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(e){for(var E=0;E<e.length;E++){var g=e[E];g.getChild()!=null&&this.fillCompexOrderByDFS(g.getChild().getNodes()),this.getToBeTiled(g)&&this.compoundOrder.push(g)}},D.prototype.adjustLocations=function(e,E,g,p,v,w,C){E+=p+w,g+=v+C;for(var R=E,P=0;P<e.rows.length;P++){var O=e.rows[P];E=R;for(var z=0,b=0;b<O.length;b++){var F=O[b];F.rect.x=E,F.rect.y=g,E+=F.rect.width+e.horizontalPadding,F.rect.height>z&&(z=F.rect.height)}g+=z+e.verticalPadding}},D.prototype.tileCompoundMembers=function(e,E){var g=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(p){var v=E[p];if(g.tiledMemberPack[p]=g.tileNodes(e[p],v.paddingLeft+v.paddingRight),v.rect.width=g.tiledMemberPack[p].width,v.rect.height=g.tiledMemberPack[p].height,v.setCenter(g.tiledMemberPack[p].centerX,g.tiledMemberPack[p].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var w=v.rect.width,C=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(w+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>w?(v.rect.x-=(v.labelWidth-w)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-w)/2):v.labelPosHorizontal=="right"&&v.setWidth(w+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(C+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>C?(v.rect.y-=(v.labelHeight-C)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-C)/2):v.labelPosVertical=="bottom"&&v.setHeight(C+v.labelHeight))}})},D.prototype.tileNodes=function(e,E){var g=this.tileNodesByFavoringDim(e,E,!0),p=this.tileNodesByFavoringDim(e,E,!1),v=this.getOrgRatio(g),w=this.getOrgRatio(p),C;return w<v?C=p:C=g,C},D.prototype.getOrgRatio=function(e){var E=e.width,g=e.height,p=E/g;return p<1&&(p=1/p),p},D.prototype.calcIdealRowWidth=function(e,E){var g=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,v=e.length,w=0,C=0,R=0;e.forEach(function(Y){w+=Y.getWidth(),C+=Y.getHeight(),Y.getWidth()>R&&(R=Y.getWidth())});var P=w/v,O=C/v,z=Math.pow(g-p,2)+4*(P+p)*(O+g)*v,b=(p-g+Math.sqrt(z))/(2*(P+p)),F;E?(F=Math.ceil(b),F==b&&F++):F=Math.floor(b);var $=F*(P+p)-p;return R>$&&($=R),$+=p*2,$},D.prototype.tileNodesByFavoringDim=function(e,E,g){var p=o.TILING_PADDING_VERTICAL,v=o.TILING_PADDING_HORIZONTAL,w=o.TILING_COMPARE_BY,C={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:p,horizontalPadding:v,centerX:0,centerY:0};w&&(C.idealRowWidth=this.calcIdealRowWidth(e,g));var R=function(M){return M.rect.width*M.rect.height},P=function(M,S){return R(S)-R(M)};e.sort(function(Y,M){var S=P;return C.idealRowWidth?(S=w,S(Y.id,M.id)):S(Y,M)});for(var O=0,z=0,b=0;b<e.length;b++){var F=e[b];O+=F.getCenterX(),z+=F.getCenterY()}C.centerX=O/e.length,C.centerY=z/e.length;for(var b=0;b<e.length;b++){var F=e[b];if(C.rows.length==0)this.insertNodeToRow(C,F,0,E);else if(this.canAddHorizontal(C,F.rect.width,F.rect.height)){var $=C.rows.length-1;C.idealRowWidth||($=this.getShortestRowIndex(C)),this.insertNodeToRow(C,F,$,E)}else this.insertNodeToRow(C,F,C.rows.length,E);this.shiftToLastRow(C)}return C},D.prototype.insertNodeToRow=function(e,E,g,p){var v=p;if(g==e.rows.length){var w=[];e.rows.push(w),e.rowWidth.push(v),e.rowHeight.push(0)}var C=e.rowWidth[g]+E.rect.width;e.rows[g].length>0&&(C+=e.horizontalPadding),e.rowWidth[g]=C,e.width<C&&(e.width=C);var R=E.rect.height;g>0&&(R+=e.verticalPadding);var P=0;R>e.rowHeight[g]&&(P=e.rowHeight[g],e.rowHeight[g]=R,P=e.rowHeight[g]-P),e.height+=P,e.rows[g].push(E)},D.prototype.getShortestRowIndex=function(e){for(var E=-1,g=Number.MAX_VALUE,p=0;p<e.rows.length;p++)e.rowWidth[p]<g&&(E=p,g=e.rowWidth[p]);return E},D.prototype.getLongestRowIndex=function(e){for(var E=-1,g=Number.MIN_VALUE,p=0;p<e.rows.length;p++)e.rowWidth[p]>g&&(E=p,g=e.rowWidth[p]);return E},D.prototype.canAddHorizontal=function(e,E,g){if(e.idealRowWidth){var p=e.rows.length-1,v=e.rowWidth[p];return v+E+e.horizontalPadding<=e.idealRowWidth}var w=this.getShortestRowIndex(e);if(w<0)return!0;var C=e.rowWidth[w];if(C+e.horizontalPadding+E<=e.width)return!0;var R=0;e.rowHeight[w]<g&&w>0&&(R=g+e.verticalPadding-e.rowHeight[w]);var P;e.width-C>=E+e.horizontalPadding?P=(e.height+R)/(C+E+e.horizontalPadding):P=(e.height+R)/e.width,R=g+e.verticalPadding;var O;return e.width<E?O=(e.height+R)/E:O=(e.height+R)/e.width,O<1&&(O=1/O),P<1&&(P=1/P),P<O},D.prototype.shiftToLastRow=function(e){var E=this.getLongestRowIndex(e),g=e.rowWidth.length-1,p=e.rows[E],v=p[p.length-1],w=v.width+e.horizontalPadding;if(e.width-e.rowWidth[g]>w&&E!=g){p.splice(-1,1),e.rows[g].push(v),e.rowWidth[E]=e.rowWidth[E]-w,e.rowWidth[g]=e.rowWidth[g]+w,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var C=Number.MIN_VALUE,R=0;R<p.length;R++)p[R].height>C&&(C=p[R].height);E>0&&(C+=e.verticalPadding);var P=e.rowHeight[E]+e.rowHeight[g];e.rowHeight[E]=C,e.rowHeight[g]<v.height+e.verticalPadding&&(e.rowHeight[g]=v.height+e.verticalPadding);var O=e.rowHeight[E]+e.rowHeight[g];e.height+=O-P,this.shiftToLastRow(e)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var e=[],E=!0,g;E;){var p=this.graphManager.getAllNodes(),v=[];E=!1;for(var w=0;w<p.length;w++)if(g=p[w],g.getEdges().length==1&&!g.getEdges()[0].isInterGraph&&g.getChild()==null){if(o.PURE_INCREMENTAL){var C=g.getEdges()[0].getOtherEnd(g),R=new m(g.getCenterX()-C.getCenterX(),g.getCenterY()-C.getCenterY());v.push([g,g.getEdges()[0],g.getOwner(),R])}else v.push([g,g.getEdges()[0],g.getOwner()]);E=!0}if(E==!0){for(var P=[],O=0;O<v.length;O++)v[O][0].getEdges().length==1&&(P.push(v[O]),v[O][0].getOwner().remove(v[O][0]));e.push(P),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},D.prototype.growTree=function(e){for(var E=e.length,g=e[E-1],p,v=0;v<g.length;v++)p=g[v],this.findPlaceforPrunedNode(p),p[2].add(p[0]),p[2].add(p[1],p[1].source,p[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(e){var E,g,p=e[0];if(p==e[1].source?g=e[1].target:g=e[1].source,o.PURE_INCREMENTAL)p.setCenter(g.getCenterX()+e[3].getWidth(),g.getCenterY()+e[3].getHeight());else{var v=g.startX,w=g.finishX,C=g.startY,R=g.finishY,P=0,O=0,z=0,b=0,F=[P,z,O,b];if(C>0)for(var $=v;$<=w;$++)F[0]+=this.grid[$][C-1].length+this.grid[$][C].length-1;if(w<this.grid.length-1)for(var $=C;$<=R;$++)F[1]+=this.grid[w+1][$].length+this.grid[w][$].length-1;if(R<this.grid[0].length-1)for(var $=v;$<=w;$++)F[2]+=this.grid[$][R+1].length+this.grid[$][R].length-1;if(v>0)for(var $=C;$<=R;$++)F[3]+=this.grid[v-1][$].length+this.grid[v][$].length-1;for(var Y=L.MAX_VALUE,M,S,H=0;H<F.length;H++)F[H]<Y?(Y=F[H],M=1,S=H):F[H]==Y&&M++;if(M==3&&Y==0)F[0]==0&&F[1]==0&&F[2]==0?E=1:F[0]==0&&F[1]==0&&F[3]==0?E=0:F[0]==0&&F[2]==0&&F[3]==0?E=3:F[1]==0&&F[2]==0&&F[3]==0&&(E=2);else if(M==2&&Y==0){var q=Math.floor(Math.random()*2);F[0]==0&&F[1]==0?q==0?E=0:E=1:F[0]==0&&F[2]==0?q==0?E=0:E=2:F[0]==0&&F[3]==0?q==0?E=0:E=3:F[1]==0&&F[2]==0?q==0?E=1:E=2:F[1]==0&&F[3]==0?q==0?E=1:E=3:q==0?E=2:E=3}else if(M==4&&Y==0){var q=Math.floor(Math.random()*4);E=q}else E=S;E==0?p.setCenter(g.getCenterX(),g.getCenterY()-g.getHeight()/2-h.DEFAULT_EDGE_LENGTH-p.getHeight()/2):E==1?p.setCenter(g.getCenterX()+g.getWidth()/2+h.DEFAULT_EDGE_LENGTH+p.getWidth()/2,g.getCenterY()):E==2?p.setCenter(g.getCenterX(),g.getCenterY()+g.getHeight()/2+h.DEFAULT_EDGE_LENGTH+p.getHeight()/2):p.setCenter(g.getCenterX()-g.getWidth()/2-h.DEFAULT_EDGE_LENGTH-p.getWidth()/2,g.getCenterY())}},n.exports=D}),991:((n,r,a)=>{var u=a(551).FDLayoutNode,i=a(551).IMath;function y(s,o,f,h){u.call(this,s,o,f,h)}y.prototype=Object.create(u.prototype);for(var t in u)y[t]=u[t];y.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(s,o){for(var f=this.getChild().getNodes(),h,N=0;N<f.length;N++)h=f[N],h.getChild()==null?(h.displacementX+=s,h.displacementY+=o):h.propogateDisplacementToChildren(s,o)},y.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.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},y.prototype.setPred1=function(s){this.pred1=s},y.prototype.getPred1=function(){return pred1},y.prototype.getPred2=function(){return pred2},y.prototype.setNext=function(s){this.next=s},y.prototype.getNext=function(){return next},y.prototype.setProcessed=function(s){this.processed=s},y.prototype.isProcessed=function(){return processed},n.exports=y}),902:((n,r,a)=>{function u(f){if(Array.isArray(f)){for(var h=0,N=Array(f.length);h<f.length;h++)N[h]=f[h];return N}else return Array.from(f)}var i=a(806),y=a(551).LinkedList,t=a(551).Matrix,s=a(551).SVD;function o(){}o.handleConstraints=function(f){var h={};h.fixedNodeConstraint=f.constraints.fixedNodeConstraint,h.alignmentConstraint=f.constraints.alignmentConstraint,h.relativePlacementConstraint=f.constraints.relativePlacementConstraint;for(var N=new Map,c=new Map,d=[],m=[],G=f.getAllNodes(),L=0,U=0;U<G.length;U++){var J=G[U];J.getChild()==null&&(c.set(J.id,L++),d.push(J.getCenterX()),m.push(J.getCenterY()),N.set(J.id,J))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(I){!I.gap&&I.gap!=0&&(I.left?I.gap=i.DEFAULT_EDGE_LENGTH+N.get(I.left).getWidth()/2+N.get(I.right).getWidth()/2:I.gap=i.DEFAULT_EDGE_LENGTH+N.get(I.top).getHeight()/2+N.get(I.bottom).getHeight()/2)});var V=function(x,X){return{x:x.x-X.x,y:x.y-X.y}},j=function(x){var X=0,Z=0;return x.forEach(function(W){X+=d[c.get(W)],Z+=m[c.get(W)]}),{x:X/x.size,y:Z/x.size}},D=function(x,X,Z,W,tt){function ht(ot,it){var Tt=new Set(ot),st=!0,at=!1,Ut=void 0;try{for(var Et=it[Symbol.iterator](),Nt;!(st=(Nt=Et.next()).done);st=!0){var Xt=Nt.value;Tt.add(Xt)}}catch(xt){at=!0,Ut=xt}finally{try{!st&&Et.return&&Et.return()}finally{if(at)throw Ut}}return Tt}var rt=new Map;x.forEach(function(ot,it){rt.set(it,0)}),x.forEach(function(ot,it){ot.forEach(function(Tt){rt.set(Tt.id,rt.get(Tt.id)+1)})});var K=new Map,Q=new Map,ft=new y;rt.forEach(function(ot,it){ot==0?(ft.push(it),Z||(X=="horizontal"?K.set(it,c.has(it)?d[c.get(it)]:W.get(it)):K.set(it,c.has(it)?m[c.get(it)]:W.get(it)))):K.set(it,Number.NEGATIVE_INFINITY),Z&&Q.set(it,new Set([it]))}),Z&&tt.forEach(function(ot){var it=[];if(ot.forEach(function(at){Z.has(at)&&it.push(at)}),it.length>0){var Tt=0;it.forEach(function(at){X=="horizontal"?(K.set(at,c.has(at)?d[c.get(at)]:W.get(at)),Tt+=K.get(at)):(K.set(at,c.has(at)?m[c.get(at)]:W.get(at)),Tt+=K.get(at))}),Tt=Tt/it.length,ot.forEach(function(at){Z.has(at)||K.set(at,Tt)})}else{var st=0;ot.forEach(function(at){X=="horizontal"?st+=c.has(at)?d[c.get(at)]:W.get(at):st+=c.has(at)?m[c.get(at)]:W.get(at)}),st=st/ot.length,ot.forEach(function(at){K.set(at,st)})}});for(var Lt=function(){var it=ft.shift(),Tt=x.get(it);Tt.forEach(function(st){if(K.get(st.id)<K.get(it)+st.gap)if(Z&&Z.has(st.id)){var at=void 0;if(X=="horizontal"?at=c.has(st.id)?d[c.get(st.id)]:W.get(st.id):at=c.has(st.id)?m[c.get(st.id)]:W.get(st.id),K.set(st.id,at),at<K.get(it)+st.gap){var Ut=K.get(it)+st.gap-at;Q.get(it).forEach(function(Et){K.set(Et,K.get(Et)-Ut)})}}else K.set(st.id,K.get(it)+st.gap);rt.set(st.id,rt.get(st.id)-1),rt.get(st.id)==0&&ft.push(st.id),Z&&Q.set(st.id,ht(Q.get(it),Q.get(st.id)))})};ft.length!=0;)Lt();if(Z){var vt=new Set;x.forEach(function(ot,it){ot.length==0&&vt.add(it)});var Ot=[];Q.forEach(function(ot,it){if(vt.has(it)){var Tt=!1,st=!0,at=!1,Ut=void 0;try{for(var Et=ot[Symbol.iterator](),Nt;!(st=(Nt=Et.next()).done);st=!0){var Xt=Nt.value;Z.has(Xt)&&(Tt=!0)}}catch(Rt){at=!0,Ut=Rt}finally{try{!st&&Et.return&&Et.return()}finally{if(at)throw Ut}}if(!Tt){var xt=!1,Ht=void 0;Ot.forEach(function(Rt,Vt){Rt.has([].concat(u(ot))[0])&&(xt=!0,Ht=Vt)}),xt?ot.forEach(function(Rt){Ot[Ht].add(Rt)}):Ot.push(new Set(ot))}}}),Ot.forEach(function(ot,it){var Tt=Number.POSITIVE_INFINITY,st=Number.POSITIVE_INFINITY,at=Number.NEGATIVE_INFINITY,Ut=Number.NEGATIVE_INFINITY,Et=!0,Nt=!1,Xt=void 0;try{for(var xt=ot[Symbol.iterator](),Ht;!(Et=(Ht=xt.next()).done);Et=!0){var Rt=Ht.value,Vt=void 0;X=="horizontal"?Vt=c.has(Rt)?d[c.get(Rt)]:W.get(Rt):Vt=c.has(Rt)?m[c.get(Rt)]:W.get(Rt);var Qt=K.get(Rt);Vt<Tt&&(Tt=Vt),Vt>at&&(at=Vt),Qt<st&&(st=Qt),Qt>Ut&&(Ut=Qt)}}catch(Jt){Nt=!0,Xt=Jt}finally{try{!Et&&xt.return&&xt.return()}finally{if(Nt)throw Xt}}var re=(Tt+at)/2-(st+Ut)/2,Bt=!0,qt=!1,Kt=void 0;try{for(var Zt=ot[Symbol.iterator](),jt;!(Bt=(jt=Zt.next()).done);Bt=!0){var $t=jt.value;K.set($t,K.get($t)+re)}}catch(Jt){qt=!0,Kt=Jt}finally{try{!Bt&&Zt.return&&Zt.return()}finally{if(qt)throw Kt}}})}return K},et=function(x){var X=0,Z=0,W=0,tt=0;if(x.forEach(function(Q){Q.left?d[c.get(Q.left)]-d[c.get(Q.right)]>=0?X++:Z++:m[c.get(Q.top)]-m[c.get(Q.bottom)]>=0?W++:tt++}),X>Z&&W>tt)for(var ht=0;ht<c.size;ht++)d[ht]=-1*d[ht],m[ht]=-1*m[ht];else if(X>Z)for(var rt=0;rt<c.size;rt++)d[rt]=-1*d[rt];else if(W>tt)for(var K=0;K<c.size;K++)m[K]=-1*m[K]},e=function(x){var X=[],Z=new y,W=new Set,tt=0;return x.forEach(function(ht,rt){if(!W.has(rt)){X[tt]=[];var K=rt;for(Z.push(K),W.add(K),X[tt].push(K);Z.length!=0;){K=Z.shift();var Q=x.get(K);Q.forEach(function(ft){W.has(ft.id)||(Z.push(ft.id),W.add(ft.id),X[tt].push(ft.id))})}tt++}}),X},E=function(x){var X=new Map;return x.forEach(function(Z,W){X.set(W,[])}),x.forEach(function(Z,W){Z.forEach(function(tt){X.get(W).push(tt),X.get(tt.id).push({id:W,gap:tt.gap,direction:tt.direction})})}),X},g=function(x){var X=new Map;return x.forEach(function(Z,W){X.set(W,[])}),x.forEach(function(Z,W){Z.forEach(function(tt){X.get(tt.id).push({id:W,gap:tt.gap,direction:tt.direction})})}),X},p=[],v=[],w=!1,C=!1,R=new Set,P=new Map,O=new Map,z=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(I){R.add(I.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(I){I.left?(P.has(I.left)?P.get(I.left).push({id:I.right,gap:I.gap,direction:"horizontal"}):P.set(I.left,[{id:I.right,gap:I.gap,direction:"horizontal"}]),P.has(I.right)||P.set(I.right,[])):(P.has(I.top)?P.get(I.top).push({id:I.bottom,gap:I.gap,direction:"vertical"}):P.set(I.top,[{id:I.bottom,gap:I.gap,direction:"vertical"}]),P.has(I.bottom)||P.set(I.bottom,[]))}),O=E(P),z=e(O)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(I,x){p[x]=[I.position.x,I.position.y],v[x]=[d[c.get(I.nodeId)],m[c.get(I.nodeId)]]}),w=!0;else if(h.alignmentConstraint)(function(){var I=0;if(h.alignmentConstraint.vertical){for(var x=h.alignmentConstraint.vertical,X=function(K){var Q=new Set;x[K].forEach(function(vt){Q.add(vt)});var ft=new Set([].concat(u(Q)).filter(function(vt){return R.has(vt)})),Lt=void 0;ft.size>0?Lt=d[c.get(ft.values().next().value)]:Lt=j(Q).x,x[K].forEach(function(vt){p[I]=[Lt,m[c.get(vt)]],v[I]=[d[c.get(vt)],m[c.get(vt)]],I++})},Z=0;Z<x.length;Z++)X(Z);w=!0}if(h.alignmentConstraint.horizontal){for(var W=h.alignmentConstraint.horizontal,tt=function(K){var Q=new Set;W[K].forEach(function(vt){Q.add(vt)});var ft=new Set([].concat(u(Q)).filter(function(vt){return R.has(vt)})),Lt=void 0;ft.size>0?Lt=d[c.get(ft.values().next().value)]:Lt=j(Q).y,W[K].forEach(function(vt){p[I]=[d[c.get(vt)],Lt],v[I]=[d[c.get(vt)],m[c.get(vt)]],I++})},ht=0;ht<W.length;ht++)tt(ht);w=!0}h.relativePlacementConstraint&&(C=!0)})();else if(h.relativePlacementConstraint){for(var b=0,F=0,$=0;$<z.length;$++)z[$].length>b&&(b=z[$].length,F=$);if(b<O.size/2)et(h.relativePlacementConstraint),w=!1,C=!1;else{var Y=new Map,M=new Map,S=[];z[F].forEach(function(I){P.get(I).forEach(function(x){x.direction=="horizontal"?(Y.has(I)?Y.get(I).push(x):Y.set(I,[x]),Y.has(x.id)||Y.set(x.id,[]),S.push({left:I,right:x.id})):(M.has(I)?M.get(I).push(x):M.set(I,[x]),M.has(x.id)||M.set(x.id,[]),S.push({top:I,bottom:x.id}))})}),et(S),C=!1;var H=D(Y,"horizontal"),q=D(M,"vertical");z[F].forEach(function(I,x){v[x]=[d[c.get(I)],m[c.get(I)]],p[x]=[],H.has(I)?p[x][0]=H.get(I):p[x][0]=d[c.get(I)],q.has(I)?p[x][1]=q.get(I):p[x][1]=m[c.get(I)]}),w=!0}}if(w){for(var nt=void 0,B=t.transpose(p),Dt=t.transpose(v),yt=0;yt<B.length;yt++)B[yt]=t.multGamma(B[yt]),Dt[yt]=t.multGamma(Dt[yt]);var ut=t.multMat(B,t.transpose(Dt)),_=s.svd(ut);nt=t.multMat(_.V,t.transpose(_.U));for(var lt=0;lt<c.size;lt++){var pt=[d[lt],m[lt]],mt=[nt[0][0],nt[1][0]],Mt=[nt[0][1],nt[1][1]];d[lt]=t.dotProduct(pt,mt),m[lt]=t.dotProduct(pt,Mt)}C&&et(h.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var dt={x:0,y:0};h.fixedNodeConstraint.forEach(function(I,x){var X={x:d[c.get(I.nodeId)],y:m[c.get(I.nodeId)]},Z=I.position,W=V(Z,X);dt.x+=W.x,dt.y+=W.y}),dt.x/=h.fixedNodeConstraint.length,dt.y/=h.fixedNodeConstraint.length,d.forEach(function(I,x){d[x]+=dt.x}),m.forEach(function(I,x){m[x]+=dt.y}),h.fixedNodeConstraint.forEach(function(I){d[c.get(I.nodeId)]=I.position.x,m[c.get(I.nodeId)]=I.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var At=h.alignmentConstraint.vertical,wt=function(x){var X=new Set;At[x].forEach(function(tt){X.add(tt)});var Z=new Set([].concat(u(X)).filter(function(tt){return R.has(tt)})),W=void 0;Z.size>0?W=d[c.get(Z.values().next().value)]:W=j(X).x,X.forEach(function(tt){R.has(tt)||(d[c.get(tt)]=W)})},bt=0;bt<At.length;bt++)wt(bt);if(h.alignmentConstraint.horizontal)for(var Gt=h.alignmentConstraint.horizontal,Ft=function(x){var X=new Set;Gt[x].forEach(function(tt){X.add(tt)});var Z=new Set([].concat(u(X)).filter(function(tt){return R.has(tt)})),W=void 0;Z.size>0?W=m[c.get(Z.values().next().value)]:W=j(X).y,X.forEach(function(tt){R.has(tt)||(m[c.get(tt)]=W)})},It=0;It<Gt.length;It++)Ft(It)}h.relativePlacementConstraint&&(function(){var I=new Map,x=new Map,X=new Map,Z=new Map,W=new Map,tt=new Map,ht=new Set,rt=new Set;if(R.forEach(function(St){ht.add(St),rt.add(St)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var K=h.alignmentConstraint.vertical,Q=function(ct){X.set("dummy"+ct,[]),K[ct].forEach(function(Ct){I.set(Ct,"dummy"+ct),X.get("dummy"+ct).push(Ct),R.has(Ct)&&ht.add("dummy"+ct)}),W.set("dummy"+ct,d[c.get(K[ct][0])])},ft=0;ft<K.length;ft++)Q(ft);if(h.alignmentConstraint.horizontal)for(var Lt=h.alignmentConstraint.horizontal,vt=function(ct){Z.set("dummy"+ct,[]),Lt[ct].forEach(function(Ct){x.set(Ct,"dummy"+ct),Z.get("dummy"+ct).push(Ct),R.has(Ct)&&rt.add("dummy"+ct)}),tt.set("dummy"+ct,m[c.get(Lt[ct][0])])},Ot=0;Ot<Lt.length;Ot++)vt(Ot)}var ot=new Map,it=new Map,Tt=function(ct){P.get(ct).forEach(function(Ct){var zt=void 0,Wt=void 0;Ct.direction=="horizontal"?(zt=I.get(ct)?I.get(ct):ct,I.get(Ct.id)?Wt={id:I.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:Wt=Ct,ot.has(zt)?ot.get(zt).push(Wt):ot.set(zt,[Wt]),ot.has(Wt.id)||ot.set(Wt.id,[])):(zt=x.get(ct)?x.get(ct):ct,x.get(Ct.id)?Wt={id:x.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:Wt=Ct,it.has(zt)?it.get(zt).push(Wt):it.set(zt,[Wt]),it.has(Wt.id)||it.set(Wt.id,[]))})},st=!0,at=!1,Ut=void 0;try{for(var Et=P.keys()[Symbol.iterator](),Nt;!(st=(Nt=Et.next()).done);st=!0){var Xt=Nt.value;Tt(Xt)}}catch(St){at=!0,Ut=St}finally{try{!st&&Et.return&&Et.return()}finally{if(at)throw Ut}}var xt=E(ot),Ht=E(it),Rt=e(xt),Vt=e(Ht),Qt=g(ot),re=g(it),Bt=[],qt=[];Rt.forEach(function(St,ct){Bt[ct]=[],St.forEach(function(Ct){Qt.get(Ct).length==0&&Bt[ct].push(Ct)})}),Vt.forEach(function(St,ct){qt[ct]=[],St.forEach(function(Ct){re.get(Ct).length==0&&qt[ct].push(Ct)})});var Kt=D(ot,"horizontal",ht,W,Bt),Zt=D(it,"vertical",rt,tt,qt),jt=function(ct){X.get(ct)?X.get(ct).forEach(function(Ct){d[c.get(Ct)]=Kt.get(ct)}):d[c.get(ct)]=Kt.get(ct)},$t=!0,Jt=!1,he=void 0;try{for(var ie=Kt.keys()[Symbol.iterator](),le;!($t=(le=ie.next()).done);$t=!0){var ae=le.value;jt(ae)}}catch(St){Jt=!0,he=St}finally{try{!$t&&ie.return&&ie.return()}finally{if(Jt)throw he}}var pe=function(ct){Z.get(ct)?Z.get(ct).forEach(function(Ct){m[c.get(Ct)]=Zt.get(ct)}):m[c.get(ct)]=Zt.get(ct)},ne=!0,fe=!1,ue=void 0;try{for(var oe=Zt.keys()[Symbol.iterator](),ge;!(ne=(ge=oe.next()).done);ne=!0){var ae=ge.value;pe(ae)}}catch(St){fe=!0,ue=St}finally{try{!ne&&oe.return&&oe.return()}finally{if(fe)throw ue}}})()}for(var Pt=0;Pt<G.length;Pt++){var Yt=G[Pt];Yt.getChild()==null&&Yt.setCenter(d[c.get(Yt.id)],m[c.get(Yt.id)])}},n.exports=o}),551:(n=>{n.exports=k})},A={};function T(n){var r=A[n];if(r!==void 0)return r.exports;var a=A[n]={exports:{}};return gt[n](a,a.exports,T),a.exports}var l=T(45);return l})()})})(te)),te.exports}var Le=_t.exports,de;function Ce(){return de||(de=1,(function(kt,se){(function(gt,A){kt.exports=A(me())})(Le,function(k){return(()=>{var gt={658:(n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,u=Array(a>1?a-1:0),i=1;i<a;i++)u[i-1]=arguments[i];return u.forEach(function(y){Object.keys(y).forEach(function(t){return r[t]=y[t]})}),r}}),548:((n,r,a)=>{var u=(function(){function t(s,o){var f=[],h=!0,N=!1,c=void 0;try{for(var d=s[Symbol.iterator](),m;!(h=(m=d.next()).done)&&(f.push(m.value),!(o&&f.length===o));h=!0);}catch(G){N=!0,c=G}finally{try{!h&&d.return&&d.return()}finally{if(N)throw c}}return f}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=a(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var f=t.filter(function(h,N){typeof h=="number"&&(h=N);for(var c=h.parent()[0];c!=null;){if(s[c.id()])return!1;c=c.parent()[0]}return!0});return f},y.connectComponents=function(t,s,o,f){var h=new i,N=new Set,c=[],d=void 0,m=void 0,G=void 0,L=!1,U=1,J=[],V=[],j=function(){var et=t.collection();V.push(et);var e=o[0],E=t.collection();E.merge(e).merge(e.descendants().intersection(s)),c.push(e),E.forEach(function(v){h.push(v),N.add(v),et.merge(v)});for(var g=function(){e=h.shift();var w=t.collection();e.neighborhood().nodes().forEach(function(O){s.intersection(e.edgesWith(O)).length>0&&w.merge(O)});for(var C=0;C<w.length;C++){var R=w[C];if(d=o.intersection(R.union(R.ancestors())),d!=null&&!N.has(d[0])){var P=d.union(d.descendants());P.forEach(function(O){h.push(O),N.add(O),et.merge(O),o.has(O)&&c.push(O)})}}};h.length!=0;)g();if(et.forEach(function(v){s.intersection(v.connectedEdges()).forEach(function(w){et.has(w.source())&&et.has(w.target())&&et.merge(w)})}),c.length==o.length&&(L=!0),!L||L&&U>1){m=c[0],G=m.connectedEdges().length,c.forEach(function(v){v.connectedEdges().length<G&&(G=v.connectedEdges().length,m=v)}),J.push(m.id());var p=t.collection();p.merge(c[0]),c.forEach(function(v){p.merge(v)}),c=[],o=o.difference(p),U++}};do j();while(!L);return f&&J.length>0&&f.set("dummy"+(f.size+1),J),V},y.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var f=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,N=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,m=!1,G=void 0;try{for(var L=s.nodeIndexes[Symbol.iterator](),U;!(d=(U=L.next()).done);d=!0){var J=U.value,V=u(J,2),j=V[0],D=V[1],et=o.cy.getElementById(j);if(et){var e=et.boundingBox(),E=s.xCoords[D]-e.w/2,g=s.xCoords[D]+e.w/2,p=s.yCoords[D]-e.h/2,v=s.yCoords[D]+e.h/2;E<f&&(f=E),g>h&&(h=g),p<N&&(N=p),v>c&&(c=v)}}}catch(O){m=!0,G=O}finally{try{!d&&L.return&&L.return()}finally{if(m)throw G}}var w=t.x-(h+f)/2,C=t.y-(c+N)/2;s.xCoords=s.xCoords.map(function(O){return O+w}),s.yCoords=s.yCoords.map(function(O){return O+C})}else{Object.keys(s).forEach(function(O){var z=s[O],b=z.getRect().x,F=z.getRect().x+z.getRect().width,$=z.getRect().y,Y=z.getRect().y+z.getRect().height;b<f&&(f=b),F>h&&(h=F),$<N&&(N=$),Y>c&&(c=Y)});var R=t.x-(h+f)/2,P=t.y-(c+N)/2;Object.keys(s).forEach(function(O){var z=s[O];z.setCenter(z.getCenterX()+R,z.getCenterY()+P)})}}},y.calcBoundingBox=function(t,s,o,f){for(var h=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,c=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,m=void 0,G=void 0,L=void 0,U=void 0,J=t.descendants().not(":parent"),V=J.length,j=0;j<V;j++){var D=J[j];m=s[f.get(D.id())]-D.width()/2,G=s[f.get(D.id())]+D.width()/2,L=o[f.get(D.id())]-D.height()/2,U=o[f.get(D.id())]+D.height()/2,h>m&&(h=m),N<G&&(N=G),c>L&&(c=L),d<U&&(d=U)}var et={};return et.topLeftX=h,et.topLeftY=c,et.width=N-h,et.height=d-c,et},y.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(f){var h=!1;f.children().forEach(function(N){N.css("display")!="none"&&(h=!0)}),h||o.merge(f)}),o},n.exports=y}),816:((n,r,a)=>{var u=a(548),i=a(140).CoSELayout,y=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,f=a(140).layoutBase.FDLayoutConstants,h=a(140).CoSEConstants,N=function(d,m){var G=d.cy,L=d.eles,U=L.nodes(),J=L.edges(),V=void 0,j=void 0,D=void 0,et={};d.randomize&&(V=m.nodeIndexes,j=m.xCoords,D=m.yCoords);var e=function(O){return typeof O=="function"},E=function(O,z){return e(O)?O(z):O},g=u.calcParentsWithoutChildren(G,L),p=function P(O,z,b,F){for(var $=z.length,Y=0;Y<$;Y++){var M=z[Y],S=null;M.intersection(g).length==0&&(S=M.children());var H=void 0,q=M.layoutDimensions({nodeDimensionsIncludeLabels:F.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(F.randomize)if(!M.isParent())H=O.add(new y(b.graphManager,new t(j[V.get(M.id())]-q.w/2,D[V.get(M.id())]-q.h/2),new s(parseFloat(q.w),parseFloat(q.h))));else{var nt=u.calcBoundingBox(M,j,D,V);M.intersection(g).length==0?H=O.add(new y(b.graphManager,new t(nt.topLeftX,nt.topLeftY),new s(nt.width,nt.height))):H=O.add(new y(b.graphManager,new t(nt.topLeftX,nt.topLeftY),new s(parseFloat(q.w),parseFloat(q.h))))}else H=O.add(new y(b.graphManager,new t(M.position("x")-q.w/2,M.position("y")-q.h/2),new s(parseFloat(q.w),parseFloat(q.h))));else H=O.add(new y(this.graphManager));if(H.id=M.data("id"),H.nodeRepulsion=E(F.nodeRepulsion,M),H.paddingLeft=parseInt(M.css("padding")),H.paddingTop=parseInt(M.css("padding")),H.paddingRight=parseInt(M.css("padding")),H.paddingBottom=parseInt(M.css("padding")),F.nodeDimensionsIncludeLabels&&(H.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,H.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,H.labelPosVertical=M.css("text-valign"),H.labelPosHorizontal=M.css("text-halign")),et[M.data("id")]=H,isNaN(H.rect.x)&&(H.rect.x=0),isNaN(H.rect.y)&&(H.rect.y=0),S!=null&&S.length>0){var B=void 0;B=b.getGraphManager().add(b.newGraph(),H),P(B,S,b,F)}}},v=function(O,z,b){for(var F=0,$=0,Y=0;Y<b.length;Y++){var M=b[Y],S=et[M.data("source")],H=et[M.data("target")];if(S&&H&&S!==H&&S.getEdgesBetween(H).length==0){var q=z.add(O.newEdge(),S,H);q.id=M.id(),q.idealLength=E(d.idealEdgeLength,M),q.edgeElasticity=E(d.edgeElasticity,M),F+=q.idealLength,$++}}d.idealEdgeLength!=null&&($>0?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=F/$:e(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH)},w=function(O,z){z.fixedNodeConstraint&&(O.constraints.fixedNodeConstraint=z.fixedNodeConstraint),z.alignmentConstraint&&(O.constraints.alignmentConstraint=z.alignmentConstraint),z.relativePlacementConstraint&&(O.constraints.relativePlacementConstraint=z.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=f.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=f.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=f.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=f.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=f.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var C=new i,R=C.newGraphManager();return p(R.addRoot(),u.getTopMostNodes(U),C,d),v(C,R,J),w(C,d),C.runLayout(),et};n.exports={coseLayout:N}}),212:((n,r,a)=>{var u=(function(){function d(m,G){for(var L=0;L<G.length;L++){var U=G[L];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(m,U.key,U)}}return function(m,G,L){return G&&d(m.prototype,G),L&&d(m,L),m}})();function i(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}var y=a(658),t=a(548),s=a(657),o=s.spectralLayout,f=a(816),h=f.coseLayout,N=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(m){return 4500},idealEdgeLength:function(m){return 50},edgeElasticity:function(m){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 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(){}}),c=(function(){function d(m){i(this,d),this.options=y({},N,m)}return u(d,[{key:"run",value:function(){var G=this,L=this.options,U=L.cy,J=L.eles,V=[],j=[],D=void 0,et=[];L.fixedNodeConstraint&&(!Array.isArray(L.fixedNodeConstraint)||L.fixedNodeConstraint.length==0)&&(L.fixedNodeConstraint=void 0),L.alignmentConstraint&&(L.alignmentConstraint.vertical&&(!Array.isArray(L.alignmentConstraint.vertical)||L.alignmentConstraint.vertical.length==0)&&(L.alignmentConstraint.vertical=void 0),L.alignmentConstraint.horizontal&&(!Array.isArray(L.alignmentConstraint.horizontal)||L.alignmentConstraint.horizontal.length==0)&&(L.alignmentConstraint.horizontal=void 0)),L.relativePlacementConstraint&&(!Array.isArray(L.relativePlacementConstraint)||L.relativePlacementConstraint.length==0)&&(L.relativePlacementConstraint=void 0);var e=L.fixedNodeConstraint||L.alignmentConstraint||L.relativePlacementConstraint;e&&(L.tile=!1,L.packComponents=!1);var E=void 0,g=!1;if(U.layoutUtilities&&L.packComponents&&(E=U.layoutUtilities("get"),E||(E=U.layoutUtilities()),g=!0),J.nodes().length>0)if(g){var w=t.getTopMostNodes(L.eles.nodes());if(D=t.connectComponents(U,L.eles,w),D.forEach(function(ut){var _=ut.boundingBox();et.push({x:_.x1+_.w/2,y:_.y1+_.h/2})}),L.randomize&&D.forEach(function(ut){L.eles=ut,V.push(o(L))}),L.quality=="default"||L.quality=="proof"){var C=U.collection();if(L.tile){var R=new Map,P=[],O=[],z=0,b={nodeIndexes:R,xCoords:P,yCoords:O},F=[];if(D.forEach(function(ut,_){ut.edges().length==0&&(ut.nodes().forEach(function(lt,pt){C.merge(ut.nodes()[pt]),lt.isParent()||(b.nodeIndexes.set(ut.nodes()[pt].id(),z++),b.xCoords.push(ut.nodes()[0].position().x),b.yCoords.push(ut.nodes()[0].position().y))}),F.push(_))}),C.length>1){var $=C.boundingBox();et.push({x:$.x1+$.w/2,y:$.y1+$.h/2}),D.push(C),V.push(b);for(var Y=F.length-1;Y>=0;Y--)D.splice(F[Y],1),V.splice(F[Y],1),et.splice(F[Y],1)}}D.forEach(function(ut,_){L.eles=ut,j.push(h(L,V[_])),t.relocateComponent(et[_],j[_],L)})}else D.forEach(function(ut,_){t.relocateComponent(et[_],V[_],L)});var M=new Set;if(D.length>1){var S=[],H=J.filter(function(ut){return ut.css("display")=="none"});D.forEach(function(ut,_){var lt=void 0;if(L.quality=="draft"&&(lt=V[_].nodeIndexes),ut.nodes().not(H).length>0){var pt={};pt.edges=[],pt.nodes=[];var mt=void 0;ut.nodes().not(H).forEach(function(Mt){if(L.quality=="draft")if(!Mt.isParent())mt=lt.get(Mt.id()),pt.nodes.push({x:V[_].xCoords[mt]-Mt.boundingbox().w/2,y:V[_].yCoords[mt]-Mt.boundingbox().h/2,width:Mt.boundingbox().w,height:Mt.boundingbox().h});else{var dt=t.calcBoundingBox(Mt,V[_].xCoords,V[_].yCoords,lt);pt.nodes.push({x:dt.topLeftX,y:dt.topLeftY,width:dt.width,height:dt.height})}else j[_][Mt.id()]&&pt.nodes.push({x:j[_][Mt.id()].getLeft(),y:j[_][Mt.id()].getTop(),width:j[_][Mt.id()].getWidth(),height:j[_][Mt.id()].getHeight()})}),ut.edges().forEach(function(Mt){var dt=Mt.source(),At=Mt.target();if(dt.css("display")!="none"&&At.css("display")!="none")if(L.quality=="draft"){var wt=lt.get(dt.id()),bt=lt.get(At.id()),Gt=[],Ft=[];if(dt.isParent()){var It=t.calcBoundingBox(dt,V[_].xCoords,V[_].yCoords,lt);Gt.push(It.topLeftX+It.width/2),Gt.push(It.topLeftY+It.height/2)}else Gt.push(V[_].xCoords[wt]),Gt.push(V[_].yCoords[wt]);if(At.isParent()){var Pt=t.calcBoundingBox(At,V[_].xCoords,V[_].yCoords,lt);Ft.push(Pt.topLeftX+Pt.width/2),Ft.push(Pt.topLeftY+Pt.height/2)}else Ft.push(V[_].xCoords[bt]),Ft.push(V[_].yCoords[bt]);pt.edges.push({startX:Gt[0],startY:Gt[1],endX:Ft[0],endY:Ft[1]})}else j[_][dt.id()]&&j[_][At.id()]&&pt.edges.push({startX:j[_][dt.id()].getCenterX(),startY:j[_][dt.id()].getCenterY(),endX:j[_][At.id()].getCenterX(),endY:j[_][At.id()].getCenterY()})}),pt.nodes.length>0&&(S.push(pt),M.add(_))}});var q=E.packComponents(S,L.randomize).shifts;if(L.quality=="draft")V.forEach(function(ut,_){var lt=ut.xCoords.map(function(mt){return mt+q[_].dx}),pt=ut.yCoords.map(function(mt){return mt+q[_].dy});ut.xCoords=lt,ut.yCoords=pt});else{var nt=0;M.forEach(function(ut){Object.keys(j[ut]).forEach(function(_){var lt=j[ut][_];lt.setCenter(lt.getCenterX()+q[nt].dx,lt.getCenterY()+q[nt].dy)}),nt++})}}}else{var p=L.eles.boundingBox();if(et.push({x:p.x1+p.w/2,y:p.y1+p.h/2}),L.randomize){var v=o(L);V.push(v)}L.quality=="default"||L.quality=="proof"?(j.push(h(L,V[0])),t.relocateComponent(et[0],j[0],L)):t.relocateComponent(et[0],V[0],L)}var B=function(_,lt){if(L.quality=="default"||L.quality=="proof"){typeof _=="number"&&(_=lt);var pt=void 0,mt=void 0,Mt=_.data("id");return j.forEach(function(At){Mt in At&&(pt={x:At[Mt].getRect().getCenterX(),y:At[Mt].getRect().getCenterY()},mt=At[Mt])}),L.nodeDimensionsIncludeLabels&&(mt.labelWidth&&(mt.labelPosHorizontal=="left"?pt.x+=mt.labelWidth/2:mt.labelPosHorizontal=="right"&&(pt.x-=mt.labelWidth/2)),mt.labelHeight&&(mt.labelPosVertical=="top"?pt.y+=mt.labelHeight/2:mt.labelPosVertical=="bottom"&&(pt.y-=mt.labelHeight/2))),pt==null&&(pt={x:_.position("x"),y:_.position("y")}),{x:pt.x,y:pt.y}}else{var dt=void 0;return V.forEach(function(At){var wt=At.nodeIndexes.get(_.id());wt!=null&&(dt={x:At.xCoords[wt],y:At.yCoords[wt]})}),dt==null&&(dt={x:_.position("x"),y:_.position("y")}),{x:dt.x,y:dt.y}}};if(L.quality=="default"||L.quality=="proof"||L.randomize){var Dt=t.calcParentsWithoutChildren(U,J),yt=J.filter(function(ut){return ut.css("display")=="none"});L.eles=J.not(yt),J.nodes().not(":parent").not(yt).layoutPositions(G,L,B),Dt.length>0&&Dt.forEach(function(ut){ut.position(B(ut))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();n.exports=c}),657:((n,r,a)=>{var u=a(548),i=a(140).layoutBase.Matrix,y=a(140).layoutBase.SVD,t=function(o){var f=o.cy,h=o.eles,N=h.nodes(),c=h.nodes(":parent"),d=new Map,m=new Map,G=new Map,L=[],U=[],J=[],V=[],j=[],D=[],et=[],e=[],E=void 0,g=1e8,p=1e-9,v=o.piTol,w=o.samplingType,C=o.nodeSeparation,R=void 0,P=function(){for(var x=0,X=0,Z=!1;X<R;){x=Math.floor(Math.random()*E),Z=!1;for(var W=0;W<X;W++)if(V[W]==x){Z=!0;break}if(!Z)V[X]=x,X++;else continue}},O=function(x,X,Z){for(var W=[],tt=0,ht=0,rt=0,K=void 0,Q=[],ft=0,Lt=1,vt=0;vt<E;vt++)Q[vt]=g;for(W[ht]=x,Q[x]=0;ht>=tt;){rt=W[tt++];for(var Ot=L[rt],ot=0;ot<Ot.length;ot++)K=m.get(Ot[ot]),Q[K]==g&&(Q[K]=Q[rt]+1,W[++ht]=K);D[rt][X]=Q[rt]*C}if(Z){for(var it=0;it<E;it++)D[it][X]<j[it]&&(j[it]=D[it][X]);for(var Tt=0;Tt<E;Tt++)j[Tt]>ft&&(ft=j[Tt],Lt=Tt)}return Lt},z=function(x){var X=void 0;if(x){X=Math.floor(Math.random()*E);for(var W=0;W<E;W++)j[W]=g;for(var tt=0;tt<R;tt++)V[tt]=X,X=O(X,tt,x)}else{P();for(var Z=0;Z<R;Z++)O(V[Z],Z,x)}for(var ht=0;ht<E;ht++)for(var rt=0;rt<R;rt++)D[ht][rt]*=D[ht][rt];for(var K=0;K<R;K++)et[K]=[];for(var Q=0;Q<R;Q++)for(var ft=0;ft<R;ft++)et[Q][ft]=D[V[ft]][Q]},b=function(){for(var x=y.svd(et),X=x.S,Z=x.U,W=x.V,tt=X[0]*X[0]*X[0],ht=[],rt=0;rt<R;rt++){ht[rt]=[];for(var K=0;K<R;K++)ht[rt][K]=0,rt==K&&(ht[rt][K]=X[rt]/(X[rt]*X[rt]+tt/(X[rt]*X[rt])))}e=i.multMat(i.multMat(W,ht),i.transpose(Z))},F=function(){for(var x=void 0,X=void 0,Z=[],W=[],tt=[],ht=[],rt=0;rt<E;rt++)Z[rt]=Math.random(),W[rt]=Math.random();Z=i.normalize(Z),W=i.normalize(W);for(var K=p,Q=p,ft=void 0;;){for(var Lt=0;Lt<E;Lt++)tt[Lt]=Z[Lt];if(Z=i.multGamma(i.multL(i.multGamma(tt),D,e)),x=i.dotProduct(tt,Z),Z=i.normalize(Z),K=i.dotProduct(tt,Z),ft=Math.abs(K/Q),ft<=1+v&&ft>=1)break;Q=K}for(var vt=0;vt<E;vt++)tt[vt]=Z[vt];for(Q=p;;){for(var Ot=0;Ot<E;Ot++)ht[Ot]=W[Ot];if(ht=i.minusOp(ht,i.multCons(tt,i.dotProduct(tt,ht))),W=i.multGamma(i.multL(i.multGamma(ht),D,e)),X=i.dotProduct(ht,W),W=i.normalize(W),K=i.dotProduct(ht,W),ft=Math.abs(K/Q),ft<=1+v&&ft>=1)break;Q=K}for(var ot=0;ot<E;ot++)ht[ot]=W[ot];U=i.multCons(tt,Math.sqrt(Math.abs(x))),J=i.multCons(ht,Math.sqrt(Math.abs(X)))};u.connectComponents(f,h,u.getTopMostNodes(N),d),c.forEach(function(I){u.connectComponents(f,h,u.getTopMostNodes(I.descendants().intersection(h)),d)});for(var $=0,Y=0;Y<N.length;Y++)N[Y].isParent()||m.set(N[Y].id(),$++);var M=!0,S=!1,H=void 0;try{for(var q=d.keys()[Symbol.iterator](),nt;!(M=(nt=q.next()).done);M=!0){var B=nt.value;m.set(B,$++)}}catch(I){S=!0,H=I}finally{try{!M&&q.return&&q.return()}finally{if(S)throw H}}for(var Dt=0;Dt<m.size;Dt++)L[Dt]=[];c.forEach(function(I){for(var x=I.children().intersection(h);x.nodes(":childless").length==0;)x=x.nodes()[0].children().intersection(h);var X=0,Z=x.nodes(":childless")[0].connectedEdges().length;x.nodes(":childless").forEach(function(W,tt){W.connectedEdges().length<Z&&(Z=W.connectedEdges().length,X=tt)}),G.set(I.id(),x.nodes(":childless")[X].id())}),N.forEach(function(I){var x=void 0;I.isParent()?x=m.get(G.get(I.id())):x=m.get(I.id()),I.neighborhood().nodes().forEach(function(X){h.intersection(I.edgesWith(X)).length>0&&(X.isParent()?L[x].push(G.get(X.id())):L[x].push(X.id()))})});var yt=function(x){var X=m.get(x),Z=void 0;d.get(x).forEach(function(W){f.getElementById(W).isParent()?Z=G.get(W):Z=W,L[X].push(Z),L[m.get(Z)].push(x)})},ut=!0,_=!1,lt=void 0;try{for(var pt=d.keys()[Symbol.iterator](),mt;!(ut=(mt=pt.next()).done);ut=!0){var Mt=mt.value;yt(Mt)}}catch(I){_=!0,lt=I}finally{try{!ut&&pt.return&&pt.return()}finally{if(_)throw lt}}E=m.size;var dt=void 0;if(E>2){R=E<o.sampleSize?E:o.sampleSize;for(var At=0;At<E;At++)D[At]=[];for(var wt=0;wt<R;wt++)e[wt]=[];return o.quality=="draft"||o.step=="all"?(z(w),b(),F(),dt={nodeIndexes:m,xCoords:U,yCoords:J}):(m.forEach(function(I,x){U.push(f.getElementById(x).position("x")),J.push(f.getElementById(x).position("y"))}),dt={nodeIndexes:m,xCoords:U,yCoords:J}),dt}else{var bt=m.keys(),Gt=f.getElementById(bt.next().value),Ft=Gt.position(),It=Gt.outerWidth();if(U.push(Ft.x),J.push(Ft.y),E==2){var Pt=f.getElementById(bt.next().value),Yt=Pt.outerWidth();U.push(Ft.x+It/2+Yt/2+o.idealEdgeLength),J.push(Ft.y)}return dt={nodeIndexes:m,xCoords:U,yCoords:J},dt}};n.exports={spectralLayout:t}}),579:((n,r,a)=>{var u=a(212),i=function(t){t&&t("layout","fcose",u)};typeof cytoscape<"u"&&i(cytoscape),n.exports=i}),140:(n=>{n.exports=k})},A={};function T(n){var r=A[n];if(r!==void 0)return r.exports;var a=A[n]={exports:{}};return gt[n](a,a.exports,T),a.exports}var l=T(579);return l})()})})(_t)),_t.exports}var Me=Ce();const Oe=Ee(Me);export{Oe as f};
1
+ import{g as Ee}from"./globals-BwNQF72D.js";var _t={exports:{}},te={exports:{}},ee={exports:{}},ye=ee.exports,ve;function Te(){return ve||(ve=1,(function(kt,se){(function(gt,A){kt.exports=A()})(ye,function(){return(function(k){var gt={};function A(T){if(gt[T])return gt[T].exports;var l=gt[T]={i:T,l:!1,exports:{}};return k[T].call(l.exports,l,l.exports,A),l.l=!0,l.exports}return A.m=k,A.c=gt,A.i=function(T){return T},A.d=function(T,l,n){A.o(T,l)||Object.defineProperty(T,l,{configurable:!1,enumerable:!0,get:n})},A.n=function(T){var l=T&&T.__esModule?function(){return T.default}:function(){return T};return A.d(l,"a",l),l},A.o=function(T,l){return Object.prototype.hasOwnProperty.call(T,l)},A.p="",A(A.s=28)})([(function(k,gt,A){function T(){}T.QUALITY=1,T.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,T.DEFAULT_INCREMENTAL=!1,T.DEFAULT_ANIMATION_ON_LAYOUT=!0,T.DEFAULT_ANIMATION_DURING_LAYOUT=!1,T.DEFAULT_ANIMATION_PERIOD=50,T.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,T.DEFAULT_GRAPH_MARGIN=15,T.NODE_DIMENSIONS_INCLUDE_LABELS=!1,T.SIMPLE_NODE_SIZE=40,T.SIMPLE_NODE_HALF_SIZE=T.SIMPLE_NODE_SIZE/2,T.EMPTY_COMPOUND_NODE_SIZE=40,T.MIN_EDGE_LENGTH=1,T.WORLD_BOUNDARY=1e6,T.INITIAL_WORLD_BOUNDARY=T.WORLD_BOUNDARY/1e3,T.WORLD_CENTER_X=1200,T.WORLD_CENTER_Y=900,k.exports=T}),(function(k,gt,A){var T=A(2),l=A(8),n=A(9);function r(u,i,y){T.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=u,this.target=i}r.prototype=Object.create(T.prototype);for(var a in T)r[a]=T[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(u,i){for(var y=this.getOtherEnd(u),t=i.getGraphManager().getRoot();;){if(y.getOwner()==i)return y;if(y.getOwner()==t)break;y=y.getOwner().getParent()}return null},r.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},k.exports=r}),(function(k,gt,A){function T(l){this.vGraphObject=l}k.exports=T}),(function(k,gt,A){var T=A(2),l=A(10),n=A(13),r=A(0),a=A(16),u=A(5);function i(t,s,o,f){o==null&&f==null&&(f=s),T.call(this,f),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}i.prototype=Object.create(T.prototype);for(var y in T)i[y]=T[y];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},i.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},i.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},i.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},i.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(f){if(f.target==t){if(f.source!=o)throw"Incorrect edge source!";s.push(f)}}),s},i.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(f){if(!(f.source==o||f.target==o))throw"Incorrect edge source and/or target";(f.target==t||f.source==t)&&s.push(f)}),s},i.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},i.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var f=this.child.getNodes(),h=0;h<f.length;h++)s=f[h],o=s.withChildren(),o.forEach(function(N){t.add(N)});return t},i.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),f=0;f<o.length;f++)s=o[f],t+=s.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},i.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,f=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+a.nextDouble()*(f-o)+o;var h=-r.INITIAL_WORLD_BOUNDARY,N=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+a.nextDouble()*(N-h)+h,this.rect.x=t,this.rect.y=s},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var f=new u(s,o),h=t.inverseTransformPoint(f);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},k.exports=i}),(function(k,gt,A){var T=A(0);function l(){}for(var n in T)l[n]=T[n];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,k.exports=l}),(function(k,gt,A){function T(l,n){l==null&&n==null?(this.x=0,this.y=0):(this.x=l,this.y=n)}T.prototype.getX=function(){return this.x},T.prototype.getY=function(){return this.y},T.prototype.setX=function(l){this.x=l},T.prototype.setY=function(l){this.y=l},T.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},T.prototype.getCopy=function(){return new T(this.x,this.y)},T.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},k.exports=T}),(function(k,gt,A){var T=A(2),l=A(10),n=A(0),r=A(7),a=A(3),u=A(1),i=A(13),y=A(12),t=A(11);function s(f,h,N){T.call(this,N),this.estimatedSize=l.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=f,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(T.prototype);for(var o in T)s[o]=T[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(f,h,N){if(h==null&&N==null){var c=f;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var d=f;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(N)>-1))throw"Source or target not in graph!";if(!(h.owner==N.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=N.owner?null:(d.source=h,d.target=N,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),N!=h&&N.edges.push(d),d)}},s.prototype.remove=function(f){var h=f;if(f instanceof a){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var N=h.edges.slice(),c,d=N.length,m=0;m<d;m++)c=N[m],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var G=this.nodes.indexOf(h);if(G==-1)throw"Node not in owner node list!";this.nodes.splice(G,1)}else if(f instanceof u){var c=f;if(c==null)throw"Edge is null!";if(!(c.source!=null&&c.target!=null))throw"Source and/or target is null!";if(!(c.source.owner!=null&&c.target.owner!=null&&c.source.owner==this&&c.target.owner==this))throw"Source and/or target owner is invalid!";var L=c.source.edges.indexOf(c),U=c.target.edges.indexOf(c);if(!(L>-1&&U>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(L,1),c.target!=c.source&&c.target.edges.splice(U,1);var G=c.source.owner.getEdges().indexOf(c);if(G==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(G,1)}},s.prototype.updateLeftTop=function(){for(var f=l.MAX_VALUE,h=l.MAX_VALUE,N,c,d,m=this.getNodes(),G=m.length,L=0;L<G;L++){var U=m[L];N=U.getTop(),c=U.getLeft(),f>N&&(f=N),h>c&&(h=c)}return f==l.MAX_VALUE?null:(m[0].getParent().paddingLeft!=null?d=m[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=f-d,new y(this.left,this.top))},s.prototype.updateBounds=function(f){for(var h=l.MAX_VALUE,N=-l.MAX_VALUE,c=l.MAX_VALUE,d=-l.MAX_VALUE,m,G,L,U,J,V=this.nodes,j=V.length,D=0;D<j;D++){var et=V[D];f&&et.child!=null&&et.updateBounds(),m=et.getLeft(),G=et.getRight(),L=et.getTop(),U=et.getBottom(),h>m&&(h=m),N<G&&(N=G),c>L&&(c=L),d<U&&(d=U)}var e=new i(h,c,N-h,d-c);h==l.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),V[0].getParent().paddingLeft!=null?J=V[0].getParent().paddingLeft:J=this.margin,this.left=e.x-J,this.right=e.x+e.width+J,this.top=e.y-J,this.bottom=e.y+e.height+J},s.calculateBounds=function(f){for(var h=l.MAX_VALUE,N=-l.MAX_VALUE,c=l.MAX_VALUE,d=-l.MAX_VALUE,m,G,L,U,J=f.length,V=0;V<J;V++){var j=f[V];m=j.getLeft(),G=j.getRight(),L=j.getTop(),U=j.getBottom(),h>m&&(h=m),N<G&&(N=G),c>L&&(c=L),d<U&&(d=U)}var D=new i(h,c,N-h,d-c);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var f=0,h=this.nodes,N=h.length,c=0;c<N;c++){var d=h[c];f+=d.calcEstimatedSize()}return f==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=f/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var f=this;if(this.nodes.length==0){this.isConnected=!0;return}var h=new t,N=new Set,c=this.nodes[0],d,m,G=c.withChildren();for(G.forEach(function(D){h.push(D),N.add(D)});h.length!==0;){c=h.shift(),d=c.getEdges();for(var L=d.length,U=0;U<L;U++){var J=d[U];if(m=J.getOtherEndInGraph(c,this),m!=null&&!N.has(m)){var V=m.withChildren();V.forEach(function(D){h.push(D),N.add(D)})}}}if(this.isConnected=!1,N.size>=this.nodes.length){var j=0;N.forEach(function(D){D.owner==f&&j++}),j==this.nodes.length&&(this.isConnected=!0)}},k.exports=s}),(function(k,gt,A){var T,l=A(1);function n(r){T=A(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),u=this.add(r,a);return this.setRootGraph(u),this.rootGraph},n.prototype.add=function(r,a,u,i,y){if(u==null&&i==null&&y==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{y=u,i=a,u=r;var t=i.getOwner(),s=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return u.isInterGraph=!1,t.add(u,i,y);if(u.isInterGraph=!0,u.source=i,u.target=y,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},n.prototype.remove=function(r){if(r instanceof T){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(a.getEdges());for(var i,y=u.length,t=0;t<y;t++)i=u[t],a.remove(i);var s=[];s=s.concat(a.getNodes());var o;y=s.length;for(var t=0;t<y;t++)o=s[t],a.remove(o);a==this.rootGraph&&this.setRootGraph(null);var f=this.graphs.indexOf(a);this.graphs.splice(f,1),a.parent=null}else if(r instanceof l){if(i=r,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var f=i.source.edges.indexOf(i);if(i.source.edges.splice(f,1),f=i.target.edges.indexOf(i),i.target.edges.splice(f,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var f=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(f,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),u=a.length,i=0;i<u;i++)r=r.concat(a[i].getNodes());this.allNodes=r}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],a=this.getGraphs();a.length;for(var u=0;u<a.length;u++)r=r.concat(a[u].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var u=r.getOwner(),i;do{if(i=u.getParent(),i==null)break;if(i==a)return!0;if(u=i.getOwner(),u==null)break}while(!0);u=a.getOwner();do{if(i=u.getParent(),i==null)break;if(i==r)return!0;if(u=i.getOwner(),u==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var r,a,u,i,y,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],a=r.source,u=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=u,a==u){r.lca=a.getOwner();continue}for(i=a.getOwner();r.lca==null;){for(r.targetInLca=u,y=u.getOwner();r.lca==null;){if(y==i){r.lca=y;break}if(y==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=y.getParent(),y=r.targetInLca.getOwner()}if(i==this.rootGraph)break;r.lca==null&&(r.sourceInLca=i.getParent(),i=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var u=r.getOwner();do{if(u==null)break;var i=a.getOwner();do{if(i==null)break;if(i==u)return i;i=i.getParent().getOwner()}while(!0);u=u.getParent().getOwner()}while(!0);return u},n.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var u,i=r.getNodes(),y=i.length,t=0;t<y;t++)u=i[t],u.inclusionTreeDepth=a,u.child!=null&&this.calcInclusionTreeDepths(u.child,a+1)},n.prototype.includesInvalidEdge=function(){for(var r,a=[],u=this.edges.length,i=0;i<u;i++)r=this.edges[i],this.isOneAncestorOfOther(r.source,r.target)&&a.push(r);for(var i=0;i<a.length;i++)this.remove(a[i]);return!1},k.exports=n}),(function(k,gt,A){var T=A(12);function l(){}l.calcSeparationAmount=function(n,r,a,u){if(!n.intersects(r))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(n,r,i),a[0]=Math.min(n.getRight(),r.getRight())-Math.max(n.x,r.x),a[1]=Math.min(n.getBottom(),r.getBottom())-Math.max(n.y,r.y),n.getX()<=r.getX()&&n.getRight()>=r.getRight()?a[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(a[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(a[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var y=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(y=1);var t=y*a[0],s=a[1]/y;a[0]<s?s=a[0]:t=a[1],a[0]=-1*i[0]*(s/2+u),a[1]=-1*i[1]*(t/2+u)},l.decideDirectionsForOverlappingNodes=function(n,r,a){n.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,n.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},l.getIntersection2=function(n,r,a){var u=n.getCenterX(),i=n.getCenterY(),y=r.getCenterX(),t=r.getCenterY();if(n.intersects(r))return a[0]=u,a[1]=i,a[2]=y,a[3]=t,!0;var s=n.getX(),o=n.getY(),f=n.getRight(),h=n.getX(),N=n.getBottom(),c=n.getRight(),d=n.getWidthHalf(),m=n.getHeightHalf(),G=r.getX(),L=r.getY(),U=r.getRight(),J=r.getX(),V=r.getBottom(),j=r.getRight(),D=r.getWidthHalf(),et=r.getHeightHalf(),e=!1,E=!1;if(u===y){if(i>t)return a[0]=u,a[1]=o,a[2]=y,a[3]=V,!1;if(i<t)return a[0]=u,a[1]=N,a[2]=y,a[3]=L,!1}else if(i===t){if(u>y)return a[0]=s,a[1]=i,a[2]=U,a[3]=t,!1;if(u<y)return a[0]=f,a[1]=i,a[2]=G,a[3]=t,!1}else{var g=n.height/n.width,p=r.height/r.width,v=(t-i)/(y-u),w=void 0,C=void 0,R=void 0,P=void 0,O=void 0,z=void 0;if(-g===v?u>y?(a[0]=h,a[1]=N,e=!0):(a[0]=f,a[1]=o,e=!0):g===v&&(u>y?(a[0]=s,a[1]=o,e=!0):(a[0]=c,a[1]=N,e=!0)),-p===v?y>u?(a[2]=J,a[3]=V,E=!0):(a[2]=U,a[3]=L,E=!0):p===v&&(y>u?(a[2]=G,a[3]=L,E=!0):(a[2]=j,a[3]=V,E=!0)),e&&E)return!1;if(u>y?i>t?(w=this.getCardinalDirection(g,v,4),C=this.getCardinalDirection(p,v,2)):(w=this.getCardinalDirection(-g,v,3),C=this.getCardinalDirection(-p,v,1)):i>t?(w=this.getCardinalDirection(-g,v,1),C=this.getCardinalDirection(-p,v,3)):(w=this.getCardinalDirection(g,v,2),C=this.getCardinalDirection(p,v,4)),!e)switch(w){case 1:P=o,R=u+-m/v,a[0]=R,a[1]=P;break;case 2:R=c,P=i+d*v,a[0]=R,a[1]=P;break;case 3:P=N,R=u+m/v,a[0]=R,a[1]=P;break;case 4:R=h,P=i+-d*v,a[0]=R,a[1]=P;break}if(!E)switch(C){case 1:z=L,O=y+-et/v,a[2]=O,a[3]=z;break;case 2:O=j,z=t+D*v,a[2]=O,a[3]=z;break;case 3:z=V,O=y+et/v,a[2]=O,a[3]=z;break;case 4:O=J,z=t+-D*v,a[2]=O,a[3]=z;break}}return!1},l.getCardinalDirection=function(n,r,a){return n>r?a:1+a%4},l.getIntersection=function(n,r,a,u){if(u==null)return this.getIntersection2(n,r,a);var i=n.x,y=n.y,t=r.x,s=r.y,o=a.x,f=a.y,h=u.x,N=u.y,c=void 0,d=void 0,m=void 0,G=void 0,L=void 0,U=void 0,J=void 0,V=void 0,j=void 0;return m=s-y,L=i-t,J=t*y-i*s,G=N-f,U=o-h,V=h*f-o*N,j=m*U-G*L,j===0?null:(c=(L*V-U*J)/j,d=(G*J-m*V)/j,new T(c,d))},l.angleOfVector=function(n,r,a,u){var i=void 0;return n!==a?(i=Math.atan((u-r)/(a-n)),a<n?i+=Math.PI:u<r&&(i+=this.TWO_PI)):u<r?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},l.doIntersect=function(n,r,a,u){var i=n.x,y=n.y,t=r.x,s=r.y,o=a.x,f=a.y,h=u.x,N=u.y,c=(t-i)*(N-f)-(h-o)*(s-y);if(c===0)return!1;var d=((N-f)*(h-i)+(o-h)*(N-y))/c,m=((y-s)*(h-i)+(t-i)*(N-y))/c;return 0<d&&d<1&&0<m&&m<1},l.findCircleLineIntersections=function(n,r,a,u,i,y,t){var s=(a-n)*(a-n)+(u-r)*(u-r),o=2*((n-i)*(a-n)+(r-y)*(u-r)),f=(n-i)*(n-i)+(r-y)*(r-y)-t*t,h=o*o-4*s*f;if(h>=0){var N=(-o+Math.sqrt(o*o-4*s*f))/(2*s),c=(-o-Math.sqrt(o*o-4*s*f))/(2*s),d=null;return N>=0&&N<=1?[N]:c>=0&&c<=1?[c]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,k.exports=l}),(function(k,gt,A){function T(){}T.sign=function(l){return l>0?1:l<0?-1:0},T.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},T.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},k.exports=T}),(function(k,gt,A){function T(){}T.MAX_VALUE=2147483647,T.MIN_VALUE=-2147483648,k.exports=T}),(function(k,gt,A){var T=(function(){function i(y,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(y,o.key,o)}}return function(y,t,s){return t&&i(y.prototype,t),s&&i(y,s),y}})();function l(i,y){if(!(i instanceof y))throw new TypeError("Cannot call a class as a function")}var n=function(y){return{value:y,next:null,prev:null}},r=function(y,t,s,o){return y!==null?y.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=y,t.next=s,o.length++,t},a=function(y,t){var s=y.prev,o=y.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,y.prev=y.next=null,t.length--,y},u=(function(){function i(y){var t=this;l(this,i),this.length=0,this.head=null,this.tail=null,y?.forEach(function(s){return t.push(s)})}return T(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,n(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,n(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return r(null,n(t),this.head,this)}},{key:"remove",value:function(t){return a(t,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,f=this.head;o<t;)f=f.next,o++;f.value=s}}}]),i})();k.exports=u}),(function(k,gt,A){function T(l,n,r){this.x=null,this.y=null,l==null&&n==null&&r==null?(this.x=0,this.y=0):typeof l=="number"&&typeof n=="number"&&r==null?(this.x=l,this.y=n):l.constructor.name=="Point"&&n==null&&r==null&&(r=l,this.x=r.x,this.y=r.y)}T.prototype.getX=function(){return this.x},T.prototype.getY=function(){return this.y},T.prototype.getLocation=function(){return new T(this.x,this.y)},T.prototype.setLocation=function(l,n,r){l.constructor.name=="Point"&&n==null&&r==null?(r=l,this.setLocation(r.x,r.y)):typeof l=="number"&&typeof n=="number"&&r==null&&(parseInt(l)==l&&parseInt(n)==n?this.move(l,n):(this.x=Math.floor(l+.5),this.y=Math.floor(n+.5)))},T.prototype.move=function(l,n){this.x=l,this.y=n},T.prototype.translate=function(l,n){this.x+=l,this.y+=n},T.prototype.equals=function(l){if(l.constructor.name=="Point"){var n=l;return this.x==n.x&&this.y==n.y}return this==l},T.prototype.toString=function(){return new T().constructor.name+"[x="+this.x+",y="+this.y+"]"},k.exports=T}),(function(k,gt,A){function T(l,n,r,a){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&n!=null&&r!=null&&a!=null&&(this.x=l,this.y=n,this.width=r,this.height=a)}T.prototype.getX=function(){return this.x},T.prototype.setX=function(l){this.x=l},T.prototype.getY=function(){return this.y},T.prototype.setY=function(l){this.y=l},T.prototype.getWidth=function(){return this.width},T.prototype.setWidth=function(l){this.width=l},T.prototype.getHeight=function(){return this.height},T.prototype.setHeight=function(l){this.height=l},T.prototype.getRight=function(){return this.x+this.width},T.prototype.getBottom=function(){return this.y+this.height},T.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},T.prototype.getCenterX=function(){return this.x+this.width/2},T.prototype.getMinX=function(){return this.getX()},T.prototype.getMaxX=function(){return this.getX()+this.width},T.prototype.getCenterY=function(){return this.y+this.height/2},T.prototype.getMinY=function(){return this.getY()},T.prototype.getMaxY=function(){return this.getY()+this.height},T.prototype.getWidthHalf=function(){return this.width/2},T.prototype.getHeightHalf=function(){return this.height/2},k.exports=T}),(function(k,gt,A){var T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function l(){}l.lastID=0,l.createID=function(n){return l.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=l.getString(),l.lastID++),n.uniqueID)},l.getString=function(n){return n==null&&(n=l.lastID),"Object#"+n},l.isPrimitive=function(n){var r=typeof n>"u"?"undefined":T(n);return n==null||r!="object"&&r!="function"},k.exports=l}),(function(k,gt,A){function T(o){if(Array.isArray(o)){for(var f=0,h=Array(o.length);f<o.length;f++)h[f]=o[f];return h}else return Array.from(o)}var l=A(0),n=A(7),r=A(3),a=A(1),u=A(6),i=A(5),y=A(17),t=A(29);function s(o){t.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new n(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new u(null,this.graphManager,o)},s.prototype.newNode=function(o){return new r(this.graphManager,o)},s.prototype.newEdge=function(o){return new a(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),l.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),f=0;f<o.length;f++)o[f];for(var h=this.graphManager.getRoot().getNodes(),f=0;f<h.length;f++)h[f];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var f=o;if(f.getChild()!=null)for(var h=f.getChild().getNodes(),N=0;N<h.length;N++)update(h[N]);if(f.vGraphObject!=null){var c=f.vGraphObject;c.update(f)}}else if(o instanceof a){var d=o;if(d.vGraphObject!=null){var m=d.vGraphObject;m.update(d)}}else if(o instanceof u){var G=o;if(G.vGraphObject!=null){var L=G.vGraphObject;L.update(G)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new i(0,0));else{var f=new y,h=this.graphManager.getRoot().updateLeftTop();if(h!=null){f.setWorldOrgX(o.x),f.setWorldOrgY(o.y),f.setDeviceOrgX(h.x),f.setDeviceOrgY(h.y);for(var N=this.getAllNodes(),c,d=0;d<N.length;d++)c=N[d],c.transform(f)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var f,h,N=o.getNodes(),c=0;c<N.length;c++)f=N[c],h=f.getChild(),h==null||h.getNodes().length==0?f.scatter():(this.positionNodesRandomly(h),f.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],f=!0,h=this.graphManager.getRoot().getNodes(),N=!0,c=0;c<h.length;c++)h[c].getChild()!=null&&(N=!1);if(!N)return o;var d=new Set,m=[],G=new Map,L=[];for(L=L.concat(h);L.length>0&&f;){for(m.push(L[0]);m.length>0&&f;){var U=m[0];m.splice(0,1),d.add(U);for(var J=U.getEdges(),c=0;c<J.length;c++){var V=J[c].getOtherEnd(U);if(G.get(U)!=V)if(!d.has(V))m.push(V),G.set(V,U);else{f=!1;break}}}if(!f)o=[];else{var j=[].concat(T(d));o.push(j);for(var c=0;c<j.length;c++){var D=j[c],et=L.indexOf(D);et>-1&&L.splice(et,1)}d=new Set,G=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var f=[],h=o.source,N=this.graphManager.calcLowestCommonAncestor(o.source,o.target),c=0;c<o.bendpoints.length;c++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),N.add(d);var m=this.newEdge(null);this.graphManager.add(m,h,d),f.add(d),h=d}var m=this.newEdge(null);return this.graphManager.add(m,h,o.target),this.edgeToDummyNodes.set(o,f),o.isInterGraph()?this.graphManager.remove(o):N.remove(o),f},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(T(this.edgeToDummyNodes.keys())).concat(o);for(var f=0;f<o.length;f++){var h=o[f];if(h.bendpoints.length>0){for(var N=this.edgeToDummyNodes.get(h),c=0;c<N.length;c++){var d=N[c],m=new i(d.getCenterX(),d.getCenterY()),G=h.bendpoints.get(c);G.x=m.x,G.y=m.y,d.getOwner().remove(d)}this.graphManager.add(h,h.source,h.target)}}},s.transform=function(o,f,h,N){if(h!=null&&N!=null){var c=f;if(o<=50){var d=f/h;c-=(f-d)/50*(50-o)}else{var m=f*N;c+=(m-f)/50*(o-50)}return c}else{var G,L;return o<=50?(G=9*f/500,L=f/10):(G=9*f/50,L=-8*f),G*o+L}},s.findCenterOfTree=function(o){var f=[];f=f.concat(o);var h=[],N=new Map,c=!1,d=null;(f.length==1||f.length==2)&&(c=!0,d=f[0]);for(var m=0;m<f.length;m++){var G=f[m],L=G.getNeighborsList().size;N.set(G,G.getNeighborsList().size),L==1&&h.push(G)}var U=[];for(U=U.concat(h);!c;){var J=[];J=J.concat(U),U=[];for(var m=0;m<f.length;m++){var G=f[m],V=f.indexOf(G);V>=0&&f.splice(V,1);var j=G.getNeighborsList();j.forEach(function(e){if(h.indexOf(e)<0){var E=N.get(e),g=E-1;g==1&&U.push(e),N.set(e,g)}})}h=h.concat(U),(f.length==1||f.length==2)&&(c=!0,d=f[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},k.exports=s}),(function(k,gt,A){function T(){}T.seed=1,T.x=0,T.nextDouble=function(){return T.x=Math.sin(T.seed++)*1e4,T.x-Math.floor(T.x)},k.exports=T}),(function(k,gt,A){var T=A(5);function l(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(n){this.lworldExtX=n},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(n){this.lworldExtY=n},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},l.prototype.transformX=function(n){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/a),r},l.prototype.transformY=function(n){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/a),r},l.prototype.inverseTransformX=function(n){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/a),r},l.prototype.inverseTransformY=function(n){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/a),r},l.prototype.inverseTransformPoint=function(n){var r=new T(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},k.exports=l}),(function(k,gt,A){function T(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var l=A(15),n=A(4),r=A(0),a=A(8),u=A(9);function i(){l.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}i.prototype=Object.create(l.prototype);for(var y in l)i[y]=l[y];i.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,f,h,N,c,d=this.getGraphManager().getAllEdges(),m=0;m<d.length;m++)t=d[m],s=t.idealLength,t.isInterGraph&&(f=t.getSource(),h=t.getTarget(),N=t.getSourceInLca().getEstimatedSize(),c=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=N+c-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(f.getInclusionTreeDepth()+h.getInclusionTreeDepth()-2*o))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,f,h,N,c=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;o<c.length;o++)h=c[o],this.calculateRepulsionForceOfANode(h,d,t,s),d.add(h);else for(o=0;o<c.length;o++)for(h=c[o],f=o+1;f<c.length;f++)N=c[f],h.getOwner()==N.getOwner()&&this.calcRepulsionForce(h,N)},i.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},i.prototype.calcSpringForce=function(t,s){var o=t.getSource(),f=t.getTarget(),h,N,c,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&f.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;h=t.getLength(),h!=0&&(N=t.edgeElasticity*(h-s),c=N*(t.lengthX/h),d=N*(t.lengthY/h),o.springForceX+=c,o.springForceY+=d,f.springForceX-=c,f.springForceY-=d)},i.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),f=s.getRect(),h=new Array(2),N=new Array(4),c,d,m,G,L,U,J;if(o.intersects(f)){a.calcSeparationAmount(o,f,h,n.DEFAULT_EDGE_LENGTH/2),U=2*h[0],J=2*h[1];var V=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=V*U,t.repulsionForceY-=V*J,s.repulsionForceX+=V*U,s.repulsionForceY+=V*J}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(c=f.getCenterX()-o.getCenterX(),d=f.getCenterY()-o.getCenterY()):(a.getIntersection(o,f,N),c=N[2]-N[0],d=N[3]-N[1]),Math.abs(c)<n.MIN_REPULSION_DIST&&(c=u.sign(c)*n.MIN_REPULSION_DIST),Math.abs(d)<n.MIN_REPULSION_DIST&&(d=u.sign(d)*n.MIN_REPULSION_DIST),m=c*c+d*d,G=Math.sqrt(m),L=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/m,U=L*c/G,J=L*d/G,t.repulsionForceX-=U,t.repulsionForceY-=J,s.repulsionForceX+=U,s.repulsionForceY+=J},i.prototype.calcGravitationalForce=function(t){var s,o,f,h,N,c,d,m;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,f=(s.getTop()+s.getBottom())/2,h=t.getCenterX()-o,N=t.getCenterY()-f,c=Math.abs(h)+t.getWidth()/2,d=Math.abs(N)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(m=s.getEstimatedSize()*this.gravityRangeFactor,(c>m||d>m)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*N)):(m=s.getEstimatedSize()*this.compoundGravityRangeFactor,(c>m||d>m)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*N*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var f=new Array(s),h=0;h<s;h++)f[h]=new Array(o);for(var h=0;h<s;h++)for(var N=0;N<o;N++)f[h][N]=new Array;return f},i.prototype.addNodeToGrid=function(t,s,o){var f=0,h=0,N=0,c=0;f=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),N=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),c=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=f;d<=h;d++)for(var m=N;m<=c;m++)this.grid[d][m].push(t),t.setGridCoordinates(f,h,N,c)},i.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,s,o,f){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o||f){var h=new Set;t.surrounding=new Array;for(var N,c=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var m=t.startY-1;m<t.finishY+2;m++)if(!(d<0||m<0||d>=c.length||m>=c[0].length)){for(var G=0;G<c[d][m].length;G++)if(N=c[d][m][G],!(t.getOwner()!=N.getOwner()||t==N)&&!s.has(N)&&!h.has(N)){var L=Math.abs(t.getCenterX()-N.getCenterX())-(t.getWidth()/2+N.getWidth()/2),U=Math.abs(t.getCenterY()-N.getCenterY())-(t.getHeight()/2+N.getHeight()/2);L<=this.repulsionRange&&U<=this.repulsionRange&&h.add(N)}}t.surrounding=[].concat(T(h))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},i.prototype.calcRepulsionRange=function(){return 0},k.exports=i}),(function(k,gt,A){var T=A(1),l=A(4);function n(a,u,i){T.call(this,a,u,i),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(T.prototype);for(var r in T)n[r]=T[r];k.exports=n}),(function(k,gt,A){var T=A(3),l=A(4);function n(a,u,i,y){T.call(this,a,u,i,y),this.nodeRepulsion=l.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}n.prototype=Object.create(T.prototype);for(var r in T)n[r]=T[r];n.prototype.setGridCoordinates=function(a,u,i,y){this.startX=a,this.finishX=u,this.startY=i,this.finishY=y},k.exports=n}),(function(k,gt,A){function T(l,n){this.width=0,this.height=0,l!==null&&n!==null&&(this.height=n,this.width=l)}T.prototype.getWidth=function(){return this.width},T.prototype.setWidth=function(l){this.width=l},T.prototype.getHeight=function(){return this.height},T.prototype.setHeight=function(l){this.height=l},k.exports=T}),(function(k,gt,A){var T=A(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(n,r){var a=T.createID(n);this.contains(a)||(this.map[a]=r,this.keys.push(n))},l.prototype.contains=function(n){return T.createID(n),this.map[n]!=null},l.prototype.get=function(n){var r=T.createID(n);return this.map[r]},l.prototype.keySet=function(){return this.keys},k.exports=l}),(function(k,gt,A){var T=A(14);function l(){this.set={}}l.prototype.add=function(n){var r=T.createID(n);this.contains(r)||(this.set[r]=n)},l.prototype.remove=function(n){delete this.set[T.createID(n)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(n){return this.set[T.createID(n)]==n},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(n){for(var r=Object.keys(this.set),a=r.length,u=0;u<a;u++)n.push(this.set[r[u]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(n){for(var r=n.length,a=0;a<r;a++){var u=n[a];this.add(u)}},k.exports=l}),(function(k,gt,A){function T(){}T.multMat=function(l,n){for(var r=[],a=0;a<l.length;a++){r[a]=[];for(var u=0;u<n[0].length;u++){r[a][u]=0;for(var i=0;i<l[0].length;i++)r[a][u]+=l[a][i]*n[i][u]}}return r},T.transpose=function(l){for(var n=[],r=0;r<l[0].length;r++){n[r]=[];for(var a=0;a<l.length;a++)n[r][a]=l[a][r]}return n},T.multCons=function(l,n){for(var r=[],a=0;a<l.length;a++)r[a]=l[a]*n;return r},T.minusOp=function(l,n){for(var r=[],a=0;a<l.length;a++)r[a]=l[a]-n[a];return r},T.dotProduct=function(l,n){for(var r=0,a=0;a<l.length;a++)r+=l[a]*n[a];return r},T.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},T.normalize=function(l){for(var n=[],r=this.mag(l),a=0;a<l.length;a++)n[a]=l[a]/r;return n},T.multGamma=function(l){for(var n=[],r=0,a=0;a<l.length;a++)r+=l[a];r*=-1/l.length;for(var u=0;u<l.length;u++)n[u]=r+l[u];return n},T.multL=function(l,n,r){for(var a=[],u=[],i=[],y=0;y<n[0].length;y++){for(var t=0,s=0;s<n.length;s++)t+=-.5*n[s][y]*l[s];u[y]=t}for(var o=0;o<r.length;o++){for(var f=0,h=0;h<r.length;h++)f+=r[o][h]*u[h];i[o]=f}for(var N=0;N<n.length;N++){for(var c=0,d=0;d<n[0].length;d++)c+=n[N][d]*i[d];a[N]=c}return a},k.exports=T}),(function(k,gt,A){var T=(function(){function a(u,i){for(var y=0;y<i.length;y++){var t=i[y];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(u,t.key,t)}}return function(u,i,y){return i&&a(u.prototype,i),y&&a(u,y),u}})();function l(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}var n=A(11),r=(function(){function a(u,i){l(this,a),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var y=void 0;u instanceof n?y=u.size():y=u.length,this._quicksort(u,0,y-1)}return T(a,[{key:"_quicksort",value:function(i,y,t){if(y<t){var s=this._partition(i,y,t);this._quicksort(i,y,s),this._quicksort(i,s+1,t)}}},{key:"_partition",value:function(i,y,t){for(var s=this._get(i,y),o=y,f=t;;){for(;this.compareFunction(s,this._get(i,f));)f--;for(;this.compareFunction(this._get(i,o),s);)o++;if(o<f)this._swap(i,o,f),o++,f--;else return f}}},{key:"_get",value:function(i,y){return i instanceof n?i.get_object_at(y):i[y]}},{key:"_set",value:function(i,y,t){i instanceof n?i.set_object_at(y,t):i[y]=t}},{key:"_swap",value:function(i,y,t){var s=this._get(i,y);this._set(i,y,this._get(i,t)),this._set(i,t,s)}},{key:"_defaultCompareFunction",value:function(i,y){return y>i}}]),a})();k.exports=r}),(function(k,gt,A){function T(){}T.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var n=Math.min(this.m,this.n);this.s=(function(Et){for(var Nt=[];Et-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Et){var Nt=function Xt(xt){if(xt.length==0)return 0;for(var Ht=[],Rt=0;Rt<xt[0];Rt++)Ht.push(Xt(xt.slice(1)));return Ht};return Nt(Et)})([this.m,n]),this.V=(function(Et){var Nt=function Xt(xt){if(xt.length==0)return 0;for(var Ht=[],Rt=0;Rt<xt[0];Rt++)Ht.push(Xt(xt.slice(1)));return Ht};return Nt(Et)})([this.n,this.n]);for(var r=(function(Et){for(var Nt=[];Et-- >0;)Nt.push(0);return Nt})(this.n),a=(function(Et){for(var Nt=[];Et-- >0;)Nt.push(0);return Nt})(this.m),u=!0,i=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,y);t++){if(t<i){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=T.hypot(this.s[t],l[s][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)l[o][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var f=t+1;f<this.n;f++){if((function(Et,Nt){return Et&&Nt})(t<i,this.s[t]!==0)){for(var h=0,N=t;N<this.m;N++)h+=l[N][t]*l[N][f];h=-h/l[t][t];for(var c=t;c<this.m;c++)l[c][f]+=h*l[c][t]}r[f]=l[t][f]}if((function(Et,Nt){return Nt})(u,t<i))for(var d=t;d<this.m;d++)this.U[d][t]=l[d][t];if(t<y){r[t]=0;for(var m=t+1;m<this.n;m++)r[t]=T.hypot(r[t],r[m]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var G=t+1;G<this.n;G++)r[G]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Et,Nt){return Et&&Nt})(t+1<this.m,r[t]!==0)){for(var L=t+1;L<this.m;L++)a[L]=0;for(var U=t+1;U<this.n;U++)for(var J=t+1;J<this.m;J++)a[J]+=r[U]*l[J][U];for(var V=t+1;V<this.n;V++)for(var j=-r[V]/r[t+1],D=t+1;D<this.m;D++)l[D][V]+=j*a[D]}for(var et=t+1;et<this.n;et++)this.V[et][t]=r[et]}}var e=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=l[i][i]),this.m<e&&(this.s[e-1]=0),y+1<e&&(r[y]=l[y][e-1]),r[e-1]=0;{for(var E=i;E<n;E++){for(var g=0;g<this.m;g++)this.U[g][E]=0;this.U[E][E]=1}for(var p=i-1;p>=0;p--)if(this.s[p]!==0){for(var v=p+1;v<n;v++){for(var w=0,C=p;C<this.m;C++)w+=this.U[C][p]*this.U[C][v];w=-w/this.U[p][p];for(var R=p;R<this.m;R++)this.U[R][v]+=w*this.U[R][p]}for(var P=p;P<this.m;P++)this.U[P][p]=-this.U[P][p];this.U[p][p]=1+this.U[p][p];for(var O=0;O<p-1;O++)this.U[O][p]=0}else{for(var z=0;z<this.m;z++)this.U[z][p]=0;this.U[p][p]=1}}for(var b=this.n-1;b>=0;b--){if((function(Et,Nt){return Et&&Nt})(b<y,r[b]!==0))for(var F=b+1;F<n;F++){for(var $=0,Y=b+1;Y<this.n;Y++)$+=this.V[Y][b]*this.V[Y][F];$=-$/this.V[b+1][b];for(var M=b+1;M<this.n;M++)this.V[M][F]+=$*this.V[M][b]}for(var S=0;S<this.n;S++)this.V[S][b]=0;this.V[b][b]=1}for(var H=e-1,q=Math.pow(2,-52),nt=Math.pow(2,-966);e>0;){var B=void 0,Dt=void 0;for(B=e-2;B>=-1&&B!==-1;B--)if(Math.abs(r[B])<=nt+q*(Math.abs(this.s[B])+Math.abs(this.s[B+1]))){r[B]=0;break}if(B===e-2)Dt=4;else{var yt=void 0;for(yt=e-1;yt>=B&&yt!==B;yt--){var ut=(yt!==e?Math.abs(r[yt]):0)+(yt!==B+1?Math.abs(r[yt-1]):0);if(Math.abs(this.s[yt])<=nt+q*ut){this.s[yt]=0;break}}yt===B?Dt=3:yt===e-1?Dt=1:(Dt=2,B=yt)}switch(B++,Dt){case 1:{var _=r[e-2];r[e-2]=0;for(var lt=e-2;lt>=B;lt--){var pt=T.hypot(this.s[lt],_),mt=this.s[lt]/pt,Mt=_/pt;this.s[lt]=pt,lt!==B&&(_=-Mt*r[lt-1],r[lt-1]=mt*r[lt-1]);for(var dt=0;dt<this.n;dt++)pt=mt*this.V[dt][lt]+Mt*this.V[dt][e-1],this.V[dt][e-1]=-Mt*this.V[dt][lt]+mt*this.V[dt][e-1],this.V[dt][lt]=pt}}break;case 2:{var At=r[B-1];r[B-1]=0;for(var wt=B;wt<e;wt++){var bt=T.hypot(this.s[wt],At),Gt=this.s[wt]/bt,Ft=At/bt;this.s[wt]=bt,At=-Ft*r[wt],r[wt]=Gt*r[wt];for(var It=0;It<this.m;It++)bt=Gt*this.U[It][wt]+Ft*this.U[It][B-1],this.U[It][B-1]=-Ft*this.U[It][wt]+Gt*this.U[It][B-1],this.U[It][wt]=bt}}break;case 3:{var Pt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[e-1]),Math.abs(this.s[e-2])),Math.abs(r[e-2])),Math.abs(this.s[B])),Math.abs(r[B])),Yt=this.s[e-1]/Pt,I=this.s[e-2]/Pt,x=r[e-2]/Pt,X=this.s[B]/Pt,Z=r[B]/Pt,W=((I+Yt)*(I-Yt)+x*x)/2,tt=Yt*x*(Yt*x),ht=0;(function(Et,Nt){return Et||Nt})(W!==0,tt!==0)&&(ht=Math.sqrt(W*W+tt),W<0&&(ht=-ht),ht=tt/(W+ht));for(var rt=(X+Yt)*(X-Yt)+ht,K=X*Z,Q=B;Q<e-1;Q++){var ft=T.hypot(rt,K),Lt=rt/ft,vt=K/ft;Q!==B&&(r[Q-1]=ft),rt=Lt*this.s[Q]+vt*r[Q],r[Q]=Lt*r[Q]-vt*this.s[Q],K=vt*this.s[Q+1],this.s[Q+1]=Lt*this.s[Q+1];for(var Ot=0;Ot<this.n;Ot++)ft=Lt*this.V[Ot][Q]+vt*this.V[Ot][Q+1],this.V[Ot][Q+1]=-vt*this.V[Ot][Q]+Lt*this.V[Ot][Q+1],this.V[Ot][Q]=ft;if(ft=T.hypot(rt,K),Lt=rt/ft,vt=K/ft,this.s[Q]=ft,rt=Lt*r[Q]+vt*this.s[Q+1],this.s[Q+1]=-vt*r[Q]+Lt*this.s[Q+1],K=vt*r[Q+1],r[Q+1]=Lt*r[Q+1],Q<this.m-1)for(var ot=0;ot<this.m;ot++)ft=Lt*this.U[ot][Q]+vt*this.U[ot][Q+1],this.U[ot][Q+1]=-vt*this.U[ot][Q]+Lt*this.U[ot][Q+1],this.U[ot][Q]=ft}r[e-2]=rt}break;case 4:{if(this.s[B]<=0){this.s[B]=this.s[B]<0?-this.s[B]:0;for(var it=0;it<=H;it++)this.V[it][B]=-this.V[it][B]}for(;B<H&&!(this.s[B]>=this.s[B+1]);){var Tt=this.s[B];if(this.s[B]=this.s[B+1],this.s[B+1]=Tt,B<this.n-1)for(var st=0;st<this.n;st++)Tt=this.V[st][B+1],this.V[st][B+1]=this.V[st][B],this.V[st][B]=Tt;if(B<this.m-1)for(var at=0;at<this.m;at++)Tt=this.U[at][B+1],this.U[at][B+1]=this.U[at][B],this.U[at][B]=Tt;B++}e--}break}}var Ut={U:this.U,V:this.V,S:this.s};return Ut},T.hypot=function(l,n){var r=void 0;return Math.abs(l)>Math.abs(n)?(r=n/l,r=Math.abs(l)*Math.sqrt(1+r*r)):n!=0?(r=l/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},k.exports=T}),(function(k,gt,A){var T=(function(){function r(a,u){for(var i=0;i<u.length;i++){var y=u[i];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}return function(a,u,i){return u&&r(a.prototype,u),i&&r(a,i),a}})();function l(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(a,u){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=a,this.sequence2=u,this.match_score=i,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var f=0;f<this.iMax;f++){this.tracebackGrid[f]=new Array(this.jMax);for(var h=0;h<this.jMax;h++)this.tracebackGrid[f][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return T(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var y=1;y<this.iMax;y++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[y-1]===this.sequence2[t-1]?s=this.grid[y-1][t-1]+this.match_score:s=this.grid[y-1][t-1]+this.mismatch_penalty;var o=this.grid[y-1][t]+this.gap_penalty,f=this.grid[y][t-1]+this.gap_penalty,h=[s,o,f],N=this.arrayAllMaxIndexes(h);this.grid[y][t]=h[N[0]],this.tracebackGrid[y][t]=[N.includes(0),N.includes(1),N.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var u=[];for(u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});u[0];){var i=u[0],y=this.tracebackGrid[i.pos[0]][i.pos[1]];y[0]&&u.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),y[1]&&u.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),y[2]&&u.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),u.shift()}return this.alignments}},{key:"getAllIndexes",value:function(u,i){for(var y=[],t=-1;(t=u.indexOf(i,t+1))!==-1;)y.push(t);return y}},{key:"arrayAllMaxIndexes",value:function(u){return this.getAllIndexes(u,Math.max.apply(null,u))}}]),r})();k.exports=n}),(function(k,gt,A){var T=function(){};T.FDLayout=A(18),T.FDLayoutConstants=A(4),T.FDLayoutEdge=A(19),T.FDLayoutNode=A(20),T.DimensionD=A(21),T.HashMap=A(22),T.HashSet=A(23),T.IGeometry=A(8),T.IMath=A(9),T.Integer=A(10),T.Point=A(12),T.PointD=A(5),T.RandomSeed=A(16),T.RectangleD=A(13),T.Transform=A(17),T.UniqueIDGeneretor=A(14),T.Quicksort=A(25),T.LinkedList=A(11),T.LGraphObject=A(2),T.LGraph=A(6),T.LEdge=A(1),T.LGraphManager=A(7),T.LNode=A(3),T.Layout=A(15),T.LayoutConstants=A(0),T.NeedlemanWunsch=A(27),T.Matrix=A(24),T.SVD=A(26),k.exports=T}),(function(k,gt,A){function T(){this.listeners=[]}var l=T.prototype;l.addListener=function(n,r){this.listeners.push({event:n,callback:r})},l.removeListener=function(n,r){for(var a=this.listeners.length;a>=0;a--){var u=this.listeners[a];u.event===n&&u.callback===r&&this.listeners.splice(a,1)}},l.emit=function(n,r){for(var a=0;a<this.listeners.length;a++){var u=this.listeners[a];n===u.event&&u.callback(r)}},k.exports=T})])})})(ee)),ee.exports}var Ne=te.exports,ce;function me(){return ce||(ce=1,(function(kt,se){(function(gt,A){kt.exports=A(Te())})(Ne,function(k){return(()=>{var gt={45:((n,r,a)=>{var u={};u.layoutBase=a(551),u.CoSEConstants=a(806),u.CoSEEdge=a(767),u.CoSEGraph=a(880),u.CoSEGraphManager=a(578),u.CoSELayout=a(765),u.CoSENode=a(991),u.ConstraintHandler=a(902),n.exports=u}),806:((n,r,a)=>{var u=a(551).FDLayoutConstants;function i(){}for(var y in u)i[y]=u[y];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=u.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,n.exports=i}),767:((n,r,a)=>{var u=a(551).FDLayoutEdge;function i(t,s,o){u.call(this,t,s,o)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i}),880:((n,r,a)=>{var u=a(551).LGraph;function i(t,s,o){u.call(this,t,s,o)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i}),578:((n,r,a)=>{var u=a(551).LGraphManager;function i(t){u.call(this,t)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i}),765:((n,r,a)=>{var u=a(551).FDLayout,i=a(578),y=a(880),t=a(991),s=a(767),o=a(806),f=a(902),h=a(551).FDLayoutConstants,N=a(551).LayoutConstants,c=a(551).Point,d=a(551).PointD,m=a(551).DimensionD,G=a(551).Layout,L=a(551).Integer,U=a(551).IGeometry,J=a(551).LGraph,V=a(551).Transform,j=a(551).LinkedList;function D(){u.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(u.prototype);for(var et in u)D[et]=u[et];D.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},D.prototype.newGraph=function(e){return new y(null,this.graphManager,e)},D.prototype.newNode=function(e){return new t(this.graphManager,e)},D.prototype.newEdge=function(e){return new s(null,null,e)},D.prototype.initParameters=function(){u.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.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)},D.prototype.initSpringEmbedder=function(){u.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var e=N.DEFAULT_CREATE_BENDS_AS_NEEDED;return e&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(w){return E.has(w)});this.graphManager.setAllNodesToApplyGravitation(g)}}else{var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(p){return E.has(p)});this.graphManager.setAllNodesToApplyGravitation(g),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(f.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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 e=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(v){return e.has(v)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.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()),o.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 g=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(g,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),E={},g=0;g<e.length;g++){var p=e[g].rect,v=e[g].id;E[v]={id:v,x:p.getCenterX(),y:p.getCenterY(),w:p.width,h:p.height}}return E},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var e=this.getAllNodes(),E,g=0;g<e.length;g++)E=e[g],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var g=0;g<e.length;g++)E=e[g],E.move()},D.prototype.initConstraintVariables=function(){var e=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),g=0;g<E.length;g++){var p=E[g];this.idToNodeMap.set(p.id,p)}var v=function M(S){for(var H=S.getChild().getNodes(),q,nt=0,B=0;B<H.length;B++)q=H[B],q.getChild()==null?e.fixedNodeSet.has(q.id)&&(nt+=100):nt+=M(q);return nt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(H){e.fixedNodeSet.add(H.nodeId)});for(var E=this.graphManager.getAllNodes(),p,g=0;g<E.length;g++)if(p=E[g],p.getChild()!=null){var w=v(p);w>0&&(p.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var C=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){e.fixedNodesOnHorizontal.add(M),e.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var P=this.constraints.alignmentConstraint.vertical,g=0;g<P.length;g++)this.dummyToNodeForVerticalAlignment.set("dummy"+g,[]),P[g].forEach(function(S){C.set(S,"dummy"+g),e.dummyToNodeForVerticalAlignment.get("dummy"+g).push(S),e.fixedNodeSet.has(S)&&e.fixedNodesOnHorizontal.add("dummy"+g)});if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,g=0;g<O.length;g++)this.dummyToNodeForHorizontalAlignment.set("dummy"+g,[]),O[g].forEach(function(S){R.set(S,"dummy"+g),e.dummyToNodeForHorizontalAlignment.get("dummy"+g).push(S),e.fixedNodeSet.has(S)&&e.fixedNodesOnVertical.add("dummy"+g)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(M){var S,H,q;for(q=M.length-1;q>=2*M.length/3;q--)S=Math.floor(Math.random()*(q+1)),H=M[q],M[q]=M[S],M[S]=H;return M},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(M){if(M.left){var S=C.has(M.left)?C.get(M.left):M.left,H=C.has(M.right)?C.get(M.right):M.right;e.nodesInRelativeHorizontal.includes(S)||(e.nodesInRelativeHorizontal.push(S),e.nodeToRelativeConstraintMapHorizontal.set(S,[]),e.dummyToNodeForVerticalAlignment.has(S)?e.nodeToTempPositionMapHorizontal.set(S,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(S)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(S,e.idToNodeMap.get(S).getCenterX())),e.nodesInRelativeHorizontal.includes(H)||(e.nodesInRelativeHorizontal.push(H),e.nodeToRelativeConstraintMapHorizontal.set(H,[]),e.dummyToNodeForVerticalAlignment.has(H)?e.nodeToTempPositionMapHorizontal.set(H,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(H,e.idToNodeMap.get(H).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(S).push({right:H,gap:M.gap}),e.nodeToRelativeConstraintMapHorizontal.get(H).push({left:S,gap:M.gap})}else{var q=R.has(M.top)?R.get(M.top):M.top,nt=R.has(M.bottom)?R.get(M.bottom):M.bottom;e.nodesInRelativeVertical.includes(q)||(e.nodesInRelativeVertical.push(q),e.nodeToRelativeConstraintMapVertical.set(q,[]),e.dummyToNodeForHorizontalAlignment.has(q)?e.nodeToTempPositionMapVertical.set(q,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(q)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(q,e.idToNodeMap.get(q).getCenterY())),e.nodesInRelativeVertical.includes(nt)||(e.nodesInRelativeVertical.push(nt),e.nodeToRelativeConstraintMapVertical.set(nt,[]),e.dummyToNodeForHorizontalAlignment.has(nt)?e.nodeToTempPositionMapVertical.set(nt,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(nt)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(nt,e.idToNodeMap.get(nt).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(q).push({bottom:nt,gap:M.gap}),e.nodeToRelativeConstraintMapVertical.get(nt).push({top:q,gap:M.gap})}});else{var z=new Map,b=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var S=C.has(M.left)?C.get(M.left):M.left,H=C.has(M.right)?C.get(M.right):M.right;z.has(S)?z.get(S).push(H):z.set(S,[H]),z.has(H)?z.get(H).push(S):z.set(H,[S])}else{var q=R.has(M.top)?R.get(M.top):M.top,nt=R.has(M.bottom)?R.get(M.bottom):M.bottom;b.has(q)?b.get(q).push(nt):b.set(q,[nt]),b.has(nt)?b.get(nt).push(q):b.set(nt,[q])}});var F=function(S,H){var q=[],nt=[],B=new j,Dt=new Set,yt=0;return S.forEach(function(ut,_){if(!Dt.has(_)){q[yt]=[],nt[yt]=!1;var lt=_;for(B.push(lt),Dt.add(lt),q[yt].push(lt);B.length!=0;){lt=B.shift(),H.has(lt)&&(nt[yt]=!0);var pt=S.get(lt);pt.forEach(function(mt){Dt.has(mt)||(B.push(mt),Dt.add(mt),q[yt].push(mt))})}yt++}}),{components:q,isFixed:nt}},$=F(z,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=$.components,this.fixedComponentsOnHorizontal=$.isFixed;var Y=F(b,e.fixedNodesOnVertical);this.componentsOnVertical=Y.components,this.fixedComponentsOnVertical=Y.isFixed}}},D.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(Y){var M=e.idToNodeMap.get(Y.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,g=0;g<E.length;g++){for(var p=0,v=0;v<E[g].length;v++){if(this.fixedNodeSet.has(E[g][v])){p=0;break}p+=this.idToNodeMap.get(E[g][v]).displacementX}for(var w=p/E[g].length,v=0;v<E[g].length;v++)this.idToNodeMap.get(E[g][v]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal)for(var C=this.constraints.alignmentConstraint.horizontal,g=0;g<C.length;g++){for(var R=0,v=0;v<C[g].length;v++){if(this.fixedNodeSet.has(C[g][v])){R=0;break}R+=this.idToNodeMap.get(C[g][v]).displacementY}for(var P=R/C[g].length,v=0;v<C[g].length;v++)this.idToNodeMap.get(C[g][v]).displacementY=P}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(Y){if(!e.fixedNodesOnHorizontal.has(Y)){var M=0;e.dummyToNodeForVerticalAlignment.has(Y)?M=e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(Y)[0]).displacementX:M=e.idToNodeMap.get(Y).displacementX,e.nodeToRelativeConstraintMapHorizontal.get(Y).forEach(function(S){if(S.right){var H=e.nodeToTempPositionMapHorizontal.get(S.right)-e.nodeToTempPositionMapHorizontal.get(Y)-M;H<S.gap&&(M-=S.gap-H)}else{var H=e.nodeToTempPositionMapHorizontal.get(Y)-e.nodeToTempPositionMapHorizontal.get(S.left)+M;H<S.gap&&(M+=S.gap-H)}}),e.nodeToTempPositionMapHorizontal.set(Y,e.nodeToTempPositionMapHorizontal.get(Y)+M),e.dummyToNodeForVerticalAlignment.has(Y)?e.dummyToNodeForVerticalAlignment.get(Y).forEach(function(S){e.idToNodeMap.get(S).displacementX=M}):e.idToNodeMap.get(Y).displacementX=M}}),this.nodesInRelativeVertical.forEach(function(Y){if(!e.fixedNodesOnHorizontal.has(Y)){var M=0;e.dummyToNodeForHorizontalAlignment.has(Y)?M=e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(Y)[0]).displacementY:M=e.idToNodeMap.get(Y).displacementY,e.nodeToRelativeConstraintMapVertical.get(Y).forEach(function(S){if(S.bottom){var H=e.nodeToTempPositionMapVertical.get(S.bottom)-e.nodeToTempPositionMapVertical.get(Y)-M;H<S.gap&&(M-=S.gap-H)}else{var H=e.nodeToTempPositionMapVertical.get(Y)-e.nodeToTempPositionMapVertical.get(S.top)+M;H<S.gap&&(M+=S.gap-H)}}),e.nodeToTempPositionMapVertical.set(Y,e.nodeToTempPositionMapVertical.get(Y)+M),e.dummyToNodeForHorizontalAlignment.has(Y)?e.dummyToNodeForHorizontalAlignment.get(Y).forEach(function(S){e.idToNodeMap.get(S).displacementY=M}):e.idToNodeMap.get(Y).displacementY=M}});else{for(var g=0;g<this.componentsOnHorizontal.length;g++){var O=this.componentsOnHorizontal[g];if(this.fixedComponentsOnHorizontal[g])for(var v=0;v<O.length;v++)this.dummyToNodeForVerticalAlignment.has(O[v])?this.dummyToNodeForVerticalAlignment.get(O[v]).forEach(function(S){e.idToNodeMap.get(S).displacementX=0}):this.idToNodeMap.get(O[v]).displacementX=0;else{for(var z=0,b=0,v=0;v<O.length;v++)if(this.dummyToNodeForVerticalAlignment.has(O[v])){var F=this.dummyToNodeForVerticalAlignment.get(O[v]);z+=F.length*this.idToNodeMap.get(F[0]).displacementX,b+=F.length}else z+=this.idToNodeMap.get(O[v]).displacementX,b++;for(var $=z/b,v=0;v<O.length;v++)this.dummyToNodeForVerticalAlignment.has(O[v])?this.dummyToNodeForVerticalAlignment.get(O[v]).forEach(function(S){e.idToNodeMap.get(S).displacementX=$}):this.idToNodeMap.get(O[v]).displacementX=$}}for(var g=0;g<this.componentsOnVertical.length;g++){var O=this.componentsOnVertical[g];if(this.fixedComponentsOnVertical[g])for(var v=0;v<O.length;v++)this.dummyToNodeForHorizontalAlignment.has(O[v])?this.dummyToNodeForHorizontalAlignment.get(O[v]).forEach(function(H){e.idToNodeMap.get(H).displacementY=0}):this.idToNodeMap.get(O[v]).displacementY=0;else{for(var z=0,b=0,v=0;v<O.length;v++)if(this.dummyToNodeForHorizontalAlignment.has(O[v])){var F=this.dummyToNodeForHorizontalAlignment.get(O[v]);z+=F.length*this.idToNodeMap.get(F[0]).displacementY,b+=F.length}else z+=this.idToNodeMap.get(O[v]).displacementY,b++;for(var $=z/b,v=0;v<O.length;v++)this.dummyToNodeForHorizontalAlignment.has(O[v])?this.dummyToNodeForHorizontalAlignment.get(O[v]).forEach(function(B){e.idToNodeMap.get(B).displacementY=$}):this.idToNodeMap.get(O[v]).displacementY=$}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],E,g=this.graphManager.getGraphs(),p=g.length,v;for(v=0;v<p;v++)E=g[v],E.updateConnected(),E.isConnected||(e=e.concat(E.getNodes()));return e},D.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var E=new Set,g;for(g=0;g<e.length;g++){var p=e[g];if(!E.has(p)){var v=p.getSource(),w=p.getTarget();if(v==w)p.getBendpoints().push(new d),p.getBendpoints().push(new d),this.createDummyNodesForBendpoints(p),E.add(p);else{var C=[];if(C=C.concat(v.getEdgeListToNode(w)),C=C.concat(w.getEdgeListToNode(v)),!E.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var P=C[R];P.getBendpoints().push(new d),this.createDummyNodesForBendpoints(P)}}C.forEach(function(O){E.add(O)})}}}if(E.size==e.length)break}},D.prototype.positionNodesRadially=function(e){for(var E=new c(0,0),g=Math.ceil(Math.sqrt(e.length)),p=0,v=0,w=0,C=new d(0,0),R=0;R<e.length;R++){R%g==0&&(w=0,v=p,R!=0&&(v+=o.DEFAULT_COMPONENT_SEPERATION),p=0);var P=e[R],O=G.findCenterOfTree(P);E.x=w,E.y=v,C=D.radialLayout(P,O,E),C.y>p&&(p=Math.floor(C.y)),w=Math.floor(C.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(N.WORLD_CENTER_X-C.x/2,N.WORLD_CENTER_Y-C.y/2))},D.radialLayout=function(e,E,g){var p=Math.max(this.maxDiagonalInTree(e),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(E,null,0,359,0,p);var v=J.calculateBounds(e),w=new V;w.setDeviceOrgX(v.getMinX()),w.setDeviceOrgY(v.getMinY()),w.setWorldOrgX(g.x),w.setWorldOrgY(g.y);for(var C=0;C<e.length;C++){var R=e[C];R.transform(w)}var P=new d(v.getMaxX(),v.getMaxY());return w.inverseTransformPoint(P)},D.branchRadialLayout=function(e,E,g,p,v,w){var C=(p-g+1)/2;C<0&&(C+=180);var R=(C+g)%360,P=R*U.TWO_PI/360,O=v*Math.cos(P),z=v*Math.sin(P);e.setCenter(O,z);var b=[];b=b.concat(e.getEdges());var F=b.length;E!=null&&F--;for(var $=0,Y=b.length,M,S=e.getEdgesBetween(E);S.length>1;){var H=S[0];S.splice(0,1);var q=b.indexOf(H);q>=0&&b.splice(q,1),Y--,F--}E!=null?M=(b.indexOf(S[0])+1)%Y:M=0;for(var nt=Math.abs(p-g)/F,B=M;$!=F;B=++B%Y){var Dt=b[B].getOtherEnd(e);if(Dt!=E){var yt=(g+$*nt)%360,ut=(yt+nt)%360;D.branchRadialLayout(Dt,e,yt,ut,v+w,w),$++}}},D.maxDiagonalInTree=function(e){for(var E=L.MIN_VALUE,g=0;g<e.length;g++){var p=e[g],v=p.getDiagonal();v>E&&(E=v)}return E},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var e=this,E={};this.memberGroups={},this.idToDummyNode={};for(var g=[],p=this.graphManager.getAllNodes(),v=0;v<p.length;v++){var w=p[v],C=w.getParent();this.getNodeDegreeWithChildren(w)===0&&(C.id==null||!this.getToBeTiled(C))&&g.push(w)}for(var v=0;v<g.length;v++){var w=g[v],R=w.getParent().id;typeof E[R]>"u"&&(E[R]=[]),E[R]=E[R].concat(w)}Object.keys(E).forEach(function(P){if(E[P].length>1){var O="DummyCompound_"+P;e.memberGroups[O]=E[P];var z=E[P][0].getParent(),b=new t(e.graphManager);b.id=O,b.paddingLeft=z.paddingLeft||0,b.paddingRight=z.paddingRight||0,b.paddingBottom=z.paddingBottom||0,b.paddingTop=z.paddingTop||0,e.idToDummyNode[O]=b;var F=e.getGraphManager().add(e.newGraph(),b),$=z.getChild();$.add(b);for(var Y=0;Y<E[P].length;Y++){var M=E[P][Y];$.remove(M),F.add(M)}}})},D.prototype.clearCompounds=function(){var e={},E={};this.performDFSOnCompounds();for(var g=0;g<this.compoundOrder.length;g++)E[this.compoundOrder[g].id]=this.compoundOrder[g],e[this.compoundOrder[g].id]=[].concat(this.compoundOrder[g].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[g].getChild()),this.compoundOrder[g].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,E)},D.prototype.clearZeroDegreeMembers=function(){var e=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(g){var p=e.idToDummyNode[g];if(E[g]=e.tileNodes(e.memberGroups[g],p.paddingLeft+p.paddingRight),p.rect.width=E[g].width,p.rect.height=E[g].height,p.setCenter(E[g].centerX,E[g].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var v=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(v+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>v?(p.rect.x-=(p.labelWidth-v)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-v)/2):p.labelPosHorizontal=="right"&&p.setWidth(v+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var E=this.compoundOrder[e],g=E.id,p=E.paddingLeft,v=E.paddingTop,w=E.labelMarginLeft,C=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[g],E.rect.x,E.rect.y,p,v,w,C)}},D.prototype.repopulateZeroDegreeMembers=function(){var e=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(g){var p=e.idToDummyNode[g],v=p.paddingLeft,w=p.paddingTop,C=p.labelMarginLeft,R=p.labelMarginTop;e.adjustLocations(E[g],p.rect.x,p.rect.y,v,w,C,R)})},D.prototype.getToBeTiled=function(e){var E=e.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var g=e.getChild();if(g==null)return this.toBeTiled[E]=!1,!1;for(var p=g.getNodes(),v=0;v<p.length;v++){var w=p[v];if(this.getNodeDegree(w)>0)return this.toBeTiled[E]=!1,!1;if(w.getChild()==null){this.toBeTiled[w.id]=!1;continue}if(!this.getToBeTiled(w))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},D.prototype.getNodeDegree=function(e){e.id;for(var E=e.getEdges(),g=0,p=0;p<E.length;p++){var v=E[p];v.getSource().id!==v.getTarget().id&&(g=g+1)}return g},D.prototype.getNodeDegreeWithChildren=function(e){var E=this.getNodeDegree(e);if(e.getChild()==null)return E;for(var g=e.getChild().getNodes(),p=0;p<g.length;p++){var v=g[p];E+=this.getNodeDegreeWithChildren(v)}return E},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(e){for(var E=0;E<e.length;E++){var g=e[E];g.getChild()!=null&&this.fillCompexOrderByDFS(g.getChild().getNodes()),this.getToBeTiled(g)&&this.compoundOrder.push(g)}},D.prototype.adjustLocations=function(e,E,g,p,v,w,C){E+=p+w,g+=v+C;for(var R=E,P=0;P<e.rows.length;P++){var O=e.rows[P];E=R;for(var z=0,b=0;b<O.length;b++){var F=O[b];F.rect.x=E,F.rect.y=g,E+=F.rect.width+e.horizontalPadding,F.rect.height>z&&(z=F.rect.height)}g+=z+e.verticalPadding}},D.prototype.tileCompoundMembers=function(e,E){var g=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(p){var v=E[p];if(g.tiledMemberPack[p]=g.tileNodes(e[p],v.paddingLeft+v.paddingRight),v.rect.width=g.tiledMemberPack[p].width,v.rect.height=g.tiledMemberPack[p].height,v.setCenter(g.tiledMemberPack[p].centerX,g.tiledMemberPack[p].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var w=v.rect.width,C=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(w+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>w?(v.rect.x-=(v.labelWidth-w)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-w)/2):v.labelPosHorizontal=="right"&&v.setWidth(w+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(C+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>C?(v.rect.y-=(v.labelHeight-C)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-C)/2):v.labelPosVertical=="bottom"&&v.setHeight(C+v.labelHeight))}})},D.prototype.tileNodes=function(e,E){var g=this.tileNodesByFavoringDim(e,E,!0),p=this.tileNodesByFavoringDim(e,E,!1),v=this.getOrgRatio(g),w=this.getOrgRatio(p),C;return w<v?C=p:C=g,C},D.prototype.getOrgRatio=function(e){var E=e.width,g=e.height,p=E/g;return p<1&&(p=1/p),p},D.prototype.calcIdealRowWidth=function(e,E){var g=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,v=e.length,w=0,C=0,R=0;e.forEach(function(Y){w+=Y.getWidth(),C+=Y.getHeight(),Y.getWidth()>R&&(R=Y.getWidth())});var P=w/v,O=C/v,z=Math.pow(g-p,2)+4*(P+p)*(O+g)*v,b=(p-g+Math.sqrt(z))/(2*(P+p)),F;E?(F=Math.ceil(b),F==b&&F++):F=Math.floor(b);var $=F*(P+p)-p;return R>$&&($=R),$+=p*2,$},D.prototype.tileNodesByFavoringDim=function(e,E,g){var p=o.TILING_PADDING_VERTICAL,v=o.TILING_PADDING_HORIZONTAL,w=o.TILING_COMPARE_BY,C={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:p,horizontalPadding:v,centerX:0,centerY:0};w&&(C.idealRowWidth=this.calcIdealRowWidth(e,g));var R=function(M){return M.rect.width*M.rect.height},P=function(M,S){return R(S)-R(M)};e.sort(function(Y,M){var S=P;return C.idealRowWidth?(S=w,S(Y.id,M.id)):S(Y,M)});for(var O=0,z=0,b=0;b<e.length;b++){var F=e[b];O+=F.getCenterX(),z+=F.getCenterY()}C.centerX=O/e.length,C.centerY=z/e.length;for(var b=0;b<e.length;b++){var F=e[b];if(C.rows.length==0)this.insertNodeToRow(C,F,0,E);else if(this.canAddHorizontal(C,F.rect.width,F.rect.height)){var $=C.rows.length-1;C.idealRowWidth||($=this.getShortestRowIndex(C)),this.insertNodeToRow(C,F,$,E)}else this.insertNodeToRow(C,F,C.rows.length,E);this.shiftToLastRow(C)}return C},D.prototype.insertNodeToRow=function(e,E,g,p){var v=p;if(g==e.rows.length){var w=[];e.rows.push(w),e.rowWidth.push(v),e.rowHeight.push(0)}var C=e.rowWidth[g]+E.rect.width;e.rows[g].length>0&&(C+=e.horizontalPadding),e.rowWidth[g]=C,e.width<C&&(e.width=C);var R=E.rect.height;g>0&&(R+=e.verticalPadding);var P=0;R>e.rowHeight[g]&&(P=e.rowHeight[g],e.rowHeight[g]=R,P=e.rowHeight[g]-P),e.height+=P,e.rows[g].push(E)},D.prototype.getShortestRowIndex=function(e){for(var E=-1,g=Number.MAX_VALUE,p=0;p<e.rows.length;p++)e.rowWidth[p]<g&&(E=p,g=e.rowWidth[p]);return E},D.prototype.getLongestRowIndex=function(e){for(var E=-1,g=Number.MIN_VALUE,p=0;p<e.rows.length;p++)e.rowWidth[p]>g&&(E=p,g=e.rowWidth[p]);return E},D.prototype.canAddHorizontal=function(e,E,g){if(e.idealRowWidth){var p=e.rows.length-1,v=e.rowWidth[p];return v+E+e.horizontalPadding<=e.idealRowWidth}var w=this.getShortestRowIndex(e);if(w<0)return!0;var C=e.rowWidth[w];if(C+e.horizontalPadding+E<=e.width)return!0;var R=0;e.rowHeight[w]<g&&w>0&&(R=g+e.verticalPadding-e.rowHeight[w]);var P;e.width-C>=E+e.horizontalPadding?P=(e.height+R)/(C+E+e.horizontalPadding):P=(e.height+R)/e.width,R=g+e.verticalPadding;var O;return e.width<E?O=(e.height+R)/E:O=(e.height+R)/e.width,O<1&&(O=1/O),P<1&&(P=1/P),P<O},D.prototype.shiftToLastRow=function(e){var E=this.getLongestRowIndex(e),g=e.rowWidth.length-1,p=e.rows[E],v=p[p.length-1],w=v.width+e.horizontalPadding;if(e.width-e.rowWidth[g]>w&&E!=g){p.splice(-1,1),e.rows[g].push(v),e.rowWidth[E]=e.rowWidth[E]-w,e.rowWidth[g]=e.rowWidth[g]+w,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var C=Number.MIN_VALUE,R=0;R<p.length;R++)p[R].height>C&&(C=p[R].height);E>0&&(C+=e.verticalPadding);var P=e.rowHeight[E]+e.rowHeight[g];e.rowHeight[E]=C,e.rowHeight[g]<v.height+e.verticalPadding&&(e.rowHeight[g]=v.height+e.verticalPadding);var O=e.rowHeight[E]+e.rowHeight[g];e.height+=O-P,this.shiftToLastRow(e)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var e=[],E=!0,g;E;){var p=this.graphManager.getAllNodes(),v=[];E=!1;for(var w=0;w<p.length;w++)if(g=p[w],g.getEdges().length==1&&!g.getEdges()[0].isInterGraph&&g.getChild()==null){if(o.PURE_INCREMENTAL){var C=g.getEdges()[0].getOtherEnd(g),R=new m(g.getCenterX()-C.getCenterX(),g.getCenterY()-C.getCenterY());v.push([g,g.getEdges()[0],g.getOwner(),R])}else v.push([g,g.getEdges()[0],g.getOwner()]);E=!0}if(E==!0){for(var P=[],O=0;O<v.length;O++)v[O][0].getEdges().length==1&&(P.push(v[O]),v[O][0].getOwner().remove(v[O][0]));e.push(P),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},D.prototype.growTree=function(e){for(var E=e.length,g=e[E-1],p,v=0;v<g.length;v++)p=g[v],this.findPlaceforPrunedNode(p),p[2].add(p[0]),p[2].add(p[1],p[1].source,p[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(e){var E,g,p=e[0];if(p==e[1].source?g=e[1].target:g=e[1].source,o.PURE_INCREMENTAL)p.setCenter(g.getCenterX()+e[3].getWidth(),g.getCenterY()+e[3].getHeight());else{var v=g.startX,w=g.finishX,C=g.startY,R=g.finishY,P=0,O=0,z=0,b=0,F=[P,z,O,b];if(C>0)for(var $=v;$<=w;$++)F[0]+=this.grid[$][C-1].length+this.grid[$][C].length-1;if(w<this.grid.length-1)for(var $=C;$<=R;$++)F[1]+=this.grid[w+1][$].length+this.grid[w][$].length-1;if(R<this.grid[0].length-1)for(var $=v;$<=w;$++)F[2]+=this.grid[$][R+1].length+this.grid[$][R].length-1;if(v>0)for(var $=C;$<=R;$++)F[3]+=this.grid[v-1][$].length+this.grid[v][$].length-1;for(var Y=L.MAX_VALUE,M,S,H=0;H<F.length;H++)F[H]<Y?(Y=F[H],M=1,S=H):F[H]==Y&&M++;if(M==3&&Y==0)F[0]==0&&F[1]==0&&F[2]==0?E=1:F[0]==0&&F[1]==0&&F[3]==0?E=0:F[0]==0&&F[2]==0&&F[3]==0?E=3:F[1]==0&&F[2]==0&&F[3]==0&&(E=2);else if(M==2&&Y==0){var q=Math.floor(Math.random()*2);F[0]==0&&F[1]==0?q==0?E=0:E=1:F[0]==0&&F[2]==0?q==0?E=0:E=2:F[0]==0&&F[3]==0?q==0?E=0:E=3:F[1]==0&&F[2]==0?q==0?E=1:E=2:F[1]==0&&F[3]==0?q==0?E=1:E=3:q==0?E=2:E=3}else if(M==4&&Y==0){var q=Math.floor(Math.random()*4);E=q}else E=S;E==0?p.setCenter(g.getCenterX(),g.getCenterY()-g.getHeight()/2-h.DEFAULT_EDGE_LENGTH-p.getHeight()/2):E==1?p.setCenter(g.getCenterX()+g.getWidth()/2+h.DEFAULT_EDGE_LENGTH+p.getWidth()/2,g.getCenterY()):E==2?p.setCenter(g.getCenterX(),g.getCenterY()+g.getHeight()/2+h.DEFAULT_EDGE_LENGTH+p.getHeight()/2):p.setCenter(g.getCenterX()-g.getWidth()/2-h.DEFAULT_EDGE_LENGTH-p.getWidth()/2,g.getCenterY())}},n.exports=D}),991:((n,r,a)=>{var u=a(551).FDLayoutNode,i=a(551).IMath;function y(s,o,f,h){u.call(this,s,o,f,h)}y.prototype=Object.create(u.prototype);for(var t in u)y[t]=u[t];y.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(s,o){for(var f=this.getChild().getNodes(),h,N=0;N<f.length;N++)h=f[N],h.getChild()==null?(h.displacementX+=s,h.displacementY+=o):h.propogateDisplacementToChildren(s,o)},y.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.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},y.prototype.setPred1=function(s){this.pred1=s},y.prototype.getPred1=function(){return pred1},y.prototype.getPred2=function(){return pred2},y.prototype.setNext=function(s){this.next=s},y.prototype.getNext=function(){return next},y.prototype.setProcessed=function(s){this.processed=s},y.prototype.isProcessed=function(){return processed},n.exports=y}),902:((n,r,a)=>{function u(f){if(Array.isArray(f)){for(var h=0,N=Array(f.length);h<f.length;h++)N[h]=f[h];return N}else return Array.from(f)}var i=a(806),y=a(551).LinkedList,t=a(551).Matrix,s=a(551).SVD;function o(){}o.handleConstraints=function(f){var h={};h.fixedNodeConstraint=f.constraints.fixedNodeConstraint,h.alignmentConstraint=f.constraints.alignmentConstraint,h.relativePlacementConstraint=f.constraints.relativePlacementConstraint;for(var N=new Map,c=new Map,d=[],m=[],G=f.getAllNodes(),L=0,U=0;U<G.length;U++){var J=G[U];J.getChild()==null&&(c.set(J.id,L++),d.push(J.getCenterX()),m.push(J.getCenterY()),N.set(J.id,J))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(I){!I.gap&&I.gap!=0&&(I.left?I.gap=i.DEFAULT_EDGE_LENGTH+N.get(I.left).getWidth()/2+N.get(I.right).getWidth()/2:I.gap=i.DEFAULT_EDGE_LENGTH+N.get(I.top).getHeight()/2+N.get(I.bottom).getHeight()/2)});var V=function(x,X){return{x:x.x-X.x,y:x.y-X.y}},j=function(x){var X=0,Z=0;return x.forEach(function(W){X+=d[c.get(W)],Z+=m[c.get(W)]}),{x:X/x.size,y:Z/x.size}},D=function(x,X,Z,W,tt){function ht(ot,it){var Tt=new Set(ot),st=!0,at=!1,Ut=void 0;try{for(var Et=it[Symbol.iterator](),Nt;!(st=(Nt=Et.next()).done);st=!0){var Xt=Nt.value;Tt.add(Xt)}}catch(xt){at=!0,Ut=xt}finally{try{!st&&Et.return&&Et.return()}finally{if(at)throw Ut}}return Tt}var rt=new Map;x.forEach(function(ot,it){rt.set(it,0)}),x.forEach(function(ot,it){ot.forEach(function(Tt){rt.set(Tt.id,rt.get(Tt.id)+1)})});var K=new Map,Q=new Map,ft=new y;rt.forEach(function(ot,it){ot==0?(ft.push(it),Z||(X=="horizontal"?K.set(it,c.has(it)?d[c.get(it)]:W.get(it)):K.set(it,c.has(it)?m[c.get(it)]:W.get(it)))):K.set(it,Number.NEGATIVE_INFINITY),Z&&Q.set(it,new Set([it]))}),Z&&tt.forEach(function(ot){var it=[];if(ot.forEach(function(at){Z.has(at)&&it.push(at)}),it.length>0){var Tt=0;it.forEach(function(at){X=="horizontal"?(K.set(at,c.has(at)?d[c.get(at)]:W.get(at)),Tt+=K.get(at)):(K.set(at,c.has(at)?m[c.get(at)]:W.get(at)),Tt+=K.get(at))}),Tt=Tt/it.length,ot.forEach(function(at){Z.has(at)||K.set(at,Tt)})}else{var st=0;ot.forEach(function(at){X=="horizontal"?st+=c.has(at)?d[c.get(at)]:W.get(at):st+=c.has(at)?m[c.get(at)]:W.get(at)}),st=st/ot.length,ot.forEach(function(at){K.set(at,st)})}});for(var Lt=function(){var it=ft.shift(),Tt=x.get(it);Tt.forEach(function(st){if(K.get(st.id)<K.get(it)+st.gap)if(Z&&Z.has(st.id)){var at=void 0;if(X=="horizontal"?at=c.has(st.id)?d[c.get(st.id)]:W.get(st.id):at=c.has(st.id)?m[c.get(st.id)]:W.get(st.id),K.set(st.id,at),at<K.get(it)+st.gap){var Ut=K.get(it)+st.gap-at;Q.get(it).forEach(function(Et){K.set(Et,K.get(Et)-Ut)})}}else K.set(st.id,K.get(it)+st.gap);rt.set(st.id,rt.get(st.id)-1),rt.get(st.id)==0&&ft.push(st.id),Z&&Q.set(st.id,ht(Q.get(it),Q.get(st.id)))})};ft.length!=0;)Lt();if(Z){var vt=new Set;x.forEach(function(ot,it){ot.length==0&&vt.add(it)});var Ot=[];Q.forEach(function(ot,it){if(vt.has(it)){var Tt=!1,st=!0,at=!1,Ut=void 0;try{for(var Et=ot[Symbol.iterator](),Nt;!(st=(Nt=Et.next()).done);st=!0){var Xt=Nt.value;Z.has(Xt)&&(Tt=!0)}}catch(Rt){at=!0,Ut=Rt}finally{try{!st&&Et.return&&Et.return()}finally{if(at)throw Ut}}if(!Tt){var xt=!1,Ht=void 0;Ot.forEach(function(Rt,Vt){Rt.has([].concat(u(ot))[0])&&(xt=!0,Ht=Vt)}),xt?ot.forEach(function(Rt){Ot[Ht].add(Rt)}):Ot.push(new Set(ot))}}}),Ot.forEach(function(ot,it){var Tt=Number.POSITIVE_INFINITY,st=Number.POSITIVE_INFINITY,at=Number.NEGATIVE_INFINITY,Ut=Number.NEGATIVE_INFINITY,Et=!0,Nt=!1,Xt=void 0;try{for(var xt=ot[Symbol.iterator](),Ht;!(Et=(Ht=xt.next()).done);Et=!0){var Rt=Ht.value,Vt=void 0;X=="horizontal"?Vt=c.has(Rt)?d[c.get(Rt)]:W.get(Rt):Vt=c.has(Rt)?m[c.get(Rt)]:W.get(Rt);var Qt=K.get(Rt);Vt<Tt&&(Tt=Vt),Vt>at&&(at=Vt),Qt<st&&(st=Qt),Qt>Ut&&(Ut=Qt)}}catch(Jt){Nt=!0,Xt=Jt}finally{try{!Et&&xt.return&&xt.return()}finally{if(Nt)throw Xt}}var re=(Tt+at)/2-(st+Ut)/2,Bt=!0,qt=!1,Kt=void 0;try{for(var Zt=ot[Symbol.iterator](),jt;!(Bt=(jt=Zt.next()).done);Bt=!0){var $t=jt.value;K.set($t,K.get($t)+re)}}catch(Jt){qt=!0,Kt=Jt}finally{try{!Bt&&Zt.return&&Zt.return()}finally{if(qt)throw Kt}}})}return K},et=function(x){var X=0,Z=0,W=0,tt=0;if(x.forEach(function(Q){Q.left?d[c.get(Q.left)]-d[c.get(Q.right)]>=0?X++:Z++:m[c.get(Q.top)]-m[c.get(Q.bottom)]>=0?W++:tt++}),X>Z&&W>tt)for(var ht=0;ht<c.size;ht++)d[ht]=-1*d[ht],m[ht]=-1*m[ht];else if(X>Z)for(var rt=0;rt<c.size;rt++)d[rt]=-1*d[rt];else if(W>tt)for(var K=0;K<c.size;K++)m[K]=-1*m[K]},e=function(x){var X=[],Z=new y,W=new Set,tt=0;return x.forEach(function(ht,rt){if(!W.has(rt)){X[tt]=[];var K=rt;for(Z.push(K),W.add(K),X[tt].push(K);Z.length!=0;){K=Z.shift();var Q=x.get(K);Q.forEach(function(ft){W.has(ft.id)||(Z.push(ft.id),W.add(ft.id),X[tt].push(ft.id))})}tt++}}),X},E=function(x){var X=new Map;return x.forEach(function(Z,W){X.set(W,[])}),x.forEach(function(Z,W){Z.forEach(function(tt){X.get(W).push(tt),X.get(tt.id).push({id:W,gap:tt.gap,direction:tt.direction})})}),X},g=function(x){var X=new Map;return x.forEach(function(Z,W){X.set(W,[])}),x.forEach(function(Z,W){Z.forEach(function(tt){X.get(tt.id).push({id:W,gap:tt.gap,direction:tt.direction})})}),X},p=[],v=[],w=!1,C=!1,R=new Set,P=new Map,O=new Map,z=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(I){R.add(I.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(I){I.left?(P.has(I.left)?P.get(I.left).push({id:I.right,gap:I.gap,direction:"horizontal"}):P.set(I.left,[{id:I.right,gap:I.gap,direction:"horizontal"}]),P.has(I.right)||P.set(I.right,[])):(P.has(I.top)?P.get(I.top).push({id:I.bottom,gap:I.gap,direction:"vertical"}):P.set(I.top,[{id:I.bottom,gap:I.gap,direction:"vertical"}]),P.has(I.bottom)||P.set(I.bottom,[]))}),O=E(P),z=e(O)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(I,x){p[x]=[I.position.x,I.position.y],v[x]=[d[c.get(I.nodeId)],m[c.get(I.nodeId)]]}),w=!0;else if(h.alignmentConstraint)(function(){var I=0;if(h.alignmentConstraint.vertical){for(var x=h.alignmentConstraint.vertical,X=function(K){var Q=new Set;x[K].forEach(function(vt){Q.add(vt)});var ft=new Set([].concat(u(Q)).filter(function(vt){return R.has(vt)})),Lt=void 0;ft.size>0?Lt=d[c.get(ft.values().next().value)]:Lt=j(Q).x,x[K].forEach(function(vt){p[I]=[Lt,m[c.get(vt)]],v[I]=[d[c.get(vt)],m[c.get(vt)]],I++})},Z=0;Z<x.length;Z++)X(Z);w=!0}if(h.alignmentConstraint.horizontal){for(var W=h.alignmentConstraint.horizontal,tt=function(K){var Q=new Set;W[K].forEach(function(vt){Q.add(vt)});var ft=new Set([].concat(u(Q)).filter(function(vt){return R.has(vt)})),Lt=void 0;ft.size>0?Lt=d[c.get(ft.values().next().value)]:Lt=j(Q).y,W[K].forEach(function(vt){p[I]=[d[c.get(vt)],Lt],v[I]=[d[c.get(vt)],m[c.get(vt)]],I++})},ht=0;ht<W.length;ht++)tt(ht);w=!0}h.relativePlacementConstraint&&(C=!0)})();else if(h.relativePlacementConstraint){for(var b=0,F=0,$=0;$<z.length;$++)z[$].length>b&&(b=z[$].length,F=$);if(b<O.size/2)et(h.relativePlacementConstraint),w=!1,C=!1;else{var Y=new Map,M=new Map,S=[];z[F].forEach(function(I){P.get(I).forEach(function(x){x.direction=="horizontal"?(Y.has(I)?Y.get(I).push(x):Y.set(I,[x]),Y.has(x.id)||Y.set(x.id,[]),S.push({left:I,right:x.id})):(M.has(I)?M.get(I).push(x):M.set(I,[x]),M.has(x.id)||M.set(x.id,[]),S.push({top:I,bottom:x.id}))})}),et(S),C=!1;var H=D(Y,"horizontal"),q=D(M,"vertical");z[F].forEach(function(I,x){v[x]=[d[c.get(I)],m[c.get(I)]],p[x]=[],H.has(I)?p[x][0]=H.get(I):p[x][0]=d[c.get(I)],q.has(I)?p[x][1]=q.get(I):p[x][1]=m[c.get(I)]}),w=!0}}if(w){for(var nt=void 0,B=t.transpose(p),Dt=t.transpose(v),yt=0;yt<B.length;yt++)B[yt]=t.multGamma(B[yt]),Dt[yt]=t.multGamma(Dt[yt]);var ut=t.multMat(B,t.transpose(Dt)),_=s.svd(ut);nt=t.multMat(_.V,t.transpose(_.U));for(var lt=0;lt<c.size;lt++){var pt=[d[lt],m[lt]],mt=[nt[0][0],nt[1][0]],Mt=[nt[0][1],nt[1][1]];d[lt]=t.dotProduct(pt,mt),m[lt]=t.dotProduct(pt,Mt)}C&&et(h.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var dt={x:0,y:0};h.fixedNodeConstraint.forEach(function(I,x){var X={x:d[c.get(I.nodeId)],y:m[c.get(I.nodeId)]},Z=I.position,W=V(Z,X);dt.x+=W.x,dt.y+=W.y}),dt.x/=h.fixedNodeConstraint.length,dt.y/=h.fixedNodeConstraint.length,d.forEach(function(I,x){d[x]+=dt.x}),m.forEach(function(I,x){m[x]+=dt.y}),h.fixedNodeConstraint.forEach(function(I){d[c.get(I.nodeId)]=I.position.x,m[c.get(I.nodeId)]=I.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var At=h.alignmentConstraint.vertical,wt=function(x){var X=new Set;At[x].forEach(function(tt){X.add(tt)});var Z=new Set([].concat(u(X)).filter(function(tt){return R.has(tt)})),W=void 0;Z.size>0?W=d[c.get(Z.values().next().value)]:W=j(X).x,X.forEach(function(tt){R.has(tt)||(d[c.get(tt)]=W)})},bt=0;bt<At.length;bt++)wt(bt);if(h.alignmentConstraint.horizontal)for(var Gt=h.alignmentConstraint.horizontal,Ft=function(x){var X=new Set;Gt[x].forEach(function(tt){X.add(tt)});var Z=new Set([].concat(u(X)).filter(function(tt){return R.has(tt)})),W=void 0;Z.size>0?W=m[c.get(Z.values().next().value)]:W=j(X).y,X.forEach(function(tt){R.has(tt)||(m[c.get(tt)]=W)})},It=0;It<Gt.length;It++)Ft(It)}h.relativePlacementConstraint&&(function(){var I=new Map,x=new Map,X=new Map,Z=new Map,W=new Map,tt=new Map,ht=new Set,rt=new Set;if(R.forEach(function(St){ht.add(St),rt.add(St)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var K=h.alignmentConstraint.vertical,Q=function(ct){X.set("dummy"+ct,[]),K[ct].forEach(function(Ct){I.set(Ct,"dummy"+ct),X.get("dummy"+ct).push(Ct),R.has(Ct)&&ht.add("dummy"+ct)}),W.set("dummy"+ct,d[c.get(K[ct][0])])},ft=0;ft<K.length;ft++)Q(ft);if(h.alignmentConstraint.horizontal)for(var Lt=h.alignmentConstraint.horizontal,vt=function(ct){Z.set("dummy"+ct,[]),Lt[ct].forEach(function(Ct){x.set(Ct,"dummy"+ct),Z.get("dummy"+ct).push(Ct),R.has(Ct)&&rt.add("dummy"+ct)}),tt.set("dummy"+ct,m[c.get(Lt[ct][0])])},Ot=0;Ot<Lt.length;Ot++)vt(Ot)}var ot=new Map,it=new Map,Tt=function(ct){P.get(ct).forEach(function(Ct){var zt=void 0,Wt=void 0;Ct.direction=="horizontal"?(zt=I.get(ct)?I.get(ct):ct,I.get(Ct.id)?Wt={id:I.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:Wt=Ct,ot.has(zt)?ot.get(zt).push(Wt):ot.set(zt,[Wt]),ot.has(Wt.id)||ot.set(Wt.id,[])):(zt=x.get(ct)?x.get(ct):ct,x.get(Ct.id)?Wt={id:x.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:Wt=Ct,it.has(zt)?it.get(zt).push(Wt):it.set(zt,[Wt]),it.has(Wt.id)||it.set(Wt.id,[]))})},st=!0,at=!1,Ut=void 0;try{for(var Et=P.keys()[Symbol.iterator](),Nt;!(st=(Nt=Et.next()).done);st=!0){var Xt=Nt.value;Tt(Xt)}}catch(St){at=!0,Ut=St}finally{try{!st&&Et.return&&Et.return()}finally{if(at)throw Ut}}var xt=E(ot),Ht=E(it),Rt=e(xt),Vt=e(Ht),Qt=g(ot),re=g(it),Bt=[],qt=[];Rt.forEach(function(St,ct){Bt[ct]=[],St.forEach(function(Ct){Qt.get(Ct).length==0&&Bt[ct].push(Ct)})}),Vt.forEach(function(St,ct){qt[ct]=[],St.forEach(function(Ct){re.get(Ct).length==0&&qt[ct].push(Ct)})});var Kt=D(ot,"horizontal",ht,W,Bt),Zt=D(it,"vertical",rt,tt,qt),jt=function(ct){X.get(ct)?X.get(ct).forEach(function(Ct){d[c.get(Ct)]=Kt.get(ct)}):d[c.get(ct)]=Kt.get(ct)},$t=!0,Jt=!1,he=void 0;try{for(var ie=Kt.keys()[Symbol.iterator](),le;!($t=(le=ie.next()).done);$t=!0){var ae=le.value;jt(ae)}}catch(St){Jt=!0,he=St}finally{try{!$t&&ie.return&&ie.return()}finally{if(Jt)throw he}}var pe=function(ct){Z.get(ct)?Z.get(ct).forEach(function(Ct){m[c.get(Ct)]=Zt.get(ct)}):m[c.get(ct)]=Zt.get(ct)},ne=!0,fe=!1,ue=void 0;try{for(var oe=Zt.keys()[Symbol.iterator](),ge;!(ne=(ge=oe.next()).done);ne=!0){var ae=ge.value;pe(ae)}}catch(St){fe=!0,ue=St}finally{try{!ne&&oe.return&&oe.return()}finally{if(fe)throw ue}}})()}for(var Pt=0;Pt<G.length;Pt++){var Yt=G[Pt];Yt.getChild()==null&&Yt.setCenter(d[c.get(Yt.id)],m[c.get(Yt.id)])}},n.exports=o}),551:(n=>{n.exports=k})},A={};function T(n){var r=A[n];if(r!==void 0)return r.exports;var a=A[n]={exports:{}};return gt[n](a,a.exports,T),a.exports}var l=T(45);return l})()})})(te)),te.exports}var Le=_t.exports,de;function Ce(){return de||(de=1,(function(kt,se){(function(gt,A){kt.exports=A(me())})(Le,function(k){return(()=>{var gt={658:(n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,u=Array(a>1?a-1:0),i=1;i<a;i++)u[i-1]=arguments[i];return u.forEach(function(y){Object.keys(y).forEach(function(t){return r[t]=y[t]})}),r}}),548:((n,r,a)=>{var u=(function(){function t(s,o){var f=[],h=!0,N=!1,c=void 0;try{for(var d=s[Symbol.iterator](),m;!(h=(m=d.next()).done)&&(f.push(m.value),!(o&&f.length===o));h=!0);}catch(G){N=!0,c=G}finally{try{!h&&d.return&&d.return()}finally{if(N)throw c}}return f}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=a(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var f=t.filter(function(h,N){typeof h=="number"&&(h=N);for(var c=h.parent()[0];c!=null;){if(s[c.id()])return!1;c=c.parent()[0]}return!0});return f},y.connectComponents=function(t,s,o,f){var h=new i,N=new Set,c=[],d=void 0,m=void 0,G=void 0,L=!1,U=1,J=[],V=[],j=function(){var et=t.collection();V.push(et);var e=o[0],E=t.collection();E.merge(e).merge(e.descendants().intersection(s)),c.push(e),E.forEach(function(v){h.push(v),N.add(v),et.merge(v)});for(var g=function(){e=h.shift();var w=t.collection();e.neighborhood().nodes().forEach(function(O){s.intersection(e.edgesWith(O)).length>0&&w.merge(O)});for(var C=0;C<w.length;C++){var R=w[C];if(d=o.intersection(R.union(R.ancestors())),d!=null&&!N.has(d[0])){var P=d.union(d.descendants());P.forEach(function(O){h.push(O),N.add(O),et.merge(O),o.has(O)&&c.push(O)})}}};h.length!=0;)g();if(et.forEach(function(v){s.intersection(v.connectedEdges()).forEach(function(w){et.has(w.source())&&et.has(w.target())&&et.merge(w)})}),c.length==o.length&&(L=!0),!L||L&&U>1){m=c[0],G=m.connectedEdges().length,c.forEach(function(v){v.connectedEdges().length<G&&(G=v.connectedEdges().length,m=v)}),J.push(m.id());var p=t.collection();p.merge(c[0]),c.forEach(function(v){p.merge(v)}),c=[],o=o.difference(p),U++}};do j();while(!L);return f&&J.length>0&&f.set("dummy"+(f.size+1),J),V},y.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var f=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,N=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,m=!1,G=void 0;try{for(var L=s.nodeIndexes[Symbol.iterator](),U;!(d=(U=L.next()).done);d=!0){var J=U.value,V=u(J,2),j=V[0],D=V[1],et=o.cy.getElementById(j);if(et){var e=et.boundingBox(),E=s.xCoords[D]-e.w/2,g=s.xCoords[D]+e.w/2,p=s.yCoords[D]-e.h/2,v=s.yCoords[D]+e.h/2;E<f&&(f=E),g>h&&(h=g),p<N&&(N=p),v>c&&(c=v)}}}catch(O){m=!0,G=O}finally{try{!d&&L.return&&L.return()}finally{if(m)throw G}}var w=t.x-(h+f)/2,C=t.y-(c+N)/2;s.xCoords=s.xCoords.map(function(O){return O+w}),s.yCoords=s.yCoords.map(function(O){return O+C})}else{Object.keys(s).forEach(function(O){var z=s[O],b=z.getRect().x,F=z.getRect().x+z.getRect().width,$=z.getRect().y,Y=z.getRect().y+z.getRect().height;b<f&&(f=b),F>h&&(h=F),$<N&&(N=$),Y>c&&(c=Y)});var R=t.x-(h+f)/2,P=t.y-(c+N)/2;Object.keys(s).forEach(function(O){var z=s[O];z.setCenter(z.getCenterX()+R,z.getCenterY()+P)})}}},y.calcBoundingBox=function(t,s,o,f){for(var h=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,c=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,m=void 0,G=void 0,L=void 0,U=void 0,J=t.descendants().not(":parent"),V=J.length,j=0;j<V;j++){var D=J[j];m=s[f.get(D.id())]-D.width()/2,G=s[f.get(D.id())]+D.width()/2,L=o[f.get(D.id())]-D.height()/2,U=o[f.get(D.id())]+D.height()/2,h>m&&(h=m),N<G&&(N=G),c>L&&(c=L),d<U&&(d=U)}var et={};return et.topLeftX=h,et.topLeftY=c,et.width=N-h,et.height=d-c,et},y.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(f){var h=!1;f.children().forEach(function(N){N.css("display")!="none"&&(h=!0)}),h||o.merge(f)}),o},n.exports=y}),816:((n,r,a)=>{var u=a(548),i=a(140).CoSELayout,y=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,f=a(140).layoutBase.FDLayoutConstants,h=a(140).CoSEConstants,N=function(d,m){var G=d.cy,L=d.eles,U=L.nodes(),J=L.edges(),V=void 0,j=void 0,D=void 0,et={};d.randomize&&(V=m.nodeIndexes,j=m.xCoords,D=m.yCoords);var e=function(O){return typeof O=="function"},E=function(O,z){return e(O)?O(z):O},g=u.calcParentsWithoutChildren(G,L),p=function P(O,z,b,F){for(var $=z.length,Y=0;Y<$;Y++){var M=z[Y],S=null;M.intersection(g).length==0&&(S=M.children());var H=void 0,q=M.layoutDimensions({nodeDimensionsIncludeLabels:F.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(F.randomize)if(!M.isParent())H=O.add(new y(b.graphManager,new t(j[V.get(M.id())]-q.w/2,D[V.get(M.id())]-q.h/2),new s(parseFloat(q.w),parseFloat(q.h))));else{var nt=u.calcBoundingBox(M,j,D,V);M.intersection(g).length==0?H=O.add(new y(b.graphManager,new t(nt.topLeftX,nt.topLeftY),new s(nt.width,nt.height))):H=O.add(new y(b.graphManager,new t(nt.topLeftX,nt.topLeftY),new s(parseFloat(q.w),parseFloat(q.h))))}else H=O.add(new y(b.graphManager,new t(M.position("x")-q.w/2,M.position("y")-q.h/2),new s(parseFloat(q.w),parseFloat(q.h))));else H=O.add(new y(this.graphManager));if(H.id=M.data("id"),H.nodeRepulsion=E(F.nodeRepulsion,M),H.paddingLeft=parseInt(M.css("padding")),H.paddingTop=parseInt(M.css("padding")),H.paddingRight=parseInt(M.css("padding")),H.paddingBottom=parseInt(M.css("padding")),F.nodeDimensionsIncludeLabels&&(H.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,H.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,H.labelPosVertical=M.css("text-valign"),H.labelPosHorizontal=M.css("text-halign")),et[M.data("id")]=H,isNaN(H.rect.x)&&(H.rect.x=0),isNaN(H.rect.y)&&(H.rect.y=0),S!=null&&S.length>0){var B=void 0;B=b.getGraphManager().add(b.newGraph(),H),P(B,S,b,F)}}},v=function(O,z,b){for(var F=0,$=0,Y=0;Y<b.length;Y++){var M=b[Y],S=et[M.data("source")],H=et[M.data("target")];if(S&&H&&S!==H&&S.getEdgesBetween(H).length==0){var q=z.add(O.newEdge(),S,H);q.id=M.id(),q.idealLength=E(d.idealEdgeLength,M),q.edgeElasticity=E(d.edgeElasticity,M),F+=q.idealLength,$++}}d.idealEdgeLength!=null&&($>0?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=F/$:e(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH)},w=function(O,z){z.fixedNodeConstraint&&(O.constraints.fixedNodeConstraint=z.fixedNodeConstraint),z.alignmentConstraint&&(O.constraints.alignmentConstraint=z.alignmentConstraint),z.relativePlacementConstraint&&(O.constraints.relativePlacementConstraint=z.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=f.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=f.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=f.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=f.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=f.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var C=new i,R=C.newGraphManager();return p(R.addRoot(),u.getTopMostNodes(U),C,d),v(C,R,J),w(C,d),C.runLayout(),et};n.exports={coseLayout:N}}),212:((n,r,a)=>{var u=(function(){function d(m,G){for(var L=0;L<G.length;L++){var U=G[L];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(m,U.key,U)}}return function(m,G,L){return G&&d(m.prototype,G),L&&d(m,L),m}})();function i(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}var y=a(658),t=a(548),s=a(657),o=s.spectralLayout,f=a(816),h=f.coseLayout,N=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(m){return 4500},idealEdgeLength:function(m){return 50},edgeElasticity:function(m){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 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(){}}),c=(function(){function d(m){i(this,d),this.options=y({},N,m)}return u(d,[{key:"run",value:function(){var G=this,L=this.options,U=L.cy,J=L.eles,V=[],j=[],D=void 0,et=[];L.fixedNodeConstraint&&(!Array.isArray(L.fixedNodeConstraint)||L.fixedNodeConstraint.length==0)&&(L.fixedNodeConstraint=void 0),L.alignmentConstraint&&(L.alignmentConstraint.vertical&&(!Array.isArray(L.alignmentConstraint.vertical)||L.alignmentConstraint.vertical.length==0)&&(L.alignmentConstraint.vertical=void 0),L.alignmentConstraint.horizontal&&(!Array.isArray(L.alignmentConstraint.horizontal)||L.alignmentConstraint.horizontal.length==0)&&(L.alignmentConstraint.horizontal=void 0)),L.relativePlacementConstraint&&(!Array.isArray(L.relativePlacementConstraint)||L.relativePlacementConstraint.length==0)&&(L.relativePlacementConstraint=void 0);var e=L.fixedNodeConstraint||L.alignmentConstraint||L.relativePlacementConstraint;e&&(L.tile=!1,L.packComponents=!1);var E=void 0,g=!1;if(U.layoutUtilities&&L.packComponents&&(E=U.layoutUtilities("get"),E||(E=U.layoutUtilities()),g=!0),J.nodes().length>0)if(g){var w=t.getTopMostNodes(L.eles.nodes());if(D=t.connectComponents(U,L.eles,w),D.forEach(function(ut){var _=ut.boundingBox();et.push({x:_.x1+_.w/2,y:_.y1+_.h/2})}),L.randomize&&D.forEach(function(ut){L.eles=ut,V.push(o(L))}),L.quality=="default"||L.quality=="proof"){var C=U.collection();if(L.tile){var R=new Map,P=[],O=[],z=0,b={nodeIndexes:R,xCoords:P,yCoords:O},F=[];if(D.forEach(function(ut,_){ut.edges().length==0&&(ut.nodes().forEach(function(lt,pt){C.merge(ut.nodes()[pt]),lt.isParent()||(b.nodeIndexes.set(ut.nodes()[pt].id(),z++),b.xCoords.push(ut.nodes()[0].position().x),b.yCoords.push(ut.nodes()[0].position().y))}),F.push(_))}),C.length>1){var $=C.boundingBox();et.push({x:$.x1+$.w/2,y:$.y1+$.h/2}),D.push(C),V.push(b);for(var Y=F.length-1;Y>=0;Y--)D.splice(F[Y],1),V.splice(F[Y],1),et.splice(F[Y],1)}}D.forEach(function(ut,_){L.eles=ut,j.push(h(L,V[_])),t.relocateComponent(et[_],j[_],L)})}else D.forEach(function(ut,_){t.relocateComponent(et[_],V[_],L)});var M=new Set;if(D.length>1){var S=[],H=J.filter(function(ut){return ut.css("display")=="none"});D.forEach(function(ut,_){var lt=void 0;if(L.quality=="draft"&&(lt=V[_].nodeIndexes),ut.nodes().not(H).length>0){var pt={};pt.edges=[],pt.nodes=[];var mt=void 0;ut.nodes().not(H).forEach(function(Mt){if(L.quality=="draft")if(!Mt.isParent())mt=lt.get(Mt.id()),pt.nodes.push({x:V[_].xCoords[mt]-Mt.boundingbox().w/2,y:V[_].yCoords[mt]-Mt.boundingbox().h/2,width:Mt.boundingbox().w,height:Mt.boundingbox().h});else{var dt=t.calcBoundingBox(Mt,V[_].xCoords,V[_].yCoords,lt);pt.nodes.push({x:dt.topLeftX,y:dt.topLeftY,width:dt.width,height:dt.height})}else j[_][Mt.id()]&&pt.nodes.push({x:j[_][Mt.id()].getLeft(),y:j[_][Mt.id()].getTop(),width:j[_][Mt.id()].getWidth(),height:j[_][Mt.id()].getHeight()})}),ut.edges().forEach(function(Mt){var dt=Mt.source(),At=Mt.target();if(dt.css("display")!="none"&&At.css("display")!="none")if(L.quality=="draft"){var wt=lt.get(dt.id()),bt=lt.get(At.id()),Gt=[],Ft=[];if(dt.isParent()){var It=t.calcBoundingBox(dt,V[_].xCoords,V[_].yCoords,lt);Gt.push(It.topLeftX+It.width/2),Gt.push(It.topLeftY+It.height/2)}else Gt.push(V[_].xCoords[wt]),Gt.push(V[_].yCoords[wt]);if(At.isParent()){var Pt=t.calcBoundingBox(At,V[_].xCoords,V[_].yCoords,lt);Ft.push(Pt.topLeftX+Pt.width/2),Ft.push(Pt.topLeftY+Pt.height/2)}else Ft.push(V[_].xCoords[bt]),Ft.push(V[_].yCoords[bt]);pt.edges.push({startX:Gt[0],startY:Gt[1],endX:Ft[0],endY:Ft[1]})}else j[_][dt.id()]&&j[_][At.id()]&&pt.edges.push({startX:j[_][dt.id()].getCenterX(),startY:j[_][dt.id()].getCenterY(),endX:j[_][At.id()].getCenterX(),endY:j[_][At.id()].getCenterY()})}),pt.nodes.length>0&&(S.push(pt),M.add(_))}});var q=E.packComponents(S,L.randomize).shifts;if(L.quality=="draft")V.forEach(function(ut,_){var lt=ut.xCoords.map(function(mt){return mt+q[_].dx}),pt=ut.yCoords.map(function(mt){return mt+q[_].dy});ut.xCoords=lt,ut.yCoords=pt});else{var nt=0;M.forEach(function(ut){Object.keys(j[ut]).forEach(function(_){var lt=j[ut][_];lt.setCenter(lt.getCenterX()+q[nt].dx,lt.getCenterY()+q[nt].dy)}),nt++})}}}else{var p=L.eles.boundingBox();if(et.push({x:p.x1+p.w/2,y:p.y1+p.h/2}),L.randomize){var v=o(L);V.push(v)}L.quality=="default"||L.quality=="proof"?(j.push(h(L,V[0])),t.relocateComponent(et[0],j[0],L)):t.relocateComponent(et[0],V[0],L)}var B=function(_,lt){if(L.quality=="default"||L.quality=="proof"){typeof _=="number"&&(_=lt);var pt=void 0,mt=void 0,Mt=_.data("id");return j.forEach(function(At){Mt in At&&(pt={x:At[Mt].getRect().getCenterX(),y:At[Mt].getRect().getCenterY()},mt=At[Mt])}),L.nodeDimensionsIncludeLabels&&(mt.labelWidth&&(mt.labelPosHorizontal=="left"?pt.x+=mt.labelWidth/2:mt.labelPosHorizontal=="right"&&(pt.x-=mt.labelWidth/2)),mt.labelHeight&&(mt.labelPosVertical=="top"?pt.y+=mt.labelHeight/2:mt.labelPosVertical=="bottom"&&(pt.y-=mt.labelHeight/2))),pt==null&&(pt={x:_.position("x"),y:_.position("y")}),{x:pt.x,y:pt.y}}else{var dt=void 0;return V.forEach(function(At){var wt=At.nodeIndexes.get(_.id());wt!=null&&(dt={x:At.xCoords[wt],y:At.yCoords[wt]})}),dt==null&&(dt={x:_.position("x"),y:_.position("y")}),{x:dt.x,y:dt.y}}};if(L.quality=="default"||L.quality=="proof"||L.randomize){var Dt=t.calcParentsWithoutChildren(U,J),yt=J.filter(function(ut){return ut.css("display")=="none"});L.eles=J.not(yt),J.nodes().not(":parent").not(yt).layoutPositions(G,L,B),Dt.length>0&&Dt.forEach(function(ut){ut.position(B(ut))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();n.exports=c}),657:((n,r,a)=>{var u=a(548),i=a(140).layoutBase.Matrix,y=a(140).layoutBase.SVD,t=function(o){var f=o.cy,h=o.eles,N=h.nodes(),c=h.nodes(":parent"),d=new Map,m=new Map,G=new Map,L=[],U=[],J=[],V=[],j=[],D=[],et=[],e=[],E=void 0,g=1e8,p=1e-9,v=o.piTol,w=o.samplingType,C=o.nodeSeparation,R=void 0,P=function(){for(var x=0,X=0,Z=!1;X<R;){x=Math.floor(Math.random()*E),Z=!1;for(var W=0;W<X;W++)if(V[W]==x){Z=!0;break}if(!Z)V[X]=x,X++;else continue}},O=function(x,X,Z){for(var W=[],tt=0,ht=0,rt=0,K=void 0,Q=[],ft=0,Lt=1,vt=0;vt<E;vt++)Q[vt]=g;for(W[ht]=x,Q[x]=0;ht>=tt;){rt=W[tt++];for(var Ot=L[rt],ot=0;ot<Ot.length;ot++)K=m.get(Ot[ot]),Q[K]==g&&(Q[K]=Q[rt]+1,W[++ht]=K);D[rt][X]=Q[rt]*C}if(Z){for(var it=0;it<E;it++)D[it][X]<j[it]&&(j[it]=D[it][X]);for(var Tt=0;Tt<E;Tt++)j[Tt]>ft&&(ft=j[Tt],Lt=Tt)}return Lt},z=function(x){var X=void 0;if(x){X=Math.floor(Math.random()*E);for(var W=0;W<E;W++)j[W]=g;for(var tt=0;tt<R;tt++)V[tt]=X,X=O(X,tt,x)}else{P();for(var Z=0;Z<R;Z++)O(V[Z],Z,x)}for(var ht=0;ht<E;ht++)for(var rt=0;rt<R;rt++)D[ht][rt]*=D[ht][rt];for(var K=0;K<R;K++)et[K]=[];for(var Q=0;Q<R;Q++)for(var ft=0;ft<R;ft++)et[Q][ft]=D[V[ft]][Q]},b=function(){for(var x=y.svd(et),X=x.S,Z=x.U,W=x.V,tt=X[0]*X[0]*X[0],ht=[],rt=0;rt<R;rt++){ht[rt]=[];for(var K=0;K<R;K++)ht[rt][K]=0,rt==K&&(ht[rt][K]=X[rt]/(X[rt]*X[rt]+tt/(X[rt]*X[rt])))}e=i.multMat(i.multMat(W,ht),i.transpose(Z))},F=function(){for(var x=void 0,X=void 0,Z=[],W=[],tt=[],ht=[],rt=0;rt<E;rt++)Z[rt]=Math.random(),W[rt]=Math.random();Z=i.normalize(Z),W=i.normalize(W);for(var K=p,Q=p,ft=void 0;;){for(var Lt=0;Lt<E;Lt++)tt[Lt]=Z[Lt];if(Z=i.multGamma(i.multL(i.multGamma(tt),D,e)),x=i.dotProduct(tt,Z),Z=i.normalize(Z),K=i.dotProduct(tt,Z),ft=Math.abs(K/Q),ft<=1+v&&ft>=1)break;Q=K}for(var vt=0;vt<E;vt++)tt[vt]=Z[vt];for(Q=p;;){for(var Ot=0;Ot<E;Ot++)ht[Ot]=W[Ot];if(ht=i.minusOp(ht,i.multCons(tt,i.dotProduct(tt,ht))),W=i.multGamma(i.multL(i.multGamma(ht),D,e)),X=i.dotProduct(ht,W),W=i.normalize(W),K=i.dotProduct(ht,W),ft=Math.abs(K/Q),ft<=1+v&&ft>=1)break;Q=K}for(var ot=0;ot<E;ot++)ht[ot]=W[ot];U=i.multCons(tt,Math.sqrt(Math.abs(x))),J=i.multCons(ht,Math.sqrt(Math.abs(X)))};u.connectComponents(f,h,u.getTopMostNodes(N),d),c.forEach(function(I){u.connectComponents(f,h,u.getTopMostNodes(I.descendants().intersection(h)),d)});for(var $=0,Y=0;Y<N.length;Y++)N[Y].isParent()||m.set(N[Y].id(),$++);var M=!0,S=!1,H=void 0;try{for(var q=d.keys()[Symbol.iterator](),nt;!(M=(nt=q.next()).done);M=!0){var B=nt.value;m.set(B,$++)}}catch(I){S=!0,H=I}finally{try{!M&&q.return&&q.return()}finally{if(S)throw H}}for(var Dt=0;Dt<m.size;Dt++)L[Dt]=[];c.forEach(function(I){for(var x=I.children().intersection(h);x.nodes(":childless").length==0;)x=x.nodes()[0].children().intersection(h);var X=0,Z=x.nodes(":childless")[0].connectedEdges().length;x.nodes(":childless").forEach(function(W,tt){W.connectedEdges().length<Z&&(Z=W.connectedEdges().length,X=tt)}),G.set(I.id(),x.nodes(":childless")[X].id())}),N.forEach(function(I){var x=void 0;I.isParent()?x=m.get(G.get(I.id())):x=m.get(I.id()),I.neighborhood().nodes().forEach(function(X){h.intersection(I.edgesWith(X)).length>0&&(X.isParent()?L[x].push(G.get(X.id())):L[x].push(X.id()))})});var yt=function(x){var X=m.get(x),Z=void 0;d.get(x).forEach(function(W){f.getElementById(W).isParent()?Z=G.get(W):Z=W,L[X].push(Z),L[m.get(Z)].push(x)})},ut=!0,_=!1,lt=void 0;try{for(var pt=d.keys()[Symbol.iterator](),mt;!(ut=(mt=pt.next()).done);ut=!0){var Mt=mt.value;yt(Mt)}}catch(I){_=!0,lt=I}finally{try{!ut&&pt.return&&pt.return()}finally{if(_)throw lt}}E=m.size;var dt=void 0;if(E>2){R=E<o.sampleSize?E:o.sampleSize;for(var At=0;At<E;At++)D[At]=[];for(var wt=0;wt<R;wt++)e[wt]=[];return o.quality=="draft"||o.step=="all"?(z(w),b(),F(),dt={nodeIndexes:m,xCoords:U,yCoords:J}):(m.forEach(function(I,x){U.push(f.getElementById(x).position("x")),J.push(f.getElementById(x).position("y"))}),dt={nodeIndexes:m,xCoords:U,yCoords:J}),dt}else{var bt=m.keys(),Gt=f.getElementById(bt.next().value),Ft=Gt.position(),It=Gt.outerWidth();if(U.push(Ft.x),J.push(Ft.y),E==2){var Pt=f.getElementById(bt.next().value),Yt=Pt.outerWidth();U.push(Ft.x+It/2+Yt/2+o.idealEdgeLength),J.push(Ft.y)}return dt={nodeIndexes:m,xCoords:U,yCoords:J},dt}};n.exports={spectralLayout:t}}),579:((n,r,a)=>{var u=a(212),i=function(t){t&&t("layout","fcose",u)};typeof cytoscape<"u"&&i(cytoscape),n.exports=i}),140:(n=>{n.exports=k})},A={};function T(n){var r=A[n];if(r!==void 0)return r.exports;var a=A[n]={exports:{}};return gt[n](a,a.exports,T),a.exports}var l=T(579);return l})()})})(_t)),_t.exports}var Me=Ce();const Oe=Ee(Me);export{Oe as f};