@aalis/plugin-webui-client 0.2.0

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 (134) hide show
  1. package/LICENSE +235 -0
  2. package/README.md +21 -0
  3. package/dist/assets/AuthorityPage-COZ1GZ_n.js +12 -0
  4. package/dist/assets/DynamicPage-DJFDEG6E.js +19 -0
  5. package/dist/assets/FilesPage-CBCBRbIG.js +16 -0
  6. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  7. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  8. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  9. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  10. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  11. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  12. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  13. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  14. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  15. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  16. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  17. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  18. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  19. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  20. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  21. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  22. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  23. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  24. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  25. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  26. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  27. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  28. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  29. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  30. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  31. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  32. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  33. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  34. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  35. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  36. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  37. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  38. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  39. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  40. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  41. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  42. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  43. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  44. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  45. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  46. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  47. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  48. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  49. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  50. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  51. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  52. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  53. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  54. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  55. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  56. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  57. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  58. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  59. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  60. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  61. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  62. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  63. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  64. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  65. package/dist/assets/LogPage-C_Z3RA5T.js +1 -0
  66. package/dist/assets/MarketplacePage-HGIvPE-L.js +23 -0
  67. package/dist/assets/PlatformPage-BU3sDCdV.js +6 -0
  68. package/dist/assets/PluginConfigPage-B-xh_pwj.js +23 -0
  69. package/dist/assets/SchemaForm-YVQZ6Keg.js +1 -0
  70. package/dist/assets/SessionsPage-DOl-b2K7.js +1 -0
  71. package/dist/assets/arc-B9dZH4Mz.js +1 -0
  72. package/dist/assets/architectureDiagram-3BPJPVTR-_XZszVRW.js +36 -0
  73. package/dist/assets/blockDiagram-GPEHLZMM-DjTNIZAV.js +132 -0
  74. package/dist/assets/c4Diagram-AAUBKEIU-DAcjskYi.js +10 -0
  75. package/dist/assets/channel-CWs0Ph4z.js +1 -0
  76. package/dist/assets/chunk-2J33WTMH-CHFaIVIG.js +1 -0
  77. package/dist/assets/chunk-4BX2VUAB-BLsTiY6G.js +1 -0
  78. package/dist/assets/chunk-55IACEB6-BUHj8uJ5.js +1 -0
  79. package/dist/assets/chunk-727SXJPM-BJxPkPIn.js +206 -0
  80. package/dist/assets/chunk-AQP2D5EJ-D9XSGH7X.js +231 -0
  81. package/dist/assets/chunk-FMBD7UC4-14mizF84.js +15 -0
  82. package/dist/assets/chunk-ND2GUHAM-DHAQxCCH.js +1 -0
  83. package/dist/assets/chunk-QZHKN3VN-BRYJuaKF.js +1 -0
  84. package/dist/assets/classDiagram-4FO5ZUOK-BGMWGMFm.js +1 -0
  85. package/dist/assets/classDiagram-v2-Q7XG4LA2-BGMWGMFm.js +1 -0
  86. package/dist/assets/clock-CuE2gSPG.js +6 -0
  87. package/dist/assets/cose-bilkent-S5V4N54A---ynUpZp.js +1 -0
  88. package/dist/assets/cytoscape-fcose-DXAQNCkb.js +1 -0
  89. package/dist/assets/cytoscape.esm-LDYqcvCF.js +331 -0
  90. package/dist/assets/dagre-BM42HDAG-B_veAgHZ.js +4 -0
  91. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  92. package/dist/assets/diagram-2AECGRRQ-2Kvvu1DV.js +43 -0
  93. package/dist/assets/diagram-5GNKFQAL-BcLJ0vOW.js +10 -0
  94. package/dist/assets/diagram-KO2AKTUF-DgvS7EhJ.js +3 -0
  95. package/dist/assets/diagram-LMA3HP47-Dobv6LjS.js +24 -0
  96. package/dist/assets/diagram-OG6HWLK6-kbRFWXPw.js +24 -0
  97. package/dist/assets/erDiagram-TEJ5UH35-B6ilVUKl.js +85 -0
  98. package/dist/assets/flowDiagram-I6XJVG4X-DWyEuHCU.js +162 -0
  99. package/dist/assets/ganttDiagram-6RSMTGT7-CmgqK4-P.js +292 -0
  100. package/dist/assets/gitGraphDiagram-PVQCEYII-DuexqjAc.js +106 -0
  101. package/dist/assets/globe-bFIW3FVE.js +6 -0
  102. package/dist/assets/graph-CAnANduQ.js +1 -0
  103. package/dist/assets/highlight-BPWJwfct.css +9 -0
  104. package/dist/assets/highlight-DJvvuuwd.js +5 -0
  105. package/dist/assets/index-CaU2rCNv.css +1 -0
  106. package/dist/assets/index-D4hgfekH.js +207 -0
  107. package/dist/assets/infoDiagram-5YYISTIA-CzWWvYqm.js +2 -0
  108. package/dist/assets/init-Gi6I4Gst.js +1 -0
  109. package/dist/assets/ishikawaDiagram-YF4QCWOH-CwACduTX.js +70 -0
  110. package/dist/assets/journeyDiagram-JHISSGLW-fT0SRS58.js +139 -0
  111. package/dist/assets/kanban-definition-UN3LZRKU-DVqDYGqT.js +89 -0
  112. package/dist/assets/katex-Bq6vt64r.js +265 -0
  113. package/dist/assets/katex-CIHdCL6t.css +1 -0
  114. package/dist/assets/layout-DGIYPm2g.js +1 -0
  115. package/dist/assets/linear-CZgp6Fzk.js +1 -0
  116. package/dist/assets/markdown-BCywGHw2.js +35 -0
  117. package/dist/assets/mermaid.core-BbMB3jno.js +309 -0
  118. package/dist/assets/mindmap-definition-RKZ34NQL-Blj-hhKO.js +96 -0
  119. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  120. package/dist/assets/pieDiagram-4H26LBE5-C-QBAE8E.js +30 -0
  121. package/dist/assets/quadrantDiagram-W4KKPZXB-DLNCWkpV.js +7 -0
  122. package/dist/assets/react-vendor-BPQixOLZ.js +49 -0
  123. package/dist/assets/requirementDiagram-4Y6WPE33-Db7mnSho.js +84 -0
  124. package/dist/assets/sankeyDiagram-5OEKKPKP-Dys1xLTB.js +40 -0
  125. package/dist/assets/sequenceDiagram-3UESZ5HK-BXuxkY9a.js +162 -0
  126. package/dist/assets/stateDiagram-AJRCARHV-Bf7MYv4Z.js +1 -0
  127. package/dist/assets/stateDiagram-v2-BHNVJYJU-D-_B0BoL.js +1 -0
  128. package/dist/assets/timeline-definition-PNZ67QCA-CO_HyU4B.js +120 -0
  129. package/dist/assets/vennDiagram-CIIHVFJN-BFm2iq_q.js +34 -0
  130. package/dist/assets/wardley-L42UT6IY-DwPang7i.js +173 -0
  131. package/dist/assets/wardleyDiagram-YWT4CUSO-B_OPLFkw.js +78 -0
  132. package/dist/assets/xychartDiagram-2RQKCTM6-I4OX9JOH.js +7 -0
  133. package/dist/index.html +19 -0
  134. package/package.json +43 -0
@@ -0,0 +1,6 @@
1
+ import{c}from"./index-D4hgfekH.js";/**
2
+ * @license lucide-react v1.7.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const o=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],r=c("clock",o);export{r as C};
@@ -0,0 +1 @@
1
+ import{_ as V,l as $,d as lt}from"./mermaid.core-BbMB3jno.js";import{c as tt}from"./cytoscape.esm-LDYqcvCF.js";import{g as gt}from"./react-vendor-BPQixOLZ.js";import"./index-D4hgfekH.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,T){G.exports=T()})(ut,function(){return(function(N){var I={};function T(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=N,T.c=I,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)})([(function(N,I,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,T){var o=T(2),e=T(8),t=T(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,T){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,T){var o=T(2),e=T(10),t=T(13),i=T(0),l=T(16),g=T(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.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)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,T){var o=T(2),e=T(10),t=T(0),i=T(6),l=T(3),g=T(1),n=T(13),d=T(12),r=T(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var E=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(E.source=v,E.target=D,E.isInterGraph=!1,this.getEdges().push(E),v.edges.push(E),D!=v&&D.edges.push(E),E)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,E=D.length,y=0;y<E;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,E,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?E=y[0].getParent().paddingLeft:E=this.margin,this.left=v-E,this.top=p-E,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c,L=this.nodes,A=L.length,m=0;m<A;m++){var C=L[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),E<f&&(E=f)}var R=new n(v,u,D-v,E-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),L[0].getParent().paddingLeft!=null?c=L[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c=p.length,L=0;L<c;L++){var A=p[L];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),E<f&&(E=f)}var m=new n(v,u,D-v,E-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var E=v[u];p+=E.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],E,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),E=u.getEdges();for(var s=E.length,f=0;f<s;f++){var c=E[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var L=y.withChildren();L.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,T){var o=T(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,T){var o=T(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),E=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),L=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=L,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=L,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=L,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+E*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-E*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=L,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,E=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,L=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,L=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*L-f*c)/A,E=(O*c-y*L)/A,new o(u,E))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var E=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<E&&E<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,T){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,T){var o=(function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d!=null&&d.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,T){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,T){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,T){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,T){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=T(0),t=T(6),i=T(3),l=T(1),g=T(5),n=T(4),d=T(17),r=T(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var E=a;if(E.vGraphObject!=null){var y=E.vGraphObject;y.update(E)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,E=0;E<D.length;E++)u=D[E],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var E=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),E.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var L=c[u].getOtherEnd(f);if(O.get(f)!=L)if(!E.has(L))y.push(L),O.set(L,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(E));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-1&&s.splice(C,1)}E=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),D.add(E);var y=this.newEdge(null);this.graphManager.add(y,v,E),p.add(E),v=E}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var E=D[u],y=new n(E.getCenterX(),E.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,E.getOwner().remove(E)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var E=p/v;u-=(p-E)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,E=null;(p.length==1||p.length==2)&&(u=!0,E=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],L=p.indexOf(O);L>=0&&p.splice(L,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,E=p[0])}return E},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,T){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=T(15),t=T(7),i=T(0),l=T(8),g=T(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),E=0;E<u.length;E++)r=u[E],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),E=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,E,r,h),E.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,E;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),E=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=E,p.springForceX-=u,p.springForceY-=E)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,E,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var L=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=L*f,r.repulsionForceY-=L*c,h.repulsionForceX+=L*f,h.repulsionForceY+=L*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),E=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],E=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(E)<t.MIN_REPULSION_DIST&&(E=g.sign(E)*t.MIN_REPULSION_DIST),y=u*u+E*E,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*E/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,E,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,E=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var E=p;E<=v;E++)for(var y=D;y<=u;y++)this.grid[E][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,E=r.startX-1;E<r.finishX+2;E++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(E<0||y<0||E>=u.length||y>=u[0].length)){for(var O=0;O<u[E][y].length;O++)if(D=u[E][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(E=0;E<r.surrounding.length;E++)this.calcRepulsionForce(r,r.surrounding[E])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,T){var o=T(1),e=T(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,T){var o=T(3);function e(i,l,g,n){o.call(this,i,l,g,n),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=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,T){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,T){var o=T(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,T){var o=T(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,T){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=T(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,T){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,T){var o=function(){};o.FDLayout=T(18),o.FDLayoutConstants=T(7),o.FDLayoutEdge=T(19),o.FDLayoutNode=T(20),o.DimensionD=T(21),o.HashMap=T(22),o.HashSet=T(23),o.IGeometry=T(8),o.IMath=T(9),o.Integer=T(10),o.Point=T(12),o.PointD=T(4),o.RandomSeed=T(16),o.RectangleD=T(13),o.Transform=T(17),o.UniqueIDGeneretor=T(14),o.Quicksort=T(24),o.LinkedList=T(11),o.LGraphObject=T(2),o.LGraph=T(5),o.LEdge=T(1),o.LGraphManager=T(6),o.LNode=T(3),o.Layout=T(15),o.LayoutConstants=T(0),o.NeedlemanWunsch=T(25),N.exports=o}),(function(N,I,T){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=Z.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,T){G.exports=T(ft())})(ct,function(N){return(function(I){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,T){I.exports=N}),(function(I,T,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,T,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,T,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,T,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,T,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,T,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,E=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.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(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(L){return f.has(L)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var L=s[c].rect,A=s[c].id;f[A]={id:A,x:L.getCenterX(),y:L.getCenterY(),w:L.width,h:L.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),L=c.length,A;for(A=0;A<L;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var L=s[c];if(!f.has(L)){var A=L.getSource(),m=L.getTarget();if(A==m)L.getBendpoints().push(new a),L.getBendpoints().push(new a),this.createDummyNodesForBendpoints(L),f.add(L);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),L=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=L,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),L=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>L&&(L=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var L=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,L);var A=u.calculateBounds(s),m=new E;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,L,A,m){var C=(L-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(L-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var L=s[c],A=L.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],L=this.graphManager.getAllNodes(),A=0;A<L.length;A++){var m=L[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var L=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],L.paddingLeft+L.paddingRight),L.rect.width=f[c].width,L.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,L=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,L,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var L=s.idToDummyNode[c],A=L.paddingLeft,m=L.paddingTop;s.adjustLocations(f[c],L.rect.x,L.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var L=c.getNodes(),A=0;A<L.length;A++){var m=L[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,L=0;L<f.length;L++){var A=f[L];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),L=0;L<c.length;L++){var A=c[L];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,L,A){f+=L,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(L){var A=f[L];c.tiledMemberPack[L]=c.tileNodes(s[L],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[L].width,A.rect.height=c.tiledMemberPack[L].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,L=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:L};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,L){var A=L;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,L=0;L<s.rows.length;L++)s.rowWidth[L]<c&&(f=L,c=s.rowWidth[L]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,L=0;L<s.rows.length;L++)s.rowWidth[L]>c&&(f=L,c=s.rowWidth[L]);return f},y.prototype.canAddHorizontal=function(s,f,c){var L=this.getShortestRowIndex(s);if(L<0)return!0;var A=s.rowWidth[L];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[L]<c&&L>0&&(m=c+s.verticalPadding-s.rowHeight[L]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,L=s.rows[f],A=L[L.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){L.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;R<L.length;R++)L[R].height>C&&(C=L[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var L=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<L.length;m++)c=L[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],L,A=0;A<c.length;A++)L=c[A],this.findPlaceforPrunedNode(L),L[2].add(L[0]),L[2].add(L[1],L[1].source,L[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,L=s[0];L==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?L.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-L.getHeight()/2):f==1?L.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+L.getWidth()/2,c.getCenterY()):f==2?L.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+L.getHeight()/2):L.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-L.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,T,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})(Z)),Z.exports}var dt=k.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,T){G.exports=T(pt())})(dt,function(N){return(function(I){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,T){I.exports=N}),(function(I,T,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var E={};for(var y in D)E[y]=D[y];for(var y in u)E[y]=u[y];return E}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,E=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var L=0;L<c.length;L++){var A=c[L],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){E.fit&&E.cy.fit(E.eles,E.padding),D||(D=!0,O.cy.one("layoutready",E.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();E.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},E=0;E<D.length;E++)u[D[E].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,E){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,L=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(E.graphManager,new n(s.position("x")-L.w/2,s.position("y")-L.h/2),new d(parseFloat(L.w),parseFloat(L.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var R;R=E.getGraphManager().add(E.newGraph(),c),this.processChildrenList(R,f,E)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(T=>{["id","label","height","width","padding","x","y"].includes(T)||(I[T]=N[T])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(T=>{["id","start","end"].includes(T)||(I[T]=N[T])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const T={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(T).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),T={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(T[o]=N[o])}),T})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,T={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(T[o]=N[o])}),T})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),T=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`),{nodes:I,edges:T}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:T,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const E={...u};n[u.id]=E,g[u.id]=E,await N(r,u)}else{const E={...u};g[u.id]=E;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();E.width=O.width,E.height=O.height,E.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const E=g[u.id];return{...u,width:E.width,height:E.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const E=g[u.id];E!=null&&E.domId&&(E.domId.attr("transform",`translate(${u.x}, ${u.y})`),E.x=u.x,E.y=u.y,t.debug(`Positioned node ${E.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const E=G.edges.find(y=>y.id===u.id);E&&(E.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await T(a,u);const E=g[u.start??""],y=g[u.end??""];if(E&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:E.x||0,y:E.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ct=Lt;export{Ct as render};
@@ -0,0 +1 @@
1
+ import{g as Ee}from"./react-vendor-BPQixOLZ.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!=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 K=0,Y=b+1;Y<this.n;Y++)K+=this.V[Y][b]*this.V[Y][F];K=-K/this.V[b+1][b];for(var M=b+1;M<this.n;M++)this.V[M][F]+=K*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,$=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,q=X*$,Z=B;Z<e-1;Z++){var ft=T.hypot(rt,q),Lt=rt/ft,vt=q/ft;Z!==B&&(r[Z-1]=ft),rt=Lt*this.s[Z]+vt*r[Z],r[Z]=Lt*r[Z]-vt*this.s[Z],q=vt*this.s[Z+1],this.s[Z+1]=Lt*this.s[Z+1];for(var Ot=0;Ot<this.n;Ot++)ft=Lt*this.V[Ot][Z]+vt*this.V[Ot][Z+1],this.V[Ot][Z+1]=-vt*this.V[Ot][Z]+Lt*this.V[Ot][Z+1],this.V[Ot][Z]=ft;if(ft=T.hypot(rt,q),Lt=rt/ft,vt=q/ft,this.s[Z]=ft,rt=Lt*r[Z]+vt*this.s[Z+1],this.s[Z+1]=-vt*r[Z]+Lt*this.s[Z+1],q=vt*r[Z+1],r[Z+1]=Lt*r[Z+1],Z<this.m-1)for(var ot=0;ot<this.m;ot++)ft=Lt*this.U[ot][Z]+vt*this.U[ot][Z+1],this.U[ot][Z+1]=-vt*this.U[ot][Z]+Lt*this.U[ot][Z+1],this.U[ot][Z]=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}},K=F(z,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.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 K=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=K}):this.idToNodeMap.get(O[v]).displacementX=K}}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 K=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=K}):this.idToNodeMap.get(O[v]).displacementY=K}}}},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 K=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;K!=F;B=++B%Y){var Dt=b[B].getOtherEnd(e);if(Dt!=E){var yt=(g+K*nt)%360,ut=(yt+nt)%360;D.branchRadialLayout(Dt,e,yt,ut,v+w,w),K++}}},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),K=z.getChild();K.add(b);for(var Y=0;Y<E[P].length;Y++){var M=E[P][Y];K.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 K=F*(P+p)-p;return R>K&&(K=R),K+=p*2,K},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 K=C.rows.length-1;C.idealRowWidth||(K=this.getShortestRowIndex(C)),this.insertNodeToRow(C,F,K,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 K=v;K<=w;K++)F[0]+=this.grid[K][C-1].length+this.grid[K][C].length-1;if(w<this.grid.length-1)for(var K=C;K<=R;K++)F[1]+=this.grid[w+1][K].length+this.grid[w][K].length-1;if(R<this.grid[0].length-1)for(var K=v;K<=w;K++)F[2]+=this.grid[K][R+1].length+this.grid[K][R].length-1;if(v>0)for(var K=C;K<=R;K++)F[3]+=this.grid[v-1][K].length+this.grid[v][K].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,$=0;return x.forEach(function(W){X+=d[c.get(W)],$+=m[c.get(W)]}),{x:X/x.size,y:$/x.size}},D=function(x,X,$,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 q=new Map,Z=new Map,ft=new y;rt.forEach(function(ot,it){ot==0?(ft.push(it),$||(X=="horizontal"?q.set(it,c.has(it)?d[c.get(it)]:W.get(it)):q.set(it,c.has(it)?m[c.get(it)]:W.get(it)))):q.set(it,Number.NEGATIVE_INFINITY),$&&Z.set(it,new Set([it]))}),$&&tt.forEach(function(ot){var it=[];if(ot.forEach(function(at){$.has(at)&&it.push(at)}),it.length>0){var Tt=0;it.forEach(function(at){X=="horizontal"?(q.set(at,c.has(at)?d[c.get(at)]:W.get(at)),Tt+=q.get(at)):(q.set(at,c.has(at)?m[c.get(at)]:W.get(at)),Tt+=q.get(at))}),Tt=Tt/it.length,ot.forEach(function(at){$.has(at)||q.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){q.set(at,st)})}});for(var Lt=function(){var it=ft.shift(),Tt=x.get(it);Tt.forEach(function(st){if(q.get(st.id)<q.get(it)+st.gap)if($&&$.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),q.set(st.id,at),at<q.get(it)+st.gap){var Ut=q.get(it)+st.gap-at;Z.get(it).forEach(function(Et){q.set(Et,q.get(Et)-Ut)})}}else q.set(st.id,q.get(it)+st.gap);rt.set(st.id,rt.get(st.id)-1),rt.get(st.id)==0&&ft.push(st.id),$&&Z.set(st.id,ht(Z.get(it),Z.get(st.id)))})};ft.length!=0;)Lt();if($){var vt=new Set;x.forEach(function(ot,it){ot.length==0&&vt.add(it)});var Ot=[];Z.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;$.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 Zt=q.get(Rt);Vt<Tt&&(Tt=Vt),Vt>at&&(at=Vt),Zt<st&&(st=Zt),Zt>Ut&&(Ut=Zt)}}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,qt=void 0;try{for(var $t=ot[Symbol.iterator](),jt;!(Bt=(jt=$t.next()).done);Bt=!0){var Kt=jt.value;q.set(Kt,q.get(Kt)+re)}}catch(Jt){Qt=!0,qt=Jt}finally{try{!Bt&&$t.return&&$t.return()}finally{if(Qt)throw qt}}})}return q},et=function(x){var X=0,$=0,W=0,tt=0;if(x.forEach(function(Z){Z.left?d[c.get(Z.left)]-d[c.get(Z.right)]>=0?X++:$++:m[c.get(Z.top)]-m[c.get(Z.bottom)]>=0?W++:tt++}),X>$&&W>tt)for(var ht=0;ht<c.size;ht++)d[ht]=-1*d[ht],m[ht]=-1*m[ht];else if(X>$)for(var rt=0;rt<c.size;rt++)d[rt]=-1*d[rt];else if(W>tt)for(var q=0;q<c.size;q++)m[q]=-1*m[q]},e=function(x){var X=[],$=new y,W=new Set,tt=0;return x.forEach(function(ht,rt){if(!W.has(rt)){X[tt]=[];var q=rt;for($.push(q),W.add(q),X[tt].push(q);$.length!=0;){q=$.shift();var Z=x.get(q);Z.forEach(function(ft){W.has(ft.id)||($.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($,W){X.set(W,[])}),x.forEach(function($,W){$.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($,W){X.set(W,[])}),x.forEach(function($,W){$.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(q){var Z=new Set;x[q].forEach(function(vt){Z.add(vt)});var ft=new Set([].concat(u(Z)).filter(function(vt){return R.has(vt)})),Lt=void 0;ft.size>0?Lt=d[c.get(ft.values().next().value)]:Lt=j(Z).x,x[q].forEach(function(vt){p[I]=[Lt,m[c.get(vt)]],v[I]=[d[c.get(vt)],m[c.get(vt)]],I++})},$=0;$<x.length;$++)X($);w=!0}if(h.alignmentConstraint.horizontal){for(var W=h.alignmentConstraint.horizontal,tt=function(q){var Z=new Set;W[q].forEach(function(vt){Z.add(vt)});var ft=new Set([].concat(u(Z)).filter(function(vt){return R.has(vt)})),Lt=void 0;ft.size>0?Lt=d[c.get(ft.values().next().value)]:Lt=j(Z).y,W[q].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,K=0;K<z.length;K++)z[K].length>b&&(b=z[K].length,F=K);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)]},$=I.position,W=V($,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 $=new Set([].concat(u(X)).filter(function(tt){return R.has(tt)})),W=void 0;$.size>0?W=d[c.get($.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 $=new Set([].concat(u(X)).filter(function(tt){return R.has(tt)})),W=void 0;$.size>0?W=m[c.get($.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,$=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 q=h.alignmentConstraint.vertical,Z=function(ct){X.set("dummy"+ct,[]),q[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(q[ct][0])])},ft=0;ft<q.length;ft++)Z(ft);if(h.alignmentConstraint.horizontal)for(var Lt=h.alignmentConstraint.horizontal,vt=function(ct){$.set("dummy"+ct,[]),Lt[ct].forEach(function(Ct){x.set(Ct,"dummy"+ct),$.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),Zt=g(ot),re=g(it),Bt=[],Qt=[];Rt.forEach(function(St,ct){Bt[ct]=[],St.forEach(function(Ct){Zt.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 qt=D(ot,"horizontal",ht,W,Bt),$t=D(it,"vertical",rt,tt,Qt),jt=function(ct){X.get(ct)?X.get(ct).forEach(function(Ct){d[c.get(Ct)]=qt.get(ct)}):d[c.get(ct)]=qt.get(ct)},Kt=!0,Jt=!1,he=void 0;try{for(var ie=qt.keys()[Symbol.iterator](),le;!(Kt=(le=ie.next()).done);Kt=!0){var ae=le.value;jt(ae)}}catch(St){Jt=!0,he=St}finally{try{!Kt&&ie.return&&ie.return()}finally{if(Jt)throw he}}var pe=function(ct){$.get(ct)?$.get(ct).forEach(function(Ct){m[c.get(Ct)]=$t.get(ct)}):m[c.get(ct)]=$t.get(ct)},ne=!0,fe=!1,ue=void 0;try{for(var oe=$t.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,K=z.getRect().y,Y=z.getRect().y+z.getRect().height;b<f&&(f=b),F>h&&(h=F),K<N&&(N=K),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 K=z.length,Y=0;Y<K;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,K=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,K++}}d.idealEdgeLength!=null&&(K>0?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=F/K: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 K=C.boundingBox();et.push({x:K.x1+K.w/2,y:K.y1+K.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,$=!1;X<R;){x=Math.floor(Math.random()*E),$=!1;for(var W=0;W<X;W++)if(V[W]==x){$=!0;break}if(!$)V[X]=x,X++;else continue}},O=function(x,X,$){for(var W=[],tt=0,ht=0,rt=0,q=void 0,Z=[],ft=0,Lt=1,vt=0;vt<E;vt++)Z[vt]=g;for(W[ht]=x,Z[x]=0;ht>=tt;){rt=W[tt++];for(var Ot=L[rt],ot=0;ot<Ot.length;ot++)q=m.get(Ot[ot]),Z[q]==g&&(Z[q]=Z[rt]+1,W[++ht]=q);D[rt][X]=Z[rt]*C}if($){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 $=0;$<R;$++)O(V[$],$,x)}for(var ht=0;ht<E;ht++)for(var rt=0;rt<R;rt++)D[ht][rt]*=D[ht][rt];for(var q=0;q<R;q++)et[q]=[];for(var Z=0;Z<R;Z++)for(var ft=0;ft<R;ft++)et[Z][ft]=D[V[ft]][Z]},b=function(){for(var x=y.svd(et),X=x.S,$=x.U,W=x.V,tt=X[0]*X[0]*X[0],ht=[],rt=0;rt<R;rt++){ht[rt]=[];for(var q=0;q<R;q++)ht[rt][q]=0,rt==q&&(ht[rt][q]=X[rt]/(X[rt]*X[rt]+tt/(X[rt]*X[rt])))}e=i.multMat(i.multMat(W,ht),i.transpose($))},F=function(){for(var x=void 0,X=void 0,$=[],W=[],tt=[],ht=[],rt=0;rt<E;rt++)$[rt]=Math.random(),W[rt]=Math.random();$=i.normalize($),W=i.normalize(W);for(var q=p,Z=p,ft=void 0;;){for(var Lt=0;Lt<E;Lt++)tt[Lt]=$[Lt];if($=i.multGamma(i.multL(i.multGamma(tt),D,e)),x=i.dotProduct(tt,$),$=i.normalize($),q=i.dotProduct(tt,$),ft=Math.abs(q/Z),ft<=1+v&&ft>=1)break;Z=q}for(var vt=0;vt<E;vt++)tt[vt]=$[vt];for(Z=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),q=i.dotProduct(ht,W),ft=Math.abs(q/Z),ft<=1+v&&ft>=1)break;Z=q}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 K=0,Y=0;Y<N.length;Y++)N[Y].isParent()||m.set(N[Y].id(),K++);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,K++)}}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,$=x.nodes(":childless")[0].connectedEdges().length;x.nodes(":childless").forEach(function(W,tt){W.connectedEdges().length<$&&($=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),$=void 0;d.get(x).forEach(function(W){f.getElementById(W).isParent()?$=G.get(W):$=W,L[X].push($),L[m.get($)].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};