@cline/cli-windows-arm64 3.0.73 → 3.0.74

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 (142) hide show
  1. package/bin/cline.exe +2 -2
  2. package/package.json +1 -1
  3. package/cline-hub/webview/32x32.png +0 -0
  4. package/cline-hub/webview/assets/Chat-BhcO3lxR.js +0 -342
  5. package/cline-hub/webview/assets/abnfDiagram-N423BO3Z-CA3n4CVB.js +0 -1
  6. package/cline-hub/webview/assets/arc-3UKfLtkz.js +0 -1
  7. package/cline-hub/webview/assets/architectureDiagram-T3A2C74G-BGNrlwUL.js +0 -36
  8. package/cline-hub/webview/assets/array-BifhSqXX.js +0 -1
  9. package/cline-hub/webview/assets/badge-X4W3Q0cc.js +0 -1
  10. package/cline-hub/webview/assets/bash-B7CDPTg5.js +0 -1
  11. package/cline-hub/webview/assets/blockDiagram-VBNYF7ZC-CvIo5nET.js +0 -132
  12. package/cline-hub/webview/assets/bundle-mjs-CyB9GzWm.js +0 -1
  13. package/cline-hub/webview/assets/c4Diagram-5PPSVZJV-B91Sv2Na.js +0 -10
  14. package/cline-hub/webview/assets/channel-Cn9dB4WD.js +0 -1
  15. package/cline-hub/webview/assets/chunk-2GRJ4B5K-u4MGLwtv.js +0 -1
  16. package/cline-hub/webview/assets/chunk-2Q5K7J3B-C1jixKkw.js +0 -1
  17. package/cline-hub/webview/assets/chunk-4I5QYGJK-0RNwvBrV.js +0 -1
  18. package/cline-hub/webview/assets/chunk-5RXB4S5H-BHjkdRhh.js +0 -231
  19. package/cline-hub/webview/assets/chunk-5VM5RSS4-ZNzvKenW.js +0 -15
  20. package/cline-hub/webview/assets/chunk-6Q2QTUOP-CLgL8rxg.js +0 -88
  21. package/cline-hub/webview/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
  22. package/cline-hub/webview/assets/chunk-7Z6QIM7H-C6_Ywz3w.js +0 -10
  23. package/cline-hub/webview/assets/chunk-GF5L2VYU-iIVxDVKm.js +0 -206
  24. package/cline-hub/webview/assets/chunk-I66GZJ75-DXqP3B91.js +0 -126
  25. package/cline-hub/webview/assets/chunk-JQJVKLGR-CmK9TOTe.js +0 -156
  26. package/cline-hub/webview/assets/chunk-JWPE2WC7-DVXcaiue.js +0 -1
  27. package/cline-hub/webview/assets/chunk-KBJHAD2P-L-89C026.js +0 -1
  28. package/cline-hub/webview/assets/chunk-NSK5VX7P-D5026Kzu.js +0 -2
  29. package/cline-hub/webview/assets/chunk-QR6OTTB3-DgKOIk7B.js +0 -62
  30. package/cline-hub/webview/assets/chunk-RYQCIY6F-BUc8VYLJ.js +0 -1
  31. package/cline-hub/webview/assets/chunk-UBXNYLIW-DzzRI8B_.js +0 -1
  32. package/cline-hub/webview/assets/chunk-W5SLKNZC-jIqX_Eb5.js +0 -1
  33. package/cline-hub/webview/assets/chunk-WRU74C26-BSENSjFs.js +0 -70
  34. package/cline-hub/webview/assets/chunk-XXDRQBXY-DR-hrsFH.js +0 -1
  35. package/cline-hub/webview/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +0 -1
  36. package/cline-hub/webview/assets/classDiagram-JCYQIIEL-BMEETwfQ.js +0 -1
  37. package/cline-hub/webview/assets/classDiagram-v2-OCEON4UE-BMEETwfQ.js +0 -1
  38. package/cline-hub/webview/assets/cose-bilkent-JH36ORCC-DFv1GHTs.js +0 -1
  39. package/cline-hub/webview/assets/css-BsVw1vtW.js +0 -1
  40. package/cline-hub/webview/assets/cynefinDiagram-MW4NZA55-CIoeFR2b.js +0 -62
  41. package/cline-hub/webview/assets/dagre-VZM6K2ZE-CXd9m4cA.js +0 -4
  42. package/cline-hub/webview/assets/defaultLocale-BFoDCU3G.js +0 -1
  43. package/cline-hub/webview/assets/diagram-7IWD3JNH-CgiYOAGC.js +0 -30
  44. package/cline-hub/webview/assets/diagram-B4RE2ZJO-i1LZz3qn.js +0 -3
  45. package/cline-hub/webview/assets/diagram-LBJQPF4R-GOvZ7wow.js +0 -24
  46. package/cline-hub/webview/assets/diagram-Q27KOJAE-C-x1hqFU.js +0 -24
  47. package/cline-hub/webview/assets/diagram-UB23O5K3-Ds1emBxU.js +0 -41
  48. package/cline-hub/webview/assets/diff-woXpYk--.js +0 -1
  49. package/cline-hub/webview/assets/dist-BDCdLWk4.js +0 -1
  50. package/cline-hub/webview/assets/ebnfDiagram-BXEA7PRR-Bmu-47tU.js +0 -1
  51. package/cline-hub/webview/assets/erDiagram-JOGREHBK--TO8WYZl.js +0 -85
  52. package/cline-hub/webview/assets/extensions-view-CcwDTH9q.js +0 -1
  53. package/cline-hub/webview/assets/flowDiagram-UKHOOZJN-epuPN-mi.js +0 -1
  54. package/cline-hub/webview/assets/ganttDiagram-PKOTCBZU-BJMCqdx8.js +0 -292
  55. package/cline-hub/webview/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
  56. package/cline-hub/webview/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
  57. package/cline-hub/webview/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
  58. package/cline-hub/webview/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  59. package/cline-hub/webview/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
  60. package/cline-hub/webview/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
  61. package/cline-hub/webview/assets/gitGraphDiagram-DS77QQ5N-CFngxqjY.js +0 -106
  62. package/cline-hub/webview/assets/github-dark-C-LZuMrd.js +0 -1
  63. package/cline-hub/webview/assets/github-light-EUqPIrTm.js +0 -1
  64. package/cline-hub/webview/assets/highlighted-body-KPVGNVTW-D19paMBO.js +0 -1
  65. package/cline-hub/webview/assets/html-BY76lXLH.js +0 -1
  66. package/cline-hub/webview/assets/index-DlpuYMzW.js +0 -10
  67. package/cline-hub/webview/assets/index-hEQUiqGA.css +0 -1
  68. package/cline-hub/webview/assets/infoDiagram-6WML65LV-HYF3E1dT.js +0 -2
  69. package/cline-hub/webview/assets/init-C-OQMol4.js +0 -1
  70. package/cline-hub/webview/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  71. package/cline-hub/webview/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  72. package/cline-hub/webview/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  73. package/cline-hub/webview/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  74. package/cline-hub/webview/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  75. package/cline-hub/webview/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  76. package/cline-hub/webview/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  77. package/cline-hub/webview/assets/ishikawaDiagram-WSZJBQD7-BXMe4UcZ.js +0 -70
  78. package/cline-hub/webview/assets/javascript-BgS3c2Ky.js +0 -1
  79. package/cline-hub/webview/assets/journeyDiagram-NVQOT4AX-CRKFmsae.js +0 -139
  80. package/cline-hub/webview/assets/json-qhed-kSA.js +0 -1
  81. package/cline-hub/webview/assets/jsonc-CYpm1nAK.js +0 -1
  82. package/cline-hub/webview/assets/jsx-Bz0zcwM4.js +0 -1
  83. package/cline-hub/webview/assets/kanban-definition-27J2QSJJ-fGza5kV5.js +0 -89
  84. package/cline-hub/webview/assets/label-DFsbx3OI.js +0 -76
  85. package/cline-hub/webview/assets/line-BImJQVif.js +0 -1
  86. package/cline-hub/webview/assets/linear-CmpaHCv3.js +0 -1
  87. package/cline-hub/webview/assets/markdown-BYOwaDjH.js +0 -1
  88. package/cline-hub/webview/assets/mermaid-HWGCJPDP-C7YHt7l6.js +0 -1
  89. package/cline-hub/webview/assets/mermaid-layout-BadlRzDJ.js +0 -1
  90. package/cline-hub/webview/assets/mermaid-layout-BqskXFQG.js +0 -1
  91. package/cline-hub/webview/assets/mermaid-layout-C40rDmm9.js +0 -1
  92. package/cline-hub/webview/assets/mermaid-layout-CD-JajuE.js +0 -1
  93. package/cline-hub/webview/assets/mermaid-layout-CGd-uY3x.js +0 -321
  94. package/cline-hub/webview/assets/mermaid-markup-D01n6Kcj.js +0 -259
  95. package/cline-hub/webview/assets/mermaid-parser-B74RvNk1.js +0 -3
  96. package/cline-hub/webview/assets/mermaid-parser-ByV-ZOdd.js +0 -1
  97. package/cline-hub/webview/assets/mermaid-parser-C2jETkNP.js +0 -2
  98. package/cline-hub/webview/assets/mermaid-parser-C3SJa12Y.js +0 -1
  99. package/cline-hub/webview/assets/mermaid-parser-CFqrADy2.js +0 -4
  100. package/cline-hub/webview/assets/mermaid-parser-CiEp2wH6.js +0 -1
  101. package/cline-hub/webview/assets/mermaid-parser-DHwB1DNv.js +0 -161
  102. package/cline-hub/webview/assets/mermaid-parser-DgB__rYs.js +0 -1
  103. package/cline-hub/webview/assets/mermaid-parser-HclGiUj8.js +0 -1
  104. package/cline-hub/webview/assets/mermaid.core-CNhdxt2h.js +0 -42
  105. package/cline-hub/webview/assets/mindmap-definition-FAOFIHXS-CSIdPH6Q.js +0 -96
  106. package/cline-hub/webview/assets/ordinal-BDEzSJ7C.js +0 -1
  107. package/cline-hub/webview/assets/path-fybaL0A-.js +0 -1
  108. package/cline-hub/webview/assets/pegDiagram-VL7TDLO6-C6mMcz9U.js +0 -1
  109. package/cline-hub/webview/assets/pieDiagram-7S7Q4E2Y-_Em6O_U1.js +0 -39
  110. package/cline-hub/webview/assets/python-gzcpVVnB.js +0 -1
  111. package/cline-hub/webview/assets/quadrantDiagram-CIZ2JOQS-DAUZ-M5i.js +0 -7
  112. package/cline-hub/webview/assets/railroadDiagram-AXF67PYL-D-nONgIY.js +0 -1
  113. package/cline-hub/webview/assets/requirementDiagram-LRYGKXZP--TyKFbQR.js +0 -84
  114. package/cline-hub/webview/assets/rolldown-runtime-B0Z9INg1.js +0 -1
  115. package/cline-hub/webview/assets/rough.esm-Dy-Kn_BL.js +0 -1
  116. package/cline-hub/webview/assets/sankeyDiagram-W5VNT64P-D_L0wHGo.js +0 -40
  117. package/cline-hub/webview/assets/sequenceDiagram-SI44F4Z6-DQZqzwJM.js +0 -162
  118. package/cline-hub/webview/assets/settings-view-DEIwhwkV.js +0 -1
  119. package/cline-hub/webview/assets/shellscript-CLZ0U2zV.js +0 -1
  120. package/cline-hub/webview/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +0 -1
  121. package/cline-hub/webview/assets/src-BY_WSiz7.js +0 -1
  122. package/cline-hub/webview/assets/stateDiagram-OKZ733FA-CRrKMpks.js +0 -1
  123. package/cline-hub/webview/assets/stateDiagram-v2-UEYNNEHI-gzRtUcKB.js +0 -1
  124. package/cline-hub/webview/assets/swimlanes-SLNWSIFB-z7E3j6mU.js +0 -2
  125. package/cline-hub/webview/assets/swimlanesDiagram-ULZ7WXOC-eylwAnWt.js +0 -8
  126. package/cline-hub/webview/assets/switch-DrjcFF6_.js +0 -1
  127. package/cline-hub/webview/assets/timeline-definition-Z64GVDOM-s7-rEymV.js +0 -120
  128. package/cline-hub/webview/assets/tsx-udAQXfEw.js +0 -1
  129. package/cline-hub/webview/assets/typescript-bsJCZSQ-.js +0 -1
  130. package/cline-hub/webview/assets/vennDiagram-T6HMQDX7-HuTwN2dY.js +0 -34
  131. package/cline-hub/webview/assets/vscode-CFosRdBr.js +0 -1
  132. package/cline-hub/webview/assets/wardleyDiagram-T6FBY63Y-BG9WRwXn.js +0 -78
  133. package/cline-hub/webview/assets/xychartDiagram-ELKLHX3M-C0kPny3I.js +0 -7
  134. package/cline-hub/webview/assets/yaml-rwi0_p6S.js +0 -1
  135. package/cline-hub/webview/assets/zap-BF3XOCN3.js +0 -1
  136. package/cline-hub/webview/cline-logo-filled.svg +0 -5
  137. package/cline-hub/webview/favicon.svg +0 -6
  138. package/cline-hub/webview/icon.ico +0 -0
  139. package/cline-hub/webview/icon.png +0 -0
  140. package/cline-hub/webview/icon.svg +0 -5
  141. package/cline-hub/webview/index.html +0 -18
  142. package/extensions/plugin-sandbox-bootstrap.js +0 -570
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-B0Z9INg1.js";import{a as t,r as n}from"./mermaid-layout-BadlRzDJ.js";var r=e(((e,n)=>{(function(r,i){typeof e==`object`&&typeof n==`object`?n.exports=i(t()):typeof define==`function`&&define.amd?define([`layout-base`],i):typeof e==`object`?e.coseBase=i(t()):r.coseBase=i(r.layoutBase)})(e,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),880:((e,t,n)=>{var r=n(551).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),578:((e,t,n)=>{var r=n(551).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),c=n(806),l=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,f=n(551).Point,p=n(551).PointD,m=n(551).DimensionD,h=n(551).Layout,g=n(551).Integer,_=n(551).IGeometry,v=n(551).LGraph,y=n(551).Transform,b=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var S in x.prototype=Object.create(r.prototype),r)x[S]=r[S];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH<10?10:c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}if(this.totalIterations%u.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-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=c.PURE_INCREMENTAL?u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:u.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=c.PURE_INCREMENTAL?u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(u.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t,n=0;n<e.length;n++)t=e[n],t.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var n=0;n<e.length;n++)t=e[n],t.move()},x.prototype.initConstraintVariables=function(){var e=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var t=this.graphManager.getAllNodes(),n=0;n<t.length;n++){var r=t[n];this.idToNodeMap.set(r.id,r)}var i=function t(n){for(var r=n.getChild().getNodes(),i,a=0,o=0;o<r.length;o++)i=r[o],i.getChild()==null?e.fixedNodeSet.has(i.id)&&(a+=100):a+=t(i);return a};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(t){e.fixedNodeSet.add(t.nodeId)});for(var t=this.graphManager.getAllNodes(),r,n=0;n<t.length;n++)if(r=t[n],r.getChild()!=null){var a=i(r);a>0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var l=this.constraints.alignmentConstraint.vertical,n=0;n<l.length;n++)this.dummyToNodeForVerticalAlignment.set(`dummy`+n,[]),l[n].forEach(function(t){o.set(t,`dummy`+n),e.dummyToNodeForVerticalAlignment.get(`dummy`+n).push(t),e.fixedNodeSet.has(t)&&e.fixedNodesOnHorizontal.add(`dummy`+n)});if(this.constraints.alignmentConstraint.horizontal)for(var u=this.constraints.alignmentConstraint.horizontal,n=0;n<u.length;n++)this.dummyToNodeForHorizontalAlignment.set(`dummy`+n,[]),u[n].forEach(function(t){s.set(t,`dummy`+n),e.dummyToNodeForHorizontalAlignment.get(`dummy`+n).push(t),e.fixedNodeSet.has(t)&&e.fixedNodesOnVertical.add(`dummy`+n)})}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(e){var t,n,r;for(r=e.length-1;r>=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var d=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;d.has(t)?d.get(t).push(n):d.set(t,[n]),d.has(n)?d.get(n).push(t):d.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},m=p(d,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=m.components,this.fixedComponentsOnHorizontal=m.isFixed;var h=p(f,e.fixedNodesOnVertical);this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n<t.length;n++){for(var r=0,i=0;i<t[n].length;i++){if(this.fixedNodeSet.has(t[n][i])){r=0;break}r+=this.idToNodeMap.get(t[n][i]).displacementX}for(var a=r/t[n].length,i=0;i<t[n].length;i++)this.idToNodeMap.get(t[n][i]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal)for(var o=this.constraints.alignmentConstraint.horizontal,n=0;n<o.length;n++){for(var s=0,i=0;i<o[n].length;i++){if(this.fixedNodeSet.has(o[n][i])){s=0;break}s+=this.idToNodeMap.get(o[n][i]).displacementY}for(var l=s/o[n].length,i=0;i<o[n].length;i++)this.idToNodeMap.get(o[n][i]).displacementY=l}}if(this.constraints.relativePlacementConstraint){if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(t){if(!e.fixedNodesOnHorizontal.has(t)){var n=0;n=e.dummyToNodeForVerticalAlignment.has(t)?e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(t)[0]).displacementX:e.idToNodeMap.get(t).displacementX,e.nodeToRelativeConstraintMapHorizontal.get(t).forEach(function(r){if(r.right){var i=e.nodeToTempPositionMapHorizontal.get(r.right)-e.nodeToTempPositionMapHorizontal.get(t)-n;i<r.gap&&(n-=r.gap-i)}else{var i=e.nodeToTempPositionMapHorizontal.get(t)-e.nodeToTempPositionMapHorizontal.get(r.left)+n;i<r.gap&&(n+=r.gap-i)}}),e.nodeToTempPositionMapHorizontal.set(t,e.nodeToTempPositionMapHorizontal.get(t)+n),e.dummyToNodeForVerticalAlignment.has(t)?e.dummyToNodeForVerticalAlignment.get(t).forEach(function(t){e.idToNodeMap.get(t).displacementX=n}):e.idToNodeMap.get(t).displacementX=n}}),this.nodesInRelativeVertical.forEach(function(t){if(!e.fixedNodesOnHorizontal.has(t)){var n=0;n=e.dummyToNodeForHorizontalAlignment.has(t)?e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(t)[0]).displacementY:e.idToNodeMap.get(t).displacementY,e.nodeToRelativeConstraintMapVertical.get(t).forEach(function(r){if(r.bottom){var i=e.nodeToTempPositionMapVertical.get(r.bottom)-e.nodeToTempPositionMapVertical.get(t)-n;i<r.gap&&(n-=r.gap-i)}else{var i=e.nodeToTempPositionMapVertical.get(t)-e.nodeToTempPositionMapVertical.get(r.top)+n;i<r.gap&&(n+=r.gap-i)}}),e.nodeToTempPositionMapVertical.set(t,e.nodeToTempPositionMapVertical.get(t)+n),e.dummyToNodeForHorizontalAlignment.has(t)?e.dummyToNodeForHorizontalAlignment.get(t).forEach(function(t){e.idToNodeMap.get(t).displacementY=n}):e.idToNodeMap.get(t).displacementY=n}});else{for(var n=0;n<this.componentsOnHorizontal.length;n++){var u=this.componentsOnHorizontal[n];if(this.fixedComponentsOnHorizontal[n])for(var i=0;i<u.length;i++)this.dummyToNodeForVerticalAlignment.has(u[i])?this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t){e.idToNodeMap.get(t).displacementX=0}):this.idToNodeMap.get(u[i]).displacementX=0;else{for(var d=0,f=0,i=0;i<u.length;i++)if(this.dummyToNodeForVerticalAlignment.has(u[i])){var p=this.dummyToNodeForVerticalAlignment.get(u[i]);d+=p.length*this.idToNodeMap.get(p[0]).displacementX,f+=p.length}else d+=this.idToNodeMap.get(u[i]).displacementX,f++;for(var m=d/f,i=0;i<u.length;i++)this.dummyToNodeForVerticalAlignment.has(u[i])?this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t){e.idToNodeMap.get(t).displacementX=m}):this.idToNodeMap.get(u[i]).displacementX=m}}for(var n=0;n<this.componentsOnVertical.length;n++){var u=this.componentsOnVertical[n];if(this.fixedComponentsOnVertical[n])for(var i=0;i<u.length;i++)this.dummyToNodeForHorizontalAlignment.has(u[i])?this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t){e.idToNodeMap.get(t).displacementY=0}):this.idToNodeMap.get(u[i]).displacementY=0;else{for(var d=0,f=0,i=0;i<u.length;i++)if(this.dummyToNodeForHorizontalAlignment.has(u[i])){var p=this.dummyToNodeForHorizontalAlignment.get(u[i]);d+=p.length*this.idToNodeMap.get(p[0]).displacementY,f+=p.length}else d+=this.idToNodeMap.get(u[i]).displacementY,f++;for(var m=d/f,i=0;i<u.length;i++)this.dummyToNodeForHorizontalAlignment.has(u[i])?this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t){e.idToNodeMap.get(t).displacementY=m}):this.idToNodeMap.get(u[i]).displacementY=m}}}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i;for(i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},x.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t=new Set,n;for(n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new p),r.getBendpoints().push(new p),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1){var s;for(s=0;s<o.length;s++){var c=o[s];c.getBendpoints().push(new p),this.createDummyNodesForBendpoints(c)}}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},x.prototype.positionNodesRadially=function(e){for(var t=new f(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new p(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=c.DEFAULT_COMPONENT_SEPERATION),r=0);var l=e[s],u=h.findCenterOfTree(l);t.x=a,t.y=i,o=x.radialLayout(l,u,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new p(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},x.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*_.TWO_PI/360,c=i*Math.cos(s),l=i*Math.sin(s);e.setCenter(c,l);var u=[];u=u.concat(e.getEdges());var d=u.length;t!=null&&d--;for(var f=0,p=u.length,m,h=e.getEdgesBetween(t);h.length>1;){var g=h[0];h.splice(0,1);var v=u.indexOf(g);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var S=u[b].getOtherEnd(e);if(S!=t){var C=(n+f*y)%360,w=(C+y)%360;x.branchRadialLayout(S,e,C,w,i+a,a),f++}}},x.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],c=a.getParent().id;t[c]===void 0&&(t[c]=[]),t[c]=t[c].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;l<t[n].length;l++){var u=t[n][l];c.remove(u),s.add(u)}}})},x.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},x.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];if(t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height,r.setCenter(t[n].centerX,t[n].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var i=r.rect.width,a=r.rect.height;r.labelWidth&&(r.labelPosHorizontal==`left`?(r.rect.x-=r.labelWidth,r.setWidth(i+r.labelWidth),r.labelMarginLeft=r.labelWidth):r.labelPosHorizontal==`center`&&r.labelWidth>i?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},x.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},x.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},x.prototype.adjustLocations=function(e,t,n,r,i,a,o){t+=r+a,n+=i+o;for(var s=t,c=0;c<e.rows.length;c++){var l=e.rows[c];t=s;for(var u=0,d=0;d<l.length;d++){var f=l[d];f.rect.x=t,f.rect.y=n,t+=f.rect.width+e.horizontalPadding,f.rect.height>u&&(u=f.rect.height)}n+=u+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},x.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)<i?r:n},x.prototype.getOrgRatio=function(e){var t=e.width/e.height;return t<1&&(t=1/t),t},x.prototype.calcIdealRowWidth=function(e,t){var n=c.TILING_PADDING_VERTICAL,r=c.TILING_PADDING_HORIZONTAL,i=e.length,a=0,o=0,s=0;e.forEach(function(e){a+=e.getWidth(),o+=e.getHeight(),e.getWidth()>s&&(s=e.getWidth())});var l=a/i,u=o/i,d=(n-r)**2+4*(l+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(l+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(l+r)-r;return s>m&&(m=s),m+=r*2,m},x.prototype.tileNodesByFavoringDim=function(e,t,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},l=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=l;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var u=0,d=0,f=0;f<e.length;f++){var p=e[f];u+=p.getCenterX(),d+=p.getCenterY()}o.centerX=u/e.length,o.centerY=d/e.length;for(var f=0;f<e.length;f++){var p=e[f];if(o.rows.length==0)this.insertNodeToRow(o,p,0,t);else if(this.canAddHorizontal(o,p.rect.width,p.rect.height)){var m=o.rows.length-1;o.idealRowWidth||(m=this.getShortestRowIndex(o)),this.insertNodeToRow(o,p,m,t)}else this.insertNodeToRow(o,p,o.rows.length,t);this.shiftToLastRow(o)}return o},x.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},x.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]<n&&i>0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.width<t?(e.height+o)/t:(e.height+o)/e.width;return c<1&&(c=1/c),s<1&&(s=1/s),s<c},x.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.height+=l-c,this.shiftToLastRow(e)}},x.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)if(n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null){if(c.PURE_INCREMENTAL){var o=n.getEdges()[0].getOtherEnd(n),s=new m(n.getCenterX()-o.getCenterX(),n.getCenterY()-o.getCenterY());i.push([n,n.getEdges()[0],n.getOwner(),s])}else i.push([n,n.getEdges()[0],n.getOwner()]);t=!0}if(t==1){for(var l=[],u=0;u<i.length;u++)i[u][0].getEdges().length==1&&(l.push(i[u]),i[u][0].getOwner().remove(i[u][0]));e.push(l),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},x.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];if(n=r==e[1].source?e[1].target:e[1].source,c.PURE_INCREMENTAL)r.setCenter(n.getCenterX()+e[3].getWidth(),n.getCenterY()+e[3].getHeight());else{var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,l=[0,0,0,0];if(o>0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a<this.grid.length-1)for(var d=o;d<=s;d++)l[1]+=this.grid[a+1][d].length+this.grid[a][d].length-1;if(s<this.grid[0].length-1)for(var d=i;d<=a;d++)l[2]+=this.grid[d][s+1].length+this.grid[d][s].length-1;if(i>0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=g.MAX_VALUE,p,m,h=0;h<l.length;h++)l[h]<f?(f=l[h],p=1,m=h):l[h]==f&&p++;if(p==3&&f==0)l[0]==0&&l[1]==0&&l[2]==0?t=1:l[0]==0&&l[1]==0&&l[3]==0?t=0:l[0]==0&&l[2]==0&&l[3]==0?t=3:l[1]==0&&l[2]==0&&l[3]==0&&(t=2);else if(p==2&&f==0){var _=Math.floor(Math.random()*2);t=l[0]==0&&l[1]==0?_==0?0:1:l[0]==0&&l[2]==0?_==0?0:2:l[0]==0&&l[3]==0?_==0?0:3:l[1]==0&&l[2]==0?_==0?1:2:l[1]==0&&l[3]==0?_==0?1:3:_==0?2:3}else if(p==4&&f==0){var _=Math.floor(Math.random()*4);t=_}else t=m;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-u.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+u.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+u.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-u.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())}},e.exports=x}),991:((e,t,n)=>{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.move=function(){var e=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),902:((e,t,n)=>{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(806),a=n(551).LinkedList,o=n(551).Matrix,s=n(551).SVD;function c(){}c.handleConstraints=function(e){var t={};t.fixedNodeConstraint=e.constraints.fixedNodeConstraint,t.alignmentConstraint=e.constraints.alignmentConstraint,t.relativePlacementConstraint=e.constraints.relativePlacementConstraint;for(var n=new Map,c=new Map,l=[],u=[],d=e.getAllNodes(),f=0,p=0;p<d.length;p++){var m=d[p];m.getChild()??(c.set(m.id,f++),l.push(m.getCenterX()),u.push(m.getCenterY()),n.set(m.id,m))}t.relativePlacementConstraint&&t.relativePlacementConstraint.forEach(function(e){!e.gap&&e.gap!=0&&(e.gap=e.left?i.DEFAULT_EDGE_LENGTH+n.get(e.left).getWidth()/2+n.get(e.right).getWidth()/2:i.DEFAULT_EDGE_LENGTH+n.get(e.top).getHeight()/2+n.get(e.bottom).getHeight()/2)});var h=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},g=function(e){var t=0,n=0;return e.forEach(function(e){t+=l[c.get(e)],n+=u[c.get(e)]}),{x:t/e.size,y:n/e.size}},_=function(e,t,n,i,o){function s(e,t){var n=new Set(e),r=!0,i=!1,a=void 0;try{for(var o=t[Symbol.iterator](),s;!(r=(s=o.next()).done);r=!0){var c=s.value;n.add(c)}}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}var d=new Map;e.forEach(function(e,t){d.set(t,0)}),e.forEach(function(e,t){e.forEach(function(e){d.set(e.id,d.get(e.id)+1)})});var f=new Map,p=new Map,m=new a;d.forEach(function(e,r){e==0?(m.push(r),n||(t==`horizontal`?f.set(r,c.has(r)?l[c.get(r)]:i.get(r)):f.set(r,c.has(r)?u[c.get(r)]:i.get(r)))):f.set(r,-1/0),n&&p.set(r,new Set([r]))}),n&&o.forEach(function(e){var r=[];if(e.forEach(function(e){n.has(e)&&r.push(e)}),r.length>0){var a=0;r.forEach(function(e){t==`horizontal`?(f.set(e,c.has(e)?l[c.get(e)]:i.get(e)),a+=f.get(e)):(f.set(e,c.has(e)?u[c.get(e)]:i.get(e)),a+=f.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||f.set(e,a)})}else{var o=0;e.forEach(function(e){o+=t==`horizontal`?c.has(e)?l[c.get(e)]:i.get(e):c.has(e)?u[c.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){f.set(e,o)})}});for(var h=function(){var r=m.shift();e.get(r).forEach(function(e){if(f.get(e.id)<f.get(r)+e.gap){if(n&&n.has(e.id)){var a=void 0;if(a=t==`horizontal`?c.has(e.id)?l[c.get(e.id)]:i.get(e.id):c.has(e.id)?u[c.get(e.id)]:i.get(e.id),f.set(e.id,a),a<f.get(r)+e.gap){var o=f.get(r)+e.gap-a;p.get(r).forEach(function(e){f.set(e,f.get(e)-o)})}}else f.set(e.id,f.get(r)+e.gap)}d.set(e.id,d.get(e.id)-1),d.get(e.id)==0&&m.push(e.id),n&&p.set(e.id,s(p.get(r),p.get(e.id)))})};m.length!=0;)h();if(n){var g=new Set;e.forEach(function(e,t){e.length==0&&g.add(t)});var _=[];p.forEach(function(e,t){if(g.has(t)){var i=!1,a=!0,o=!1,s=void 0;try{for(var c=e[Symbol.iterator](),l;!(a=(l=c.next()).done);a=!0){var u=l.value;n.has(u)&&(i=!0)}}catch(e){o=!0,s=e}finally{try{!a&&c.return&&c.return()}finally{if(o)throw s}}if(!i){var d=!1,f=void 0;_.forEach(function(t,n){t.has([].concat(r(e))[0])&&(d=!0,f=n)}),d?e.forEach(function(e){_[f].add(e)}):_.push(new Set(e))}}}),_.forEach(function(e,n){var r=1/0,a=1/0,o=-1/0,s=-1/0,d=!0,p=!1,m=void 0;try{for(var h=e[Symbol.iterator](),g;!(d=(g=h.next()).done);d=!0){var _=g.value,v=void 0;v=t==`horizontal`?c.has(_)?l[c.get(_)]:i.get(_):c.has(_)?u[c.get(_)]:i.get(_);var y=f.get(_);v<r&&(r=v),v>o&&(o=v),y<a&&(a=y),y>s&&(s=y)}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}var b=(r+o)/2-(a+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;f.set(E,f.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return f},v=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?l[c.get(e.left)]-l[c.get(e.right)]>=0?t++:n++:u[c.get(e.top)]-u[c.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;a<c.size;a++)l[a]=-1*l[a],u[a]=-1*u[a];else if(t>n)for(var o=0;o<c.size;o++)l[o]=-1*l[o];else if(r>i)for(var s=0;s<c.size;s++)u[s]=-1*u[s]},y=function(e){var t=[],n=new a,r=new Set,i=0;return e.forEach(function(a,o){if(!r.has(o)){t[i]=[];var s=o;for(n.push(s),r.add(s),t[i].push(s);n.length!=0;)s=n.shift(),e.get(s).forEach(function(e){r.has(e.id)||(n.push(e.id),r.add(e.id),t[i].push(e.id))});i++}}),t},b=function(e){var t=new Map;return e.forEach(function(e,n){t.set(n,[])}),e.forEach(function(e,n){e.forEach(function(e){t.get(n).push(e),t.get(e.id).push({id:n,gap:e.gap,direction:e.direction})})}),t},x=function(e){var t=new Map;return e.forEach(function(e,n){t.set(n,[])}),e.forEach(function(e,n){e.forEach(function(e){t.get(e.id).push({id:n,gap:e.gap,direction:e.direction})})}),t},S=[],C=[],w=!1,T=!1,E=new Set,D=new Map,O=new Map,k=[];if(t.fixedNodeConstraint&&t.fixedNodeConstraint.forEach(function(e){E.add(e.nodeId)}),t.relativePlacementConstraint&&(t.relativePlacementConstraint.forEach(function(e){e.left?(D.has(e.left)?D.get(e.left).push({id:e.right,gap:e.gap,direction:`horizontal`}):D.set(e.left,[{id:e.right,gap:e.gap,direction:`horizontal`}]),D.has(e.right)||D.set(e.right,[])):(D.has(e.top)?D.get(e.top).push({id:e.bottom,gap:e.gap,direction:`vertical`}):D.set(e.top,[{id:e.bottom,gap:e.gap,direction:`vertical`}]),D.has(e.bottom)||D.set(e.bottom,[]))}),O=b(D),k=y(O)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(t.fixedNodeConstraint&&t.fixedNodeConstraint.length>1)t.fixedNodeConstraint.forEach(function(e,t){S[t]=[e.position.x,e.position.y],C[t]=[l[c.get(e.nodeId)],u[c.get(e.nodeId)]]}),w=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return E.has(e)})),o=void 0;o=a.size>0?l[c.get(a.values().next().value)]:g(i).x,n[t].forEach(function(t){S[e]=[o,u[c.get(t)]],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},a=0;a<n.length;a++)i(a);w=!0}if(t.alignmentConstraint.horizontal){for(var o=t.alignmentConstraint.horizontal,s=function(t){var n=new Set;o[t].forEach(function(e){n.add(e)});var i=new Set([].concat(r(n)).filter(function(e){return E.has(e)})),a=void 0;a=i.size>0?l[c.get(i.values().next().value)]:g(n).y,o[t].forEach(function(t){S[e]=[l[c.get(t)],a],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},d=0;d<o.length;d++)s(d);w=!0}t.relativePlacementConstraint&&(T=!0)})();else if(t.relativePlacementConstraint){for(var A=0,j=0,M=0;M<k.length;M++)k[M].length>A&&(A=k[M].length,j=M);if(A<O.size/2)v(t.relativePlacementConstraint),w=!1,T=!1;else{var N=new Map,P=new Map,F=[];k[j].forEach(function(e){D.get(e).forEach(function(t){t.direction==`horizontal`?(N.has(e)?N.get(e).push(t):N.set(e,[t]),N.has(t.id)||N.set(t.id,[]),F.push({left:e,right:t.id})):(P.has(e)?P.get(e).push(t):P.set(e,[t]),P.has(t.id)||P.set(t.id,[]),F.push({top:e,bottom:t.id}))})}),v(F),T=!1;var I=_(N,`horizontal`),ee=_(P,`vertical`);k[j].forEach(function(e,t){C[t]=[l[c.get(e)],u[c.get(e)]],S[t]=[],I.has(e)?S[t][0]=I.get(e):S[t][0]=l[c.get(e)],ee.has(e)?S[t][1]=ee.get(e):S[t][1]=u[c.get(e)]}),w=!0}}if(w){for(var L=void 0,R=o.transpose(S),z=o.transpose(C),B=0;B<R.length;B++)R[B]=o.multGamma(R[B]),z[B]=o.multGamma(z[B]);var V=o.multMat(R,o.transpose(z)),H=s.svd(V);L=o.multMat(H.V,o.transpose(H.U));for(var U=0;U<c.size;U++){var W=[l[U],u[U]],G=[L[0][0],L[1][0]],K=[L[0][1],L[1][1]];l[U]=o.dotProduct(W,G),u[U]=o.dotProduct(W,K)}T&&v(t.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(t.fixedNodeConstraint&&t.fixedNodeConstraint.length>0){var q={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:l[c.get(e.nodeId)],y:u[c.get(e.nodeId)]},r=e.position,i=h(r,n);q.x+=i.x,q.y+=i.y}),q.x/=t.fixedNodeConstraint.length,q.y/=t.fixedNodeConstraint.length,l.forEach(function(e,t){l[t]+=q.x}),u.forEach(function(e,t){u[t]+=q.y}),t.fixedNodeConstraint.forEach(function(e){l[c.get(e.nodeId)]=e.position.x,u[c.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var J=t.alignmentConstraint.vertical,te=function(e){var t=new Set;J[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?l[c.get(n.values().next().value)]:g(t).x,t.forEach(function(e){E.has(e)||(l[c.get(e)]=i)})},Y=0;Y<J.length;Y++)te(Y);if(t.alignmentConstraint.horizontal)for(var X=t.alignmentConstraint.horizontal,ne=function(e){var t=new Set;X[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?u[c.get(n.values().next().value)]:g(t).y,t.forEach(function(e){E.has(e)||(u[c.get(e)]=i)})},Z=0;Z<X.length;Z++)ne(Z)}t.relativePlacementConstraint&&(function(){var e=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,d=new Set;if(E.forEach(function(e){s.add(e),d.add(e)}),t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var f=t.alignmentConstraint.vertical,p=function(t){r.set(`dummy`+t,[]),f[t].forEach(function(n){e.set(n,`dummy`+t),r.get(`dummy`+t).push(n),E.has(n)&&s.add(`dummy`+t)}),a.set(`dummy`+t,l[c.get(f[t][0])])},m=0;m<f.length;m++)p(m);if(t.alignmentConstraint.horizontal)for(var h=t.alignmentConstraint.horizontal,g=function(e){i.set(`dummy`+e,[]),h[e].forEach(function(t){n.set(t,`dummy`+e),i.get(`dummy`+e).push(t),E.has(t)&&d.add(`dummy`+e)}),o.set(`dummy`+e,u[c.get(h[e][0])])},v=0;v<h.length;v++)g(v)}var S=new Map,C=new Map,w=function(t){D.get(t).forEach(function(r){var i=void 0,a=void 0;r.direction==`horizontal`?(i=e.get(t)?e.get(t):t,a=e.get(r.id)?{id:e.get(r.id),gap:r.gap,direction:r.direction}:r,S.has(i)?S.get(i).push(a):S.set(i,[a]),S.has(a.id)||S.set(a.id,[])):(i=n.get(t)?n.get(t):t,a=n.get(r.id)?{id:n.get(r.id),gap:r.gap,direction:r.direction}:r,C.has(i)?C.get(i).push(a):C.set(i,[a]),C.has(a.id)||C.set(a.id,[]))})},T=!0,O=!1,k=void 0;try{for(var A=D.keys()[Symbol.iterator](),j;!(T=(j=A.next()).done);T=!0){var M=j.value;w(M)}}catch(e){O=!0,k=e}finally{try{!T&&A.return&&A.return()}finally{if(O)throw k}}var N=b(S),P=b(C),F=y(N),I=y(P),ee=x(S),L=x(C),R=[],z=[];F.forEach(function(e,t){R[t]=[],e.forEach(function(e){ee.get(e).length==0&&R[t].push(e)})}),I.forEach(function(e,t){z[t]=[],e.forEach(function(e){L.get(e).length==0&&z[t].push(e)})});var B=_(S,`horizontal`,s,a,R),V=_(C,`vertical`,d,o,z),H=function(e){r.get(e)?r.get(e).forEach(function(t){l[c.get(t)]=B.get(e)}):l[c.get(e)]=B.get(e)},U=!0,W=!1,G=void 0;try{for(var K=B.keys()[Symbol.iterator](),q;!(U=(q=K.next()).done);U=!0){var J=q.value;H(J)}}catch(e){W=!0,G=e}finally{try{!U&&K.return&&K.return()}finally{if(W)throw G}}var te=function(e){i.get(e)?i.get(e).forEach(function(t){u[c.get(t)]=V.get(e)}):u[c.get(e)]=V.get(e)},Y=!0,X=!1,ne=void 0;try{for(var Z=V.keys()[Symbol.iterator](),Q;!(Y=(Q=Z.next()).done);Y=!0){var J=Q.value;te(J)}}catch(e){X=!0,ne=e}finally{try{!Y&&Z.return&&Z.return()}finally{if(X)throw ne}}})()}for(var Q=0;Q<d.length;Q++){var $=d[Q];$.getChild()??$.setCenter(l[c.get($.id)],u[c.get($.id)])}},e.exports=c}),551:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),i=e(((e,t)=>{(function(r,i){typeof e==`object`&&typeof t==`object`?t.exports=i(n()):typeof define==`function`&&define.amd?define([`layout-base`],i):typeof e==`object`?e.coseBase=i(n()):r.coseBase=i(r.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),(function(e,t,n){var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),c=n(1),l=n(0).FDLayoutConstants,u=n(0).LayoutConstants,d=n(0).Point,f=n(0).PointD,p=n(0).Layout,m=n(0).Integer,h=n(0).IGeometry,g=n(0).LGraph,_=n(0).Transform;function v(){r.call(this),this.toBeTiled={}}for(var y in v.prototype=Object.create(r.prototype),r)v[y]=r[y];v.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},v.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},v.prototype.newNode=function(e){return new o(this.graphManager,e)},v.prototype.newEdge=function(e){return new s(null,null,e)},v.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH<10?10:c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=l.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=l.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.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/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=l.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.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){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.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%l.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-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.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=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(l.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i;for(i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},v.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t=new Set,n;for(n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new f),r.getBendpoints().push(new f),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1){var s;for(s=0;s<o.length;s++){var c=o[s];c.getBendpoints().push(new f),this.createDummyNodesForBendpoints(c)}}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},v.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new f(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=c.DEFAULT_COMPONENT_SEPERATION),r=0);var l=e[s],m=p.findCenterOfTree(l);t.x=a,t.y=i,o=v.radialLayout(l,m,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},v.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(t,null,0,359,0,r);var i=g.calculateBounds(e),a=new _;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new f(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},v.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*h.TWO_PI/360,c=i*Math.cos(s),l=i*Math.sin(s);e.setCenter(c,l);var u=[];u=u.concat(e.getEdges());var d=u.length;t!=null&&d--;for(var f=0,p=u.length,m,g=e.getEdgesBetween(t);g.length>1;){var _=g[0];g.splice(0,1);var y=u.indexOf(_);y>=0&&u.splice(y,1),p--,d--}m=t==null?0:(u.indexOf(g[0])+1)%p;for(var b=Math.abs(r-n)/d,x=m;f!=d;x=++x%p){var S=u[x].getOtherEnd(e);if(S!=t){var C=(n+f*b)%360,w=(C+b)%360;v.branchRadialLayout(S,e,C,w,i+a,a),f++}}},v.maxDiagonalInTree=function(e){for(var t=m.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],c=a.getParent().id;t[c]===void 0&&(t[c]=[]),t[c]=t[c].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;l<t[n].length;l++){var u=t[n][l];c.remove(u),s.add(u)}}})},v.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},v.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height})},v.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},v.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},v.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},v.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},v.prototype.adjustLocations=function(e,t,n,r,i){t+=r,n+=i;for(var a=t,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var c=0,l=0;l<s.length;l++){var u=s[l];u.rect.x=t,u.rect.y=n,t+=u.rect.width+e.horizontalPadding,u.rect.height>c&&(c=u.rect.height)}n+=c+e.verticalPadding}},v.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},v.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height<t.rect.width*t.rect.height)});for(var r=0;r<e.length;r++){var i=e[r];n.rows.length==0?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},v.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},v.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]<n&&r>0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.width<t?(e.height+a)/t:(e.height+a)/e.width;return s<1&&(s=1/s),o<1&&(o=1/o),o<s},v.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.height+=l-c,this.shiftToLastRow(e)}},v.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null&&(i.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(t==1){for(var o=[],s=0;s<i.length;s++)i[s][0].getEdges().length==1&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];n=r==e[1].source?e[1].target:e[1].source;var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,c=[0,0,0,0];if(o>0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a<this.grid.length-1)for(var u=o;u<=s;u++)c[1]+=this.grid[a+1][u].length+this.grid[a][u].length-1;if(s<this.grid[0].length-1)for(var u=i;u<=a;u++)c[2]+=this.grid[u][s+1].length+this.grid[u][s].length-1;if(i>0)for(var u=o;u<=s;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d=m.MAX_VALUE,f,p,h=0;h<c.length;h++)c[h]<d?(d=c[h],f=1,p=h):c[h]==d&&f++;if(f==3&&d==0)c[0]==0&&c[1]==0&&c[2]==0?t=1:c[0]==0&&c[1]==0&&c[3]==0?t=0:c[0]==0&&c[2]==0&&c[3]==0?t=3:c[1]==0&&c[2]==0&&c[3]==0&&(t=2);else if(f==2&&d==0){var g=Math.floor(Math.random()*2);t=c[0]==0&&c[1]==0?g==0?0:1:c[0]==0&&c[2]==0?g==0?0:2:c[0]==0&&c[3]==0?g==0?0:3:c[1]==0&&c[2]==0?g==0?1:2:c[1]==0&&c[3]==0?g==0?1:3:g==0?2:3}else if(f==4&&d==0){var g=Math.floor(Math.random()*4);t=g}else t=p;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-l.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+l.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+l.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-l.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=v}),(function(e,t,n){var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r})])})}));export{r as n,i as t};
@@ -1 +0,0 @@
1
- var e=typeof global==`object`&&global&&global.Object===Object&&global,t=typeof self==`object`&&self&&self.Object===Object&&self,n=e||t||Function(`return this`)(),r=n.Symbol,i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;function c(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch{}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}var l=Object.prototype.toString;function u(e){return l.call(e)}var d=`[object Null]`,f=`[object Undefined]`,p=r?r.toStringTag:void 0;function m(e){return e==null?e===void 0?f:d:p&&p in Object(e)?c(e):u(e)}function h(e){return typeof e==`object`&&!!e}var g=`[object Symbol]`;function _(e){return typeof e==`symbol`||h(e)&&m(e)==g}function v(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var y=Array.isArray,ee=1/0,te=r?r.prototype:void 0,ne=te?te.toString:void 0;function re(e){if(typeof e==`string`)return e;if(y(e))return v(e,re)+``;if(_(e))return ne?ne.call(e):``;var t=e+``;return t==`0`&&1/e==-ee?`-0`:t}var ie=/\s/;function ae(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var oe=/^\s+/;function se(e){return e&&e.slice(0,ae(e)+1).replace(oe,``)}function b(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var ce=NaN,le=/^[-+]0x[0-9a-f]+$/i,ue=/^0b[01]+$/i,de=/^0o[0-7]+$/i,fe=parseInt;function pe(e){if(typeof e==`number`)return e;if(_(e))return ce;if(b(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=b(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=se(e);var n=ue.test(e);return n||de.test(e)?fe(e.slice(2),n?2:8):le.test(e)?ce:+e}var me=1/0,he=17976931348623157e292;function ge(e){return e?(e=pe(e),e===me||e===-me?(e<0?-1:1)*he:e===e?e:0):e===0?e:0}function _e(e){var t=ge(e),n=t%1;return t===t?n?t-n:t:0}function x(e){return e}var ve=`[object AsyncFunction]`,ye=`[object Function]`,be=`[object GeneratorFunction]`,xe=`[object Proxy]`;function Se(e){if(!b(e))return!1;var t=m(e);return t==ye||t==be||t==ve||t==xe}var Ce=n[`__core-js_shared__`],we=function(){var e=/[^.]+$/.exec(Ce&&Ce.keys&&Ce.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function Te(e){return!!we&&we in e}var Ee=Function.prototype.toString;function S(e){if(e!=null){try{return Ee.call(e)}catch{}try{return e+``}catch{}}return``}var De=/[\\^$.*+?()[\]{}|]/g,Oe=/^\[object .+?Constructor\]$/,ke=Function.prototype,Ae=Object.prototype,je=ke.toString,Me=Ae.hasOwnProperty,Ne=RegExp(`^`+je.call(Me).replace(De,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Pe(e){return!b(e)||Te(e)?!1:(Se(e)?Ne:Oe).test(S(e))}function Fe(e,t){return e?.[t]}function C(e,t){var n=Fe(e,t);return Pe(n)?n:void 0}var Ie=C(n,`WeakMap`),Le=Object.create,Re=function(){function e(){}return function(t){if(!b(t))return{};if(Le)return Le(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ze(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Be(){}function Ve(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var He=800,Ue=16,We=Date.now;function Ge(e){var t=0,n=0;return function(){var r=We(),i=Ue-(r-n);if(n=r,i>0){if(++t>=He)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ke(e){return function(){return e}}var qe=function(){try{var e=C(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Je=Ge(qe?function(e,t){return qe(e,`toString`,{configurable:!0,enumerable:!1,value:Ke(t),writable:!0})}:x);function Ye(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Xe(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Ze(e){return e!==e}function Qe(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function $e(e,t,n){return t===t?Qe(e,t,n):Xe(e,Ze,n)}function et(e,t){return!!(e!=null&&e.length)&&$e(e,t,0)>-1}var tt=9007199254740991,nt=/^(?:0|[1-9]\d*)$/;function rt(e,t){var n=typeof e;return t??=tt,!!t&&(n==`number`||n!=`symbol`&&nt.test(e))&&e>-1&&e%1==0&&e<t}function it(e,t,n){t==`__proto__`&&qe?qe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function w(e,t){return e===t||e!==e&&t!==t}var at=Object.prototype.hasOwnProperty;function ot(e,t,n){var r=e[t];(!(at.call(e,t)&&w(r,n))||n===void 0&&!(t in e))&&it(e,t,n)}function T(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?it(n,s,c):ot(n,s,c)}return n}var st=Math.max;function ct(e,t,n){return t=st(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=st(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),ze(e,this,s)}}function E(e,t){return Je(ct(e,t,x),e+``)}var lt=9007199254740991;function ut(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=lt}function D(e){return e!=null&&ut(e.length)&&!Se(e)}function O(e,t,n){if(!b(n))return!1;var r=typeof t;return(r==`number`?D(n)&&rt(t,n.length):r==`string`&&t in n)?w(n[t],e):!1}function dt(e){return E(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&O(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var ft=Object.prototype;function k(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ft)}function pt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var mt=`[object Arguments]`;function ht(e){return h(e)&&m(e)==mt}var gt=Object.prototype,_t=gt.hasOwnProperty,vt=gt.propertyIsEnumerable,A=ht(function(){return arguments}())?ht:function(e){return h(e)&&_t.call(e,`callee`)&&!vt.call(e,`callee`)};function yt(){return!1}var bt=typeof exports==`object`&&exports&&!exports.nodeType&&exports,xt=bt&&typeof module==`object`&&module&&!module.nodeType&&module,St=xt&&xt.exports===bt?n.Buffer:void 0,j=(St?St.isBuffer:void 0)||yt,Ct=`[object Arguments]`,wt=`[object Array]`,Tt=`[object Boolean]`,Et=`[object Date]`,Dt=`[object Error]`,Ot=`[object Function]`,kt=`[object Map]`,At=`[object Number]`,jt=`[object Object]`,Mt=`[object RegExp]`,Nt=`[object Set]`,Pt=`[object String]`,Ft=`[object WeakMap]`,It=`[object ArrayBuffer]`,Lt=`[object DataView]`,Rt=`[object Float32Array]`,zt=`[object Float64Array]`,Bt=`[object Int8Array]`,Vt=`[object Int16Array]`,Ht=`[object Int32Array]`,Ut=`[object Uint8Array]`,Wt=`[object Uint8ClampedArray]`,Gt=`[object Uint16Array]`,Kt=`[object Uint32Array]`,M={};M[Rt]=M[zt]=M[Bt]=M[Vt]=M[Ht]=M[Ut]=M[Wt]=M[Gt]=M[Kt]=!0,M[Ct]=M[wt]=M[It]=M[Tt]=M[Lt]=M[Et]=M[Dt]=M[Ot]=M[kt]=M[At]=M[jt]=M[Mt]=M[Nt]=M[Pt]=M[Ft]=!1;function qt(e){return h(e)&&ut(e.length)&&!!M[m(e)]}function N(e){return function(t){return e(t)}}var Jt=typeof exports==`object`&&exports&&!exports.nodeType&&exports,P=Jt&&typeof module==`object`&&module&&!module.nodeType&&module,Yt=P&&P.exports===Jt&&e.process,F=function(){try{return P&&P.require&&P.require(`util`).types||Yt&&Yt.binding&&Yt.binding(`util`)}catch{}}(),Xt=F&&F.isTypedArray,Zt=Xt?N(Xt):qt,Qt=Object.prototype.hasOwnProperty;function $t(e,t){var n=y(e),r=!n&&A(e),i=!n&&!r&&j(e),a=!n&&!r&&!i&&Zt(e),o=n||r||i||a,s=o?pt(e.length,String):[],c=s.length;for(var l in e)(t||Qt.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||rt(l,c)))&&s.push(l);return s}function en(e,t){return function(n){return e(t(n))}}var tn=en(Object.keys,Object),nn=Object.prototype.hasOwnProperty;function rn(e){if(!k(e))return tn(e);var t=[];for(var n in Object(e))nn.call(e,n)&&n!=`constructor`&&t.push(n);return t}function I(e){return D(e)?$t(e):rn(e)}function an(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var on=Object.prototype.hasOwnProperty;function sn(e){if(!b(e))return an(e);var t=k(e),n=[];for(var r in e)r==`constructor`&&(t||!on.call(e,r))||n.push(r);return n}function L(e){return D(e)?$t(e,!0):sn(e)}var cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ln=/^\w*$/;function un(e,t){if(y(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||_(e)?!0:ln.test(e)||!cn.test(e)||t!=null&&e in Object(t)}var R=C(Object,`create`);function dn(){this.__data__=R?R(null):{},this.size=0}function fn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var pn=`__lodash_hash_undefined__`,mn=Object.prototype.hasOwnProperty;function hn(e){var t=this.__data__;if(R){var n=t[e];return n===pn?void 0:n}return mn.call(t,e)?t[e]:void 0}var gn=Object.prototype.hasOwnProperty;function _n(e){var t=this.__data__;return R?t[e]!==void 0:gn.call(t,e)}var vn=`__lodash_hash_undefined__`;function yn(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=R&&t===void 0?vn:t,this}function z(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}z.prototype.clear=dn,z.prototype.delete=fn,z.prototype.get=hn,z.prototype.has=_n,z.prototype.set=yn;function bn(){this.__data__=[],this.size=0}function B(e,t){for(var n=e.length;n--;)if(w(e[n][0],t))return n;return-1}var xn=Array.prototype.splice;function Sn(e){var t=this.__data__,n=B(t,e);return n<0?!1:(n==t.length-1?t.pop():xn.call(t,n,1),--this.size,!0)}function Cn(e){var t=this.__data__,n=B(t,e);return n<0?void 0:t[n][1]}function wn(e){return B(this.__data__,e)>-1}function Tn(e,t){var n=this.__data__,r=B(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function V(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}V.prototype.clear=bn,V.prototype.delete=Sn,V.prototype.get=Cn,V.prototype.has=wn,V.prototype.set=Tn;var H=C(n,`Map`);function En(){this.size=0,this.__data__={hash:new z,map:new(H||V),string:new z}}function Dn(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function On(e,t){var n=e.__data__;return Dn(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function kn(e){var t=On(this,e).delete(e);return this.size-=+!!t,t}function An(e){return On(this,e).get(e)}function jn(e){return On(this,e).has(e)}function Mn(e,t){var n=On(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function U(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}U.prototype.clear=En,U.prototype.delete=kn,U.prototype.get=An,U.prototype.has=jn,U.prototype.set=Mn;var Nn=`Expected a function`;function Pn(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Nn);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Pn.Cache||U),n}Pn.Cache=U;var Fn=500;function In(e){var t=Pn(e,function(e){return n.size===Fn&&n.clear(),e}),n=t.cache;return t}var Ln=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rn=/\\(\\)?/g,zn=In(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Ln,function(e,n,r,i){t.push(r?i.replace(Rn,`$1`):n||e)}),t});function Bn(e){return e==null?``:re(e)}function W(e,t){return y(e)?e:un(e,t)?[e]:zn(Bn(e))}var Vn=1/0;function G(e){if(typeof e==`string`||_(e))return e;var t=e+``;return t==`0`&&1/e==-Vn?`-0`:t}function Hn(e,t){t=W(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[G(t[n++])];return n&&n==r?e:void 0}function Un(e,t,n){var r=e==null?void 0:Hn(e,t);return r===void 0?n:r}function Wn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Gn=r?r.isConcatSpreadable:void 0;function Kn(e){return y(e)||A(e)||!!(Gn&&e&&e[Gn])}function qn(e,t,n,r,i){var a=-1,o=e.length;for(n||=Kn,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?qn(s,t-1,n,r,i):Wn(i,s):r||(i[i.length]=s)}return i}function Jn(e){return e!=null&&e.length?qn(e,1):[]}function Yn(e){return Je(ct(e,void 0,Jn),e+``)}var Xn=en(Object.getPrototypeOf,Object),Zn=`[object Object]`,Qn=Function.prototype,$n=Object.prototype,er=Qn.toString,tr=$n.hasOwnProperty,nr=er.call(Object);function rr(e){if(!h(e)||m(e)!=Zn)return!1;var t=Xn(e);if(t===null)return!0;var n=tr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&er.call(n)==nr}var ir=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function ar(e){return ir.test(e)}function or(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function sr(){this.__data__=new V,this.size=0}function cr(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function lr(e){return this.__data__.get(e)}function ur(e){return this.__data__.has(e)}var dr=200;function fr(e,t){var n=this.__data__;if(n instanceof V){var r=n.__data__;if(!H||r.length<dr-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new U(r)}return n.set(e,t),this.size=n.size,this}function K(e){var t=this.__data__=new V(e);this.size=t.size}K.prototype.clear=sr,K.prototype.delete=cr,K.prototype.get=lr,K.prototype.has=ur,K.prototype.set=fr;function pr(e,t){return e&&T(t,I(t),e)}function mr(e,t){return e&&T(t,L(t),e)}var hr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,gr=hr&&typeof module==`object`&&module&&!module.nodeType&&module,_r=gr&&gr.exports===hr?n.Buffer:void 0,vr=_r?_r.allocUnsafe:void 0;function yr(e,t){if(t)return e.slice();var n=e.length,r=vr?vr(n):new e.constructor(n);return e.copy(r),r}function br(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function xr(){return[]}var Sr=Object.prototype.propertyIsEnumerable,Cr=Object.getOwnPropertySymbols,wr=Cr?function(e){return e==null?[]:(e=Object(e),br(Cr(e),function(t){return Sr.call(e,t)}))}:xr;function Tr(e,t){return T(e,wr(e),t)}var Er=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Wn(t,wr(e)),e=Xn(e);return t}:xr;function Dr(e,t){return T(e,Er(e),t)}function Or(e,t,n){var r=t(e);return y(e)?r:Wn(r,n(e))}function kr(e){return Or(e,I,wr)}function Ar(e){return Or(e,L,Er)}var jr=C(n,`DataView`),Mr=C(n,`Promise`),q=C(n,`Set`),Nr=`[object Map]`,Pr=`[object Object]`,Fr=`[object Promise]`,Ir=`[object Set]`,Lr=`[object WeakMap]`,Rr=`[object DataView]`,zr=S(jr),Br=S(H),Vr=S(Mr),Hr=S(q),Ur=S(Ie),J=m;(jr&&J(new jr(new ArrayBuffer(1)))!=Rr||H&&J(new H)!=Nr||Mr&&J(Mr.resolve())!=Fr||q&&J(new q)!=Ir||Ie&&J(new Ie)!=Lr)&&(J=function(e){var t=m(e),n=t==Pr?e.constructor:void 0,r=n?S(n):``;if(r)switch(r){case zr:return Rr;case Br:return Nr;case Vr:return Fr;case Hr:return Ir;case Ur:return Lr}return t});var Y=J,Wr=Object.prototype.hasOwnProperty;function Gr(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Wr.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var Kr=n.Uint8Array;function qr(e){var t=new e.constructor(e.byteLength);return new Kr(t).set(new Kr(e)),t}function Jr(e,t){var n=t?qr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Yr=/\w*$/;function Xr(e){var t=new e.constructor(e.source,Yr.exec(e));return t.lastIndex=e.lastIndex,t}var Zr=r?r.prototype:void 0,Qr=Zr?Zr.valueOf:void 0;function $r(e){return Qr?Object(Qr.call(e)):{}}function ei(e,t){var n=t?qr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var ti=`[object Boolean]`,ni=`[object Date]`,ri=`[object Map]`,ii=`[object Number]`,ai=`[object RegExp]`,oi=`[object Set]`,si=`[object String]`,ci=`[object Symbol]`,li=`[object ArrayBuffer]`,ui=`[object DataView]`,di=`[object Float32Array]`,fi=`[object Float64Array]`,pi=`[object Int8Array]`,mi=`[object Int16Array]`,hi=`[object Int32Array]`,gi=`[object Uint8Array]`,_i=`[object Uint8ClampedArray]`,vi=`[object Uint16Array]`,yi=`[object Uint32Array]`;function bi(e,t,n){var r=e.constructor;switch(t){case li:return qr(e);case ti:case ni:return new r(+e);case ui:return Jr(e,n);case di:case fi:case pi:case mi:case hi:case gi:case _i:case vi:case yi:return ei(e,n);case ri:return new r;case ii:case si:return new r(e);case ai:return Xr(e);case oi:return new r;case ci:return $r(e)}}function xi(e){return typeof e.constructor==`function`&&!k(e)?Re(Xn(e)):{}}var Si=`[object Map]`;function Ci(e){return h(e)&&Y(e)==Si}var wi=F&&F.isMap,Ti=wi?N(wi):Ci,Ei=`[object Set]`;function Di(e){return h(e)&&Y(e)==Ei}var Oi=F&&F.isSet,ki=Oi?N(Oi):Di,Ai=1,ji=2,Mi=4,Ni=`[object Arguments]`,Pi=`[object Array]`,Fi=`[object Boolean]`,Ii=`[object Date]`,Li=`[object Error]`,Ri=`[object Function]`,zi=`[object GeneratorFunction]`,Bi=`[object Map]`,Vi=`[object Number]`,Hi=`[object Object]`,Ui=`[object RegExp]`,Wi=`[object Set]`,Gi=`[object String]`,Ki=`[object Symbol]`,qi=`[object WeakMap]`,Ji=`[object ArrayBuffer]`,Yi=`[object DataView]`,Xi=`[object Float32Array]`,Zi=`[object Float64Array]`,Qi=`[object Int8Array]`,$i=`[object Int16Array]`,ea=`[object Int32Array]`,ta=`[object Uint8Array]`,na=`[object Uint8ClampedArray]`,ra=`[object Uint16Array]`,ia=`[object Uint32Array]`,X={};X[Ni]=X[Pi]=X[Ji]=X[Yi]=X[Fi]=X[Ii]=X[Xi]=X[Zi]=X[Qi]=X[$i]=X[ea]=X[Bi]=X[Vi]=X[Hi]=X[Ui]=X[Wi]=X[Gi]=X[Ki]=X[ta]=X[na]=X[ra]=X[ia]=!0,X[Li]=X[Ri]=X[qi]=!1;function Z(e,t,n,r,i,a){var o,s=t&Ai,c=t&ji,l=t&Mi;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!b(e))return e;var u=y(e);if(u){if(o=Gr(e),!s)return Ve(e,o)}else{var d=Y(e),f=d==Ri||d==zi;if(j(e))return yr(e,s);if(d==Hi||d==Ni||f&&!i){if(o=c||f?{}:xi(e),!s)return c?Dr(e,mr(o,e)):Tr(e,pr(o,e))}else{if(!X[d])return i?e:{};o=bi(e,d,s)}}a||=new K;var p=a.get(e);if(p)return p;a.set(e,o),ki(e)?e.forEach(function(r){o.add(Z(r,t,n,r,e,a))}):Ti(e)&&e.forEach(function(r,i){o.set(i,Z(r,t,n,i,e,a))});var m=u?void 0:(l?c?Ar:kr:c?L:I)(e);return Ye(m||e,function(r,i){m&&(i=r,r=e[i]),ot(o,i,Z(r,t,n,i,e,a))}),o}var aa=4;function oa(e){return Z(e,aa)}var sa=1,ca=4;function la(e){return Z(e,sa|ca)}var ua=`__lodash_hash_undefined__`;function da(e){return this.__data__.set(e,ua),this}function fa(e){return this.__data__.has(e)}function Q(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new U;++t<n;)this.add(e[t])}Q.prototype.add=Q.prototype.push=da,Q.prototype.has=fa;function pa(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ma(e,t){return e.has(t)}var ha=1,ga=2;function _a(e,t,n,r,i,a){var o=n&ha,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&ga?new Q:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!pa(t,function(e,t){if(!ma(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function va(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ya(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ba=1,xa=2,Sa=`[object Boolean]`,Ca=`[object Date]`,wa=`[object Error]`,Ta=`[object Map]`,Ea=`[object Number]`,Da=`[object RegExp]`,Oa=`[object Set]`,ka=`[object String]`,Aa=`[object Symbol]`,ja=`[object ArrayBuffer]`,Ma=`[object DataView]`,Na=r?r.prototype:void 0,Pa=Na?Na.valueOf:void 0;function Fa(e,t,n,r,i,a,o){switch(n){case Ma:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ja:return!(e.byteLength!=t.byteLength||!a(new Kr(e),new Kr(t)));case Sa:case Ca:case Ea:return w(+e,+t);case wa:return e.name==t.name&&e.message==t.message;case Da:case ka:return e==t+``;case Ta:var s=va;case Oa:var c=r&ba;if(s||=ya,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=xa,o.set(e,t);var u=_a(s(e),s(t),r,i,a,o);return o.delete(e),u;case Aa:if(Pa)return Pa.call(e)==Pa.call(t)}return!1}var Ia=1,La=Object.prototype.hasOwnProperty;function Ra(e,t,n,r,i,a){var o=n&Ia,s=kr(e),c=s.length;if(c!=kr(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:La.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var za=1,Ba=`[object Arguments]`,Va=`[object Array]`,Ha=`[object Object]`,Ua=Object.prototype.hasOwnProperty;function Wa(e,t,n,r,i,a){var o=y(e),s=y(t),c=o?Va:Y(e),l=s?Va:Y(t);c=c==Ba?Ha:c,l=l==Ba?Ha:l;var u=c==Ha,d=l==Ha,f=c==l;if(f&&j(e)){if(!j(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new K,o||Zt(e)?_a(e,t,n,r,i,a):Fa(e,t,c,n,r,i,a);if(!(n&za)){var p=u&&Ua.call(e,`__wrapped__`),m=d&&Ua.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new K,i(h,g,n,r,a)}}return f?(a||=new K,Ra(e,t,n,r,i,a)):!1}function Ga(e,t,n,r,i){return e===t?!0:e==null||t==null||!h(e)&&!h(t)?e!==e&&t!==t:Wa(e,t,n,r,Ga,i)}var Ka=1,qa=2;function Ja(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new K;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?Ga(u,l,Ka|qa,r,d):f))return!1}}return!0}function Ya(e){return e===e&&!b(e)}function Xa(e){for(var t=I(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ya(i)]}return t}function Za(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Qa(e){var t=Xa(e);return t.length==1&&t[0][2]?Za(t[0][0],t[0][1]):function(n){return n===e||Ja(n,e,t)}}function $a(e,t){return e!=null&&t in Object(e)}function eo(e,t,n){t=W(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=G(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&ut(i)&&rt(o,i)&&(y(e)||A(e)))}function to(e,t){return e!=null&&eo(e,t,$a)}var no=1,ro=2;function io(e,t){return un(e)&&Ya(t)?Za(G(e),t):function(n){var r=Un(n,e);return r===void 0&&r===t?to(n,e):Ga(t,r,no|ro)}}function ao(e){return function(t){return t?.[e]}}function oo(e){return function(t){return Hn(t,e)}}function so(e){return un(e)?ao(G(e)):oo(e)}function $(e){return typeof e==`function`?e:e==null?x:typeof e==`object`?y(e)?io(e[0],e[1]):Qa(e):so(e)}function co(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var lo=co();function uo(e,t){return e&&lo(e,t,I)}function fo(e,t){return function(n,r){if(n==null)return n;if(!D(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var po=fo(uo),mo=function(){return n.Date.now()},ho=Object.prototype,go=ho.hasOwnProperty,_o=E(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&O(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=L(a),s=-1,c=o.length;++s<c;){var l=o[s],u=e[l];(u===void 0||w(u,ho[l])&&!go.call(e,l))&&(e[l]=a[l])}return e});function vo(e,t,n){(n!==void 0&&!w(e[t],n)||n===void 0&&!(t in e))&&it(e,t,n)}function yo(e){return h(e)&&D(e)}function bo(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}function xo(e){return T(e,L(e))}function So(e,t,n,r,i,a,o){var s=bo(e,n),c=bo(t,n),l=o.get(c);if(l){vo(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=y(c),p=!f&&j(c),m=!f&&!p&&Zt(c);u=c,f||p||m?y(s)?u=s:yo(s)?u=Ve(s):p?(d=!1,u=yr(c,!0)):m?(d=!1,u=ei(c,!0)):u=[]:rr(c)||A(c)?(u=s,A(s)?u=xo(s):(!b(s)||Se(s))&&(u=xi(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),vo(e,n,u)}function Co(e,t,n,r,i){e!==t&&lo(t,function(a,o){if(i||=new K,b(a))So(e,t,o,n,Co,r,i);else{var s=r?r(bo(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),vo(e,o,s)}},L)}function wo(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function To(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Eo(e){return typeof e==`function`?e:x}function Do(e,t){return(y(e)?Ye:po)(e,Eo(t))}function Oo(e,t){var n=[];return po(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function ko(e,t){return(y(e)?br:Oo)(e,$(t,3))}function Ao(e){return function(t,n,r){var i=Object(t);if(!D(t)){var a=$(n,3);t=I(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var jo=Math.max;function Mo(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:_e(n);return i<0&&(i=jo(r+i,0)),Xe(e,$(t,3),i)}var No=Ao(Mo);function Po(e,t){var n=-1,r=D(e)?Array(e.length):[];return po(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function Fo(e,t){return(y(e)?v:Po)(e,$(t,3))}function Io(e,t){return e==null?e:lo(e,Eo(t),L)}function Lo(e,t){return e&&uo(e,Eo(t))}function Ro(e,t){return e>t}var zo=Object.prototype.hasOwnProperty;function Bo(e,t){return e!=null&&zo.call(e,t)}function Vo(e,t){return e!=null&&eo(e,t,Bo)}var Ho=`[object String]`;function Uo(e){return typeof e==`string`||!y(e)&&h(e)&&m(e)==Ho}function Wo(e,t){return v(t,function(t){return e[t]})}function Go(e){return e==null?[]:Wo(e,I(e))}var Ko=`[object Map]`,qo=`[object Set]`,Jo=Object.prototype.hasOwnProperty;function Yo(e){if(e==null)return!0;if(D(e)&&(y(e)||typeof e==`string`||typeof e.splice==`function`||j(e)||Zt(e)||A(e)))return!e.length;var t=Y(e);if(t==Ko||t==qo)return!e.size;if(k(e))return!rn(e).length;for(var n in e)if(Jo.call(e,n))return!1;return!0}function Xo(e){return e===void 0}function Zo(e,t){return e<t}function Qo(e,t){var n={};return t=$(t,3),uo(e,function(e,r,i){it(n,r,t(e,r,i))}),n}function $o(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!_(o):n(o,s)))var s=o,c=a}return c}function es(e){return e&&e.length?$o(e,x,Ro):void 0}var ts=dt(function(e,t,n){Co(e,t,n)});function ns(e){return e&&e.length?$o(e,x,Zo):void 0}function rs(e,t){return e&&e.length?$o(e,$(t,2),Zo):void 0}function is(e,t,n,r){if(!b(e))return e;t=W(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=G(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=b(u)?u:rt(t[i+1])?[]:{})}ot(s,c,l),s=s[c]}return e}function as(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Hn(e,o);n(s,o)&&is(a,W(o,e),s)}return a}function os(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function ss(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=_(e),o=t!==void 0,s=t===null,c=t===t,l=_(t);if(!s&&!l&&!a&&e>t||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}function cs(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=ss(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function ls(e,t,n){t=t.length?v(t,function(e){return y(e)?function(t){return Hn(t,e.length===1?e[0]:e)}:e}):[x];var r=-1;return t=v(t,N($)),os(Po(e,function(e,n,i){return{criteria:v(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return cs(e,t,n)})}var us=ao(`length`),ds=`\\ud800-\\udfff`,fs=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,ps=`\\ufe0e\\ufe0f`,ms=`[`+ds+`]`,hs=`[`+fs+`]`,gs=`\\ud83c[\\udffb-\\udfff]`,_s=`(?:`+hs+`|`+gs+`)`,vs=`[^`+ds+`]`,ys=`(?:\\ud83c[\\udde6-\\uddff]){2}`,bs=`[\\ud800-\\udbff][\\udc00-\\udfff]`,xs=`\\u200d`,Ss=_s+`?`,Cs=`[`+ps+`]?`,ws=`(?:`+xs+`(?:`+[vs,ys,bs].join(`|`)+`)`+Cs+Ss+`)*`,Ts=Cs+Ss+ws,Es=`(?:`+[vs+hs+`?`,hs,ys,bs,ms].join(`|`)+`)`,Ds=RegExp(gs+`(?=`+gs+`)|`+Es+Ts,`g`);function Os(e){for(var t=Ds.lastIndex=0;Ds.test(e);)++t;return t}function ks(e){return ar(e)?Os(e):us(e)}function As(e,t){return as(e,t,function(t,n){return to(e,n)})}var js=Yn(function(e,t){return e==null?{}:As(e,t)}),Ms=Math.ceil,Ns=Math.max;function Ps(e,t,n,r){for(var i=-1,a=Ns(Ms((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function Fs(e){return function(t,n,r){return r&&typeof r!=`number`&&O(t,n,r)&&(n=r=void 0),t=ge(t),n===void 0?(n=t,t=0):n=ge(n),r=r===void 0?t<n?1:-1:ge(r),Ps(t,n,r,e)}}var Is=Fs();function Ls(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Rs(e,t,n){var r=y(e)?or:Ls,i=arguments.length<3;return r(e,$(t,4),n,i,po)}var zs=`[object Map]`,Bs=`[object Set]`;function Vs(e){if(e==null)return 0;if(D(e))return Uo(e)?ks(e):e.length;var t=Y(e);return t==zs||t==Bs?e.size:rn(e).length}var Hs=E(function(e,t){if(e==null)return[];var n=t.length;return n>1&&O(e,t[0],t[1])?t=[]:n>2&&O(t[0],t[1],t[2])&&(t=[t[0]]),ls(e,qn(t,1),[])}),Us=q&&1/ya(new q([,-0]))[1]==1/0?function(e){return new q(e)}:Be,Ws=200;function Gs(e,t,n){var r=-1,i=et,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=wo;else if(a>=Ws){var l=t?null:Us(e);if(l)return ya(l);o=!1,i=ma,c=new Q}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var Ks=E(function(e){return Gs(qn(e,1,yo,!0))}),qs=0;function Js(e){var t=++qs;return Bn(e)+t}function Ys(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function Xs(e,t){return Ys(e||[],t||[],ot)}export{I as A,Do as C,la as D,mo as E,Se as M,y as N,oa as O,ko as S,_o as T,Vo as _,Vs as a,Fo as b,js as c,ts as d,es as f,Go as g,Yo as h,Hs as i,Ke as j,Jn as k,rs as l,Xo as m,Js as n,Rs as o,Qo as p,Ks as r,Is as s,Xs as t,ns as u,Lo as v,To as w,No as x,Io as y};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-B0Z9INg1.js";import{n as t,t as n}from"./mermaid-layout-BqskXFQG.js";var r=e(((e,n)=>{(function(r,i){typeof e==`object`&&typeof n==`object`?n.exports=i(t()):typeof define==`function`&&define.amd?define([`cose-base`],i):typeof e==`object`?e.cytoscapeFcose=i(t()):r.cytoscapeFcose=i(r.coseBase)})(e,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},a.connectComponents=function(e,t,n,r){var a=new i,o=new Set,s=[],c=void 0,l=void 0,u=void 0,d=!1,f=1,p=[],m=[],h=function(){var r=e.collection();m.push(r);var i=n[0],h=e.collection();h.merge(i).merge(i.descendants().intersection(t)),s.push(i),h.forEach(function(e){a.push(e),o.add(e),r.merge(e)});for(var g=function(){i=a.shift();var l=e.collection();i.neighborhood().nodes().forEach(function(e){t.intersection(i.edgesWith(e)).length>0&&l.merge(e)});for(var u=0;u<l.length;u++){var d=l[u];c=n.intersection(d.union(d.ancestors())),c!=null&&!o.has(c[0])&&c.union(c.descendants()).forEach(function(e){a.push(e),o.add(e),r.merge(e),n.has(e)&&s.push(e)})}};a.length!=0;)g();if(r.forEach(function(e){t.intersection(e.connectedEdges()).forEach(function(e){r.has(e.source())&&r.has(e.target())&&r.merge(e)})}),s.length==n.length&&(d=!0),!d||d&&f>1){l=s[0],u=l.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length<u&&(u=e.connectedEdges().length,l=e)}),p.push(l.id());var _=e.collection();_.merge(s[0]),s.forEach(function(e){_.merge(e)}),s=[],n=n.difference(_),f++}};do h();while(!d);return r&&p.length>0&&r.set(`dummy`+(r.size+1),p),m},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=r(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;y<i&&(i=y),b>a&&(a=b),x<o&&(o=x),S>s&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+i)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;r<i&&(i=r),c>a&&(a=c),l<o&&(o=l),u>s&&(s=u)});var T=e.x-(a+i)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;m<p;m++){var h=f[m];c=t[r.get(h.id())]-h.width()/2,l=t[r.get(h.id())]+h.width()/2,u=n[r.get(h.id())]-h.height()/2,d=n[r.get(h.id())]+h.height()/2,i>c&&(i=c),a<l&&(a=l),o>u&&(o=u),s<d&&(s=d)}var g={};return g.topLeftX=i,g.topLeftY=o,g.width=a-i,g.height=s-o,g},a.calcParentsWithoutChildren=function(e,t){var n=e.collection();return t.nodes(`:parent`).forEach(function(e){var t=!1;e.children().forEach(function(e){e.css(`display`)!=`none`&&(t=!0)}),t||n.merge(e)}),n},e.exports=a}),816:((e,t,n)=>{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,l=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,d=e.eles,f=d.nodes(),p=d.edges(),m=void 0,h=void 0,g=void 0,_={};e.randomize&&(m=t.nodeIndexes,h=t.xCoords,g=t.yCoords);var v=function(e){return typeof e==`function`},y=function(e,t){return v(e)?e(t):e},b=r.calcParentsWithoutChildren(n,d),x=function e(t,n,i,c){for(var l=n.length,u=0;u<l;u++){var d=n[u],f=null;d.intersection(b).length==0&&(f=d.children());var p=void 0,v=d.layoutDimensions({nodeDimensionsIncludeLabels:c.nodeDimensionsIncludeLabels});if(d.outerWidth()!=null&&d.outerHeight()!=null){if(c.randomize){if(!d.isParent())p=t.add(new a(i.graphManager,new o(h[m.get(d.id())]-v.w/2,g[m.get(d.id())]-v.h/2),new s(parseFloat(v.w),parseFloat(v.h))));else{var x=r.calcBoundingBox(d,h,g,m);p=d.intersection(b).length==0?t.add(new a(i.graphManager,new o(x.topLeftX,x.topLeftY),new s(x.width,x.height))):t.add(new a(i.graphManager,new o(x.topLeftX,x.topLeftY),new s(parseFloat(v.w),parseFloat(v.h))))}}else p=t.add(new a(i.graphManager,new o(d.position(`x`)-v.w/2,d.position(`y`)-v.h/2),new s(parseFloat(v.w),parseFloat(v.h))))}else p=t.add(new a(this.graphManager));if(p.id=d.data(`id`),p.nodeRepulsion=y(c.nodeRepulsion,d),p.paddingLeft=parseInt(d.css(`padding`)),p.paddingTop=parseInt(d.css(`padding`)),p.paddingRight=parseInt(d.css(`padding`)),p.paddingBottom=parseInt(d.css(`padding`)),c.nodeDimensionsIncludeLabels&&(p.labelWidth=d.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,p.labelHeight=d.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,p.labelPosVertical=d.css(`text-valign`),p.labelPosHorizontal=d.css(`text-halign`)),_[d.data(`id`)]=p,isNaN(p.rect.x)&&(p.rect.x=0),isNaN(p.rect.y)&&(p.rect.y=0),f!=null&&f.length>0){var S=void 0;S=i.getGraphManager().add(i.newGraph(),p),e(S,f,i,c)}}},S=function(t,n,r){for(var i=0,a=0,o=0;o<r.length;o++){var s=r[o],c=_[s.data(`source`)],d=_[s.data(`target`)];if(c&&d&&c!==d&&c.getEdgesBetween(d).length==0){var f=n.add(t.newEdge(),c,d);f.id=s.id(),f.idealLength=y(e.idealEdgeLength,s),f.edgeElasticity=y(e.edgeElasticity,s),i+=f.idealLength,a++}}e.idealEdgeLength!=null&&(u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=a>0?i/a:v(e.idealEdgeLength)?50:e.idealEdgeLength,u.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)},C=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(u.MAX_ITERATIONS=l.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(u.TILING_COMPARE_BY=e.tilingCompareBy),c.QUALITY=e.quality==`proof`?2:0,u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!e.randomize,u.ANIMATE=l.ANIMATE=c.ANIMATE=e.animate,u.TILE=e.tile,u.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!e.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),e.step==`enforced`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),e.step==`cose`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),e.step==`all`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!!e.randomize,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),u.TREE_REDUCTION_ON_INCREMENTAL=!(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint);var w=new i,T=w.newGraphManager();return x(T.addRoot(),r.getTopMostNodes(f),w,e),S(w,T,p),C(w,e),w.runLayout(),_}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=n(658),o=n(548),s=n(657).spectralLayout,c=n(816).coseLayout,l=Object.freeze({quality:`default`,randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:`all`,samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(e){return 4500},idealEdgeLength:function(e){return 50},edgeElasticity:function(e){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,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(){}});e.exports=function(){function e(t){i(this,e),this.options=a({},l,t)}return r(e,[{key:`run`,value:function(){var e=this,t=this.options,n=t.cy,r=t.eles,i=[],a=[],l=void 0,u=[];t.fixedNodeConstraint&&(!Array.isArray(t.fixedNodeConstraint)||t.fixedNodeConstraint.length==0)&&(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(t.alignmentConstraint.vertical&&(!Array.isArray(t.alignmentConstraint.vertical)||t.alignmentConstraint.vertical.length==0)&&(t.alignmentConstraint.vertical=void 0),t.alignmentConstraint.horizontal&&(!Array.isArray(t.alignmentConstraint.horizontal)||t.alignmentConstraint.horizontal.length==0)&&(t.alignmentConstraint.horizontal=void 0)),t.relativePlacementConstraint&&(!Array.isArray(t.relativePlacementConstraint)||t.relativePlacementConstraint.length==0)&&(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var d=void 0,f=!1;if(n.layoutUtilities&&t.packComponents&&(d=n.layoutUtilities(`get`),d||=n.layoutUtilities(),f=!0),r.nodes().length>0){if(f){var p=o.getTopMostNodes(t.eles.nodes());if(l=o.connectComponents(n,t.eles,p),l.forEach(function(e){var t=e.boundingBox();u.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var m=n.collection();if(t.tile){var h=new Map,g=[],_=[],v=0,y={nodeIndexes:h,xCoords:g,yCoords:_},b=[];if(l.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){m.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),v++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),b.push(t))}),m.length>1){var x=m.boundingBox();u.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),l.push(m),i.push(y);for(var S=b.length-1;S>=0;S--)l.splice(b[S],1),i.splice(b[S],1),u.splice(b[S],1)}}l.forEach(function(e,n){t.eles=e,a.push(c(t,i[n])),o.relocateComponent(u[n],a[n],t)})}else l.forEach(function(e,n){o.relocateComponent(u[n],i[n],t)});var C=new Set;if(l.length>1){var w=[],T=r.filter(function(e){return e.css(`display`)==`none`});l.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(T).length>0){var s={};s.edges=[],s.nodes=[];var c=void 0;e.nodes().not(T).forEach(function(e){if(t.quality==`draft`){if(!e.isParent())c=r.get(e.id()),s.nodes.push({x:i[n].xCoords[c]-e.boundingbox().w/2,y:i[n].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`){if(t.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=o.calcBoundingBox(c,i[n].xCoords,i[n].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(i[n].xCoords[u]),f.push(i[n].yCoords[u]);if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);s.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else a[n][c.id()]&&a[n][l.id()]&&s.edges.push({startX:a[n][c.id()].getCenterX(),startY:a[n][c.id()].getCenterY(),endX:a[n][l.id()].getCenterX(),endY:a[n][l.id()].getCenterY()})}}),s.nodes.length>0&&(w.push(s),C.add(n))}});var E=d.packComponents(w,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+E[t].dx}),r=e.yCoords.map(function(e){return e+E[t].dy});e.xCoords=n,e.yCoords=r});else{var D=0;C.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+E[D].dx,n.getCenterY()+E[D].dy)}),D++})}}}else{var O=t.eles.boundingBox();if(u.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),t.randomize){var k=s(t);i.push(k)}t.quality=="default"||t.quality==`proof`?(a.push(c(t,i[0])),o.relocateComponent(u[0],a[0],t)):o.relocateComponent(u[0],i[0],t)}}var A=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}var c=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var j=o.calcParentsWithoutChildren(n,r),M=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(M),r.nodes().not(`:parent`).not(M).layoutPositions(e,t,A),j.length>0&&j.forEach(function(e){e.position(A(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),c=new Map,l=new Map,u=new Map,d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=void 0,b=1e8,x=1e-9,S=e.piTol,C=e.samplingType,w=e.nodeSeparation,T=void 0,E=function(){for(var e=0,t=0,n=!1;t<T;){e=Math.floor(Math.random()*y),n=!1;for(var r=0;r<t;r++)if(m[r]==e){n=!0;break}if(!n)m[t]=e,t++;else continue}},D=function(e,t,n){for(var r=[],i=0,a=0,o=0,s=void 0,c=[],u=0,f=1,p=0;p<y;p++)c[p]=b;for(r[a]=e,c[e]=0;a>=i;){o=r[i++];for(var m=d[o],_=0;_<m.length;_++)s=l.get(m[_]),c[s]==b&&(c[s]=c[o]+1,r[++a]=s);g[o][t]=c[o]*w}if(n){for(var v=0;v<y;v++)g[v][t]<h[v]&&(h[v]=g[v][t]);for(var x=0;x<y;x++)h[x]>u&&(u=h[x],f=x)}return f},O=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*y);for(var n=0;n<y;n++)h[n]=b;for(var r=0;r<T;r++)m[r]=t,t=D(t,r,e)}else{E();for(var i=0;i<T;i++)D(m[i],i,e,!1)}for(var a=0;a<y;a++)for(var o=0;o<T;o++)g[a][o]*=g[a][o];for(var s=0;s<T;s++)_[s]=[];for(var c=0;c<T;c++)for(var l=0;l<T;l++)_[c][l]=g[m[l]][c]},k=function(){for(var e=a.svd(_),t=e.S,n=e.U,r=e.V,o=t[0]*t[0]*t[0],s=[],c=0;c<T;c++){s[c]=[];for(var l=0;l<T;l++)s[c][l]=0,c==l&&(s[c][l]=t[c]/(t[c]*t[c]+o/(t[c]*t[c])))}v=i.multMat(i.multMat(r,s),i.transpose(n))},A=function(){for(var e=void 0,t=void 0,n=[],r=[],a=[],o=[],s=0;s<y;s++)n[s]=Math.random(),r[s]=Math.random();n=i.normalize(n),r=i.normalize(r);for(var c=0,l=x,u=x,d=void 0;;){c++;for(var m=0;m<y;m++)a[m]=n[m];if(n=i.multGamma(i.multL(i.multGamma(a),g,v)),e=i.dotProduct(a,n),n=i.normalize(n),l=i.dotProduct(a,n),d=Math.abs(l/u),d<=1+S&&d>=1)break;u=l}for(var h=0;h<y;h++)a[h]=n[h];for(c=0,u=x;;){c++;for(var _=0;_<y;_++)o[_]=r[_];if(o=i.minusOp(o,i.multCons(a,i.dotProduct(a,o))),r=i.multGamma(i.multL(i.multGamma(o),g,v)),t=i.dotProduct(o,r),r=i.normalize(r),l=i.dotProduct(o,r),d=Math.abs(l/u),d<=1+S&&d>=1)break;u=l}for(var b=0;b<y;b++)o[b]=r[b];f=i.multCons(a,Math.sqrt(Math.abs(e))),p=i.multCons(o,Math.sqrt(Math.abs(t)))};r.connectComponents(t,n,r.getTopMostNodes(o),c),s.forEach(function(e){r.connectComponents(t,n,r.getTopMostNodes(e.descendants().intersection(n)),c)});for(var j=0,M=0;M<o.length;M++)o[M].isParent()||l.set(o[M].id(),j++);var N=!0,P=!1,F=void 0;try{for(var I=c.keys()[Symbol.iterator](),L;!(N=(L=I.next()).done);N=!0){var R=L.value;l.set(R,j++)}}catch(e){P=!0,F=e}finally{try{!N&&I.return&&I.return()}finally{if(P)throw F}}for(var z=0;z<l.size;z++)d[z]=[];s.forEach(function(e){for(var t=e.children().intersection(n);t.nodes(`:childless`).length==0;)t=t.nodes()[0].children().intersection(n);var r=0,i=t.nodes(`:childless`)[0].connectedEdges().length;t.nodes(`:childless`).forEach(function(e,t){e.connectedEdges().length<i&&(i=e.connectedEdges().length,r=t)}),u.set(e.id(),t.nodes(`:childless`)[r].id())}),o.forEach(function(e){var t=void 0;t=e.isParent()?l.get(u.get(e.id())):l.get(e.id()),e.neighborhood().nodes().forEach(function(r){n.intersection(e.edgesWith(r)).length>0&&(r.isParent()?d[t].push(u.get(r.id())):d[t].push(r.id()))})});var B=function(e){var n=l.get(e),r=void 0;c.get(e).forEach(function(i){r=t.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[l.get(r)].push(e)})},V=!0,H=!1,U=void 0;try{for(var W=c.keys()[Symbol.iterator](),G;!(V=(G=W.next()).done);V=!0){var K=G.value;B(K)}}catch(e){H=!0,U=e}finally{try{!V&&W.return&&W.return()}finally{if(H)throw U}}y=l.size;var q=void 0;if(y>2){T=y<e.sampleSize?y:e.sampleSize;for(var J=0;J<y;J++)g[J]=[];for(var Y=0;Y<T;Y++)v[Y]=[];return e.quality==`draft`||e.step==`all`?(O(C),k(),A(),q={nodeIndexes:l,xCoords:f,yCoords:p}):(l.forEach(function(e,n){f.push(t.getElementById(n).position(`x`)),p.push(t.getElementById(n).position(`y`))}),q={nodeIndexes:l,xCoords:f,yCoords:p}),q}var X=l.keys(),Z=t.getElementById(X.next().value),Q=Z.position(),$=Z.outerWidth();if(f.push(Q.x),p.push(Q.y),y==2){var ee=t.getElementById(X.next().value).outerWidth();f.push(Q.x+$/2+ee/2+e.idealEdgeLength),p.push(Q.y)}return q={nodeIndexes:l,xCoords:f,yCoords:p},q}}}),579:((e,t,n)=>{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})})),i=e(((e,t)=>{(function(r,i){typeof e==`object`&&typeof t==`object`?t.exports=i(n()):typeof define==`function`&&define.amd?define([`cose-base`],i):typeof e==`object`?e.cytoscapeCoseBilkent=i(n()):r.cytoscapeCoseBilkent=i(r.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,c=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,u={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 d(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function f(e){this.options=d(u,e),p(this.options)}var p=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),r.QUALITY=e.quality==`draft`?0:e.quality==`proof`?2:1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};f.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),c=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var l=0;l<c.length;l++){var u=c[l],d=this.idToLNode[u.data(`source`)],f=this.idToLNode[u.data(`target`)];if(d!==f&&d.getEdgesBetween(f).length==0){var p=a.add(r.newEdge(),d,f);p.id=u.id()}}var m=function(e,t){typeof e==`number`&&(e=t);var n=e.data(`id`),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},h=function a(){for(var o=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one(`layoutready`,n.ready),i.cy.trigger({type:`layoutready`,layout:i}))},s=i.options.refresh,c,l=0;l<s&&!c;l++)c=i.stopped||i.layout.tick();if(c){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(m),o(),i.cy.one(`layoutstop`,i.options.stop),i.cy.trigger({type:`layoutstop`,layout:i}),t&&cancelAnimationFrame(t),e=!1;return}var u=i.layout.getPositionsData();n.eles.nodes().positions(function(e,t){if(typeof e==`number`&&(e=t),!e.isParent()){for(var n=e.id(),r=u[n],i=e;r==null&&(r=u[i.data(`parent`)]||u[`DummyCompound_`+i.data(`parent`)],u[n]=r,i=i.parent()[0],i!=null););return r==null?{x:e.position(`x`),y:e.position(`y`)}:{x:r.x,y:r.y}}}),o(),t=requestAnimationFrame(a)};return r.addListener(`layoutstarted`,function(){i.options.animate===`during`&&(t=requestAnimationFrame(h))}),r.runLayout(),this.options.animate!==`during`&&(i.options.eles.nodes().not(`:parent`).layoutPositions(i,i.options,m),e=!1),this},f.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},f.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a=t[i],o=a.children(),u,d=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(u=a.outerWidth()!=null&&a.outerHeight()!=null?e.add(new s(n.graphManager,new c(a.position(`x`)-d.w/2,a.position(`y`)-d.h/2),new l(parseFloat(d.w),parseFloat(d.h)))):e.add(new s(this.graphManager)),u.id=a.data(`id`),u.paddingLeft=parseInt(a.css(`padding`)),u.paddingTop=parseInt(a.css(`padding`)),u.paddingRight=parseInt(a.css(`padding`)),u.paddingBottom=parseInt(a.css(`padding`)),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var f=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,m=a.css(`text-halign`);u.labelWidth=f,u.labelHeight=p,u.labelPos=m}if(this.idToLNode[a.data(`id`)]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),o!=null&&o.length>0){var h=n.getGraphManager().add(n.newGraph(),u);this.processChildrenList(h,o,n)}}},f.prototype.stop=function(){return this.stopped=!0,this};var m=function(e){e(`layout`,`cose-bilkent`,f)};typeof cytoscape<`u`&&m(cytoscape),e.exports=m})])})}));export{r as n,i as t};