@marimo-team/frontend 0.16.4 → 0.16.5

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 (408) hide show
  1. package/dist/assets/{CellStatus-CEVFBnyt.js → CellStatus-BJRDATxe.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-5izWKQVQ.js → ConnectedDataExplorerComponent-Cs4pQOKx.js} +1 -1
  3. package/dist/assets/{ImperativeModal-DujtmdOO.js → ImperativeModal-BG5LTpV0.js} +1 -1
  4. package/dist/assets/{JsonOutput-E2xVojk5.js → JsonOutput-BID8Oos7.js} +1 -1
  5. package/dist/assets/{LazyAnyLanguageCodeMirror-DHH4zj72.js → LazyAnyLanguageCodeMirror-RkzkO2YV.js} +2 -2
  6. package/dist/assets/MarimoErrorOutput-Lft73Wnl.js +6 -0
  7. package/dist/assets/{RenderHTML-BCi_V67U.js → RenderHTML-BoDLdBq-.js} +1 -1
  8. package/dist/assets/{VisuallyHidden-DvpnK2wO.js → VisuallyHidden-BiHw-PIc.js} +1 -1
  9. package/dist/assets/{accordion-C3CAEPwC.js → accordion-A41ffd5P.js} +1 -1
  10. package/dist/assets/{activity-BCW0BU81.js → activity-BhLNCNHF.js} +1 -1
  11. package/dist/assets/add-cell-with-ai-CxM_YKzf.js +36 -0
  12. package/dist/assets/{add-database-form-DSnHGqMe.js → add-database-form-Br1fMkMI.js} +1 -1
  13. package/dist/assets/{add-missing-import-Cwedhjm5.js → add-missing-import-CfRgNApn.js} +1 -1
  14. package/dist/assets/agent-panel-7ocujO8C.js +287 -0
  15. package/dist/assets/ai-model-dropdown-DSUVFIso.js +2 -0
  16. package/dist/assets/{alert-dialog-M1dUQe7C.js → alert-dialog-BO8sf-73.js} +1 -1
  17. package/dist/assets/{ansi_up-ZmFuCItK.js → ansi_up-D_b0GS7N.js} +1 -1
  18. package/dist/assets/{any-language-editor-BqGBgxZE.js → any-language-editor-edee1A1P.js} +1 -1
  19. package/dist/assets/app-config-button-Bg_CEfls.js +1 -0
  20. package/dist/assets/{architecture-O4VJ6CD3-CbkBEQri.js → architecture-O4VJ6CD3-CIYFBxkI.js} +1 -1
  21. package/dist/assets/{architectureDiagram-W76B3OCA-di95lJcF.js → architectureDiagram-W76B3OCA-CXqAkVTy.js} +1 -1
  22. package/dist/assets/{arrow-left-DQ-94PlS.js → arrow-left-D97p491f.js} +1 -1
  23. package/dist/assets/{between-horizontal-start-CotWLlFt.js → between-horizontal-start-DWTOsiF_.js} +1 -1
  24. package/dist/assets/{blockDiagram-QIGZ2CNN-ClcJSQFf.js → blockDiagram-QIGZ2CNN-DhYrUig_.js} +1 -1
  25. package/dist/assets/{c4Diagram-FPNF74CW-Cq2vxSdy.js → c4Diagram-FPNF74CW-Bj1S_Fyy.js} +1 -1
  26. package/dist/assets/{cell-actions-C5S4W3g_.js → cell-actions-hNx4EMmZ.js} +1 -1
  27. package/dist/assets/{cell-editor-X6EY7GQl.js → cell-editor-JimG_bBz.js} +13 -13
  28. package/dist/assets/cell-link-_kF38gGF.js +1 -0
  29. package/dist/assets/{cells-B4cnsYe_.js → cells-Dd1FatlG.js} +54 -54
  30. package/dist/assets/channel-Bil_pUlM.js +1 -0
  31. package/dist/assets/{chart-no-axes-column-DrG7h8mS.js → chart-no-axes-column-DmR44Tbq.js} +1 -1
  32. package/dist/assets/{chat-components-DXkntpg4.js → chat-components-OoNU4tLf.js} +3 -3
  33. package/dist/assets/chat-panel-DatwRFif.js +3 -0
  34. package/dist/assets/check-C5PVLNkJ.js +1 -0
  35. package/dist/assets/{chevron-right-Caf5yL5B.js → chevron-right-BDEhimQq.js} +1 -1
  36. package/dist/assets/{chunk-3AY6CYHV-BFFUJATX.js → chunk-3AY6CYHV-CBq2x1Nc.js} +1 -1
  37. package/dist/assets/{chunk-4KMFLZZN-D8J8fzqf.js → chunk-4KMFLZZN-DEMg9QYp.js} +1 -1
  38. package/dist/assets/{chunk-6OXUPJBA-Clo7-gS4.js → chunk-6OXUPJBA-CjFdZBrY.js} +2 -2
  39. package/dist/assets/{chunk-ABZYJK2D-DjRcbxmx.js → chunk-ABZYJK2D-eZsthrBr.js} +1 -1
  40. package/dist/assets/{chunk-BN7GFLIU-DvomLhVN.js → chunk-BN7GFLIU-ez-vZ7uD.js} +1 -1
  41. package/dist/assets/{chunk-CXMOBAN2-GhUPxuLT.js → chunk-CXMOBAN2-DxbPW6zT.js} +1 -1
  42. package/dist/assets/{chunk-EXTU4WIE-97Zvkznr.js → chunk-EXTU4WIE-C8Y_P6y8.js} +1 -1
  43. package/dist/assets/{chunk-JA3XYJ7Z-Mvfz9vG6.js → chunk-JA3XYJ7Z-pR89xWsn.js} +1 -1
  44. package/dist/assets/{chunk-JEIROHC2-Cp1tR_z8.js → chunk-JEIROHC2-2-ucCTVJ.js} +1 -1
  45. package/dist/assets/{chunk-K7UQS3LO-BbFs0Y5e.js → chunk-K7UQS3LO-Bz3bjON2.js} +1 -1
  46. package/dist/assets/{chunk-KMC2YHZD-Buiqyl2g.js → chunk-KMC2YHZD-BvMr39QE.js} +1 -1
  47. package/dist/assets/{chunk-QN33PNHL-dhs223oU.js → chunk-QN33PNHL-DgF0LOHR.js} +1 -1
  48. package/dist/assets/{chunk-QYVHNE3D-DA_jYaIp.js → chunk-QYVHNE3D-BxN3DJBX.js} +1 -1
  49. package/dist/assets/{chunk-S3R3BYOJ-DO68jEIo.js → chunk-S3R3BYOJ-Dy72CLbv.js} +1 -1
  50. package/dist/assets/{chunk-T44TD3VJ-Ww2OhwR5.js → chunk-T44TD3VJ-BfMjD4hS.js} +1 -1
  51. package/dist/assets/{chunk-TVAH2DTR-j2EljfwG.js → chunk-TVAH2DTR-CKnRAcjo.js} +1 -1
  52. package/dist/assets/{chunk-TZMSLE5B-DYFKU4Pb.js → chunk-TZMSLE5B-DdgcuCwZ.js} +1 -1
  53. package/dist/assets/{chunk-WFRQ32O7-k2LaZwie.js → chunk-WFRQ32O7-CHVQx4E8.js} +1 -1
  54. package/dist/assets/{chunk-WFWHJNB7-h5yM_3qQ.js → chunk-WFWHJNB7-B095GDsj.js} +1 -1
  55. package/dist/assets/{chunk-XRWGC2XP-C9Mh6qts.js → chunk-XRWGC2XP-C9u0mhR4.js} +1 -1
  56. package/dist/assets/{circle-play-Cktn64O2.js → circle-play-BnvyuDgL.js} +1 -1
  57. package/dist/assets/{circle-plus-CR5IX63e.js → circle-plus-CfdbDkkn.js} +1 -1
  58. package/dist/assets/{circle-x-t3DIkXqJ.js → circle-x-BsVcxKkV.js} +1 -1
  59. package/dist/assets/classDiagram-KNZD7YFC-CjqRV-TB.js +1 -0
  60. package/dist/assets/classDiagram-v2-RKCZMP56-CGekJfCg.js +1 -0
  61. package/dist/assets/client-RNr6mM1Y.js +2 -0
  62. package/dist/assets/{clipboard-paste-CCXUHJEo.js → clipboard-paste-CYFMW3x7.js} +1 -1
  63. package/dist/assets/column-preview-2H8pwalb.js +2 -0
  64. package/dist/assets/{columns-BBxos2iF.js → columns-qXe5bccO.js} +7 -7
  65. package/dist/assets/{command-CMralWVx.js → command-BZVf1cJP.js} +1 -1
  66. package/dist/assets/command-palette-CYMxp9xF.js +1 -0
  67. package/dist/assets/{common-CGhyb0HV.js → common-DW3bNKWY.js} +1 -1
  68. package/dist/assets/{config-DiCy6eC0.js → config-DXGmIv9f.js} +1 -1
  69. package/dist/assets/{copy-DAVB02c8.js → copy-6mpL4BeI.js} +1 -1
  70. package/dist/assets/{copy-icon-GGPHJWJ0.js → copy-icon-6ICckC-p.js} +1 -1
  71. package/dist/assets/{dagre-5GWH7T2D-B1wEBSrx.js → dagre-5GWH7T2D-hVCok2au.js} +1 -1
  72. package/dist/assets/{data-grid-overlay-editor-Drp4I0tg.js → data-grid-overlay-editor-BwcAr1JM.js} +1 -1
  73. package/dist/assets/datasources-panel-BvrtAadm.js +1 -0
  74. package/dist/assets/{dates-grtSI02N.js → dates-Au76svwW.js} +1 -1
  75. package/dist/assets/dependency-graph-panel-F9AD_whb.js +4 -0
  76. package/dist/assets/{diagram-N5W7TBWH-D0MGIq61.js → diagram-N5W7TBWH-C26XpepA.js} +1 -1
  77. package/dist/assets/{diagram-QEK2KX5R-DU6geLeA.js → diagram-QEK2KX5R-yrTR8I_L.js} +1 -1
  78. package/dist/assets/{diagram-S2PKOQOG-BNhY4Z1-.js → diagram-S2PKOQOG-BnrvSrEb.js} +1 -1
  79. package/dist/assets/{dialog-B7icy1Vb.js → dialog-CR68_CUl.js} +1 -1
  80. package/dist/assets/{dist-BNjtn4W8.js → dist--01dzFeG.js} +1 -1
  81. package/dist/assets/{dist-BagyUivg.js → dist--UHY1FN-.js} +1 -1
  82. package/dist/assets/{dist-5Gm6w_15.js → dist-6vTAXnMq.js} +1 -1
  83. package/dist/assets/{dist-DTazGMur.js → dist-B6CCfKkp.js} +1 -1
  84. package/dist/assets/dist-BAqgWgpM.js +1 -0
  85. package/dist/assets/{dist-BaApG_tl.js → dist-BUe_o-3o.js} +1 -1
  86. package/dist/assets/{dist-BpAb8rGb.js → dist-BnTbfmCK.js} +1 -1
  87. package/dist/assets/dist-C-4GTx-T.js +1 -0
  88. package/dist/assets/{dist-C0ek66tJ.js → dist-C1lnVyyK.js} +1 -1
  89. package/dist/assets/{dist-DGiVfc7V.js → dist-CbsJnssA.js} +1 -1
  90. package/dist/assets/{dist-DV-8bxFo.js → dist-CjoeBoZ9.js} +1 -1
  91. package/dist/assets/{dist-D5QvSsL_.js → dist-CsC8ZokE.js} +1 -1
  92. package/dist/assets/{dist-C69eWtaQ.js → dist-CyqTsfyg.js} +1 -1
  93. package/dist/assets/dist-D-ZYdf69.js +1 -0
  94. package/dist/assets/dist-D3B_GqVR.js +1 -0
  95. package/dist/assets/{dist-BME02X12.js → dist-DFJwMM7Z.js} +1 -1
  96. package/dist/assets/dist-Db9UVaw9.js +1 -0
  97. package/dist/assets/{dist-BPr57Wxb.js → dist-DhXqYYeD.js} +1 -1
  98. package/dist/assets/{dist-CL0hPMY6.js → dist-Dm8m1boP.js} +1 -1
  99. package/dist/assets/{dist-B0vg88Aq.js → dist-DvDyxv8b.js} +1 -1
  100. package/dist/assets/{dist-Bzn1Zd0x.js → dist-DzUKODTF.js} +1 -1
  101. package/dist/assets/dist-LmEq3o4w.js +1 -0
  102. package/dist/assets/dist-Z_cK0cSh.js +1 -0
  103. package/dist/assets/dist-biP83Yvc.js +1 -0
  104. package/dist/assets/dist-dJ4FqqTe.js +1 -0
  105. package/dist/assets/{documentation-panel-D4iq1tSm.js → documentation-panel-DYKAf6Sg.js} +1 -1
  106. package/dist/assets/{dom-4KyFHEbl.js → dom-CT3dAMQW.js} +1 -1
  107. package/dist/assets/{download-C4Fyu6kU.js → download-B4_BX7gi.js} +1 -1
  108. package/dist/assets/{download-qt61TbgC.js → download-BB5Iexmn.js} +1 -1
  109. package/dist/assets/{dropdown-menu-Bp1vhqcS.js → dropdown-menu-CJDB1PNI.js} +1 -1
  110. package/dist/assets/edit-page-BK3Irdme.js +12 -0
  111. package/dist/assets/{ellipsis-DVXWk8Lc.js → ellipsis-CJtiw1k3.js} +1 -1
  112. package/dist/assets/{ellipsis-vertical-DfpheMuY.js → ellipsis-vertical-DK--y082.js} +1 -1
  113. package/dist/assets/{en-US-B2g9dciI.js → en-US-CjWuOpsV.js} +1 -1
  114. package/dist/assets/{erDiagram-AWTI2OKA-DxxWZrYD.js → erDiagram-AWTI2OKA-9EqwLrlG.js} +1 -1
  115. package/dist/assets/{error-banner-ARu6PiHL.js → error-banner-BGjnZePp.js} +1 -1
  116. package/dist/assets/error-panel-CrkbkIF_.js +1 -0
  117. package/dist/assets/{es-C0Ih1AxE.js → es-C-CWIA-E.js} +1 -1
  118. package/dist/assets/{esm-BR7TuyMc.js → esm-7XxuulnL.js} +1 -1
  119. package/dist/assets/{esm-Cb-iIF_w.js → esm-B39og2OG.js} +1 -1
  120. package/dist/assets/{esm-BIF8NHm8.js → esm-BBn_y9Ew.js} +1 -1
  121. package/dist/assets/esm-DjUQOOJ2.js +1 -0
  122. package/dist/assets/{eye-off-BEVibdMQ.js → eye-off-9UMe_Y7D.js} +1 -1
  123. package/dist/assets/field-D6g5A_wf.js +1 -0
  124. package/dist/assets/{file-DqkkCGhs.js → file-BENStGHx.js} +1 -1
  125. package/dist/assets/file-explorer-panel-Cgv3WjVh.js +1 -0
  126. package/dist/assets/{file-plus-2-BCmZgbYs.js → file-plus-2-CloHhbsF.js} +1 -1
  127. package/dist/assets/{file-text-DNmaotaP.js → file-text-Lr1kJd4E.js} +1 -1
  128. package/dist/assets/{file-video-camera-C5lALvNf.js → file-video-camera-CfnyBQQe.js} +1 -1
  129. package/dist/assets/filename-B5Yo1bOu.js +1 -0
  130. package/dist/assets/{floating-outline-Cjas_exC.js → floating-outline-DZnSnZfg.js} +1 -1
  131. package/dist/assets/{flowDiagram-PVAE7QVJ-DlTZtqcN.js → flowDiagram-PVAE7QVJ-iOj6Qgu-.js} +1 -1
  132. package/dist/assets/{focus-OWoLlKnm.js → focus-Bnk25hTp.js} +1 -1
  133. package/dist/assets/{form-xOqp67zT.js → form-BGZvwlog.js} +1 -1
  134. package/dist/assets/{form--nX5W3gQ.js → form-DyKYT1WR.js} +1 -1
  135. package/dist/assets/{formats-C8bbggqj.js → formats-CWdWXhfT.js} +1 -1
  136. package/dist/assets/{fullscreen-BFmvQx5m.js → fullscreen-DTPr3iBY.js} +1 -1
  137. package/dist/assets/{ganttDiagram-OWAHRB6G-BEPmawB5.js → ganttDiagram-OWAHRB6G-BWbXeAXa.js} +1 -1
  138. package/dist/assets/{gitGraph-ZV4HHKMB-DsmmnKI3.js → gitGraph-ZV4HHKMB-BpeeuO4L.js} +1 -1
  139. package/dist/assets/{gitGraphDiagram-NY62KEGX-DfTKmX9v.js → gitGraphDiagram-NY62KEGX-BX3O-mzY.js} +1 -1
  140. package/dist/assets/{glide-data-editor-CzDe-oK3.js → glide-data-editor-C45ArX7n.js} +4 -4
  141. package/dist/assets/globals-BFoVgbHf.js +1 -0
  142. package/dist/assets/{globe-CgG1jfYF.js → globe-CPrVx8HM.js} +1 -1
  143. package/dist/assets/home-page-DhT6cm6c.js +4 -0
  144. package/dist/assets/{image-DXGqie4b.js → image-DTv0Ic6H.js} +1 -1
  145. package/dist/assets/{index-DtggTI4O.js → index-29P5xX8u.js} +11 -11
  146. package/dist/assets/index-Optxbl37.css +2 -0
  147. package/dist/assets/{info-63CPKGFF-BVRAJzgS.js → info-63CPKGFF-Czr08O9A.js} +1 -1
  148. package/dist/assets/{infoDiagram-STP46IZ2-CcEqfhrj.js → infoDiagram-STP46IZ2-C1JX9JfB.js} +1 -1
  149. package/dist/assets/input-C1RzjWSK.js +7 -0
  150. package/dist/assets/{isValid-gOtpcPxn.js → isValid-o3nZVu8e.js} +1 -1
  151. package/dist/assets/{journeyDiagram-BIP6EPQ6-CfxDuLls.js → journeyDiagram-BIP6EPQ6-CC2JvTQD.js} +1 -1
  152. package/dist/assets/{kanban-definition-6OIFK2YF-BwopERfW.js → kanban-definition-6OIFK2YF-3qAhCi66.js} +1 -1
  153. package/dist/assets/{key-BuxNhFKW.js → key-D4QiH_7H.js} +1 -1
  154. package/dist/assets/{kiosk-mode--OX2RHZj.js → kiosk-mode-Dy2WnuWt.js} +1 -1
  155. package/dist/assets/{label-COeaBwl_.js → label-BEUjZsdo.js} +1 -1
  156. package/dist/assets/{layout-CKoMTVJt.js → layout-C6K0XXFK.js} +3 -3
  157. package/dist/assets/{linear-BI0LBATm.js → linear-nWRf49aw.js} +1 -1
  158. package/dist/assets/{link-DSY8ADga.js → link-CDOxp9sn.js} +1 -1
  159. package/dist/assets/links-D-L0rzz9.js +1 -0
  160. package/dist/assets/{list-filter-D2Wx3thV.js → list-filter-CRC72QPW.js} +1 -1
  161. package/dist/assets/{loader-CPDA0quD.js → loader-CgbiPC_T.js} +1 -1
  162. package/dist/assets/logs-panel-BB-6orqg.js +1 -0
  163. package/dist/assets/{maps-CxCIYhRT.js → maps-DaQbs_UR.js} +1 -1
  164. package/dist/assets/{menu-items-COILZQ4q.js → menu-items-Bo6Dyd_Q.js} +1 -1
  165. package/dist/assets/{mermaid-oqJ6vLFm.js → mermaid-Bqzxmx0C.js} +1 -1
  166. package/dist/assets/{mermaid-parser.core-8414a7OP.js → mermaid-parser.core-CwRCqiGJ.js} +2 -2
  167. package/dist/assets/{mermaid.core-CKfX2q8j.js → mermaid.core-C4o4vdkw.js} +3 -3
  168. package/dist/assets/mermaid.core-DjncFP_O.js +1 -0
  169. package/dist/assets/{mindmap-definition-Q6HEUPPD-nadsjaMC.js → mindmap-definition-Q6HEUPPD-pLcSm-bI.js} +1 -1
  170. package/dist/assets/{mode-CBh2Ag_Y.js → mode-DQPKc-Hp.js} +1 -1
  171. package/dist/assets/{name-cell-input-CAG50xh2.js → name-cell-input-DQd65hJw.js} +1 -1
  172. package/dist/assets/{number-overlay-editor-CbWBjwI1.js → number-overlay-editor-Ce_FEpnn.js} +1 -1
  173. package/dist/assets/once-8ZDiGGtA.js +1 -0
  174. package/dist/assets/outline-panel-BJDiYH61.js +1 -0
  175. package/dist/assets/packages-panel-D_VswrEd.js +1 -0
  176. package/dist/assets/{packet-HUATNLJX-BJ_b_gYi.js → packet-HUATNLJX-C5NsAS_7.js} +1 -1
  177. package/dist/assets/{pie-WTHONI2E-CS2JfH5S.js → pie-WTHONI2E-BCNGQ0_9.js} +1 -1
  178. package/dist/assets/{pieDiagram-ADFJNKIX-DP_lAtPz.js → pieDiagram-ADFJNKIX-CUCBn1VN.js} +1 -1
  179. package/dist/assets/plug-DrNpofTj.js +1 -0
  180. package/dist/assets/{plus-C1zexBxS.js → plus-d2HNOuZI.js} +1 -1
  181. package/dist/assets/{popover-CLp_lH16.js → popover-DW0D4l0O.js} +1 -1
  182. package/dist/assets/{precisionRound-CR2cxaaR.js → precisionRound-TxjBk8nN.js} +1 -1
  183. package/dist/assets/{quadrantDiagram-LMRXKWRM-gzT_-w3S.js → quadrantDiagram-LMRXKWRM-C6DXTSnZ.js} +1 -1
  184. package/dist/assets/{radar-NJJJXTRR-ChMDxgqR.js → radar-NJJJXTRR-Cck-wBOB.js} +1 -1
  185. package/dist/assets/{react-plotly-DUuIpNDT.js → react-plotly-x7-8ig7L.js} +1 -1
  186. package/dist/assets/{readonly-python-code-DMLMHG1v.js → readonly-python-code-Cb7Ak_Dy.js} +1 -1
  187. package/dist/assets/{refresh-ccw-lUiAEOAx.js → refresh-ccw-CCJeTTJO.js} +1 -1
  188. package/dist/assets/{refresh-cw-CSv3xyYY.js → refresh-cw-B_tmnHav.js} +1 -1
  189. package/dist/assets/{renderShortcut-DMYtt-ju.js → renderShortcut-C9_NT6sD.js} +1 -1
  190. package/dist/assets/{request-registry-4Bq310sk.js → request-registry-D4PD0fDJ.js} +1 -1
  191. package/dist/assets/{requirementDiagram-4UW4RH46-aavD0qQF.js → requirementDiagram-4UW4RH46-Bj7w3axz.js} +1 -1
  192. package/dist/assets/run-page-D9jntYU0.js +1 -0
  193. package/dist/assets/{runs-CItfCHkl.js → runs-BWcKkv9g.js} +1 -1
  194. package/dist/assets/{sankeyDiagram-GR3RE2ED-r95m_h3N.js → sankeyDiagram-GR3RE2ED-DCmlCkUu.js} +1 -1
  195. package/dist/assets/{save-Bg0tsaXV.js → save-CVcbYdvl.js} +1 -1
  196. package/dist/assets/scratchpad-panel-BUGlPLwQ.js +1 -0
  197. package/dist/assets/{scroll-text-SAt1GCBr.js → scroll-text-CN-2fr92.js} +1 -1
  198. package/dist/assets/secrets-panel-DGPyMcTb.js +1 -0
  199. package/dist/assets/{select-CMG6DC3j.js → select-DKRTzlUU.js} +1 -1
  200. package/dist/assets/{send-ePQN2mpH.js → send-DRRBOpzT.js} +1 -1
  201. package/dist/assets/{sequenceDiagram-C3RYC4MD-C4GqHIgf.js → sequenceDiagram-C3RYC4MD-CtIOF8jj.js} +1 -1
  202. package/dist/assets/{settings-TIv8aSog.js → settings-6ySBJQ7Y.js} +1 -1
  203. package/dist/assets/{share-CUbi0XlA.js → share-Dcl7D_tA.js} +1 -1
  204. package/dist/assets/snippets-panel-CKi40HiX.js +1 -0
  205. package/dist/assets/{spinner-CxlO4-GJ.js → spinner-BhnfQOEl.js} +1 -1
  206. package/dist/assets/{square-uM1ci7iL.js → square-DKPXnMmD.js} +1 -1
  207. package/dist/assets/{square-function-OflPQrBg.js → square-function-DBJINsmk.js} +1 -1
  208. package/dist/assets/{square-terminal-DZAwMMdQ.js → square-terminal-DoFRZ-M6.js} +1 -1
  209. package/dist/assets/{src-BOK-SWX4.js → src-KuQao6GK.js} +1 -1
  210. package/dist/assets/state-B37sZn4X.js +1 -0
  211. package/dist/assets/{state-COfuW2QS.js → state-CEmS5WFQ.js} +1 -1
  212. package/dist/assets/state-jvUYiWCG.js +1 -0
  213. package/dist/assets/{stateDiagram-KXAO66HF-CdN43FzO.js → stateDiagram-KXAO66HF-DwZscOce.js} +1 -1
  214. package/dist/assets/stateDiagram-v2-UMBNRL4Z-D5XUGcJP.js +1 -0
  215. package/dist/assets/stex-C7nwqmPk.js +1 -0
  216. package/dist/assets/storage-CaQ7kwuv.js +1 -0
  217. package/dist/assets/{switch-BKaPFRvh.js → switch-B5bMMWJn.js} +1 -1
  218. package/dist/assets/{tabs-C8HicIPZ.js → tabs-8ThyQfYh.js} +1 -1
  219. package/dist/assets/{terminal-Cnm8ANjQ.js → terminal-CPdYItDn.js} +1 -1
  220. package/dist/assets/{text-search-DpMeajoz.js → text-search-iEvFn29l.js} +1 -1
  221. package/dist/assets/{textarea-DhU2DWSB.js → textarea-B-_OthMe.js} +1 -1
  222. package/dist/assets/{time-Dzg4b75Q.js → time-BkIHCvH2.js} +1 -1
  223. package/dist/assets/{timeline-definition-XQNQX7LJ-D48ppGT8.js → timeline-definition-XQNQX7LJ-BGsZ09p6.js} +1 -1
  224. package/dist/assets/{toDate-BartytS4.js → toDate-Daj1hQSF.js} +1 -1
  225. package/dist/assets/{toggle-BLLoLiay.js → toggle-BpFqu8FB.js} +1 -1
  226. package/dist/assets/{tooltip-BjoMzmCN.js → tooltip-ULHbIsj9.js} +1 -1
  227. package/dist/assets/tracing-UKZUjbDB.js +2 -0
  228. package/dist/assets/tracing-panel-CuDItRLt.js +2 -0
  229. package/dist/assets/{trash-2-GOPu47oc.js → trash-2-3UJSaMKF.js} +1 -1
  230. package/dist/assets/{trash-BpVsWH8l.js → trash-CYX7fe5Y.js} +1 -1
  231. package/dist/assets/{tree-qyAlDlFy.js → tree-3z9r1N_5.js} +1 -1
  232. package/dist/assets/{treemap-75Q7IDZK-B4o24kyC.js → treemap-75Q7IDZK-MX1Hmq0m.js} +1 -1
  233. package/dist/assets/{type-C9leWRlU.js → type-kF6pOJbH.js} +1 -1
  234. package/dist/assets/{types-BBD3GQ0S.js → types-DQDL7dro.js} +1 -1
  235. package/dist/assets/{types-DEwRoAG0.js → types-DyTIgBnH.js} +1 -1
  236. package/dist/assets/{useAddCell-DJhNA_O5.js → useAddCell-Dq3HqYz1.js} +1 -1
  237. package/dist/assets/{useAsyncData-BEqqunls.js → useAsyncData-D9GA9BWg.js} +1 -1
  238. package/dist/assets/{useBoolean-DnggoYme.js → useBoolean-CSR3XjhE.js} +1 -1
  239. package/dist/assets/{useCellActionButton-B_a4Sv2X.js → useCellActionButton-BAG0Vvnt.js} +1 -1
  240. package/dist/assets/{useDateFormatter-DjmrLzxH.js → useDateFormatter-DrFLqO1D.js} +1 -1
  241. package/dist/assets/{useDebounce-9_rqRiHk.js → useDebounce-_ztZiL0I.js} +1 -1
  242. package/dist/assets/{useDeepCompareMemoize-DIhr42Iz.js → useDeepCompareMemoize-BsZY8i2r.js} +1 -1
  243. package/dist/assets/{useDeleteCell-DVNOLjwN.js → useDeleteCell-CJaipocw.js} +1 -1
  244. package/dist/assets/useHotkey-DkiyGPLs.js +1 -0
  245. package/dist/assets/{useInstallPackage-CTHO3tj3.js → useInstallPackage-DoKAq17E.js} +1 -1
  246. package/dist/assets/useNotebookActions-CQd8IgyR.js +1 -0
  247. package/dist/assets/useSplitCell-Dodncnp8.js +1 -0
  248. package/dist/assets/{useTheme-C5JyqXTm.js → useTheme-oPMxEKRc.js} +1 -1
  249. package/dist/assets/{utilities.esm-DbqS7Pjb.js → utilities.esm-DcV_e-D3.js} +1 -1
  250. package/dist/assets/utils-DBmmAf_K.js +1 -0
  251. package/dist/assets/variable-panel-BCihDsBL.js +1 -0
  252. package/dist/assets/{vega-component-D1ZJxK-L.js → vega-component-CWMEFM7y.js} +1 -1
  253. package/dist/assets/{vega-loader.browser.module-Jwd7L8Ye.js → vega-loader.browser.module-BkWiTok0.js} +1 -1
  254. package/dist/assets/{with-selector-CXhuorCH.js → with-selector-BmLsipPw.js} +1 -1
  255. package/dist/assets/{workflow-Covue_dW.js → workflow-DA01FBLw.js} +1 -1
  256. package/dist/assets/{wrench-DNJq8NCj.js → wrench-B2m2X1sb.js} +1 -1
  257. package/dist/assets/{write-secret-modal-qe46KOIw.js → write-secret-modal-Dx9oubag.js} +1 -1
  258. package/dist/assets/{xychartDiagram-6GGTOJPD-DK41sZTI.js → xychartDiagram-6GGTOJPD-D-i5LTeX.js} +1 -1
  259. package/dist/assets/{youtube-0-RiaVkr.js → youtube-Bl4NeyvA.js} +1 -1
  260. package/dist/index.html +155 -155
  261. package/package.json +1 -1
  262. package/src/__tests__/chat-history.test.ts +123 -0
  263. package/src/components/app-config/ai-config.tsx +23 -0
  264. package/src/components/app-config/mcp-config.tsx +42 -2
  265. package/src/components/app-config/user-config-form.tsx +0 -24
  266. package/src/components/chat/acp/__tests__/context-utils.test.ts +1 -1
  267. package/src/components/chat/acp/agent-panel.tsx +1 -1
  268. package/src/components/chat/acp/blocks.tsx +46 -53
  269. package/src/components/chat/acp/common.tsx +1 -1
  270. package/src/components/chat/acp/context-utils.ts +1 -1
  271. package/src/components/chat/acp/session-tabs.tsx +1 -1
  272. package/src/components/chat/chat-history-popover.tsx +125 -0
  273. package/src/components/chat/chat-history-utils.ts +69 -0
  274. package/src/components/chat/chat-panel.tsx +9 -57
  275. package/src/components/editor/__tests__/data-attributes.test.tsx +1 -1
  276. package/src/components/editor/actions/useNotebookActions.tsx +2 -4
  277. package/src/components/editor/ai/__tests__/completion-utils.test.ts +23 -31
  278. package/src/components/editor/cell/CreateCellButton.tsx +14 -2
  279. package/src/components/editor/cell/code/cell-editor.tsx +1 -0
  280. package/src/components/editor/database/schemas.ts +2 -10
  281. package/src/components/editor/{Cell.tsx → notebook-cell.tsx} +5 -1
  282. package/src/components/editor/output/MarimoErrorOutput.tsx +4 -34
  283. package/src/components/editor/renderers/{CellArray.tsx → cell-array.tsx} +1 -1
  284. package/src/components/forms/__tests__/form-utils.test.ts +2 -2
  285. package/src/components/mcp/hooks.ts +48 -0
  286. package/src/components/mcp/mcp-status-indicator.tsx +144 -0
  287. package/src/components/ui/number-field.tsx +4 -1
  288. package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +13 -19
  289. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +0 -1
  290. package/src/core/ai/context/providers/__tests__/datasource.test.ts +5 -6
  291. package/src/core/ai/context/providers/__tests__/error.test.ts +24 -15
  292. package/src/core/ai/context/providers/cell-output.ts +5 -5
  293. package/src/core/ai/context/providers/common.ts +13 -4
  294. package/src/core/ai/context/providers/datasource.ts +31 -20
  295. package/src/core/ai/context/providers/error.ts +3 -4
  296. package/src/core/ai/context/providers/file.ts +2 -2
  297. package/src/core/ai/context/providers/tables.ts +36 -8
  298. package/src/core/ai/context/providers/variable.ts +2 -3
  299. package/src/core/cells/__tests__/cells.test.ts +6 -6
  300. package/src/core/cells/cells.ts +12 -13
  301. package/src/core/cells/scrollCellIntoView.ts +1 -1
  302. package/src/core/codemirror/__tests__/setup.test.ts +1 -0
  303. package/src/core/codemirror/cm.ts +3 -2
  304. package/src/core/config/__tests__/config-schema.test.ts +2 -0
  305. package/src/core/config/config-schema.ts +2 -0
  306. package/src/core/config/feature-flag.tsx +0 -2
  307. package/src/core/edit-app.tsx +1 -1
  308. package/src/core/network/CachingRequestRegistry.ts +2 -2
  309. package/src/stories/cell.stories.tsx +1 -1
  310. package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
  311. package/src/utils/numbers.ts +24 -1
  312. package/dist/assets/MarimoErrorOutput-CUb4AQdT.js +0 -6
  313. package/dist/assets/add-cell-with-ai-DCyfgnLI.js +0 -36
  314. package/dist/assets/agent-panel-B_MMb9mo.js +0 -287
  315. package/dist/assets/ai-model-dropdown-Dk9Kz_pz.js +0 -2
  316. package/dist/assets/api-DBBaApVO.js +0 -1
  317. package/dist/assets/app-config-button-Cbw9b5rl.js +0 -1
  318. package/dist/assets/cell-link-woRE950-.js +0 -1
  319. package/dist/assets/channel-D-YgrD6I.js +0 -1
  320. package/dist/assets/chat-panel-DLphumiN.js +0 -3
  321. package/dist/assets/check-hL6-9SZK.js +0 -1
  322. package/dist/assets/circle-check-big-C7DGeh12.js +0 -1
  323. package/dist/assets/classDiagram-KNZD7YFC-yzXw7kFX.js +0 -1
  324. package/dist/assets/classDiagram-v2-RKCZMP56-Co2zbBi0.js +0 -1
  325. package/dist/assets/client-CA946N69.js +0 -2
  326. package/dist/assets/column-preview-BT14RHNM.js +0 -2
  327. package/dist/assets/command-palette-qYrNUNjA.js +0 -1
  328. package/dist/assets/datasources-panel-2YJ76Lq8.js +0 -1
  329. package/dist/assets/dependency-graph-panel-CnzvmPdT.js +0 -4
  330. package/dist/assets/dist-BtRvVXgu.js +0 -1
  331. package/dist/assets/dist-CAZ5kHnb.js +0 -1
  332. package/dist/assets/dist-CN8IvtVY.js +0 -1
  333. package/dist/assets/dist-Cw007UHk.js +0 -1
  334. package/dist/assets/dist-DEfSR7VW.js +0 -1
  335. package/dist/assets/dist-DSbiMNpu.js +0 -1
  336. package/dist/assets/dist-DeIZvG9x.js +0 -1
  337. package/dist/assets/dist-DyZWkD0n.js +0 -1
  338. package/dist/assets/dist-hfODPqg9.js +0 -1
  339. package/dist/assets/edit-page-Bt_YqRld.js +0 -12
  340. package/dist/assets/error-panel-dvBEznKE.js +0 -1
  341. package/dist/assets/esm-hOS9Yf3s.js +0 -1
  342. package/dist/assets/field-Ota1KKvP.js +0 -1
  343. package/dist/assets/file-explorer-panel-Pa89UfV1.js +0 -1
  344. package/dist/assets/filename-BYm5Do9U.js +0 -1
  345. package/dist/assets/home-page-B3bIZC6F.js +0 -4
  346. package/dist/assets/index-BQd14tU4.css +0 -2
  347. package/dist/assets/input-Dm-m3XYB.js +0 -7
  348. package/dist/assets/links-CQoApRoA.js +0 -1
  349. package/dist/assets/logs-panel-R50NxjC7.js +0 -1
  350. package/dist/assets/mermaid.core-BjBlUxCx.js +0 -1
  351. package/dist/assets/numbers-DtHKLeOn.js +0 -1
  352. package/dist/assets/outline-panel-CB2kV_p5.js +0 -1
  353. package/dist/assets/packages-panel-BpFuUbAr.js +0 -1
  354. package/dist/assets/run-page-ClDuCh42.js +0 -1
  355. package/dist/assets/scratchpad-panel-BRljth0m.js +0 -1
  356. package/dist/assets/secrets-panel-CQON2dfx.js +0 -1
  357. package/dist/assets/snippets-panel-C0OdhmTA.js +0 -1
  358. package/dist/assets/state-DaDgAzck.js +0 -1
  359. package/dist/assets/state-Do6Fn2Io.js +0 -1
  360. package/dist/assets/stateDiagram-v2-UMBNRL4Z-Bi0DZGHg.js +0 -1
  361. package/dist/assets/stex-CbLDtSMU.js +0 -1
  362. package/dist/assets/storage-DFOl3UlZ.js +0 -1
  363. package/dist/assets/tracing-k1M6Upka.js +0 -2
  364. package/dist/assets/tracing-panel-CyG4yTCu.js +0 -2
  365. package/dist/assets/useHotkey-CJ5v8JMM.js +0 -1
  366. package/dist/assets/useNotebookActions-BB-5-4dL.js +0 -1
  367. package/dist/assets/useSplitCell-Cy53n7mS.js +0 -1
  368. package/dist/assets/utils-CfnN8i3Y.js +0 -1
  369. package/dist/assets/variable-panel-Dd_6lOoR.js +0 -1
  370. /package/dist/assets/{Deferred-BIEvCvJC.js → Deferred-Mppm0cvJ.js} +0 -0
  371. /package/dist/assets/{alert-B2-Y1fzf.js → alert-hjKHAeOD.js} +0 -0
  372. /package/dist/assets/{badge-D5b5ze0K.js → badge-DJuT6BaT.js} +0 -0
  373. /package/dist/assets/{blob-DFrnsWYL.js → blob-CTPcPiam.js} +0 -0
  374. /package/dist/assets/{connection-Cb7zku0y.js → connection-D2GvycR9.js} +0 -0
  375. /package/dist/assets/{copy-BiKQh0sU.js → copy-CkZsxeON.js} +0 -0
  376. /package/dist/assets/{createLucideIcon-Be9UM2Pe.js → createLucideIcon-QLW8E4z5.js} +0 -0
  377. /package/dist/assets/{createReducer-BaSP2BKE.js → createReducer-CFr1RdS2.js} +0 -0
  378. /package/dist/assets/{defaultLocale-DU4zdxes.js → defaultLocale-C6TNIE_k.js} +0 -0
  379. /package/dist/assets/{defaultLocale-BCtmQtCj.js → defaultLocale-DPsgYaXf.js} +0 -0
  380. /package/dist/assets/{dist-DIuPmJ5w.js → dist-Bz53xjA5.js} +0 -0
  381. /package/dist/assets/{dist-BhR4qmIv.js → dist-DcASoeRZ.js} +0 -0
  382. /package/dist/assets/{dist-BMAXVGJe.js → dist-Dlusp3mb.js} +0 -0
  383. /package/dist/assets/{documentation-BZROoSma.js → documentation-B7z6bB-t.js} +0 -0
  384. /package/dist/assets/{emotion-is-prop-valid.esm-plUNooLR.js → emotion-is-prop-valid.esm-BbphD4LX.js} +0 -0
  385. /package/dist/assets/{errors-qtuExmE-.js → errors-_3XAtRr3.js} +0 -0
  386. /package/dist/assets/{es-Hxx5X1vH.js → es-BVCqnQhJ.js} +0 -0
  387. /package/dist/assets/{extends--r5KbeWh.js → extends-Bwhapo2B.js} +0 -0
  388. /package/dist/assets/{fast-deep-equal-DT2Tke28.js → fast-deep-equal-BdzBWnNx.js} +0 -0
  389. /package/dist/assets/{icons-BUUt9FMo.js → icons-CLD-J5J3.js} +0 -0
  390. /package/dist/assets/{kbd-DItNvBdP.js → kbd-BQFiWIjd.js} +0 -0
  391. /package/dist/assets/{main-Co0CqoDt.js → main-CfqcqCNp.js} +0 -0
  392. /package/dist/assets/{marked.esm-BVjBUuHx.js → marked.esm-C_54K2ke.js} +0 -0
  393. /package/dist/assets/{namespace-BstGchRe.js → namespace-CnoeT75h.js} +0 -0
  394. /package/dist/assets/{objectWithoutPropertiesLoose-CGYpiDu4.js → objectWithoutPropertiesLoose-CDpgRi8_.js} +0 -0
  395. /package/dist/assets/{ordinal-DO1z0TEs.js → ordinal-CHS6rGcb.js} +0 -0
  396. /package/dist/assets/{preload-helper-CxnU7XTI.js → preload-helper-DImqtvgl.js} +0 -0
  397. /package/dist/assets/{prop-types-Bv8iPqhZ.js → prop-types-CHKlDUlJ.js} +0 -0
  398. /package/dist/assets/{range-CJAH1fu_.js → range-BPiwmiGf.js} +0 -0
  399. /package/dist/assets/{shim-Bk8nzKPV.js → shim-CWt9rDBn.js} +0 -0
  400. /package/dist/assets/{stex-CETff8Y9.js → stex-BrOrfhKB.js} +0 -0
  401. /package/dist/assets/{strings-1yw0WVap.js → strings-DYBy5ejj.js} +0 -0
  402. /package/dist/assets/{tslib.es6-DItc8Tbq.js → tslib.es6-dlz5WbC8.js} +0 -0
  403. /package/dist/assets/{use-toast-C07-frN_.js → use-toast-D6NNsC80.js} +0 -0
  404. /package/dist/assets/{useEvent-BIiDVnhT.js → useEvent-BOb1a9d1.js} +0 -0
  405. /package/dist/assets/{useLifecycle-Bnvt0QrQ.js → useLifecycle-BfeAlD80.js} +0 -0
  406. /package/dist/assets/{useNonce-Cw4ZAbgi.js → useNonce-BbWkd3B4.js} +0 -0
  407. /package/dist/assets/{useNumberFormatter-DYIEUCTe.js → useNumberFormatter-D21brJ0f.js} +0 -0
  408. /package/dist/assets/{uuid-BWz20PcF.js → uuid-4lb_EYpq.js} +0 -0
@@ -1,4 +1,4 @@
1
- var te;import{s as He,t as de}from"./chunk-DZLz74EQ.js";import"./_Uint8Array-CPNtPV0k.js";import"./isSymbol-D1Vf4s0g.js";import"./_arrayMap-DQI2GUNb.js";import"./toString-pPvo2488.js";import"./toNumber-Bjr00yqN.js";import"./toInteger-Qi6pclEF.js";import"./isArrayLikeObject-CQy5-FN4.js";import"./_getTag-C4fv2peH.js";import"./_baseUniq-DuMeVp_r.js";import"./_baseIsEqual-Cdnsi4t8.js";import"./chunk-4KMFLZZN-D8J8fzqf.js";import"./_toKey-BvVjBIlz.js";import"./memoize-D2QB0zzX.js";import"./get-Bi1nZ6vb.js";import"./_baseFlatten-BM8p5vhd.js";import"./_basePickBy-CViVNfOD.js";import"./merge-DrdmtLTL.js";import"./_baseSlice-B27Cqkm6.js";import"./_arrayReduce-DDpPg0Qh.js";import"./clone-C-4MVcJh.js";import"./_baseEach-CWBhny_f.js";import"./hasIn-BZo8Xaqq.js";import"./_baseProperty-CIKnF2iY.js";import"./_createAggregator-DiCw154M.js";import"./min-DZ9NrTCT.js";import"./_baseMap-vZ8RB515.js";import"./isEmpty-D1b_MAwx.js";import"./_baseSet-B-t_O9-N.js";import"./preload-helper-CxnU7XTI.js";import"./main-Co0CqoDt.js";import"./marked.esm-BVjBUuHx.js";import"./timer-m_pEB4Lb.js";import{u as Xe}from"./src--EmJf_Ct.js";import"./math-BsaXoFIn.js";import"./step-aJ-oEw6-.js";import{i as ze}from"./chunk-S3R3BYOJ-DO68jEIo.js";import{n as gt,r as Ae}from"./src-CWnjMQt8.js";import{B as Be,C as Ve,G as We,I as je,U as qe,_ as $e,a as Ze,b as ge,d as Qe,v as Je,y as Ke,z as ti}from"./chunk-ABZYJK2D-DjRcbxmx.js";import{t as ei}from"./chunk-EXTU4WIE-97Zvkznr.js";import"./dist-D2dAPhhG.js";import{i as ii,n as ce,o as ri,r as ue}from"./chunk-JA3XYJ7Z-Mvfz9vG6.js";import"./chunk-JEIROHC2-Cp1tR_z8.js";import"./chunk-BN7GFLIU-DvomLhVN.js";import"./chunk-T44TD3VJ-Ww2OhwR5.js";import"./chunk-KMC2YHZD-Buiqyl2g.js";import"./chunk-WFWHJNB7-h5yM_3qQ.js";import"./chunk-WFRQ32O7-k2LaZwie.js";import"./chunk-XRWGC2XP-C9Mh6qts.js";import{t as oi}from"./chunk-4BX2VUAB-BesOWRPY.js";import{t as ni}from"./mermaid-parser.core-8414a7OP.js";import{t as Ce}from"./cytoscape.esm-DgaM79UU.js";var Le=de(((I,M)=>{(function(C,x){typeof I=="object"&&typeof M=="object"?M.exports=x():typeof define=="function"&&define.amd?define([],x):typeof I=="object"?I.layoutBase=x():C.layoutBase=x()})(I,function(){return(function(C){var x={};function N(f){if(x[f])return x[f].exports;var r=x[f]={i:f,l:!1,exports:{}};return C[f].call(r.exports,r,r.exports,N),r.l=!0,r.exports}return N.m=C,N.c=x,N.i=function(f){return f},N.d=function(f,r,n){N.o(f,r)||Object.defineProperty(f,r,{configurable:!1,enumerable:!0,get:n})},N.n=function(f){var r=f&&f.__esModule?function(){return f.default}:function(){return f};return N.d(r,"a",r),r},N.o=function(f,r){return Object.prototype.hasOwnProperty.call(f,r)},N.p="",N(N.s=28)})([(function(C,x,N){function f(){}f.QUALITY=1,f.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,f.DEFAULT_INCREMENTAL=!1,f.DEFAULT_ANIMATION_ON_LAYOUT=!0,f.DEFAULT_ANIMATION_DURING_LAYOUT=!1,f.DEFAULT_ANIMATION_PERIOD=50,f.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,f.DEFAULT_GRAPH_MARGIN=15,f.NODE_DIMENSIONS_INCLUDE_LABELS=!1,f.SIMPLE_NODE_SIZE=40,f.SIMPLE_NODE_HALF_SIZE=f.SIMPLE_NODE_SIZE/2,f.EMPTY_COMPOUND_NODE_SIZE=40,f.MIN_EDGE_LENGTH=1,f.WORLD_BOUNDARY=1e6,f.INITIAL_WORLD_BOUNDARY=f.WORLD_BOUNDARY/1e3,f.WORLD_CENTER_X=1200,f.WORLD_CENTER_Y=900,C.exports=f}),(function(C,x,N){var f=N(2),r=N(8),n=N(9);function t(s,a,p){f.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=s,this.target=a}for(var e in t.prototype=Object.create(f.prototype),f)t[e]=f[e];t.prototype.getSource=function(){return this.source},t.prototype.getTarget=function(){return this.target},t.prototype.isInterGraph=function(){return this.isInterGraph},t.prototype.getLength=function(){return this.length},t.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},t.prototype.getBendpoints=function(){return this.bendpoints},t.prototype.getLca=function(){return this.lca},t.prototype.getSourceInLca=function(){return this.sourceInLca},t.prototype.getTargetInLca=function(){return this.targetInLca},t.prototype.getOtherEnd=function(s){if(this.source===s)return this.target;if(this.target===s)return this.source;throw"Node is not incident with this edge"},t.prototype.getOtherEndInGraph=function(s,a){for(var p=this.getOtherEnd(s),o=a.getGraphManager().getRoot();;){if(p.getOwner()==a)return p;if(p.getOwner()==o)break;p=p.getOwner().getParent()}return null},t.prototype.updateLength=function(){var s=[,,,,];this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),s),this.isOverlapingSourceAndTarget||(this.lengthX=s[0]-s[2],this.lengthY=s[1]-s[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},t.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=t}),(function(C,x,N){function f(r){this.vGraphObject=r}C.exports=f}),(function(C,x,N){var f=N(2),r=N(10),n=N(13),t=N(0),e=N(16),s=N(5);function a(o,i,d,h){d==null&&h==null&&(h=i),f.call(this,h),o.graphManager!=null&&(o=o.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=h,this.edges=[],this.graphManager=o,d!=null&&i!=null?this.rect=new n(i.x,i.y,d.width,d.height):this.rect=new n}for(var p in a.prototype=Object.create(f.prototype),f)a[p]=f[p];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(o){this.rect.width=o},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(o){this.rect.height=o},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new s(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new s(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(o,i){this.rect.x=o.x,this.rect.y=o.y,this.rect.width=i.width,this.rect.height=i.height},a.prototype.setCenter=function(o,i){this.rect.x=o-this.rect.width/2,this.rect.y=i-this.rect.height/2},a.prototype.setLocation=function(o,i){this.rect.x=o,this.rect.y=i},a.prototype.moveBy=function(o,i){this.rect.x+=o,this.rect.y+=i},a.prototype.getEdgeListToNode=function(o){var i=[],d=this;return d.edges.forEach(function(h){if(h.target==o){if(h.source!=d)throw"Incorrect edge source!";i.push(h)}}),i},a.prototype.getEdgesBetween=function(o){var i=[],d=this;return d.edges.forEach(function(h){if(!(h.source==d||h.target==d))throw"Incorrect edge source and/or target";(h.target==o||h.source==o)&&i.push(h)}),i},a.prototype.getNeighborsList=function(){var o=new Set,i=this;return i.edges.forEach(function(d){if(d.source==i)o.add(d.target);else{if(d.target!=i)throw"Incorrect incidency!";o.add(d.source)}}),o},a.prototype.withChildren=function(){var o=new Set,i,d;if(o.add(this),this.child!=null)for(var h=this.child.getNodes(),c=0;c<h.length;c++)i=h[c],d=i.withChildren(),d.forEach(function(g){o.add(g)});return o},a.prototype.getNoOfChildren=function(){var o=0,i;if(this.child==null)o=1;else for(var d=this.child.getNodes(),h=0;h<d.length;h++)i=d[h],o+=i.getNoOfChildren();return o==0&&(o=1),o},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},a.prototype.scatter=function(){var o,i,d=-t.INITIAL_WORLD_BOUNDARY,h=t.INITIAL_WORLD_BOUNDARY;o=t.WORLD_CENTER_X+e.nextDouble()*(h-d)+d;var c=-t.INITIAL_WORLD_BOUNDARY,g=t.INITIAL_WORLD_BOUNDARY;i=t.WORLD_CENTER_Y+e.nextDouble()*(g-c)+c,this.rect.x=o,this.rect.y=i},a.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var o=this.getChild();if(o.updateBounds(!0),this.rect.x=o.getLeft(),this.rect.y=o.getTop(),this.setWidth(o.getRight()-o.getLeft()),this.setHeight(o.getBottom()-o.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var i=o.getRight()-o.getLeft(),d=o.getBottom()-o.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(i+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>i?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(d+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>d?(this.rect.y-=(this.labelHeight-d)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(d+this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(o){var i=this.rect.x;i>t.WORLD_BOUNDARY?i=t.WORLD_BOUNDARY:i<-t.WORLD_BOUNDARY&&(i=-t.WORLD_BOUNDARY);var d=this.rect.y;d>t.WORLD_BOUNDARY?d=t.WORLD_BOUNDARY:d<-t.WORLD_BOUNDARY&&(d=-t.WORLD_BOUNDARY);var h=new s(i,d),c=o.inverseTransformPoint(h);this.setLocation(c.x,c.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=a}),(function(C,x,N){var f=N(0);function r(){}for(var n in f)r[n]=f[n];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,r.COOLING_ADAPTATION_FACTOR=.33,r.ADAPTATION_LOWER_NODE_LIMIT=1e3,r.ADAPTATION_UPPER_NODE_LIMIT=5e3,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=r.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=r}),(function(C,x,N){function f(r,n){r==null&&n==null?(this.x=0,this.y=0):(this.x=r,this.y=n)}f.prototype.getX=function(){return this.x},f.prototype.getY=function(){return this.y},f.prototype.setX=function(r){this.x=r},f.prototype.setY=function(r){this.y=r},f.prototype.getDifference=function(r){return new DimensionD(this.x-r.x,this.y-r.y)},f.prototype.getCopy=function(){return new f(this.x,this.y)},f.prototype.translate=function(r){return this.x+=r.width,this.y+=r.height,this},C.exports=f}),(function(C,x,N){var f=N(2),r=N(10),n=N(0),t=N(7),e=N(3),s=N(1),a=N(13),p=N(12),o=N(11);function i(h,c,g){f.call(this,g),this.estimatedSize=r.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=h,c!=null&&c instanceof t?this.graphManager=c:c!=null&&c instanceof Layout&&(this.graphManager=c.graphManager)}for(var d in i.prototype=Object.create(f.prototype),f)i[d]=f[d];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(h,c,g){if(c==null&&g==null){var v=h;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var T=h;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(g)>-1))throw"Source or target not in graph!";if(!(c.owner==g.owner&&c.owner==this))throw"Both owners must be this graph!";return c.owner==g.owner?(T.source=c,T.target=g,T.isInterGraph=!1,this.getEdges().push(T),c.edges.push(T),g!=c&&g.edges.push(T),T):null}},i.prototype.remove=function(h){var c=h;if(h instanceof e){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var g=c.edges.slice(),v,T=g.length,L=0;L<T;L++)v=g[L],v.isInterGraph?this.graphManager.remove(v):v.source.owner.remove(v);var R=this.nodes.indexOf(c);if(R==-1)throw"Node not in owner node list!";this.nodes.splice(R,1)}else if(h instanceof s){var v=h;if(v==null)throw"Edge is null!";if(!(v.source!=null&&v.target!=null))throw"Source and/or target is null!";if(!(v.source.owner!=null&&v.target.owner!=null&&v.source.owner==this&&v.target.owner==this))throw"Source and/or target owner is invalid!";var S=v.source.edges.indexOf(v),U=v.target.edges.indexOf(v);if(!(S>-1&&U>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(S,1),v.target!=v.source&&v.target.edges.splice(U,1);var R=v.source.owner.getEdges().indexOf(v);if(R==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(R,1)}},i.prototype.updateLeftTop=function(){for(var h=r.MAX_VALUE,c=r.MAX_VALUE,g,v,T,L=this.getNodes(),R=L.length,S=0;S<R;S++){var U=L[S];g=U.getTop(),v=U.getLeft(),h>g&&(h=g),c>v&&(c=v)}return h==r.MAX_VALUE?null:(T=L[0].getParent().paddingLeft==null?this.margin:L[0].getParent().paddingLeft,this.left=c-T,this.top=h-T,new p(this.left,this.top))},i.prototype.updateBounds=function(h){for(var c=r.MAX_VALUE,g=-r.MAX_VALUE,v=r.MAX_VALUE,T=-r.MAX_VALUE,L,R,S,U,q,Z=this.nodes,D=Z.length,Q=0;Q<D;Q++){var l=Z[Q];h&&l.child!=null&&l.updateBounds(),L=l.getLeft(),R=l.getRight(),S=l.getTop(),U=l.getBottom(),c>L&&(c=L),g<R&&(g=R),v>S&&(v=S),T<U&&(T=U)}var E=new a(c,v,g-c,T-v);c==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),q=Z[0].getParent().paddingLeft==null?this.margin:Z[0].getParent().paddingLeft,this.left=E.x-q,this.right=E.x+E.width+q,this.top=E.y-q,this.bottom=E.y+E.height+q},i.calculateBounds=function(h){for(var c=r.MAX_VALUE,g=-r.MAX_VALUE,v=r.MAX_VALUE,T=-r.MAX_VALUE,L,R,S,U,q=h.length,Z=0;Z<q;Z++){var D=h[Z];L=D.getLeft(),R=D.getRight(),S=D.getTop(),U=D.getBottom(),c>L&&(c=L),g<R&&(g=R),v>S&&(v=S),T<U&&(T=U)}return new a(c,v,g-c,T-v)},i.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){for(var h=0,c=this.nodes,g=c.length,v=0;v<g;v++){var T=c[v];h+=T.calcEstimatedSize()}return h==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=h/Math.sqrt(this.nodes.length),this.estimatedSize},i.prototype.updateConnected=function(){var h=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new o,g=new Set,v=this.nodes[0],T,L;for(v.withChildren().forEach(function(q){c.push(q),g.add(q)});c.length!==0;){v=c.shift(),T=v.getEdges();for(var R=T.length,S=0;S<R;S++)L=T[S].getOtherEndInGraph(v,this),L!=null&&!g.has(L)&&L.withChildren().forEach(function(q){c.push(q),g.add(q)})}if(this.isConnected=!1,g.size>=this.nodes.length){var U=0;g.forEach(function(q){q.owner==h&&U++}),U==this.nodes.length&&(this.isConnected=!0)}},C.exports=i}),(function(C,x,N){var f,r=N(1);function n(t){f=N(6),this.layout=t,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),s=this.add(t,e);return this.setRootGraph(s),this.rootGraph},n.prototype.add=function(t,e,s,a,p){if(s==null&&a==null&&p==null){if(t==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),t.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return t.parent=e,e.child=t,t}else{p=s,a=e,s=t;var o=a.getOwner(),i=p.getOwner();if(!(o!=null&&o.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(o==i)return s.isInterGraph=!1,o.add(s,a,p);if(s.isInterGraph=!0,s.source=a,s.target=p,this.edges.indexOf(s)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(s),!(s.source!=null&&s.target!=null))throw"Edge source and/or target is null!";if(!(s.source.edges.indexOf(s)==-1&&s.target.edges.indexOf(s)==-1))throw"Edge already in source and/or target incidency list!";return s.source.edges.push(s),s.target.edges.push(s),s}},n.prototype.remove=function(t){if(t instanceof f){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var s=[];s=s.concat(e.getEdges());for(var a,p=s.length,o=0;o<p;o++)a=s[o],e.remove(a);var i=[];i=i.concat(e.getNodes());var d;p=i.length;for(var o=0;o<p;o++)d=i[o],e.remove(d);e==this.rootGraph&&this.setRootGraph(null);var h=this.graphs.indexOf(e);this.graphs.splice(h,1),e.parent=null}else if(t instanceof r){if(a=t,a==null)throw"Edge is null!";if(!a.isInterGraph)throw"Not an inter-graph edge!";if(!(a.source!=null&&a.target!=null))throw"Source and/or target is null!";if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw"Source and/or target doesn't know this edge!";var h=a.source.edges.indexOf(a);if(a.source.edges.splice(h,1),h=a.target.edges.indexOf(a),a.target.edges.splice(h,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw"Not in owner graph manager's edge list!";var h=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(h,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var t=[],e=this.getGraphs(),s=e.length,a=0;a<s;a++)t=t.concat(e[a].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var t=[],e=this.getGraphs();e.length;for(var s=0;s<e.length;s++)t=t.concat(e[s].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,t.parent??(t.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,e){if(!(t!=null&&e!=null))throw"assert failed";if(t==e)return!0;var s=t.getOwner(),a;do{if(a=s.getParent(),a==null)break;if(a==e)return!0;if(s=a.getOwner(),s==null)break}while(!0);s=e.getOwner();do{if(a=s.getParent(),a==null)break;if(a==t)return!0;if(s=a.getOwner(),s==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,e,s,a,p,o=this.getAllEdges(),i=o.length,d=0;d<i;d++){if(t=o[d],e=t.source,s=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=s,e==s){t.lca=e.getOwner();continue}for(a=e.getOwner();t.lca==null;){for(t.targetInLca=s,p=s.getOwner();t.lca==null;){if(p==a){t.lca=p;break}if(p==this.rootGraph)break;if(t.lca!=null)throw"assert failed";t.targetInLca=p.getParent(),p=t.targetInLca.getOwner()}if(a==this.rootGraph)break;t.lca??(t.sourceInLca=a.getParent(),a=t.sourceInLca.getOwner())}if(t.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();var s=t.getOwner();do{if(s==null)break;var a=e.getOwner();do{if(a==null)break;if(a==s)return a;a=a.getParent().getOwner()}while(!0);s=s.getParent().getOwner()}while(!0);return s},n.prototype.calcInclusionTreeDepths=function(t,e){t==null&&e==null&&(t=this.rootGraph,e=1);for(var s,a=t.getNodes(),p=a.length,o=0;o<p;o++)s=a[o],s.inclusionTreeDepth=e,s.child!=null&&this.calcInclusionTreeDepths(s.child,e+1)},n.prototype.includesInvalidEdge=function(){for(var t,e=[],s=this.edges.length,a=0;a<s;a++)t=this.edges[a],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(var a=0;a<e.length;a++)this.remove(e[a]);return!1},C.exports=n}),(function(C,x,N){var f=N(12);function r(){}r.calcSeparationAmount=function(n,t,e,s){if(!n.intersects(t))throw"assert failed";var a=[,,];this.decideDirectionsForOverlappingNodes(n,t,a),e[0]=Math.min(n.getRight(),t.getRight())-Math.max(n.x,t.x),e[1]=Math.min(n.getBottom(),t.getBottom())-Math.max(n.y,t.y),n.getX()<=t.getX()&&n.getRight()>=t.getRight()?e[0]+=Math.min(t.getX()-n.getX(),n.getRight()-t.getRight()):t.getX()<=n.getX()&&t.getRight()>=n.getRight()&&(e[0]+=Math.min(n.getX()-t.getX(),t.getRight()-n.getRight())),n.getY()<=t.getY()&&n.getBottom()>=t.getBottom()?e[1]+=Math.min(t.getY()-n.getY(),n.getBottom()-t.getBottom()):t.getY()<=n.getY()&&t.getBottom()>=n.getBottom()&&(e[1]+=Math.min(n.getY()-t.getY(),t.getBottom()-n.getBottom()));var p=Math.abs((t.getCenterY()-n.getCenterY())/(t.getCenterX()-n.getCenterX()));t.getCenterY()===n.getCenterY()&&t.getCenterX()===n.getCenterX()&&(p=1);var o=p*e[0],i=e[1]/p;e[0]<i?i=e[0]:o=e[1],e[0]=-1*a[0]*(i/2+s),e[1]=-1*a[1]*(o/2+s)},r.decideDirectionsForOverlappingNodes=function(n,t,e){n.getCenterX()<t.getCenterX()?e[0]=-1:e[0]=1,n.getCenterY()<t.getCenterY()?e[1]=-1:e[1]=1},r.getIntersection2=function(n,t,e){var s=n.getCenterX(),a=n.getCenterY(),p=t.getCenterX(),o=t.getCenterY();if(n.intersects(t))return e[0]=s,e[1]=a,e[2]=p,e[3]=o,!0;var i=n.getX(),d=n.getY(),h=n.getRight(),c=n.getX(),g=n.getBottom(),v=n.getRight(),T=n.getWidthHalf(),L=n.getHeightHalf(),R=t.getX(),S=t.getY(),U=t.getRight(),q=t.getX(),Z=t.getBottom(),D=t.getRight(),Q=t.getWidthHalf(),l=t.getHeightHalf(),E=!1,u=!1;if(s===p){if(a>o)return e[0]=s,e[1]=d,e[2]=p,e[3]=Z,!1;if(a<o)return e[0]=s,e[1]=g,e[2]=p,e[3]=S,!1}else if(a===o){if(s>p)return e[0]=i,e[1]=a,e[2]=U,e[3]=o,!1;if(s<p)return e[0]=h,e[1]=a,e[2]=R,e[3]=o,!1}else{var y=n.height/n.width,m=t.height/t.width,A=(o-a)/(p-s),w=void 0,b=void 0,G=void 0,F=void 0,Y=void 0,V=void 0;if(-y===A?s>p?(e[0]=c,e[1]=g,E=!0):(e[0]=h,e[1]=d,E=!0):y===A&&(s>p?(e[0]=i,e[1]=d,E=!0):(e[0]=v,e[1]=g,E=!0)),-m===A?p>s?(e[2]=q,e[3]=Z,u=!0):(e[2]=U,e[3]=S,u=!0):m===A&&(p>s?(e[2]=R,e[3]=S,u=!0):(e[2]=D,e[3]=Z,u=!0)),E&&u)return!1;if(s>p?a>o?(w=this.getCardinalDirection(y,A,4),b=this.getCardinalDirection(m,A,2)):(w=this.getCardinalDirection(-y,A,3),b=this.getCardinalDirection(-m,A,1)):a>o?(w=this.getCardinalDirection(-y,A,1),b=this.getCardinalDirection(-m,A,3)):(w=this.getCardinalDirection(y,A,2),b=this.getCardinalDirection(m,A,4)),!E)switch(w){case 1:F=d,G=s+-L/A,e[0]=G,e[1]=F;break;case 2:G=v,F=a+T*A,e[0]=G,e[1]=F;break;case 3:F=g,G=s+L/A,e[0]=G,e[1]=F;break;case 4:G=c,F=a+-T*A,e[0]=G,e[1]=F;break}if(!u)switch(b){case 1:V=S,Y=p+-l/A,e[2]=Y,e[3]=V;break;case 2:Y=D,V=o+Q*A,e[2]=Y,e[3]=V;break;case 3:V=Z,Y=p+l/A,e[2]=Y,e[3]=V;break;case 4:Y=q,V=o+-Q*A,e[2]=Y,e[3]=V;break}}return!1},r.getCardinalDirection=function(n,t,e){return n>t?e:1+e%4},r.getIntersection=function(n,t,e,s){if(s==null)return this.getIntersection2(n,t,e);var a=n.x,p=n.y,o=t.x,i=t.y,d=e.x,h=e.y,c=s.x,g=s.y,v=void 0,T=void 0,L=void 0,R=void 0,S=void 0,U=void 0,q=void 0,Z=void 0,D=void 0;return L=i-p,S=a-o,q=o*p-a*i,R=g-h,U=d-c,Z=c*h-d*g,D=L*U-R*S,D===0?null:(v=(S*Z-U*q)/D,T=(R*q-L*Z)/D,new f(v,T))},r.angleOfVector=function(n,t,e,s){var a=void 0;return n===e?a=s<t?this.ONE_AND_HALF_PI:this.HALF_PI:(a=Math.atan((s-t)/(e-n)),e<n?a+=Math.PI:s<t&&(a+=this.TWO_PI)),a},r.doIntersect=function(n,t,e,s){var a=n.x,p=n.y,o=t.x,i=t.y,d=e.x,h=e.y,c=s.x,g=s.y,v=(o-a)*(g-h)-(c-d)*(i-p);if(v===0)return!1;var T=((g-h)*(c-a)+(d-c)*(g-p))/v,L=((p-i)*(c-a)+(o-a)*(g-p))/v;return 0<T&&T<1&&0<L&&L<1},r.findCircleLineIntersections=function(n,t,e,s,a,p,o){var i=(e-n)*(e-n)+(s-t)*(s-t),d=2*((n-a)*(e-n)+(t-p)*(s-t)),h=(n-a)*(n-a)+(t-p)*(t-p)-o*o;if(d*d-4*i*h>=0){var c=(-d+Math.sqrt(d*d-4*i*h))/(2*i),g=(-d-Math.sqrt(d*d-4*i*h))/(2*i);return c>=0&&c<=1?[c]:g>=0&&g<=1?[g]:null}else return null},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,C.exports=r}),(function(C,x,N){function f(){}f.sign=function(r){return r>0?1:r<0?-1:0},f.floor=function(r){return r<0?Math.ceil(r):Math.floor(r)},f.ceil=function(r){return r<0?Math.floor(r):Math.ceil(r)},C.exports=f}),(function(C,x,N){function f(){}f.MAX_VALUE=2147483647,f.MIN_VALUE=-2147483648,C.exports=f}),(function(C,x,N){var f=(function(){function s(a,p){for(var o=0;o<p.length;o++){var i=p[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,i.key,i)}}return function(a,p,o){return p&&s(a.prototype,p),o&&s(a,o),a}})();function r(s,a){if(!(s instanceof a))throw TypeError("Cannot call a class as a function")}var n=function(s){return{value:s,next:null,prev:null}},t=function(s,a,p,o){return s===null?o.head=a:s.next=a,p===null?o.tail=a:p.prev=a,a.prev=s,a.next=p,o.length++,a},e=function(s,a){var p=s.prev,o=s.next;return p===null?a.head=o:p.next=o,o===null?a.tail=p:o.prev=p,s.prev=s.next=null,a.length--,s};C.exports=(function(){function s(a){var p=this;r(this,s),this.length=0,this.head=null,this.tail=null,a==null||a.forEach(function(o){return p.push(o)})}return f(s,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(a,p){return t(p.prev,n(a),p,this)}},{key:"insertAfter",value:function(a,p){return t(p,n(a),p.next,this)}},{key:"insertNodeBefore",value:function(a,p){return t(p.prev,a,p,this)}},{key:"insertNodeAfter",value:function(a,p){return t(p,a,p.next,this)}},{key:"push",value:function(a){return t(this.tail,n(a),null,this)}},{key:"unshift",value:function(a){return t(null,n(a),this.head,this)}},{key:"remove",value:function(a){return e(a,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(a){if(a<=this.length()){for(var p=1,o=this.head;p<a;)o=o.next,p++;return o.value}}},{key:"set_object_at",value:function(a,p){if(a<=this.length()){for(var o=1,i=this.head;o<a;)i=i.next,o++;i.value=p}}}]),s})()}),(function(C,x,N){function f(r,n,t){this.x=null,this.y=null,r==null&&n==null&&t==null?(this.x=0,this.y=0):typeof r=="number"&&typeof n=="number"&&t==null?(this.x=r,this.y=n):r.constructor.name=="Point"&&n==null&&t==null&&(t=r,this.x=t.x,this.y=t.y)}f.prototype.getX=function(){return this.x},f.prototype.getY=function(){return this.y},f.prototype.getLocation=function(){return new f(this.x,this.y)},f.prototype.setLocation=function(r,n,t){r.constructor.name=="Point"&&n==null&&t==null?(t=r,this.setLocation(t.x,t.y)):typeof r=="number"&&typeof n=="number"&&t==null&&(parseInt(r)==r&&parseInt(n)==n?this.move(r,n):(this.x=Math.floor(r+.5),this.y=Math.floor(n+.5)))},f.prototype.move=function(r,n){this.x=r,this.y=n},f.prototype.translate=function(r,n){this.x+=r,this.y+=n},f.prototype.equals=function(r){if(r.constructor.name=="Point"){var n=r;return this.x==n.x&&this.y==n.y}return this==r},f.prototype.toString=function(){return new f().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=f}),(function(C,x,N){function f(r,n,t,e){this.x=0,this.y=0,this.width=0,this.height=0,r!=null&&n!=null&&t!=null&&e!=null&&(this.x=r,this.y=n,this.width=t,this.height=e)}f.prototype.getX=function(){return this.x},f.prototype.setX=function(r){this.x=r},f.prototype.getY=function(){return this.y},f.prototype.setY=function(r){this.y=r},f.prototype.getWidth=function(){return this.width},f.prototype.setWidth=function(r){this.width=r},f.prototype.getHeight=function(){return this.height},f.prototype.setHeight=function(r){this.height=r},f.prototype.getRight=function(){return this.x+this.width},f.prototype.getBottom=function(){return this.y+this.height},f.prototype.intersects=function(r){return!(this.getRight()<r.x||this.getBottom()<r.y||r.getRight()<this.x||r.getBottom()<this.y)},f.prototype.getCenterX=function(){return this.x+this.width/2},f.prototype.getMinX=function(){return this.getX()},f.prototype.getMaxX=function(){return this.getX()+this.width},f.prototype.getCenterY=function(){return this.y+this.height/2},f.prototype.getMinY=function(){return this.getY()},f.prototype.getMaxY=function(){return this.getY()+this.height},f.prototype.getWidthHalf=function(){return this.width/2},f.prototype.getHeightHalf=function(){return this.height/2},C.exports=f}),(function(C,x,N){var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function r(){}r.lastID=0,r.createID=function(n){return r.isPrimitive(n)?n:(n.uniqueID==null&&(n.uniqueID=r.getString(),r.lastID++),n.uniqueID)},r.getString=function(n){return n??(n=r.lastID),"Object#"+n},r.isPrimitive=function(n){var t=n===void 0?"undefined":f(n);return n==null||t!="object"&&t!="function"},C.exports=r}),(function(C,x,N){function f(d){if(Array.isArray(d)){for(var h=0,c=Array(d.length);h<d.length;h++)c[h]=d[h];return c}else return Array.from(d)}var r=N(0),n=N(7),t=N(3),e=N(1),s=N(6),a=N(5),p=N(17),o=N(29);function i(d){o.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,d!=null&&(this.isRemoteUse=d)}i.RANDOM_SEED=1,i.prototype=Object.create(o.prototype),i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},i.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},i.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},i.prototype.newGraphManager=function(){var d=new n(this);return this.graphManager=d,d},i.prototype.newGraph=function(d){return new s(null,this.graphManager,d)},i.prototype.newNode=function(d){return new t(this.graphManager,d)},i.prototype.newEdge=function(d){return new e(null,null,d)},i.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},i.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var d=this.checkLayoutSuccess()?!1:this.layout();return r.ANIMATE==="during"?!1:(d&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,d)},i.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},i.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var d=this.graphManager.getAllEdges(),h=0;h<d.length;h++)d[h];for(var c=this.graphManager.getRoot().getNodes(),h=0;h<c.length;h++)c[h];this.update(this.graphManager.getRoot())}},i.prototype.update=function(d){if(d==null)this.update2();else if(d instanceof t){var h=d;if(h.getChild()!=null)for(var c=h.getChild().getNodes(),g=0;g<c.length;g++)update(c[g]);h.vGraphObject!=null&&h.vGraphObject.update(h)}else if(d instanceof e){var v=d;v.vGraphObject!=null&&v.vGraphObject.update(v)}else if(d instanceof s){var T=d;T.vGraphObject!=null&&T.vGraphObject.update(T)}},i.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},i.prototype.transform=function(d){if(d==null)this.transform(new a(0,0));else{var h=new p,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){h.setWorldOrgX(d.x),h.setWorldOrgY(d.y),h.setDeviceOrgX(c.x),h.setDeviceOrgY(c.y);for(var g=this.getAllNodes(),v,T=0;T<g.length;T++)v=g[T],v.transform(h)}}},i.prototype.positionNodesRandomly=function(d){if(d==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var h,c,g=d.getNodes(),v=0;v<g.length;v++)h=g[v],c=h.getChild(),c==null||c.getNodes().length==0?h.scatter():(this.positionNodesRandomly(c),h.updateBounds())},i.prototype.getFlatForest=function(){for(var d=[],h=!0,c=this.graphManager.getRoot().getNodes(),g=!0,v=0;v<c.length;v++)c[v].getChild()!=null&&(g=!1);if(!g)return d;var T=new Set,L=[],R=new Map,S=[];for(S=S.concat(c);S.length>0&&h;){for(L.push(S[0]);L.length>0&&h;){var U=L[0];L.splice(0,1),T.add(U);for(var q=U.getEdges(),v=0;v<q.length;v++){var Z=q[v].getOtherEnd(U);if(R.get(U)!=Z)if(!T.has(Z))L.push(Z),R.set(Z,U);else{h=!1;break}}}if(!h)d=[];else{var D=[].concat(f(T));d.push(D);for(var v=0;v<D.length;v++){var Q=D[v],l=S.indexOf(Q);l>-1&&S.splice(l,1)}T=new Set,R=new Map}}return d},i.prototype.createDummyNodesForBendpoints=function(d){for(var h=[],c=d.source,g=this.graphManager.calcLowestCommonAncestor(d.source,d.target),v=0;v<d.bendpoints.length;v++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),g.add(T);var L=this.newEdge(null);this.graphManager.add(L,c,T),h.add(T),c=T}var L=this.newEdge(null);return this.graphManager.add(L,c,d.target),this.edgeToDummyNodes.set(d,h),d.isInterGraph()?this.graphManager.remove(d):g.remove(d),h},i.prototype.createBendpointsFromDummyNodes=function(){var d=[];d=d.concat(this.graphManager.getAllEdges()),d=[].concat(f(this.edgeToDummyNodes.keys()),d);for(var h=0;h<d.length;h++){var c=d[h];if(c.bendpoints.length>0){for(var g=this.edgeToDummyNodes.get(c),v=0;v<g.length;v++){var T=g[v],L=new a(T.getCenterX(),T.getCenterY()),R=c.bendpoints.get(v);R.x=L.x,R.y=L.y,T.getOwner().remove(T)}this.graphManager.add(c,c.source,c.target)}}},i.transform=function(d,h,c,g){if(c!=null&&g!=null){var v=h;if(d<=50){var T=h/c;v-=(h-T)/50*(50-d)}else{var L=h*g;v+=(L-h)/50*(d-50)}return v}else{var R,S;return d<=50?(R=9*h/500,S=h/10):(R=9*h/50,S=-8*h),R*d+S}},i.findCenterOfTree=function(d){var h=[];h=h.concat(d);var c=[],g=new Map,v=!1,T=null;(h.length==1||h.length==2)&&(v=!0,T=h[0]);for(var L=0;L<h.length;L++){var R=h[L],S=R.getNeighborsList().size;g.set(R,R.getNeighborsList().size),S==1&&c.push(R)}var U=[];for(U=U.concat(c);!v;){var q=[];q=q.concat(U),U=[];for(var L=0;L<h.length;L++){var R=h[L],Z=h.indexOf(R);Z>=0&&h.splice(Z,1),R.getNeighborsList().forEach(function(l){if(c.indexOf(l)<0){var E=g.get(l)-1;E==1&&U.push(l),g.set(l,E)}})}c=c.concat(U),(h.length==1||h.length==2)&&(v=!0,T=h[0])}return T},i.prototype.setGraphManager=function(d){this.graphManager=d},C.exports=i}),(function(C,x,N){function f(){}f.seed=1,f.x=0,f.nextDouble=function(){return f.x=Math.sin(f.seed++)*1e4,f.x-Math.floor(f.x)},C.exports=f}),(function(C,x,N){var f=N(5);function r(n,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(n){this.lworldExtX=n},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(n){this.lworldExtY=n},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},r.prototype.transformX=function(n){var t=0,e=this.lworldExtX;return e!=0&&(t=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/e),t},r.prototype.transformY=function(n){var t=0,e=this.lworldExtY;return e!=0&&(t=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/e),t},r.prototype.inverseTransformX=function(n){var t=0,e=this.ldeviceExtX;return e!=0&&(t=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/e),t},r.prototype.inverseTransformY=function(n){var t=0,e=this.ldeviceExtY;return e!=0&&(t=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/e),t},r.prototype.inverseTransformPoint=function(n){return new f(this.inverseTransformX(n.x),this.inverseTransformY(n.y))},C.exports=r}),(function(C,x,N){function f(o){if(Array.isArray(o)){for(var i=0,d=Array(o.length);i<o.length;i++)d[i]=o[i];return d}else return Array.from(o)}var r=N(15),n=N(4),t=N(0),e=N(8),s=N(9);function a(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var p in a.prototype=Object.create(r.prototype),r)a[p]=r[p];a.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var o,i,d,h,c,g,v,T=this.getGraphManager().getAllEdges(),L=0;L<T.length;L++)o=T[L],i=o.idealLength,o.isInterGraph&&(h=o.getSource(),c=o.getTarget(),g=o.getSourceInLca().getEstimatedSize(),v=o.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(o.idealLength+=g+v-2*t.SIMPLE_NODE_SIZE),d=o.getLca().getInclusionTreeDepth(),o.idealLength+=i*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(h.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*d))},a.prototype.initSpringEmbedder=function(){var o=this.getAllNodes().length;this.incremental?(o>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(o-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(o>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(o-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var o=this.getAllEdges(),i,d=0;d<o.length;d++)i=o[d],this.calcSpringForce(i,i.idealLength)},a.prototype.calcRepulsionForces=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d,h,c,g,v=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),T=new Set,d=0;d<v.length;d++)c=v[d],this.calculateRepulsionForceOfANode(c,T,o,i),T.add(c);else for(d=0;d<v.length;d++)for(c=v[d],h=d+1;h<v.length;h++)g=v[h],c.getOwner()==g.getOwner()&&this.calcRepulsionForce(c,g)},a.prototype.calcGravitationalForces=function(){for(var o,i=this.getAllNodesToApplyGravitation(),d=0;d<i.length;d++)o=i[d],this.calcGravitationalForce(o)},a.prototype.moveNodes=function(){for(var o=this.getAllNodes(),i,d=0;d<o.length;d++)i=o[d],i.move()},a.prototype.calcSpringForce=function(o,i){var d=o.getSource(),h=o.getTarget(),c,g,v,T;if(this.uniformLeafNodeSizes&&d.getChild()==null&&h.getChild()==null)o.updateLengthSimple();else if(o.updateLength(),o.isOverlapingSourceAndTarget)return;c=o.getLength(),c!=0&&(g=o.edgeElasticity*(c-i),v=g*(o.lengthX/c),T=g*(o.lengthY/c),d.springForceX+=v,d.springForceY+=T,h.springForceX-=v,h.springForceY-=T)},a.prototype.calcRepulsionForce=function(o,i){var d=o.getRect(),h=i.getRect(),c=[,,],g=[,,,,],v,T,L,R,S,U,q;if(d.intersects(h)){e.calcSeparationAmount(d,h,c,n.DEFAULT_EDGE_LENGTH/2),U=2*c[0],q=2*c[1];var Z=o.noOfChildren*i.noOfChildren/(o.noOfChildren+i.noOfChildren);o.repulsionForceX-=Z*U,o.repulsionForceY-=Z*q,i.repulsionForceX+=Z*U,i.repulsionForceY+=Z*q}else this.uniformLeafNodeSizes&&o.getChild()==null&&i.getChild()==null?(v=h.getCenterX()-d.getCenterX(),T=h.getCenterY()-d.getCenterY()):(e.getIntersection(d,h,g),v=g[2]-g[0],T=g[3]-g[1]),Math.abs(v)<n.MIN_REPULSION_DIST&&(v=s.sign(v)*n.MIN_REPULSION_DIST),Math.abs(T)<n.MIN_REPULSION_DIST&&(T=s.sign(T)*n.MIN_REPULSION_DIST),L=v*v+T*T,R=Math.sqrt(L),S=(o.nodeRepulsion/2+i.nodeRepulsion/2)*o.noOfChildren*i.noOfChildren/L,U=S*v/R,q=S*T/R,o.repulsionForceX-=U,o.repulsionForceY-=q,i.repulsionForceX+=U,i.repulsionForceY+=q},a.prototype.calcGravitationalForce=function(o){var i=o.getOwner(),d=(i.getRight()+i.getLeft())/2,h=(i.getTop()+i.getBottom())/2,c=o.getCenterX()-d,g=o.getCenterY()-h,v=Math.abs(c)+o.getWidth()/2,T=Math.abs(g)+o.getHeight()/2,L;o.getOwner()==this.graphManager.getRoot()?(L=i.getEstimatedSize()*this.gravityRangeFactor,(v>L||T>L)&&(o.gravitationForceX=-this.gravityConstant*c,o.gravitationForceY=-this.gravityConstant*g)):(L=i.getEstimatedSize()*this.compoundGravityRangeFactor,(v>L||T>L)&&(o.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,o.gravitationForceY=-this.gravityConstant*g*this.compoundGravityConstant))},a.prototype.isConverged=function(){var o,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),o=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,o||i},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var o,i=this.graphManager.getAllNodes(),d=0;d<i.length;d++)o=i[d],o.noOfChildren=o.getNoOfChildren()},a.prototype.calcGrid=function(o){var i=0,d=0;i=parseInt(Math.ceil((o.getRight()-o.getLeft())/this.repulsionRange)),d=parseInt(Math.ceil((o.getBottom()-o.getTop())/this.repulsionRange));for(var h=Array(i),c=0;c<i;c++)h[c]=Array(d);for(var c=0;c<i;c++)for(var g=0;g<d;g++)h[c][g]=[];return h},a.prototype.addNodeToGrid=function(o,i,d){var h=0,c=0,g=0,v=0;h=parseInt(Math.floor((o.getRect().x-i)/this.repulsionRange)),c=parseInt(Math.floor((o.getRect().width+o.getRect().x-i)/this.repulsionRange)),g=parseInt(Math.floor((o.getRect().y-d)/this.repulsionRange)),v=parseInt(Math.floor((o.getRect().height+o.getRect().y-d)/this.repulsionRange));for(var T=h;T<=c;T++)for(var L=g;L<=v;L++)this.grid[T][L].push(o),o.setGridCoordinates(h,c,g,v)},a.prototype.updateGrid=function(){var o,i,d=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),o=0;o<d.length;o++)i=d[o],this.addNodeToGrid(i,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(o,i,d,h){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&d||h){var c=new Set;o.surrounding=[];for(var g,v=this.grid,T=o.startX-1;T<o.finishX+2;T++)for(var L=o.startY-1;L<o.finishY+2;L++)if(!(T<0||L<0||T>=v.length||L>=v[0].length)){for(var R=0;R<v[T][L].length;R++)if(g=v[T][L][R],!(o.getOwner()!=g.getOwner()||o==g)&&!i.has(g)&&!c.has(g)){var S=Math.abs(o.getCenterX()-g.getCenterX())-(o.getWidth()/2+g.getWidth()/2),U=Math.abs(o.getCenterY()-g.getCenterY())-(o.getHeight()/2+g.getHeight()/2);S<=this.repulsionRange&&U<=this.repulsionRange&&c.add(g)}}o.surrounding=[].concat(f(c))}for(T=0;T<o.surrounding.length;T++)this.calcRepulsionForce(o,o.surrounding[T])},a.prototype.calcRepulsionRange=function(){return 0},C.exports=a}),(function(C,x,N){var f=N(1),r=N(4);function n(e,s,a){f.call(this,e,s,a),this.idealLength=r.DEFAULT_EDGE_LENGTH,this.edgeElasticity=r.DEFAULT_SPRING_STRENGTH}for(var t in n.prototype=Object.create(f.prototype),f)n[t]=f[t];C.exports=n}),(function(C,x,N){var f=N(3),r=N(4);function n(e,s,a,p){f.call(this,e,s,a,p),this.nodeRepulsion=r.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var t in n.prototype=Object.create(f.prototype),f)n[t]=f[t];n.prototype.setGridCoordinates=function(e,s,a,p){this.startX=e,this.finishX=s,this.startY=a,this.finishY=p},C.exports=n}),(function(C,x,N){function f(r,n){this.width=0,this.height=0,r!==null&&n!==null&&(this.height=n,this.width=r)}f.prototype.getWidth=function(){return this.width},f.prototype.setWidth=function(r){this.width=r},f.prototype.getHeight=function(){return this.height},f.prototype.setHeight=function(r){this.height=r},C.exports=f}),(function(C,x,N){var f=N(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(n,t){var e=f.createID(n);this.contains(e)||(this.map[e]=t,this.keys.push(n))},r.prototype.contains=function(n){return f.createID(n),this.map[n]!=null},r.prototype.get=function(n){var t=f.createID(n);return this.map[t]},r.prototype.keySet=function(){return this.keys},C.exports=r}),(function(C,x,N){var f=N(14);function r(){this.set={}}r.prototype.add=function(n){var t=f.createID(n);this.contains(t)||(this.set[t]=n)},r.prototype.remove=function(n){delete this.set[f.createID(n)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(n){return this.set[f.createID(n)]==n},r.prototype.isEmpty=function(){return this.size()===0},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(n){for(var t=Object.keys(this.set),e=t.length,s=0;s<e;s++)n.push(this.set[t[s]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(n){for(var t=n.length,e=0;e<t;e++){var s=n[e];this.add(s)}},C.exports=r}),(function(C,x,N){function f(){}f.multMat=function(r,n){for(var t=[],e=0;e<r.length;e++){t[e]=[];for(var s=0;s<n[0].length;s++){t[e][s]=0;for(var a=0;a<r[0].length;a++)t[e][s]+=r[e][a]*n[a][s]}}return t},f.transpose=function(r){for(var n=[],t=0;t<r[0].length;t++){n[t]=[];for(var e=0;e<r.length;e++)n[t][e]=r[e][t]}return n},f.multCons=function(r,n){for(var t=[],e=0;e<r.length;e++)t[e]=r[e]*n;return t},f.minusOp=function(r,n){for(var t=[],e=0;e<r.length;e++)t[e]=r[e]-n[e];return t},f.dotProduct=function(r,n){for(var t=0,e=0;e<r.length;e++)t+=r[e]*n[e];return t},f.mag=function(r){return Math.sqrt(this.dotProduct(r,r))},f.normalize=function(r){for(var n=[],t=this.mag(r),e=0;e<r.length;e++)n[e]=r[e]/t;return n},f.multGamma=function(r){for(var n=[],t=0,e=0;e<r.length;e++)t+=r[e];t*=-1/r.length;for(var s=0;s<r.length;s++)n[s]=t+r[s];return n},f.multL=function(r,n,t){for(var e=[],s=[],a=[],p=0;p<n[0].length;p++){for(var o=0,i=0;i<n.length;i++)o+=-.5*n[i][p]*r[i];s[p]=o}for(var d=0;d<t.length;d++){for(var h=0,c=0;c<t.length;c++)h+=t[d][c]*s[c];a[d]=h}for(var g=0;g<n.length;g++){for(var v=0,T=0;T<n[0].length;T++)v+=n[g][T]*a[T];e[g]=v}return e},C.exports=f}),(function(C,x,N){var f=(function(){function t(e,s){for(var a=0;a<s.length;a++){var p=s[a];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(e,p.key,p)}}return function(e,s,a){return s&&t(e.prototype,s),a&&t(e,a),e}})();function r(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}var n=N(11);C.exports=(function(){function t(e,s){r(this,t),(s!==null||s!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var a=void 0;a=e instanceof n?e.size():e.length,this._quicksort(e,0,a-1)}return f(t,[{key:"_quicksort",value:function(e,s,a){if(s<a){var p=this._partition(e,s,a);this._quicksort(e,s,p),this._quicksort(e,p+1,a)}}},{key:"_partition",value:function(e,s,a){for(var p=this._get(e,s),o=s,i=a;;){for(;this.compareFunction(p,this._get(e,i));)i--;for(;this.compareFunction(this._get(e,o),p);)o++;if(o<i)this._swap(e,o,i),o++,i--;else return i}}},{key:"_get",value:function(e,s){return e instanceof n?e.get_object_at(s):e[s]}},{key:"_set",value:function(e,s,a){e instanceof n?e.set_object_at(s,a):e[s]=a}},{key:"_swap",value:function(e,s,a){var p=this._get(e,s);this._set(e,s,this._get(e,a)),this._set(e,a,p)}},{key:"_defaultCompareFunction",value:function(e,s){return s>e}}]),t})()}),(function(C,x,N){function f(){}f.svd=function(r){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=r.length,this.n=r[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){return(function Nt(xt){if(xt.length==0)return 0;for(var Pt=[],Xt=0;Xt<xt[0];Xt++)Pt.push(Nt(xt.slice(1)));return Pt})(Tt)})([this.m,n]),this.V=(function(Tt){return(function Nt(xt){if(xt.length==0)return 0;for(var Pt=[],Xt=0;Xt<xt[0];Xt++)Pt.push(Nt(xt.slice(1)));return Pt})(Tt)})([this.n,this.n]);for(var t=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(this.n),e=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(this.m),s=!0,a=!0,p=Math.min(this.m-1,this.n),o=Math.max(0,Math.min(this.n-2,this.m)),i=0;i<Math.max(p,o);i++){if(i<p){this.s[i]=0;for(var d=i;d<this.m;d++)this.s[i]=f.hypot(this.s[i],r[d][i]);if(this.s[i]!==0){r[i][i]<0&&(this.s[i]=-this.s[i]);for(var h=i;h<this.m;h++)r[h][i]/=this.s[i];r[i][i]+=1}this.s[i]=-this.s[i]}for(var c=i+1;c<this.n;c++){if((function(Tt,Nt){return Tt&&Nt})(i<p,this.s[i]!==0)){for(var g=0,v=i;v<this.m;v++)g+=r[v][i]*r[v][c];g=-g/r[i][i];for(var T=i;T<this.m;T++)r[T][c]+=g*r[T][i]}t[c]=r[i][c]}if((function(Tt,Nt){return Tt&&Nt})(s,i<p))for(var L=i;L<this.m;L++)this.U[L][i]=r[L][i];if(i<o){t[i]=0;for(var R=i+1;R<this.n;R++)t[i]=f.hypot(t[i],t[R]);if(t[i]!==0){t[i+1]<0&&(t[i]=-t[i]);for(var S=i+1;S<this.n;S++)t[S]/=t[i];t[i+1]+=1}if(t[i]=-t[i],(function(Tt,Nt){return Tt&&Nt})(i+1<this.m,t[i]!==0)){for(var U=i+1;U<this.m;U++)e[U]=0;for(var q=i+1;q<this.n;q++)for(var Z=i+1;Z<this.m;Z++)e[Z]+=t[q]*r[Z][q];for(var D=i+1;D<this.n;D++)for(var Q=-t[D]/t[i+1],l=i+1;l<this.m;l++)r[l][D]+=Q*e[l]}if(a)for(var E=i+1;E<this.n;E++)this.V[E][i]=t[E]}}var u=Math.min(this.n,this.m+1);if(p<this.n&&(this.s[p]=r[p][p]),this.m<u&&(this.s[u-1]=0),o+1<u&&(t[o]=r[o][u-1]),t[u-1]=0,s){for(var y=p;y<n;y++){for(var m=0;m<this.m;m++)this.U[m][y]=0;this.U[y][y]=1}for(var A=p-1;A>=0;A--)if(this.s[A]!==0){for(var w=A+1;w<n;w++){for(var b=0,G=A;G<this.m;G++)b+=this.U[G][A]*this.U[G][w];b=-b/this.U[A][A];for(var F=A;F<this.m;F++)this.U[F][w]+=b*this.U[F][A]}for(var Y=A;Y<this.m;Y++)this.U[Y][A]=-this.U[Y][A];this.U[A][A]=1+this.U[A][A];for(var V=0;V<A-1;V++)this.U[V][A]=0}else{for(var J=0;J<this.m;J++)this.U[J][A]=0;this.U[A][A]=1}}if(a)for(var k=this.n-1;k>=0;k--){if((function(Tt,Nt){return Tt&&Nt})(k<o,t[k]!==0))for(var X=k+1;X<n;X++){for(var O=0,z=k+1;z<this.n;z++)O+=this.V[z][k]*this.V[z][X];O=-O/this.V[k+1][k];for(var et=k+1;et<this.n;et++)this.V[et][X]+=O*this.V[et][k]}for(var H=0;H<this.n;H++)this.V[H][k]=0;this.V[k][k]=1}for(var B=u-1,lt=0,at=2**-52,Lt=2**-966;u>0;){var W=void 0,pt=void 0;for(W=u-2;W>=-1&&W!==-1;W--)if(Math.abs(t[W])<=Lt+at*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){t[W]=0;break}if(W===u-2)pt=4;else{var vt=void 0;for(vt=u-1;vt>=W&&vt!==W;vt--){var Bt=(vt===u?0:Math.abs(t[vt]))+(vt===W+1?0:Math.abs(t[vt-1]));if(Math.abs(this.s[vt])<=Lt+at*Bt){this.s[vt]=0;break}}vt===W?pt=3:vt===u-1?pt=1:(pt=2,W=vt)}switch(W++,pt){case 1:var Ut=t[u-2];t[u-2]=0;for(var It=u-2;It>=W;It--){var Mt=f.hypot(this.s[It],Ut),Yt=this.s[It]/Mt,Ht=Ut/Mt;if(this.s[It]=Mt,It!==W&&(Ut=-Ht*t[It-1],t[It-1]=Yt*t[It-1]),a)for(var Rt=0;Rt<this.n;Rt++)Mt=Yt*this.V[Rt][It]+Ht*this.V[Rt][u-1],this.V[Rt][u-1]=-Ht*this.V[Rt][It]+Yt*this.V[Rt][u-1],this.V[Rt][It]=Mt}break;case 2:var Vt=t[W-1];t[W-1]=0;for(var Gt=W;Gt<u;Gt++){var st=f.hypot(this.s[Gt],Vt),ot=this.s[Gt]/st,ct=Vt/st;if(this.s[Gt]=st,Vt=-ct*t[Gt],t[Gt]=ot*t[Gt],s)for(var _=0;_<this.m;_++)st=ot*this.U[_][Gt]+ct*this.U[_][W-1],this.U[_][W-1]=-ct*this.U[_][Gt]+ot*this.U[_][W-1],this.U[_][Gt]=st}break;case 3:var P=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[u-1]),Math.abs(this.s[u-2])),Math.abs(t[u-2])),Math.abs(this.s[W])),Math.abs(t[W])),$=this.s[u-1]/P,j=this.s[u-2]/P,tt=t[u-2]/P,Et=this.s[W]/P,yt=t[W]/P,it=((j+$)*(j-$)+tt*tt)/2,ft=$*tt*($*tt),_t=0;(function(Tt,Nt){return Tt||Nt})(it!==0,ft!==0)&&(_t=Math.sqrt(it*it+ft),it<0&&(_t=-_t),_t=ft/(it+_t));for(var wt=(Et+$)*(Et-$)+_t,mt=Et*yt,ht=W;ht<u-1;ht++){var dt=f.hypot(wt,mt),K=wt/dt,ut=mt/dt;if(ht!==W&&(t[ht-1]=dt),wt=K*this.s[ht]+ut*t[ht],t[ht]=K*t[ht]-ut*this.s[ht],mt=ut*this.s[ht+1],this.s[ht+1]=K*this.s[ht+1],a)for(var At=0;At<this.n;At++)dt=K*this.V[At][ht]+ut*this.V[At][ht+1],this.V[At][ht+1]=-ut*this.V[At][ht]+K*this.V[At][ht+1],this.V[At][ht]=dt;if(dt=f.hypot(wt,mt),K=wt/dt,ut=mt/dt,this.s[ht]=dt,wt=K*t[ht]+ut*this.s[ht+1],this.s[ht+1]=-ut*t[ht]+K*this.s[ht+1],mt=ut*t[ht+1],t[ht+1]=K*t[ht+1],s&&ht<this.m-1)for(var rt=0;rt<this.m;rt++)dt=K*this.U[rt][ht]+ut*this.U[rt][ht+1],this.U[rt][ht+1]=-ut*this.U[rt][ht]+K*this.U[rt][ht+1],this.U[rt][ht]=dt}t[u-2]=wt,lt+=1;break;case 4:if(this.s[W]<=0&&(this.s[W]=this.s[W]<0?-this.s[W]:0,a))for(var bt=0;bt<=B;bt++)this.V[bt][W]=-this.V[bt][W];for(;W<B&&!(this.s[W]>=this.s[W+1]);){var Ot=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=Ot,a&&W<this.n-1)for(var Dt=0;Dt<this.n;Dt++)Ot=this.V[Dt][W+1],this.V[Dt][W+1]=this.V[Dt][W],this.V[Dt][W]=Ot;if(s&&W<this.m-1)for(var Ft=0;Ft<this.m;Ft++)Ot=this.U[Ft][W+1],this.U[Ft][W+1]=this.U[Ft][W],this.U[Ft][W]=Ot;W++}lt=0,u--;break}}return{U:this.U,V:this.V,S:this.s}},f.hypot=function(r,n){var t=void 0;return Math.abs(r)>Math.abs(n)?(t=n/r,t=Math.abs(r)*Math.sqrt(1+t*t)):n==0?t=0:(t=r/n,t=Math.abs(n)*Math.sqrt(1+t*t)),t},C.exports=f}),(function(C,x,N){var f=(function(){function n(t,e){for(var s=0;s<e.length;s++){var a=e[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,e,s){return e&&n(t.prototype,e),s&&n(t,s),t}})();function r(n,t){if(!(n instanceof t))throw TypeError("Cannot call a class as a function")}C.exports=(function(){function n(t,e){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;r(this,n),this.sequence1=t,this.sequence2=e,this.match_score=s,this.mismatch_penalty=a,this.gap_penalty=p,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=Array(this.jMax);for(var i=0;i<this.jMax;i++)this.grid[o][i]=0}this.tracebackGrid=Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=Array(this.jMax);for(var h=0;h<this.jMax;h++)this.tracebackGrid[d][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return f(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var s=1;s<this.iMax;s++)for(var a=1;a<this.jMax;a++){var p=void 0;p=this.sequence1[s-1]===this.sequence2[a-1]?this.grid[s-1][a-1]+this.match_score:this.grid[s-1][a-1]+this.mismatch_penalty;var o=this.grid[s-1][a]+this.gap_penalty,i=this.grid[s][a-1]+this.gap_penalty,d=[p,o,i],h=this.arrayAllMaxIndexes(d);this.grid[s][a]=d[h[0]],this.tracebackGrid[s][a]=[h.includes(0),h.includes(1),h.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],s=this.tracebackGrid[e.pos[0]][e.pos[1]];s[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),s[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),s[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var s=[],a=-1;(a=t.indexOf(e,a+1))!==-1;)s.push(a);return s}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),n})()}),(function(C,x,N){var f=function(){};f.FDLayout=N(18),f.FDLayoutConstants=N(4),f.FDLayoutEdge=N(19),f.FDLayoutNode=N(20),f.DimensionD=N(21),f.HashMap=N(22),f.HashSet=N(23),f.IGeometry=N(8),f.IMath=N(9),f.Integer=N(10),f.Point=N(12),f.PointD=N(5),f.RandomSeed=N(16),f.RectangleD=N(13),f.Transform=N(17),f.UniqueIDGeneretor=N(14),f.Quicksort=N(25),f.LinkedList=N(11),f.LGraphObject=N(2),f.LGraph=N(6),f.LEdge=N(1),f.LGraphManager=N(7),f.LNode=N(3),f.Layout=N(15),f.LayoutConstants=N(0),f.NeedlemanWunsch=N(27),f.Matrix=N(24),f.SVD=N(26),C.exports=f}),(function(C,x,N){function f(){this.listeners=[]}var r=f.prototype;r.addListener=function(n,t){this.listeners.push({event:n,callback:t})},r.removeListener=function(n,t){for(var e=this.listeners.length;e>=0;e--){var s=this.listeners[e];s.event===n&&s.callback===t&&this.listeners.splice(e,1)}},r.emit=function(n,t){for(var e=0;e<this.listeners.length;e++){var s=this.listeners[e];n===s.event&&s.callback(t)}},C.exports=f})])})})),we=de(((I,M)=>{(function(C,x){typeof I=="object"&&typeof M=="object"?M.exports=x(Le()):typeof define=="function"&&define.amd?define(["layout-base"],x):typeof I=="object"?I.coseBase=x(Le()):C.coseBase=x(C.layoutBase)})(I,function(C){return(()=>{var x={45:((r,n,t)=>{var e={};e.layoutBase=t(551),e.CoSEConstants=t(806),e.CoSEEdge=t(767),e.CoSEGraph=t(880),e.CoSEGraphManager=t(578),e.CoSELayout=t(765),e.CoSENode=t(991),e.ConstraintHandler=t(902),r.exports=e}),806:((r,n,t)=>{var e=t(551).FDLayoutConstants;function s(){}for(var a in e)s[a]=e[a];s.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,s.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,s.DEFAULT_COMPONENT_SEPERATION=60,s.TILE=!0,s.TILING_PADDING_VERTICAL=10,s.TILING_PADDING_HORIZONTAL=10,s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0,s.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,s.TREE_REDUCTION_ON_INCREMENTAL=!0,s.PURE_INCREMENTAL=s.DEFAULT_INCREMENTAL,r.exports=s}),767:((r,n,t)=>{var e=t(551).FDLayoutEdge;function s(p,o,i){e.call(this,p,o,i)}for(var a in s.prototype=Object.create(e.prototype),e)s[a]=e[a];r.exports=s}),880:((r,n,t)=>{var e=t(551).LGraph;function s(p,o,i){e.call(this,p,o,i)}for(var a in s.prototype=Object.create(e.prototype),e)s[a]=e[a];r.exports=s}),578:((r,n,t)=>{var e=t(551).LGraphManager;function s(p){e.call(this,p)}for(var a in s.prototype=Object.create(e.prototype),e)s[a]=e[a];r.exports=s}),765:((r,n,t)=>{var e=t(551).FDLayout,s=t(578),a=t(880),p=t(991),o=t(767),i=t(806),d=t(902),h=t(551).FDLayoutConstants,c=t(551).LayoutConstants,g=t(551).Point,v=t(551).PointD,T=t(551).DimensionD,L=t(551).Layout,R=t(551).Integer,S=t(551).IGeometry,U=t(551).LGraph,q=t(551).Transform,Z=t(551).LinkedList;function D(){e.call(this),this.toBeTiled={},this.constraints={}}for(var Q in D.prototype=Object.create(e.prototype),e)D[Q]=e[Q];D.prototype.newGraphManager=function(){var l=new s(this);return this.graphManager=l,l},D.prototype.newGraph=function(l){return new a(null,this.graphManager,l)},D.prototype.newNode=function(l){return new p(this.graphManager,l)},D.prototype.newEdge=function(l){return new o(null,null,l)},D.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(i.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){e.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(i.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var l=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return l.has(y)});this.graphManager.setAllNodesToApplyGravitation(E)}}else{var u=this.getFlatForest();if(u.length>0)this.positionNodesRadially(u);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var l=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(A){return l.has(A)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(d.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),i.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-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 l=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(m){return l.has(m)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),i.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),i.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var l=this.graphManager.getAllNodes(),E={},u=0;u<l.length;u++){var y=l[u].rect,m=l[u].id;E[m]={id:m,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return E},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var l=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!l;)l=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var l=this.getAllNodes(),E,u=0;u<l.length;u++)E=l[u],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var u=0;u<l.length;u++)E=l[u],E.move()},D.prototype.initConstraintVariables=function(){var l=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),u=0;u<E.length;u++){var y=E[u];this.idToNodeMap.set(y.id,y)}var m=function O(z){for(var et=z.getChild().getNodes(),H,B=0,lt=0;lt<et.length;lt++)H=et[lt],H.getChild()==null?l.fixedNodeSet.has(H.id)&&(B+=100):B+=O(H);return B};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(O){l.fixedNodeSet.add(O.nodeId)});for(var E=this.graphManager.getAllNodes(),y,u=0;u<E.length;u++)if(y=E[u],y.getChild()!=null){var A=m(y);A>0&&(y.fixedNodeWeight=A)}}if(this.constraints.relativePlacementConstraint){var w=new Map,b=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){l.fixedNodesOnHorizontal.add(O),l.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(z){w.set(z,"dummy"+u),l.dummyToNodeForVerticalAlignment.get("dummy"+u).push(z),l.fixedNodeSet.has(z)&&l.fixedNodesOnHorizontal.add("dummy"+u)});if(this.constraints.alignmentConstraint.horizontal)for(var F=this.constraints.alignmentConstraint.horizontal,u=0;u<F.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),F[u].forEach(function(z){b.set(z,"dummy"+u),l.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(z),l.fixedNodeSet.has(z)&&l.fixedNodesOnVertical.add("dummy"+u)})}if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var z,et,H;for(H=O.length-1;H>=2*O.length/3;H--)z=Math.floor(Math.random()*(H+1)),et=O[H],O[H]=O[z],O[z]=et;return O},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(O){if(O.left){var z=w.has(O.left)?w.get(O.left):O.left,et=w.has(O.right)?w.get(O.right):O.right;l.nodesInRelativeHorizontal.includes(z)||(l.nodesInRelativeHorizontal.push(z),l.nodeToRelativeConstraintMapHorizontal.set(z,[]),l.dummyToNodeForVerticalAlignment.has(z)?l.nodeToTempPositionMapHorizontal.set(z,l.idToNodeMap.get(l.dummyToNodeForVerticalAlignment.get(z)[0]).getCenterX()):l.nodeToTempPositionMapHorizontal.set(z,l.idToNodeMap.get(z).getCenterX())),l.nodesInRelativeHorizontal.includes(et)||(l.nodesInRelativeHorizontal.push(et),l.nodeToRelativeConstraintMapHorizontal.set(et,[]),l.dummyToNodeForVerticalAlignment.has(et)?l.nodeToTempPositionMapHorizontal.set(et,l.idToNodeMap.get(l.dummyToNodeForVerticalAlignment.get(et)[0]).getCenterX()):l.nodeToTempPositionMapHorizontal.set(et,l.idToNodeMap.get(et).getCenterX())),l.nodeToRelativeConstraintMapHorizontal.get(z).push({right:et,gap:O.gap}),l.nodeToRelativeConstraintMapHorizontal.get(et).push({left:z,gap:O.gap})}else{var H=b.has(O.top)?b.get(O.top):O.top,B=b.has(O.bottom)?b.get(O.bottom):O.bottom;l.nodesInRelativeVertical.includes(H)||(l.nodesInRelativeVertical.push(H),l.nodeToRelativeConstraintMapVertical.set(H,[]),l.dummyToNodeForHorizontalAlignment.has(H)?l.nodeToTempPositionMapVertical.set(H,l.idToNodeMap.get(l.dummyToNodeForHorizontalAlignment.get(H)[0]).getCenterY()):l.nodeToTempPositionMapVertical.set(H,l.idToNodeMap.get(H).getCenterY())),l.nodesInRelativeVertical.includes(B)||(l.nodesInRelativeVertical.push(B),l.nodeToRelativeConstraintMapVertical.set(B,[]),l.dummyToNodeForHorizontalAlignment.has(B)?l.nodeToTempPositionMapVertical.set(B,l.idToNodeMap.get(l.dummyToNodeForHorizontalAlignment.get(B)[0]).getCenterY()):l.nodeToTempPositionMapVertical.set(B,l.idToNodeMap.get(B).getCenterY())),l.nodeToRelativeConstraintMapVertical.get(H).push({bottom:B,gap:O.gap}),l.nodeToRelativeConstraintMapVertical.get(B).push({top:H,gap:O.gap})}});else{var Y=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var z=w.has(O.left)?w.get(O.left):O.left,et=w.has(O.right)?w.get(O.right):O.right;Y.has(z)?Y.get(z).push(et):Y.set(z,[et]),Y.has(et)?Y.get(et).push(z):Y.set(et,[z])}else{var H=b.has(O.top)?b.get(O.top):O.top,B=b.has(O.bottom)?b.get(O.bottom):O.bottom;V.has(H)?V.get(H).push(B):V.set(H,[B]),V.has(B)?V.get(B).push(H):V.set(B,[H])}});var J=function(O,z){var et=[],H=[],B=new Z,lt=new Set,at=0;return O.forEach(function(Lt,W){if(!lt.has(W)){et[at]=[],H[at]=!1;var pt=W;for(B.push(pt),lt.add(pt),et[at].push(pt);B.length!=0;)pt=B.shift(),z.has(pt)&&(H[at]=!0),O.get(pt).forEach(function(vt){lt.has(vt)||(B.push(vt),lt.add(vt),et[at].push(vt))});at++}}),{components:et,isFixed:H}},k=J(Y,l.fixedNodesOnHorizontal);this.componentsOnHorizontal=k.components,this.fixedComponentsOnHorizontal=k.isFixed;var X=J(V,l.fixedNodesOnVertical);this.componentsOnVertical=X.components,this.fixedComponentsOnVertical=X.isFixed}}},D.prototype.updateDisplacements=function(){var l=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(X){var O=l.idToNodeMap.get(X.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,u=0;u<E.length;u++){for(var y=0,m=0;m<E[u].length;m++){if(this.fixedNodeSet.has(E[u][m])){y=0;break}y+=this.idToNodeMap.get(E[u][m]).displacementX}for(var A=y/E[u].length,m=0;m<E[u].length;m++)this.idToNodeMap.get(E[u][m]).displacementX=A}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,u=0;u<w.length;u++){for(var b=0,m=0;m<w[u].length;m++){if(this.fixedNodeSet.has(w[u][m])){b=0;break}b+=this.idToNodeMap.get(w[u][m]).displacementY}for(var G=b/w[u].length,m=0;m<w[u].length;m++)this.idToNodeMap.get(w[u][m]).displacementY=G}}if(this.constraints.relativePlacementConstraint)if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(X){if(!l.fixedNodesOnHorizontal.has(X)){var O=0;O=l.dummyToNodeForVerticalAlignment.has(X)?l.idToNodeMap.get(l.dummyToNodeForVerticalAlignment.get(X)[0]).displacementX:l.idToNodeMap.get(X).displacementX,l.nodeToRelativeConstraintMapHorizontal.get(X).forEach(function(z){if(z.right){var et=l.nodeToTempPositionMapHorizontal.get(z.right)-l.nodeToTempPositionMapHorizontal.get(X)-O;et<z.gap&&(O-=z.gap-et)}else{var et=l.nodeToTempPositionMapHorizontal.get(X)-l.nodeToTempPositionMapHorizontal.get(z.left)+O;et<z.gap&&(O+=z.gap-et)}}),l.nodeToTempPositionMapHorizontal.set(X,l.nodeToTempPositionMapHorizontal.get(X)+O),l.dummyToNodeForVerticalAlignment.has(X)?l.dummyToNodeForVerticalAlignment.get(X).forEach(function(z){l.idToNodeMap.get(z).displacementX=O}):l.idToNodeMap.get(X).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(X){if(!l.fixedNodesOnHorizontal.has(X)){var O=0;O=l.dummyToNodeForHorizontalAlignment.has(X)?l.idToNodeMap.get(l.dummyToNodeForHorizontalAlignment.get(X)[0]).displacementY:l.idToNodeMap.get(X).displacementY,l.nodeToRelativeConstraintMapVertical.get(X).forEach(function(z){if(z.bottom){var et=l.nodeToTempPositionMapVertical.get(z.bottom)-l.nodeToTempPositionMapVertical.get(X)-O;et<z.gap&&(O-=z.gap-et)}else{var et=l.nodeToTempPositionMapVertical.get(X)-l.nodeToTempPositionMapVertical.get(z.top)+O;et<z.gap&&(O+=z.gap-et)}}),l.nodeToTempPositionMapVertical.set(X,l.nodeToTempPositionMapVertical.get(X)+O),l.dummyToNodeForHorizontalAlignment.has(X)?l.dummyToNodeForHorizontalAlignment.get(X).forEach(function(z){l.idToNodeMap.get(z).displacementY=O}):l.idToNodeMap.get(X).displacementY=O}});else{for(var u=0;u<this.componentsOnHorizontal.length;u++){var F=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(var m=0;m<F.length;m++)this.dummyToNodeForVerticalAlignment.has(F[m])?this.dummyToNodeForVerticalAlignment.get(F[m]).forEach(function(z){l.idToNodeMap.get(z).displacementX=0}):this.idToNodeMap.get(F[m]).displacementX=0;else{for(var Y=0,V=0,m=0;m<F.length;m++)if(this.dummyToNodeForVerticalAlignment.has(F[m])){var J=this.dummyToNodeForVerticalAlignment.get(F[m]);Y+=J.length*this.idToNodeMap.get(J[0]).displacementX,V+=J.length}else Y+=this.idToNodeMap.get(F[m]).displacementX,V++;for(var k=Y/V,m=0;m<F.length;m++)this.dummyToNodeForVerticalAlignment.has(F[m])?this.dummyToNodeForVerticalAlignment.get(F[m]).forEach(function(z){l.idToNodeMap.get(z).displacementX=k}):this.idToNodeMap.get(F[m]).displacementX=k}}for(var u=0;u<this.componentsOnVertical.length;u++){var F=this.componentsOnVertical[u];if(this.fixedComponentsOnVertical[u])for(var m=0;m<F.length;m++)this.dummyToNodeForHorizontalAlignment.has(F[m])?this.dummyToNodeForHorizontalAlignment.get(F[m]).forEach(function(et){l.idToNodeMap.get(et).displacementY=0}):this.idToNodeMap.get(F[m]).displacementY=0;else{for(var Y=0,V=0,m=0;m<F.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(F[m])){var J=this.dummyToNodeForHorizontalAlignment.get(F[m]);Y+=J.length*this.idToNodeMap.get(J[0]).displacementY,V+=J.length}else Y+=this.idToNodeMap.get(F[m]).displacementY,V++;for(var k=Y/V,m=0;m<F.length;m++)this.dummyToNodeForHorizontalAlignment.has(F[m])?this.dummyToNodeForHorizontalAlignment.get(F[m]).forEach(function(H){l.idToNodeMap.get(H).displacementY=k}):this.idToNodeMap.get(F[m]).displacementY=k}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var l=[],E,u=this.graphManager.getGraphs(),y=u.length,m;for(m=0;m<y;m++)E=u[m],E.updateConnected(),E.isConnected||(l=l.concat(E.getNodes()));return l},D.prototype.createBendpoints=function(){var l=[];l=l.concat(this.graphManager.getAllEdges());var E=new Set,u;for(u=0;u<l.length;u++){var y=l[u];if(!E.has(y)){var m=y.getSource(),A=y.getTarget();if(m==A)y.getBendpoints().push(new v),y.getBendpoints().push(new v),this.createDummyNodesForBendpoints(y),E.add(y);else{var w=[];if(w=w.concat(m.getEdgeListToNode(A)),w=w.concat(A.getEdgeListToNode(m)),!E.has(w[0])){if(w.length>1){var b;for(b=0;b<w.length;b++){var G=w[b];G.getBendpoints().push(new v),this.createDummyNodesForBendpoints(G)}}w.forEach(function(F){E.add(F)})}}}if(E.size==l.length)break}},D.prototype.positionNodesRadially=function(l){for(var E=new g(0,0),u=Math.ceil(Math.sqrt(l.length)),y=0,m=0,A=0,w=new v(0,0),b=0;b<l.length;b++){b%u==0&&(A=0,m=y,b!=0&&(m+=i.DEFAULT_COMPONENT_SEPERATION),y=0);var G=l[b],F=L.findCenterOfTree(G);E.x=A,E.y=m,w=D.radialLayout(G,F,E),w.y>y&&(y=Math.floor(w.y)),A=Math.floor(w.x+i.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(c.WORLD_CENTER_X-w.x/2,c.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(l,E,u){var y=Math.max(this.maxDiagonalInTree(l),i.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(E,null,0,359,0,y);var m=U.calculateBounds(l),A=new q;A.setDeviceOrgX(m.getMinX()),A.setDeviceOrgY(m.getMinY()),A.setWorldOrgX(u.x),A.setWorldOrgY(u.y);for(var w=0;w<l.length;w++)l[w].transform(A);var b=new v(m.getMaxX(),m.getMaxY());return A.inverseTransformPoint(b)},D.branchRadialLayout=function(l,E,u,y,m,A){var w=(y-u+1)/2;w<0&&(w+=180);var b=(w+u)%360*S.TWO_PI/360,G=m*Math.cos(b),F=m*Math.sin(b);l.setCenter(G,F);var Y=[];Y=Y.concat(l.getEdges());var V=Y.length;E!=null&&V--;for(var J=0,k=Y.length,X,O=l.getEdgesBetween(E);O.length>1;){var z=O[0];O.splice(0,1);var et=Y.indexOf(z);et>=0&&Y.splice(et,1),k--,V--}X=E==null?0:(Y.indexOf(O[0])+1)%k;for(var H=Math.abs(y-u)/V,B=X;J!=V;B=++B%k){var lt=Y[B].getOtherEnd(l);if(lt!=E){var at=(u+J*H)%360,Lt=(at+H)%360;D.branchRadialLayout(lt,l,at,Lt,m+A,A),J++}}},D.maxDiagonalInTree=function(l){for(var E=R.MIN_VALUE,u=0;u<l.length;u++){var y=l[u].getDiagonal();y>E&&(E=y)}return E},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var l=this,E={};this.memberGroups={},this.idToDummyNode={};for(var u=[],y=this.graphManager.getAllNodes(),m=0;m<y.length;m++){var A=y[m],w=A.getParent();this.getNodeDegreeWithChildren(A)===0&&(w.id==null||!this.getToBeTiled(w))&&u.push(A)}for(var m=0;m<u.length;m++){var A=u[m],b=A.getParent().id;E[b]===void 0&&(E[b]=[]),E[b]=E[b].concat(A)}Object.keys(E).forEach(function(G){if(E[G].length>1){var F="DummyCompound_"+G;l.memberGroups[F]=E[G];var Y=E[G][0].getParent(),V=new p(l.graphManager);V.id=F,V.paddingLeft=Y.paddingLeft||0,V.paddingRight=Y.paddingRight||0,V.paddingBottom=Y.paddingBottom||0,V.paddingTop=Y.paddingTop||0,l.idToDummyNode[F]=V;var J=l.getGraphManager().add(l.newGraph(),V),k=Y.getChild();k.add(V);for(var X=0;X<E[G].length;X++){var O=E[G][X];k.remove(O),J.add(O)}}})},D.prototype.clearCompounds=function(){var l={},E={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)E[this.compoundOrder[u].id]=this.compoundOrder[u],l[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(l,E)},D.prototype.clearZeroDegreeMembers=function(){var l=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var y=l.idToDummyNode[u];if(E[u]=l.tileNodes(l.memberGroups[u],y.paddingLeft+y.paddingRight),y.rect.width=E[u].width,y.rect.height=E[u].height,y.setCenter(E[u].centerX,E[u].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var m=y.rect.width,A=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(m+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>m?(y.rect.x-=(y.labelWidth-m)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-m)/2):y.labelPosHorizontal=="right"&&y.setWidth(m+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(A+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>A?(y.rect.y-=(y.labelHeight-A)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-A)/2):y.labelPosVertical=="bottom"&&y.setHeight(A+y.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var l=this.compoundOrder.length-1;l>=0;l--){var E=this.compoundOrder[l],u=E.id,y=E.paddingLeft,m=E.paddingTop,A=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],E.rect.x,E.rect.y,y,m,A,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var l=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(u){var y=l.idToDummyNode[u],m=y.paddingLeft,A=y.paddingTop,w=y.labelMarginLeft,b=y.labelMarginTop;l.adjustLocations(E[u],y.rect.x,y.rect.y,m,A,w,b)})},D.prototype.getToBeTiled=function(l){var E=l.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var u=l.getChild();if(u==null)return this.toBeTiled[E]=!1,!1;for(var y=u.getNodes(),m=0;m<y.length;m++){var A=y[m];if(this.getNodeDegree(A)>0)return this.toBeTiled[E]=!1,!1;if(A.getChild()==null){this.toBeTiled[A.id]=!1;continue}if(!this.getToBeTiled(A))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},D.prototype.getNodeDegree=function(l){l.id;for(var E=l.getEdges(),u=0,y=0;y<E.length;y++){var m=E[y];m.getSource().id!==m.getTarget().id&&(u+=1)}return u},D.prototype.getNodeDegreeWithChildren=function(l){var E=this.getNodeDegree(l);if(l.getChild()==null)return E;for(var u=l.getChild().getNodes(),y=0;y<u.length;y++){var m=u[y];E+=this.getNodeDegreeWithChildren(m)}return E},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(l){for(var E=0;E<l.length;E++){var u=l[E];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},D.prototype.adjustLocations=function(l,E,u,y,m,A,w){E+=y+A,u+=m+w;for(var b=E,G=0;G<l.rows.length;G++){var F=l.rows[G];E=b;for(var Y=0,V=0;V<F.length;V++){var J=F[V];J.rect.x=E,J.rect.y=u,E+=J.rect.width+l.horizontalPadding,J.rect.height>Y&&(Y=J.rect.height)}u+=Y+l.verticalPadding}},D.prototype.tileCompoundMembers=function(l,E){var u=this;this.tiledMemberPack=[],Object.keys(l).forEach(function(y){var m=E[y];if(u.tiledMemberPack[y]=u.tileNodes(l[y],m.paddingLeft+m.paddingRight),m.rect.width=u.tiledMemberPack[y].width,m.rect.height=u.tiledMemberPack[y].height,m.setCenter(u.tiledMemberPack[y].centerX,u.tiledMemberPack[y].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var A=m.rect.width,w=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(A+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>A?(m.rect.x-=(m.labelWidth-A)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-A)/2):m.labelPosHorizontal=="right"&&m.setWidth(A+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(w+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>w?(m.rect.y-=(m.labelHeight-w)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-w)/2):m.labelPosVertical=="bottom"&&m.setHeight(w+m.labelHeight))}})},D.prototype.tileNodes=function(l,E){var u=this.tileNodesByFavoringDim(l,E,!0),y=this.tileNodesByFavoringDim(l,E,!1),m=this.getOrgRatio(u);return this.getOrgRatio(y)<m?y:u},D.prototype.getOrgRatio=function(l){var E=l.width,u=l.height,y=E/u;return y<1&&(y=1/y),y},D.prototype.calcIdealRowWidth=function(l,E){var u=i.TILING_PADDING_VERTICAL,y=i.TILING_PADDING_HORIZONTAL,m=l.length,A=0,w=0,b=0;l.forEach(function(X){A+=X.getWidth(),w+=X.getHeight(),X.getWidth()>b&&(b=X.getWidth())});var G=A/m,F=w/m,Y=(u-y)**2+4*(G+y)*(F+u)*m,V=(y-u+Math.sqrt(Y))/(2*(G+y)),J;E?(J=Math.ceil(V),J==V&&J++):J=Math.floor(V);var k=J*(G+y)-y;return b>k&&(k=b),k+=y*2,k},D.prototype.tileNodesByFavoringDim=function(l,E,u){var y=i.TILING_PADDING_VERTICAL,m=i.TILING_PADDING_HORIZONTAL,A=i.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:y,horizontalPadding:m,centerX:0,centerY:0};A&&(w.idealRowWidth=this.calcIdealRowWidth(l,u));var b=function(X){return X.rect.width*X.rect.height},G=function(X,O){return b(O)-b(X)};l.sort(function(X,O){var z=G;return w.idealRowWidth?(z=A,z(X.id,O.id)):z(X,O)});for(var F=0,Y=0,V=0;V<l.length;V++){var J=l[V];F+=J.getCenterX(),Y+=J.getCenterY()}w.centerX=F/l.length,w.centerY=Y/l.length;for(var V=0;V<l.length;V++){var J=l[V];if(w.rows.length==0)this.insertNodeToRow(w,J,0,E);else if(this.canAddHorizontal(w,J.rect.width,J.rect.height)){var k=w.rows.length-1;w.idealRowWidth||(k=this.getShortestRowIndex(w)),this.insertNodeToRow(w,J,k,E)}else this.insertNodeToRow(w,J,w.rows.length,E);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(l,E,u,y){var m=y;u==l.rows.length&&(l.rows.push([]),l.rowWidth.push(m),l.rowHeight.push(0));var A=l.rowWidth[u]+E.rect.width;l.rows[u].length>0&&(A+=l.horizontalPadding),l.rowWidth[u]=A,l.width<A&&(l.width=A);var w=E.rect.height;u>0&&(w+=l.verticalPadding);var b=0;w>l.rowHeight[u]&&(b=l.rowHeight[u],l.rowHeight[u]=w,b=l.rowHeight[u]-b),l.height+=b,l.rows[u].push(E)},D.prototype.getShortestRowIndex=function(l){for(var E=-1,u=Number.MAX_VALUE,y=0;y<l.rows.length;y++)l.rowWidth[y]<u&&(E=y,u=l.rowWidth[y]);return E},D.prototype.getLongestRowIndex=function(l){for(var E=-1,u=Number.MIN_VALUE,y=0;y<l.rows.length;y++)l.rowWidth[y]>u&&(E=y,u=l.rowWidth[y]);return E},D.prototype.canAddHorizontal=function(l,E,u){if(l.idealRowWidth){var y=l.rows.length-1;return l.rowWidth[y]+E+l.horizontalPadding<=l.idealRowWidth}var m=this.getShortestRowIndex(l);if(m<0)return!0;var A=l.rowWidth[m];if(A+l.horizontalPadding+E<=l.width)return!0;var w=0;l.rowHeight[m]<u&&m>0&&(w=u+l.verticalPadding-l.rowHeight[m]);var b=l.width-A>=E+l.horizontalPadding?(l.height+w)/(A+E+l.horizontalPadding):(l.height+w)/l.width;w=u+l.verticalPadding;var G=l.width<E?(l.height+w)/E:(l.height+w)/l.width;return G<1&&(G=1/G),b<1&&(b=1/b),b<G},D.prototype.shiftToLastRow=function(l){var E=this.getLongestRowIndex(l),u=l.rowWidth.length-1,y=l.rows[E],m=y[y.length-1],A=m.width+l.horizontalPadding;if(l.width-l.rowWidth[u]>A&&E!=u){y.splice(-1,1),l.rows[u].push(m),l.rowWidth[E]=l.rowWidth[E]-A,l.rowWidth[u]=l.rowWidth[u]+A,l.width=l.rowWidth[instance.getLongestRowIndex(l)];for(var w=Number.MIN_VALUE,b=0;b<y.length;b++)y[b].height>w&&(w=y[b].height);E>0&&(w+=l.verticalPadding);var G=l.rowHeight[E]+l.rowHeight[u];l.rowHeight[E]=w,l.rowHeight[u]<m.height+l.verticalPadding&&(l.rowHeight[u]=m.height+l.verticalPadding);var F=l.rowHeight[E]+l.rowHeight[u];l.height+=F-G,this.shiftToLastRow(l)}},D.prototype.tilingPreLayout=function(){i.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){i.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var l=[],E=!0,u;E;){var y=this.graphManager.getAllNodes(),m=[];E=!1;for(var A=0;A<y.length;A++)if(u=y[A],u.getEdges().length==1&&!u.getEdges()[0].isInterGraph&&u.getChild()==null){if(i.PURE_INCREMENTAL){var w=u.getEdges()[0].getOtherEnd(u),b=new T(u.getCenterX()-w.getCenterX(),u.getCenterY()-w.getCenterY());m.push([u,u.getEdges()[0],u.getOwner(),b])}else m.push([u,u.getEdges()[0],u.getOwner()]);E=!0}if(E==1){for(var G=[],F=0;F<m.length;F++)m[F][0].getEdges().length==1&&(G.push(m[F]),m[F][0].getOwner().remove(m[F][0]));l.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=l},D.prototype.growTree=function(l){for(var E=l.length,u=l[E-1],y,m=0;m<u.length;m++)y=u[m],this.findPlaceforPrunedNode(y),y[2].add(y[0]),y[2].add(y[1],y[1].source,y[1].target);l.splice(l.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(l){var E,u,y=l[0];if(u=y==l[1].source?l[1].target:l[1].source,i.PURE_INCREMENTAL)y.setCenter(u.getCenterX()+l[3].getWidth(),u.getCenterY()+l[3].getHeight());else{var m=u.startX,A=u.finishX,w=u.startY,b=u.finishY,G=[0,0,0,0];if(w>0)for(var F=m;F<=A;F++)G[0]+=this.grid[F][w-1].length+this.grid[F][w].length-1;if(A<this.grid.length-1)for(var F=w;F<=b;F++)G[1]+=this.grid[A+1][F].length+this.grid[A][F].length-1;if(b<this.grid[0].length-1)for(var F=m;F<=A;F++)G[2]+=this.grid[F][b+1].length+this.grid[F][b].length-1;if(m>0)for(var F=w;F<=b;F++)G[3]+=this.grid[m-1][F].length+this.grid[m][F].length-1;for(var Y=R.MAX_VALUE,V,J,k=0;k<G.length;k++)G[k]<Y?(Y=G[k],V=1,J=k):G[k]==Y&&V++;if(V==3&&Y==0)G[0]==0&&G[1]==0&&G[2]==0?E=1:G[0]==0&&G[1]==0&&G[3]==0?E=0:G[0]==0&&G[2]==0&&G[3]==0?E=3:G[1]==0&&G[2]==0&&G[3]==0&&(E=2);else if(V==2&&Y==0){var X=Math.floor(Math.random()*2);E=G[0]==0&&G[1]==0?X==0?0:1:G[0]==0&&G[2]==0?X==0?0:2:G[0]==0&&G[3]==0?X==0?0:3:G[1]==0&&G[2]==0?X==0?1:2:G[1]==0&&G[3]==0?X==0?1:3:X==0?2:3}else if(V==4&&Y==0){var X=Math.floor(Math.random()*4);E=X}else E=J;E==0?y.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-h.DEFAULT_EDGE_LENGTH-y.getHeight()/2):E==1?y.setCenter(u.getCenterX()+u.getWidth()/2+h.DEFAULT_EDGE_LENGTH+y.getWidth()/2,u.getCenterY()):E==2?y.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+h.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(u.getCenterX()-u.getWidth()/2-h.DEFAULT_EDGE_LENGTH-y.getWidth()/2,u.getCenterY())}},r.exports=D}),991:((r,n,t)=>{var e=t(551).FDLayoutNode,s=t(551).IMath;function a(o,i,d,h){e.call(this,o,i,d,h)}for(var p in a.prototype=Object.create(e.prototype),e)a[p]=e[p];a.prototype.calculateDisplacement=function(){var o=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*s.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*s.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(o,i){for(var d=this.getChild().getNodes(),h,c=0;c<d.length;c++)h=d[c],h.getChild()==null?(h.displacementX+=o,h.displacementY+=i):h.propogateDisplacementToChildren(o,i)},a.prototype.move=function(){var o=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),o.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(o){this.pred1=o},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(o){this.next=o},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(o){this.processed=o},a.prototype.isProcessed=function(){return processed},r.exports=a}),902:((r,n,t)=>{function e(d){if(Array.isArray(d)){for(var h=0,c=Array(d.length);h<d.length;h++)c[h]=d[h];return c}else return Array.from(d)}var s=t(806),a=t(551).LinkedList,p=t(551).Matrix,o=t(551).SVD;function i(){}i.handleConstraints=function(d){var h={};h.fixedNodeConstraint=d.constraints.fixedNodeConstraint,h.alignmentConstraint=d.constraints.alignmentConstraint,h.relativePlacementConstraint=d.constraints.relativePlacementConstraint;for(var c=new Map,g=new Map,v=[],T=[],L=d.getAllNodes(),R=0,S=0;S<L.length;S++){var U=L[S];U.getChild()??(g.set(U.id,R++),v.push(U.getCenterX()),T.push(U.getCenterY()),c.set(U.id,U))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(_){!_.gap&&_.gap!=0&&(_.left?_.gap=s.DEFAULT_EDGE_LENGTH+c.get(_.left).getWidth()/2+c.get(_.right).getWidth()/2:_.gap=s.DEFAULT_EDGE_LENGTH+c.get(_.top).getHeight()/2+c.get(_.bottom).getHeight()/2)});var q=function(_,P){return{x:_.x-P.x,y:_.y-P.y}},Z=function(_){var P=0,$=0;return _.forEach(function(j){P+=v[g.get(j)],$+=T[g.get(j)]}),{x:P/_.size,y:$/_.size}},D=function(_,P,$,j,tt){function Et(dt,K){var ut=new Set(dt),At=!0,rt=!1,bt=void 0;try{for(var Ot=K[Symbol.iterator](),Dt;!(At=(Dt=Ot.next()).done);At=!0){var Ft=Dt.value;ut.add(Ft)}}catch(Tt){rt=!0,bt=Tt}finally{try{!At&&Ot.return&&Ot.return()}finally{if(rt)throw bt}}return ut}var yt=new Map;_.forEach(function(dt,K){yt.set(K,0)}),_.forEach(function(dt,K){dt.forEach(function(ut){yt.set(ut.id,yt.get(ut.id)+1)})});var it=new Map,ft=new Map,_t=new a;yt.forEach(function(dt,K){dt==0?(_t.push(K),$||(P=="horizontal"?it.set(K,g.has(K)?v[g.get(K)]:j.get(K)):it.set(K,g.has(K)?T[g.get(K)]:j.get(K)))):it.set(K,-1/0),$&&ft.set(K,new Set([K]))}),$&&tt.forEach(function(dt){var K=[];if(dt.forEach(function(rt){$.has(rt)&&K.push(rt)}),K.length>0){var ut=0;K.forEach(function(rt){P=="horizontal"?(it.set(rt,g.has(rt)?v[g.get(rt)]:j.get(rt)),ut+=it.get(rt)):(it.set(rt,g.has(rt)?T[g.get(rt)]:j.get(rt)),ut+=it.get(rt))}),ut/=K.length,dt.forEach(function(rt){$.has(rt)||it.set(rt,ut)})}else{var At=0;dt.forEach(function(rt){P=="horizontal"?At+=g.has(rt)?v[g.get(rt)]:j.get(rt):At+=g.has(rt)?T[g.get(rt)]:j.get(rt)}),At/=dt.length,dt.forEach(function(rt){it.set(rt,At)})}});for(var wt=function(){var dt=_t.shift();_.get(dt).forEach(function(K){if(it.get(K.id)<it.get(dt)+K.gap)if($&&$.has(K.id)){var ut=void 0;if(ut=P=="horizontal"?g.has(K.id)?v[g.get(K.id)]:j.get(K.id):g.has(K.id)?T[g.get(K.id)]:j.get(K.id),it.set(K.id,ut),ut<it.get(dt)+K.gap){var At=it.get(dt)+K.gap-ut;ft.get(dt).forEach(function(rt){it.set(rt,it.get(rt)-At)})}}else it.set(K.id,it.get(dt)+K.gap);yt.set(K.id,yt.get(K.id)-1),yt.get(K.id)==0&&_t.push(K.id),$&&ft.set(K.id,Et(ft.get(dt),ft.get(K.id)))})};_t.length!=0;)wt();if($){var mt=new Set;_.forEach(function(dt,K){dt.length==0&&mt.add(K)});var ht=[];ft.forEach(function(dt,K){if(mt.has(K)){var ut=!1,At=!0,rt=!1,bt=void 0;try{for(var Ot=dt[Symbol.iterator](),Dt;!(At=(Dt=Ot.next()).done);At=!0){var Ft=Dt.value;$.has(Ft)&&(ut=!0)}}catch(xt){rt=!0,bt=xt}finally{try{!At&&Ot.return&&Ot.return()}finally{if(rt)throw bt}}if(!ut){var Tt=!1,Nt=void 0;ht.forEach(function(xt,Pt){xt.has([].concat(e(dt))[0])&&(Tt=!0,Nt=Pt)}),Tt?dt.forEach(function(xt){ht[Nt].add(xt)}):ht.push(new Set(dt))}}}),ht.forEach(function(dt,K){var ut=1/0,At=1/0,rt=-1/0,bt=-1/0,Ot=!0,Dt=!1,Ft=void 0;try{for(var Tt=dt[Symbol.iterator](),Nt;!(Ot=(Nt=Tt.next()).done);Ot=!0){var xt=Nt.value,Pt=void 0;Pt=P=="horizontal"?g.has(xt)?v[g.get(xt)]:j.get(xt):g.has(xt)?T[g.get(xt)]:j.get(xt);var Xt=it.get(xt);Pt<ut&&(ut=Pt),Pt>rt&&(rt=Pt),Xt<At&&(At=Xt),Xt>bt&&(bt=Xt)}}catch(qt){Dt=!0,Ft=qt}finally{try{!Ot&&Tt.return&&Tt.return()}finally{if(Dt)throw Ft}}var ne=(ut+rt)/2-(At+bt)/2,ee=!0,$t=!1,Zt=void 0;try{for(var jt=dt[Symbol.iterator](),Qt;!(ee=(Qt=jt.next()).done);ee=!0){var re=Qt.value;it.set(re,it.get(re)+ne)}}catch(qt){$t=!0,Zt=qt}finally{try{!ee&&jt.return&&jt.return()}finally{if($t)throw Zt}}})}return it},Q=function(_){var P=0,$=0,j=0,tt=0;if(_.forEach(function(ft){ft.left?v[g.get(ft.left)]-v[g.get(ft.right)]>=0?P++:$++:T[g.get(ft.top)]-T[g.get(ft.bottom)]>=0?j++:tt++}),P>$&&j>tt)for(var Et=0;Et<g.size;Et++)v[Et]=-1*v[Et],T[Et]=-1*T[Et];else if(P>$)for(var yt=0;yt<g.size;yt++)v[yt]=-1*v[yt];else if(j>tt)for(var it=0;it<g.size;it++)T[it]=-1*T[it]},l=function(_){var P=[],$=new a,j=new Set,tt=0;return _.forEach(function(Et,yt){if(!j.has(yt)){P[tt]=[];var it=yt;for($.push(it),j.add(it),P[tt].push(it);$.length!=0;)it=$.shift(),_.get(it).forEach(function(ft){j.has(ft.id)||($.push(ft.id),j.add(ft.id),P[tt].push(ft.id))});tt++}}),P},E=function(_){var P=new Map;return _.forEach(function($,j){P.set(j,[])}),_.forEach(function($,j){$.forEach(function(tt){P.get(j).push(tt),P.get(tt.id).push({id:j,gap:tt.gap,direction:tt.direction})})}),P},u=function(_){var P=new Map;return _.forEach(function($,j){P.set(j,[])}),_.forEach(function($,j){$.forEach(function(tt){P.get(tt.id).push({id:j,gap:tt.gap,direction:tt.direction})})}),P},y=[],m=[],A=!1,w=!1,b=new Set,G=new Map,F=new Map,Y=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(_){b.add(_.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(_){_.left?(G.has(_.left)?G.get(_.left).push({id:_.right,gap:_.gap,direction:"horizontal"}):G.set(_.left,[{id:_.right,gap:_.gap,direction:"horizontal"}]),G.has(_.right)||G.set(_.right,[])):(G.has(_.top)?G.get(_.top).push({id:_.bottom,gap:_.gap,direction:"vertical"}):G.set(_.top,[{id:_.bottom,gap:_.gap,direction:"vertical"}]),G.has(_.bottom)||G.set(_.bottom,[]))}),F=E(G),Y=l(F)),s.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(_,P){y[P]=[_.position.x,_.position.y],m[P]=[v[g.get(_.nodeId)],T[g.get(_.nodeId)]]}),A=!0;else if(h.alignmentConstraint)(function(){var _=0;if(h.alignmentConstraint.vertical){for(var P=h.alignmentConstraint.vertical,$=function(it){var ft=new Set;P[it].forEach(function(mt){ft.add(mt)});var _t=new Set([].concat(e(ft)).filter(function(mt){return b.has(mt)})),wt=void 0;wt=_t.size>0?v[g.get(_t.values().next().value)]:Z(ft).x,P[it].forEach(function(mt){y[_]=[wt,T[g.get(mt)]],m[_]=[v[g.get(mt)],T[g.get(mt)]],_++})},j=0;j<P.length;j++)$(j);A=!0}if(h.alignmentConstraint.horizontal){for(var tt=h.alignmentConstraint.horizontal,Et=function(it){var ft=new Set;tt[it].forEach(function(mt){ft.add(mt)});var _t=new Set([].concat(e(ft)).filter(function(mt){return b.has(mt)})),wt=void 0;wt=_t.size>0?v[g.get(_t.values().next().value)]:Z(ft).y,tt[it].forEach(function(mt){y[_]=[v[g.get(mt)],wt],m[_]=[v[g.get(mt)],T[g.get(mt)]],_++})},yt=0;yt<tt.length;yt++)Et(yt);A=!0}h.relativePlacementConstraint&&(w=!0)})();else if(h.relativePlacementConstraint){for(var V=0,J=0,k=0;k<Y.length;k++)Y[k].length>V&&(V=Y[k].length,J=k);if(V<F.size/2)Q(h.relativePlacementConstraint),A=!1,w=!1;else{var X=new Map,O=new Map,z=[];Y[J].forEach(function(_){G.get(_).forEach(function(P){P.direction=="horizontal"?(X.has(_)?X.get(_).push(P):X.set(_,[P]),X.has(P.id)||X.set(P.id,[]),z.push({left:_,right:P.id})):(O.has(_)?O.get(_).push(P):O.set(_,[P]),O.has(P.id)||O.set(P.id,[]),z.push({top:_,bottom:P.id}))})}),Q(z),w=!1;var et=D(X,"horizontal"),H=D(O,"vertical");Y[J].forEach(function(_,P){m[P]=[v[g.get(_)],T[g.get(_)]],y[P]=[],et.has(_)?y[P][0]=et.get(_):y[P][0]=v[g.get(_)],H.has(_)?y[P][1]=H.get(_):y[P][1]=T[g.get(_)]}),A=!0}}if(A){for(var B=void 0,lt=p.transpose(y),at=p.transpose(m),Lt=0;Lt<lt.length;Lt++)lt[Lt]=p.multGamma(lt[Lt]),at[Lt]=p.multGamma(at[Lt]);var W=p.multMat(lt,p.transpose(at)),pt=o.svd(W);B=p.multMat(pt.V,p.transpose(pt.U));for(var vt=0;vt<g.size;vt++){var Bt=[v[vt],T[vt]],Ut=[B[0][0],B[1][0]],It=[B[0][1],B[1][1]];v[vt]=p.dotProduct(Bt,Ut),T[vt]=p.dotProduct(Bt,It)}w&&Q(h.relativePlacementConstraint)}}if(s.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var Mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(_,P){var $={x:v[g.get(_.nodeId)],y:T[g.get(_.nodeId)]},j=_.position,tt=q(j,$);Mt.x+=tt.x,Mt.y+=tt.y}),Mt.x/=h.fixedNodeConstraint.length,Mt.y/=h.fixedNodeConstraint.length,v.forEach(function(_,P){v[P]+=Mt.x}),T.forEach(function(_,P){T[P]+=Mt.y}),h.fixedNodeConstraint.forEach(function(_){v[g.get(_.nodeId)]=_.position.x,T[g.get(_.nodeId)]=_.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Yt=h.alignmentConstraint.vertical,Ht=function(_){var P=new Set;Yt[_].forEach(function(tt){P.add(tt)});var $=new Set([].concat(e(P)).filter(function(tt){return b.has(tt)})),j=void 0;j=$.size>0?v[g.get($.values().next().value)]:Z(P).x,P.forEach(function(tt){b.has(tt)||(v[g.get(tt)]=j)})},Rt=0;Rt<Yt.length;Rt++)Ht(Rt);if(h.alignmentConstraint.horizontal)for(var Vt=h.alignmentConstraint.horizontal,Gt=function(_){var P=new Set;Vt[_].forEach(function(tt){P.add(tt)});var $=new Set([].concat(e(P)).filter(function(tt){return b.has(tt)})),j=void 0;j=$.size>0?T[g.get($.values().next().value)]:Z(P).y,P.forEach(function(tt){b.has(tt)||(T[g.get(tt)]=j)})},st=0;st<Vt.length;st++)Gt(st)}h.relativePlacementConstraint&&(function(){var _=new Map,P=new Map,$=new Map,j=new Map,tt=new Map,Et=new Map,yt=new Set,it=new Set;if(b.forEach(function(nt){yt.add(nt),it.add(nt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var ft=h.alignmentConstraint.vertical,_t=function(nt){$.set("dummy"+nt,[]),ft[nt].forEach(function(Ct){_.set(Ct,"dummy"+nt),$.get("dummy"+nt).push(Ct),b.has(Ct)&&yt.add("dummy"+nt)}),tt.set("dummy"+nt,v[g.get(ft[nt][0])])},wt=0;wt<ft.length;wt++)_t(wt);if(h.alignmentConstraint.horizontal)for(var mt=h.alignmentConstraint.horizontal,ht=function(nt){j.set("dummy"+nt,[]),mt[nt].forEach(function(Ct){P.set(Ct,"dummy"+nt),j.get("dummy"+nt).push(Ct),b.has(Ct)&&it.add("dummy"+nt)}),Et.set("dummy"+nt,T[g.get(mt[nt][0])])},dt=0;dt<mt.length;dt++)ht(dt)}var K=new Map,ut=new Map,At=function(nt){G.get(nt).forEach(function(Ct){var kt=void 0,zt=void 0;Ct.direction=="horizontal"?(kt=_.get(nt)?_.get(nt):nt,zt=_.get(Ct.id)?{id:_.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:Ct,K.has(kt)?K.get(kt).push(zt):K.set(kt,[zt]),K.has(zt.id)||K.set(zt.id,[])):(kt=P.get(nt)?P.get(nt):nt,zt=P.get(Ct.id)?{id:P.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:Ct,ut.has(kt)?ut.get(kt).push(zt):ut.set(kt,[zt]),ut.has(zt.id)||ut.set(zt.id,[]))})},rt=!0,bt=!1,Ot=void 0;try{for(var Dt=G.keys()[Symbol.iterator](),Ft;!(rt=(Ft=Dt.next()).done);rt=!0){var Tt=Ft.value;At(Tt)}}catch(nt){bt=!0,Ot=nt}finally{try{!rt&&Dt.return&&Dt.return()}finally{if(bt)throw Ot}}var Nt=E(K),xt=E(ut),Pt=l(Nt),Xt=l(xt),ne=u(K),ee=u(ut),$t=[],Zt=[];Pt.forEach(function(nt,Ct){$t[Ct]=[],nt.forEach(function(kt){ne.get(kt).length==0&&$t[Ct].push(kt)})}),Xt.forEach(function(nt,Ct){Zt[Ct]=[],nt.forEach(function(kt){ee.get(kt).length==0&&Zt[Ct].push(kt)})});var jt=D(K,"horizontal",yt,tt,$t),Qt=D(ut,"vertical",it,Et,Zt),re=function(nt){$.get(nt)?$.get(nt).forEach(function(Ct){v[g.get(Ct)]=jt.get(nt)}):v[g.get(nt)]=jt.get(nt)},qt=!0,me=!1,ve=void 0;try{for(var ae=jt.keys()[Symbol.iterator](),ye;!(qt=(ye=ae.next()).done);qt=!0){var se=ye.value;re(se)}}catch(nt){me=!0,ve=nt}finally{try{!qt&&ae.return&&ae.return()}finally{if(me)throw ve}}var ke=function(nt){j.get(nt)?j.get(nt).forEach(function(Ct){T[g.get(Ct)]=Qt.get(nt)}):T[g.get(nt)]=Qt.get(nt)},he=!0,Ee=!1,Te=void 0;try{for(var le=Qt.keys()[Symbol.iterator](),Ne;!(he=(Ne=le.next()).done);he=!0){var se=Ne.value;ke(se)}}catch(nt){Ee=!0,Te=nt}finally{try{!he&&le.return&&le.return()}finally{if(Ee)throw Te}}})()}for(var ot=0;ot<L.length;ot++){var ct=L[ot];ct.getChild()??ct.setCenter(v[g.get(ct.id)],T[g.get(ct.id)])}},r.exports=i}),551:(r=>{r.exports=C})},N={};function f(r){var n=N[r];if(n!==void 0)return n.exports;var t=N[r]={exports:{}};return x[r](t,t.exports,f),t.exports}return f(45)})()})})),ai=He(de(((I,M)=>{(function(C,x){typeof I=="object"&&typeof M=="object"?M.exports=x(we()):typeof define=="function"&&define.amd?define(["cose-base"],x):typeof I=="object"?I.cytoscapeFcose=x(we()):C.cytoscapeFcose=x(C.coseBase)})(I,function(C){return(()=>{var x={658:(r=>{r.exports=Object.assign==null?function(n){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(e){return n[e]=t[e]})}),n}:Object.assign.bind(Object)}),548:((r,n,t)=>{var e=(function(){function p(o,i){var d=[],h=!0,c=!1,g=void 0;try{for(var v=o[Symbol.iterator](),T;!(h=(T=v.next()).done)&&(d.push(T.value),!(i&&d.length===i));h=!0);}catch(L){c=!0,g=L}finally{try{!h&&v.return&&v.return()}finally{if(c)throw g}}return d}return function(o,i){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return p(o,i);throw TypeError("Invalid attempt to destructure non-iterable instance")}})(),s=t(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(p){for(var o={},i=0;i<p.length;i++)o[p[i].id()]=!0;return p.filter(function(d,h){typeof d=="number"&&(d=h);for(var c=d.parent()[0];c!=null;){if(o[c.id()])return!1;c=c.parent()[0]}return!0})},a.connectComponents=function(p,o,i,d){var h=new s,c=new Set,g=[],v=void 0,T=void 0,L=void 0,R=!1,S=1,U=[],q=[],Z=function(){var D=p.collection();q.push(D);var Q=i[0],l=p.collection();l.merge(Q).merge(Q.descendants().intersection(o)),g.push(Q),l.forEach(function(y){h.push(y),c.add(y),D.merge(y)});for(var E=function(){Q=h.shift();var y=p.collection();Q.neighborhood().nodes().forEach(function(w){o.intersection(Q.edgesWith(w)).length>0&&y.merge(w)});for(var m=0;m<y.length;m++){var A=y[m];v=i.intersection(A.union(A.ancestors())),v!=null&&!c.has(v[0])&&v.union(v.descendants()).forEach(function(w){h.push(w),c.add(w),D.merge(w),i.has(w)&&g.push(w)})}};h.length!=0;)E();if(D.forEach(function(y){o.intersection(y.connectedEdges()).forEach(function(m){D.has(m.source())&&D.has(m.target())&&D.merge(m)})}),g.length==i.length&&(R=!0),!R||R&&S>1){T=g[0],L=T.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<L&&(L=y.connectedEdges().length,T=y)}),U.push(T.id());var u=p.collection();u.merge(g[0]),g.forEach(function(y){u.merge(y)}),g=[],i=i.difference(u),S++}};do Z();while(!R);return d&&U.length>0&&d.set("dummy"+(d.size+1),U),q},a.relocateComponent=function(p,o,i){if(!i.fixedNodeConstraint){var d=1/0,h=-1/0,c=1/0,g=-1/0;if(i.quality=="draft"){var v=!0,T=!1,L=void 0;try{for(var R=o.nodeIndexes[Symbol.iterator](),S;!(v=(S=R.next()).done);v=!0){var U=S.value,q=e(U,2),Z=q[0],D=q[1],Q=i.cy.getElementById(Z);if(Q){var l=Q.boundingBox(),E=o.xCoords[D]-l.w/2,u=o.xCoords[D]+l.w/2,y=o.yCoords[D]-l.h/2,m=o.yCoords[D]+l.h/2;E<d&&(d=E),u>h&&(h=u),y<c&&(c=y),m>g&&(g=m)}}}catch(F){T=!0,L=F}finally{try{!v&&R.return&&R.return()}finally{if(T)throw L}}var A=p.x-(h+d)/2,w=p.y-(g+c)/2;o.xCoords=o.xCoords.map(function(F){return F+A}),o.yCoords=o.yCoords.map(function(F){return F+w})}else{Object.keys(o).forEach(function(F){var Y=o[F],V=Y.getRect().x,J=Y.getRect().x+Y.getRect().width,k=Y.getRect().y,X=Y.getRect().y+Y.getRect().height;V<d&&(d=V),J>h&&(h=J),k<c&&(c=k),X>g&&(g=X)});var b=p.x-(h+d)/2,G=p.y-(g+c)/2;Object.keys(o).forEach(function(F){var Y=o[F];Y.setCenter(Y.getCenterX()+b,Y.getCenterY()+G)})}}},a.calcBoundingBox=function(p,o,i,d){for(var h=9007199254740991,c=-9007199254740991,g=9007199254740991,v=-9007199254740991,T=void 0,L=void 0,R=void 0,S=void 0,U=p.descendants().not(":parent"),q=U.length,Z=0;Z<q;Z++){var D=U[Z];T=o[d.get(D.id())]-D.width()/2,L=o[d.get(D.id())]+D.width()/2,R=i[d.get(D.id())]-D.height()/2,S=i[d.get(D.id())]+D.height()/2,h>T&&(h=T),c<L&&(c=L),g>R&&(g=R),v<S&&(v=S)}var Q={};return Q.topLeftX=h,Q.topLeftY=g,Q.width=c-h,Q.height=v-g,Q},a.calcParentsWithoutChildren=function(p,o){var i=p.collection();return o.nodes(":parent").forEach(function(d){var h=!1;d.children().forEach(function(c){c.css("display")!="none"&&(h=!0)}),h||i.merge(d)}),i},r.exports=a}),816:((r,n,t)=>{var e=t(548),s=t(140).CoSELayout,a=t(140).CoSENode,p=t(140).layoutBase.PointD,o=t(140).layoutBase.DimensionD,i=t(140).layoutBase.LayoutConstants,d=t(140).layoutBase.FDLayoutConstants,h=t(140).CoSEConstants;r.exports={coseLayout:function(c,g){var v=c.cy,T=c.eles,L=T.nodes(),R=T.edges(),S=void 0,U=void 0,q=void 0,Z={};c.randomize&&(S=g.nodeIndexes,U=g.xCoords,q=g.yCoords);var D=function(w){return typeof w=="function"},Q=function(w,b){return D(w)?w(b):w},l=e.calcParentsWithoutChildren(v,T),E=function w(b,G,F,Y){for(var V=G.length,J=0;J<V;J++){var k=G[J],X=null;k.intersection(l).length==0&&(X=k.children());var O=void 0,z=k.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(k.outerWidth()!=null&&k.outerHeight()!=null)if(Y.randomize)if(!k.isParent())O=b.add(new a(F.graphManager,new p(U[S.get(k.id())]-z.w/2,q[S.get(k.id())]-z.h/2),new o(parseFloat(z.w),parseFloat(z.h))));else{var et=e.calcBoundingBox(k,U,q,S);O=k.intersection(l).length==0?b.add(new a(F.graphManager,new p(et.topLeftX,et.topLeftY),new o(et.width,et.height))):b.add(new a(F.graphManager,new p(et.topLeftX,et.topLeftY),new o(parseFloat(z.w),parseFloat(z.h))))}else O=b.add(new a(F.graphManager,new p(k.position("x")-z.w/2,k.position("y")-z.h/2),new o(parseFloat(z.w),parseFloat(z.h))));else O=b.add(new a(this.graphManager));if(O.id=k.data("id"),O.nodeRepulsion=Q(Y.nodeRepulsion,k),O.paddingLeft=parseInt(k.css("padding")),O.paddingTop=parseInt(k.css("padding")),O.paddingRight=parseInt(k.css("padding")),O.paddingBottom=parseInt(k.css("padding")),Y.nodeDimensionsIncludeLabels&&(O.labelWidth=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,O.labelHeight=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,O.labelPosVertical=k.css("text-valign"),O.labelPosHorizontal=k.css("text-halign")),Z[k.data("id")]=O,isNaN(O.rect.x)&&(O.rect.x=0),isNaN(O.rect.y)&&(O.rect.y=0),X!=null&&X.length>0){var H=void 0;H=F.getGraphManager().add(F.newGraph(),O),w(H,X,F,Y)}}},u=function(w,b,G){for(var F=0,Y=0,V=0;V<G.length;V++){var J=G[V],k=Z[J.data("source")],X=Z[J.data("target")];if(k&&X&&k!==X&&k.getEdgesBetween(X).length==0){var O=b.add(w.newEdge(),k,X);O.id=J.id(),O.idealLength=Q(c.idealEdgeLength,J),O.edgeElasticity=Q(c.edgeElasticity,J),F+=O.idealLength,Y++}}c.idealEdgeLength!=null&&(Y>0?h.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=F/Y:D(c.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=c.idealEdgeLength,h.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH)},y=function(w,b){b.fixedNodeConstraint&&(w.constraints.fixedNodeConstraint=b.fixedNodeConstraint),b.alignmentConstraint&&(w.constraints.alignmentConstraint=b.alignmentConstraint),b.relativePlacementConstraint&&(w.constraints.relativePlacementConstraint=b.relativePlacementConstraint)};c.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(h.MAX_ITERATIONS=d.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=c.tilingCompareBy),c.quality=="proof"?i.QUALITY=2:i.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!c.randomize,h.ANIMATE=d.ANIMATE=i.ANIMATE=c.animate,h.TILE=c.tile,h.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!c.randomize,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,c.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),c.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),c.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),c.step=="all"&&(c.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var m=new s,A=m.newGraphManager();return E(A.addRoot(),e.getTopMostNodes(L),m,c),u(m,A,R),y(m,c),m.runLayout(),Z}}}),212:((r,n,t)=>{var e=(function(){function h(c,g){for(var v=0;v<g.length;v++){var T=g[v];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(c,T.key,T)}}return function(c,g,v){return g&&h(c.prototype,g),v&&h(c,v),c}})();function s(h,c){if(!(h instanceof c))throw TypeError("Cannot call a class as a function")}var a=t(658),p=t(548),o=t(657).spectralLayout,i=t(816).coseLayout,d=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(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){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(){}});r.exports=(function(){function h(c){s(this,h),this.options=a({},d,c)}return e(h,[{key:"run",value:function(){var c=this,g=this.options,v=g.cy,T=g.eles,L=[],R=[],S=void 0,U=[];g.fixedNodeConstraint&&(!Array.isArray(g.fixedNodeConstraint)||g.fixedNodeConstraint.length==0)&&(g.fixedNodeConstraint=void 0),g.alignmentConstraint&&(g.alignmentConstraint.vertical&&(!Array.isArray(g.alignmentConstraint.vertical)||g.alignmentConstraint.vertical.length==0)&&(g.alignmentConstraint.vertical=void 0),g.alignmentConstraint.horizontal&&(!Array.isArray(g.alignmentConstraint.horizontal)||g.alignmentConstraint.horizontal.length==0)&&(g.alignmentConstraint.horizontal=void 0)),g.relativePlacementConstraint&&(!Array.isArray(g.relativePlacementConstraint)||g.relativePlacementConstraint.length==0)&&(g.relativePlacementConstraint=void 0),(g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint)&&(g.tile=!1,g.packComponents=!1);var q=void 0,Z=!1;if(v.layoutUtilities&&g.packComponents&&(q=v.layoutUtilities("get"),q||(q=v.layoutUtilities()),Z=!0),T.nodes().length>0)if(Z){var D=p.getTopMostNodes(g.eles.nodes());if(S=p.connectComponents(v,g.eles,D),S.forEach(function(H){var B=H.boundingBox();U.push({x:B.x1+B.w/2,y:B.y1+B.h/2})}),g.randomize&&S.forEach(function(H){g.eles=H,L.push(o(g))}),g.quality=="default"||g.quality=="proof"){var Q=v.collection();if(g.tile){var l=new Map,E=[],u=[],y=0,m={nodeIndexes:l,xCoords:E,yCoords:u},A=[];if(S.forEach(function(H,B){H.edges().length==0&&(H.nodes().forEach(function(lt,at){Q.merge(H.nodes()[at]),lt.isParent()||(m.nodeIndexes.set(H.nodes()[at].id(),y++),m.xCoords.push(H.nodes()[0].position().x),m.yCoords.push(H.nodes()[0].position().y))}),A.push(B))}),Q.length>1){var w=Q.boundingBox();U.push({x:w.x1+w.w/2,y:w.y1+w.h/2}),S.push(Q),L.push(m);for(var b=A.length-1;b>=0;b--)S.splice(A[b],1),L.splice(A[b],1),U.splice(A[b],1)}}S.forEach(function(H,B){g.eles=H,R.push(i(g,L[B])),p.relocateComponent(U[B],R[B],g)})}else S.forEach(function(H,B){p.relocateComponent(U[B],L[B],g)});var G=new Set;if(S.length>1){var F=[],Y=T.filter(function(H){return H.css("display")=="none"});S.forEach(function(H,B){var lt=void 0;if(g.quality=="draft"&&(lt=L[B].nodeIndexes),H.nodes().not(Y).length>0){var at={};at.edges=[],at.nodes=[];var Lt=void 0;H.nodes().not(Y).forEach(function(W){if(g.quality=="draft")if(!W.isParent())Lt=lt.get(W.id()),at.nodes.push({x:L[B].xCoords[Lt]-W.boundingbox().w/2,y:L[B].yCoords[Lt]-W.boundingbox().h/2,width:W.boundingbox().w,height:W.boundingbox().h});else{var pt=p.calcBoundingBox(W,L[B].xCoords,L[B].yCoords,lt);at.nodes.push({x:pt.topLeftX,y:pt.topLeftY,width:pt.width,height:pt.height})}else R[B][W.id()]&&at.nodes.push({x:R[B][W.id()].getLeft(),y:R[B][W.id()].getTop(),width:R[B][W.id()].getWidth(),height:R[B][W.id()].getHeight()})}),H.edges().forEach(function(W){var pt=W.source(),vt=W.target();if(pt.css("display")!="none"&&vt.css("display")!="none")if(g.quality=="draft"){var Bt=lt.get(pt.id()),Ut=lt.get(vt.id()),It=[],Mt=[];if(pt.isParent()){var Yt=p.calcBoundingBox(pt,L[B].xCoords,L[B].yCoords,lt);It.push(Yt.topLeftX+Yt.width/2),It.push(Yt.topLeftY+Yt.height/2)}else It.push(L[B].xCoords[Bt]),It.push(L[B].yCoords[Bt]);if(vt.isParent()){var Ht=p.calcBoundingBox(vt,L[B].xCoords,L[B].yCoords,lt);Mt.push(Ht.topLeftX+Ht.width/2),Mt.push(Ht.topLeftY+Ht.height/2)}else Mt.push(L[B].xCoords[Ut]),Mt.push(L[B].yCoords[Ut]);at.edges.push({startX:It[0],startY:It[1],endX:Mt[0],endY:Mt[1]})}else R[B][pt.id()]&&R[B][vt.id()]&&at.edges.push({startX:R[B][pt.id()].getCenterX(),startY:R[B][pt.id()].getCenterY(),endX:R[B][vt.id()].getCenterX(),endY:R[B][vt.id()].getCenterY()})}),at.nodes.length>0&&(F.push(at),G.add(B))}});var V=q.packComponents(F,g.randomize).shifts;if(g.quality=="draft")L.forEach(function(H,B){var lt=H.xCoords.map(function(Lt){return Lt+V[B].dx}),at=H.yCoords.map(function(Lt){return Lt+V[B].dy});H.xCoords=lt,H.yCoords=at});else{var J=0;G.forEach(function(H){Object.keys(R[H]).forEach(function(B){var lt=R[H][B];lt.setCenter(lt.getCenterX()+V[J].dx,lt.getCenterY()+V[J].dy)}),J++})}}}else{var k=g.eles.boundingBox();if(U.push({x:k.x1+k.w/2,y:k.y1+k.h/2}),g.randomize){var X=o(g);L.push(X)}g.quality=="default"||g.quality=="proof"?(R.push(i(g,L[0])),p.relocateComponent(U[0],R[0],g)):p.relocateComponent(U[0],L[0],g)}var O=function(H,B){if(g.quality=="default"||g.quality=="proof"){typeof H=="number"&&(H=B);var lt=void 0,at=void 0,Lt=H.data("id");return R.forEach(function(pt){Lt in pt&&(lt={x:pt[Lt].getRect().getCenterX(),y:pt[Lt].getRect().getCenterY()},at=pt[Lt])}),g.nodeDimensionsIncludeLabels&&(at.labelWidth&&(at.labelPosHorizontal=="left"?lt.x+=at.labelWidth/2:at.labelPosHorizontal=="right"&&(lt.x-=at.labelWidth/2)),at.labelHeight&&(at.labelPosVertical=="top"?lt.y+=at.labelHeight/2:at.labelPosVertical=="bottom"&&(lt.y-=at.labelHeight/2))),lt??(lt={x:H.position("x"),y:H.position("y")}),{x:lt.x,y:lt.y}}else{var W=void 0;return L.forEach(function(pt){var vt=pt.nodeIndexes.get(H.id());vt!=null&&(W={x:pt.xCoords[vt],y:pt.yCoords[vt]})}),W??(W={x:H.position("x"),y:H.position("y")}),{x:W.x,y:W.y}}};if(g.quality=="default"||g.quality=="proof"||g.randomize){var z=p.calcParentsWithoutChildren(v,T),et=T.filter(function(H){return H.css("display")=="none"});g.eles=T.not(et),T.nodes().not(":parent").not(et).layoutPositions(c,g,O),z.length>0&&z.forEach(function(H){H.position(O(H))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),h})()}),657:((r,n,t)=>{var e=t(548),s=t(140).layoutBase.Matrix,a=t(140).layoutBase.SVD;r.exports={spectralLayout:function(p){var o=p.cy,i=p.eles,d=i.nodes(),h=i.nodes(":parent"),c=new Map,g=new Map,v=new Map,T=[],L=[],R=[],S=[],U=[],q=[],Z=[],D=[],Q=void 0,l=1e8,E=1e-9,u=p.piTol,y=p.samplingType,m=p.nodeSeparation,A=void 0,w=function(){for(var st=0,ot=0,ct=!1;ot<A;){st=Math.floor(Math.random()*Q),ct=!1;for(var _=0;_<ot;_++)if(S[_]==st){ct=!0;break}if(!ct)S[ot]=st,ot++;else continue}},b=function(st,ot,ct){for(var _=[],P=0,$=0,j=0,tt=void 0,Et=[],yt=0,it=1,ft=0;ft<Q;ft++)Et[ft]=l;for(_[$]=st,Et[st]=0;$>=P;){j=_[P++];for(var _t=T[j],wt=0;wt<_t.length;wt++)tt=g.get(_t[wt]),Et[tt]==l&&(Et[tt]=Et[j]+1,_[++$]=tt);q[j][ot]=Et[j]*m}if(ct){for(var mt=0;mt<Q;mt++)q[mt][ot]<U[mt]&&(U[mt]=q[mt][ot]);for(var ht=0;ht<Q;ht++)U[ht]>yt&&(yt=U[ht],it=ht)}return it},G=function(st){var ot=void 0;if(st){ot=Math.floor(Math.random()*Q);for(var ct=0;ct<Q;ct++)U[ct]=l;for(var _=0;_<A;_++)S[_]=ot,ot=b(ot,_,st)}else{w();for(var P=0;P<A;P++)b(S[P],P,st,!1)}for(var $=0;$<Q;$++)for(var j=0;j<A;j++)q[$][j]*=q[$][j];for(var tt=0;tt<A;tt++)Z[tt]=[];for(var Et=0;Et<A;Et++)for(var yt=0;yt<A;yt++)Z[Et][yt]=q[S[yt]][Et]},F=function(){for(var st=a.svd(Z),ot=st.S,ct=st.U,_=st.V,P=ot[0]*ot[0]*ot[0],$=[],j=0;j<A;j++){$[j]=[];for(var tt=0;tt<A;tt++)$[j][tt]=0,j==tt&&($[j][tt]=ot[j]/(ot[j]*ot[j]+P/(ot[j]*ot[j])))}D=s.multMat(s.multMat(_,$),s.transpose(ct))},Y=function(){for(var st=void 0,ot=void 0,ct=[],_=[],P=[],$=[],j=0;j<Q;j++)ct[j]=Math.random(),_[j]=Math.random();ct=s.normalize(ct),_=s.normalize(_);for(var tt=0,Et=E,yt=E,it=void 0;;){tt++;for(var ft=0;ft<Q;ft++)P[ft]=ct[ft];if(ct=s.multGamma(s.multL(s.multGamma(P),q,D)),st=s.dotProduct(P,ct),ct=s.normalize(ct),Et=s.dotProduct(P,ct),it=Math.abs(Et/yt),it<=1+u&&it>=1)break;yt=Et}for(var _t=0;_t<Q;_t++)P[_t]=ct[_t];for(tt=0,yt=E;;){tt++;for(var wt=0;wt<Q;wt++)$[wt]=_[wt];if($=s.minusOp($,s.multCons(P,s.dotProduct(P,$))),_=s.multGamma(s.multL(s.multGamma($),q,D)),ot=s.dotProduct($,_),_=s.normalize(_),Et=s.dotProduct($,_),it=Math.abs(Et/yt),it<=1+u&&it>=1)break;yt=Et}for(var mt=0;mt<Q;mt++)$[mt]=_[mt];L=s.multCons(P,Math.sqrt(Math.abs(st))),R=s.multCons($,Math.sqrt(Math.abs(ot)))};e.connectComponents(o,i,e.getTopMostNodes(d),c),h.forEach(function(st){e.connectComponents(o,i,e.getTopMostNodes(st.descendants().intersection(i)),c)});for(var V=0,J=0;J<d.length;J++)d[J].isParent()||g.set(d[J].id(),V++);var k=!0,X=!1,O=void 0;try{for(var z=c.keys()[Symbol.iterator](),et;!(k=(et=z.next()).done);k=!0){var H=et.value;g.set(H,V++)}}catch(st){X=!0,O=st}finally{try{!k&&z.return&&z.return()}finally{if(X)throw O}}for(var B=0;B<g.size;B++)T[B]=[];h.forEach(function(st){for(var ot=st.children().intersection(i);ot.nodes(":childless").length==0;)ot=ot.nodes()[0].children().intersection(i);var ct=0,_=ot.nodes(":childless")[0].connectedEdges().length;ot.nodes(":childless").forEach(function(P,$){P.connectedEdges().length<_&&(_=P.connectedEdges().length,ct=$)}),v.set(st.id(),ot.nodes(":childless")[ct].id())}),d.forEach(function(st){var ot=void 0;ot=st.isParent()?g.get(v.get(st.id())):g.get(st.id()),st.neighborhood().nodes().forEach(function(ct){i.intersection(st.edgesWith(ct)).length>0&&(ct.isParent()?T[ot].push(v.get(ct.id())):T[ot].push(ct.id()))})});var lt=function(st){var ot=g.get(st),ct=void 0;c.get(st).forEach(function(_){ct=o.getElementById(_).isParent()?v.get(_):_,T[ot].push(ct),T[g.get(ct)].push(st)})},at=!0,Lt=!1,W=void 0;try{for(var pt=c.keys()[Symbol.iterator](),vt;!(at=(vt=pt.next()).done);at=!0){var Bt=vt.value;lt(Bt)}}catch(st){Lt=!0,W=st}finally{try{!at&&pt.return&&pt.return()}finally{if(Lt)throw W}}Q=g.size;var Ut=void 0;if(Q>2){A=Q<p.sampleSize?Q:p.sampleSize;for(var It=0;It<Q;It++)q[It]=[];for(var Mt=0;Mt<A;Mt++)D[Mt]=[];return p.quality=="draft"||p.step=="all"?(G(y),F(),Y(),Ut={nodeIndexes:g,xCoords:L,yCoords:R}):(g.forEach(function(st,ot){L.push(o.getElementById(ot).position("x")),R.push(o.getElementById(ot).position("y"))}),Ut={nodeIndexes:g,xCoords:L,yCoords:R}),Ut}else{var Yt=g.keys(),Ht=o.getElementById(Yt.next().value),Rt=Ht.position(),Vt=Ht.outerWidth();if(L.push(Rt.x),R.push(Rt.y),Q==2){var Gt=o.getElementById(Yt.next().value).outerWidth();L.push(Rt.x+Vt/2+Gt/2+p.idealEdgeLength),R.push(Rt.y)}return Ut={nodeIndexes:g,xCoords:L,yCoords:R},Ut}}}}),579:((r,n,t)=>{var e=t(212),s=function(a){a&&a("layout","fcose",e)};typeof cytoscape<"u"&&s(cytoscape),r.exports=s}),140:(r=>{r.exports=C})},N={};function f(r){var n=N[r];if(n!==void 0)return n.exports;var t=N[r]={exports:{}};return x[r](t,t.exports,f),t.exports}return f(579)})()})}))(),1),_e={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:gt(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:gt(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:gt(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},oe={L:gt((I,M)=>I-M+2,"L"),R:gt((I,M)=>I-2,"R"),T:gt((I,M)=>I-M+2,"T"),B:gt((I,M)=>I-2,"B")},si=gt(function(I){return St(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Me=gt(function(I){let M=I;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),St=gt(function(I){let M=I;return M==="L"||M==="R"},"isArchitectureDirectionX"),Wt=gt(function(I){let M=I;return M==="T"||M==="B"},"isArchitectureDirectionY"),fe=gt(function(I,M){let C=St(I)&&Wt(M),x=Wt(I)&&St(M);return C||x},"isArchitectureDirectionXY"),hi=gt(function(I){let M=I[0],C=I[1],x=St(M)&&Wt(C),N=Wt(M)&&St(C);return x||N},"isArchitecturePairXY"),li=gt(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(I,M){let C=`${I}${M}`;return li(C)?C:void 0},"getArchitectureDirectionPair"),di=gt(function([I,M],C){let x=C[0],N=C[1];return St(x)?Wt(N)?[I+(x==="L"?-1:1),M+(N==="T"?1:-1)]:[I+(x==="L"?-1:1),M]:St(N)?[I+(N==="L"?1:-1),M+(x==="T"?1:-1)]:[I,M+(x==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),gi=gt(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),ci=gt(function(I,M){return fe(I,M)?"bend":St(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ui=gt(function(I){return I.type==="service"},"isArchitectureService"),fi=gt(function(I){return I.type==="junction"},"isArchitectureJunction"),xe=gt(I=>I.data(),"edgeData"),Jt=gt(I=>I.data(),"nodeData"),pi=Qe.architecture,Oe=(te=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=Be,this.getAccTitle=Je,this.setDiagramTitle=qe,this.getDiagramTitle=Ve,this.getAccDescription=$e,this.setAccDescription=ti,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},Ze()}addService({id:M,icon:C,in:x,title:N,iconText:f}){if(this.registeredIds[M]!==void 0)throw Error(`The service id [${M}] is already in use by another ${this.registeredIds[M]}`);if(x!==void 0){if(M===x)throw Error(`The service [${M}] cannot be placed within itself`);if(this.registeredIds[x]===void 0)throw Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[x]==="node")throw Error(`The service [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"service",icon:C,iconText:f,title:N,edges:[],in:x}}getServices(){return Object.values(this.nodes).filter(ui)}addJunction({id:M,in:C}){this.registeredIds[M]="node",this.nodes[M]={id:M,type:"junction",edges:[],in:C}}getJunctions(){return Object.values(this.nodes).filter(fi)}getNodes(){return Object.values(this.nodes)}getNode(M){return this.nodes[M]??null}addGroup({id:M,icon:C,in:x,title:N}){var f,r,n;if(((f=this.registeredIds)==null?void 0:f[M])!==void 0)throw Error(`The group id [${M}] is already in use by another ${this.registeredIds[M]}`);if(x!==void 0){if(M===x)throw Error(`The group [${M}] cannot be placed within itself`);if(((r=this.registeredIds)==null?void 0:r[x])===void 0)throw Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(((n=this.registeredIds)==null?void 0:n[x])==="node")throw Error(`The group [${M}]'s parent is not a group`)}this.registeredIds[M]="group",this.groups[M]={id:M,icon:C,title:N,in:x}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:M,rhsId:C,lhsDir:x,rhsDir:N,lhsInto:f,rhsInto:r,lhsGroup:n,rhsGroup:t,title:e}){if(!Me(x))throw Error(`Invalid direction given for left hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(x)}`);if(!Me(N))throw Error(`Invalid direction given for right hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);let s=this.nodes[M].in,a=this.nodes[C].in;if(n&&s&&a&&s==a)throw Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(t&&s&&a&&s==a)throw Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let p={lhsId:M,lhsDir:x,lhsInto:f,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:r,rhsGroup:t,title:e};this.edges.push(p),this.nodes[M]&&this.nodes[C]&&(this.nodes[M].edges.push(this.edges[this.edges.length-1]),this.nodes[C].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let M={},C=Object.entries(this.nodes).reduce((t,[e,s])=>(t[e]=s.edges.reduce((a,p)=>{var d,h;let o=(d=this.getNode(p.lhsId))==null?void 0:d.in,i=(h=this.getNode(p.rhsId))==null?void 0:h.in;if(o&&i&&o!==i){let c=ci(p.lhsDir,p.rhsDir);c!=="bend"&&(M[o]??(M[o]={}),M[o][i]=c,M[i]??(M[i]={}),M[i][o]=c)}if(p.lhsId===e){let c=pe(p.lhsDir,p.rhsDir);c&&(a[c]=p.rhsId)}else{let c=pe(p.rhsDir,p.lhsDir);c&&(a[c]=p.lhsId)}return a},{}),t),{}),x=Object.keys(C)[0],N={[x]:1},f=Object.keys(C).reduce((t,e)=>e===x?t:{...t,[e]:1},{}),r=gt(t=>{let e={[t]:[0,0]},s=[t];for(;s.length>0;){let a=s.shift();if(a){N[a]=1,delete f[a];let p=C[a],[o,i]=e[a];Object.entries(p).forEach(([d,h])=>{N[h]||(e[h]=di([o,i],d),s.push(h))})}}return e},"BFS"),n=[r(x)];for(;Object.keys(f).length>0;)n.push(r(Object.keys(f)[0]));this.dataStructures={adjList:C,spatialMaps:n,groupAlignments:M}}return this.dataStructures}setElementForId(M,C){this.elements[M]=C}getElementById(M){return this.elements[M]}getConfig(){return ze({...pi,...Ke().architecture})}getConfigField(M){return this.getConfig()[M]}},gt(te,"ArchitectureDB"),te),mi=gt((I,M)=>{oi(I,M),I.groups.map(C=>M.addGroup(C)),I.services.map(C=>M.addService({...C,type:"service"})),I.junctions.map(C=>M.addJunction({...C,type:"junction"})),I.edges.map(C=>M.addEdge(C))},"populateDb"),De={parser:{yy:void 0},parse:gt(async I=>{var x;let M=await ni("architecture",I);Ae.debug(M);let C=(x=De.parser)==null?void 0:x.yy;if(!(C instanceof Oe))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");mi(M,C)},"parse")},vi=gt(I=>`
1
+ var te;import{s as He,t as de}from"./chunk-DZLz74EQ.js";import"./_Uint8Array-CPNtPV0k.js";import"./isSymbol-D1Vf4s0g.js";import"./_arrayMap-DQI2GUNb.js";import"./toString-pPvo2488.js";import"./toNumber-Bjr00yqN.js";import"./toInteger-Qi6pclEF.js";import"./isArrayLikeObject-CQy5-FN4.js";import"./_getTag-C4fv2peH.js";import"./_baseUniq-DuMeVp_r.js";import"./_baseIsEqual-Cdnsi4t8.js";import"./chunk-4KMFLZZN-DEMg9QYp.js";import"./_toKey-BvVjBIlz.js";import"./memoize-D2QB0zzX.js";import"./get-Bi1nZ6vb.js";import"./_baseFlatten-BM8p5vhd.js";import"./_basePickBy-CViVNfOD.js";import"./merge-DrdmtLTL.js";import"./_baseSlice-B27Cqkm6.js";import"./_arrayReduce-DDpPg0Qh.js";import"./clone-C-4MVcJh.js";import"./_baseEach-CWBhny_f.js";import"./hasIn-BZo8Xaqq.js";import"./_baseProperty-CIKnF2iY.js";import"./_createAggregator-DiCw154M.js";import"./min-DZ9NrTCT.js";import"./_baseMap-vZ8RB515.js";import"./isEmpty-D1b_MAwx.js";import"./_baseSet-B-t_O9-N.js";import"./preload-helper-DImqtvgl.js";import"./main-CfqcqCNp.js";import"./marked.esm-C_54K2ke.js";import"./timer-m_pEB4Lb.js";import{u as Xe}from"./src--EmJf_Ct.js";import"./math-BsaXoFIn.js";import"./step-aJ-oEw6-.js";import{i as ze}from"./chunk-S3R3BYOJ-Dy72CLbv.js";import{n as gt,r as Ae}from"./src-CWnjMQt8.js";import{B as Be,C as Ve,G as We,I as je,U as qe,_ as $e,a as Ze,b as ge,d as Qe,v as Je,y as Ke,z as ti}from"./chunk-ABZYJK2D-eZsthrBr.js";import{t as ei}from"./chunk-EXTU4WIE-C8Y_P6y8.js";import"./dist-D2dAPhhG.js";import{i as ii,n as ce,o as ri,r as ue}from"./chunk-JA3XYJ7Z-pR89xWsn.js";import"./chunk-JEIROHC2-2-ucCTVJ.js";import"./chunk-BN7GFLIU-ez-vZ7uD.js";import"./chunk-T44TD3VJ-BfMjD4hS.js";import"./chunk-KMC2YHZD-BvMr39QE.js";import"./chunk-WFWHJNB7-B095GDsj.js";import"./chunk-WFRQ32O7-CHVQx4E8.js";import"./chunk-XRWGC2XP-C9u0mhR4.js";import{t as oi}from"./chunk-4BX2VUAB-BesOWRPY.js";import{t as ni}from"./mermaid-parser.core-CwRCqiGJ.js";import{t as Ce}from"./cytoscape.esm-DgaM79UU.js";var Le=de(((I,M)=>{(function(C,x){typeof I=="object"&&typeof M=="object"?M.exports=x():typeof define=="function"&&define.amd?define([],x):typeof I=="object"?I.layoutBase=x():C.layoutBase=x()})(I,function(){return(function(C){var x={};function N(f){if(x[f])return x[f].exports;var r=x[f]={i:f,l:!1,exports:{}};return C[f].call(r.exports,r,r.exports,N),r.l=!0,r.exports}return N.m=C,N.c=x,N.i=function(f){return f},N.d=function(f,r,n){N.o(f,r)||Object.defineProperty(f,r,{configurable:!1,enumerable:!0,get:n})},N.n=function(f){var r=f&&f.__esModule?function(){return f.default}:function(){return f};return N.d(r,"a",r),r},N.o=function(f,r){return Object.prototype.hasOwnProperty.call(f,r)},N.p="",N(N.s=28)})([(function(C,x,N){function f(){}f.QUALITY=1,f.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,f.DEFAULT_INCREMENTAL=!1,f.DEFAULT_ANIMATION_ON_LAYOUT=!0,f.DEFAULT_ANIMATION_DURING_LAYOUT=!1,f.DEFAULT_ANIMATION_PERIOD=50,f.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,f.DEFAULT_GRAPH_MARGIN=15,f.NODE_DIMENSIONS_INCLUDE_LABELS=!1,f.SIMPLE_NODE_SIZE=40,f.SIMPLE_NODE_HALF_SIZE=f.SIMPLE_NODE_SIZE/2,f.EMPTY_COMPOUND_NODE_SIZE=40,f.MIN_EDGE_LENGTH=1,f.WORLD_BOUNDARY=1e6,f.INITIAL_WORLD_BOUNDARY=f.WORLD_BOUNDARY/1e3,f.WORLD_CENTER_X=1200,f.WORLD_CENTER_Y=900,C.exports=f}),(function(C,x,N){var f=N(2),r=N(8),n=N(9);function t(s,a,p){f.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=s,this.target=a}for(var e in t.prototype=Object.create(f.prototype),f)t[e]=f[e];t.prototype.getSource=function(){return this.source},t.prototype.getTarget=function(){return this.target},t.prototype.isInterGraph=function(){return this.isInterGraph},t.prototype.getLength=function(){return this.length},t.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},t.prototype.getBendpoints=function(){return this.bendpoints},t.prototype.getLca=function(){return this.lca},t.prototype.getSourceInLca=function(){return this.sourceInLca},t.prototype.getTargetInLca=function(){return this.targetInLca},t.prototype.getOtherEnd=function(s){if(this.source===s)return this.target;if(this.target===s)return this.source;throw"Node is not incident with this edge"},t.prototype.getOtherEndInGraph=function(s,a){for(var p=this.getOtherEnd(s),o=a.getGraphManager().getRoot();;){if(p.getOwner()==a)return p;if(p.getOwner()==o)break;p=p.getOwner().getParent()}return null},t.prototype.updateLength=function(){var s=[,,,,];this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),s),this.isOverlapingSourceAndTarget||(this.lengthX=s[0]-s[2],this.lengthY=s[1]-s[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},t.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=t}),(function(C,x,N){function f(r){this.vGraphObject=r}C.exports=f}),(function(C,x,N){var f=N(2),r=N(10),n=N(13),t=N(0),e=N(16),s=N(5);function a(o,i,d,h){d==null&&h==null&&(h=i),f.call(this,h),o.graphManager!=null&&(o=o.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=h,this.edges=[],this.graphManager=o,d!=null&&i!=null?this.rect=new n(i.x,i.y,d.width,d.height):this.rect=new n}for(var p in a.prototype=Object.create(f.prototype),f)a[p]=f[p];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(o){this.rect.width=o},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(o){this.rect.height=o},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new s(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new s(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(o,i){this.rect.x=o.x,this.rect.y=o.y,this.rect.width=i.width,this.rect.height=i.height},a.prototype.setCenter=function(o,i){this.rect.x=o-this.rect.width/2,this.rect.y=i-this.rect.height/2},a.prototype.setLocation=function(o,i){this.rect.x=o,this.rect.y=i},a.prototype.moveBy=function(o,i){this.rect.x+=o,this.rect.y+=i},a.prototype.getEdgeListToNode=function(o){var i=[],d=this;return d.edges.forEach(function(h){if(h.target==o){if(h.source!=d)throw"Incorrect edge source!";i.push(h)}}),i},a.prototype.getEdgesBetween=function(o){var i=[],d=this;return d.edges.forEach(function(h){if(!(h.source==d||h.target==d))throw"Incorrect edge source and/or target";(h.target==o||h.source==o)&&i.push(h)}),i},a.prototype.getNeighborsList=function(){var o=new Set,i=this;return i.edges.forEach(function(d){if(d.source==i)o.add(d.target);else{if(d.target!=i)throw"Incorrect incidency!";o.add(d.source)}}),o},a.prototype.withChildren=function(){var o=new Set,i,d;if(o.add(this),this.child!=null)for(var h=this.child.getNodes(),c=0;c<h.length;c++)i=h[c],d=i.withChildren(),d.forEach(function(g){o.add(g)});return o},a.prototype.getNoOfChildren=function(){var o=0,i;if(this.child==null)o=1;else for(var d=this.child.getNodes(),h=0;h<d.length;h++)i=d[h],o+=i.getNoOfChildren();return o==0&&(o=1),o},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},a.prototype.scatter=function(){var o,i,d=-t.INITIAL_WORLD_BOUNDARY,h=t.INITIAL_WORLD_BOUNDARY;o=t.WORLD_CENTER_X+e.nextDouble()*(h-d)+d;var c=-t.INITIAL_WORLD_BOUNDARY,g=t.INITIAL_WORLD_BOUNDARY;i=t.WORLD_CENTER_Y+e.nextDouble()*(g-c)+c,this.rect.x=o,this.rect.y=i},a.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var o=this.getChild();if(o.updateBounds(!0),this.rect.x=o.getLeft(),this.rect.y=o.getTop(),this.setWidth(o.getRight()-o.getLeft()),this.setHeight(o.getBottom()-o.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var i=o.getRight()-o.getLeft(),d=o.getBottom()-o.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(i+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>i?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(d+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>d?(this.rect.y-=(this.labelHeight-d)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(d+this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(o){var i=this.rect.x;i>t.WORLD_BOUNDARY?i=t.WORLD_BOUNDARY:i<-t.WORLD_BOUNDARY&&(i=-t.WORLD_BOUNDARY);var d=this.rect.y;d>t.WORLD_BOUNDARY?d=t.WORLD_BOUNDARY:d<-t.WORLD_BOUNDARY&&(d=-t.WORLD_BOUNDARY);var h=new s(i,d),c=o.inverseTransformPoint(h);this.setLocation(c.x,c.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=a}),(function(C,x,N){var f=N(0);function r(){}for(var n in f)r[n]=f[n];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,r.COOLING_ADAPTATION_FACTOR=.33,r.ADAPTATION_LOWER_NODE_LIMIT=1e3,r.ADAPTATION_UPPER_NODE_LIMIT=5e3,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=r.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=r}),(function(C,x,N){function f(r,n){r==null&&n==null?(this.x=0,this.y=0):(this.x=r,this.y=n)}f.prototype.getX=function(){return this.x},f.prototype.getY=function(){return this.y},f.prototype.setX=function(r){this.x=r},f.prototype.setY=function(r){this.y=r},f.prototype.getDifference=function(r){return new DimensionD(this.x-r.x,this.y-r.y)},f.prototype.getCopy=function(){return new f(this.x,this.y)},f.prototype.translate=function(r){return this.x+=r.width,this.y+=r.height,this},C.exports=f}),(function(C,x,N){var f=N(2),r=N(10),n=N(0),t=N(7),e=N(3),s=N(1),a=N(13),p=N(12),o=N(11);function i(h,c,g){f.call(this,g),this.estimatedSize=r.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=h,c!=null&&c instanceof t?this.graphManager=c:c!=null&&c instanceof Layout&&(this.graphManager=c.graphManager)}for(var d in i.prototype=Object.create(f.prototype),f)i[d]=f[d];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(h,c,g){if(c==null&&g==null){var v=h;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var T=h;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(g)>-1))throw"Source or target not in graph!";if(!(c.owner==g.owner&&c.owner==this))throw"Both owners must be this graph!";return c.owner==g.owner?(T.source=c,T.target=g,T.isInterGraph=!1,this.getEdges().push(T),c.edges.push(T),g!=c&&g.edges.push(T),T):null}},i.prototype.remove=function(h){var c=h;if(h instanceof e){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var g=c.edges.slice(),v,T=g.length,L=0;L<T;L++)v=g[L],v.isInterGraph?this.graphManager.remove(v):v.source.owner.remove(v);var R=this.nodes.indexOf(c);if(R==-1)throw"Node not in owner node list!";this.nodes.splice(R,1)}else if(h instanceof s){var v=h;if(v==null)throw"Edge is null!";if(!(v.source!=null&&v.target!=null))throw"Source and/or target is null!";if(!(v.source.owner!=null&&v.target.owner!=null&&v.source.owner==this&&v.target.owner==this))throw"Source and/or target owner is invalid!";var S=v.source.edges.indexOf(v),U=v.target.edges.indexOf(v);if(!(S>-1&&U>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(S,1),v.target!=v.source&&v.target.edges.splice(U,1);var R=v.source.owner.getEdges().indexOf(v);if(R==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(R,1)}},i.prototype.updateLeftTop=function(){for(var h=r.MAX_VALUE,c=r.MAX_VALUE,g,v,T,L=this.getNodes(),R=L.length,S=0;S<R;S++){var U=L[S];g=U.getTop(),v=U.getLeft(),h>g&&(h=g),c>v&&(c=v)}return h==r.MAX_VALUE?null:(T=L[0].getParent().paddingLeft==null?this.margin:L[0].getParent().paddingLeft,this.left=c-T,this.top=h-T,new p(this.left,this.top))},i.prototype.updateBounds=function(h){for(var c=r.MAX_VALUE,g=-r.MAX_VALUE,v=r.MAX_VALUE,T=-r.MAX_VALUE,L,R,S,U,q,Z=this.nodes,D=Z.length,Q=0;Q<D;Q++){var l=Z[Q];h&&l.child!=null&&l.updateBounds(),L=l.getLeft(),R=l.getRight(),S=l.getTop(),U=l.getBottom(),c>L&&(c=L),g<R&&(g=R),v>S&&(v=S),T<U&&(T=U)}var E=new a(c,v,g-c,T-v);c==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),q=Z[0].getParent().paddingLeft==null?this.margin:Z[0].getParent().paddingLeft,this.left=E.x-q,this.right=E.x+E.width+q,this.top=E.y-q,this.bottom=E.y+E.height+q},i.calculateBounds=function(h){for(var c=r.MAX_VALUE,g=-r.MAX_VALUE,v=r.MAX_VALUE,T=-r.MAX_VALUE,L,R,S,U,q=h.length,Z=0;Z<q;Z++){var D=h[Z];L=D.getLeft(),R=D.getRight(),S=D.getTop(),U=D.getBottom(),c>L&&(c=L),g<R&&(g=R),v>S&&(v=S),T<U&&(T=U)}return new a(c,v,g-c,T-v)},i.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){for(var h=0,c=this.nodes,g=c.length,v=0;v<g;v++){var T=c[v];h+=T.calcEstimatedSize()}return h==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=h/Math.sqrt(this.nodes.length),this.estimatedSize},i.prototype.updateConnected=function(){var h=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new o,g=new Set,v=this.nodes[0],T,L;for(v.withChildren().forEach(function(q){c.push(q),g.add(q)});c.length!==0;){v=c.shift(),T=v.getEdges();for(var R=T.length,S=0;S<R;S++)L=T[S].getOtherEndInGraph(v,this),L!=null&&!g.has(L)&&L.withChildren().forEach(function(q){c.push(q),g.add(q)})}if(this.isConnected=!1,g.size>=this.nodes.length){var U=0;g.forEach(function(q){q.owner==h&&U++}),U==this.nodes.length&&(this.isConnected=!0)}},C.exports=i}),(function(C,x,N){var f,r=N(1);function n(t){f=N(6),this.layout=t,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),s=this.add(t,e);return this.setRootGraph(s),this.rootGraph},n.prototype.add=function(t,e,s,a,p){if(s==null&&a==null&&p==null){if(t==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),t.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return t.parent=e,e.child=t,t}else{p=s,a=e,s=t;var o=a.getOwner(),i=p.getOwner();if(!(o!=null&&o.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(o==i)return s.isInterGraph=!1,o.add(s,a,p);if(s.isInterGraph=!0,s.source=a,s.target=p,this.edges.indexOf(s)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(s),!(s.source!=null&&s.target!=null))throw"Edge source and/or target is null!";if(!(s.source.edges.indexOf(s)==-1&&s.target.edges.indexOf(s)==-1))throw"Edge already in source and/or target incidency list!";return s.source.edges.push(s),s.target.edges.push(s),s}},n.prototype.remove=function(t){if(t instanceof f){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var s=[];s=s.concat(e.getEdges());for(var a,p=s.length,o=0;o<p;o++)a=s[o],e.remove(a);var i=[];i=i.concat(e.getNodes());var d;p=i.length;for(var o=0;o<p;o++)d=i[o],e.remove(d);e==this.rootGraph&&this.setRootGraph(null);var h=this.graphs.indexOf(e);this.graphs.splice(h,1),e.parent=null}else if(t instanceof r){if(a=t,a==null)throw"Edge is null!";if(!a.isInterGraph)throw"Not an inter-graph edge!";if(!(a.source!=null&&a.target!=null))throw"Source and/or target is null!";if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw"Source and/or target doesn't know this edge!";var h=a.source.edges.indexOf(a);if(a.source.edges.splice(h,1),h=a.target.edges.indexOf(a),a.target.edges.splice(h,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw"Not in owner graph manager's edge list!";var h=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(h,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var t=[],e=this.getGraphs(),s=e.length,a=0;a<s;a++)t=t.concat(e[a].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var t=[],e=this.getGraphs();e.length;for(var s=0;s<e.length;s++)t=t.concat(e[s].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,t.parent??(t.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,e){if(!(t!=null&&e!=null))throw"assert failed";if(t==e)return!0;var s=t.getOwner(),a;do{if(a=s.getParent(),a==null)break;if(a==e)return!0;if(s=a.getOwner(),s==null)break}while(!0);s=e.getOwner();do{if(a=s.getParent(),a==null)break;if(a==t)return!0;if(s=a.getOwner(),s==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,e,s,a,p,o=this.getAllEdges(),i=o.length,d=0;d<i;d++){if(t=o[d],e=t.source,s=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=s,e==s){t.lca=e.getOwner();continue}for(a=e.getOwner();t.lca==null;){for(t.targetInLca=s,p=s.getOwner();t.lca==null;){if(p==a){t.lca=p;break}if(p==this.rootGraph)break;if(t.lca!=null)throw"assert failed";t.targetInLca=p.getParent(),p=t.targetInLca.getOwner()}if(a==this.rootGraph)break;t.lca??(t.sourceInLca=a.getParent(),a=t.sourceInLca.getOwner())}if(t.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();var s=t.getOwner();do{if(s==null)break;var a=e.getOwner();do{if(a==null)break;if(a==s)return a;a=a.getParent().getOwner()}while(!0);s=s.getParent().getOwner()}while(!0);return s},n.prototype.calcInclusionTreeDepths=function(t,e){t==null&&e==null&&(t=this.rootGraph,e=1);for(var s,a=t.getNodes(),p=a.length,o=0;o<p;o++)s=a[o],s.inclusionTreeDepth=e,s.child!=null&&this.calcInclusionTreeDepths(s.child,e+1)},n.prototype.includesInvalidEdge=function(){for(var t,e=[],s=this.edges.length,a=0;a<s;a++)t=this.edges[a],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(var a=0;a<e.length;a++)this.remove(e[a]);return!1},C.exports=n}),(function(C,x,N){var f=N(12);function r(){}r.calcSeparationAmount=function(n,t,e,s){if(!n.intersects(t))throw"assert failed";var a=[,,];this.decideDirectionsForOverlappingNodes(n,t,a),e[0]=Math.min(n.getRight(),t.getRight())-Math.max(n.x,t.x),e[1]=Math.min(n.getBottom(),t.getBottom())-Math.max(n.y,t.y),n.getX()<=t.getX()&&n.getRight()>=t.getRight()?e[0]+=Math.min(t.getX()-n.getX(),n.getRight()-t.getRight()):t.getX()<=n.getX()&&t.getRight()>=n.getRight()&&(e[0]+=Math.min(n.getX()-t.getX(),t.getRight()-n.getRight())),n.getY()<=t.getY()&&n.getBottom()>=t.getBottom()?e[1]+=Math.min(t.getY()-n.getY(),n.getBottom()-t.getBottom()):t.getY()<=n.getY()&&t.getBottom()>=n.getBottom()&&(e[1]+=Math.min(n.getY()-t.getY(),t.getBottom()-n.getBottom()));var p=Math.abs((t.getCenterY()-n.getCenterY())/(t.getCenterX()-n.getCenterX()));t.getCenterY()===n.getCenterY()&&t.getCenterX()===n.getCenterX()&&(p=1);var o=p*e[0],i=e[1]/p;e[0]<i?i=e[0]:o=e[1],e[0]=-1*a[0]*(i/2+s),e[1]=-1*a[1]*(o/2+s)},r.decideDirectionsForOverlappingNodes=function(n,t,e){n.getCenterX()<t.getCenterX()?e[0]=-1:e[0]=1,n.getCenterY()<t.getCenterY()?e[1]=-1:e[1]=1},r.getIntersection2=function(n,t,e){var s=n.getCenterX(),a=n.getCenterY(),p=t.getCenterX(),o=t.getCenterY();if(n.intersects(t))return e[0]=s,e[1]=a,e[2]=p,e[3]=o,!0;var i=n.getX(),d=n.getY(),h=n.getRight(),c=n.getX(),g=n.getBottom(),v=n.getRight(),T=n.getWidthHalf(),L=n.getHeightHalf(),R=t.getX(),S=t.getY(),U=t.getRight(),q=t.getX(),Z=t.getBottom(),D=t.getRight(),Q=t.getWidthHalf(),l=t.getHeightHalf(),E=!1,u=!1;if(s===p){if(a>o)return e[0]=s,e[1]=d,e[2]=p,e[3]=Z,!1;if(a<o)return e[0]=s,e[1]=g,e[2]=p,e[3]=S,!1}else if(a===o){if(s>p)return e[0]=i,e[1]=a,e[2]=U,e[3]=o,!1;if(s<p)return e[0]=h,e[1]=a,e[2]=R,e[3]=o,!1}else{var y=n.height/n.width,m=t.height/t.width,A=(o-a)/(p-s),w=void 0,b=void 0,G=void 0,F=void 0,Y=void 0,V=void 0;if(-y===A?s>p?(e[0]=c,e[1]=g,E=!0):(e[0]=h,e[1]=d,E=!0):y===A&&(s>p?(e[0]=i,e[1]=d,E=!0):(e[0]=v,e[1]=g,E=!0)),-m===A?p>s?(e[2]=q,e[3]=Z,u=!0):(e[2]=U,e[3]=S,u=!0):m===A&&(p>s?(e[2]=R,e[3]=S,u=!0):(e[2]=D,e[3]=Z,u=!0)),E&&u)return!1;if(s>p?a>o?(w=this.getCardinalDirection(y,A,4),b=this.getCardinalDirection(m,A,2)):(w=this.getCardinalDirection(-y,A,3),b=this.getCardinalDirection(-m,A,1)):a>o?(w=this.getCardinalDirection(-y,A,1),b=this.getCardinalDirection(-m,A,3)):(w=this.getCardinalDirection(y,A,2),b=this.getCardinalDirection(m,A,4)),!E)switch(w){case 1:F=d,G=s+-L/A,e[0]=G,e[1]=F;break;case 2:G=v,F=a+T*A,e[0]=G,e[1]=F;break;case 3:F=g,G=s+L/A,e[0]=G,e[1]=F;break;case 4:G=c,F=a+-T*A,e[0]=G,e[1]=F;break}if(!u)switch(b){case 1:V=S,Y=p+-l/A,e[2]=Y,e[3]=V;break;case 2:Y=D,V=o+Q*A,e[2]=Y,e[3]=V;break;case 3:V=Z,Y=p+l/A,e[2]=Y,e[3]=V;break;case 4:Y=q,V=o+-Q*A,e[2]=Y,e[3]=V;break}}return!1},r.getCardinalDirection=function(n,t,e){return n>t?e:1+e%4},r.getIntersection=function(n,t,e,s){if(s==null)return this.getIntersection2(n,t,e);var a=n.x,p=n.y,o=t.x,i=t.y,d=e.x,h=e.y,c=s.x,g=s.y,v=void 0,T=void 0,L=void 0,R=void 0,S=void 0,U=void 0,q=void 0,Z=void 0,D=void 0;return L=i-p,S=a-o,q=o*p-a*i,R=g-h,U=d-c,Z=c*h-d*g,D=L*U-R*S,D===0?null:(v=(S*Z-U*q)/D,T=(R*q-L*Z)/D,new f(v,T))},r.angleOfVector=function(n,t,e,s){var a=void 0;return n===e?a=s<t?this.ONE_AND_HALF_PI:this.HALF_PI:(a=Math.atan((s-t)/(e-n)),e<n?a+=Math.PI:s<t&&(a+=this.TWO_PI)),a},r.doIntersect=function(n,t,e,s){var a=n.x,p=n.y,o=t.x,i=t.y,d=e.x,h=e.y,c=s.x,g=s.y,v=(o-a)*(g-h)-(c-d)*(i-p);if(v===0)return!1;var T=((g-h)*(c-a)+(d-c)*(g-p))/v,L=((p-i)*(c-a)+(o-a)*(g-p))/v;return 0<T&&T<1&&0<L&&L<1},r.findCircleLineIntersections=function(n,t,e,s,a,p,o){var i=(e-n)*(e-n)+(s-t)*(s-t),d=2*((n-a)*(e-n)+(t-p)*(s-t)),h=(n-a)*(n-a)+(t-p)*(t-p)-o*o;if(d*d-4*i*h>=0){var c=(-d+Math.sqrt(d*d-4*i*h))/(2*i),g=(-d-Math.sqrt(d*d-4*i*h))/(2*i);return c>=0&&c<=1?[c]:g>=0&&g<=1?[g]:null}else return null},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,C.exports=r}),(function(C,x,N){function f(){}f.sign=function(r){return r>0?1:r<0?-1:0},f.floor=function(r){return r<0?Math.ceil(r):Math.floor(r)},f.ceil=function(r){return r<0?Math.floor(r):Math.ceil(r)},C.exports=f}),(function(C,x,N){function f(){}f.MAX_VALUE=2147483647,f.MIN_VALUE=-2147483648,C.exports=f}),(function(C,x,N){var f=(function(){function s(a,p){for(var o=0;o<p.length;o++){var i=p[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,i.key,i)}}return function(a,p,o){return p&&s(a.prototype,p),o&&s(a,o),a}})();function r(s,a){if(!(s instanceof a))throw TypeError("Cannot call a class as a function")}var n=function(s){return{value:s,next:null,prev:null}},t=function(s,a,p,o){return s===null?o.head=a:s.next=a,p===null?o.tail=a:p.prev=a,a.prev=s,a.next=p,o.length++,a},e=function(s,a){var p=s.prev,o=s.next;return p===null?a.head=o:p.next=o,o===null?a.tail=p:o.prev=p,s.prev=s.next=null,a.length--,s};C.exports=(function(){function s(a){var p=this;r(this,s),this.length=0,this.head=null,this.tail=null,a==null||a.forEach(function(o){return p.push(o)})}return f(s,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(a,p){return t(p.prev,n(a),p,this)}},{key:"insertAfter",value:function(a,p){return t(p,n(a),p.next,this)}},{key:"insertNodeBefore",value:function(a,p){return t(p.prev,a,p,this)}},{key:"insertNodeAfter",value:function(a,p){return t(p,a,p.next,this)}},{key:"push",value:function(a){return t(this.tail,n(a),null,this)}},{key:"unshift",value:function(a){return t(null,n(a),this.head,this)}},{key:"remove",value:function(a){return e(a,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(a){if(a<=this.length()){for(var p=1,o=this.head;p<a;)o=o.next,p++;return o.value}}},{key:"set_object_at",value:function(a,p){if(a<=this.length()){for(var o=1,i=this.head;o<a;)i=i.next,o++;i.value=p}}}]),s})()}),(function(C,x,N){function f(r,n,t){this.x=null,this.y=null,r==null&&n==null&&t==null?(this.x=0,this.y=0):typeof r=="number"&&typeof n=="number"&&t==null?(this.x=r,this.y=n):r.constructor.name=="Point"&&n==null&&t==null&&(t=r,this.x=t.x,this.y=t.y)}f.prototype.getX=function(){return this.x},f.prototype.getY=function(){return this.y},f.prototype.getLocation=function(){return new f(this.x,this.y)},f.prototype.setLocation=function(r,n,t){r.constructor.name=="Point"&&n==null&&t==null?(t=r,this.setLocation(t.x,t.y)):typeof r=="number"&&typeof n=="number"&&t==null&&(parseInt(r)==r&&parseInt(n)==n?this.move(r,n):(this.x=Math.floor(r+.5),this.y=Math.floor(n+.5)))},f.prototype.move=function(r,n){this.x=r,this.y=n},f.prototype.translate=function(r,n){this.x+=r,this.y+=n},f.prototype.equals=function(r){if(r.constructor.name=="Point"){var n=r;return this.x==n.x&&this.y==n.y}return this==r},f.prototype.toString=function(){return new f().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=f}),(function(C,x,N){function f(r,n,t,e){this.x=0,this.y=0,this.width=0,this.height=0,r!=null&&n!=null&&t!=null&&e!=null&&(this.x=r,this.y=n,this.width=t,this.height=e)}f.prototype.getX=function(){return this.x},f.prototype.setX=function(r){this.x=r},f.prototype.getY=function(){return this.y},f.prototype.setY=function(r){this.y=r},f.prototype.getWidth=function(){return this.width},f.prototype.setWidth=function(r){this.width=r},f.prototype.getHeight=function(){return this.height},f.prototype.setHeight=function(r){this.height=r},f.prototype.getRight=function(){return this.x+this.width},f.prototype.getBottom=function(){return this.y+this.height},f.prototype.intersects=function(r){return!(this.getRight()<r.x||this.getBottom()<r.y||r.getRight()<this.x||r.getBottom()<this.y)},f.prototype.getCenterX=function(){return this.x+this.width/2},f.prototype.getMinX=function(){return this.getX()},f.prototype.getMaxX=function(){return this.getX()+this.width},f.prototype.getCenterY=function(){return this.y+this.height/2},f.prototype.getMinY=function(){return this.getY()},f.prototype.getMaxY=function(){return this.getY()+this.height},f.prototype.getWidthHalf=function(){return this.width/2},f.prototype.getHeightHalf=function(){return this.height/2},C.exports=f}),(function(C,x,N){var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function r(){}r.lastID=0,r.createID=function(n){return r.isPrimitive(n)?n:(n.uniqueID==null&&(n.uniqueID=r.getString(),r.lastID++),n.uniqueID)},r.getString=function(n){return n??(n=r.lastID),"Object#"+n},r.isPrimitive=function(n){var t=n===void 0?"undefined":f(n);return n==null||t!="object"&&t!="function"},C.exports=r}),(function(C,x,N){function f(d){if(Array.isArray(d)){for(var h=0,c=Array(d.length);h<d.length;h++)c[h]=d[h];return c}else return Array.from(d)}var r=N(0),n=N(7),t=N(3),e=N(1),s=N(6),a=N(5),p=N(17),o=N(29);function i(d){o.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,d!=null&&(this.isRemoteUse=d)}i.RANDOM_SEED=1,i.prototype=Object.create(o.prototype),i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},i.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},i.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},i.prototype.newGraphManager=function(){var d=new n(this);return this.graphManager=d,d},i.prototype.newGraph=function(d){return new s(null,this.graphManager,d)},i.prototype.newNode=function(d){return new t(this.graphManager,d)},i.prototype.newEdge=function(d){return new e(null,null,d)},i.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},i.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var d=this.checkLayoutSuccess()?!1:this.layout();return r.ANIMATE==="during"?!1:(d&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,d)},i.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},i.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var d=this.graphManager.getAllEdges(),h=0;h<d.length;h++)d[h];for(var c=this.graphManager.getRoot().getNodes(),h=0;h<c.length;h++)c[h];this.update(this.graphManager.getRoot())}},i.prototype.update=function(d){if(d==null)this.update2();else if(d instanceof t){var h=d;if(h.getChild()!=null)for(var c=h.getChild().getNodes(),g=0;g<c.length;g++)update(c[g]);h.vGraphObject!=null&&h.vGraphObject.update(h)}else if(d instanceof e){var v=d;v.vGraphObject!=null&&v.vGraphObject.update(v)}else if(d instanceof s){var T=d;T.vGraphObject!=null&&T.vGraphObject.update(T)}},i.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},i.prototype.transform=function(d){if(d==null)this.transform(new a(0,0));else{var h=new p,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){h.setWorldOrgX(d.x),h.setWorldOrgY(d.y),h.setDeviceOrgX(c.x),h.setDeviceOrgY(c.y);for(var g=this.getAllNodes(),v,T=0;T<g.length;T++)v=g[T],v.transform(h)}}},i.prototype.positionNodesRandomly=function(d){if(d==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var h,c,g=d.getNodes(),v=0;v<g.length;v++)h=g[v],c=h.getChild(),c==null||c.getNodes().length==0?h.scatter():(this.positionNodesRandomly(c),h.updateBounds())},i.prototype.getFlatForest=function(){for(var d=[],h=!0,c=this.graphManager.getRoot().getNodes(),g=!0,v=0;v<c.length;v++)c[v].getChild()!=null&&(g=!1);if(!g)return d;var T=new Set,L=[],R=new Map,S=[];for(S=S.concat(c);S.length>0&&h;){for(L.push(S[0]);L.length>0&&h;){var U=L[0];L.splice(0,1),T.add(U);for(var q=U.getEdges(),v=0;v<q.length;v++){var Z=q[v].getOtherEnd(U);if(R.get(U)!=Z)if(!T.has(Z))L.push(Z),R.set(Z,U);else{h=!1;break}}}if(!h)d=[];else{var D=[].concat(f(T));d.push(D);for(var v=0;v<D.length;v++){var Q=D[v],l=S.indexOf(Q);l>-1&&S.splice(l,1)}T=new Set,R=new Map}}return d},i.prototype.createDummyNodesForBendpoints=function(d){for(var h=[],c=d.source,g=this.graphManager.calcLowestCommonAncestor(d.source,d.target),v=0;v<d.bendpoints.length;v++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),g.add(T);var L=this.newEdge(null);this.graphManager.add(L,c,T),h.add(T),c=T}var L=this.newEdge(null);return this.graphManager.add(L,c,d.target),this.edgeToDummyNodes.set(d,h),d.isInterGraph()?this.graphManager.remove(d):g.remove(d),h},i.prototype.createBendpointsFromDummyNodes=function(){var d=[];d=d.concat(this.graphManager.getAllEdges()),d=[].concat(f(this.edgeToDummyNodes.keys()),d);for(var h=0;h<d.length;h++){var c=d[h];if(c.bendpoints.length>0){for(var g=this.edgeToDummyNodes.get(c),v=0;v<g.length;v++){var T=g[v],L=new a(T.getCenterX(),T.getCenterY()),R=c.bendpoints.get(v);R.x=L.x,R.y=L.y,T.getOwner().remove(T)}this.graphManager.add(c,c.source,c.target)}}},i.transform=function(d,h,c,g){if(c!=null&&g!=null){var v=h;if(d<=50){var T=h/c;v-=(h-T)/50*(50-d)}else{var L=h*g;v+=(L-h)/50*(d-50)}return v}else{var R,S;return d<=50?(R=9*h/500,S=h/10):(R=9*h/50,S=-8*h),R*d+S}},i.findCenterOfTree=function(d){var h=[];h=h.concat(d);var c=[],g=new Map,v=!1,T=null;(h.length==1||h.length==2)&&(v=!0,T=h[0]);for(var L=0;L<h.length;L++){var R=h[L],S=R.getNeighborsList().size;g.set(R,R.getNeighborsList().size),S==1&&c.push(R)}var U=[];for(U=U.concat(c);!v;){var q=[];q=q.concat(U),U=[];for(var L=0;L<h.length;L++){var R=h[L],Z=h.indexOf(R);Z>=0&&h.splice(Z,1),R.getNeighborsList().forEach(function(l){if(c.indexOf(l)<0){var E=g.get(l)-1;E==1&&U.push(l),g.set(l,E)}})}c=c.concat(U),(h.length==1||h.length==2)&&(v=!0,T=h[0])}return T},i.prototype.setGraphManager=function(d){this.graphManager=d},C.exports=i}),(function(C,x,N){function f(){}f.seed=1,f.x=0,f.nextDouble=function(){return f.x=Math.sin(f.seed++)*1e4,f.x-Math.floor(f.x)},C.exports=f}),(function(C,x,N){var f=N(5);function r(n,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(n){this.lworldExtX=n},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(n){this.lworldExtY=n},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},r.prototype.transformX=function(n){var t=0,e=this.lworldExtX;return e!=0&&(t=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/e),t},r.prototype.transformY=function(n){var t=0,e=this.lworldExtY;return e!=0&&(t=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/e),t},r.prototype.inverseTransformX=function(n){var t=0,e=this.ldeviceExtX;return e!=0&&(t=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/e),t},r.prototype.inverseTransformY=function(n){var t=0,e=this.ldeviceExtY;return e!=0&&(t=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/e),t},r.prototype.inverseTransformPoint=function(n){return new f(this.inverseTransformX(n.x),this.inverseTransformY(n.y))},C.exports=r}),(function(C,x,N){function f(o){if(Array.isArray(o)){for(var i=0,d=Array(o.length);i<o.length;i++)d[i]=o[i];return d}else return Array.from(o)}var r=N(15),n=N(4),t=N(0),e=N(8),s=N(9);function a(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var p in a.prototype=Object.create(r.prototype),r)a[p]=r[p];a.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var o,i,d,h,c,g,v,T=this.getGraphManager().getAllEdges(),L=0;L<T.length;L++)o=T[L],i=o.idealLength,o.isInterGraph&&(h=o.getSource(),c=o.getTarget(),g=o.getSourceInLca().getEstimatedSize(),v=o.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(o.idealLength+=g+v-2*t.SIMPLE_NODE_SIZE),d=o.getLca().getInclusionTreeDepth(),o.idealLength+=i*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(h.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*d))},a.prototype.initSpringEmbedder=function(){var o=this.getAllNodes().length;this.incremental?(o>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(o-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(o>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(o-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var o=this.getAllEdges(),i,d=0;d<o.length;d++)i=o[d],this.calcSpringForce(i,i.idealLength)},a.prototype.calcRepulsionForces=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d,h,c,g,v=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),T=new Set,d=0;d<v.length;d++)c=v[d],this.calculateRepulsionForceOfANode(c,T,o,i),T.add(c);else for(d=0;d<v.length;d++)for(c=v[d],h=d+1;h<v.length;h++)g=v[h],c.getOwner()==g.getOwner()&&this.calcRepulsionForce(c,g)},a.prototype.calcGravitationalForces=function(){for(var o,i=this.getAllNodesToApplyGravitation(),d=0;d<i.length;d++)o=i[d],this.calcGravitationalForce(o)},a.prototype.moveNodes=function(){for(var o=this.getAllNodes(),i,d=0;d<o.length;d++)i=o[d],i.move()},a.prototype.calcSpringForce=function(o,i){var d=o.getSource(),h=o.getTarget(),c,g,v,T;if(this.uniformLeafNodeSizes&&d.getChild()==null&&h.getChild()==null)o.updateLengthSimple();else if(o.updateLength(),o.isOverlapingSourceAndTarget)return;c=o.getLength(),c!=0&&(g=o.edgeElasticity*(c-i),v=g*(o.lengthX/c),T=g*(o.lengthY/c),d.springForceX+=v,d.springForceY+=T,h.springForceX-=v,h.springForceY-=T)},a.prototype.calcRepulsionForce=function(o,i){var d=o.getRect(),h=i.getRect(),c=[,,],g=[,,,,],v,T,L,R,S,U,q;if(d.intersects(h)){e.calcSeparationAmount(d,h,c,n.DEFAULT_EDGE_LENGTH/2),U=2*c[0],q=2*c[1];var Z=o.noOfChildren*i.noOfChildren/(o.noOfChildren+i.noOfChildren);o.repulsionForceX-=Z*U,o.repulsionForceY-=Z*q,i.repulsionForceX+=Z*U,i.repulsionForceY+=Z*q}else this.uniformLeafNodeSizes&&o.getChild()==null&&i.getChild()==null?(v=h.getCenterX()-d.getCenterX(),T=h.getCenterY()-d.getCenterY()):(e.getIntersection(d,h,g),v=g[2]-g[0],T=g[3]-g[1]),Math.abs(v)<n.MIN_REPULSION_DIST&&(v=s.sign(v)*n.MIN_REPULSION_DIST),Math.abs(T)<n.MIN_REPULSION_DIST&&(T=s.sign(T)*n.MIN_REPULSION_DIST),L=v*v+T*T,R=Math.sqrt(L),S=(o.nodeRepulsion/2+i.nodeRepulsion/2)*o.noOfChildren*i.noOfChildren/L,U=S*v/R,q=S*T/R,o.repulsionForceX-=U,o.repulsionForceY-=q,i.repulsionForceX+=U,i.repulsionForceY+=q},a.prototype.calcGravitationalForce=function(o){var i=o.getOwner(),d=(i.getRight()+i.getLeft())/2,h=(i.getTop()+i.getBottom())/2,c=o.getCenterX()-d,g=o.getCenterY()-h,v=Math.abs(c)+o.getWidth()/2,T=Math.abs(g)+o.getHeight()/2,L;o.getOwner()==this.graphManager.getRoot()?(L=i.getEstimatedSize()*this.gravityRangeFactor,(v>L||T>L)&&(o.gravitationForceX=-this.gravityConstant*c,o.gravitationForceY=-this.gravityConstant*g)):(L=i.getEstimatedSize()*this.compoundGravityRangeFactor,(v>L||T>L)&&(o.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,o.gravitationForceY=-this.gravityConstant*g*this.compoundGravityConstant))},a.prototype.isConverged=function(){var o,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),o=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,o||i},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var o,i=this.graphManager.getAllNodes(),d=0;d<i.length;d++)o=i[d],o.noOfChildren=o.getNoOfChildren()},a.prototype.calcGrid=function(o){var i=0,d=0;i=parseInt(Math.ceil((o.getRight()-o.getLeft())/this.repulsionRange)),d=parseInt(Math.ceil((o.getBottom()-o.getTop())/this.repulsionRange));for(var h=Array(i),c=0;c<i;c++)h[c]=Array(d);for(var c=0;c<i;c++)for(var g=0;g<d;g++)h[c][g]=[];return h},a.prototype.addNodeToGrid=function(o,i,d){var h=0,c=0,g=0,v=0;h=parseInt(Math.floor((o.getRect().x-i)/this.repulsionRange)),c=parseInt(Math.floor((o.getRect().width+o.getRect().x-i)/this.repulsionRange)),g=parseInt(Math.floor((o.getRect().y-d)/this.repulsionRange)),v=parseInt(Math.floor((o.getRect().height+o.getRect().y-d)/this.repulsionRange));for(var T=h;T<=c;T++)for(var L=g;L<=v;L++)this.grid[T][L].push(o),o.setGridCoordinates(h,c,g,v)},a.prototype.updateGrid=function(){var o,i,d=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),o=0;o<d.length;o++)i=d[o],this.addNodeToGrid(i,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(o,i,d,h){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&d||h){var c=new Set;o.surrounding=[];for(var g,v=this.grid,T=o.startX-1;T<o.finishX+2;T++)for(var L=o.startY-1;L<o.finishY+2;L++)if(!(T<0||L<0||T>=v.length||L>=v[0].length)){for(var R=0;R<v[T][L].length;R++)if(g=v[T][L][R],!(o.getOwner()!=g.getOwner()||o==g)&&!i.has(g)&&!c.has(g)){var S=Math.abs(o.getCenterX()-g.getCenterX())-(o.getWidth()/2+g.getWidth()/2),U=Math.abs(o.getCenterY()-g.getCenterY())-(o.getHeight()/2+g.getHeight()/2);S<=this.repulsionRange&&U<=this.repulsionRange&&c.add(g)}}o.surrounding=[].concat(f(c))}for(T=0;T<o.surrounding.length;T++)this.calcRepulsionForce(o,o.surrounding[T])},a.prototype.calcRepulsionRange=function(){return 0},C.exports=a}),(function(C,x,N){var f=N(1),r=N(4);function n(e,s,a){f.call(this,e,s,a),this.idealLength=r.DEFAULT_EDGE_LENGTH,this.edgeElasticity=r.DEFAULT_SPRING_STRENGTH}for(var t in n.prototype=Object.create(f.prototype),f)n[t]=f[t];C.exports=n}),(function(C,x,N){var f=N(3),r=N(4);function n(e,s,a,p){f.call(this,e,s,a,p),this.nodeRepulsion=r.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var t in n.prototype=Object.create(f.prototype),f)n[t]=f[t];n.prototype.setGridCoordinates=function(e,s,a,p){this.startX=e,this.finishX=s,this.startY=a,this.finishY=p},C.exports=n}),(function(C,x,N){function f(r,n){this.width=0,this.height=0,r!==null&&n!==null&&(this.height=n,this.width=r)}f.prototype.getWidth=function(){return this.width},f.prototype.setWidth=function(r){this.width=r},f.prototype.getHeight=function(){return this.height},f.prototype.setHeight=function(r){this.height=r},C.exports=f}),(function(C,x,N){var f=N(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(n,t){var e=f.createID(n);this.contains(e)||(this.map[e]=t,this.keys.push(n))},r.prototype.contains=function(n){return f.createID(n),this.map[n]!=null},r.prototype.get=function(n){var t=f.createID(n);return this.map[t]},r.prototype.keySet=function(){return this.keys},C.exports=r}),(function(C,x,N){var f=N(14);function r(){this.set={}}r.prototype.add=function(n){var t=f.createID(n);this.contains(t)||(this.set[t]=n)},r.prototype.remove=function(n){delete this.set[f.createID(n)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(n){return this.set[f.createID(n)]==n},r.prototype.isEmpty=function(){return this.size()===0},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(n){for(var t=Object.keys(this.set),e=t.length,s=0;s<e;s++)n.push(this.set[t[s]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(n){for(var t=n.length,e=0;e<t;e++){var s=n[e];this.add(s)}},C.exports=r}),(function(C,x,N){function f(){}f.multMat=function(r,n){for(var t=[],e=0;e<r.length;e++){t[e]=[];for(var s=0;s<n[0].length;s++){t[e][s]=0;for(var a=0;a<r[0].length;a++)t[e][s]+=r[e][a]*n[a][s]}}return t},f.transpose=function(r){for(var n=[],t=0;t<r[0].length;t++){n[t]=[];for(var e=0;e<r.length;e++)n[t][e]=r[e][t]}return n},f.multCons=function(r,n){for(var t=[],e=0;e<r.length;e++)t[e]=r[e]*n;return t},f.minusOp=function(r,n){for(var t=[],e=0;e<r.length;e++)t[e]=r[e]-n[e];return t},f.dotProduct=function(r,n){for(var t=0,e=0;e<r.length;e++)t+=r[e]*n[e];return t},f.mag=function(r){return Math.sqrt(this.dotProduct(r,r))},f.normalize=function(r){for(var n=[],t=this.mag(r),e=0;e<r.length;e++)n[e]=r[e]/t;return n},f.multGamma=function(r){for(var n=[],t=0,e=0;e<r.length;e++)t+=r[e];t*=-1/r.length;for(var s=0;s<r.length;s++)n[s]=t+r[s];return n},f.multL=function(r,n,t){for(var e=[],s=[],a=[],p=0;p<n[0].length;p++){for(var o=0,i=0;i<n.length;i++)o+=-.5*n[i][p]*r[i];s[p]=o}for(var d=0;d<t.length;d++){for(var h=0,c=0;c<t.length;c++)h+=t[d][c]*s[c];a[d]=h}for(var g=0;g<n.length;g++){for(var v=0,T=0;T<n[0].length;T++)v+=n[g][T]*a[T];e[g]=v}return e},C.exports=f}),(function(C,x,N){var f=(function(){function t(e,s){for(var a=0;a<s.length;a++){var p=s[a];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(e,p.key,p)}}return function(e,s,a){return s&&t(e.prototype,s),a&&t(e,a),e}})();function r(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}var n=N(11);C.exports=(function(){function t(e,s){r(this,t),(s!==null||s!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var a=void 0;a=e instanceof n?e.size():e.length,this._quicksort(e,0,a-1)}return f(t,[{key:"_quicksort",value:function(e,s,a){if(s<a){var p=this._partition(e,s,a);this._quicksort(e,s,p),this._quicksort(e,p+1,a)}}},{key:"_partition",value:function(e,s,a){for(var p=this._get(e,s),o=s,i=a;;){for(;this.compareFunction(p,this._get(e,i));)i--;for(;this.compareFunction(this._get(e,o),p);)o++;if(o<i)this._swap(e,o,i),o++,i--;else return i}}},{key:"_get",value:function(e,s){return e instanceof n?e.get_object_at(s):e[s]}},{key:"_set",value:function(e,s,a){e instanceof n?e.set_object_at(s,a):e[s]=a}},{key:"_swap",value:function(e,s,a){var p=this._get(e,s);this._set(e,s,this._get(e,a)),this._set(e,a,p)}},{key:"_defaultCompareFunction",value:function(e,s){return s>e}}]),t})()}),(function(C,x,N){function f(){}f.svd=function(r){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=r.length,this.n=r[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){return(function Nt(xt){if(xt.length==0)return 0;for(var Pt=[],Xt=0;Xt<xt[0];Xt++)Pt.push(Nt(xt.slice(1)));return Pt})(Tt)})([this.m,n]),this.V=(function(Tt){return(function Nt(xt){if(xt.length==0)return 0;for(var Pt=[],Xt=0;Xt<xt[0];Xt++)Pt.push(Nt(xt.slice(1)));return Pt})(Tt)})([this.n,this.n]);for(var t=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(this.n),e=(function(Tt){for(var Nt=[];Tt-- >0;)Nt.push(0);return Nt})(this.m),s=!0,a=!0,p=Math.min(this.m-1,this.n),o=Math.max(0,Math.min(this.n-2,this.m)),i=0;i<Math.max(p,o);i++){if(i<p){this.s[i]=0;for(var d=i;d<this.m;d++)this.s[i]=f.hypot(this.s[i],r[d][i]);if(this.s[i]!==0){r[i][i]<0&&(this.s[i]=-this.s[i]);for(var h=i;h<this.m;h++)r[h][i]/=this.s[i];r[i][i]+=1}this.s[i]=-this.s[i]}for(var c=i+1;c<this.n;c++){if((function(Tt,Nt){return Tt&&Nt})(i<p,this.s[i]!==0)){for(var g=0,v=i;v<this.m;v++)g+=r[v][i]*r[v][c];g=-g/r[i][i];for(var T=i;T<this.m;T++)r[T][c]+=g*r[T][i]}t[c]=r[i][c]}if((function(Tt,Nt){return Tt&&Nt})(s,i<p))for(var L=i;L<this.m;L++)this.U[L][i]=r[L][i];if(i<o){t[i]=0;for(var R=i+1;R<this.n;R++)t[i]=f.hypot(t[i],t[R]);if(t[i]!==0){t[i+1]<0&&(t[i]=-t[i]);for(var S=i+1;S<this.n;S++)t[S]/=t[i];t[i+1]+=1}if(t[i]=-t[i],(function(Tt,Nt){return Tt&&Nt})(i+1<this.m,t[i]!==0)){for(var U=i+1;U<this.m;U++)e[U]=0;for(var q=i+1;q<this.n;q++)for(var Z=i+1;Z<this.m;Z++)e[Z]+=t[q]*r[Z][q];for(var D=i+1;D<this.n;D++)for(var Q=-t[D]/t[i+1],l=i+1;l<this.m;l++)r[l][D]+=Q*e[l]}if(a)for(var E=i+1;E<this.n;E++)this.V[E][i]=t[E]}}var u=Math.min(this.n,this.m+1);if(p<this.n&&(this.s[p]=r[p][p]),this.m<u&&(this.s[u-1]=0),o+1<u&&(t[o]=r[o][u-1]),t[u-1]=0,s){for(var y=p;y<n;y++){for(var m=0;m<this.m;m++)this.U[m][y]=0;this.U[y][y]=1}for(var A=p-1;A>=0;A--)if(this.s[A]!==0){for(var w=A+1;w<n;w++){for(var b=0,G=A;G<this.m;G++)b+=this.U[G][A]*this.U[G][w];b=-b/this.U[A][A];for(var F=A;F<this.m;F++)this.U[F][w]+=b*this.U[F][A]}for(var Y=A;Y<this.m;Y++)this.U[Y][A]=-this.U[Y][A];this.U[A][A]=1+this.U[A][A];for(var V=0;V<A-1;V++)this.U[V][A]=0}else{for(var J=0;J<this.m;J++)this.U[J][A]=0;this.U[A][A]=1}}if(a)for(var k=this.n-1;k>=0;k--){if((function(Tt,Nt){return Tt&&Nt})(k<o,t[k]!==0))for(var X=k+1;X<n;X++){for(var O=0,z=k+1;z<this.n;z++)O+=this.V[z][k]*this.V[z][X];O=-O/this.V[k+1][k];for(var et=k+1;et<this.n;et++)this.V[et][X]+=O*this.V[et][k]}for(var H=0;H<this.n;H++)this.V[H][k]=0;this.V[k][k]=1}for(var B=u-1,lt=0,at=2**-52,Lt=2**-966;u>0;){var W=void 0,pt=void 0;for(W=u-2;W>=-1&&W!==-1;W--)if(Math.abs(t[W])<=Lt+at*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){t[W]=0;break}if(W===u-2)pt=4;else{var vt=void 0;for(vt=u-1;vt>=W&&vt!==W;vt--){var Bt=(vt===u?0:Math.abs(t[vt]))+(vt===W+1?0:Math.abs(t[vt-1]));if(Math.abs(this.s[vt])<=Lt+at*Bt){this.s[vt]=0;break}}vt===W?pt=3:vt===u-1?pt=1:(pt=2,W=vt)}switch(W++,pt){case 1:var Ut=t[u-2];t[u-2]=0;for(var It=u-2;It>=W;It--){var Mt=f.hypot(this.s[It],Ut),Yt=this.s[It]/Mt,Ht=Ut/Mt;if(this.s[It]=Mt,It!==W&&(Ut=-Ht*t[It-1],t[It-1]=Yt*t[It-1]),a)for(var Rt=0;Rt<this.n;Rt++)Mt=Yt*this.V[Rt][It]+Ht*this.V[Rt][u-1],this.V[Rt][u-1]=-Ht*this.V[Rt][It]+Yt*this.V[Rt][u-1],this.V[Rt][It]=Mt}break;case 2:var Vt=t[W-1];t[W-1]=0;for(var Gt=W;Gt<u;Gt++){var st=f.hypot(this.s[Gt],Vt),ot=this.s[Gt]/st,ct=Vt/st;if(this.s[Gt]=st,Vt=-ct*t[Gt],t[Gt]=ot*t[Gt],s)for(var _=0;_<this.m;_++)st=ot*this.U[_][Gt]+ct*this.U[_][W-1],this.U[_][W-1]=-ct*this.U[_][Gt]+ot*this.U[_][W-1],this.U[_][Gt]=st}break;case 3:var P=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[u-1]),Math.abs(this.s[u-2])),Math.abs(t[u-2])),Math.abs(this.s[W])),Math.abs(t[W])),$=this.s[u-1]/P,j=this.s[u-2]/P,tt=t[u-2]/P,Et=this.s[W]/P,yt=t[W]/P,it=((j+$)*(j-$)+tt*tt)/2,ft=$*tt*($*tt),_t=0;(function(Tt,Nt){return Tt||Nt})(it!==0,ft!==0)&&(_t=Math.sqrt(it*it+ft),it<0&&(_t=-_t),_t=ft/(it+_t));for(var wt=(Et+$)*(Et-$)+_t,mt=Et*yt,ht=W;ht<u-1;ht++){var dt=f.hypot(wt,mt),K=wt/dt,ut=mt/dt;if(ht!==W&&(t[ht-1]=dt),wt=K*this.s[ht]+ut*t[ht],t[ht]=K*t[ht]-ut*this.s[ht],mt=ut*this.s[ht+1],this.s[ht+1]=K*this.s[ht+1],a)for(var At=0;At<this.n;At++)dt=K*this.V[At][ht]+ut*this.V[At][ht+1],this.V[At][ht+1]=-ut*this.V[At][ht]+K*this.V[At][ht+1],this.V[At][ht]=dt;if(dt=f.hypot(wt,mt),K=wt/dt,ut=mt/dt,this.s[ht]=dt,wt=K*t[ht]+ut*this.s[ht+1],this.s[ht+1]=-ut*t[ht]+K*this.s[ht+1],mt=ut*t[ht+1],t[ht+1]=K*t[ht+1],s&&ht<this.m-1)for(var rt=0;rt<this.m;rt++)dt=K*this.U[rt][ht]+ut*this.U[rt][ht+1],this.U[rt][ht+1]=-ut*this.U[rt][ht]+K*this.U[rt][ht+1],this.U[rt][ht]=dt}t[u-2]=wt,lt+=1;break;case 4:if(this.s[W]<=0&&(this.s[W]=this.s[W]<0?-this.s[W]:0,a))for(var bt=0;bt<=B;bt++)this.V[bt][W]=-this.V[bt][W];for(;W<B&&!(this.s[W]>=this.s[W+1]);){var Ot=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=Ot,a&&W<this.n-1)for(var Dt=0;Dt<this.n;Dt++)Ot=this.V[Dt][W+1],this.V[Dt][W+1]=this.V[Dt][W],this.V[Dt][W]=Ot;if(s&&W<this.m-1)for(var Ft=0;Ft<this.m;Ft++)Ot=this.U[Ft][W+1],this.U[Ft][W+1]=this.U[Ft][W],this.U[Ft][W]=Ot;W++}lt=0,u--;break}}return{U:this.U,V:this.V,S:this.s}},f.hypot=function(r,n){var t=void 0;return Math.abs(r)>Math.abs(n)?(t=n/r,t=Math.abs(r)*Math.sqrt(1+t*t)):n==0?t=0:(t=r/n,t=Math.abs(n)*Math.sqrt(1+t*t)),t},C.exports=f}),(function(C,x,N){var f=(function(){function n(t,e){for(var s=0;s<e.length;s++){var a=e[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,e,s){return e&&n(t.prototype,e),s&&n(t,s),t}})();function r(n,t){if(!(n instanceof t))throw TypeError("Cannot call a class as a function")}C.exports=(function(){function n(t,e){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;r(this,n),this.sequence1=t,this.sequence2=e,this.match_score=s,this.mismatch_penalty=a,this.gap_penalty=p,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=Array(this.jMax);for(var i=0;i<this.jMax;i++)this.grid[o][i]=0}this.tracebackGrid=Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=Array(this.jMax);for(var h=0;h<this.jMax;h++)this.tracebackGrid[d][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return f(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var s=1;s<this.iMax;s++)for(var a=1;a<this.jMax;a++){var p=void 0;p=this.sequence1[s-1]===this.sequence2[a-1]?this.grid[s-1][a-1]+this.match_score:this.grid[s-1][a-1]+this.mismatch_penalty;var o=this.grid[s-1][a]+this.gap_penalty,i=this.grid[s][a-1]+this.gap_penalty,d=[p,o,i],h=this.arrayAllMaxIndexes(d);this.grid[s][a]=d[h[0]],this.tracebackGrid[s][a]=[h.includes(0),h.includes(1),h.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],s=this.tracebackGrid[e.pos[0]][e.pos[1]];s[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),s[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),s[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var s=[],a=-1;(a=t.indexOf(e,a+1))!==-1;)s.push(a);return s}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),n})()}),(function(C,x,N){var f=function(){};f.FDLayout=N(18),f.FDLayoutConstants=N(4),f.FDLayoutEdge=N(19),f.FDLayoutNode=N(20),f.DimensionD=N(21),f.HashMap=N(22),f.HashSet=N(23),f.IGeometry=N(8),f.IMath=N(9),f.Integer=N(10),f.Point=N(12),f.PointD=N(5),f.RandomSeed=N(16),f.RectangleD=N(13),f.Transform=N(17),f.UniqueIDGeneretor=N(14),f.Quicksort=N(25),f.LinkedList=N(11),f.LGraphObject=N(2),f.LGraph=N(6),f.LEdge=N(1),f.LGraphManager=N(7),f.LNode=N(3),f.Layout=N(15),f.LayoutConstants=N(0),f.NeedlemanWunsch=N(27),f.Matrix=N(24),f.SVD=N(26),C.exports=f}),(function(C,x,N){function f(){this.listeners=[]}var r=f.prototype;r.addListener=function(n,t){this.listeners.push({event:n,callback:t})},r.removeListener=function(n,t){for(var e=this.listeners.length;e>=0;e--){var s=this.listeners[e];s.event===n&&s.callback===t&&this.listeners.splice(e,1)}},r.emit=function(n,t){for(var e=0;e<this.listeners.length;e++){var s=this.listeners[e];n===s.event&&s.callback(t)}},C.exports=f})])})})),we=de(((I,M)=>{(function(C,x){typeof I=="object"&&typeof M=="object"?M.exports=x(Le()):typeof define=="function"&&define.amd?define(["layout-base"],x):typeof I=="object"?I.coseBase=x(Le()):C.coseBase=x(C.layoutBase)})(I,function(C){return(()=>{var x={45:((r,n,t)=>{var e={};e.layoutBase=t(551),e.CoSEConstants=t(806),e.CoSEEdge=t(767),e.CoSEGraph=t(880),e.CoSEGraphManager=t(578),e.CoSELayout=t(765),e.CoSENode=t(991),e.ConstraintHandler=t(902),r.exports=e}),806:((r,n,t)=>{var e=t(551).FDLayoutConstants;function s(){}for(var a in e)s[a]=e[a];s.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,s.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,s.DEFAULT_COMPONENT_SEPERATION=60,s.TILE=!0,s.TILING_PADDING_VERTICAL=10,s.TILING_PADDING_HORIZONTAL=10,s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0,s.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,s.TREE_REDUCTION_ON_INCREMENTAL=!0,s.PURE_INCREMENTAL=s.DEFAULT_INCREMENTAL,r.exports=s}),767:((r,n,t)=>{var e=t(551).FDLayoutEdge;function s(p,o,i){e.call(this,p,o,i)}for(var a in s.prototype=Object.create(e.prototype),e)s[a]=e[a];r.exports=s}),880:((r,n,t)=>{var e=t(551).LGraph;function s(p,o,i){e.call(this,p,o,i)}for(var a in s.prototype=Object.create(e.prototype),e)s[a]=e[a];r.exports=s}),578:((r,n,t)=>{var e=t(551).LGraphManager;function s(p){e.call(this,p)}for(var a in s.prototype=Object.create(e.prototype),e)s[a]=e[a];r.exports=s}),765:((r,n,t)=>{var e=t(551).FDLayout,s=t(578),a=t(880),p=t(991),o=t(767),i=t(806),d=t(902),h=t(551).FDLayoutConstants,c=t(551).LayoutConstants,g=t(551).Point,v=t(551).PointD,T=t(551).DimensionD,L=t(551).Layout,R=t(551).Integer,S=t(551).IGeometry,U=t(551).LGraph,q=t(551).Transform,Z=t(551).LinkedList;function D(){e.call(this),this.toBeTiled={},this.constraints={}}for(var Q in D.prototype=Object.create(e.prototype),e)D[Q]=e[Q];D.prototype.newGraphManager=function(){var l=new s(this);return this.graphManager=l,l},D.prototype.newGraph=function(l){return new a(null,this.graphManager,l)},D.prototype.newNode=function(l){return new p(this.graphManager,l)},D.prototype.newEdge=function(l){return new o(null,null,l)},D.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(i.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){e.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(i.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var l=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return l.has(y)});this.graphManager.setAllNodesToApplyGravitation(E)}}else{var u=this.getFlatForest();if(u.length>0)this.positionNodesRadially(u);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var l=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(A){return l.has(A)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(d.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),i.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-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 l=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(m){return l.has(m)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),i.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),i.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var l=this.graphManager.getAllNodes(),E={},u=0;u<l.length;u++){var y=l[u].rect,m=l[u].id;E[m]={id:m,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return E},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var l=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!l;)l=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var l=this.getAllNodes(),E,u=0;u<l.length;u++)E=l[u],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var u=0;u<l.length;u++)E=l[u],E.move()},D.prototype.initConstraintVariables=function(){var l=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),u=0;u<E.length;u++){var y=E[u];this.idToNodeMap.set(y.id,y)}var m=function O(z){for(var et=z.getChild().getNodes(),H,B=0,lt=0;lt<et.length;lt++)H=et[lt],H.getChild()==null?l.fixedNodeSet.has(H.id)&&(B+=100):B+=O(H);return B};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(O){l.fixedNodeSet.add(O.nodeId)});for(var E=this.graphManager.getAllNodes(),y,u=0;u<E.length;u++)if(y=E[u],y.getChild()!=null){var A=m(y);A>0&&(y.fixedNodeWeight=A)}}if(this.constraints.relativePlacementConstraint){var w=new Map,b=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){l.fixedNodesOnHorizontal.add(O),l.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(z){w.set(z,"dummy"+u),l.dummyToNodeForVerticalAlignment.get("dummy"+u).push(z),l.fixedNodeSet.has(z)&&l.fixedNodesOnHorizontal.add("dummy"+u)});if(this.constraints.alignmentConstraint.horizontal)for(var F=this.constraints.alignmentConstraint.horizontal,u=0;u<F.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),F[u].forEach(function(z){b.set(z,"dummy"+u),l.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(z),l.fixedNodeSet.has(z)&&l.fixedNodesOnVertical.add("dummy"+u)})}if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var z,et,H;for(H=O.length-1;H>=2*O.length/3;H--)z=Math.floor(Math.random()*(H+1)),et=O[H],O[H]=O[z],O[z]=et;return O},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(O){if(O.left){var z=w.has(O.left)?w.get(O.left):O.left,et=w.has(O.right)?w.get(O.right):O.right;l.nodesInRelativeHorizontal.includes(z)||(l.nodesInRelativeHorizontal.push(z),l.nodeToRelativeConstraintMapHorizontal.set(z,[]),l.dummyToNodeForVerticalAlignment.has(z)?l.nodeToTempPositionMapHorizontal.set(z,l.idToNodeMap.get(l.dummyToNodeForVerticalAlignment.get(z)[0]).getCenterX()):l.nodeToTempPositionMapHorizontal.set(z,l.idToNodeMap.get(z).getCenterX())),l.nodesInRelativeHorizontal.includes(et)||(l.nodesInRelativeHorizontal.push(et),l.nodeToRelativeConstraintMapHorizontal.set(et,[]),l.dummyToNodeForVerticalAlignment.has(et)?l.nodeToTempPositionMapHorizontal.set(et,l.idToNodeMap.get(l.dummyToNodeForVerticalAlignment.get(et)[0]).getCenterX()):l.nodeToTempPositionMapHorizontal.set(et,l.idToNodeMap.get(et).getCenterX())),l.nodeToRelativeConstraintMapHorizontal.get(z).push({right:et,gap:O.gap}),l.nodeToRelativeConstraintMapHorizontal.get(et).push({left:z,gap:O.gap})}else{var H=b.has(O.top)?b.get(O.top):O.top,B=b.has(O.bottom)?b.get(O.bottom):O.bottom;l.nodesInRelativeVertical.includes(H)||(l.nodesInRelativeVertical.push(H),l.nodeToRelativeConstraintMapVertical.set(H,[]),l.dummyToNodeForHorizontalAlignment.has(H)?l.nodeToTempPositionMapVertical.set(H,l.idToNodeMap.get(l.dummyToNodeForHorizontalAlignment.get(H)[0]).getCenterY()):l.nodeToTempPositionMapVertical.set(H,l.idToNodeMap.get(H).getCenterY())),l.nodesInRelativeVertical.includes(B)||(l.nodesInRelativeVertical.push(B),l.nodeToRelativeConstraintMapVertical.set(B,[]),l.dummyToNodeForHorizontalAlignment.has(B)?l.nodeToTempPositionMapVertical.set(B,l.idToNodeMap.get(l.dummyToNodeForHorizontalAlignment.get(B)[0]).getCenterY()):l.nodeToTempPositionMapVertical.set(B,l.idToNodeMap.get(B).getCenterY())),l.nodeToRelativeConstraintMapVertical.get(H).push({bottom:B,gap:O.gap}),l.nodeToRelativeConstraintMapVertical.get(B).push({top:H,gap:O.gap})}});else{var Y=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var z=w.has(O.left)?w.get(O.left):O.left,et=w.has(O.right)?w.get(O.right):O.right;Y.has(z)?Y.get(z).push(et):Y.set(z,[et]),Y.has(et)?Y.get(et).push(z):Y.set(et,[z])}else{var H=b.has(O.top)?b.get(O.top):O.top,B=b.has(O.bottom)?b.get(O.bottom):O.bottom;V.has(H)?V.get(H).push(B):V.set(H,[B]),V.has(B)?V.get(B).push(H):V.set(B,[H])}});var J=function(O,z){var et=[],H=[],B=new Z,lt=new Set,at=0;return O.forEach(function(Lt,W){if(!lt.has(W)){et[at]=[],H[at]=!1;var pt=W;for(B.push(pt),lt.add(pt),et[at].push(pt);B.length!=0;)pt=B.shift(),z.has(pt)&&(H[at]=!0),O.get(pt).forEach(function(vt){lt.has(vt)||(B.push(vt),lt.add(vt),et[at].push(vt))});at++}}),{components:et,isFixed:H}},k=J(Y,l.fixedNodesOnHorizontal);this.componentsOnHorizontal=k.components,this.fixedComponentsOnHorizontal=k.isFixed;var X=J(V,l.fixedNodesOnVertical);this.componentsOnVertical=X.components,this.fixedComponentsOnVertical=X.isFixed}}},D.prototype.updateDisplacements=function(){var l=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(X){var O=l.idToNodeMap.get(X.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,u=0;u<E.length;u++){for(var y=0,m=0;m<E[u].length;m++){if(this.fixedNodeSet.has(E[u][m])){y=0;break}y+=this.idToNodeMap.get(E[u][m]).displacementX}for(var A=y/E[u].length,m=0;m<E[u].length;m++)this.idToNodeMap.get(E[u][m]).displacementX=A}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,u=0;u<w.length;u++){for(var b=0,m=0;m<w[u].length;m++){if(this.fixedNodeSet.has(w[u][m])){b=0;break}b+=this.idToNodeMap.get(w[u][m]).displacementY}for(var G=b/w[u].length,m=0;m<w[u].length;m++)this.idToNodeMap.get(w[u][m]).displacementY=G}}if(this.constraints.relativePlacementConstraint)if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(X){if(!l.fixedNodesOnHorizontal.has(X)){var O=0;O=l.dummyToNodeForVerticalAlignment.has(X)?l.idToNodeMap.get(l.dummyToNodeForVerticalAlignment.get(X)[0]).displacementX:l.idToNodeMap.get(X).displacementX,l.nodeToRelativeConstraintMapHorizontal.get(X).forEach(function(z){if(z.right){var et=l.nodeToTempPositionMapHorizontal.get(z.right)-l.nodeToTempPositionMapHorizontal.get(X)-O;et<z.gap&&(O-=z.gap-et)}else{var et=l.nodeToTempPositionMapHorizontal.get(X)-l.nodeToTempPositionMapHorizontal.get(z.left)+O;et<z.gap&&(O+=z.gap-et)}}),l.nodeToTempPositionMapHorizontal.set(X,l.nodeToTempPositionMapHorizontal.get(X)+O),l.dummyToNodeForVerticalAlignment.has(X)?l.dummyToNodeForVerticalAlignment.get(X).forEach(function(z){l.idToNodeMap.get(z).displacementX=O}):l.idToNodeMap.get(X).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(X){if(!l.fixedNodesOnHorizontal.has(X)){var O=0;O=l.dummyToNodeForHorizontalAlignment.has(X)?l.idToNodeMap.get(l.dummyToNodeForHorizontalAlignment.get(X)[0]).displacementY:l.idToNodeMap.get(X).displacementY,l.nodeToRelativeConstraintMapVertical.get(X).forEach(function(z){if(z.bottom){var et=l.nodeToTempPositionMapVertical.get(z.bottom)-l.nodeToTempPositionMapVertical.get(X)-O;et<z.gap&&(O-=z.gap-et)}else{var et=l.nodeToTempPositionMapVertical.get(X)-l.nodeToTempPositionMapVertical.get(z.top)+O;et<z.gap&&(O+=z.gap-et)}}),l.nodeToTempPositionMapVertical.set(X,l.nodeToTempPositionMapVertical.get(X)+O),l.dummyToNodeForHorizontalAlignment.has(X)?l.dummyToNodeForHorizontalAlignment.get(X).forEach(function(z){l.idToNodeMap.get(z).displacementY=O}):l.idToNodeMap.get(X).displacementY=O}});else{for(var u=0;u<this.componentsOnHorizontal.length;u++){var F=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(var m=0;m<F.length;m++)this.dummyToNodeForVerticalAlignment.has(F[m])?this.dummyToNodeForVerticalAlignment.get(F[m]).forEach(function(z){l.idToNodeMap.get(z).displacementX=0}):this.idToNodeMap.get(F[m]).displacementX=0;else{for(var Y=0,V=0,m=0;m<F.length;m++)if(this.dummyToNodeForVerticalAlignment.has(F[m])){var J=this.dummyToNodeForVerticalAlignment.get(F[m]);Y+=J.length*this.idToNodeMap.get(J[0]).displacementX,V+=J.length}else Y+=this.idToNodeMap.get(F[m]).displacementX,V++;for(var k=Y/V,m=0;m<F.length;m++)this.dummyToNodeForVerticalAlignment.has(F[m])?this.dummyToNodeForVerticalAlignment.get(F[m]).forEach(function(z){l.idToNodeMap.get(z).displacementX=k}):this.idToNodeMap.get(F[m]).displacementX=k}}for(var u=0;u<this.componentsOnVertical.length;u++){var F=this.componentsOnVertical[u];if(this.fixedComponentsOnVertical[u])for(var m=0;m<F.length;m++)this.dummyToNodeForHorizontalAlignment.has(F[m])?this.dummyToNodeForHorizontalAlignment.get(F[m]).forEach(function(et){l.idToNodeMap.get(et).displacementY=0}):this.idToNodeMap.get(F[m]).displacementY=0;else{for(var Y=0,V=0,m=0;m<F.length;m++)if(this.dummyToNodeForHorizontalAlignment.has(F[m])){var J=this.dummyToNodeForHorizontalAlignment.get(F[m]);Y+=J.length*this.idToNodeMap.get(J[0]).displacementY,V+=J.length}else Y+=this.idToNodeMap.get(F[m]).displacementY,V++;for(var k=Y/V,m=0;m<F.length;m++)this.dummyToNodeForHorizontalAlignment.has(F[m])?this.dummyToNodeForHorizontalAlignment.get(F[m]).forEach(function(H){l.idToNodeMap.get(H).displacementY=k}):this.idToNodeMap.get(F[m]).displacementY=k}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var l=[],E,u=this.graphManager.getGraphs(),y=u.length,m;for(m=0;m<y;m++)E=u[m],E.updateConnected(),E.isConnected||(l=l.concat(E.getNodes()));return l},D.prototype.createBendpoints=function(){var l=[];l=l.concat(this.graphManager.getAllEdges());var E=new Set,u;for(u=0;u<l.length;u++){var y=l[u];if(!E.has(y)){var m=y.getSource(),A=y.getTarget();if(m==A)y.getBendpoints().push(new v),y.getBendpoints().push(new v),this.createDummyNodesForBendpoints(y),E.add(y);else{var w=[];if(w=w.concat(m.getEdgeListToNode(A)),w=w.concat(A.getEdgeListToNode(m)),!E.has(w[0])){if(w.length>1){var b;for(b=0;b<w.length;b++){var G=w[b];G.getBendpoints().push(new v),this.createDummyNodesForBendpoints(G)}}w.forEach(function(F){E.add(F)})}}}if(E.size==l.length)break}},D.prototype.positionNodesRadially=function(l){for(var E=new g(0,0),u=Math.ceil(Math.sqrt(l.length)),y=0,m=0,A=0,w=new v(0,0),b=0;b<l.length;b++){b%u==0&&(A=0,m=y,b!=0&&(m+=i.DEFAULT_COMPONENT_SEPERATION),y=0);var G=l[b],F=L.findCenterOfTree(G);E.x=A,E.y=m,w=D.radialLayout(G,F,E),w.y>y&&(y=Math.floor(w.y)),A=Math.floor(w.x+i.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(c.WORLD_CENTER_X-w.x/2,c.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(l,E,u){var y=Math.max(this.maxDiagonalInTree(l),i.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(E,null,0,359,0,y);var m=U.calculateBounds(l),A=new q;A.setDeviceOrgX(m.getMinX()),A.setDeviceOrgY(m.getMinY()),A.setWorldOrgX(u.x),A.setWorldOrgY(u.y);for(var w=0;w<l.length;w++)l[w].transform(A);var b=new v(m.getMaxX(),m.getMaxY());return A.inverseTransformPoint(b)},D.branchRadialLayout=function(l,E,u,y,m,A){var w=(y-u+1)/2;w<0&&(w+=180);var b=(w+u)%360*S.TWO_PI/360,G=m*Math.cos(b),F=m*Math.sin(b);l.setCenter(G,F);var Y=[];Y=Y.concat(l.getEdges());var V=Y.length;E!=null&&V--;for(var J=0,k=Y.length,X,O=l.getEdgesBetween(E);O.length>1;){var z=O[0];O.splice(0,1);var et=Y.indexOf(z);et>=0&&Y.splice(et,1),k--,V--}X=E==null?0:(Y.indexOf(O[0])+1)%k;for(var H=Math.abs(y-u)/V,B=X;J!=V;B=++B%k){var lt=Y[B].getOtherEnd(l);if(lt!=E){var at=(u+J*H)%360,Lt=(at+H)%360;D.branchRadialLayout(lt,l,at,Lt,m+A,A),J++}}},D.maxDiagonalInTree=function(l){for(var E=R.MIN_VALUE,u=0;u<l.length;u++){var y=l[u].getDiagonal();y>E&&(E=y)}return E},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var l=this,E={};this.memberGroups={},this.idToDummyNode={};for(var u=[],y=this.graphManager.getAllNodes(),m=0;m<y.length;m++){var A=y[m],w=A.getParent();this.getNodeDegreeWithChildren(A)===0&&(w.id==null||!this.getToBeTiled(w))&&u.push(A)}for(var m=0;m<u.length;m++){var A=u[m],b=A.getParent().id;E[b]===void 0&&(E[b]=[]),E[b]=E[b].concat(A)}Object.keys(E).forEach(function(G){if(E[G].length>1){var F="DummyCompound_"+G;l.memberGroups[F]=E[G];var Y=E[G][0].getParent(),V=new p(l.graphManager);V.id=F,V.paddingLeft=Y.paddingLeft||0,V.paddingRight=Y.paddingRight||0,V.paddingBottom=Y.paddingBottom||0,V.paddingTop=Y.paddingTop||0,l.idToDummyNode[F]=V;var J=l.getGraphManager().add(l.newGraph(),V),k=Y.getChild();k.add(V);for(var X=0;X<E[G].length;X++){var O=E[G][X];k.remove(O),J.add(O)}}})},D.prototype.clearCompounds=function(){var l={},E={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)E[this.compoundOrder[u].id]=this.compoundOrder[u],l[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(l,E)},D.prototype.clearZeroDegreeMembers=function(){var l=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var y=l.idToDummyNode[u];if(E[u]=l.tileNodes(l.memberGroups[u],y.paddingLeft+y.paddingRight),y.rect.width=E[u].width,y.rect.height=E[u].height,y.setCenter(E[u].centerX,E[u].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var m=y.rect.width,A=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(m+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>m?(y.rect.x-=(y.labelWidth-m)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-m)/2):y.labelPosHorizontal=="right"&&y.setWidth(m+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(A+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>A?(y.rect.y-=(y.labelHeight-A)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-A)/2):y.labelPosVertical=="bottom"&&y.setHeight(A+y.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var l=this.compoundOrder.length-1;l>=0;l--){var E=this.compoundOrder[l],u=E.id,y=E.paddingLeft,m=E.paddingTop,A=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],E.rect.x,E.rect.y,y,m,A,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var l=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(u){var y=l.idToDummyNode[u],m=y.paddingLeft,A=y.paddingTop,w=y.labelMarginLeft,b=y.labelMarginTop;l.adjustLocations(E[u],y.rect.x,y.rect.y,m,A,w,b)})},D.prototype.getToBeTiled=function(l){var E=l.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var u=l.getChild();if(u==null)return this.toBeTiled[E]=!1,!1;for(var y=u.getNodes(),m=0;m<y.length;m++){var A=y[m];if(this.getNodeDegree(A)>0)return this.toBeTiled[E]=!1,!1;if(A.getChild()==null){this.toBeTiled[A.id]=!1;continue}if(!this.getToBeTiled(A))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},D.prototype.getNodeDegree=function(l){l.id;for(var E=l.getEdges(),u=0,y=0;y<E.length;y++){var m=E[y];m.getSource().id!==m.getTarget().id&&(u+=1)}return u},D.prototype.getNodeDegreeWithChildren=function(l){var E=this.getNodeDegree(l);if(l.getChild()==null)return E;for(var u=l.getChild().getNodes(),y=0;y<u.length;y++){var m=u[y];E+=this.getNodeDegreeWithChildren(m)}return E},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(l){for(var E=0;E<l.length;E++){var u=l[E];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},D.prototype.adjustLocations=function(l,E,u,y,m,A,w){E+=y+A,u+=m+w;for(var b=E,G=0;G<l.rows.length;G++){var F=l.rows[G];E=b;for(var Y=0,V=0;V<F.length;V++){var J=F[V];J.rect.x=E,J.rect.y=u,E+=J.rect.width+l.horizontalPadding,J.rect.height>Y&&(Y=J.rect.height)}u+=Y+l.verticalPadding}},D.prototype.tileCompoundMembers=function(l,E){var u=this;this.tiledMemberPack=[],Object.keys(l).forEach(function(y){var m=E[y];if(u.tiledMemberPack[y]=u.tileNodes(l[y],m.paddingLeft+m.paddingRight),m.rect.width=u.tiledMemberPack[y].width,m.rect.height=u.tiledMemberPack[y].height,m.setCenter(u.tiledMemberPack[y].centerX,u.tiledMemberPack[y].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var A=m.rect.width,w=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(A+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>A?(m.rect.x-=(m.labelWidth-A)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-A)/2):m.labelPosHorizontal=="right"&&m.setWidth(A+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(w+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>w?(m.rect.y-=(m.labelHeight-w)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-w)/2):m.labelPosVertical=="bottom"&&m.setHeight(w+m.labelHeight))}})},D.prototype.tileNodes=function(l,E){var u=this.tileNodesByFavoringDim(l,E,!0),y=this.tileNodesByFavoringDim(l,E,!1),m=this.getOrgRatio(u);return this.getOrgRatio(y)<m?y:u},D.prototype.getOrgRatio=function(l){var E=l.width,u=l.height,y=E/u;return y<1&&(y=1/y),y},D.prototype.calcIdealRowWidth=function(l,E){var u=i.TILING_PADDING_VERTICAL,y=i.TILING_PADDING_HORIZONTAL,m=l.length,A=0,w=0,b=0;l.forEach(function(X){A+=X.getWidth(),w+=X.getHeight(),X.getWidth()>b&&(b=X.getWidth())});var G=A/m,F=w/m,Y=(u-y)**2+4*(G+y)*(F+u)*m,V=(y-u+Math.sqrt(Y))/(2*(G+y)),J;E?(J=Math.ceil(V),J==V&&J++):J=Math.floor(V);var k=J*(G+y)-y;return b>k&&(k=b),k+=y*2,k},D.prototype.tileNodesByFavoringDim=function(l,E,u){var y=i.TILING_PADDING_VERTICAL,m=i.TILING_PADDING_HORIZONTAL,A=i.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:y,horizontalPadding:m,centerX:0,centerY:0};A&&(w.idealRowWidth=this.calcIdealRowWidth(l,u));var b=function(X){return X.rect.width*X.rect.height},G=function(X,O){return b(O)-b(X)};l.sort(function(X,O){var z=G;return w.idealRowWidth?(z=A,z(X.id,O.id)):z(X,O)});for(var F=0,Y=0,V=0;V<l.length;V++){var J=l[V];F+=J.getCenterX(),Y+=J.getCenterY()}w.centerX=F/l.length,w.centerY=Y/l.length;for(var V=0;V<l.length;V++){var J=l[V];if(w.rows.length==0)this.insertNodeToRow(w,J,0,E);else if(this.canAddHorizontal(w,J.rect.width,J.rect.height)){var k=w.rows.length-1;w.idealRowWidth||(k=this.getShortestRowIndex(w)),this.insertNodeToRow(w,J,k,E)}else this.insertNodeToRow(w,J,w.rows.length,E);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(l,E,u,y){var m=y;u==l.rows.length&&(l.rows.push([]),l.rowWidth.push(m),l.rowHeight.push(0));var A=l.rowWidth[u]+E.rect.width;l.rows[u].length>0&&(A+=l.horizontalPadding),l.rowWidth[u]=A,l.width<A&&(l.width=A);var w=E.rect.height;u>0&&(w+=l.verticalPadding);var b=0;w>l.rowHeight[u]&&(b=l.rowHeight[u],l.rowHeight[u]=w,b=l.rowHeight[u]-b),l.height+=b,l.rows[u].push(E)},D.prototype.getShortestRowIndex=function(l){for(var E=-1,u=Number.MAX_VALUE,y=0;y<l.rows.length;y++)l.rowWidth[y]<u&&(E=y,u=l.rowWidth[y]);return E},D.prototype.getLongestRowIndex=function(l){for(var E=-1,u=Number.MIN_VALUE,y=0;y<l.rows.length;y++)l.rowWidth[y]>u&&(E=y,u=l.rowWidth[y]);return E},D.prototype.canAddHorizontal=function(l,E,u){if(l.idealRowWidth){var y=l.rows.length-1;return l.rowWidth[y]+E+l.horizontalPadding<=l.idealRowWidth}var m=this.getShortestRowIndex(l);if(m<0)return!0;var A=l.rowWidth[m];if(A+l.horizontalPadding+E<=l.width)return!0;var w=0;l.rowHeight[m]<u&&m>0&&(w=u+l.verticalPadding-l.rowHeight[m]);var b=l.width-A>=E+l.horizontalPadding?(l.height+w)/(A+E+l.horizontalPadding):(l.height+w)/l.width;w=u+l.verticalPadding;var G=l.width<E?(l.height+w)/E:(l.height+w)/l.width;return G<1&&(G=1/G),b<1&&(b=1/b),b<G},D.prototype.shiftToLastRow=function(l){var E=this.getLongestRowIndex(l),u=l.rowWidth.length-1,y=l.rows[E],m=y[y.length-1],A=m.width+l.horizontalPadding;if(l.width-l.rowWidth[u]>A&&E!=u){y.splice(-1,1),l.rows[u].push(m),l.rowWidth[E]=l.rowWidth[E]-A,l.rowWidth[u]=l.rowWidth[u]+A,l.width=l.rowWidth[instance.getLongestRowIndex(l)];for(var w=Number.MIN_VALUE,b=0;b<y.length;b++)y[b].height>w&&(w=y[b].height);E>0&&(w+=l.verticalPadding);var G=l.rowHeight[E]+l.rowHeight[u];l.rowHeight[E]=w,l.rowHeight[u]<m.height+l.verticalPadding&&(l.rowHeight[u]=m.height+l.verticalPadding);var F=l.rowHeight[E]+l.rowHeight[u];l.height+=F-G,this.shiftToLastRow(l)}},D.prototype.tilingPreLayout=function(){i.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){i.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var l=[],E=!0,u;E;){var y=this.graphManager.getAllNodes(),m=[];E=!1;for(var A=0;A<y.length;A++)if(u=y[A],u.getEdges().length==1&&!u.getEdges()[0].isInterGraph&&u.getChild()==null){if(i.PURE_INCREMENTAL){var w=u.getEdges()[0].getOtherEnd(u),b=new T(u.getCenterX()-w.getCenterX(),u.getCenterY()-w.getCenterY());m.push([u,u.getEdges()[0],u.getOwner(),b])}else m.push([u,u.getEdges()[0],u.getOwner()]);E=!0}if(E==1){for(var G=[],F=0;F<m.length;F++)m[F][0].getEdges().length==1&&(G.push(m[F]),m[F][0].getOwner().remove(m[F][0]));l.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=l},D.prototype.growTree=function(l){for(var E=l.length,u=l[E-1],y,m=0;m<u.length;m++)y=u[m],this.findPlaceforPrunedNode(y),y[2].add(y[0]),y[2].add(y[1],y[1].source,y[1].target);l.splice(l.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(l){var E,u,y=l[0];if(u=y==l[1].source?l[1].target:l[1].source,i.PURE_INCREMENTAL)y.setCenter(u.getCenterX()+l[3].getWidth(),u.getCenterY()+l[3].getHeight());else{var m=u.startX,A=u.finishX,w=u.startY,b=u.finishY,G=[0,0,0,0];if(w>0)for(var F=m;F<=A;F++)G[0]+=this.grid[F][w-1].length+this.grid[F][w].length-1;if(A<this.grid.length-1)for(var F=w;F<=b;F++)G[1]+=this.grid[A+1][F].length+this.grid[A][F].length-1;if(b<this.grid[0].length-1)for(var F=m;F<=A;F++)G[2]+=this.grid[F][b+1].length+this.grid[F][b].length-1;if(m>0)for(var F=w;F<=b;F++)G[3]+=this.grid[m-1][F].length+this.grid[m][F].length-1;for(var Y=R.MAX_VALUE,V,J,k=0;k<G.length;k++)G[k]<Y?(Y=G[k],V=1,J=k):G[k]==Y&&V++;if(V==3&&Y==0)G[0]==0&&G[1]==0&&G[2]==0?E=1:G[0]==0&&G[1]==0&&G[3]==0?E=0:G[0]==0&&G[2]==0&&G[3]==0?E=3:G[1]==0&&G[2]==0&&G[3]==0&&(E=2);else if(V==2&&Y==0){var X=Math.floor(Math.random()*2);E=G[0]==0&&G[1]==0?X==0?0:1:G[0]==0&&G[2]==0?X==0?0:2:G[0]==0&&G[3]==0?X==0?0:3:G[1]==0&&G[2]==0?X==0?1:2:G[1]==0&&G[3]==0?X==0?1:3:X==0?2:3}else if(V==4&&Y==0){var X=Math.floor(Math.random()*4);E=X}else E=J;E==0?y.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-h.DEFAULT_EDGE_LENGTH-y.getHeight()/2):E==1?y.setCenter(u.getCenterX()+u.getWidth()/2+h.DEFAULT_EDGE_LENGTH+y.getWidth()/2,u.getCenterY()):E==2?y.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+h.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(u.getCenterX()-u.getWidth()/2-h.DEFAULT_EDGE_LENGTH-y.getWidth()/2,u.getCenterY())}},r.exports=D}),991:((r,n,t)=>{var e=t(551).FDLayoutNode,s=t(551).IMath;function a(o,i,d,h){e.call(this,o,i,d,h)}for(var p in a.prototype=Object.create(e.prototype),e)a[p]=e[p];a.prototype.calculateDisplacement=function(){var o=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*s.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*s.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(o,i){for(var d=this.getChild().getNodes(),h,c=0;c<d.length;c++)h=d[c],h.getChild()==null?(h.displacementX+=o,h.displacementY+=i):h.propogateDisplacementToChildren(o,i)},a.prototype.move=function(){var o=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),o.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(o){this.pred1=o},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(o){this.next=o},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(o){this.processed=o},a.prototype.isProcessed=function(){return processed},r.exports=a}),902:((r,n,t)=>{function e(d){if(Array.isArray(d)){for(var h=0,c=Array(d.length);h<d.length;h++)c[h]=d[h];return c}else return Array.from(d)}var s=t(806),a=t(551).LinkedList,p=t(551).Matrix,o=t(551).SVD;function i(){}i.handleConstraints=function(d){var h={};h.fixedNodeConstraint=d.constraints.fixedNodeConstraint,h.alignmentConstraint=d.constraints.alignmentConstraint,h.relativePlacementConstraint=d.constraints.relativePlacementConstraint;for(var c=new Map,g=new Map,v=[],T=[],L=d.getAllNodes(),R=0,S=0;S<L.length;S++){var U=L[S];U.getChild()??(g.set(U.id,R++),v.push(U.getCenterX()),T.push(U.getCenterY()),c.set(U.id,U))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(_){!_.gap&&_.gap!=0&&(_.left?_.gap=s.DEFAULT_EDGE_LENGTH+c.get(_.left).getWidth()/2+c.get(_.right).getWidth()/2:_.gap=s.DEFAULT_EDGE_LENGTH+c.get(_.top).getHeight()/2+c.get(_.bottom).getHeight()/2)});var q=function(_,P){return{x:_.x-P.x,y:_.y-P.y}},Z=function(_){var P=0,$=0;return _.forEach(function(j){P+=v[g.get(j)],$+=T[g.get(j)]}),{x:P/_.size,y:$/_.size}},D=function(_,P,$,j,tt){function Et(dt,K){var ut=new Set(dt),At=!0,rt=!1,bt=void 0;try{for(var Ot=K[Symbol.iterator](),Dt;!(At=(Dt=Ot.next()).done);At=!0){var Ft=Dt.value;ut.add(Ft)}}catch(Tt){rt=!0,bt=Tt}finally{try{!At&&Ot.return&&Ot.return()}finally{if(rt)throw bt}}return ut}var yt=new Map;_.forEach(function(dt,K){yt.set(K,0)}),_.forEach(function(dt,K){dt.forEach(function(ut){yt.set(ut.id,yt.get(ut.id)+1)})});var it=new Map,ft=new Map,_t=new a;yt.forEach(function(dt,K){dt==0?(_t.push(K),$||(P=="horizontal"?it.set(K,g.has(K)?v[g.get(K)]:j.get(K)):it.set(K,g.has(K)?T[g.get(K)]:j.get(K)))):it.set(K,-1/0),$&&ft.set(K,new Set([K]))}),$&&tt.forEach(function(dt){var K=[];if(dt.forEach(function(rt){$.has(rt)&&K.push(rt)}),K.length>0){var ut=0;K.forEach(function(rt){P=="horizontal"?(it.set(rt,g.has(rt)?v[g.get(rt)]:j.get(rt)),ut+=it.get(rt)):(it.set(rt,g.has(rt)?T[g.get(rt)]:j.get(rt)),ut+=it.get(rt))}),ut/=K.length,dt.forEach(function(rt){$.has(rt)||it.set(rt,ut)})}else{var At=0;dt.forEach(function(rt){P=="horizontal"?At+=g.has(rt)?v[g.get(rt)]:j.get(rt):At+=g.has(rt)?T[g.get(rt)]:j.get(rt)}),At/=dt.length,dt.forEach(function(rt){it.set(rt,At)})}});for(var wt=function(){var dt=_t.shift();_.get(dt).forEach(function(K){if(it.get(K.id)<it.get(dt)+K.gap)if($&&$.has(K.id)){var ut=void 0;if(ut=P=="horizontal"?g.has(K.id)?v[g.get(K.id)]:j.get(K.id):g.has(K.id)?T[g.get(K.id)]:j.get(K.id),it.set(K.id,ut),ut<it.get(dt)+K.gap){var At=it.get(dt)+K.gap-ut;ft.get(dt).forEach(function(rt){it.set(rt,it.get(rt)-At)})}}else it.set(K.id,it.get(dt)+K.gap);yt.set(K.id,yt.get(K.id)-1),yt.get(K.id)==0&&_t.push(K.id),$&&ft.set(K.id,Et(ft.get(dt),ft.get(K.id)))})};_t.length!=0;)wt();if($){var mt=new Set;_.forEach(function(dt,K){dt.length==0&&mt.add(K)});var ht=[];ft.forEach(function(dt,K){if(mt.has(K)){var ut=!1,At=!0,rt=!1,bt=void 0;try{for(var Ot=dt[Symbol.iterator](),Dt;!(At=(Dt=Ot.next()).done);At=!0){var Ft=Dt.value;$.has(Ft)&&(ut=!0)}}catch(xt){rt=!0,bt=xt}finally{try{!At&&Ot.return&&Ot.return()}finally{if(rt)throw bt}}if(!ut){var Tt=!1,Nt=void 0;ht.forEach(function(xt,Pt){xt.has([].concat(e(dt))[0])&&(Tt=!0,Nt=Pt)}),Tt?dt.forEach(function(xt){ht[Nt].add(xt)}):ht.push(new Set(dt))}}}),ht.forEach(function(dt,K){var ut=1/0,At=1/0,rt=-1/0,bt=-1/0,Ot=!0,Dt=!1,Ft=void 0;try{for(var Tt=dt[Symbol.iterator](),Nt;!(Ot=(Nt=Tt.next()).done);Ot=!0){var xt=Nt.value,Pt=void 0;Pt=P=="horizontal"?g.has(xt)?v[g.get(xt)]:j.get(xt):g.has(xt)?T[g.get(xt)]:j.get(xt);var Xt=it.get(xt);Pt<ut&&(ut=Pt),Pt>rt&&(rt=Pt),Xt<At&&(At=Xt),Xt>bt&&(bt=Xt)}}catch(qt){Dt=!0,Ft=qt}finally{try{!Ot&&Tt.return&&Tt.return()}finally{if(Dt)throw Ft}}var ne=(ut+rt)/2-(At+bt)/2,ee=!0,$t=!1,Zt=void 0;try{for(var jt=dt[Symbol.iterator](),Qt;!(ee=(Qt=jt.next()).done);ee=!0){var re=Qt.value;it.set(re,it.get(re)+ne)}}catch(qt){$t=!0,Zt=qt}finally{try{!ee&&jt.return&&jt.return()}finally{if($t)throw Zt}}})}return it},Q=function(_){var P=0,$=0,j=0,tt=0;if(_.forEach(function(ft){ft.left?v[g.get(ft.left)]-v[g.get(ft.right)]>=0?P++:$++:T[g.get(ft.top)]-T[g.get(ft.bottom)]>=0?j++:tt++}),P>$&&j>tt)for(var Et=0;Et<g.size;Et++)v[Et]=-1*v[Et],T[Et]=-1*T[Et];else if(P>$)for(var yt=0;yt<g.size;yt++)v[yt]=-1*v[yt];else if(j>tt)for(var it=0;it<g.size;it++)T[it]=-1*T[it]},l=function(_){var P=[],$=new a,j=new Set,tt=0;return _.forEach(function(Et,yt){if(!j.has(yt)){P[tt]=[];var it=yt;for($.push(it),j.add(it),P[tt].push(it);$.length!=0;)it=$.shift(),_.get(it).forEach(function(ft){j.has(ft.id)||($.push(ft.id),j.add(ft.id),P[tt].push(ft.id))});tt++}}),P},E=function(_){var P=new Map;return _.forEach(function($,j){P.set(j,[])}),_.forEach(function($,j){$.forEach(function(tt){P.get(j).push(tt),P.get(tt.id).push({id:j,gap:tt.gap,direction:tt.direction})})}),P},u=function(_){var P=new Map;return _.forEach(function($,j){P.set(j,[])}),_.forEach(function($,j){$.forEach(function(tt){P.get(tt.id).push({id:j,gap:tt.gap,direction:tt.direction})})}),P},y=[],m=[],A=!1,w=!1,b=new Set,G=new Map,F=new Map,Y=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(_){b.add(_.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(_){_.left?(G.has(_.left)?G.get(_.left).push({id:_.right,gap:_.gap,direction:"horizontal"}):G.set(_.left,[{id:_.right,gap:_.gap,direction:"horizontal"}]),G.has(_.right)||G.set(_.right,[])):(G.has(_.top)?G.get(_.top).push({id:_.bottom,gap:_.gap,direction:"vertical"}):G.set(_.top,[{id:_.bottom,gap:_.gap,direction:"vertical"}]),G.has(_.bottom)||G.set(_.bottom,[]))}),F=E(G),Y=l(F)),s.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(_,P){y[P]=[_.position.x,_.position.y],m[P]=[v[g.get(_.nodeId)],T[g.get(_.nodeId)]]}),A=!0;else if(h.alignmentConstraint)(function(){var _=0;if(h.alignmentConstraint.vertical){for(var P=h.alignmentConstraint.vertical,$=function(it){var ft=new Set;P[it].forEach(function(mt){ft.add(mt)});var _t=new Set([].concat(e(ft)).filter(function(mt){return b.has(mt)})),wt=void 0;wt=_t.size>0?v[g.get(_t.values().next().value)]:Z(ft).x,P[it].forEach(function(mt){y[_]=[wt,T[g.get(mt)]],m[_]=[v[g.get(mt)],T[g.get(mt)]],_++})},j=0;j<P.length;j++)$(j);A=!0}if(h.alignmentConstraint.horizontal){for(var tt=h.alignmentConstraint.horizontal,Et=function(it){var ft=new Set;tt[it].forEach(function(mt){ft.add(mt)});var _t=new Set([].concat(e(ft)).filter(function(mt){return b.has(mt)})),wt=void 0;wt=_t.size>0?v[g.get(_t.values().next().value)]:Z(ft).y,tt[it].forEach(function(mt){y[_]=[v[g.get(mt)],wt],m[_]=[v[g.get(mt)],T[g.get(mt)]],_++})},yt=0;yt<tt.length;yt++)Et(yt);A=!0}h.relativePlacementConstraint&&(w=!0)})();else if(h.relativePlacementConstraint){for(var V=0,J=0,k=0;k<Y.length;k++)Y[k].length>V&&(V=Y[k].length,J=k);if(V<F.size/2)Q(h.relativePlacementConstraint),A=!1,w=!1;else{var X=new Map,O=new Map,z=[];Y[J].forEach(function(_){G.get(_).forEach(function(P){P.direction=="horizontal"?(X.has(_)?X.get(_).push(P):X.set(_,[P]),X.has(P.id)||X.set(P.id,[]),z.push({left:_,right:P.id})):(O.has(_)?O.get(_).push(P):O.set(_,[P]),O.has(P.id)||O.set(P.id,[]),z.push({top:_,bottom:P.id}))})}),Q(z),w=!1;var et=D(X,"horizontal"),H=D(O,"vertical");Y[J].forEach(function(_,P){m[P]=[v[g.get(_)],T[g.get(_)]],y[P]=[],et.has(_)?y[P][0]=et.get(_):y[P][0]=v[g.get(_)],H.has(_)?y[P][1]=H.get(_):y[P][1]=T[g.get(_)]}),A=!0}}if(A){for(var B=void 0,lt=p.transpose(y),at=p.transpose(m),Lt=0;Lt<lt.length;Lt++)lt[Lt]=p.multGamma(lt[Lt]),at[Lt]=p.multGamma(at[Lt]);var W=p.multMat(lt,p.transpose(at)),pt=o.svd(W);B=p.multMat(pt.V,p.transpose(pt.U));for(var vt=0;vt<g.size;vt++){var Bt=[v[vt],T[vt]],Ut=[B[0][0],B[1][0]],It=[B[0][1],B[1][1]];v[vt]=p.dotProduct(Bt,Ut),T[vt]=p.dotProduct(Bt,It)}w&&Q(h.relativePlacementConstraint)}}if(s.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var Mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(_,P){var $={x:v[g.get(_.nodeId)],y:T[g.get(_.nodeId)]},j=_.position,tt=q(j,$);Mt.x+=tt.x,Mt.y+=tt.y}),Mt.x/=h.fixedNodeConstraint.length,Mt.y/=h.fixedNodeConstraint.length,v.forEach(function(_,P){v[P]+=Mt.x}),T.forEach(function(_,P){T[P]+=Mt.y}),h.fixedNodeConstraint.forEach(function(_){v[g.get(_.nodeId)]=_.position.x,T[g.get(_.nodeId)]=_.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Yt=h.alignmentConstraint.vertical,Ht=function(_){var P=new Set;Yt[_].forEach(function(tt){P.add(tt)});var $=new Set([].concat(e(P)).filter(function(tt){return b.has(tt)})),j=void 0;j=$.size>0?v[g.get($.values().next().value)]:Z(P).x,P.forEach(function(tt){b.has(tt)||(v[g.get(tt)]=j)})},Rt=0;Rt<Yt.length;Rt++)Ht(Rt);if(h.alignmentConstraint.horizontal)for(var Vt=h.alignmentConstraint.horizontal,Gt=function(_){var P=new Set;Vt[_].forEach(function(tt){P.add(tt)});var $=new Set([].concat(e(P)).filter(function(tt){return b.has(tt)})),j=void 0;j=$.size>0?T[g.get($.values().next().value)]:Z(P).y,P.forEach(function(tt){b.has(tt)||(T[g.get(tt)]=j)})},st=0;st<Vt.length;st++)Gt(st)}h.relativePlacementConstraint&&(function(){var _=new Map,P=new Map,$=new Map,j=new Map,tt=new Map,Et=new Map,yt=new Set,it=new Set;if(b.forEach(function(nt){yt.add(nt),it.add(nt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var ft=h.alignmentConstraint.vertical,_t=function(nt){$.set("dummy"+nt,[]),ft[nt].forEach(function(Ct){_.set(Ct,"dummy"+nt),$.get("dummy"+nt).push(Ct),b.has(Ct)&&yt.add("dummy"+nt)}),tt.set("dummy"+nt,v[g.get(ft[nt][0])])},wt=0;wt<ft.length;wt++)_t(wt);if(h.alignmentConstraint.horizontal)for(var mt=h.alignmentConstraint.horizontal,ht=function(nt){j.set("dummy"+nt,[]),mt[nt].forEach(function(Ct){P.set(Ct,"dummy"+nt),j.get("dummy"+nt).push(Ct),b.has(Ct)&&it.add("dummy"+nt)}),Et.set("dummy"+nt,T[g.get(mt[nt][0])])},dt=0;dt<mt.length;dt++)ht(dt)}var K=new Map,ut=new Map,At=function(nt){G.get(nt).forEach(function(Ct){var kt=void 0,zt=void 0;Ct.direction=="horizontal"?(kt=_.get(nt)?_.get(nt):nt,zt=_.get(Ct.id)?{id:_.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:Ct,K.has(kt)?K.get(kt).push(zt):K.set(kt,[zt]),K.has(zt.id)||K.set(zt.id,[])):(kt=P.get(nt)?P.get(nt):nt,zt=P.get(Ct.id)?{id:P.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:Ct,ut.has(kt)?ut.get(kt).push(zt):ut.set(kt,[zt]),ut.has(zt.id)||ut.set(zt.id,[]))})},rt=!0,bt=!1,Ot=void 0;try{for(var Dt=G.keys()[Symbol.iterator](),Ft;!(rt=(Ft=Dt.next()).done);rt=!0){var Tt=Ft.value;At(Tt)}}catch(nt){bt=!0,Ot=nt}finally{try{!rt&&Dt.return&&Dt.return()}finally{if(bt)throw Ot}}var Nt=E(K),xt=E(ut),Pt=l(Nt),Xt=l(xt),ne=u(K),ee=u(ut),$t=[],Zt=[];Pt.forEach(function(nt,Ct){$t[Ct]=[],nt.forEach(function(kt){ne.get(kt).length==0&&$t[Ct].push(kt)})}),Xt.forEach(function(nt,Ct){Zt[Ct]=[],nt.forEach(function(kt){ee.get(kt).length==0&&Zt[Ct].push(kt)})});var jt=D(K,"horizontal",yt,tt,$t),Qt=D(ut,"vertical",it,Et,Zt),re=function(nt){$.get(nt)?$.get(nt).forEach(function(Ct){v[g.get(Ct)]=jt.get(nt)}):v[g.get(nt)]=jt.get(nt)},qt=!0,me=!1,ve=void 0;try{for(var ae=jt.keys()[Symbol.iterator](),ye;!(qt=(ye=ae.next()).done);qt=!0){var se=ye.value;re(se)}}catch(nt){me=!0,ve=nt}finally{try{!qt&&ae.return&&ae.return()}finally{if(me)throw ve}}var ke=function(nt){j.get(nt)?j.get(nt).forEach(function(Ct){T[g.get(Ct)]=Qt.get(nt)}):T[g.get(nt)]=Qt.get(nt)},he=!0,Ee=!1,Te=void 0;try{for(var le=Qt.keys()[Symbol.iterator](),Ne;!(he=(Ne=le.next()).done);he=!0){var se=Ne.value;ke(se)}}catch(nt){Ee=!0,Te=nt}finally{try{!he&&le.return&&le.return()}finally{if(Ee)throw Te}}})()}for(var ot=0;ot<L.length;ot++){var ct=L[ot];ct.getChild()??ct.setCenter(v[g.get(ct.id)],T[g.get(ct.id)])}},r.exports=i}),551:(r=>{r.exports=C})},N={};function f(r){var n=N[r];if(n!==void 0)return n.exports;var t=N[r]={exports:{}};return x[r](t,t.exports,f),t.exports}return f(45)})()})})),ai=He(de(((I,M)=>{(function(C,x){typeof I=="object"&&typeof M=="object"?M.exports=x(we()):typeof define=="function"&&define.amd?define(["cose-base"],x):typeof I=="object"?I.cytoscapeFcose=x(we()):C.cytoscapeFcose=x(C.coseBase)})(I,function(C){return(()=>{var x={658:(r=>{r.exports=Object.assign==null?function(n){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(e){return n[e]=t[e]})}),n}:Object.assign.bind(Object)}),548:((r,n,t)=>{var e=(function(){function p(o,i){var d=[],h=!0,c=!1,g=void 0;try{for(var v=o[Symbol.iterator](),T;!(h=(T=v.next()).done)&&(d.push(T.value),!(i&&d.length===i));h=!0);}catch(L){c=!0,g=L}finally{try{!h&&v.return&&v.return()}finally{if(c)throw g}}return d}return function(o,i){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return p(o,i);throw TypeError("Invalid attempt to destructure non-iterable instance")}})(),s=t(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(p){for(var o={},i=0;i<p.length;i++)o[p[i].id()]=!0;return p.filter(function(d,h){typeof d=="number"&&(d=h);for(var c=d.parent()[0];c!=null;){if(o[c.id()])return!1;c=c.parent()[0]}return!0})},a.connectComponents=function(p,o,i,d){var h=new s,c=new Set,g=[],v=void 0,T=void 0,L=void 0,R=!1,S=1,U=[],q=[],Z=function(){var D=p.collection();q.push(D);var Q=i[0],l=p.collection();l.merge(Q).merge(Q.descendants().intersection(o)),g.push(Q),l.forEach(function(y){h.push(y),c.add(y),D.merge(y)});for(var E=function(){Q=h.shift();var y=p.collection();Q.neighborhood().nodes().forEach(function(w){o.intersection(Q.edgesWith(w)).length>0&&y.merge(w)});for(var m=0;m<y.length;m++){var A=y[m];v=i.intersection(A.union(A.ancestors())),v!=null&&!c.has(v[0])&&v.union(v.descendants()).forEach(function(w){h.push(w),c.add(w),D.merge(w),i.has(w)&&g.push(w)})}};h.length!=0;)E();if(D.forEach(function(y){o.intersection(y.connectedEdges()).forEach(function(m){D.has(m.source())&&D.has(m.target())&&D.merge(m)})}),g.length==i.length&&(R=!0),!R||R&&S>1){T=g[0],L=T.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<L&&(L=y.connectedEdges().length,T=y)}),U.push(T.id());var u=p.collection();u.merge(g[0]),g.forEach(function(y){u.merge(y)}),g=[],i=i.difference(u),S++}};do Z();while(!R);return d&&U.length>0&&d.set("dummy"+(d.size+1),U),q},a.relocateComponent=function(p,o,i){if(!i.fixedNodeConstraint){var d=1/0,h=-1/0,c=1/0,g=-1/0;if(i.quality=="draft"){var v=!0,T=!1,L=void 0;try{for(var R=o.nodeIndexes[Symbol.iterator](),S;!(v=(S=R.next()).done);v=!0){var U=S.value,q=e(U,2),Z=q[0],D=q[1],Q=i.cy.getElementById(Z);if(Q){var l=Q.boundingBox(),E=o.xCoords[D]-l.w/2,u=o.xCoords[D]+l.w/2,y=o.yCoords[D]-l.h/2,m=o.yCoords[D]+l.h/2;E<d&&(d=E),u>h&&(h=u),y<c&&(c=y),m>g&&(g=m)}}}catch(F){T=!0,L=F}finally{try{!v&&R.return&&R.return()}finally{if(T)throw L}}var A=p.x-(h+d)/2,w=p.y-(g+c)/2;o.xCoords=o.xCoords.map(function(F){return F+A}),o.yCoords=o.yCoords.map(function(F){return F+w})}else{Object.keys(o).forEach(function(F){var Y=o[F],V=Y.getRect().x,J=Y.getRect().x+Y.getRect().width,k=Y.getRect().y,X=Y.getRect().y+Y.getRect().height;V<d&&(d=V),J>h&&(h=J),k<c&&(c=k),X>g&&(g=X)});var b=p.x-(h+d)/2,G=p.y-(g+c)/2;Object.keys(o).forEach(function(F){var Y=o[F];Y.setCenter(Y.getCenterX()+b,Y.getCenterY()+G)})}}},a.calcBoundingBox=function(p,o,i,d){for(var h=9007199254740991,c=-9007199254740991,g=9007199254740991,v=-9007199254740991,T=void 0,L=void 0,R=void 0,S=void 0,U=p.descendants().not(":parent"),q=U.length,Z=0;Z<q;Z++){var D=U[Z];T=o[d.get(D.id())]-D.width()/2,L=o[d.get(D.id())]+D.width()/2,R=i[d.get(D.id())]-D.height()/2,S=i[d.get(D.id())]+D.height()/2,h>T&&(h=T),c<L&&(c=L),g>R&&(g=R),v<S&&(v=S)}var Q={};return Q.topLeftX=h,Q.topLeftY=g,Q.width=c-h,Q.height=v-g,Q},a.calcParentsWithoutChildren=function(p,o){var i=p.collection();return o.nodes(":parent").forEach(function(d){var h=!1;d.children().forEach(function(c){c.css("display")!="none"&&(h=!0)}),h||i.merge(d)}),i},r.exports=a}),816:((r,n,t)=>{var e=t(548),s=t(140).CoSELayout,a=t(140).CoSENode,p=t(140).layoutBase.PointD,o=t(140).layoutBase.DimensionD,i=t(140).layoutBase.LayoutConstants,d=t(140).layoutBase.FDLayoutConstants,h=t(140).CoSEConstants;r.exports={coseLayout:function(c,g){var v=c.cy,T=c.eles,L=T.nodes(),R=T.edges(),S=void 0,U=void 0,q=void 0,Z={};c.randomize&&(S=g.nodeIndexes,U=g.xCoords,q=g.yCoords);var D=function(w){return typeof w=="function"},Q=function(w,b){return D(w)?w(b):w},l=e.calcParentsWithoutChildren(v,T),E=function w(b,G,F,Y){for(var V=G.length,J=0;J<V;J++){var k=G[J],X=null;k.intersection(l).length==0&&(X=k.children());var O=void 0,z=k.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(k.outerWidth()!=null&&k.outerHeight()!=null)if(Y.randomize)if(!k.isParent())O=b.add(new a(F.graphManager,new p(U[S.get(k.id())]-z.w/2,q[S.get(k.id())]-z.h/2),new o(parseFloat(z.w),parseFloat(z.h))));else{var et=e.calcBoundingBox(k,U,q,S);O=k.intersection(l).length==0?b.add(new a(F.graphManager,new p(et.topLeftX,et.topLeftY),new o(et.width,et.height))):b.add(new a(F.graphManager,new p(et.topLeftX,et.topLeftY),new o(parseFloat(z.w),parseFloat(z.h))))}else O=b.add(new a(F.graphManager,new p(k.position("x")-z.w/2,k.position("y")-z.h/2),new o(parseFloat(z.w),parseFloat(z.h))));else O=b.add(new a(this.graphManager));if(O.id=k.data("id"),O.nodeRepulsion=Q(Y.nodeRepulsion,k),O.paddingLeft=parseInt(k.css("padding")),O.paddingTop=parseInt(k.css("padding")),O.paddingRight=parseInt(k.css("padding")),O.paddingBottom=parseInt(k.css("padding")),Y.nodeDimensionsIncludeLabels&&(O.labelWidth=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,O.labelHeight=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,O.labelPosVertical=k.css("text-valign"),O.labelPosHorizontal=k.css("text-halign")),Z[k.data("id")]=O,isNaN(O.rect.x)&&(O.rect.x=0),isNaN(O.rect.y)&&(O.rect.y=0),X!=null&&X.length>0){var H=void 0;H=F.getGraphManager().add(F.newGraph(),O),w(H,X,F,Y)}}},u=function(w,b,G){for(var F=0,Y=0,V=0;V<G.length;V++){var J=G[V],k=Z[J.data("source")],X=Z[J.data("target")];if(k&&X&&k!==X&&k.getEdgesBetween(X).length==0){var O=b.add(w.newEdge(),k,X);O.id=J.id(),O.idealLength=Q(c.idealEdgeLength,J),O.edgeElasticity=Q(c.edgeElasticity,J),F+=O.idealLength,Y++}}c.idealEdgeLength!=null&&(Y>0?h.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=F/Y:D(c.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=c.idealEdgeLength,h.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH)},y=function(w,b){b.fixedNodeConstraint&&(w.constraints.fixedNodeConstraint=b.fixedNodeConstraint),b.alignmentConstraint&&(w.constraints.alignmentConstraint=b.alignmentConstraint),b.relativePlacementConstraint&&(w.constraints.relativePlacementConstraint=b.relativePlacementConstraint)};c.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(h.MAX_ITERATIONS=d.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=c.tilingCompareBy),c.quality=="proof"?i.QUALITY=2:i.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!c.randomize,h.ANIMATE=d.ANIMATE=i.ANIMATE=c.animate,h.TILE=c.tile,h.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!c.randomize,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,c.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),c.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),c.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),c.step=="all"&&(c.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var m=new s,A=m.newGraphManager();return E(A.addRoot(),e.getTopMostNodes(L),m,c),u(m,A,R),y(m,c),m.runLayout(),Z}}}),212:((r,n,t)=>{var e=(function(){function h(c,g){for(var v=0;v<g.length;v++){var T=g[v];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(c,T.key,T)}}return function(c,g,v){return g&&h(c.prototype,g),v&&h(c,v),c}})();function s(h,c){if(!(h instanceof c))throw TypeError("Cannot call a class as a function")}var a=t(658),p=t(548),o=t(657).spectralLayout,i=t(816).coseLayout,d=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(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){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(){}});r.exports=(function(){function h(c){s(this,h),this.options=a({},d,c)}return e(h,[{key:"run",value:function(){var c=this,g=this.options,v=g.cy,T=g.eles,L=[],R=[],S=void 0,U=[];g.fixedNodeConstraint&&(!Array.isArray(g.fixedNodeConstraint)||g.fixedNodeConstraint.length==0)&&(g.fixedNodeConstraint=void 0),g.alignmentConstraint&&(g.alignmentConstraint.vertical&&(!Array.isArray(g.alignmentConstraint.vertical)||g.alignmentConstraint.vertical.length==0)&&(g.alignmentConstraint.vertical=void 0),g.alignmentConstraint.horizontal&&(!Array.isArray(g.alignmentConstraint.horizontal)||g.alignmentConstraint.horizontal.length==0)&&(g.alignmentConstraint.horizontal=void 0)),g.relativePlacementConstraint&&(!Array.isArray(g.relativePlacementConstraint)||g.relativePlacementConstraint.length==0)&&(g.relativePlacementConstraint=void 0),(g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint)&&(g.tile=!1,g.packComponents=!1);var q=void 0,Z=!1;if(v.layoutUtilities&&g.packComponents&&(q=v.layoutUtilities("get"),q||(q=v.layoutUtilities()),Z=!0),T.nodes().length>0)if(Z){var D=p.getTopMostNodes(g.eles.nodes());if(S=p.connectComponents(v,g.eles,D),S.forEach(function(H){var B=H.boundingBox();U.push({x:B.x1+B.w/2,y:B.y1+B.h/2})}),g.randomize&&S.forEach(function(H){g.eles=H,L.push(o(g))}),g.quality=="default"||g.quality=="proof"){var Q=v.collection();if(g.tile){var l=new Map,E=[],u=[],y=0,m={nodeIndexes:l,xCoords:E,yCoords:u},A=[];if(S.forEach(function(H,B){H.edges().length==0&&(H.nodes().forEach(function(lt,at){Q.merge(H.nodes()[at]),lt.isParent()||(m.nodeIndexes.set(H.nodes()[at].id(),y++),m.xCoords.push(H.nodes()[0].position().x),m.yCoords.push(H.nodes()[0].position().y))}),A.push(B))}),Q.length>1){var w=Q.boundingBox();U.push({x:w.x1+w.w/2,y:w.y1+w.h/2}),S.push(Q),L.push(m);for(var b=A.length-1;b>=0;b--)S.splice(A[b],1),L.splice(A[b],1),U.splice(A[b],1)}}S.forEach(function(H,B){g.eles=H,R.push(i(g,L[B])),p.relocateComponent(U[B],R[B],g)})}else S.forEach(function(H,B){p.relocateComponent(U[B],L[B],g)});var G=new Set;if(S.length>1){var F=[],Y=T.filter(function(H){return H.css("display")=="none"});S.forEach(function(H,B){var lt=void 0;if(g.quality=="draft"&&(lt=L[B].nodeIndexes),H.nodes().not(Y).length>0){var at={};at.edges=[],at.nodes=[];var Lt=void 0;H.nodes().not(Y).forEach(function(W){if(g.quality=="draft")if(!W.isParent())Lt=lt.get(W.id()),at.nodes.push({x:L[B].xCoords[Lt]-W.boundingbox().w/2,y:L[B].yCoords[Lt]-W.boundingbox().h/2,width:W.boundingbox().w,height:W.boundingbox().h});else{var pt=p.calcBoundingBox(W,L[B].xCoords,L[B].yCoords,lt);at.nodes.push({x:pt.topLeftX,y:pt.topLeftY,width:pt.width,height:pt.height})}else R[B][W.id()]&&at.nodes.push({x:R[B][W.id()].getLeft(),y:R[B][W.id()].getTop(),width:R[B][W.id()].getWidth(),height:R[B][W.id()].getHeight()})}),H.edges().forEach(function(W){var pt=W.source(),vt=W.target();if(pt.css("display")!="none"&&vt.css("display")!="none")if(g.quality=="draft"){var Bt=lt.get(pt.id()),Ut=lt.get(vt.id()),It=[],Mt=[];if(pt.isParent()){var Yt=p.calcBoundingBox(pt,L[B].xCoords,L[B].yCoords,lt);It.push(Yt.topLeftX+Yt.width/2),It.push(Yt.topLeftY+Yt.height/2)}else It.push(L[B].xCoords[Bt]),It.push(L[B].yCoords[Bt]);if(vt.isParent()){var Ht=p.calcBoundingBox(vt,L[B].xCoords,L[B].yCoords,lt);Mt.push(Ht.topLeftX+Ht.width/2),Mt.push(Ht.topLeftY+Ht.height/2)}else Mt.push(L[B].xCoords[Ut]),Mt.push(L[B].yCoords[Ut]);at.edges.push({startX:It[0],startY:It[1],endX:Mt[0],endY:Mt[1]})}else R[B][pt.id()]&&R[B][vt.id()]&&at.edges.push({startX:R[B][pt.id()].getCenterX(),startY:R[B][pt.id()].getCenterY(),endX:R[B][vt.id()].getCenterX(),endY:R[B][vt.id()].getCenterY()})}),at.nodes.length>0&&(F.push(at),G.add(B))}});var V=q.packComponents(F,g.randomize).shifts;if(g.quality=="draft")L.forEach(function(H,B){var lt=H.xCoords.map(function(Lt){return Lt+V[B].dx}),at=H.yCoords.map(function(Lt){return Lt+V[B].dy});H.xCoords=lt,H.yCoords=at});else{var J=0;G.forEach(function(H){Object.keys(R[H]).forEach(function(B){var lt=R[H][B];lt.setCenter(lt.getCenterX()+V[J].dx,lt.getCenterY()+V[J].dy)}),J++})}}}else{var k=g.eles.boundingBox();if(U.push({x:k.x1+k.w/2,y:k.y1+k.h/2}),g.randomize){var X=o(g);L.push(X)}g.quality=="default"||g.quality=="proof"?(R.push(i(g,L[0])),p.relocateComponent(U[0],R[0],g)):p.relocateComponent(U[0],L[0],g)}var O=function(H,B){if(g.quality=="default"||g.quality=="proof"){typeof H=="number"&&(H=B);var lt=void 0,at=void 0,Lt=H.data("id");return R.forEach(function(pt){Lt in pt&&(lt={x:pt[Lt].getRect().getCenterX(),y:pt[Lt].getRect().getCenterY()},at=pt[Lt])}),g.nodeDimensionsIncludeLabels&&(at.labelWidth&&(at.labelPosHorizontal=="left"?lt.x+=at.labelWidth/2:at.labelPosHorizontal=="right"&&(lt.x-=at.labelWidth/2)),at.labelHeight&&(at.labelPosVertical=="top"?lt.y+=at.labelHeight/2:at.labelPosVertical=="bottom"&&(lt.y-=at.labelHeight/2))),lt??(lt={x:H.position("x"),y:H.position("y")}),{x:lt.x,y:lt.y}}else{var W=void 0;return L.forEach(function(pt){var vt=pt.nodeIndexes.get(H.id());vt!=null&&(W={x:pt.xCoords[vt],y:pt.yCoords[vt]})}),W??(W={x:H.position("x"),y:H.position("y")}),{x:W.x,y:W.y}}};if(g.quality=="default"||g.quality=="proof"||g.randomize){var z=p.calcParentsWithoutChildren(v,T),et=T.filter(function(H){return H.css("display")=="none"});g.eles=T.not(et),T.nodes().not(":parent").not(et).layoutPositions(c,g,O),z.length>0&&z.forEach(function(H){H.position(O(H))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),h})()}),657:((r,n,t)=>{var e=t(548),s=t(140).layoutBase.Matrix,a=t(140).layoutBase.SVD;r.exports={spectralLayout:function(p){var o=p.cy,i=p.eles,d=i.nodes(),h=i.nodes(":parent"),c=new Map,g=new Map,v=new Map,T=[],L=[],R=[],S=[],U=[],q=[],Z=[],D=[],Q=void 0,l=1e8,E=1e-9,u=p.piTol,y=p.samplingType,m=p.nodeSeparation,A=void 0,w=function(){for(var st=0,ot=0,ct=!1;ot<A;){st=Math.floor(Math.random()*Q),ct=!1;for(var _=0;_<ot;_++)if(S[_]==st){ct=!0;break}if(!ct)S[ot]=st,ot++;else continue}},b=function(st,ot,ct){for(var _=[],P=0,$=0,j=0,tt=void 0,Et=[],yt=0,it=1,ft=0;ft<Q;ft++)Et[ft]=l;for(_[$]=st,Et[st]=0;$>=P;){j=_[P++];for(var _t=T[j],wt=0;wt<_t.length;wt++)tt=g.get(_t[wt]),Et[tt]==l&&(Et[tt]=Et[j]+1,_[++$]=tt);q[j][ot]=Et[j]*m}if(ct){for(var mt=0;mt<Q;mt++)q[mt][ot]<U[mt]&&(U[mt]=q[mt][ot]);for(var ht=0;ht<Q;ht++)U[ht]>yt&&(yt=U[ht],it=ht)}return it},G=function(st){var ot=void 0;if(st){ot=Math.floor(Math.random()*Q);for(var ct=0;ct<Q;ct++)U[ct]=l;for(var _=0;_<A;_++)S[_]=ot,ot=b(ot,_,st)}else{w();for(var P=0;P<A;P++)b(S[P],P,st,!1)}for(var $=0;$<Q;$++)for(var j=0;j<A;j++)q[$][j]*=q[$][j];for(var tt=0;tt<A;tt++)Z[tt]=[];for(var Et=0;Et<A;Et++)for(var yt=0;yt<A;yt++)Z[Et][yt]=q[S[yt]][Et]},F=function(){for(var st=a.svd(Z),ot=st.S,ct=st.U,_=st.V,P=ot[0]*ot[0]*ot[0],$=[],j=0;j<A;j++){$[j]=[];for(var tt=0;tt<A;tt++)$[j][tt]=0,j==tt&&($[j][tt]=ot[j]/(ot[j]*ot[j]+P/(ot[j]*ot[j])))}D=s.multMat(s.multMat(_,$),s.transpose(ct))},Y=function(){for(var st=void 0,ot=void 0,ct=[],_=[],P=[],$=[],j=0;j<Q;j++)ct[j]=Math.random(),_[j]=Math.random();ct=s.normalize(ct),_=s.normalize(_);for(var tt=0,Et=E,yt=E,it=void 0;;){tt++;for(var ft=0;ft<Q;ft++)P[ft]=ct[ft];if(ct=s.multGamma(s.multL(s.multGamma(P),q,D)),st=s.dotProduct(P,ct),ct=s.normalize(ct),Et=s.dotProduct(P,ct),it=Math.abs(Et/yt),it<=1+u&&it>=1)break;yt=Et}for(var _t=0;_t<Q;_t++)P[_t]=ct[_t];for(tt=0,yt=E;;){tt++;for(var wt=0;wt<Q;wt++)$[wt]=_[wt];if($=s.minusOp($,s.multCons(P,s.dotProduct(P,$))),_=s.multGamma(s.multL(s.multGamma($),q,D)),ot=s.dotProduct($,_),_=s.normalize(_),Et=s.dotProduct($,_),it=Math.abs(Et/yt),it<=1+u&&it>=1)break;yt=Et}for(var mt=0;mt<Q;mt++)$[mt]=_[mt];L=s.multCons(P,Math.sqrt(Math.abs(st))),R=s.multCons($,Math.sqrt(Math.abs(ot)))};e.connectComponents(o,i,e.getTopMostNodes(d),c),h.forEach(function(st){e.connectComponents(o,i,e.getTopMostNodes(st.descendants().intersection(i)),c)});for(var V=0,J=0;J<d.length;J++)d[J].isParent()||g.set(d[J].id(),V++);var k=!0,X=!1,O=void 0;try{for(var z=c.keys()[Symbol.iterator](),et;!(k=(et=z.next()).done);k=!0){var H=et.value;g.set(H,V++)}}catch(st){X=!0,O=st}finally{try{!k&&z.return&&z.return()}finally{if(X)throw O}}for(var B=0;B<g.size;B++)T[B]=[];h.forEach(function(st){for(var ot=st.children().intersection(i);ot.nodes(":childless").length==0;)ot=ot.nodes()[0].children().intersection(i);var ct=0,_=ot.nodes(":childless")[0].connectedEdges().length;ot.nodes(":childless").forEach(function(P,$){P.connectedEdges().length<_&&(_=P.connectedEdges().length,ct=$)}),v.set(st.id(),ot.nodes(":childless")[ct].id())}),d.forEach(function(st){var ot=void 0;ot=st.isParent()?g.get(v.get(st.id())):g.get(st.id()),st.neighborhood().nodes().forEach(function(ct){i.intersection(st.edgesWith(ct)).length>0&&(ct.isParent()?T[ot].push(v.get(ct.id())):T[ot].push(ct.id()))})});var lt=function(st){var ot=g.get(st),ct=void 0;c.get(st).forEach(function(_){ct=o.getElementById(_).isParent()?v.get(_):_,T[ot].push(ct),T[g.get(ct)].push(st)})},at=!0,Lt=!1,W=void 0;try{for(var pt=c.keys()[Symbol.iterator](),vt;!(at=(vt=pt.next()).done);at=!0){var Bt=vt.value;lt(Bt)}}catch(st){Lt=!0,W=st}finally{try{!at&&pt.return&&pt.return()}finally{if(Lt)throw W}}Q=g.size;var Ut=void 0;if(Q>2){A=Q<p.sampleSize?Q:p.sampleSize;for(var It=0;It<Q;It++)q[It]=[];for(var Mt=0;Mt<A;Mt++)D[Mt]=[];return p.quality=="draft"||p.step=="all"?(G(y),F(),Y(),Ut={nodeIndexes:g,xCoords:L,yCoords:R}):(g.forEach(function(st,ot){L.push(o.getElementById(ot).position("x")),R.push(o.getElementById(ot).position("y"))}),Ut={nodeIndexes:g,xCoords:L,yCoords:R}),Ut}else{var Yt=g.keys(),Ht=o.getElementById(Yt.next().value),Rt=Ht.position(),Vt=Ht.outerWidth();if(L.push(Rt.x),R.push(Rt.y),Q==2){var Gt=o.getElementById(Yt.next().value).outerWidth();L.push(Rt.x+Vt/2+Gt/2+p.idealEdgeLength),R.push(Rt.y)}return Ut={nodeIndexes:g,xCoords:L,yCoords:R},Ut}}}}),579:((r,n,t)=>{var e=t(212),s=function(a){a&&a("layout","fcose",e)};typeof cytoscape<"u"&&s(cytoscape),r.exports=s}),140:(r=>{r.exports=C})},N={};function f(r){var n=N[r];if(n!==void 0)return n.exports;var t=N[r]={exports:{}};return x[r](t,t.exports,f),t.exports}return f(579)})()})}))(),1),_e={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:gt(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:gt(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:gt(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},oe={L:gt((I,M)=>I-M+2,"L"),R:gt((I,M)=>I-2,"R"),T:gt((I,M)=>I-M+2,"T"),B:gt((I,M)=>I-2,"B")},si=gt(function(I){return St(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Me=gt(function(I){let M=I;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),St=gt(function(I){let M=I;return M==="L"||M==="R"},"isArchitectureDirectionX"),Wt=gt(function(I){let M=I;return M==="T"||M==="B"},"isArchitectureDirectionY"),fe=gt(function(I,M){let C=St(I)&&Wt(M),x=Wt(I)&&St(M);return C||x},"isArchitectureDirectionXY"),hi=gt(function(I){let M=I[0],C=I[1],x=St(M)&&Wt(C),N=Wt(M)&&St(C);return x||N},"isArchitecturePairXY"),li=gt(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(I,M){let C=`${I}${M}`;return li(C)?C:void 0},"getArchitectureDirectionPair"),di=gt(function([I,M],C){let x=C[0],N=C[1];return St(x)?Wt(N)?[I+(x==="L"?-1:1),M+(N==="T"?1:-1)]:[I+(x==="L"?-1:1),M]:St(N)?[I+(N==="L"?1:-1),M+(x==="T"?1:-1)]:[I,M+(x==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),gi=gt(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),ci=gt(function(I,M){return fe(I,M)?"bend":St(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ui=gt(function(I){return I.type==="service"},"isArchitectureService"),fi=gt(function(I){return I.type==="junction"},"isArchitectureJunction"),xe=gt(I=>I.data(),"edgeData"),Jt=gt(I=>I.data(),"nodeData"),pi=Qe.architecture,Oe=(te=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=Be,this.getAccTitle=Je,this.setDiagramTitle=qe,this.getDiagramTitle=Ve,this.getAccDescription=$e,this.setAccDescription=ti,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},Ze()}addService({id:M,icon:C,in:x,title:N,iconText:f}){if(this.registeredIds[M]!==void 0)throw Error(`The service id [${M}] is already in use by another ${this.registeredIds[M]}`);if(x!==void 0){if(M===x)throw Error(`The service [${M}] cannot be placed within itself`);if(this.registeredIds[x]===void 0)throw Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[x]==="node")throw Error(`The service [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"service",icon:C,iconText:f,title:N,edges:[],in:x}}getServices(){return Object.values(this.nodes).filter(ui)}addJunction({id:M,in:C}){this.registeredIds[M]="node",this.nodes[M]={id:M,type:"junction",edges:[],in:C}}getJunctions(){return Object.values(this.nodes).filter(fi)}getNodes(){return Object.values(this.nodes)}getNode(M){return this.nodes[M]??null}addGroup({id:M,icon:C,in:x,title:N}){var f,r,n;if(((f=this.registeredIds)==null?void 0:f[M])!==void 0)throw Error(`The group id [${M}] is already in use by another ${this.registeredIds[M]}`);if(x!==void 0){if(M===x)throw Error(`The group [${M}] cannot be placed within itself`);if(((r=this.registeredIds)==null?void 0:r[x])===void 0)throw Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(((n=this.registeredIds)==null?void 0:n[x])==="node")throw Error(`The group [${M}]'s parent is not a group`)}this.registeredIds[M]="group",this.groups[M]={id:M,icon:C,title:N,in:x}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:M,rhsId:C,lhsDir:x,rhsDir:N,lhsInto:f,rhsInto:r,lhsGroup:n,rhsGroup:t,title:e}){if(!Me(x))throw Error(`Invalid direction given for left hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(x)}`);if(!Me(N))throw Error(`Invalid direction given for right hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);let s=this.nodes[M].in,a=this.nodes[C].in;if(n&&s&&a&&s==a)throw Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(t&&s&&a&&s==a)throw Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let p={lhsId:M,lhsDir:x,lhsInto:f,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:r,rhsGroup:t,title:e};this.edges.push(p),this.nodes[M]&&this.nodes[C]&&(this.nodes[M].edges.push(this.edges[this.edges.length-1]),this.nodes[C].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let M={},C=Object.entries(this.nodes).reduce((t,[e,s])=>(t[e]=s.edges.reduce((a,p)=>{var d,h;let o=(d=this.getNode(p.lhsId))==null?void 0:d.in,i=(h=this.getNode(p.rhsId))==null?void 0:h.in;if(o&&i&&o!==i){let c=ci(p.lhsDir,p.rhsDir);c!=="bend"&&(M[o]??(M[o]={}),M[o][i]=c,M[i]??(M[i]={}),M[i][o]=c)}if(p.lhsId===e){let c=pe(p.lhsDir,p.rhsDir);c&&(a[c]=p.rhsId)}else{let c=pe(p.rhsDir,p.lhsDir);c&&(a[c]=p.lhsId)}return a},{}),t),{}),x=Object.keys(C)[0],N={[x]:1},f=Object.keys(C).reduce((t,e)=>e===x?t:{...t,[e]:1},{}),r=gt(t=>{let e={[t]:[0,0]},s=[t];for(;s.length>0;){let a=s.shift();if(a){N[a]=1,delete f[a];let p=C[a],[o,i]=e[a];Object.entries(p).forEach(([d,h])=>{N[h]||(e[h]=di([o,i],d),s.push(h))})}}return e},"BFS"),n=[r(x)];for(;Object.keys(f).length>0;)n.push(r(Object.keys(f)[0]));this.dataStructures={adjList:C,spatialMaps:n,groupAlignments:M}}return this.dataStructures}setElementForId(M,C){this.elements[M]=C}getElementById(M){return this.elements[M]}getConfig(){return ze({...pi,...Ke().architecture})}getConfigField(M){return this.getConfig()[M]}},gt(te,"ArchitectureDB"),te),mi=gt((I,M)=>{oi(I,M),I.groups.map(C=>M.addGroup(C)),I.services.map(C=>M.addService({...C,type:"service"})),I.junctions.map(C=>M.addJunction({...C,type:"junction"})),I.edges.map(C=>M.addEdge(C))},"populateDb"),De={parser:{yy:void 0},parse:gt(async I=>{var x;let M=await ni("architecture",I);Ae.debug(M);let C=(x=De.parser)==null?void 0:x.yy;if(!(C instanceof Oe))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");mi(M,C)},"parse")},vi=gt(I=>`
2
2
  .edge {
3
3
  stroke-width: ${I.archEdgeWidth};
4
4
  stroke: ${I.archEdgeColor};