@marimo-team/frontend 0.15.5 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-Cn5-l2X1.js → ConnectedDataExplorerComponent-BErMbWvG.js} +1 -1
  2. package/dist/assets/{ImageComparisonComponent-CEXMKKA4.js → ImageComparisonComponent-fTHv1Ih0.js} +1 -1
  3. package/dist/assets/{VegaLite-Bt14Ds9k.js → VegaLite-Bdi-TyfY.js} +6 -6
  4. package/dist/assets/_baseEach-CNBxBxvS.js +1 -0
  5. package/dist/assets/_baseMap-D1WHjKrd.js +1 -0
  6. package/dist/assets/_baseUniq-CCgDNtZb.js +1 -0
  7. package/dist/assets/_createAggregator-DcD0kTA5.js +1 -0
  8. package/dist/assets/agent-panel-Crv430aI.js +268 -0
  9. package/dist/assets/agent-panel-D92Mfy1i.css +1 -0
  10. package/dist/assets/{any-language-editor-DiwNT6zp.js → any-language-editor-CQh552Wu.js} +1 -1
  11. package/dist/assets/architectureDiagram-W76B3OCA-BAJeBxzt.js +36 -0
  12. package/dist/assets/{between-horizontal-start-FyewyCGn.js → between-horizontal-start-Boxgxbt_.js} +1 -1
  13. package/dist/assets/{blockDiagram-QIGZ2CNN-BrOkAf_c.js → blockDiagram-QIGZ2CNN-CL-1svEK.js} +1 -1
  14. package/dist/assets/{c4Diagram-FPNF74CW-BHPzDxE2.js → c4Diagram-FPNF74CW-BbEqbCTl.js} +5 -5
  15. package/dist/assets/channel-_2eNSz0n.js +1 -0
  16. package/dist/assets/chat-panel-CXh5Wl6C.js +3 -0
  17. package/dist/assets/{chunk-4BX2VUAB-DLxaCNYh.js → chunk-4BX2VUAB-C--8TXeE.js} +1 -1
  18. package/dist/assets/{chunk-55IACEB6-DdzvO3HR.js → chunk-55IACEB6-Bj00HDqq.js} +1 -1
  19. package/dist/assets/{chunk-FMBD7UC4-R5o-nSiG.js → chunk-FMBD7UC4-C-lhB6hN.js} +1 -1
  20. package/dist/assets/{chunk-K7UQS3LO-DxaMrGgG.js → chunk-K7UQS3LO-B-pGTXPt.js} +1 -1
  21. package/dist/assets/{chunk-QN33PNHL-DqS9-FYm.js → chunk-QN33PNHL-DqUzGhvm.js} +1 -1
  22. package/dist/assets/{chunk-QZHKN3VN-BZ-TzajS.js → chunk-QZHKN3VN-TntJHfSk.js} +1 -1
  23. package/dist/assets/{chunk-TVAH2DTR-BsgP2dyv.js → chunk-TVAH2DTR-HUJb1psV.js} +1 -1
  24. package/dist/assets/{chunk-TZMSLE5B-D-h3ahXI.js → chunk-TZMSLE5B-BK3C__t3.js} +1 -1
  25. package/dist/assets/{circle-play-CQtRZ-rT.js → circle-play-DBLOv1Yu.js} +1 -1
  26. package/dist/assets/classDiagram-KNZD7YFC-BGmh9POF.js +1 -0
  27. package/dist/assets/classDiagram-v2-RKCZMP56-BGmh9POF.js +1 -0
  28. package/dist/assets/{clear-button-BY6Z_ViL.js → clear-button-BeoFbEKH.js} +1 -1
  29. package/dist/assets/clone-BFDSPAj3.js +1 -0
  30. package/dist/assets/command-palette-CXZiSv0I.js +1 -0
  31. package/dist/assets/common-C7oJcmCT.js +1 -0
  32. package/dist/assets/{compile-Ct_jzdKr.js → compile-7L0MwhyI.js} +1 -1
  33. package/dist/assets/cose-bilkent-S5V4N54A-BMkGLcVC.js +1 -0
  34. package/dist/assets/dagre-5GWH7T2D-BJtRienS.js +4 -0
  35. package/dist/assets/{data-grid-overlay-editor-BN_wulc3.js → data-grid-overlay-editor-DBkmGtNs.js} +1 -1
  36. package/dist/assets/datasources-panel-B7FbYLiy.js +1 -0
  37. package/dist/assets/{dependency-graph-panel-BOmSCZf7.js → dependency-graph-panel-DEdOxp2X.js} +4 -4
  38. package/dist/assets/diagram-N5W7TBWH-CmECY3nb.js +24 -0
  39. package/dist/assets/diagram-QEK2KX5R-DMOVSNKD.js +43 -0
  40. package/dist/assets/diagram-S2PKOQOG-BiJ96PNQ.js +24 -0
  41. package/dist/assets/{documentation-panel-BxjJO_Gw.js → documentation-panel-xULhaEv3.js} +1 -1
  42. package/dist/assets/edit-page-BrYda9VE.js +129 -0
  43. package/dist/assets/{ellipsis-vertical-UHbmjI2n.js → ellipsis-vertical-BBqXIlc2.js} +1 -1
  44. package/dist/assets/{empty-state-BIBXzY_0.js → empty-state-B3dA3G5P.js} +1 -1
  45. package/dist/assets/{erDiagram-AWTI2OKA-E84mAle_.js → erDiagram-AWTI2OKA-MP1DiFRo.js} +1 -1
  46. package/dist/assets/{error-panel-MEvQ6K7h.js → error-panel-Cc1sv-Ag.js} +1 -1
  47. package/dist/assets/file-explorer-panel-Bw59Kva1.js +1 -0
  48. package/dist/assets/{flowDiagram-PVAE7QVJ-DfbIRSAW.js → flowDiagram-PVAE7QVJ-BX7caPp7.js} +1 -1
  49. package/dist/assets/{ganttDiagram-OWAHRB6G-DR4HZ1z_.js → ganttDiagram-OWAHRB6G-B462g4Yf.js} +3 -3
  50. package/dist/assets/gitGraphDiagram-NY62KEGX-CGgvZ9-9.js +65 -0
  51. package/dist/assets/{glide-data-editor-nNmo1lPq.js → glide-data-editor-C0gUFZON.js} +4 -4
  52. package/dist/assets/graph-CHRVBzY5.js +1 -0
  53. package/dist/assets/{home-page-9eW6qida.js → home-page-Fb2osjys.js} +3 -3
  54. package/dist/assets/{index-DMomwMcN.js → index-BVgAenPd.js} +1 -1
  55. package/dist/assets/{index-B8llrTSo.js → index-BY93Ejhl.js} +1 -1
  56. package/dist/assets/{index-BFSnz7iM.js → index-C-8WADat.js} +1 -1
  57. package/dist/assets/{index-CPN7TRA1.js → index-C-GhZ7ti.js} +1 -1
  58. package/dist/assets/{index-DyLSuOH1.js → index-C1v_Z9et.js} +1 -1
  59. package/dist/assets/{index-VPWqq2Pg.js → index-C4Tn5NvJ.js} +1 -1
  60. package/dist/assets/{index-BAH034Ue.js → index-C77h_TXN.js} +1 -1
  61. package/dist/assets/{index-Dt9UWeWn.js → index-CQDrxQ0j.js} +1 -1
  62. package/dist/assets/{index-DWOaniGT.js → index-CWMgowgL.js} +1 -1
  63. package/dist/assets/{index-B1_GXGaP.js → index-Clbi_Yaq.js} +1 -1
  64. package/dist/assets/{index-B7yXbrLa.js → index-CpTPJo4k.js} +1 -1
  65. package/dist/assets/{index-CknhX2Vy.css → index-Cx0bsY1w.css} +1 -1
  66. package/dist/assets/{index-DqzMPAC8.js → index-D1vmG6DS.js} +2 -2
  67. package/dist/assets/{index-c6If577Q.js → index-D9UKkrr2.js} +1 -1
  68. package/dist/assets/{index-CB2pnVQG.js → index-DEQvTChO.js} +1 -1
  69. package/dist/assets/{index-OC46250R.js → index-DKEudB02.js} +205 -197
  70. package/dist/assets/{index-CSgxTUzD.js → index-DRMm6SNo.js} +1 -1
  71. package/dist/assets/{index-Bq516OmX.js → index-DoRmcrKM.js} +1 -1
  72. package/dist/assets/{index-DSU75csX.js → index-lYa_leQE.js} +1 -1
  73. package/dist/assets/{index-BLu5CX6z.js → index-vmICa5KN.js} +1 -1
  74. package/dist/assets/{index-uacyUula.js → index-z9bohSQJ.js} +1 -1
  75. package/dist/assets/infoDiagram-STP46IZ2-CVyrdLc8.js +2 -0
  76. package/dist/assets/isEmpty-DU_ogP_D.js +1 -0
  77. package/dist/assets/{journeyDiagram-BIP6EPQ6-BBiFyygf.js → journeyDiagram-BIP6EPQ6-C6EgLP_Q.js} +1 -1
  78. package/dist/assets/{kanban-definition-6OIFK2YF-DhgA6Nt6.js → kanban-definition-6OIFK2YF-BXzYO1yj.js} +4 -4
  79. package/dist/assets/layout-jihVw5-i.js +1 -0
  80. package/dist/assets/linear-C4blANlC.js +1 -0
  81. package/dist/assets/{links-CbvGxbsJ.js → links-D59GIweI.js} +3 -3
  82. package/dist/assets/{logs-panel-B9SmTZAW.js → logs-panel-D401qzZh.js} +1 -1
  83. package/dist/assets/markdown-renderer-Cd9eYyaL.js +263 -0
  84. package/dist/assets/{agent-panel-DpQ6muj-.css → markdown-renderer-ClyzDMmG.css} +1 -1
  85. package/dist/assets/mermaid-BEVuRz_O.js +1 -0
  86. package/dist/assets/{mermaid.core-4nVOEVX3.js → mermaid.core-CaSnaLH0.js} +41 -41
  87. package/dist/assets/min-DUMu_zeK.js +1 -0
  88. package/dist/assets/{mindmap-definition-Q6HEUPPD-CVLQNn1q.js → mindmap-definition-Q6HEUPPD-BXUM5MT2.js} +2 -2
  89. package/dist/assets/{number-overlay-editor-CzRzXLcd.js → number-overlay-editor-4uWXGlPG.js} +1 -1
  90. package/dist/assets/{outline-panel-uvsS-YEQ.js → outline-panel-DIzkvm2I.js} +1 -1
  91. package/dist/assets/packages-panel-CJL0MVlj.js +1 -0
  92. package/dist/assets/{pieDiagram-ADFJNKIX-C5IQ5DBZ.js → pieDiagram-ADFJNKIX-Dxt5PVNo.js} +3 -3
  93. package/dist/assets/{quadrantDiagram-LMRXKWRM-CFXFnQxx.js → quadrantDiagram-LMRXKWRM-D4pUaA31.js} +1 -1
  94. package/dist/assets/{react-plotly-mzdv02_Y.js → react-plotly-cJZ0VWBq.js} +1 -1
  95. package/dist/assets/{requirementDiagram-4UW4RH46-D9bPC89T.js → requirementDiagram-4UW4RH46-DVRTjgas.js} +1 -1
  96. package/dist/assets/run-page-BUEnMC9w.js +1 -0
  97. package/dist/assets/sankeyDiagram-GR3RE2ED-CVFnD9C-.js +10 -0
  98. package/dist/assets/scratchpad-panel-BIgRENkI.js +1 -0
  99. package/dist/assets/secrets-panel-xY5-V_BD.js +1 -0
  100. package/dist/assets/{sequenceDiagram-C3RYC4MD-6N7_hY4k.js → sequenceDiagram-C3RYC4MD-_lY4ZN_S.js} +4 -4
  101. package/dist/assets/{slides-component-EcjC8sDK.js → slides-component-Xjymwj7X.js} +1 -1
  102. package/dist/assets/snippets-panel-CTPYW41n.js +1 -0
  103. package/dist/assets/sortBy-BNZKwiq_.js +1 -0
  104. package/dist/assets/state-C4NiC9tO.js +1 -0
  105. package/dist/assets/stateDiagram-KXAO66HF-Da0JQWCn.js +1 -0
  106. package/dist/assets/stateDiagram-v2-UMBNRL4Z-D5lYZOOt.js +1 -0
  107. package/dist/assets/storage-CMdLzB_c.js +26 -0
  108. package/dist/assets/terminal-BPwTkXae.js +10 -0
  109. package/dist/assets/time-Dv5_Ouz_.js +1 -0
  110. package/dist/assets/{timeline-definition-XQNQX7LJ-BEaynAiY.js → timeline-definition-XQNQX7LJ-Dxh5Zu2e.js} +1 -1
  111. package/dist/assets/tracing-BCIurUfa.js +2 -0
  112. package/dist/assets/{tracing-panel-BmuHLPrY.js → tracing-panel-DAzrzNmm.js} +2 -2
  113. package/dist/assets/{trash-UBqfK4mR.js → trash-Dc6DSjz_.js} +1 -1
  114. package/dist/assets/{tree-XiEycetl.js → tree-jheoerAX.js} +1 -1
  115. package/dist/assets/{treemap-75Q7IDZK-CnuVFbBG.js → treemap-75Q7IDZK-IgpxeGaf.js} +21 -21
  116. package/dist/assets/{ts-tags-CloPe9IY.js → ts-tags-DxCDHihD.js} +1 -1
  117. package/dist/assets/variable-panel-DYAiLBmF.js +1 -0
  118. package/dist/assets/{vega-component-DsTH4tuX.js → vega-component-BpfpiPKI.js} +1 -1
  119. package/dist/assets/{xychartDiagram-6GGTOJPD-Dcz3O-A3.js → xychartDiagram-6GGTOJPD-CmNigJ31.js} +1 -1
  120. package/dist/index.html +2 -2
  121. package/package.json +8 -4
  122. package/src/__tests__/mocks.ts +43 -0
  123. package/src/components/app-config/user-config-form.tsx +32 -0
  124. package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +55 -23
  125. package/src/components/chat/acp/__tests__/context-utils.test.ts +222 -0
  126. package/src/components/chat/acp/__tests__/prompt.test.ts +1 -1
  127. package/src/components/chat/acp/__tests__/state.test.ts +2 -6
  128. package/src/components/chat/acp/agent-docs.tsx +33 -6
  129. package/src/components/chat/acp/agent-panel.css +0 -18
  130. package/src/components/chat/acp/agent-panel.tsx +397 -72
  131. package/src/components/chat/acp/agent-selector.tsx +7 -1
  132. package/src/components/chat/acp/blocks.tsx +40 -10
  133. package/src/components/chat/acp/common.tsx +10 -2
  134. package/src/components/chat/acp/context-utils.ts +127 -0
  135. package/src/components/chat/acp/prompt.ts +34 -10
  136. package/src/components/chat/acp/state.ts +1 -1
  137. package/src/components/chat/acp/types.ts +8 -0
  138. package/src/components/chat/chat-panel.tsx +23 -88
  139. package/src/components/chat/chat-utils.ts +127 -1
  140. package/src/components/chat/markdown-renderer.css +39 -0
  141. package/src/components/chat/markdown-renderer.tsx +7 -38
  142. package/src/components/chat/tool-call-accordion.tsx +113 -23
  143. package/src/components/editor/Cell.tsx +6 -0
  144. package/src/components/editor/actions/name-cell-input.tsx +6 -1
  145. package/src/components/editor/actions/useCellActionButton.tsx +3 -1
  146. package/src/components/editor/ai/__tests__/completion-utils.test.ts +178 -1
  147. package/src/components/editor/ai/add-cell-with-ai.tsx +68 -66
  148. package/src/components/editor/ai/ai-completion-editor.tsx +29 -26
  149. package/src/components/editor/ai/completion-handlers.tsx +44 -6
  150. package/src/components/editor/ai/completion-utils.ts +92 -0
  151. package/src/components/editor/ai/transport/chat-transport.tsx +36 -0
  152. package/src/components/editor/cell/StagedAICell.tsx +51 -0
  153. package/src/components/editor/cell/cell-actions.tsx +2 -1
  154. package/src/components/terminal/__tests__/state.test.ts +207 -0
  155. package/src/components/terminal/hooks.ts +41 -0
  156. package/src/components/terminal/state.ts +75 -0
  157. package/src/components/terminal/terminal.tsx +334 -13
  158. package/src/components/terminal/theme.tsx +56 -0
  159. package/src/core/ai/__tests__/staged-cells.test.ts +356 -0
  160. package/src/core/ai/staged-cells.ts +208 -0
  161. package/src/core/cells/cells.ts +1 -1
  162. package/src/core/codemirror/lsp/federated-lsp.ts +1 -1
  163. package/src/core/islands/main.ts +2 -2
  164. package/src/core/kernel/messages.ts +8 -12
  165. package/src/core/saving/__tests__/filename.test.ts +37 -0
  166. package/src/core/static/__tests__/download-html.test.ts +43 -1
  167. package/src/core/websocket/useMarimoWebSocket.tsx +2 -2
  168. package/src/css/app/Cell.css +11 -0
  169. package/src/plugins/core/RenderHTML.tsx +36 -2
  170. package/src/plugins/core/__test__/RenderHTML.test.ts +72 -0
  171. package/src/plugins/core/registerReactComponent.tsx +28 -0
  172. package/src/plugins/impl/FileBrowserPlugin.tsx +8 -2
  173. package/src/stories/cell.stories.tsx +1 -1
  174. package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
  175. package/src/utils/__tests__/cell-urls.test.ts +29 -0
  176. package/src/utils/__tests__/filenames.test.ts +18 -0
  177. package/src/utils/__tests__/path.test.ts +38 -0
  178. package/src/utils/__tests__/urls.test.ts +56 -1
  179. package/src/utils/errors.ts +9 -0
  180. package/dist/assets/_baseEach-C1FLm7WW.js +0 -1
  181. package/dist/assets/_baseMap-DBVArUYD.js +0 -1
  182. package/dist/assets/_baseUniq-Dk7ZPJ3N.js +0 -1
  183. package/dist/assets/_createAggregator-Bn38fDd3.js +0 -1
  184. package/dist/assets/agent-panel-COUYnuIK.js +0 -475
  185. package/dist/assets/architectureDiagram-W76B3OCA-DBzWQKKu.js +0 -36
  186. package/dist/assets/channel-CjhbjOv4.js +0 -1
  187. package/dist/assets/chat-panel-BPXKoTnZ.js +0 -7
  188. package/dist/assets/chat-panel-Brrs_eeH.css +0 -1
  189. package/dist/assets/classDiagram-KNZD7YFC-DHs5cFzy.js +0 -1
  190. package/dist/assets/classDiagram-v2-RKCZMP56-DHs5cFzy.js +0 -1
  191. package/dist/assets/clone-DM1YNjEn.js +0 -1
  192. package/dist/assets/command-palette-S0bzQp7v.js +0 -1
  193. package/dist/assets/common-B8U9k2Ly.js +0 -1
  194. package/dist/assets/cose-bilkent-S5V4N54A-wz1Sfx7j.js +0 -1
  195. package/dist/assets/dagre-5GWH7T2D-BfpcVBgq.js +0 -4
  196. package/dist/assets/datasources-panel-DfuURLJw.js +0 -1
  197. package/dist/assets/diagram-N5W7TBWH-Bf0oqqQh.js +0 -24
  198. package/dist/assets/diagram-QEK2KX5R-ZTc3qikh.js +0 -43
  199. package/dist/assets/diagram-S2PKOQOG-tLScBy7Z.js +0 -24
  200. package/dist/assets/edit-page-DJ8kJZ9w.js +0 -129
  201. package/dist/assets/file-explorer-panel-CzNUJ63G.js +0 -1
  202. package/dist/assets/gitGraphDiagram-NY62KEGX-C1t6QtVa.js +0 -65
  203. package/dist/assets/graph-CssCVWIq.js +0 -1
  204. package/dist/assets/index-DcCIe7np.js +0 -28
  205. package/dist/assets/infoDiagram-STP46IZ2-CwiAoz9f.js +0 -2
  206. package/dist/assets/layout-DpQrxGW-.js +0 -1
  207. package/dist/assets/linear-NsreOeBF.js +0 -1
  208. package/dist/assets/mermaid-DSt0r6IQ.js +0 -1
  209. package/dist/assets/min-D259kI3t.js +0 -1
  210. package/dist/assets/packages-panel-xMz9W2hW.js +0 -1
  211. package/dist/assets/run-page-Bb68qdhQ.js +0 -1
  212. package/dist/assets/sankeyDiagram-GR3RE2ED-BSJOau8E.js +0 -10
  213. package/dist/assets/scratchpad-panel-BF4BO-U4.js +0 -1
  214. package/dist/assets/secrets-panel-CdIX44dQ.js +0 -1
  215. package/dist/assets/snippets-panel-Dco9h0rb.js +0 -1
  216. package/dist/assets/sortBy-aLGA-PGK.js +0 -1
  217. package/dist/assets/stateDiagram-KXAO66HF-Bd68WT3b.js +0 -1
  218. package/dist/assets/stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js +0 -1
  219. package/dist/assets/storage-CGlP4lCF.js +0 -26
  220. package/dist/assets/terminal-CxkHubcu.js +0 -9
  221. package/dist/assets/time-D2nr1UgQ.js +0 -1
  222. package/dist/assets/tracing-kTqHxa7q.js +0 -2
  223. package/dist/assets/variable-panel-noTnH-AQ.js +0 -1
@@ -0,0 +1,36 @@
1
+ var Qt;import{_ as nt,K as ze,V as Ve,l as ye,b as We,a as Be,q as je,t as qe,g as $e,s as Ze,z as Qe,F as Ke,G as Je,H as tn,c as se,a5 as ae,an as he,h as en,ao as nn,ap as rn}from"./mermaid.core-CaSnaLH0.js";import{p as on}from"./chunk-4BX2VUAB-C--8TXeE.js";import{p as sn}from"./treemap-75Q7IDZK-IgpxeGaf.js";import{c as Ee}from"./cytoscape.esm-UcEO6FGL.js";import{ai as an}from"./index-DKEudB02.js";import{s as hn}from"./transform-D9VCJYws.js";import"./step-BwsUM5iJ.js";import"./isEmpty-DU_ogP_D.js";import"./_baseEach-CNBxBxvS.js";import"./_baseUniq-CCgDNtZb.js";import"./min-DUMu_zeK.js";import"./_baseMap-D1WHjKrd.js";import"./clone-BFDSPAj3.js";import"./_createAggregator-DcD0kTA5.js";import"./timer-Bqd5yn_a.js";var Ne,Te={exports:{}},Ae={exports:{}},we={exports:{}};function ln(){return Ne?we.exports:(Ne=1,C=function(){return(function(T){var L={};function E(d){if(L[d])return L[d].exports;var r=L[d]={i:d,l:!1,exports:{}};return T[d].call(r.exports,r,r.exports,E),r.l=!0,r.exports}return E.m=T,E.c=L,E.i=function(d){return d},E.d=function(d,r,a){E.o(d,r)||Object.defineProperty(d,r,{configurable:!1,enumerable:!0,get:a})},E.n=function(d){var r=d&&d.__esModule?function(){return d.default}:function(){return d};return E.d(r,"a",r),r},E.o=function(d,r){return Object.prototype.hasOwnProperty.call(d,r)},E.p="",E(E.s=28)})([function(T,L,E){function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,T.exports=d},function(T,L,E){var d=E(2),r=E(8),a=E(9);function e(i,o,t){d.call(this,t),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=t,this.bendpoints=[],this.source=i,this.target=o}for(var n in e.prototype=Object.create(d.prototype),d)e[n]=d[n];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(i){if(this.source===i)return this.target;if(this.target===i)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(i,o){for(var t=this.getOtherEnd(i),h=o.getGraphManager().getRoot();;){if(t.getOwner()==o)return t;if(t.getOwner()==h)break;t=t.getOwner().getParent()}return null},e.prototype.updateLength=function(){var i=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),i),this.isOverlapingSourceAndTarget||(this.lengthX=i[0]-i[2],this.lengthY=i[1]-i[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},T.exports=e},function(T,L,E){T.exports=function(d){this.vGraphObject=d}},function(T,L,E){var d=E(2),r=E(10),a=E(13),e=E(0),n=E(16),i=E(5);function o(h,g,c,l){c==null&&l==null&&(l=g),d.call(this,l),h.graphManager!=null&&(h=h.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=l,this.edges=[],this.graphManager=h,this.rect=c!=null&&g!=null?new a(g.x,g.y,c.width,c.height):new a}for(var t in o.prototype=Object.create(d.prototype),d)o[t]=d[t];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(h){this.rect.width=h},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(h){this.rect.height=h},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new i(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new i(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(h,g){this.rect.x=h.x,this.rect.y=h.y,this.rect.width=g.width,this.rect.height=g.height},o.prototype.setCenter=function(h,g){this.rect.x=h-this.rect.width/2,this.rect.y=g-this.rect.height/2},o.prototype.setLocation=function(h,g){this.rect.x=h,this.rect.y=g},o.prototype.moveBy=function(h,g){this.rect.x+=h,this.rect.y+=g},o.prototype.getEdgeListToNode=function(h){var g=[],c=this;return c.edges.forEach(function(l){if(l.target==h){if(l.source!=c)throw"Incorrect edge source!";g.push(l)}}),g},o.prototype.getEdgesBetween=function(h){var g=[],c=this;return c.edges.forEach(function(l){if(l.source!=c&&l.target!=c)throw"Incorrect edge source and/or target";l.target!=h&&l.source!=h||g.push(l)}),g},o.prototype.getNeighborsList=function(){var h=new Set,g=this;return g.edges.forEach(function(c){if(c.source==g)h.add(c.target);else{if(c.target!=g)throw"Incorrect incidency!";h.add(c.source)}}),h},o.prototype.withChildren=function(){var h=new Set;if(h.add(this),this.child!=null)for(var g=this.child.getNodes(),c=0;c<g.length;c++)g[c].withChildren().forEach(function(l){h.add(l)});return h},o.prototype.getNoOfChildren=function(){var h=0;if(this.child==null)h=1;else for(var g=this.child.getNodes(),c=0;c<g.length;c++)h+=g[c].getNoOfChildren();return h==0&&(h=1),h},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.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)},o.prototype.scatter=function(){var h,g,c=-e.INITIAL_WORLD_BOUNDARY,l=e.INITIAL_WORLD_BOUNDARY;h=e.WORLD_CENTER_X+n.nextDouble()*(l-c)+c;var y=-e.INITIAL_WORLD_BOUNDARY,v=e.INITIAL_WORLD_BOUNDARY;g=e.WORLD_CENTER_Y+n.nextDouble()*(v-y)+y,this.rect.x=h,this.rect.y=g},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var h=this.getChild();if(h.updateBounds(!0),this.rect.x=h.getLeft(),this.rect.y=h.getTop(),this.setWidth(h.getRight()-h.getLeft()),this.setHeight(h.getBottom()-h.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var g=h.getRight()-h.getLeft(),c=h.getBottom()-h.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(g+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>g?(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(g+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>c?(this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(c+this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(h){var g=this.rect.x;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var c=this.rect.y;c>e.WORLD_BOUNDARY?c=e.WORLD_BOUNDARY:c<-e.WORLD_BOUNDARY&&(c=-e.WORLD_BOUNDARY);var l=new i(g,c),y=h.inverseTransformPoint(l);this.setLocation(y.x,y.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},T.exports=o},function(T,L,E){var d=E(0);function r(){}for(var a in d)r[a]=d[a];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=3*r.MAX_NODE_DISPLACEMENT_INCREMENTAL,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,T.exports=r},function(T,L,E){function d(r,a){r==null&&a==null?(this.x=0,this.y=0):(this.x=r,this.y=a)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(r){this.x=r},d.prototype.setY=function(r){this.y=r},d.prototype.getDifference=function(r){return new DimensionD(this.x-r.x,this.y-r.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(r){return this.x+=r.width,this.y+=r.height,this},T.exports=d},function(T,L,E){var d=E(2),r=E(10),a=E(0),e=E(7),n=E(3),i=E(1),o=E(13),t=E(12),h=E(11);function g(l,y,v){d.call(this,v),this.estimatedSize=r.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=l,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var c in g.prototype=Object.create(d.prototype),d)g[c]=d[c];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(l,y,v){if(y==null&&v==null){var N=l;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(N)>-1)throw"Node already in graph!";return N.owner=this,this.getNodes().push(N),N}var A=l;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(y.owner!=v.owner||y.owner!=this)throw"Both owners must be this graph!";return y.owner!=v.owner?null:(A.source=y,A.target=v,A.isInterGraph=!1,this.getEdges().push(A),y.edges.push(A),v!=y&&v.edges.push(A),A)},g.prototype.remove=function(l){var y=l;if(l instanceof n){if(y==null)throw"Node is null!";if(y.owner==null||y.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),N=v.length,A=0;A<N;A++)(M=v[A]).isInterGraph?this.graphManager.remove(M):M.source.owner.remove(M);if((P=this.nodes.indexOf(y))==-1)throw"Node not in owner node list!";this.nodes.splice(P,1)}else if(l instanceof i){var M;if((M=l)==null)throw"Edge is null!";if(M.source==null||M.target==null)throw"Source and/or target is null!";if(M.source.owner==null||M.target.owner==null||M.source.owner!=this||M.target.owner!=this)throw"Source and/or target owner is invalid!";var P,b=M.source.edges.indexOf(M),Y=M.target.edges.indexOf(M);if(!(b>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";if(M.source.edges.splice(b,1),M.target!=M.source&&M.target.edges.splice(Y,1),(P=M.source.owner.getEdges().indexOf(M))==-1)throw"Not in owner's edge list!";M.source.owner.getEdges().splice(P,1)}},g.prototype.updateLeftTop=function(){for(var l,y,v,N=r.MAX_VALUE,A=r.MAX_VALUE,M=this.getNodes(),P=M.length,b=0;b<P;b++){var Y=M[b];N>(l=Y.getTop())&&(N=l),A>(y=Y.getLeft())&&(A=y)}return N==r.MAX_VALUE?null:(v=M[0].getParent().paddingLeft!=null?M[0].getParent().paddingLeft:this.margin,this.left=A-v,this.top=N-v,new t(this.left,this.top))},g.prototype.updateBounds=function(l){for(var y,v,N,A,M,P=r.MAX_VALUE,b=-r.MAX_VALUE,Y=r.MAX_VALUE,H=-r.MAX_VALUE,q=this.nodes,_=q.length,B=0;B<_;B++){var s=q[B];l&&s.child!=null&&s.updateBounds(),P>(y=s.getLeft())&&(P=y),b<(v=s.getRight())&&(b=v),Y>(N=s.getTop())&&(Y=N),H<(A=s.getBottom())&&(H=A)}var m=new o(P,Y,b-P,H-Y);P==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),M=q[0].getParent().paddingLeft!=null?q[0].getParent().paddingLeft:this.margin,this.left=m.x-M,this.right=m.x+m.width+M,this.top=m.y-M,this.bottom=m.y+m.height+M},g.calculateBounds=function(l){for(var y,v,N,A,M=r.MAX_VALUE,P=-r.MAX_VALUE,b=r.MAX_VALUE,Y=-r.MAX_VALUE,H=l.length,q=0;q<H;q++){var _=l[q];M>(y=_.getLeft())&&(M=y),P<(v=_.getRight())&&(P=v),b>(N=_.getTop())&&(b=N),Y<(A=_.getBottom())&&(Y=A)}return new o(M,b,P-M,Y-b)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var l=0,y=this.nodes,v=y.length,N=0;N<v;N++)l+=y[N].calcEstimatedSize();return this.estimatedSize=l==0?a.EMPTY_COMPOUND_NODE_SIZE:l/Math.sqrt(this.nodes.length),this.estimatedSize},g.prototype.updateConnected=function(){var l=this;if(this.nodes.length!=0){var y,v,N=new h,A=new Set,M=this.nodes[0];for(M.withChildren().forEach(function(H){N.push(H),A.add(H)});N.length!==0;)for(var P=(y=(M=N.shift()).getEdges()).length,b=0;b<P;b++)(v=y[b].getOtherEndInGraph(M,this))==null||A.has(v)||v.withChildren().forEach(function(H){N.push(H),A.add(H)});if(this.isConnected=!1,A.size>=this.nodes.length){var Y=0;A.forEach(function(H){H.owner==l&&Y++}),Y==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},T.exports=g},function(T,L,E){var d,r=E(1);function a(e){d=E(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),n=this.layout.newNode(null),i=this.add(e,n);return this.setRootGraph(i),this.rootGraph},a.prototype.add=function(e,n,i,o,t){if(i==null&&o==null&&t==null){if(e==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return e.parent=n,n.child=e,e}t=i,i=e;var h=(o=n).getOwner(),g=t.getOwner();if(h==null||h.getGraphManager()!=this)throw"Source not in this graph mgr!";if(g==null||g.getGraphManager()!=this)throw"Target not in this graph mgr!";if(h==g)return i.isInterGraph=!1,h.add(i,o,t);if(i.isInterGraph=!0,i.source=o,i.target=t,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),i.source==null||i.target==null)throw"Edge source and/or target is null!";if(i.source.edges.indexOf(i)!=-1||i.target.edges.indexOf(i)!=-1)throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},a.prototype.remove=function(e){if(e instanceof d){var n=e;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],t=(o=o.concat(n.getEdges())).length,h=0;h<t;h++)i=o[h],n.remove(i);var g,c=[];for(t=(c=c.concat(n.getNodes())).length,h=0;h<t;h++)g=c[h],n.remove(g);n==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(n);this.graphs.splice(l,1),n.parent=null}else if(e instanceof r){if((i=e)==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(i.source==null||i.target==null)throw"Source and/or target is null!";if(i.source.edges.indexOf(i)==-1||i.target.edges.indexOf(i)==-1)throw"Source and/or target doesn't know this edge!";if(l=i.source.edges.indexOf(i),i.source.edges.splice(l,1),l=i.target.edges.indexOf(i),i.target.edges.splice(l,1),i.source.owner==null||i.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";l=i.source.owner.getGraphManager().edges.indexOf(i),i.source.owner.getGraphManager().edges.splice(l,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],n=this.getGraphs(),i=n.length,o=0;o<i;o++)e=e.concat(n[o].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],n=this.getGraphs();n.length;for(var i=0;i<n.length;i++)e=e.concat(n[i].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,n){if(e==null||n==null)throw"assert failed";if(e==n)return!0;for(var i,o=e.getOwner();(i=o.getParent())!=null;){if(i==n)return!0;if((o=i.getOwner())==null)break}for(o=n.getOwner();(i=o.getParent())!=null;){if(i==e)return!0;if((o=i.getOwner())==null)break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,n,i,o,t,h=this.getAllEdges(),g=h.length,c=0;c<g;c++)if(n=(e=h[c]).source,i=e.target,e.lca=null,e.sourceInLca=n,e.targetInLca=i,n!=i){for(o=n.getOwner();e.lca==null;){for(e.targetInLca=i,t=i.getOwner();e.lca==null;){if(t==o){e.lca=t;break}if(t==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=t.getParent(),t=e.targetInLca.getOwner()}if(o==this.rootGraph)break;e.lca==null&&(e.sourceInLca=o.getParent(),o=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}else e.lca=n.getOwner()},a.prototype.calcLowestCommonAncestor=function(e,n){if(e==n)return e.getOwner();for(var i=e.getOwner();i!=null;){for(var o=n.getOwner();o!=null;){if(o==i)return o;o=o.getParent().getOwner()}i=i.getParent().getOwner()}return i},a.prototype.calcInclusionTreeDepths=function(e,n){var i;e==null&&n==null&&(e=this.rootGraph,n=1);for(var o=e.getNodes(),t=o.length,h=0;h<t;h++)(i=o[h]).inclusionTreeDepth=n,i.child!=null&&this.calcInclusionTreeDepths(i.child,n+1)},a.prototype.includesInvalidEdge=function(){for(var e,n=[],i=this.edges.length,o=0;o<i;o++)e=this.edges[o],this.isOneAncestorOfOther(e.source,e.target)&&n.push(e);for(o=0;o<n.length;o++)this.remove(n[o]);return!1},T.exports=a},function(T,L,E){var d=E(12);function r(){}r.calcSeparationAmount=function(a,e,n,i){if(!a.intersects(e))throw"assert failed";var o=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,o),n[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),n[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?n[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var t=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(t=1);var h=t*n[0],g=n[1]/t;n[0]<g?g=n[0]:h=n[1],n[0]=-1*o[0]*(g/2+i),n[1]=-1*o[1]*(h/2+i)},r.decideDirectionsForOverlappingNodes=function(a,e,n){a.getCenterX()<e.getCenterX()?n[0]=-1:n[0]=1,a.getCenterY()<e.getCenterY()?n[1]=-1:n[1]=1},r.getIntersection2=function(a,e,n){var i=a.getCenterX(),o=a.getCenterY(),t=e.getCenterX(),h=e.getCenterY();if(a.intersects(e))return n[0]=i,n[1]=o,n[2]=t,n[3]=h,!0;var g=a.getX(),c=a.getY(),l=a.getRight(),y=a.getX(),v=a.getBottom(),N=a.getRight(),A=a.getWidthHalf(),M=a.getHeightHalf(),P=e.getX(),b=e.getY(),Y=e.getRight(),H=e.getX(),q=e.getBottom(),_=e.getRight(),B=e.getWidthHalf(),s=e.getHeightHalf(),m=!1,u=!1;if(i===t){if(o>h)return n[0]=i,n[1]=c,n[2]=t,n[3]=q,!1;if(o<h)return n[0]=i,n[1]=v,n[2]=t,n[3]=b,!1}else if(o===h){if(i>t)return n[0]=g,n[1]=o,n[2]=Y,n[3]=h,!1;if(i<t)return n[0]=l,n[1]=o,n[2]=P,n[3]=h,!1}else{var p=a.height/a.width,f=e.height/e.width,w=(h-o)/(t-i),I=void 0,x=void 0,F=void 0,G=void 0,S=void 0,D=void 0;if(-p===w?i>t?(n[0]=y,n[1]=v,m=!0):(n[0]=l,n[1]=c,m=!0):p===w&&(i>t?(n[0]=g,n[1]=c,m=!0):(n[0]=N,n[1]=v,m=!0)),-f===w?t>i?(n[2]=H,n[3]=q,u=!0):(n[2]=Y,n[3]=b,u=!0):f===w&&(t>i?(n[2]=P,n[3]=b,u=!0):(n[2]=_,n[3]=q,u=!0)),m&&u)return!1;if(i>t?o>h?(I=this.getCardinalDirection(p,w,4),x=this.getCardinalDirection(f,w,2)):(I=this.getCardinalDirection(-p,w,3),x=this.getCardinalDirection(-f,w,1)):o>h?(I=this.getCardinalDirection(-p,w,1),x=this.getCardinalDirection(-f,w,3)):(I=this.getCardinalDirection(p,w,2),x=this.getCardinalDirection(f,w,4)),!m)switch(I){case 1:G=c,F=i+-M/w,n[0]=F,n[1]=G;break;case 2:F=N,G=o+A*w,n[0]=F,n[1]=G;break;case 3:G=v,F=i+M/w,n[0]=F,n[1]=G;break;case 4:F=y,G=o+-A*w,n[0]=F,n[1]=G}if(!u)switch(x){case 1:D=b,S=t+-s/w,n[2]=S,n[3]=D;break;case 2:S=_,D=h+B*w,n[2]=S,n[3]=D;break;case 3:D=q,S=t+s/w,n[2]=S,n[3]=D;break;case 4:S=H,D=h+-B*w,n[2]=S,n[3]=D}}return!1},r.getCardinalDirection=function(a,e,n){return a>e?n:1+n%4},r.getIntersection=function(a,e,n,i){if(i==null)return this.getIntersection2(a,e,n);var o,t,h,g,c,l,y,v=a.x,N=a.y,A=e.x,M=e.y,P=n.x,b=n.y,Y=i.x,H=i.y;return(y=(o=M-N)*(g=P-Y)-(t=H-b)*(h=v-A))===0?null:new d((h*(l=Y*b-P*H)-g*(c=A*N-v*M))/y,(t*c-o*l)/y)},r.angleOfVector=function(a,e,n,i){var o=void 0;return a!==n?(o=Math.atan((i-e)/(n-a)),n<a?o+=Math.PI:i<e&&(o+=this.TWO_PI)):o=i<e?this.ONE_AND_HALF_PI:this.HALF_PI,o},r.doIntersect=function(a,e,n,i){var o=a.x,t=a.y,h=e.x,g=e.y,c=n.x,l=n.y,y=i.x,v=i.y,N=(h-o)*(v-l)-(y-c)*(g-t);if(N===0)return!1;var A=((v-l)*(y-o)+(c-y)*(v-t))/N,M=((t-g)*(y-o)+(h-o)*(v-t))/N;return 0<A&&A<1&&0<M&&M<1},r.findCircleLineIntersections=function(a,e,n,i,o,t,h){var g=(n-a)*(n-a)+(i-e)*(i-e),c=2*((a-o)*(n-a)+(e-t)*(i-e)),l=(a-o)*(a-o)+(e-t)*(e-t)-h*h;if(c*c-4*g*l>=0){var y=(-c+Math.sqrt(c*c-4*g*l))/(2*g),v=(-c-Math.sqrt(c*c-4*g*l))/(2*g);return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:null}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,T.exports=r},function(T,L,E){function d(){}d.sign=function(r){return r>0?1:r<0?-1:0},d.floor=function(r){return r<0?Math.ceil(r):Math.floor(r)},d.ceil=function(r){return r<0?Math.floor(r):Math.ceil(r)},T.exports=d},function(T,L,E){function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,T.exports=d},function(T,L,E){var d=(function(){function i(o,t){for(var h=0;h<t.length;h++){var g=t[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}return function(o,t,h){return t&&i(o.prototype,t),h&&i(o,h),o}})(),r=function(i){return{value:i,next:null,prev:null}},a=function(i,o,t,h){return i!==null?i.next=o:h.head=o,t!==null?t.prev=o:h.tail=o,o.prev=i,o.next=t,h.length++,o},e=function(i,o){var t=i.prev,h=i.next;return t!==null?t.next=h:o.head=h,h!==null?h.prev=t:o.tail=t,i.prev=i.next=null,o.length--,i},n=(function(){function i(o){var t=this;(function(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")})(this,i),this.length=0,this.head=null,this.tail=null,o!=null&&o.forEach(function(h){return t.push(h)})}return d(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,t){return a(t.prev,r(o),t,this)}},{key:"insertAfter",value:function(o,t){return a(t,r(o),t.next,this)}},{key:"insertNodeBefore",value:function(o,t){return a(t.prev,o,t,this)}},{key:"insertNodeAfter",value:function(o,t){return a(t,o,t.next,this)}},{key:"push",value:function(o){return a(this.tail,r(o),null,this)}},{key:"unshift",value:function(o){return a(null,r(o),this.head,this)}},{key:"remove",value:function(o){return e(o,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(o){if(o<=this.length()){for(var t=1,h=this.head;t<o;)h=h.next,t++;return h.value}}},{key:"set_object_at",value:function(o,t){if(o<=this.length()){for(var h=1,g=this.head;h<o;)g=g.next,h++;g.value=t}}}]),i})();T.exports=n},function(T,L,E){function d(r,a,e){this.x=null,this.y=null,r==null&&a==null&&e==null?(this.x=0,this.y=0):typeof r=="number"&&typeof a=="number"&&e==null?(this.x=r,this.y=a):r.constructor.name=="Point"&&a==null&&e==null&&(e=r,this.x=e.x,this.y=e.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(r,a,e){r.constructor.name=="Point"&&a==null&&e==null?(e=r,this.setLocation(e.x,e.y)):typeof r=="number"&&typeof a=="number"&&e==null&&(parseInt(r)==r&&parseInt(a)==a?this.move(r,a):(this.x=Math.floor(r+.5),this.y=Math.floor(a+.5)))},d.prototype.move=function(r,a){this.x=r,this.y=a},d.prototype.translate=function(r,a){this.x+=r,this.y+=a},d.prototype.equals=function(r){if(r.constructor.name=="Point"){var a=r;return this.x==a.x&&this.y==a.y}return this==r},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},T.exports=d},function(T,L,E){function d(r,a,e,n){this.x=0,this.y=0,this.width=0,this.height=0,r!=null&&a!=null&&e!=null&&n!=null&&(this.x=r,this.y=a,this.width=e,this.height=n)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(r){this.x=r},d.prototype.getY=function(){return this.y},d.prototype.setY=function(r){this.y=r},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(r){this.width=r},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(r){this.height=r},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(r){return!(this.getRight()<r.x||this.getBottom()<r.y||r.getRight()<this.x||r.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},T.exports=d},function(T,L,E){var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function r(){}r.lastID=0,r.createID=function(a){return r.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=r.getString(),r.lastID++),a.uniqueID)},r.getString=function(a){return a==null&&(a=r.lastID),"Object#"+a},r.isPrimitive=function(a){var e=a===void 0?"undefined":d(a);return a==null||e!="object"&&e!="function"},T.exports=r},function(T,L,E){function d(c){if(Array.isArray(c)){for(var l=0,y=Array(c.length);l<c.length;l++)y[l]=c[l];return y}return Array.from(c)}var r=E(0),a=E(7),e=E(3),n=E(1),i=E(6),o=E(5),t=E(17),h=E(29);function g(c){h.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 a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,c!=null&&(this.isRemoteUse=c)}g.RANDOM_SEED=1,g.prototype=Object.create(h.prototype),g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},g.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},g.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},g.prototype.newGraphManager=function(){var c=new a(this);return this.graphManager=c,c},g.prototype.newGraph=function(c){return new i(null,this.graphManager,c)},g.prototype.newNode=function(c){return new e(this.graphManager,c)},g.prototype.newEdge=function(c){return new n(null,null,c)},g.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},g.prototype.runLayout=function(){var c;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),c=!this.checkLayoutSuccess()&&this.layout(),r.ANIMATE!=="during"&&(c&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,c)},g.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},g.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var c=this.graphManager.getAllEdges(),l=0;l<c.length;l++)c[l];var y=this.graphManager.getRoot().getNodes();for(l=0;l<y.length;l++)y[l];this.update(this.graphManager.getRoot())}},g.prototype.update=function(c){if(c==null)this.update2();else if(c instanceof e){var l=c;if(l.getChild()!=null)for(var y=l.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);l.vGraphObject!=null&&l.vGraphObject.update(l)}else if(c instanceof n){var N=c;N.vGraphObject!=null&&N.vGraphObject.update(N)}else if(c instanceof i){var A=c;A.vGraphObject!=null&&A.vGraphObject.update(A)}},g.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)},g.prototype.transform=function(c){if(c==null)this.transform(new o(0,0));else{var l=new t,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){l.setWorldOrgX(c.x),l.setWorldOrgY(c.y),l.setDeviceOrgX(y.x),l.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),N=0;N<v.length;N++)v[N].transform(l)}}},g.prototype.positionNodesRandomly=function(c){if(c==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var l,y,v=c.getNodes(),N=0;N<v.length;N++)(y=(l=v[N]).getChild())==null||y.getNodes().length==0?l.scatter():(this.positionNodesRandomly(y),l.updateBounds())},g.prototype.getFlatForest=function(){for(var c=[],l=!0,y=this.graphManager.getRoot().getNodes(),v=!0,N=0;N<y.length;N++)y[N].getChild()!=null&&(v=!1);if(!v)return c;var A=new Set,M=[],P=new Map,b=[];for(b=b.concat(y);b.length>0&&l;){for(M.push(b[0]);M.length>0&&l;){var Y=M[0];M.splice(0,1),A.add(Y);var H=Y.getEdges();for(N=0;N<H.length;N++){var q=H[N].getOtherEnd(Y);if(P.get(Y)!=q){if(A.has(q)){l=!1;break}M.push(q),P.set(q,Y)}}}if(l){var _=[].concat(d(A));for(c.push(_),N=0;N<_.length;N++){var B=_[N],s=b.indexOf(B);s>-1&&b.splice(s,1)}A=new Set,P=new Map}else c=[]}return c},g.prototype.createDummyNodesForBendpoints=function(c){for(var l=[],y=c.source,v=this.graphManager.calcLowestCommonAncestor(c.source,c.target),N=0;N<c.bendpoints.length;N++){var A=this.newNode(null);A.setRect(new Point(0,0),new Dimension(1,1)),v.add(A);var M=this.newEdge(null);this.graphManager.add(M,y,A),l.add(A),y=A}return M=this.newEdge(null),this.graphManager.add(M,y,c.target),this.edgeToDummyNodes.set(c,l),c.isInterGraph()?this.graphManager.remove(c):v.remove(c),l},g.prototype.createBendpointsFromDummyNodes=function(){var c=[];c=c.concat(this.graphManager.getAllEdges()),c=[].concat(d(this.edgeToDummyNodes.keys())).concat(c);for(var l=0;l<c.length;l++){var y=c[l];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),N=0;N<v.length;N++){var A=v[N],M=new o(A.getCenterX(),A.getCenterY()),P=y.bendpoints.get(N);P.x=M.x,P.y=M.y,A.getOwner().remove(A)}this.graphManager.add(y,y.source,y.target)}}},g.transform=function(c,l,y,v){if(y!=null&&v!=null){var N=l;return c<=50?N-=(l-l/y)/50*(50-c):N+=(l*v-l)/50*(c-50),N}var A,M;return c<=50?(A=9*l/500,M=l/10):(A=9*l/50,M=-8*l),A*c+M},g.findCenterOfTree=function(c){var l=[];l=l.concat(c);var y=[],v=new Map,N=!1,A=null;l.length!=1&&l.length!=2||(N=!0,A=l[0]);for(var M=0;M<l.length;M++){var P=(H=l[M]).getNeighborsList().size;v.set(H,H.getNeighborsList().size),P==1&&y.push(H)}var b=[];for(b=b.concat(y);!N;){var Y=[];for(Y=Y.concat(b),b=[],M=0;M<l.length;M++){var H=l[M],q=l.indexOf(H);q>=0&&l.splice(q,1),H.getNeighborsList().forEach(function(_){if(y.indexOf(_)<0){var B=v.get(_)-1;B==1&&b.push(_),v.set(_,B)}})}y=y.concat(b),l.length!=1&&l.length!=2||(N=!0,A=l[0])}return A},g.prototype.setGraphManager=function(c){this.graphManager=c},T.exports=g},function(T,L,E){function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=1e4*Math.sin(d.seed++),d.x-Math.floor(d.x)},T.exports=d},function(T,L,E){var d=E(5);function r(a,e){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(a){this.lworldOrgX=a},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(a){this.lworldExtX=a},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(a){this.lworldExtY=a},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},r.prototype.transformX=function(a){var e=0,n=this.lworldExtX;return n!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),e},r.prototype.transformY=function(a){var e=0,n=this.lworldExtY;return n!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),e},r.prototype.inverseTransformX=function(a){var e=0,n=this.ldeviceExtX;return n!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),e},r.prototype.inverseTransformY=function(a){var e=0,n=this.ldeviceExtY;return n!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),e},r.prototype.inverseTransformPoint=function(a){return new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},T.exports=r},function(T,L,E){var d=E(15),r=E(4),a=E(0),e=E(8),n=E(9);function i(){d.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var o in i.prototype=Object.create(d.prototype),d)i[o]=d[o];i.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,h,g,c,l,y,v,N=this.getGraphManager().getAllEdges(),A=0;A<N.length;A++)h=(t=N[A]).idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),y=t.getSourceInLca().getEstimatedSize(),v=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=y+v-2*a.SIMPLE_NODE_SIZE),g=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*g))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>r.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t,h=this.getAllEdges(),g=0;g<h.length;g++)t=h[g],this.calcSpringForce(t,t.idealLength)},i.prototype.calcRepulsionForces=function(){var t,h,g,c,l,y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],v=arguments.length>1&&arguments[1]!==void 0&&arguments[1],N=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&y&&this.updateGrid(),l=new Set,t=0;t<N.length;t++)g=N[t],this.calculateRepulsionForceOfANode(g,l,y,v),l.add(g);else for(t=0;t<N.length;t++)for(g=N[t],h=t+1;h<N.length;h++)c=N[h],g.getOwner()==c.getOwner()&&this.calcRepulsionForce(g,c)},i.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),g=0;g<h.length;g++)t=h[g],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h=0;h<t.length;h++)t[h].move()},i.prototype.calcSpringForce=function(t,h){var g,c,l,y,v=t.getSource(),N=t.getTarget();if(this.uniformLeafNodeSizes&&v.getChild()==null&&N.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;(g=t.getLength())!=0&&(l=(c=t.edgeElasticity*(g-h))*(t.lengthX/g),y=c*(t.lengthY/g),v.springForceX+=l,v.springForceY+=y,N.springForceX-=l,N.springForceY-=y)},i.prototype.calcRepulsionForce=function(t,h){var g,c,l,y,v,N,A,M=t.getRect(),P=h.getRect(),b=new Array(2),Y=new Array(4);if(M.intersects(P)){e.calcSeparationAmount(M,P,b,r.DEFAULT_EDGE_LENGTH/2),N=2*b[0],A=2*b[1];var H=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=H*N,t.repulsionForceY-=H*A,h.repulsionForceX+=H*N,h.repulsionForceY+=H*A}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(g=P.getCenterX()-M.getCenterX(),c=P.getCenterY()-M.getCenterY()):(e.getIntersection(M,P,Y),g=Y[2]-Y[0],c=Y[3]-Y[1]),Math.abs(g)<r.MIN_REPULSION_DIST&&(g=n.sign(g)*r.MIN_REPULSION_DIST),Math.abs(c)<r.MIN_REPULSION_DIST&&(c=n.sign(c)*r.MIN_REPULSION_DIST),l=g*g+c*c,y=Math.sqrt(l),N=(v=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/l)*g/y,A=v*c/y,t.repulsionForceX-=N,t.repulsionForceY-=A,h.repulsionForceX+=N,h.repulsionForceY+=A},i.prototype.calcGravitationalForce=function(t){var h,g,c,l,y,v,N,A;g=((h=t.getOwner()).getRight()+h.getLeft())/2,c=(h.getTop()+h.getBottom())/2,l=t.getCenterX()-g,y=t.getCenterY()-c,v=Math.abs(l)+t.getWidth()/2,N=Math.abs(y)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(v>(A=h.getEstimatedSize()*this.gravityRangeFactor)||N>A)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*y):(v>(A=h.getEstimatedSize()*this.compoundGravityRangeFactor)||N>A)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant)},i.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||h},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,h=this.graphManager.getAllNodes(),g=0;g<h.length;g++)(t=h[g]).noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var h,g;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(h),l=0;l<h;l++)c[l]=new Array(g);for(l=0;l<h;l++)for(var y=0;y<g;y++)c[l][y]=new Array;return c},i.prototype.addNodeToGrid=function(t,h,g){var c,l,y,v;c=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),y=parseInt(Math.floor((t.getRect().y-g)/this.repulsionRange)),v=parseInt(Math.floor((t.getRect().height+t.getRect().y-g)/this.repulsionRange));for(var N=c;N<=l;N++)for(var A=y;A<=v;A++)this.grid[N][A].push(t),t.setGridCoordinates(c,l,y,v)},i.prototype.updateGrid=function(){var t,h,g=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<g.length;t++)h=g[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,h,g,c){if(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&g||c){var l,y=new Set;t.surrounding=new Array;for(var v=this.grid,N=t.startX-1;N<t.finishX+2;N++)for(var A=t.startY-1;A<t.finishY+2;A++)if(!(N<0||A<0||N>=v.length||A>=v[0].length)){for(var M=0;M<v[N][A].length;M++)if(l=v[N][A][M],t.getOwner()==l.getOwner()&&t!=l&&!h.has(l)&&!y.has(l)){var P=Math.abs(t.getCenterX()-l.getCenterX())-(t.getWidth()/2+l.getWidth()/2),b=Math.abs(t.getCenterY()-l.getCenterY())-(t.getHeight()/2+l.getHeight()/2);P<=this.repulsionRange&&b<=this.repulsionRange&&y.add(l)}}t.surrounding=[].concat((function(Y){if(Array.isArray(Y)){for(var H=0,q=Array(Y.length);H<Y.length;H++)q[H]=Y[H];return q}return Array.from(Y)})(y))}for(N=0;N<t.surrounding.length;N++)this.calcRepulsionForce(t,t.surrounding[N])},i.prototype.calcRepulsionRange=function(){return 0},T.exports=i},function(T,L,E){var d=E(1),r=E(4);function a(n,i,o){d.call(this,n,i,o),this.idealLength=r.DEFAULT_EDGE_LENGTH,this.edgeElasticity=r.DEFAULT_SPRING_STRENGTH}for(var e in a.prototype=Object.create(d.prototype),d)a[e]=d[e];T.exports=a},function(T,L,E){var d=E(3),r=E(4);function a(n,i,o,t){d.call(this,n,i,o,t),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 e in a.prototype=Object.create(d.prototype),d)a[e]=d[e];a.prototype.setGridCoordinates=function(n,i,o,t){this.startX=n,this.finishX=i,this.startY=o,this.finishY=t},T.exports=a},function(T,L,E){function d(r,a){this.width=0,this.height=0,r!==null&&a!==null&&(this.height=a,this.width=r)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(r){this.width=r},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(r){this.height=r},T.exports=d},function(T,L,E){var d=E(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(a,e){var n=d.createID(a);this.contains(n)||(this.map[n]=e,this.keys.push(a))},r.prototype.contains=function(a){return d.createID(a),this.map[a]!=null},r.prototype.get=function(a){var e=d.createID(a);return this.map[e]},r.prototype.keySet=function(){return this.keys},T.exports=r},function(T,L,E){var d=E(14);function r(){this.set={}}r.prototype.add=function(a){var e=d.createID(a);this.contains(e)||(this.set[e]=a)},r.prototype.remove=function(a){delete this.set[d.createID(a)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(a){return this.set[d.createID(a)]==a},r.prototype.isEmpty=function(){return this.size()===0},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),n=e.length,i=0;i<n;i++)a.push(this.set[e[i]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(a){for(var e=a.length,n=0;n<e;n++){var i=a[n];this.add(i)}},T.exports=r},function(T,L,E){function d(){}d.multMat=function(r,a){for(var e=[],n=0;n<r.length;n++){e[n]=[];for(var i=0;i<a[0].length;i++){e[n][i]=0;for(var o=0;o<r[0].length;o++)e[n][i]+=r[n][o]*a[o][i]}}return e},d.transpose=function(r){for(var a=[],e=0;e<r[0].length;e++){a[e]=[];for(var n=0;n<r.length;n++)a[e][n]=r[n][e]}return a},d.multCons=function(r,a){for(var e=[],n=0;n<r.length;n++)e[n]=r[n]*a;return e},d.minusOp=function(r,a){for(var e=[],n=0;n<r.length;n++)e[n]=r[n]-a[n];return e},d.dotProduct=function(r,a){for(var e=0,n=0;n<r.length;n++)e+=r[n]*a[n];return e},d.mag=function(r){return Math.sqrt(this.dotProduct(r,r))},d.normalize=function(r){for(var a=[],e=this.mag(r),n=0;n<r.length;n++)a[n]=r[n]/e;return a},d.multGamma=function(r){for(var a=[],e=0,n=0;n<r.length;n++)e+=r[n];e*=-1/r.length;for(var i=0;i<r.length;i++)a[i]=e+r[i];return a},d.multL=function(r,a,e){for(var n=[],i=[],o=[],t=0;t<a[0].length;t++){for(var h=0,g=0;g<a.length;g++)h+=-.5*a[g][t]*r[g];i[t]=h}for(var c=0;c<e.length;c++){for(var l=0,y=0;y<e.length;y++)l+=e[c][y]*i[y];o[c]=l}for(var v=0;v<a.length;v++){for(var N=0,A=0;A<a[0].length;A++)N+=a[v][A]*o[A];n[v]=N}return n},T.exports=d},function(T,L,E){var d=(function(){function e(n,i){for(var o=0;o<i.length;o++){var t=i[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}return function(n,i,o){return i&&e(n.prototype,i),o&&e(n,o),n}})(),r=E(11),a=(function(){function e(n,i){(function(t,h){if(!(t instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),i===null&&i===void 0||(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=n instanceof r?n.size():n.length,this._quicksort(n,0,o-1)}return d(e,[{key:"_quicksort",value:function(n,i,o){if(i<o){var t=this._partition(n,i,o);this._quicksort(n,i,t),this._quicksort(n,t+1,o)}}},{key:"_partition",value:function(n,i,o){for(var t=this._get(n,i),h=i,g=o;;){for(;this.compareFunction(t,this._get(n,g));)g--;for(;this.compareFunction(this._get(n,h),t);)h++;if(!(h<g))return g;this._swap(n,h,g),h++,g--}}},{key:"_get",value:function(n,i){return n instanceof r?n.get_object_at(i):n[i]}},{key:"_set",value:function(n,i,o){n instanceof r?n.set_object_at(i,o):n[i]=o}},{key:"_swap",value:function(n,i,o){var t=this._get(n,i);this._set(n,i,this._get(n,o)),this._set(n,o,t)}},{key:"_defaultCompareFunction",value:function(n,i){return i>n}}]),e})();T.exports=a},function(T,L,E){function d(){}d.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 a=Math.min(this.m,this.n);this.s=(function(At){for(var ct=[];At-- >0;)ct.push(0);return ct})(Math.min(this.m+1,this.n)),this.U=(function At(ct){if(ct.length==0)return 0;for(var Gt=[],Ct=0;Ct<ct[0];Ct++)Gt.push(At(ct.slice(1)));return Gt})([this.m,a]),this.V=(function(At){return(function ct(Gt){if(Gt.length==0)return 0;for(var Ct=[],Yt=0;Yt<Gt[0];Yt++)Ct.push(ct(Gt.slice(1)));return Ct})(At)})([this.n,this.n]);for(var e=(function(At){for(var ct=[];At-- >0;)ct.push(0);return ct})(this.n),n=(function(At){for(var ct=[];At-- >0;)ct.push(0);return ct})(this.m),i=Math.min(this.m-1,this.n),o=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,o);t++){if(t<i){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=d.hypot(this.s[t],r[h][t]);if(this.s[t]!==0){r[t][t]<0&&(this.s[t]=-this.s[t]);for(var g=t;g<this.m;g++)r[g][t]/=this.s[t];r[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(At,ct){return At&&ct})(t<i,this.s[t]!==0)){for(var l=0,y=t;y<this.m;y++)l+=r[y][t]*r[y][c];l=-l/r[t][t];for(var v=t;v<this.m;v++)r[v][c]+=l*r[v][t]}e[c]=r[t][c]}if((function(At,ct){return ct})(0,t<i))for(var N=t;N<this.m;N++)this.U[N][t]=r[N][t];if(t<o){e[t]=0;for(var A=t+1;A<this.n;A++)e[t]=d.hypot(e[t],e[A]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var M=t+1;M<this.n;M++)e[M]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(At,ct){return At&&ct})(t+1<this.m,e[t]!==0)){for(var P=t+1;P<this.m;P++)n[P]=0;for(var b=t+1;b<this.n;b++)for(var Y=t+1;Y<this.m;Y++)n[Y]+=e[b]*r[Y][b];for(var H=t+1;H<this.n;H++)for(var q=-e[H]/e[t+1],_=t+1;_<this.m;_++)r[_][H]+=q*n[_]}for(var B=t+1;B<this.n;B++)this.V[B][t]=e[B]}}var s=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=r[i][i]),this.m<s&&(this.s[s-1]=0),o+1<s&&(e[o]=r[o][s-1]),e[s-1]=0;for(var m=i;m<a;m++){for(var u=0;u<this.m;u++)this.U[u][m]=0;this.U[m][m]=1}for(var p=i-1;p>=0;p--)if(this.s[p]!==0){for(var f=p+1;f<a;f++){for(var w=0,I=p;I<this.m;I++)w+=this.U[I][p]*this.U[I][f];w=-w/this.U[p][p];for(var x=p;x<this.m;x++)this.U[x][f]+=w*this.U[x][p]}for(var F=p;F<this.m;F++)this.U[F][p]=-this.U[F][p];this.U[p][p]=1+this.U[p][p];for(var G=0;G<p-1;G++)this.U[G][p]=0}else{for(var S=0;S<this.m;S++)this.U[S][p]=0;this.U[p][p]=1}for(var D=this.n-1;D>=0;D--){if((function(At,ct){return At&&ct})(D<o,e[D]!==0))for(var z=D+1;z<a;z++){for(var W=0,U=D+1;U<this.n;U++)W+=this.V[U][D]*this.V[U][z];W=-W/this.V[D+1][D];for(var O=D+1;O<this.n;O++)this.V[O][z]+=W*this.V[O][D]}for(var X=0;X<this.n;X++)this.V[X][D]=0;this.V[D][D]=1}for(var j=s-1,J=Math.pow(2,-52),it=Math.pow(2,-966);s>0;){var V=void 0,yt=void 0;for(V=s-2;V>=-1&&V!==-1;V--)if(Math.abs(e[V])<=it+J*(Math.abs(this.s[V])+Math.abs(this.s[V+1]))){e[V]=0;break}if(V===s-2)yt=4;else{var Lt=void 0;for(Lt=s-1;Lt>=V&&Lt!==V;Lt--){var Ut=(Lt!==s?Math.abs(e[Lt]):0)+(Lt!==V+1?Math.abs(e[Lt-1]):0);if(Math.abs(this.s[Lt])<=it+J*Ut){this.s[Lt]=0;break}}Lt===V?yt=3:Lt===s-1?yt=1:(yt=2,V=Lt)}switch(V++,yt){case 1:var Rt=e[s-2];e[s-2]=0;for(var K=s-2;K>=V;K--){var ot=d.hypot(this.s[K],Rt),ut=this.s[K]/ot,dt=Rt/ot;this.s[K]=ot,K!==V&&(Rt=-dt*e[K-1],e[K-1]=ut*e[K-1]);for(var vt=0;vt<this.n;vt++)ot=ut*this.V[vt][K]+dt*this.V[vt][s-1],this.V[vt][s-1]=-dt*this.V[vt][K]+ut*this.V[vt][s-1],this.V[vt][K]=ot}break;case 2:var Et=e[V-1];e[V-1]=0;for(var ht=V;ht<s;ht++){var Tt=d.hypot(this.s[ht],Et),_t=this.s[ht]/Tt,Ot=Et/Tt;this.s[ht]=Tt,Et=-Ot*e[ht],e[ht]=_t*e[ht];for(var Mt=0;Mt<this.m;Mt++)Tt=_t*this.U[Mt][ht]+Ot*this.U[Mt][V-1],this.U[Mt][V-1]=-Ot*this.U[Mt][ht]+_t*this.U[Mt][V-1],this.U[Mt][ht]=Tt}break;case 3:var xt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[s-1]),Math.abs(this.s[s-2])),Math.abs(e[s-2])),Math.abs(this.s[V])),Math.abs(e[V])),R=this.s[s-1]/xt,k=this.s[s-2]/xt,Q=e[s-2]/xt,Z=this.s[V]/xt,st=e[V]/xt,It=((k+R)*(k-R)+Q*Q)/2,rt=R*Q*(R*Q),mt=0;(function(At,ct){return At||ct})(It!==0,rt!==0)&&(mt=Math.sqrt(It*It+rt),It<0&&(mt=-mt),mt=rt/(It+mt));for(var ft=(Z+R)*(Z-R)+mt,St=Z*st,et=V;et<s-1;et++){var pt=d.hypot(ft,St),lt=ft/pt,$=St/pt;et!==V&&(e[et-1]=pt),ft=lt*this.s[et]+$*e[et],e[et]=lt*e[et]-$*this.s[et],St=$*this.s[et+1],this.s[et+1]=lt*this.s[et+1];for(var gt=0;gt<this.n;gt++)pt=lt*this.V[gt][et]+$*this.V[gt][et+1],this.V[gt][et+1]=-$*this.V[gt][et]+lt*this.V[gt][et+1],this.V[gt][et]=pt;if(lt=ft/(pt=d.hypot(ft,St)),$=St/pt,this.s[et]=pt,ft=lt*e[et]+$*this.s[et+1],this.s[et+1]=-$*e[et]+lt*this.s[et+1],St=$*e[et+1],e[et+1]=lt*e[et+1],et<this.m-1)for(var Nt=0;Nt<this.m;Nt++)pt=lt*this.U[Nt][et]+$*this.U[Nt][et+1],this.U[Nt][et+1]=-$*this.U[Nt][et]+lt*this.U[Nt][et+1],this.U[Nt][et]=pt}e[s-2]=ft;break;case 4:if(this.s[V]<=0){this.s[V]=this.s[V]<0?-this.s[V]:0;for(var at=0;at<=j;at++)this.V[at][V]=-this.V[at][V]}for(;V<j&&!(this.s[V]>=this.s[V+1]);){var Ft=this.s[V];if(this.s[V]=this.s[V+1],this.s[V+1]=Ft,V<this.n-1)for(var bt=0;bt<this.n;bt++)Ft=this.V[bt][V+1],this.V[bt][V+1]=this.V[bt][V],this.V[bt][V]=Ft;if(V<this.m-1)for(var Dt=0;Dt<this.m;Dt++)Ft=this.U[Dt][V+1],this.U[Dt][V+1]=this.U[Dt][V],this.U[Dt][V]=Ft;V++}s--}}return{U:this.U,V:this.V,S:this.s}},d.hypot=function(r,a){var e=void 0;return Math.abs(r)>Math.abs(a)?(e=a/r,e=Math.abs(r)*Math.sqrt(1+e*e)):a!=0?(e=r/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},T.exports=d},function(T,L,E){var d=(function(){function a(e,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,n,i){return n&&a(e.prototype,n),i&&a(e,i),e}})(),r=(function(){function a(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")})(this,a),this.sequence1=e,this.sequence2=n,this.match_score=i,this.mismatch_penalty=o,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[h][g]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var o=1;o<this.jMax;o++){var t=[this.sequence1[i-1]===this.sequence2[o-1]?this.grid[i-1][o-1]+this.match_score:this.grid[i-1][o-1]+this.mismatch_penalty,this.grid[i-1][o]+this.gap_penalty,this.grid[i][o-1]+this.gap_penalty],h=this.arrayAllMaxIndexes(t);this.grid[i][o]=t[h[0]],this.tracebackGrid[i][o]=[h.includes(0),h.includes(1),h.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var n=e[0],i=this.tracebackGrid[n.pos[0]][n.pos[1]];i[0]&&e.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),i[1]&&e.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),i[2]&&e.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,n){for(var i=[],o=-1;(o=e.indexOf(n,o+1))!==-1;)i.push(o);return i}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),a})();T.exports=r},function(T,L,E){var d=function(){};d.FDLayout=E(18),d.FDLayoutConstants=E(4),d.FDLayoutEdge=E(19),d.FDLayoutNode=E(20),d.DimensionD=E(21),d.HashMap=E(22),d.HashSet=E(23),d.IGeometry=E(8),d.IMath=E(9),d.Integer=E(10),d.Point=E(12),d.PointD=E(5),d.RandomSeed=E(16),d.RectangleD=E(13),d.Transform=E(17),d.UniqueIDGeneretor=E(14),d.Quicksort=E(25),d.LinkedList=E(11),d.LGraphObject=E(2),d.LGraph=E(6),d.LEdge=E(1),d.LGraphManager=E(7),d.LNode=E(3),d.Layout=E(15),d.LayoutConstants=E(0),d.NeedlemanWunsch=E(27),d.Matrix=E(24),d.SVD=E(26),T.exports=d},function(T,L,E){function d(){this.listeners=[]}var r=d.prototype;r.addListener=function(a,e){this.listeners.push({event:a,callback:e})},r.removeListener=function(a,e){for(var n=this.listeners.length;n>=0;n--){var i=this.listeners[n];i.event===a&&i.callback===e&&this.listeners.splice(n,1)}},r.emit=function(a,e){for(var n=0;n<this.listeners.length;n++){var i=this.listeners[n];a===i.event&&i.callback(e)}},T.exports=d}])},we.exports=C());var C}var Le;function dn(){return Le?Ae.exports:(Le=1,C=function(T){return L={45:(r,a,e)=>{var n={};n.layoutBase=e(551),n.CoSEConstants=e(806),n.CoSEEdge=e(767),n.CoSEGraph=e(880),n.CoSEGraphManager=e(578),n.CoSELayout=e(765),n.CoSENode=e(991),n.ConstraintHandler=e(902),r.exports=n},806:(r,a,e)=>{var n=e(551).FDLayoutConstants;function i(){}for(var o in n)i[o]=n[o];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,r.exports=i},767:(r,a,e)=>{var n=e(551).FDLayoutEdge;function i(t,h,g){n.call(this,t,h,g)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},880:(r,a,e)=>{var n=e(551).LGraph;function i(t,h,g){n.call(this,t,h,g)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},578:(r,a,e)=>{var n=e(551).LGraphManager;function i(t){n.call(this,t)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},765:(r,a,e)=>{var n=e(551).FDLayout,i=e(578),o=e(880),t=e(991),h=e(767),g=e(806),c=e(902),l=e(551).FDLayoutConstants,y=e(551).LayoutConstants,v=e(551).Point,N=e(551).PointD,A=e(551).DimensionD,M=e(551).Layout,P=e(551).Integer,b=e(551).IGeometry,Y=e(551).LGraph,H=e(551).Transform,q=e(551).LinkedList;function _(){n.call(this),this.toBeTiled={},this.constraints={}}for(var B in _.prototype=Object.create(n.prototype),n)_[B]=n[B];_.prototype.newGraphManager=function(){var s=new i(this);return this.graphManager=s,s},_.prototype.newGraph=function(s){return new o(null,this.graphManager,s)},_.prototype.newNode=function(s){return new t(this.graphManager,s)},_.prototype.newEdge=function(s){return new h(null,null,s)},_.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(g.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=g.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=g.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},_.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},_.prototype.layout=function(){return y.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},_.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)g.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return m.has(p)}),this.graphManager.setAllNodesToApplyGravitation(u));else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return m.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),g.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},_.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(f){return s.has(f)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),g.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),g.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},_.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),m={},u=0;u<s.length;u++){var p=s[u].rect,f=s[u].id;m[f]={id:f,x:p.getCenterX(),y:p.getCenterY(),w:p.width,h:p.height}}return m},_.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},_.prototype.moveNodes=function(){for(var s=this.getAllNodes(),m=0;m<s.length;m++)s[m].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),m=0;m<s.length;m++)s[m].move()},_.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),u=0;u<m.length;u++){var p=m[u];this.idToNodeMap.set(p.id,p)}var f=function O(X){for(var j,J=X.getChild().getNodes(),it=0,V=0;V<J.length;V++)(j=J[V]).getChild()==null?s.fixedNodeSet.has(j.id)&&(it+=100):it+=O(j);return it};if(this.constraints.fixedNodeConstraint){for(this.constraints.fixedNodeConstraint.forEach(function(O){s.fixedNodeSet.add(O.nodeId)}),m=this.graphManager.getAllNodes(),u=0;u<m.length;u++)if((p=m[u]).getChild()!=null){var w=f(p);w>0&&(p.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var I=new Map,x=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){s.fixedNodesOnHorizontal.add(O),s.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var F=this.constraints.alignmentConstraint.vertical;for(u=0;u<F.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),F[u].forEach(function(O){I.set(O,"dummy"+u),s.dummyToNodeForVerticalAlignment.get("dummy"+u).push(O),s.fixedNodeSet.has(O)&&s.fixedNodesOnHorizontal.add("dummy"+u)})}if(this.constraints.alignmentConstraint.horizontal){var G=this.constraints.alignmentConstraint.horizontal;for(u=0;u<G.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),G[u].forEach(function(O){x.set(O,"dummy"+u),s.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(O),s.fixedNodeSet.has(O)&&s.fixedNodesOnVertical.add("dummy"+u)})}}if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var X,j,J;for(J=O.length-1;J>=2*O.length/3;J--)X=Math.floor(Math.random()*(J+1)),j=O[J],O[J]=O[X],O[X]=j;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 X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;s.nodesInRelativeHorizontal.includes(X)||(s.nodesInRelativeHorizontal.push(X),s.nodeToRelativeConstraintMapHorizontal.set(X,[]),s.dummyToNodeForVerticalAlignment.has(X)?s.nodeToTempPositionMapHorizontal.set(X,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(X,s.idToNodeMap.get(X).getCenterX())),s.nodesInRelativeHorizontal.includes(j)||(s.nodesInRelativeHorizontal.push(j),s.nodeToRelativeConstraintMapHorizontal.set(j,[]),s.dummyToNodeForVerticalAlignment.has(j)?s.nodeToTempPositionMapHorizontal.set(j,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(j)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(j,s.idToNodeMap.get(j).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(X).push({right:j,gap:O.gap}),s.nodeToRelativeConstraintMapHorizontal.get(j).push({left:X,gap:O.gap})}else{var J=x.has(O.top)?x.get(O.top):O.top,it=x.has(O.bottom)?x.get(O.bottom):O.bottom;s.nodesInRelativeVertical.includes(J)||(s.nodesInRelativeVertical.push(J),s.nodeToRelativeConstraintMapVertical.set(J,[]),s.dummyToNodeForHorizontalAlignment.has(J)?s.nodeToTempPositionMapVertical.set(J,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(J)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(J,s.idToNodeMap.get(J).getCenterY())),s.nodesInRelativeVertical.includes(it)||(s.nodesInRelativeVertical.push(it),s.nodeToRelativeConstraintMapVertical.set(it,[]),s.dummyToNodeForHorizontalAlignment.has(it)?s.nodeToTempPositionMapVertical.set(it,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(it)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(it,s.idToNodeMap.get(it).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(J).push({bottom:it,gap:O.gap}),s.nodeToRelativeConstraintMapVertical.get(it).push({top:J,gap:O.gap})}});else{var S=new Map,D=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;S.has(X)?S.get(X).push(j):S.set(X,[j]),S.has(j)?S.get(j).push(X):S.set(j,[X])}else{var J=x.has(O.top)?x.get(O.top):O.top,it=x.has(O.bottom)?x.get(O.bottom):O.bottom;D.has(J)?D.get(J).push(it):D.set(J,[it]),D.has(it)?D.get(it).push(J):D.set(it,[J])}});var z=function(O,X){var j=[],J=[],it=new q,V=new Set,yt=0;return O.forEach(function(Lt,Ut){if(!V.has(Ut)){j[yt]=[],J[yt]=!1;var Rt=Ut;for(it.push(Rt),V.add(Rt),j[yt].push(Rt);it.length!=0;)Rt=it.shift(),X.has(Rt)&&(J[yt]=!0),O.get(Rt).forEach(function(K){V.has(K)||(it.push(K),V.add(K),j[yt].push(K))});yt++}}),{components:j,isFixed:J}},W=z(S,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=W.components,this.fixedComponentsOnHorizontal=W.isFixed;var U=z(D,s.fixedNodesOnVertical);this.componentsOnVertical=U.components,this.fixedComponentsOnVertical=U.isFixed}}},_.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(U){var O=s.idToNodeMap.get(U.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,u=0;u<m.length;u++){for(var p=0,f=0;f<m[u].length;f++){if(this.fixedNodeSet.has(m[u][f])){p=0;break}p+=this.idToNodeMap.get(m[u][f]).displacementX}var w=p/m[u].length;for(f=0;f<m[u].length;f++)this.idToNodeMap.get(m[u][f]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal){var I=this.constraints.alignmentConstraint.horizontal;for(u=0;u<I.length;u++){var x=0;for(f=0;f<I[u].length;f++){if(this.fixedNodeSet.has(I[u][f])){x=0;break}x+=this.idToNodeMap.get(I[u][f]).displacementY}var F=x/I[u].length;for(f=0;f<I[u].length;f++)this.idToNodeMap.get(I[u][f]).displacementY=F}}}if(this.constraints.relativePlacementConstraint)if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(U){if(!s.fixedNodesOnHorizontal.has(U)){var O=0;O=s.dummyToNodeForVerticalAlignment.has(U)?s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(U)[0]).displacementX:s.idToNodeMap.get(U).displacementX,s.nodeToRelativeConstraintMapHorizontal.get(U).forEach(function(X){var j;X.right?(j=s.nodeToTempPositionMapHorizontal.get(X.right)-s.nodeToTempPositionMapHorizontal.get(U)-O)<X.gap&&(O-=X.gap-j):(j=s.nodeToTempPositionMapHorizontal.get(U)-s.nodeToTempPositionMapHorizontal.get(X.left)+O)<X.gap&&(O+=X.gap-j)}),s.nodeToTempPositionMapHorizontal.set(U,s.nodeToTempPositionMapHorizontal.get(U)+O),s.dummyToNodeForVerticalAlignment.has(U)?s.dummyToNodeForVerticalAlignment.get(U).forEach(function(X){s.idToNodeMap.get(X).displacementX=O}):s.idToNodeMap.get(U).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(U){if(!s.fixedNodesOnHorizontal.has(U)){var O=0;O=s.dummyToNodeForHorizontalAlignment.has(U)?s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(U)[0]).displacementY:s.idToNodeMap.get(U).displacementY,s.nodeToRelativeConstraintMapVertical.get(U).forEach(function(X){var j;X.bottom?(j=s.nodeToTempPositionMapVertical.get(X.bottom)-s.nodeToTempPositionMapVertical.get(U)-O)<X.gap&&(O-=X.gap-j):(j=s.nodeToTempPositionMapVertical.get(U)-s.nodeToTempPositionMapVertical.get(X.top)+O)<X.gap&&(O+=X.gap-j)}),s.nodeToTempPositionMapVertical.set(U,s.nodeToTempPositionMapVertical.get(U)+O),s.dummyToNodeForHorizontalAlignment.has(U)?s.dummyToNodeForHorizontalAlignment.get(U).forEach(function(X){s.idToNodeMap.get(X).displacementY=O}):s.idToNodeMap.get(U).displacementY=O}});else{for(u=0;u<this.componentsOnHorizontal.length;u++){var G=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?this.dummyToNodeForVerticalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementX=0}):this.idToNodeMap.get(G[f]).displacementX=0;else{var S=0,D=0;for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?(S+=(W=this.dummyToNodeForVerticalAlignment.get(G[f])).length*this.idToNodeMap.get(W[0]).displacementX,D+=W.length):(S+=this.idToNodeMap.get(G[f]).displacementX,D++);var z=S/D;for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?this.dummyToNodeForVerticalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementX=z}):this.idToNodeMap.get(G[f]).displacementX=z}}for(u=0;u<this.componentsOnVertical.length;u++)if(G=this.componentsOnVertical[u],this.fixedComponentsOnVertical[u])for(f=0;f<G.length;f++)this.dummyToNodeForHorizontalAlignment.has(G[f])?this.dummyToNodeForHorizontalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementY=0}):this.idToNodeMap.get(G[f]).displacementY=0;else{for(S=0,D=0,f=0;f<G.length;f++){var W;this.dummyToNodeForHorizontalAlignment.has(G[f])?(S+=(W=this.dummyToNodeForHorizontalAlignment.get(G[f])).length*this.idToNodeMap.get(W[0]).displacementY,D+=W.length):(S+=this.idToNodeMap.get(G[f]).displacementY,D++)}for(z=S/D,f=0;f<G.length;f++)this.dummyToNodeForHorizontalAlignment.has(G[f])?this.dummyToNodeForHorizontalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementY=z}):this.idToNodeMap.get(G[f]).displacementY=z}}},_.prototype.calculateNodesToApplyGravitationTo=function(){var s,m,u=[],p=this.graphManager.getGraphs(),f=p.length;for(m=0;m<f;m++)(s=p[m]).updateConnected(),s.isConnected||(u=u.concat(s.getNodes()));return u},_.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var m,u=new Set;for(m=0;m<s.length;m++){var p=s[m];if(!u.has(p)){var f=p.getSource(),w=p.getTarget();if(f==w)p.getBendpoints().push(new N),p.getBendpoints().push(new N),this.createDummyNodesForBendpoints(p),u.add(p);else{var I=[];if(I=(I=I.concat(f.getEdgeListToNode(w))).concat(w.getEdgeListToNode(f)),!u.has(I[0])){var x;if(I.length>1)for(x=0;x<I.length;x++){var F=I[x];F.getBendpoints().push(new N),this.createDummyNodesForBendpoints(F)}I.forEach(function(G){u.add(G)})}}}if(u.size==s.length)break}},_.prototype.positionNodesRadially=function(s){for(var m=new v(0,0),u=Math.ceil(Math.sqrt(s.length)),p=0,f=0,w=0,I=new N(0,0),x=0;x<s.length;x++){x%u==0&&(w=0,f=p,x!=0&&(f+=g.DEFAULT_COMPONENT_SEPERATION),p=0);var F=s[x],G=M.findCenterOfTree(F);m.x=w,m.y=f,(I=_.radialLayout(F,G,m)).y>p&&(p=Math.floor(I.y)),w=Math.floor(I.x+g.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(y.WORLD_CENTER_X-I.x/2,y.WORLD_CENTER_Y-I.y/2))},_.radialLayout=function(s,m,u){var p=Math.max(this.maxDiagonalInTree(s),g.DEFAULT_RADIAL_SEPARATION);_.branchRadialLayout(m,null,0,359,0,p);var f=Y.calculateBounds(s),w=new H;w.setDeviceOrgX(f.getMinX()),w.setDeviceOrgY(f.getMinY()),w.setWorldOrgX(u.x),w.setWorldOrgY(u.y);for(var I=0;I<s.length;I++)s[I].transform(w);var x=new N(f.getMaxX(),f.getMaxY());return w.inverseTransformPoint(x)},_.branchRadialLayout=function(s,m,u,p,f,w){var I=(p-u+1)/2;I<0&&(I+=180);var x=(I+u)%360*b.TWO_PI/360,F=f*Math.cos(x),G=f*Math.sin(x);s.setCenter(F,G);var S=[],D=(S=S.concat(s.getEdges())).length;m!=null&&D--;for(var z,W=0,U=S.length,O=s.getEdgesBetween(m);O.length>1;){var X=O[0];O.splice(0,1);var j=S.indexOf(X);j>=0&&S.splice(j,1),U--,D--}z=m!=null?(S.indexOf(O[0])+1)%U:0;for(var J=Math.abs(p-u)/D,it=z;W!=D;it=++it%U){var V=S[it].getOtherEnd(s);if(V!=m){var yt=(u+W*J)%360,Lt=(yt+J)%360;_.branchRadialLayout(V,s,yt,Lt,f+w,w),W++}}},_.maxDiagonalInTree=function(s){for(var m=P.MIN_VALUE,u=0;u<s.length;u++){var p=s[u].getDiagonal();p>m&&(m=p)}return m},_.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},_.prototype.groupZeroDegreeMembers=function(){var s=this,m={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),f=0;f<p.length;f++){var w=(I=p[f]).getParent();this.getNodeDegreeWithChildren(I)!==0||w.id!=null&&this.getToBeTiled(w)||u.push(I)}for(f=0;f<u.length;f++){var I,x=(I=u[f]).getParent().id;m[x]===void 0&&(m[x]=[]),m[x]=m[x].concat(I)}Object.keys(m).forEach(function(F){if(m[F].length>1){var G="DummyCompound_"+F;s.memberGroups[G]=m[F];var S=m[F][0].getParent(),D=new t(s.graphManager);D.id=G,D.paddingLeft=S.paddingLeft||0,D.paddingRight=S.paddingRight||0,D.paddingBottom=S.paddingBottom||0,D.paddingTop=S.paddingTop||0,s.idToDummyNode[G]=D;var z=s.getGraphManager().add(s.newGraph(),D),W=S.getChild();W.add(D);for(var U=0;U<m[F].length;U++){var O=m[F][U];W.remove(O),z.add(O)}}})},_.prototype.clearCompounds=function(){var s={},m={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)m[this.compoundOrder[u].id]=this.compoundOrder[u],s[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(s,m)},_.prototype.clearZeroDegreeMembers=function(){var s=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var p=s.idToDummyNode[u];if(m[u]=s.tileNodes(s.memberGroups[u],p.paddingLeft+p.paddingRight),p.rect.width=m[u].width,p.rect.height=m[u].height,p.setCenter(m[u].centerX,m[u].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var f=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(f+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>f?(p.rect.x-=(p.labelWidth-f)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-f)/2):p.labelPosHorizontal=="right"&&p.setWidth(f+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},_.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var m=this.compoundOrder[s],u=m.id,p=m.paddingLeft,f=m.paddingTop,w=m.labelMarginLeft,I=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],m.rect.x,m.rect.y,p,f,w,I)}},_.prototype.repopulateZeroDegreeMembers=function(){var s=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(u){var p=s.idToDummyNode[u],f=p.paddingLeft,w=p.paddingTop,I=p.labelMarginLeft,x=p.labelMarginTop;s.adjustLocations(m[u],p.rect.x,p.rect.y,f,w,I,x)})},_.prototype.getToBeTiled=function(s){var m=s.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var u=s.getChild();if(u==null)return this.toBeTiled[m]=!1,!1;for(var p=u.getNodes(),f=0;f<p.length;f++){var w=p[f];if(this.getNodeDegree(w)>0)return this.toBeTiled[m]=!1,!1;if(w.getChild()!=null){if(!this.getToBeTiled(w))return this.toBeTiled[m]=!1,!1}else this.toBeTiled[w.id]=!1}return this.toBeTiled[m]=!0,!0},_.prototype.getNodeDegree=function(s){s.id;for(var m=s.getEdges(),u=0,p=0;p<m.length;p++){var f=m[p];f.getSource().id!==f.getTarget().id&&(u+=1)}return u},_.prototype.getNodeDegreeWithChildren=function(s){var m=this.getNodeDegree(s);if(s.getChild()==null)return m;for(var u=s.getChild().getNodes(),p=0;p<u.length;p++){var f=u[p];m+=this.getNodeDegreeWithChildren(f)}return m},_.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},_.prototype.fillCompexOrderByDFS=function(s){for(var m=0;m<s.length;m++){var u=s[m];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},_.prototype.adjustLocations=function(s,m,u,p,f,w,I){u+=f+I;for(var x=m+=p+w,F=0;F<s.rows.length;F++){var G=s.rows[F];m=x;for(var S=0,D=0;D<G.length;D++){var z=G[D];z.rect.x=m,z.rect.y=u,m+=z.rect.width+s.horizontalPadding,z.rect.height>S&&(S=z.rect.height)}u+=S+s.verticalPadding}},_.prototype.tileCompoundMembers=function(s,m){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var f=m[p];if(u.tiledMemberPack[p]=u.tileNodes(s[p],f.paddingLeft+f.paddingRight),f.rect.width=u.tiledMemberPack[p].width,f.rect.height=u.tiledMemberPack[p].height,f.setCenter(u.tiledMemberPack[p].centerX,u.tiledMemberPack[p].centerY),f.labelMarginLeft=0,f.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var w=f.rect.width,I=f.rect.height;f.labelWidth&&(f.labelPosHorizontal=="left"?(f.rect.x-=f.labelWidth,f.setWidth(w+f.labelWidth),f.labelMarginLeft=f.labelWidth):f.labelPosHorizontal=="center"&&f.labelWidth>w?(f.rect.x-=(f.labelWidth-w)/2,f.setWidth(f.labelWidth),f.labelMarginLeft=(f.labelWidth-w)/2):f.labelPosHorizontal=="right"&&f.setWidth(w+f.labelWidth)),f.labelHeight&&(f.labelPosVertical=="top"?(f.rect.y-=f.labelHeight,f.setHeight(I+f.labelHeight),f.labelMarginTop=f.labelHeight):f.labelPosVertical=="center"&&f.labelHeight>I?(f.rect.y-=(f.labelHeight-I)/2,f.setHeight(f.labelHeight),f.labelMarginTop=(f.labelHeight-I)/2):f.labelPosVertical=="bottom"&&f.setHeight(I+f.labelHeight))}})},_.prototype.tileNodes=function(s,m){var u=this.tileNodesByFavoringDim(s,m,!0),p=this.tileNodesByFavoringDim(s,m,!1),f=this.getOrgRatio(u);return this.getOrgRatio(p)<f?p:u},_.prototype.getOrgRatio=function(s){var m=s.width/s.height;return m<1&&(m=1/m),m},_.prototype.calcIdealRowWidth=function(s,m){var u=g.TILING_PADDING_VERTICAL,p=g.TILING_PADDING_HORIZONTAL,f=s.length,w=0,I=0,x=0;s.forEach(function(U){w+=U.getWidth(),I+=U.getHeight(),U.getWidth()>x&&(x=U.getWidth())});var F,G=w/f,S=I/f,D=Math.pow(u-p,2)+4*(G+p)*(S+u)*f,z=(p-u+Math.sqrt(D))/(2*(G+p));m?(F=Math.ceil(z))==z&&F++:F=Math.floor(z);var W=F*(G+p)-p;return x>W&&(W=x),W+=2*p},_.prototype.tileNodesByFavoringDim=function(s,m,u){var p=g.TILING_PADDING_VERTICAL,f=g.TILING_PADDING_HORIZONTAL,w=g.TILING_COMPARE_BY,I={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:p,horizontalPadding:f,centerX:0,centerY:0};w&&(I.idealRowWidth=this.calcIdealRowWidth(s,u));var x=function(U){return U.rect.width*U.rect.height},F=function(U,O){return x(O)-x(U)};s.sort(function(U,O){var X=F;return I.idealRowWidth?(X=w)(U.id,O.id):X(U,O)});for(var G=0,S=0,D=0;D<s.length;D++)G+=(z=s[D]).getCenterX(),S+=z.getCenterY();for(I.centerX=G/s.length,I.centerY=S/s.length,D=0;D<s.length;D++){var z=s[D];if(I.rows.length==0)this.insertNodeToRow(I,z,0,m);else if(this.canAddHorizontal(I,z.rect.width,z.rect.height)){var W=I.rows.length-1;I.idealRowWidth||(W=this.getShortestRowIndex(I)),this.insertNodeToRow(I,z,W,m)}else this.insertNodeToRow(I,z,I.rows.length,m);this.shiftToLastRow(I)}return I},_.prototype.insertNodeToRow=function(s,m,u,p){var f=p;u==s.rows.length&&(s.rows.push([]),s.rowWidth.push(f),s.rowHeight.push(0));var w=s.rowWidth[u]+m.rect.width;s.rows[u].length>0&&(w+=s.horizontalPadding),s.rowWidth[u]=w,s.width<w&&(s.width=w);var I=m.rect.height;u>0&&(I+=s.verticalPadding);var x=0;I>s.rowHeight[u]&&(x=s.rowHeight[u],s.rowHeight[u]=I,x=s.rowHeight[u]-x),s.height+=x,s.rows[u].push(m)},_.prototype.getShortestRowIndex=function(s){for(var m=-1,u=Number.MAX_VALUE,p=0;p<s.rows.length;p++)s.rowWidth[p]<u&&(m=p,u=s.rowWidth[p]);return m},_.prototype.getLongestRowIndex=function(s){for(var m=-1,u=Number.MIN_VALUE,p=0;p<s.rows.length;p++)s.rowWidth[p]>u&&(m=p,u=s.rowWidth[p]);return m},_.prototype.canAddHorizontal=function(s,m,u){if(s.idealRowWidth){var p=s.rows.length-1;return s.rowWidth[p]+m+s.horizontalPadding<=s.idealRowWidth}var f=this.getShortestRowIndex(s);if(f<0)return!0;var w=s.rowWidth[f];if(w+s.horizontalPadding+m<=s.width)return!0;var I,x,F=0;return s.rowHeight[f]<u&&f>0&&(F=u+s.verticalPadding-s.rowHeight[f]),I=s.width-w>=m+s.horizontalPadding?(s.height+F)/(w+m+s.horizontalPadding):(s.height+F)/s.width,F=u+s.verticalPadding,(x=s.width<m?(s.height+F)/m:(s.height+F)/s.width)<1&&(x=1/x),I<1&&(I=1/I),I<x},_.prototype.shiftToLastRow=function(s){var m=this.getLongestRowIndex(s),u=s.rowWidth.length-1,p=s.rows[m],f=p[p.length-1],w=f.width+s.horizontalPadding;if(s.width-s.rowWidth[u]>w&&m!=u){p.splice(-1,1),s.rows[u].push(f),s.rowWidth[m]=s.rowWidth[m]-w,s.rowWidth[u]=s.rowWidth[u]+w,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var I=Number.MIN_VALUE,x=0;x<p.length;x++)p[x].height>I&&(I=p[x].height);m>0&&(I+=s.verticalPadding);var F=s.rowHeight[m]+s.rowHeight[u];s.rowHeight[m]=I,s.rowHeight[u]<f.height+s.verticalPadding&&(s.rowHeight[u]=f.height+s.verticalPadding);var G=s.rowHeight[m]+s.rowHeight[u];s.height+=G-F,this.shiftToLastRow(s)}},_.prototype.tilingPreLayout=function(){g.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},_.prototype.tilingPostLayout=function(){g.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},_.prototype.reduceTrees=function(){for(var s,m=[],u=!0;u;){var p=this.graphManager.getAllNodes(),f=[];u=!1;for(var w=0;w<p.length;w++)if((s=p[w]).getEdges().length==1&&!s.getEdges()[0].isInterGraph&&s.getChild()==null){if(g.PURE_INCREMENTAL){var I=s.getEdges()[0].getOtherEnd(s),x=new A(s.getCenterX()-I.getCenterX(),s.getCenterY()-I.getCenterY());f.push([s,s.getEdges()[0],s.getOwner(),x])}else f.push([s,s.getEdges()[0],s.getOwner()]);u=!0}if(u==1){for(var F=[],G=0;G<f.length;G++)f[G][0].getEdges().length==1&&(F.push(f[G]),f[G][0].getOwner().remove(f[G][0]));m.push(F),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=m},_.prototype.growTree=function(s){for(var m,u=s[s.length-1],p=0;p<u.length;p++)m=u[p],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},_.prototype.findPlaceforPrunedNode=function(s){var m,u,p=s[0];if(u=p==s[1].source?s[1].target:s[1].source,g.PURE_INCREMENTAL)p.setCenter(u.getCenterX()+s[3].getWidth(),u.getCenterY()+s[3].getHeight());else{var f=u.startX,w=u.finishX,I=u.startY,x=u.finishY,F=[0,0,0,0];if(I>0)for(var G=f;G<=w;G++)F[0]+=this.grid[G][I-1].length+this.grid[G][I].length-1;if(w<this.grid.length-1)for(G=I;G<=x;G++)F[1]+=this.grid[w+1][G].length+this.grid[w][G].length-1;if(x<this.grid[0].length-1)for(G=f;G<=w;G++)F[2]+=this.grid[G][x+1].length+this.grid[G][x].length-1;if(f>0)for(G=I;G<=x;G++)F[3]+=this.grid[f-1][G].length+this.grid[f][G].length-1;for(var S,D,z=P.MAX_VALUE,W=0;W<F.length;W++)F[W]<z?(z=F[W],S=1,D=W):F[W]==z&&S++;if(S==3&&z==0)F[0]==0&&F[1]==0&&F[2]==0?m=1:F[0]==0&&F[1]==0&&F[3]==0?m=0:F[0]==0&&F[2]==0&&F[3]==0?m=3:F[1]==0&&F[2]==0&&F[3]==0&&(m=2);else if(S==2&&z==0){var U=Math.floor(2*Math.random());m=F[0]==0&&F[1]==0?U==0?0:1:F[0]==0&&F[2]==0?U==0?0:2:F[0]==0&&F[3]==0?U==0?0:3:F[1]==0&&F[2]==0?U==0?1:2:F[1]==0&&F[3]==0?U==0?1:3:U==0?2:3}else m=S==4&&z==0?U=Math.floor(4*Math.random()):D;m==0?p.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-l.DEFAULT_EDGE_LENGTH-p.getHeight()/2):m==1?p.setCenter(u.getCenterX()+u.getWidth()/2+l.DEFAULT_EDGE_LENGTH+p.getWidth()/2,u.getCenterY()):m==2?p.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+l.DEFAULT_EDGE_LENGTH+p.getHeight()/2):p.setCenter(u.getCenterX()-u.getWidth()/2-l.DEFAULT_EDGE_LENGTH-p.getWidth()/2,u.getCenterY())}},r.exports=_},991:(r,a,e)=>{var n=e(551).FDLayoutNode,i=e(551).IMath;function o(h,g,c,l){n.call(this,h,g,c,l)}for(var t in o.prototype=Object.create(n.prototype),n)o[t]=n[t];o.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(h,g){for(var c,l=this.getChild().getNodes(),y=0;y<l.length;y++)(c=l[y]).getChild()==null?(c.displacementX+=h,c.displacementY+=g):c.propogateDisplacementToChildren(h,g)},o.prototype.move=function(){var h=this.graphManager.getLayout();this.child!=null&&this.child.getNodes().length!=0||(this.moveBy(this.displacementX,this.displacementY),h.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},o.prototype.setPred1=function(h){this.pred1=h},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(h){this.next=h},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(h){this.processed=h},o.prototype.isProcessed=function(){return processed},r.exports=o},902:(r,a,e)=>{function n(c){if(Array.isArray(c)){for(var l=0,y=Array(c.length);l<c.length;l++)y[l]=c[l];return y}return Array.from(c)}var i=e(806),o=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function g(){}g.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var y=new Map,v=new Map,N=[],A=[],M=c.getAllNodes(),P=0,b=0;b<M.length;b++){var Y=M[b];Y.getChild()==null&&(v.set(Y.id,P++),N.push(Y.getCenterX()),A.push(Y.getCenterY()),y.set(Y.id,Y))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(R){R.gap||R.gap==0||(R.left?R.gap=i.DEFAULT_EDGE_LENGTH+y.get(R.left).getWidth()/2+y.get(R.right).getWidth()/2:R.gap=i.DEFAULT_EDGE_LENGTH+y.get(R.top).getHeight()/2+y.get(R.bottom).getHeight()/2)});var H=function(R){var k=0,Q=0;return R.forEach(function(Z){k+=N[v.get(Z)],Q+=A[v.get(Z)]}),{x:k/R.size,y:Q/R.size}},q=function(R,k,Q,Z,st){var It=new Map;R.forEach(function(lt,$){It.set($,0)}),R.forEach(function(lt,$){lt.forEach(function(gt){It.set(gt.id,It.get(gt.id)+1)})});var rt=new Map,mt=new Map,ft=new o;It.forEach(function(lt,$){lt==0?(ft.push($),Q||(k=="horizontal"?rt.set($,v.has($)?N[v.get($)]:Z.get($)):rt.set($,v.has($)?A[v.get($)]:Z.get($)))):rt.set($,Number.NEGATIVE_INFINITY),Q&&mt.set($,new Set([$]))}),Q&&st.forEach(function(lt){var $=[];if(lt.forEach(function(at){Q.has(at)&&$.push(at)}),$.length>0){var gt=0;$.forEach(function(at){k=="horizontal"?(rt.set(at,v.has(at)?N[v.get(at)]:Z.get(at)),gt+=rt.get(at)):(rt.set(at,v.has(at)?A[v.get(at)]:Z.get(at)),gt+=rt.get(at))}),gt/=$.length,lt.forEach(function(at){Q.has(at)||rt.set(at,gt)})}else{var Nt=0;lt.forEach(function(at){Nt+=k=="horizontal"?v.has(at)?N[v.get(at)]:Z.get(at):v.has(at)?A[v.get(at)]:Z.get(at)}),Nt/=lt.length,lt.forEach(function(at){rt.set(at,Nt)})}});for(var St=function(){var lt=ft.shift();R.get(lt).forEach(function($){if(rt.get($.id)<rt.get(lt)+$.gap)if(Q&&Q.has($.id)){var gt=void 0;if(gt=k=="horizontal"?v.has($.id)?N[v.get($.id)]:Z.get($.id):v.has($.id)?A[v.get($.id)]:Z.get($.id),rt.set($.id,gt),gt<rt.get(lt)+$.gap){var Nt=rt.get(lt)+$.gap-gt;mt.get(lt).forEach(function(at){rt.set(at,rt.get(at)-Nt)})}}else rt.set($.id,rt.get(lt)+$.gap);It.set($.id,It.get($.id)-1),It.get($.id)==0&&ft.push($.id),Q&&mt.set($.id,(function(at,Ft){var bt=new Set(at),Dt=!0,At=!1,ct=void 0;try{for(var Gt,Ct=Ft[Symbol.iterator]();!(Dt=(Gt=Ct.next()).done);Dt=!0){var Yt=Gt.value;bt.add(Yt)}}catch(Xt){At=!0,ct=Xt}finally{try{!Dt&&Ct.return&&Ct.return()}finally{if(At)throw ct}}return bt})(mt.get(lt),mt.get($.id)))})};ft.length!=0;)St();if(Q){var et=new Set;R.forEach(function(lt,$){lt.length==0&&et.add($)});var pt=[];mt.forEach(function(lt,$){if(et.has($)){var gt=!1,Nt=!0,at=!1,Ft=void 0;try{for(var bt,Dt=lt[Symbol.iterator]();!(Nt=(bt=Dt.next()).done);Nt=!0){var At=bt.value;Q.has(At)&&(gt=!0)}}catch(Ct){at=!0,Ft=Ct}finally{try{!Nt&&Dt.return&&Dt.return()}finally{if(at)throw Ft}}if(!gt){var ct=!1,Gt=void 0;pt.forEach(function(Ct,Yt){Ct.has([].concat(n(lt))[0])&&(ct=!0,Gt=Yt)}),ct?lt.forEach(function(Ct){pt[Gt].add(Ct)}):pt.push(new Set(lt))}}}),pt.forEach(function(lt,$){var gt=Number.POSITIVE_INFINITY,Nt=Number.POSITIVE_INFINITY,at=Number.NEGATIVE_INFINITY,Ft=Number.NEGATIVE_INFINITY,bt=!0,Dt=!1,At=void 0;try{for(var ct,Gt=lt[Symbol.iterator]();!(bt=(ct=Gt.next()).done);bt=!0){var Ct=ct.value,Yt=void 0;Yt=k=="horizontal"?v.has(Ct)?N[v.get(Ct)]:Z.get(Ct):v.has(Ct)?A[v.get(Ct)]:Z.get(Ct);var Xt=rt.get(Ct);Yt<gt&&(gt=Yt),Yt>at&&(at=Yt),Xt<Nt&&(Nt=Xt),Xt>Ft&&(Ft=Xt)}}catch(Wt){Dt=!0,At=Wt}finally{try{!bt&&Gt.return&&Gt.return()}finally{if(Dt)throw At}}var ne=(gt+at)/2-(Nt+Ft)/2,Kt=!0,Bt=!1,jt=void 0;try{for(var qt,Vt=lt[Symbol.iterator]();!(Kt=(qt=Vt.next()).done);Kt=!0){var te=qt.value;rt.set(te,rt.get(te)+ne)}}catch(Wt){Bt=!0,jt=Wt}finally{try{!Kt&&Vt.return&&Vt.return()}finally{if(Bt)throw jt}}})}return rt},_=function(R){var k=0,Q=0,Z=0,st=0;if(R.forEach(function(ft){ft.left?N[v.get(ft.left)]-N[v.get(ft.right)]>=0?k++:Q++:A[v.get(ft.top)]-A[v.get(ft.bottom)]>=0?Z++:st++}),k>Q&&Z>st)for(var It=0;It<v.size;It++)N[It]=-1*N[It],A[It]=-1*A[It];else if(k>Q)for(var rt=0;rt<v.size;rt++)N[rt]=-1*N[rt];else if(Z>st)for(var mt=0;mt<v.size;mt++)A[mt]=-1*A[mt]},B=function(R){var k=[],Q=new o,Z=new Set,st=0;return R.forEach(function(It,rt){if(!Z.has(rt)){k[st]=[];var mt=rt;for(Q.push(mt),Z.add(mt),k[st].push(mt);Q.length!=0;)mt=Q.shift(),R.get(mt).forEach(function(ft){Z.has(ft.id)||(Q.push(ft.id),Z.add(ft.id),k[st].push(ft.id))});st++}}),k},s=function(R){var k=new Map;return R.forEach(function(Q,Z){k.set(Z,[])}),R.forEach(function(Q,Z){Q.forEach(function(st){k.get(Z).push(st),k.get(st.id).push({id:Z,gap:st.gap,direction:st.direction})})}),k},m=function(R){var k=new Map;return R.forEach(function(Q,Z){k.set(Z,[])}),R.forEach(function(Q,Z){Q.forEach(function(st){k.get(st.id).push({id:Z,gap:st.gap,direction:st.direction})})}),k},u=[],p=[],f=!1,w=!1,I=new Set,x=new Map,F=new Map,G=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(R){I.add(R.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(R){R.left?(x.has(R.left)?x.get(R.left).push({id:R.right,gap:R.gap,direction:"horizontal"}):x.set(R.left,[{id:R.right,gap:R.gap,direction:"horizontal"}]),x.has(R.right)||x.set(R.right,[])):(x.has(R.top)?x.get(R.top).push({id:R.bottom,gap:R.gap,direction:"vertical"}):x.set(R.top,[{id:R.bottom,gap:R.gap,direction:"vertical"}]),x.has(R.bottom)||x.set(R.bottom,[]))}),F=s(x),G=B(F)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(R,k){u[k]=[R.position.x,R.position.y],p[k]=[N[v.get(R.nodeId)],A[v.get(R.nodeId)]]}),f=!0;else if(l.alignmentConstraint)(function(){var R=0;if(l.alignmentConstraint.vertical){for(var k=l.alignmentConstraint.vertical,Q=function(mt){var ft=new Set;k[mt].forEach(function(pt){ft.add(pt)});var St=new Set([].concat(n(ft)).filter(function(pt){return I.has(pt)})),et=void 0;et=St.size>0?N[v.get(St.values().next().value)]:H(ft).x,k[mt].forEach(function(pt){u[R]=[et,A[v.get(pt)]],p[R]=[N[v.get(pt)],A[v.get(pt)]],R++})},Z=0;Z<k.length;Z++)Q(Z);f=!0}if(l.alignmentConstraint.horizontal){for(var st=l.alignmentConstraint.horizontal,It=function(mt){var ft=new Set;st[mt].forEach(function(pt){ft.add(pt)});var St=new Set([].concat(n(ft)).filter(function(pt){return I.has(pt)})),et=void 0;et=St.size>0?N[v.get(St.values().next().value)]:H(ft).y,st[mt].forEach(function(pt){u[R]=[N[v.get(pt)],et],p[R]=[N[v.get(pt)],A[v.get(pt)]],R++})},rt=0;rt<st.length;rt++)It(rt);f=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var S=0,D=0,z=0;z<G.length;z++)G[z].length>S&&(S=G[z].length,D=z);if(S<F.size/2)_(l.relativePlacementConstraint),f=!1,w=!1;else{var W=new Map,U=new Map,O=[];G[D].forEach(function(R){x.get(R).forEach(function(k){k.direction=="horizontal"?(W.has(R)?W.get(R).push(k):W.set(R,[k]),W.has(k.id)||W.set(k.id,[]),O.push({left:R,right:k.id})):(U.has(R)?U.get(R).push(k):U.set(R,[k]),U.has(k.id)||U.set(k.id,[]),O.push({top:R,bottom:k.id}))})}),_(O),w=!1;var X=q(W,"horizontal"),j=q(U,"vertical");G[D].forEach(function(R,k){p[k]=[N[v.get(R)],A[v.get(R)]],u[k]=[],X.has(R)?u[k][0]=X.get(R):u[k][0]=N[v.get(R)],j.has(R)?u[k][1]=j.get(R):u[k][1]=A[v.get(R)]}),f=!0}}if(f){for(var J,it=t.transpose(u),V=t.transpose(p),yt=0;yt<it.length;yt++)it[yt]=t.multGamma(it[yt]),V[yt]=t.multGamma(V[yt]);var Lt=t.multMat(it,t.transpose(V)),Ut=h.svd(Lt);J=t.multMat(Ut.V,t.transpose(Ut.U));for(var Rt=0;Rt<v.size;Rt++){var K=[N[Rt],A[Rt]],ot=[J[0][0],J[1][0]],ut=[J[0][1],J[1][1]];N[Rt]=t.dotProduct(K,ot),A[Rt]=t.dotProduct(K,ut)}w&&_(l.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var dt={x:0,y:0};l.fixedNodeConstraint.forEach(function(R,k){var Q,Z,st={x:N[v.get(R.nodeId)],y:A[v.get(R.nodeId)]},It=R.position,rt=(Z=st,{x:(Q=It).x-Z.x,y:Q.y-Z.y});dt.x+=rt.x,dt.y+=rt.y}),dt.x/=l.fixedNodeConstraint.length,dt.y/=l.fixedNodeConstraint.length,N.forEach(function(R,k){N[k]+=dt.x}),A.forEach(function(R,k){A[k]+=dt.y}),l.fixedNodeConstraint.forEach(function(R){N[v.get(R.nodeId)]=R.position.x,A[v.get(R.nodeId)]=R.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var vt=l.alignmentConstraint.vertical,Et=function(R){var k=new Set;vt[R].forEach(function(st){k.add(st)});var Q=new Set([].concat(n(k)).filter(function(st){return I.has(st)})),Z=void 0;Z=Q.size>0?N[v.get(Q.values().next().value)]:H(k).x,k.forEach(function(st){I.has(st)||(N[v.get(st)]=Z)})},ht=0;ht<vt.length;ht++)Et(ht);if(l.alignmentConstraint.horizontal)for(var Tt=l.alignmentConstraint.horizontal,_t=function(R){var k=new Set;Tt[R].forEach(function(st){k.add(st)});var Q=new Set([].concat(n(k)).filter(function(st){return I.has(st)})),Z=void 0;Z=Q.size>0?A[v.get(Q.values().next().value)]:H(k).y,k.forEach(function(st){I.has(st)||(A[v.get(st)]=Z)})},Ot=0;Ot<Tt.length;Ot++)_t(Ot)}l.relativePlacementConstraint&&(function(){var R=new Map,k=new Map,Q=new Map,Z=new Map,st=new Map,It=new Map,rt=new Set,mt=new Set;if(I.forEach(function(tt){rt.add(tt),mt.add(tt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var ft=l.alignmentConstraint.vertical,St=function(tt){Q.set("dummy"+tt,[]),ft[tt].forEach(function(wt){R.set(wt,"dummy"+tt),Q.get("dummy"+tt).push(wt),I.has(wt)&&rt.add("dummy"+tt)}),st.set("dummy"+tt,N[v.get(ft[tt][0])])},et=0;et<ft.length;et++)St(et);if(l.alignmentConstraint.horizontal)for(var pt=l.alignmentConstraint.horizontal,lt=function(tt){Z.set("dummy"+tt,[]),pt[tt].forEach(function(wt){k.set(wt,"dummy"+tt),Z.get("dummy"+tt).push(wt),I.has(wt)&&mt.add("dummy"+tt)}),It.set("dummy"+tt,A[v.get(pt[tt][0])])},$=0;$<pt.length;$++)lt($)}var gt=new Map,Nt=new Map,at=function(tt){x.get(tt).forEach(function(wt){var kt=void 0,Ht=void 0;wt.direction=="horizontal"?(kt=R.get(tt)?R.get(tt):tt,Ht=R.get(wt.id)?{id:R.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,gt.has(kt)?gt.get(kt).push(Ht):gt.set(kt,[Ht]),gt.has(Ht.id)||gt.set(Ht.id,[])):(kt=k.get(tt)?k.get(tt):tt,Ht=k.get(wt.id)?{id:k.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,Nt.has(kt)?Nt.get(kt).push(Ht):Nt.set(kt,[Ht]),Nt.has(Ht.id)||Nt.set(Ht.id,[]))})},Ft=!0,bt=!1,Dt=void 0;try{for(var At,ct=x.keys()[Symbol.iterator]();!(Ft=(At=ct.next()).done);Ft=!0)at(At.value)}catch(tt){bt=!0,Dt=tt}finally{try{!Ft&&ct.return&&ct.return()}finally{if(bt)throw Dt}}var Gt=s(gt),Ct=s(Nt),Yt=B(Gt),Xt=B(Ct),ne=m(gt),Kt=m(Nt),Bt=[],jt=[];Yt.forEach(function(tt,wt){Bt[wt]=[],tt.forEach(function(kt){ne.get(kt).length==0&&Bt[wt].push(kt)})}),Xt.forEach(function(tt,wt){jt[wt]=[],tt.forEach(function(kt){Kt.get(kt).length==0&&jt[wt].push(kt)})});var qt=q(gt,"horizontal",rt,st,Bt),Vt=q(Nt,"vertical",mt,It,jt),te=function(tt){Q.get(tt)?Q.get(tt).forEach(function(wt){N[v.get(wt)]=qt.get(tt)}):N[v.get(tt)]=qt.get(tt)},Wt=!0,ce=!1,ue=void 0;try{for(var fe,re=qt.keys()[Symbol.iterator]();!(Wt=(fe=re.next()).done);Wt=!0)te(fe.value)}catch(tt){ce=!0,ue=tt}finally{try{!Wt&&re.return&&re.return()}finally{if(ce)throw ue}}var Xe=function(tt){Z.get(tt)?Z.get(tt).forEach(function(wt){A[v.get(wt)]=Vt.get(tt)}):A[v.get(tt)]=Vt.get(tt)},ie=!0,pe=!1,me=void 0;try{for(var ve,oe=Vt.keys()[Symbol.iterator]();!(ie=(ve=oe.next()).done);ie=!0)Xe(ve.value)}catch(tt){pe=!0,me=tt}finally{try{!ie&&oe.return&&oe.return()}finally{if(pe)throw me}}})()}for(var Mt=0;Mt<M.length;Mt++){var xt=M[Mt];xt.getChild()==null&&xt.setCenter(N[v.get(xt.id)],A[v.get(xt.id)])}},r.exports=g},551:r=>{r.exports=T}},E={},d=(function r(a){var e=E[a];if(e!==void 0)return e.exports;var n=E[a]={exports:{}};return L[a](n,n.exports,r),n.exports})(45),d;var L,E,d},Ae.exports=C(ln()));var C}var Ie,Ce,Me,le;const gn=an(Ie?Te.exports:(Ie=1,Te.exports=(Ce=dn(),Me={658:C=>{C.exports=Object.assign!=null?Object.assign.bind(Object):function(T){for(var L=arguments.length,E=Array(L>1?L-1:0),d=1;d<L;d++)E[d-1]=arguments[d];return E.forEach(function(r){Object.keys(r).forEach(function(a){return T[a]=r[a]})}),T}},548:(C,T,L)=>{var E=function(a,e){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return(function(n,i){var o=[],t=!0,h=!1,g=void 0;try{for(var c,l=n[Symbol.iterator]();!(t=(c=l.next()).done)&&(o.push(c.value),!i||o.length!==i);t=!0);}catch(y){h=!0,g=y}finally{try{!t&&l.return&&l.return()}finally{if(h)throw g}}return o})(a,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},d=L(140).layoutBase.LinkedList,r={getTopMostNodes:function(a){for(var e={},n=0;n<a.length;n++)e[a[n].id()]=!0;var i=a.filter(function(o,t){typeof o=="number"&&(o=t);for(var h=o.parent()[0];h!=null;){if(e[h.id()])return!1;h=h.parent()[0]}return!0});return i},connectComponents:function(a,e,n,i){var o=new d,t=new Set,h=[],g=void 0,c=void 0,l=void 0,y=!1,v=1,N=[],A=[],M=function(){var P=a.collection();A.push(P);var b=n[0],Y=a.collection();Y.merge(b).merge(b.descendants().intersection(e)),h.push(b),Y.forEach(function(_){o.push(_),t.add(_),P.merge(_)});for(var H=function(){b=o.shift();var _=a.collection();b.neighborhood().nodes().forEach(function(m){e.intersection(b.edgesWith(m)).length>0&&_.merge(m)});for(var B=0;B<_.length;B++){var s=_[B];(g=n.intersection(s.union(s.ancestors())))==null||t.has(g[0])||g.union(g.descendants()).forEach(function(m){o.push(m),t.add(m),P.merge(m),n.has(m)&&h.push(m)})}};o.length!=0;)H();if(P.forEach(function(_){e.intersection(_.connectedEdges()).forEach(function(B){P.has(B.source())&&P.has(B.target())&&P.merge(B)})}),h.length==n.length&&(y=!0),!y||y&&v>1){c=h[0],l=c.connectedEdges().length,h.forEach(function(_){_.connectedEdges().length<l&&(l=_.connectedEdges().length,c=_)}),N.push(c.id());var q=a.collection();q.merge(h[0]),h.forEach(function(_){q.merge(_)}),h=[],n=n.difference(q),v++}};do M();while(!y);return i&&N.length>0&&i.set("dummy"+(i.size+1),N),A},relocateComponent:function(a,e,n){if(!n.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(n.quality=="draft"){var g=!0,c=!1,l=void 0;try{for(var y,v=e.nodeIndexes[Symbol.iterator]();!(g=(y=v.next()).done);g=!0){var N=y.value,A=E(N,2),M=A[0],P=A[1],b=n.cy.getElementById(M);if(b){var Y=b.boundingBox(),H=e.xCoords[P]-Y.w/2,q=e.xCoords[P]+Y.w/2,_=e.yCoords[P]-Y.h/2,B=e.yCoords[P]+Y.h/2;H<i&&(i=H),q>o&&(o=q),_<t&&(t=_),B>h&&(h=B)}}}catch(f){c=!0,l=f}finally{try{!g&&v.return&&v.return()}finally{if(c)throw l}}var s=a.x-(o+i)/2,m=a.y-(h+t)/2;e.xCoords=e.xCoords.map(function(f){return f+s}),e.yCoords=e.yCoords.map(function(f){return f+m})}else{Object.keys(e).forEach(function(f){var w=e[f],I=w.getRect().x,x=w.getRect().x+w.getRect().width,F=w.getRect().y,G=w.getRect().y+w.getRect().height;I<i&&(i=I),x>o&&(o=x),F<t&&(t=F),G>h&&(h=G)});var u=a.x-(o+i)/2,p=a.y-(h+t)/2;Object.keys(e).forEach(function(f){var w=e[f];w.setCenter(w.getCenterX()+u,w.getCenterY()+p)})}}},calcBoundingBox:function(a,e,n,i){for(var o=Number.MAX_SAFE_INTEGER,t=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,g=Number.MIN_SAFE_INTEGER,c=void 0,l=void 0,y=void 0,v=void 0,N=a.descendants().not(":parent"),A=N.length,M=0;M<A;M++){var P=N[M];o>(c=e[i.get(P.id())]-P.width()/2)&&(o=c),t<(l=e[i.get(P.id())]+P.width()/2)&&(t=l),h>(y=n[i.get(P.id())]-P.height()/2)&&(h=y),g<(v=n[i.get(P.id())]+P.height()/2)&&(g=v)}var b={};return b.topLeftX=o,b.topLeftY=h,b.width=t-o,b.height=g-h,b},calcParentsWithoutChildren:function(a,e){var n=a.collection();return e.nodes(":parent").forEach(function(i){var o=!1;i.children().forEach(function(t){t.css("display")!="none"&&(o=!0)}),o||n.merge(i)}),n}};C.exports=r},816:(C,T,L)=>{var E=L(548),d=L(140).CoSELayout,r=L(140).CoSENode,a=L(140).layoutBase.PointD,e=L(140).layoutBase.DimensionD,n=L(140).layoutBase.LayoutConstants,i=L(140).layoutBase.FDLayoutConstants,o=L(140).CoSEConstants;C.exports={coseLayout:function(t,h){var g=t.cy,c=t.eles,l=c.nodes(),y=c.edges(),v=void 0,N=void 0,A=void 0,M={};t.randomize&&(v=h.nodeIndexes,N=h.xCoords,A=h.yCoords);var P=function(_){return typeof _=="function"},b=function(_,B){return P(_)?_(B):_},Y=E.calcParentsWithoutChildren(g,c);t.nestingFactor!=null&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),t.gravity!=null&&(o.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),t.numIter!=null&&(o.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),t.gravityRange!=null&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),t.gravityCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),t.gravityRangeCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),t.initialEnergyOnIncremental!=null&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),t.tilingCompareBy!=null&&(o.TILING_COMPARE_BY=t.tilingCompareBy),t.quality=="proof"?n.QUALITY=2:n.QUALITY=0,o.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,o.ANIMATE=i.ANIMATE=n.ANIMATE=t.animate,o.TILE=t.tile,o.TILING_PADDING_VERTICAL=typeof t.tilingPaddingVertical=="function"?t.tilingPaddingVertical.call():t.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL=typeof t.tilingPaddingHorizontal=="function"?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,o.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!0,o.PURE_INCREMENTAL=!t.randomize,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,t.step=="transformed"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!1),t.step=="enforced"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!1),t.step=="cose"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!0),t.step=="all"&&(t.randomize?o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?o.TREE_REDUCTION_ON_INCREMENTAL=!1:o.TREE_REDUCTION_ON_INCREMENTAL=!0;var H=new d,q=H.newGraphManager();return(function _(B,s,m,u){for(var p=s.length,f=0;f<p;f++){var w=s[f],I=null;w.intersection(Y).length==0&&(I=w.children());var x=void 0,F=w.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null)if(u.randomize)if(w.isParent()){var G=E.calcBoundingBox(w,N,A,v);x=w.intersection(Y).length==0?B.add(new r(m.graphManager,new a(G.topLeftX,G.topLeftY),new e(G.width,G.height))):B.add(new r(m.graphManager,new a(G.topLeftX,G.topLeftY),new e(parseFloat(F.w),parseFloat(F.h))))}else x=B.add(new r(m.graphManager,new a(N[v.get(w.id())]-F.w/2,A[v.get(w.id())]-F.h/2),new e(parseFloat(F.w),parseFloat(F.h))));else x=B.add(new r(m.graphManager,new a(w.position("x")-F.w/2,w.position("y")-F.h/2),new e(parseFloat(F.w),parseFloat(F.h))));else x=B.add(new r(this.graphManager));x.id=w.data("id"),x.nodeRepulsion=b(u.nodeRepulsion,w),x.paddingLeft=parseInt(w.css("padding")),x.paddingTop=parseInt(w.css("padding")),x.paddingRight=parseInt(w.css("padding")),x.paddingBottom=parseInt(w.css("padding")),u.nodeDimensionsIncludeLabels&&(x.labelWidth=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,x.labelHeight=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,x.labelPosVertical=w.css("text-valign"),x.labelPosHorizontal=w.css("text-halign")),M[w.data("id")]=x,isNaN(x.rect.x)&&(x.rect.x=0),isNaN(x.rect.y)&&(x.rect.y=0),I!=null&&I.length>0&&_(m.getGraphManager().add(m.newGraph(),x),I,m,u)}})(q.addRoot(),E.getTopMostNodes(l),H,t),(function(_,B,s){for(var m=0,u=0,p=0;p<s.length;p++){var f=s[p],w=M[f.data("source")],I=M[f.data("target")];if(w&&I&&w!==I&&w.getEdgesBetween(I).length==0){var x=B.add(_.newEdge(),w,I);x.id=f.id(),x.idealLength=b(t.idealEdgeLength,f),x.edgeElasticity=b(t.edgeElasticity,f),m+=x.idealLength,u++}}t.idealEdgeLength!=null&&(u>0?o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=m/u:P(t.idealEdgeLength)?o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=50:o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,o.MIN_REPULSION_DIST=i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,o.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH)})(H,q,y),(function(_,B){B.fixedNodeConstraint&&(_.constraints.fixedNodeConstraint=B.fixedNodeConstraint),B.alignmentConstraint&&(_.constraints.alignmentConstraint=B.alignmentConstraint),B.relativePlacementConstraint&&(_.constraints.relativePlacementConstraint=B.relativePlacementConstraint)})(H,t),H.runLayout(),M}}},212:(C,T,L)=>{var E=(function(){function o(t,h){for(var g=0;g<h.length;g++){var c=h[g];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}return function(t,h,g){return h&&o(t.prototype,h),g&&o(t,g),t}})(),d=L(658),r=L(548),a=L(657).spectralLayout,e=L(816).coseLayout,n=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(o){return 4500},idealEdgeLength:function(o){return 50},edgeElasticity:function(o){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(){}}),i=(function(){function o(t){(function(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")})(this,o),this.options=d({},n,t)}return E(o,[{key:"run",value:function(){var t=this.options,h=t.cy,g=t.eles,c=[],l=[],y=void 0,v=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&t.fixedNodeConstraint.length!=0||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&t.alignmentConstraint.vertical.length!=0||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&t.alignmentConstraint.horizontal.length!=0||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&t.relativePlacementConstraint.length!=0||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var N=void 0,A=!1;if(h.layoutUtilities&&t.packComponents&&((N=h.layoutUtilities("get"))||(N=h.layoutUtilities()),A=!0),g.nodes().length>0)if(A){var M=r.getTopMostNodes(t.eles.nodes());if((y=r.connectComponents(h,t.eles,M)).forEach(function(S){var D=S.boundingBox();v.push({x:D.x1+D.w/2,y:D.y1+D.h/2})}),t.randomize&&y.forEach(function(S){t.eles=S,c.push(a(t))}),t.quality=="default"||t.quality=="proof"){var P=h.collection();if(t.tile){var b=new Map,Y=0,H={nodeIndexes:b,xCoords:[],yCoords:[]},q=[];if(y.forEach(function(S,D){S.edges().length==0&&(S.nodes().forEach(function(z,W){P.merge(S.nodes()[W]),z.isParent()||(H.nodeIndexes.set(S.nodes()[W].id(),Y++),H.xCoords.push(S.nodes()[0].position().x),H.yCoords.push(S.nodes()[0].position().y))}),q.push(D))}),P.length>1){var _=P.boundingBox();v.push({x:_.x1+_.w/2,y:_.y1+_.h/2}),y.push(P),c.push(H);for(var B=q.length-1;B>=0;B--)y.splice(q[B],1),c.splice(q[B],1),v.splice(q[B],1)}}y.forEach(function(S,D){t.eles=S,l.push(e(t,c[D])),r.relocateComponent(v[D],l[D],t)})}else y.forEach(function(S,D){r.relocateComponent(v[D],c[D],t)});var s=new Set;if(y.length>1){var m=[],u=g.filter(function(S){return S.css("display")=="none"});y.forEach(function(S,D){var z=void 0;if(t.quality=="draft"&&(z=c[D].nodeIndexes),S.nodes().not(u).length>0){var W={edges:[],nodes:[]},U=void 0;S.nodes().not(u).forEach(function(O){if(t.quality=="draft")if(O.isParent()){var X=r.calcBoundingBox(O,c[D].xCoords,c[D].yCoords,z);W.nodes.push({x:X.topLeftX,y:X.topLeftY,width:X.width,height:X.height})}else U=z.get(O.id()),W.nodes.push({x:c[D].xCoords[U]-O.boundingbox().w/2,y:c[D].yCoords[U]-O.boundingbox().h/2,width:O.boundingbox().w,height:O.boundingbox().h});else l[D][O.id()]&&W.nodes.push({x:l[D][O.id()].getLeft(),y:l[D][O.id()].getTop(),width:l[D][O.id()].getWidth(),height:l[D][O.id()].getHeight()})}),S.edges().forEach(function(O){var X=O.source(),j=O.target();if(X.css("display")!="none"&&j.css("display")!="none")if(t.quality=="draft"){var J=z.get(X.id()),it=z.get(j.id()),V=[],yt=[];if(X.isParent()){var Lt=r.calcBoundingBox(X,c[D].xCoords,c[D].yCoords,z);V.push(Lt.topLeftX+Lt.width/2),V.push(Lt.topLeftY+Lt.height/2)}else V.push(c[D].xCoords[J]),V.push(c[D].yCoords[J]);if(j.isParent()){var Ut=r.calcBoundingBox(j,c[D].xCoords,c[D].yCoords,z);yt.push(Ut.topLeftX+Ut.width/2),yt.push(Ut.topLeftY+Ut.height/2)}else yt.push(c[D].xCoords[it]),yt.push(c[D].yCoords[it]);W.edges.push({startX:V[0],startY:V[1],endX:yt[0],endY:yt[1]})}else l[D][X.id()]&&l[D][j.id()]&&W.edges.push({startX:l[D][X.id()].getCenterX(),startY:l[D][X.id()].getCenterY(),endX:l[D][j.id()].getCenterX(),endY:l[D][j.id()].getCenterY()})}),W.nodes.length>0&&(m.push(W),s.add(D))}});var p=N.packComponents(m,t.randomize).shifts;if(t.quality=="draft")c.forEach(function(S,D){var z=S.xCoords.map(function(U){return U+p[D].dx}),W=S.yCoords.map(function(U){return U+p[D].dy});S.xCoords=z,S.yCoords=W});else{var f=0;s.forEach(function(S){Object.keys(l[S]).forEach(function(D){var z=l[S][D];z.setCenter(z.getCenterX()+p[f].dx,z.getCenterY()+p[f].dy)}),f++})}}}else{var w=t.eles.boundingBox();if(v.push({x:w.x1+w.w/2,y:w.y1+w.h/2}),t.randomize){var I=a(t);c.push(I)}t.quality=="default"||t.quality=="proof"?(l.push(e(t,c[0])),r.relocateComponent(v[0],l[0],t)):r.relocateComponent(v[0],c[0],t)}var x=function(S,D){if(t.quality=="default"||t.quality=="proof"){typeof S=="number"&&(S=D);var z=void 0,W=void 0,U=S.data("id");return l.forEach(function(X){U in X&&(z={x:X[U].getRect().getCenterX(),y:X[U].getRect().getCenterY()},W=X[U])}),t.nodeDimensionsIncludeLabels&&(W.labelWidth&&(W.labelPosHorizontal=="left"?z.x+=W.labelWidth/2:W.labelPosHorizontal=="right"&&(z.x-=W.labelWidth/2)),W.labelHeight&&(W.labelPosVertical=="top"?z.y+=W.labelHeight/2:W.labelPosVertical=="bottom"&&(z.y-=W.labelHeight/2))),z==null&&(z={x:S.position("x"),y:S.position("y")}),{x:z.x,y:z.y}}var O=void 0;return c.forEach(function(X){var j=X.nodeIndexes.get(S.id());j!=null&&(O={x:X.xCoords[j],y:X.yCoords[j]})}),O==null&&(O={x:S.position("x"),y:S.position("y")}),{x:O.x,y:O.y}};if(t.quality=="default"||t.quality=="proof"||t.randomize){var F=r.calcParentsWithoutChildren(h,g),G=g.filter(function(S){return S.css("display")=="none"});t.eles=g.not(G),g.nodes().not(":parent").not(G).layoutPositions(this,t,x),F.length>0&&F.forEach(function(S){S.position(x(S))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o})();C.exports=i},657:(C,T,L)=>{var E=L(548),d=L(140).layoutBase.Matrix,r=L(140).layoutBase.SVD;C.exports={spectralLayout:function(a){var e=a.cy,n=a.eles,i=n.nodes(),o=n.nodes(":parent"),t=new Map,h=new Map,g=new Map,c=[],l=[],y=[],v=[],N=[],A=[],M=[],P=[],b=void 0,Y=1e8,H=1e-9,q=a.piTol,_=a.samplingType,B=a.nodeSeparation,s=void 0,m=function(K,ot,ut){for(var dt=[],vt=0,Et=0,ht=0,Tt=void 0,_t=[],Ot=0,Mt=1,xt=0;xt<b;xt++)_t[xt]=Y;for(dt[Et]=K,_t[K]=0;Et>=vt;){ht=dt[vt++];for(var R=c[ht],k=0;k<R.length;k++)_t[Tt=h.get(R[k])]==Y&&(_t[Tt]=_t[ht]+1,dt[++Et]=Tt);A[ht][ot]=_t[ht]*B}if(ut){for(var Q=0;Q<b;Q++)A[Q][ot]<N[Q]&&(N[Q]=A[Q][ot]);for(var Z=0;Z<b;Z++)N[Z]>Ot&&(Ot=N[Z],Mt=Z)}return Mt};E.connectComponents(e,n,E.getTopMostNodes(i),t),o.forEach(function(K){E.connectComponents(e,n,E.getTopMostNodes(K.descendants().intersection(n)),t)});for(var u=0,p=0;p<i.length;p++)i[p].isParent()||h.set(i[p].id(),u++);var f=!0,w=!1,I=void 0;try{for(var x,F=t.keys()[Symbol.iterator]();!(f=(x=F.next()).done);f=!0){var G=x.value;h.set(G,u++)}}catch(K){w=!0,I=K}finally{try{!f&&F.return&&F.return()}finally{if(w)throw I}}for(var S=0;S<h.size;S++)c[S]=[];o.forEach(function(K){for(var ot=K.children().intersection(n);ot.nodes(":childless").length==0;)ot=ot.nodes()[0].children().intersection(n);var ut=0,dt=ot.nodes(":childless")[0].connectedEdges().length;ot.nodes(":childless").forEach(function(vt,Et){vt.connectedEdges().length<dt&&(dt=vt.connectedEdges().length,ut=Et)}),g.set(K.id(),ot.nodes(":childless")[ut].id())}),i.forEach(function(K){var ot=void 0;ot=K.isParent()?h.get(g.get(K.id())):h.get(K.id()),K.neighborhood().nodes().forEach(function(ut){n.intersection(K.edgesWith(ut)).length>0&&(ut.isParent()?c[ot].push(g.get(ut.id())):c[ot].push(ut.id()))})});var D=function(K){var ot=h.get(K),ut=void 0;t.get(K).forEach(function(dt){ut=e.getElementById(dt).isParent()?g.get(dt):dt,c[ot].push(ut),c[h.get(ut)].push(K)})},z=!0,W=!1,U=void 0;try{for(var O,X=t.keys()[Symbol.iterator]();!(z=(O=X.next()).done);z=!0)D(O.value)}catch(K){W=!0,U=K}finally{try{!z&&X.return&&X.return()}finally{if(W)throw U}}var j=void 0;if((b=h.size)>2){s=b<a.sampleSize?b:a.sampleSize;for(var J=0;J<b;J++)A[J]=[];for(var it=0;it<s;it++)P[it]=[];return a.quality=="draft"||a.step=="all"?((function(K){var ot=void 0;if(K){ot=Math.floor(Math.random()*b);for(var ut=0;ut<b;ut++)N[ut]=Y;for(var dt=0;dt<s;dt++)v[dt]=ot,ot=m(ot,dt,K)}else{(function(){for(var Mt=0,xt=0,R=!1;xt<s;){Mt=Math.floor(Math.random()*b),R=!1;for(var k=0;k<xt;k++)if(v[k]==Mt){R=!0;break}R||(v[xt]=Mt,xt++)}})();for(var vt=0;vt<s;vt++)m(v[vt],vt,K)}for(var Et=0;Et<b;Et++)for(var ht=0;ht<s;ht++)A[Et][ht]*=A[Et][ht];for(var Tt=0;Tt<s;Tt++)M[Tt]=[];for(var _t=0;_t<s;_t++)for(var Ot=0;Ot<s;Ot++)M[_t][Ot]=A[v[Ot]][_t]})(_),(function(){for(var K=r.svd(M),ot=K.S,ut=K.U,dt=K.V,vt=ot[0]*ot[0]*ot[0],Et=[],ht=0;ht<s;ht++){Et[ht]=[];for(var Tt=0;Tt<s;Tt++)Et[ht][Tt]=0,ht==Tt&&(Et[ht][Tt]=ot[ht]/(ot[ht]*ot[ht]+vt/(ot[ht]*ot[ht])))}P=d.multMat(d.multMat(dt,Et),d.transpose(ut))})(),(function(){for(var K=void 0,ot=void 0,ut=[],dt=[],vt=[],Et=[],ht=0;ht<b;ht++)ut[ht]=Math.random(),dt[ht]=Math.random();ut=d.normalize(ut),dt=d.normalize(dt);for(var Tt=H,_t=H,Ot=void 0;;){for(var Mt=0;Mt<b;Mt++)vt[Mt]=ut[Mt];if(ut=d.multGamma(d.multL(d.multGamma(vt),A,P)),K=d.dotProduct(vt,ut),ut=d.normalize(ut),Tt=d.dotProduct(vt,ut),(Ot=Math.abs(Tt/_t))<=1+q&&Ot>=1)break;_t=Tt}for(var xt=0;xt<b;xt++)vt[xt]=ut[xt];for(_t=H;;){for(var R=0;R<b;R++)Et[R]=dt[R];if(Et=d.minusOp(Et,d.multCons(vt,d.dotProduct(vt,Et))),dt=d.multGamma(d.multL(d.multGamma(Et),A,P)),ot=d.dotProduct(Et,dt),dt=d.normalize(dt),Tt=d.dotProduct(Et,dt),(Ot=Math.abs(Tt/_t))<=1+q&&Ot>=1)break;_t=Tt}for(var k=0;k<b;k++)Et[k]=dt[k];l=d.multCons(vt,Math.sqrt(Math.abs(K))),y=d.multCons(Et,Math.sqrt(Math.abs(ot)))})(),j={nodeIndexes:h,xCoords:l,yCoords:y}):(h.forEach(function(K,ot){l.push(e.getElementById(ot).position("x")),y.push(e.getElementById(ot).position("y"))}),j={nodeIndexes:h,xCoords:l,yCoords:y}),j}var V=h.keys(),yt=e.getElementById(V.next().value),Lt=yt.position(),Ut=yt.outerWidth();if(l.push(Lt.x),y.push(Lt.y),b==2){var Rt=e.getElementById(V.next().value).outerWidth();l.push(Lt.x+Ut/2+Rt/2+a.idealEdgeLength),y.push(Lt.y)}return j={nodeIndexes:h,xCoords:l,yCoords:y}}}},579:(C,T,L)=>{var E=L(212),d=function(r){r&&r("layout","fcose",E)};typeof cytoscape<"u"&&d(cytoscape),C.exports=d},140:C=>{C.exports=Ce}},le={},(function C(T){var L=le[T];if(L!==void 0)return L.exports;var E=le[T]={exports:{}};return Me[T](E,E.exports,C),E.exports})(579))));var xe={L:"left",R:"right",T:"top",B:"bottom"},_e={L:nt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:nt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:nt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:nt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},ee={L:nt((C,T)=>C-T+2,"L"),R:nt((C,T)=>C-2,"R"),T:nt((C,T)=>C-T+2,"T"),B:nt((C,T)=>C-2,"B")},cn=nt(function(C){return Pt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Oe=nt(function(C){return C==="L"||C==="R"||C==="T"||C==="B"},"isArchitectureDirection"),Pt=nt(function(C){return C==="L"||C==="R"},"isArchitectureDirectionX"),zt=nt(function(C){return C==="T"||C==="B"},"isArchitectureDirectionY"),de=nt(function(C,T){const L=Pt(C)&&zt(T),E=zt(C)&&Pt(T);return L||E},"isArchitectureDirectionXY"),un=nt(function(C){const T=C[0],L=C[1],E=Pt(T)&&zt(L),d=zt(T)&&Pt(L);return E||d},"isArchitecturePairXY"),fn=nt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),ge=nt(function(C,T){const L=`${C}${T}`;return fn(L)?L:void 0},"getArchitectureDirectionPair"),pn=nt(function([C,T],L){const E=L[0],d=L[1];return Pt(E)?zt(d)?[C+(E==="L"?-1:1),T+(d==="T"?1:-1)]:[C+(E==="L"?-1:1),T]:Pt(d)?[C+(d==="L"?1:-1),T+(E==="T"?1:-1)]:[C,T+(E==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),mn=nt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),vn=nt(function(C,T){return de(C,T)?"bend":Pt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),yn=nt(function(C){return C.type==="service"},"isArchitectureService"),En=nt(function(C){return C.type==="junction"},"isArchitectureJunction"),De=nt(C=>C.data(),"edgeData"),$t=nt(C=>C.data(),"nodeData"),Nn=tn.architecture,Re=(Qt=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=We,this.getAccTitle=Be,this.setDiagramTitle=je,this.getDiagramTitle=qe,this.getAccDescription=$e,this.setAccDescription=Ze,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},Qe()}addService({id:T,icon:L,in:E,title:d,iconText:r}){if(this.registeredIds[T]!==void 0)throw new Error(`The service id [${T}] is already in use by another ${this.registeredIds[T]}`);if(E!==void 0){if(T===E)throw new Error(`The service [${T}] cannot be placed within itself`);if(this.registeredIds[E]===void 0)throw new Error(`The service [${T}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[E]==="node")throw new Error(`The service [${T}]'s parent is not a group`)}this.registeredIds[T]="node",this.nodes[T]={id:T,type:"service",icon:L,iconText:r,title:d,edges:[],in:E}}getServices(){return Object.values(this.nodes).filter(yn)}addJunction({id:T,in:L}){this.registeredIds[T]="node",this.nodes[T]={id:T,type:"junction",edges:[],in:L}}getJunctions(){return Object.values(this.nodes).filter(En)}getNodes(){return Object.values(this.nodes)}getNode(T){return this.nodes[T]??null}addGroup({id:T,icon:L,in:E,title:d}){var r,a,e;if(((r=this.registeredIds)==null?void 0:r[T])!==void 0)throw new Error(`The group id [${T}] is already in use by another ${this.registeredIds[T]}`);if(E!==void 0){if(T===E)throw new Error(`The group [${T}] cannot be placed within itself`);if(((a=this.registeredIds)==null?void 0:a[E])===void 0)throw new Error(`The group [${T}]'s parent does not exist. Please make sure the parent is created before this group`);if(((e=this.registeredIds)==null?void 0:e[E])==="node")throw new Error(`The group [${T}]'s parent is not a group`)}this.registeredIds[T]="group",this.groups[T]={id:T,icon:L,title:d,in:E}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:T,rhsId:L,lhsDir:E,rhsDir:d,lhsInto:r,rhsInto:a,lhsGroup:e,rhsGroup:n,title:i}){if(!Oe(E))throw new Error(`Invalid direction given for left hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${String(E)}`);if(!Oe(d))throw new Error(`Invalid direction given for right hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${String(d)}`);if(this.nodes[T]===void 0&&this.groups[T]===void 0)throw new Error(`The left-hand id [${T}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The right-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);const o=this.nodes[T].in,t=this.nodes[L].in;if(e&&o&&t&&o==t)throw new Error(`The left-hand id [${T}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&o&&t&&o==t)throw new Error(`The right-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const h={lhsId:T,lhsDir:E,lhsInto:r,lhsGroup:e,rhsId:L,rhsDir:d,rhsInto:a,rhsGroup:n,title:i};this.edges.push(h),this.nodes[T]&&this.nodes[L]&&(this.nodes[T].edges.push(this.edges[this.edges.length-1]),this.nodes[L].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const T={},L=Object.entries(this.nodes).reduce((n,[i,o])=>(n[i]=o.edges.reduce((t,h)=>{var l,y;const g=(l=this.getNode(h.lhsId))==null?void 0:l.in,c=(y=this.getNode(h.rhsId))==null?void 0:y.in;if(g&&c&&g!==c){const v=vn(h.lhsDir,h.rhsDir);v!=="bend"&&(T[g]??(T[g]={}),T[g][c]=v,T[c]??(T[c]={}),T[c][g]=v)}if(h.lhsId===i){const v=ge(h.lhsDir,h.rhsDir);v&&(t[v]=h.rhsId)}else{const v=ge(h.rhsDir,h.lhsDir);v&&(t[v]=h.lhsId)}return t},{}),n),{}),E=Object.keys(L)[0],d={[E]:1},r=Object.keys(L).reduce((n,i)=>i===E?n:{...n,[i]:1},{}),a=nt(n=>{const i={[n]:[0,0]},o=[n];for(;o.length>0;){const t=o.shift();if(t){d[t]=1,delete r[t];const h=L[t],[g,c]=i[t];Object.entries(h).forEach(([l,y])=>{d[y]||(i[y]=pn([g,c],l),o.push(y))})}}return i},"BFS"),e=[a(E)];for(;Object.keys(r).length>0;)e.push(a(Object.keys(r)[0]));this.dataStructures={adjList:L,spatialMaps:e,groupAlignments:T}}return this.dataStructures}setElementForId(T,L){this.elements[T]=L}getElementById(T){return this.elements[T]}getConfig(){return Ke({...Nn,...Je().architecture})}getConfigField(T){return this.getConfig()[T]}},nt(Qt,"ArchitectureDB"),Qt),Tn=nt((C,T)=>{on(C,T),C.groups.map(L=>T.addGroup(L)),C.services.map(L=>T.addService({...L,type:"service"})),C.junctions.map(L=>T.addJunction({...L,type:"junction"})),C.edges.map(L=>T.addEdge(L))},"populateDb"),be={parser:{yy:void 0},parse:nt(async C=>{var E;const T=await sn("architecture",C);ye.debug(T);const L=(E=be.parser)==null?void 0:E.yy;if(!(L instanceof Re))throw new 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.");Tn(T,L)},"parse")},An=nt(C=>`
2
+ .edge {
3
+ stroke-width: ${C.archEdgeWidth};
4
+ stroke: ${C.archEdgeColor};
5
+ fill: none;
6
+ }
7
+
8
+ .arrow {
9
+ fill: ${C.archEdgeArrowColor};
10
+ }
11
+
12
+ .node-bkg {
13
+ fill: none;
14
+ stroke: ${C.archGroupBorderColor};
15
+ stroke-width: ${C.archGroupBorderWidth};
16
+ stroke-dasharray: 8;
17
+ }
18
+ .node-icon-text {
19
+ display: flex;
20
+ align-items: center;
21
+ }
22
+
23
+ .node-icon-text > div {
24
+ color: #fff;
25
+ margin: 1px;
26
+ height: fit-content;
27
+ text-align: center;
28
+ overflow: hidden;
29
+ display: -webkit-box;
30
+ -webkit-box-orient: vertical;
31
+ }
32
+ `,"getStyles"),Zt=nt(C=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${C}</g>`,"wrapIcon"),Jt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Zt('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:Zt('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:Zt('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:Zt('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:Zt('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:rn,blank:{body:Zt("")}}},wn=nt(async function(C,T,L){const E=L.getConfigField("padding"),d=L.getConfigField("iconSize"),r=d/2,a=d/6,e=a/2;await Promise.all(T.edges().map(async n=>{var q,_;const{source:i,sourceDir:o,sourceArrow:t,sourceGroup:h,target:g,targetDir:c,targetArrow:l,targetGroup:y,label:v}=De(n);let{x:N,y:A}=n[0].sourceEndpoint();const{x:M,y:P}=n[0].midpoint();let{x:b,y:Y}=n[0].targetEndpoint();const H=E+4;if(h&&(Pt(o)?N+=o==="L"?-H:H:A+=o==="T"?-H:H+18),y&&(Pt(c)?b+=c==="L"?-H:H:Y+=c==="T"?-H:H+18),h||((q=L.getNode(i))==null?void 0:q.type)!=="junction"||(Pt(o)?N+=o==="L"?r:-r:A+=o==="T"?r:-r),y||((_=L.getNode(g))==null?void 0:_.type)!=="junction"||(Pt(c)?b+=c==="L"?r:-r:Y+=c==="T"?r:-r),n[0]._private.rscratch){const B=C.insert("g");if(B.insert("path").attr("d",`M ${N},${A} L ${M},${P} L${b},${Y} `).attr("class","edge"),t){const s=Pt(o)?ee[o](N,a):N-e,m=zt(o)?ee[o](A,a):A-e;B.insert("polygon").attr("points",_e[o](a)).attr("transform",`translate(${s},${m})`).attr("class","arrow")}if(l){const s=Pt(c)?ee[c](b,a):b-e,m=zt(c)?ee[c](Y,a):Y-e;B.insert("polygon").attr("points",_e[c](a)).attr("transform",`translate(${s},${m})`).attr("class","arrow")}if(v){const s=de(o,c)?"XY":Pt(o)?"X":"Y";let m=0;m=s==="X"?Math.abs(N-b):s==="Y"?Math.abs(A-Y)/1.5:Math.abs(N-b)/2;const u=B.append("g");if(await ae(u,v,{useHtmlLabels:!1,width:m,classes:"architecture-service-label"},se()),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),s==="X")u.attr("transform","translate("+M+", "+P+")");else if(s==="Y")u.attr("transform","translate("+M+", "+P+") rotate(-90)");else if(s==="XY"){const p=ge(o,c);if(p&&un(p)){const f=u.node().getBoundingClientRect(),[w,I]=mn(p);u.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*w*I*45})`);const x=u.node().getBoundingClientRect();u.attr("transform",`
33
+ translate(${M}, ${P-f.height/2})
34
+ translate(${w*x.width/2}, ${I*x.height/2})
35
+ rotate(${-1*w*I*45}, 0, ${f.height/2})
36
+ `)}}}}}))},"drawEdges"),Ln=nt(async function(C,T,L){const E=.75*L.getConfigField("padding"),d=L.getConfigField("fontSize"),r=L.getConfigField("iconSize")/2;await Promise.all(T.nodes().map(async a=>{const e=$t(a);if(e.type==="group"){const{h:n,w:i,x1:o,y1:t}=a.boundingBox();C.append("rect").attr("x",o+r).attr("y",t+r).attr("width",i).attr("height",n).attr("class","node-bkg");const h=C.append("g");let g=o,c=t;if(e.icon){const l=h.append("g");l.html(`<g>${await he(e.icon,{height:E,width:E,fallbackPrefix:Jt.prefix})}</g>`),l.attr("transform","translate("+(g+r+1)+", "+(c+r+1)+")"),g+=E,c+=d/2-1-2}if(e.label){const l=h.append("g");await ae(l,e.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},se()),l.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),l.attr("transform","translate("+(g+r+4)+", "+(c+r+2)+")")}}}))},"drawGroups"),In=nt(async function(C,T,L){const E=se();for(const d of L){const r=T.append("g"),a=C.getConfigField("iconSize");if(d.title){const o=r.append("g");await ae(o,d.title,{useHtmlLabels:!1,width:1.5*a,classes:"architecture-service-label"},E),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),o.attr("transform","translate("+a/2+", "+a+")")}const e=r.append("g");if(d.icon)e.html(`<g>${await he(d.icon,{height:a,width:a,fallbackPrefix:Jt.prefix})}</g>`);else if(d.iconText){e.html(`<g>${await he("blank",{height:a,width:a,fallbackPrefix:Jt.prefix})}</g>`);const o=e.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(en(d.iconText,E)),t=parseInt(window.getComputedStyle(o.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;o.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/t)};`)}else e.append("path").attr("class","node-bkg").attr("id","node-"+d.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`);r.attr("class","architecture-service");const{width:n,height:i}=r._groups[0][0].getBBox();d.width=n,d.height=i,C.setElementForId(d.id,r)}return 0},"drawServices"),Cn=nt(function(C,T,L){L.forEach(E=>{const d=T.append("g"),r=C.getConfigField("iconSize");d.append("g").append("rect").attr("id","node-"+E.id).attr("fill-opacity","0").attr("width",r).attr("height",r),d.attr("class","architecture-junction");const{width:a,height:e}=d._groups[0][0].getBBox();d.width=a,d.height=e,C.setElementForId(E.id,d)})},"drawJunctions");function Fe(C,T,L){C.forEach(E=>{T.add({group:"nodes",data:{type:"service",id:E.id,icon:E.icon,label:E.title,parent:E.in,width:L.getConfigField("iconSize"),height:L.getConfigField("iconSize")},classes:"node-service"})})}function Ge(C,T,L){C.forEach(E=>{T.add({group:"nodes",data:{type:"junction",id:E.id,parent:E.in,width:L.getConfigField("iconSize"),height:L.getConfigField("iconSize")},classes:"node-junction"})})}function Se(C,T){T.nodes().map(L=>{const E=$t(L);E.type!=="group"&&(E.x=L.position().x,E.y=L.position().y,C.getElementById(E.id).attr("transform","translate("+(E.x||0)+","+(E.y||0)+")"))})}function Pe(C,T){C.forEach(L=>{T.add({group:"nodes",data:{type:"group",id:L.id,icon:L.icon,label:L.title,parent:L.in},classes:"node-group"})})}function Ue(C,T){C.forEach(L=>{const{lhsId:E,rhsId:d,lhsInto:r,lhsGroup:a,rhsInto:e,lhsDir:n,rhsDir:i,rhsGroup:o,title:t}=L,h=de(L.lhsDir,L.rhsDir)?"segments":"straight",g={id:`${E}-${d}`,label:t,source:E,sourceDir:n,sourceArrow:r,sourceGroup:a,sourceEndpoint:n==="L"?"0 50%":n==="R"?"100% 50%":n==="T"?"50% 0":"50% 100%",target:d,targetDir:i,targetArrow:e,targetGroup:o,targetEndpoint:i==="L"?"0 50%":i==="R"?"100% 50%":i==="T"?"50% 0":"50% 100%"};T.add({group:"edges",data:g,classes:h})})}function Ye(C,T,L){const E=nt((e,n)=>Object.entries(e).reduce((i,[o,t])=>{var c;let h=0;const g=Object.entries(t);if(g.length===1)return i[o]=g[0][1],i;for(let l=0;l<g.length-1;l++)for(let y=l+1;y<g.length;y++){const[v,N]=g[l],[A,M]=g[y];((c=L[v])==null?void 0:c[A])===n?(i[o]??(i[o]=[]),i[o]=[...i[o],...N,...M]):v==="default"||A==="default"?(i[o]??(i[o]=[]),i[o]=[...i[o],...N,...M]):(i[`${o}-${h++}`]=N,i[`${o}-${h++}`]=M)}return i},{}),"flattenAlignments"),d=T.map(e=>{const n={},i={};return Object.entries(e).forEach(([o,[t,h]])=>{var c,l,y;const g=((c=C.getNode(o))==null?void 0:c.in)??"default";n[h]??(n[h]={}),(l=n[h])[g]??(l[g]=[]),n[h][g].push(o),i[t]??(i[t]={}),(y=i[t])[g]??(y[g]=[]),i[t][g].push(o)}),{horiz:Object.values(E(n,"horizontal")).filter(o=>o.length>1),vert:Object.values(E(i,"vertical")).filter(o=>o.length>1)}}),[r,a]=d.reduce(([e,n],{horiz:i,vert:o})=>[[...e,...i],[...n,...o]],[[],[]]);return{horizontal:r,vertical:a}}function ke(C,T){const L=[],E=nt(r=>`${r[0]},${r[1]}`,"posToStr"),d=nt(r=>r.split(",").map(a=>parseInt(a)),"strToPos");return C.forEach(r=>{const a=Object.fromEntries(Object.entries(r).map(([o,t])=>[E(t),o])),e=[E([0,0])],n={},i={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;e.length>0;){const o=e.shift();if(o){n[o]=1;const t=a[o];if(t){const h=d(o);Object.entries(i).forEach(([g,c])=>{const l=E([h[0]+c[0],h[1]+c[1]]),y=a[l];y&&!n[l]&&(e.push(l),L.push({[xe[g]]:y,[xe[cn(g)]]:t,gap:1.5*T.getConfigField("iconSize")}))})}}}}),L}function He(C,T,L,E,d,{spatialMaps:r,groupAlignments:a}){return new Promise(e=>{const n=hn("body").append("div").attr("id","cy").attr("style","display:none"),i=Ee({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${d.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${d.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});n.remove(),Pe(L,i),Fe(C,i,d),Ge(T,i,d),Ue(E,i);const o=Ye(d,r,a),t=ke(r,d),h=i.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(g){const[c,l]=g.connectedNodes(),{parent:y}=$t(c),{parent:v}=$t(l);return y===v?1.5*d.getConfigField("iconSize"):.5*d.getConfigField("iconSize")},edgeElasticity(g){const[c,l]=g.connectedNodes(),{parent:y}=$t(c),{parent:v}=$t(l);return y===v?.45:.001},alignmentConstraint:o,relativePlacementConstraint:t});h.one("layoutstop",()=>{var c;function g(l,y,v,N){let A,M;const{x:P,y:b}=l,{x:Y,y:H}=y;M=(N-b+(P-v)*(b-H)/(P-Y))/Math.sqrt(1+Math.pow((b-H)/(P-Y),2)),A=Math.sqrt(Math.pow(N-b,2)+Math.pow(v-P,2)-Math.pow(M,2)),A/=Math.sqrt(Math.pow(Y-P,2)+Math.pow(H-b,2));let q=(Y-P)*(N-b)-(H-b)*(v-P);switch(!0){case q>=0:q=1;break;case q<0:q=-1}let _=(Y-P)*(v-P)+(H-b)*(N-b);switch(!0){case _>=0:_=1;break;case _<0:_=-1}return M=Math.abs(M)*q,A*=_,{distances:M,weights:A}}nt(g,"getSegmentWeights"),i.startBatch();for(const l of Object.values(i.edges()))if((c=l.data)!=null&&c.call(l)){const{x:y,y:v}=l.source().position(),{x:N,y:A}=l.target().position();if(y!==N&&v!==A){const M=l.sourceEndpoint(),P=l.targetEndpoint(),{sourceDir:b}=De(l),[Y,H]=zt(b)?[M.x,P.y]:[P.x,M.y],{weights:q,distances:_}=g(M,P,Y,H);l.style("segment-distances",_),l.style("segment-weights",q)}}i.endBatch(),h.run()}),h.run(),i.ready(g=>{ye.info("Ready",g),e(i)})})}nn([{name:Jt.prefix,icons:Jt}]),Ee.use(gn),nt(Fe,"addServices"),nt(Ge,"addJunctions"),nt(Se,"positionNodes"),nt(Pe,"addGroups"),nt(Ue,"addEdges"),nt(Ye,"getAlignments"),nt(ke,"getRelativeConstraints"),nt(He,"layoutArchitecture");var Mn={draw:nt(async(C,T,L,E)=>{const d=E.db,r=d.getServices(),a=d.getJunctions(),e=d.getGroups(),n=d.getEdges(),i=d.getDataStructures(),o=ze(T),t=o.append("g");t.attr("class","architecture-edges");const h=o.append("g");h.attr("class","architecture-services");const g=o.append("g");g.attr("class","architecture-groups"),await In(d,h,r),Cn(d,h,a);const c=await He(r,a,e,n,d,i);await wn(t,c,d),await Ln(g,c,d),Se(d,c),Ve(void 0,o,d.getConfigField("padding"),d.getConfigField("useMaxWidth"))},"draw")},xn={parser:be,get db(){return new Re},renderer:Mn,styles:An};export{xn as diagram};
@@ -1,4 +1,4 @@
1
- import{c as t}from"./index-OC46250R.js";/**
1
+ import{c as t}from"./index-DKEudB02.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- var ae,se;import{g as ie}from"./chunk-FMBD7UC4-R5o-nSiG.js";import{_ as h,G as V,d as oe,l as m,z as le,B as ce,c as z,a3 as de,Q as he,a4 as q,a5 as Dt,a6 as ge,u as tt,j as ye,a7 as pe,a8 as gt,h as yt,a9 as ue}from"./mermaid.core-4nVOEVX3.js";import{c as xe}from"./clone-DM1YNjEn.js";import{s as R}from"./transform-D9VCJYws.js";import{G as be}from"./graph-CssCVWIq.js";import{c as fe}from"./channel-CjhbjOv4.js";import{l as me,k as we}from"./step-BwsUM5iJ.js";import"./index-OC46250R.js";import"./_baseUniq-Dk7ZPJ3N.js";import"./_baseEach-C1FLm7WW.js";import"./timer-Bqd5yn_a.js";var pt=(function(){var e=h(function(d,u,k,b){for(k=k||{},b=d.length;b--;k[d[b]]=u);return k},"o"),t=[1,15],s=[1,7],i=[1,13],a=[1,14],n=[1,19],r=[1,16],o=[1,17],c=[1,18],p=[8,30],g=[8,10,21,28,29,30,31,39,43,46],x=[1,23],f=[1,24],_=[8,10,15,16,21,28,29,30,31,39,43,46],L=[8,10,15,16,21,27,28,29,30,31,39,43,46],E=[1,49],v={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:h(function(d,u,k,b,w,l,S){var y=l.length-1;switch(w){case 4:b.getLogger().debug("Rule: separator (NL) ");break;case 5:b.getLogger().debug("Rule: separator (Space) ");break;case 6:b.getLogger().debug("Rule: separator (EOF) ");break;case 7:b.getLogger().debug("Rule: hierarchy: ",l[y-1]),b.setHierarchy(l[y-1]);break;case 8:b.getLogger().debug("Stop NL ");break;case 9:b.getLogger().debug("Stop EOF ");break;case 10:b.getLogger().debug("Stop NL2 ");break;case 11:b.getLogger().debug("Stop EOF2 ");break;case 12:b.getLogger().debug("Rule: statement: ",l[y]),typeof l[y].length=="number"?this.$=l[y]:this.$=[l[y]];break;case 13:b.getLogger().debug("Rule: statement #2: ",l[y-1]),this.$=[l[y-1]].concat(l[y]);break;case 14:b.getLogger().debug("Rule: link: ",l[y],d),this.$={edgeTypeStr:l[y],label:""};break;case 15:b.getLogger().debug("Rule: LABEL link: ",l[y-3],l[y-1],l[y]),this.$={edgeTypeStr:l[y],label:l[y-1]};break;case 18:const D=parseInt(l[y]),F=b.generateId();this.$={id:F,type:"space",label:"",width:D,children:[]};break;case 23:b.getLogger().debug("Rule: (nodeStatement link node) ",l[y-2],l[y-1],l[y]," typestr: ",l[y-1].edgeTypeStr);const H=b.edgeStrToEdgeData(l[y-1].edgeTypeStr);this.$=[{id:l[y-2].id,label:l[y-2].label,type:l[y-2].type,directions:l[y-2].directions},{id:l[y-2].id+"-"+l[y].id,start:l[y-2].id,end:l[y].id,label:l[y-1].label,type:"edge",directions:l[y].directions,arrowTypeEnd:H,arrowTypeStart:"arrow_open"},{id:l[y].id,label:l[y].label,type:b.typeStr2Type(l[y].typeStr),directions:l[y].directions}];break;case 24:b.getLogger().debug("Rule: nodeStatement (abc88 node size) ",l[y-1],l[y]),this.$={id:l[y-1].id,label:l[y-1].label,type:b.typeStr2Type(l[y-1].typeStr),directions:l[y-1].directions,widthInColumns:parseInt(l[y],10)};break;case 25:b.getLogger().debug("Rule: nodeStatement (node) ",l[y]),this.$={id:l[y].id,label:l[y].label,type:b.typeStr2Type(l[y].typeStr),directions:l[y].directions,widthInColumns:1};break;case 26:b.getLogger().debug("APA123",this?this:"na"),b.getLogger().debug("COLUMNS: ",l[y]),this.$={type:"column-setting",columns:l[y]==="auto"?-1:parseInt(l[y])};break;case 27:b.getLogger().debug("Rule: id-block statement : ",l[y-2],l[y-1]),b.generateId(),this.$={...l[y-2],type:"composite",children:l[y-1]};break;case 28:b.getLogger().debug("Rule: blockStatement : ",l[y-2],l[y-1],l[y]);const T=b.generateId();this.$={id:T,type:"composite",label:"",children:l[y-1]};break;case 29:b.getLogger().debug("Rule: node (NODE_ID separator): ",l[y]),this.$={id:l[y]};break;case 30:b.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",l[y-1],l[y]),this.$={id:l[y-1],label:l[y].label,typeStr:l[y].typeStr,directions:l[y].directions};break;case 31:b.getLogger().debug("Rule: dirList: ",l[y]),this.$=[l[y]];break;case 32:b.getLogger().debug("Rule: dirList: ",l[y-1],l[y]),this.$=[l[y-1]].concat(l[y]);break;case 33:b.getLogger().debug("Rule: nodeShapeNLabel: ",l[y-2],l[y-1],l[y]),this.$={typeStr:l[y-2]+l[y],label:l[y-1]};break;case 34:b.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",l[y-3],l[y-2]," #3:",l[y-1],l[y]),this.$={typeStr:l[y-3]+l[y],label:l[y-2],directions:l[y-1]};break;case 35:case 36:this.$={type:"classDef",id:l[y-1].trim(),css:l[y].trim()};break;case 37:this.$={type:"applyClass",id:l[y-1].trim(),styleClass:l[y].trim()};break;case 38:this.$={type:"applyStyles",id:l[y-1].trim(),stylesStr:l[y].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:s,28:i,29:a,31:n,39:r,43:o,46:c}),e(g,[2,16],{14:22,15:x,16:f}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(_,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:n},{10:t,11:27,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(L,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},e(_,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:f,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(L,[2,30]),{18:[1,43]},{18:[1,44]},e(_,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:E},{15:[1,50]},e(g,[2,27]),e(L,[2,33]),{38:[1,51]},{33:52,34:E,38:[2,31]},{31:[2,15]},e(L,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:h(function(d,u){if(!u.recoverable){var k=new Error(d);throw k.hash=u,k}this.trace(d)},"parseError"),parse:h(function(d){var u=this,k=[0],b=[],w=[null],l=[],S=this.table,y="",D=0,F=0,H=l.slice.call(arguments,1),T=Object.create(this.lexer),U={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(U.yy[Z]=this.yy[Z]);T.setInput(d,U.yy),U.yy.lexer=T,U.yy.parser=this,T.yylloc===void 0&&(T.yylloc={});var ht=T.yylloc;l.push(ht);var ne=T.options&&T.options.ranges;function _t(){var W;return typeof(W=b.pop()||T.lex()||1)!="number"&&(W instanceof Array&&(W=(b=W).pop()),W=u.symbols_[W]||W),W}typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,h(function(W){k.length=k.length-2*W,w.length=w.length-W,l.length=l.length-W},"popStack"),h(_t,"lex");for(var M,J,Y,Et,at,G,vt,st,Q={};;){if(J=k[k.length-1],this.defaultActions[J]?Y=this.defaultActions[J]:(M==null&&(M=_t()),Y=S[J]&&S[J][M]),Y===void 0||!Y.length||!Y[0]){var $t="";for(at in st=[],S[J])this.terminals_[at]&&at>2&&st.push("'"+this.terminals_[at]+"'");$t=T.showPosition?"Parse error on line "+(D+1)+`:
1
+ var ae,se;import{g as ie}from"./chunk-FMBD7UC4-C-lhB6hN.js";import{_ as h,G as V,d as oe,l as m,z as le,B as ce,c as z,a3 as de,Q as he,a4 as q,a5 as Dt,a6 as ge,u as tt,j as ye,a7 as pe,a8 as gt,h as yt,a9 as ue}from"./mermaid.core-CaSnaLH0.js";import{c as xe}from"./clone-BFDSPAj3.js";import{s as R}from"./transform-D9VCJYws.js";import{G as be}from"./graph-CHRVBzY5.js";import{c as fe}from"./channel-_2eNSz0n.js";import{l as me,k as we}from"./step-BwsUM5iJ.js";import"./index-DKEudB02.js";import"./isEmpty-DU_ogP_D.js";import"./_baseUniq-CCgDNtZb.js";import"./_baseEach-CNBxBxvS.js";import"./timer-Bqd5yn_a.js";var pt=(function(){var e=h(function(d,u,k,b){for(k=k||{},b=d.length;b--;k[d[b]]=u);return k},"o"),t=[1,15],s=[1,7],i=[1,13],a=[1,14],n=[1,19],r=[1,16],o=[1,17],c=[1,18],p=[8,30],g=[8,10,21,28,29,30,31,39,43,46],x=[1,23],f=[1,24],_=[8,10,15,16,21,28,29,30,31,39,43,46],L=[8,10,15,16,21,27,28,29,30,31,39,43,46],E=[1,49],v={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:h(function(d,u,k,b,w,l,S){var y=l.length-1;switch(w){case 4:b.getLogger().debug("Rule: separator (NL) ");break;case 5:b.getLogger().debug("Rule: separator (Space) ");break;case 6:b.getLogger().debug("Rule: separator (EOF) ");break;case 7:b.getLogger().debug("Rule: hierarchy: ",l[y-1]),b.setHierarchy(l[y-1]);break;case 8:b.getLogger().debug("Stop NL ");break;case 9:b.getLogger().debug("Stop EOF ");break;case 10:b.getLogger().debug("Stop NL2 ");break;case 11:b.getLogger().debug("Stop EOF2 ");break;case 12:b.getLogger().debug("Rule: statement: ",l[y]),typeof l[y].length=="number"?this.$=l[y]:this.$=[l[y]];break;case 13:b.getLogger().debug("Rule: statement #2: ",l[y-1]),this.$=[l[y-1]].concat(l[y]);break;case 14:b.getLogger().debug("Rule: link: ",l[y],d),this.$={edgeTypeStr:l[y],label:""};break;case 15:b.getLogger().debug("Rule: LABEL link: ",l[y-3],l[y-1],l[y]),this.$={edgeTypeStr:l[y],label:l[y-1]};break;case 18:const D=parseInt(l[y]),F=b.generateId();this.$={id:F,type:"space",label:"",width:D,children:[]};break;case 23:b.getLogger().debug("Rule: (nodeStatement link node) ",l[y-2],l[y-1],l[y]," typestr: ",l[y-1].edgeTypeStr);const H=b.edgeStrToEdgeData(l[y-1].edgeTypeStr);this.$=[{id:l[y-2].id,label:l[y-2].label,type:l[y-2].type,directions:l[y-2].directions},{id:l[y-2].id+"-"+l[y].id,start:l[y-2].id,end:l[y].id,label:l[y-1].label,type:"edge",directions:l[y].directions,arrowTypeEnd:H,arrowTypeStart:"arrow_open"},{id:l[y].id,label:l[y].label,type:b.typeStr2Type(l[y].typeStr),directions:l[y].directions}];break;case 24:b.getLogger().debug("Rule: nodeStatement (abc88 node size) ",l[y-1],l[y]),this.$={id:l[y-1].id,label:l[y-1].label,type:b.typeStr2Type(l[y-1].typeStr),directions:l[y-1].directions,widthInColumns:parseInt(l[y],10)};break;case 25:b.getLogger().debug("Rule: nodeStatement (node) ",l[y]),this.$={id:l[y].id,label:l[y].label,type:b.typeStr2Type(l[y].typeStr),directions:l[y].directions,widthInColumns:1};break;case 26:b.getLogger().debug("APA123",this?this:"na"),b.getLogger().debug("COLUMNS: ",l[y]),this.$={type:"column-setting",columns:l[y]==="auto"?-1:parseInt(l[y])};break;case 27:b.getLogger().debug("Rule: id-block statement : ",l[y-2],l[y-1]),b.generateId(),this.$={...l[y-2],type:"composite",children:l[y-1]};break;case 28:b.getLogger().debug("Rule: blockStatement : ",l[y-2],l[y-1],l[y]);const T=b.generateId();this.$={id:T,type:"composite",label:"",children:l[y-1]};break;case 29:b.getLogger().debug("Rule: node (NODE_ID separator): ",l[y]),this.$={id:l[y]};break;case 30:b.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",l[y-1],l[y]),this.$={id:l[y-1],label:l[y].label,typeStr:l[y].typeStr,directions:l[y].directions};break;case 31:b.getLogger().debug("Rule: dirList: ",l[y]),this.$=[l[y]];break;case 32:b.getLogger().debug("Rule: dirList: ",l[y-1],l[y]),this.$=[l[y-1]].concat(l[y]);break;case 33:b.getLogger().debug("Rule: nodeShapeNLabel: ",l[y-2],l[y-1],l[y]),this.$={typeStr:l[y-2]+l[y],label:l[y-1]};break;case 34:b.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",l[y-3],l[y-2]," #3:",l[y-1],l[y]),this.$={typeStr:l[y-3]+l[y],label:l[y-2],directions:l[y-1]};break;case 35:case 36:this.$={type:"classDef",id:l[y-1].trim(),css:l[y].trim()};break;case 37:this.$={type:"applyClass",id:l[y-1].trim(),styleClass:l[y].trim()};break;case 38:this.$={type:"applyStyles",id:l[y-1].trim(),stylesStr:l[y].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:s,28:i,29:a,31:n,39:r,43:o,46:c}),e(g,[2,16],{14:22,15:x,16:f}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(_,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:n},{10:t,11:27,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(L,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},e(_,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:f,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:n,39:r,43:o,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(L,[2,30]),{18:[1,43]},{18:[1,44]},e(_,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:E},{15:[1,50]},e(g,[2,27]),e(L,[2,33]),{38:[1,51]},{33:52,34:E,38:[2,31]},{31:[2,15]},e(L,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:h(function(d,u){if(!u.recoverable){var k=new Error(d);throw k.hash=u,k}this.trace(d)},"parseError"),parse:h(function(d){var u=this,k=[0],b=[],w=[null],l=[],S=this.table,y="",D=0,F=0,H=l.slice.call(arguments,1),T=Object.create(this.lexer),U={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(U.yy[Z]=this.yy[Z]);T.setInput(d,U.yy),U.yy.lexer=T,U.yy.parser=this,T.yylloc===void 0&&(T.yylloc={});var ht=T.yylloc;l.push(ht);var ne=T.options&&T.options.ranges;function _t(){var W;return typeof(W=b.pop()||T.lex()||1)!="number"&&(W instanceof Array&&(W=(b=W).pop()),W=u.symbols_[W]||W),W}typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,h(function(W){k.length=k.length-2*W,w.length=w.length-W,l.length=l.length-W},"popStack"),h(_t,"lex");for(var M,J,Y,Et,at,G,vt,st,Q={};;){if(J=k[k.length-1],this.defaultActions[J]?Y=this.defaultActions[J]:(M==null&&(M=_t()),Y=S[J]&&S[J][M]),Y===void 0||!Y.length||!Y[0]){var $t="";for(at in st=[],S[J])this.terminals_[at]&&at>2&&st.push("'"+this.terminals_[at]+"'");$t=T.showPosition?"Parse error on line "+(D+1)+`:
2
2
  `+T.showPosition()+`
3
3
  Expecting `+st.join(", ")+", got '"+(this.terminals_[M]||M)+"'":"Parse error on line "+(D+1)+": Unexpected "+(M==1?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError($t,{text:T.match,token:this.terminals_[M]||M,line:T.yylineno,loc:ht,expected:st})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+M);switch(Y[0]){case 1:k.push(M),w.push(T.yytext),l.push(T.yylloc),k.push(Y[1]),M=null,F=T.yyleng,y=T.yytext,D=T.yylineno,ht=T.yylloc;break;case 2:if(G=this.productions_[Y[1]][1],Q.$=w[w.length-G],Q._$={first_line:l[l.length-(G||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(G||1)].first_column,last_column:l[l.length-1].last_column},ne&&(Q._$.range=[l[l.length-(G||1)].range[0],l[l.length-1].range[1]]),(Et=this.performAction.apply(Q,[y,F,D,U.yy,Y[1],w,l].concat(H)))!==void 0)return Et;G&&(k=k.slice(0,-1*G*2),w=w.slice(0,-1*G),l=l.slice(0,-1*G)),k.push(this.productions_[Y[1]][0]),w.push(Q.$),l.push(Q._$),vt=S[k[k.length-2]][k[k.length-1]],k.push(vt);break;case 3:return!0}}return!0},"parse")},N=(function(){return{EOF:1,parseError:h(function(d,u){if(!this.yy.parser)throw new Error(d);this.yy.parser.parseError(d,u)},"parseError"),setInput:h(function(d,u){return this.yy=u||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var d=this._input[0];return this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d,d.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:h(function(d){var u=d.length,k=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===b.length?this.yylloc.first_column:0)+b[b.length-k.length].length-k[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:h(function(d){this.unput(this.match.slice(d))},"less"),pastInput:h(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var d=this.pastInput(),u=new Array(d.length+1).join("-");return d+this.upcomingInput()+`