@elmethis/core 1.0.0-alpha.14 → 1.0.0-alpha.140

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 (439) hide show
  1. package/dist/{Bash-Cd5wtNan.js → Bash-AnB1C5rB.js} +19 -15
  2. package/dist/Css-B8ydTxz6.js +18 -0
  3. package/dist/ElmShikiHighlighter-BjszRo5d.js +7469 -0
  4. package/dist/{Rust-Beyp-qeb.js → Rust-D6u5pnz9.js} +3 -3
  5. package/dist/_basePickBy-Dna5Lu4R.js +152 -0
  6. package/dist/_baseUniq-DoD3ppoF.js +583 -0
  7. package/dist/abap-BmBUA35e.js +6 -0
  8. package/dist/actionscript-3-Duslr-Xk.js +6 -0
  9. package/dist/ada-CBvPkFpZ.js +6 -0
  10. package/dist/andromeeda-uXNdzNpk.js +4 -0
  11. package/dist/angular-html-BykNicnS.js +32 -0
  12. package/dist/angular-ts-BHpD0guW.js +21 -0
  13. package/dist/apache-CVNlsSDc.js +6 -0
  14. package/dist/apex-DFk3KRB1.js +6 -0
  15. package/dist/apl-iiNHpPRe.js +16 -0
  16. package/dist/applescript-D0lq2uyG.js +6 -0
  17. package/dist/ara-BxwG6H0R.js +6 -0
  18. package/dist/arc-Sg2hIErX.js +83 -0
  19. package/dist/architecture-I3QFYML2-Cr3eE8TC.js +5 -0
  20. package/dist/architectureDiagram-UYN6MBPD-DML6M8Xe.js +4594 -0
  21. package/dist/asciidoc-DfqmH17V.js +6 -0
  22. package/dist/asm-RC0Yh-NZ.js +6 -0
  23. package/dist/astro-jjdX1_o0.js +16 -0
  24. package/dist/aurora-x-BwoVEUWZ.js +4 -0
  25. package/dist/awk-gPH8MVMW.js +6 -0
  26. package/dist/ayu-dark-CxPZkpb2.js +4 -0
  27. package/dist/ballerina-kvLnRU_e.js +6 -0
  28. package/dist/bat-BHYy44sT.js +6 -0
  29. package/dist/beancount-CRuI-qxP.js +6 -0
  30. package/dist/berry-Ci9U0o4h.js +6 -0
  31. package/dist/bibtex-CX618D15.js +6 -0
  32. package/dist/bicep-iuYiPopT.js +6 -0
  33. package/dist/blade-C-EMBGSs.js +18 -0
  34. package/dist/blockDiagram-ZHA2E4KO-DUTZa5UU.js +2247 -0
  35. package/dist/bsl-CXtfttnD.js +8 -0
  36. package/dist/c-DASdrs7p.js +6 -0
  37. package/dist/c4Diagram-6F5ED5ID-Nk3OUrzy.js +1581 -0
  38. package/dist/cadence-BwtsKTvx.js +6 -0
  39. package/dist/cairo-BWa6TLMq.js +8 -0
  40. package/dist/catppuccin-frappe-BrTOiad2.js +4 -0
  41. package/dist/catppuccin-latte-D-dc_R4m.js +4 -0
  42. package/dist/catppuccin-macchiato-DN4jOp0G.js +4 -0
  43. package/dist/catppuccin-mocha-B8yCE3-3.js +4 -0
  44. package/dist/channel-BXMaWN8j.js +5 -0
  45. package/dist/chunk-5HRBRIJM-O7fddiBY.js +24 -0
  46. package/dist/chunk-7U56Z5CX-DOy_XlUF.js +1215 -0
  47. package/dist/chunk-ASOPGD6M-CRHrFIjk.js +64 -0
  48. package/dist/chunk-KFBOBJHC-kjD7HAK_.js +15 -0
  49. package/dist/chunk-T2TOU4HS-DAV9o7jd.js +1303 -0
  50. package/dist/chunk-TMUBEWPD-Ch3JZI2O.js +9 -0
  51. package/dist/clarity-9Cadad6s.js +6 -0
  52. package/dist/classDiagram-LNE6IOMH-BXuvXlWw.js +14 -0
  53. package/dist/classDiagram-v2-MQ7JQ4JX-BXuvXlWw.js +14 -0
  54. package/dist/clojure-CsKKFGwv.js +6 -0
  55. package/dist/clone-C-OzJ6u8.js +8 -0
  56. package/dist/cmake-Ba0CZDb1.js +6 -0
  57. package/dist/cobol-CAatoUdx.js +10 -0
  58. package/dist/codeowners-Bt9yU6NX.js +6 -0
  59. package/dist/codeql-Ce2eNlR6.js +6 -0
  60. package/dist/coffee-D_GzM8k1.js +8 -0
  61. package/dist/common-lisp-r7ZEOG7T.js +6 -0
  62. package/dist/components/{inline/ElmInlineCode.stories.d.ts → badge/ElmBadge.stories.d.ts} +2 -2
  63. package/dist/components/badge/ElmBadge.vue.d.ts +21 -0
  64. package/dist/components/badge/ElmTag.stories.d.ts +7 -0
  65. package/dist/components/badge/ElmTag.vue.d.ts +14 -0
  66. package/dist/components/code/ElmCodeBlock.vue.d.ts +8 -1
  67. package/dist/components/code/ElmKatex.vue.d.ts +3 -1
  68. package/dist/components/code/ElmMermaid.stories.d.ts +7 -0
  69. package/dist/components/code/ElmMermaid.vue.d.ts +8 -0
  70. package/dist/components/code/{ElmPrismHighlighter.stories.d.ts → ElmShikiHighlighter.stories.d.ts} +2 -3
  71. package/dist/components/code/{ElmPrismHighlighter.vue.d.ts → ElmShikiHighlighter.vue.d.ts} +3 -3
  72. package/dist/components/containments/ElmColumn.vue.d.ts +3 -2
  73. package/dist/components/containments/ElmColumnList.vue.d.ts +3 -2
  74. package/dist/components/containments/ElmDesktopWindow.stories.d.ts +6 -0
  75. package/dist/components/containments/ElmDesktopWindow.vue.d.ts +27 -0
  76. package/dist/components/containments/ElmModal.stories.d.ts +6 -0
  77. package/dist/components/containments/ElmModal.vue.d.ts +35 -0
  78. package/dist/components/containments/ElmSnackbar.stories.d.ts +6 -0
  79. package/dist/components/containments/ElmSnackbar.vue.d.ts +11 -0
  80. package/dist/components/containments/ElmSnackbarContainer.vue.d.ts +10 -0
  81. package/dist/components/containments/ElmToggle.stories.d.ts +1 -0
  82. package/dist/components/containments/ElmToggle.vue.d.ts +13 -6
  83. package/dist/components/containments/ElmTooltip.vue.d.ts +5 -2
  84. package/dist/components/containments/useSnackbarState.d.ts +28 -0
  85. package/dist/components/data/ElmMultiProgress.stories.d.ts +6 -0
  86. package/dist/components/data/ElmMultiProgress.vue.d.ts +30 -0
  87. package/dist/components/data/ElmProgress.stories.d.ts +1 -0
  88. package/dist/components/data/ElmProgress.vue.d.ts +6 -1
  89. package/dist/components/data/ElmStatusMessage.stories.d.ts +9 -0
  90. package/dist/components/data/ElmStatusMessage.vue.d.ts +6 -0
  91. package/dist/components/fallback/ElmBlockFallback.stories.d.ts +6 -0
  92. package/dist/components/fallback/ElmBlockFallback.vue.d.ts +4 -0
  93. package/dist/components/fallback/ElmRectangleWave.vue.d.ts +1 -1
  94. package/dist/components/fallback/ElmSpinner.stories.d.ts +6 -0
  95. package/dist/components/fallback/ElmSpinner.vue.d.ts +9 -0
  96. package/dist/components/form/ElmButton.stories.d.ts +11 -0
  97. package/dist/components/form/ElmButton.vue.d.ts +41 -0
  98. package/dist/components/form/ElmCheckbox.vue.d.ts +16 -6
  99. package/dist/components/form/ElmSwitch.stories.d.ts +6 -0
  100. package/dist/components/form/ElmSwitch.vue.d.ts +32 -0
  101. package/dist/components/form/ElmTextField.stories.d.ts +6 -0
  102. package/dist/components/form/ElmTextField.vue.d.ts +30 -0
  103. package/dist/components/form/ElmTotp.stories.d.ts +6 -0
  104. package/dist/components/form/ElmTotp.vue.d.ts +12 -0
  105. package/dist/components/headings/ElmFragmentIdentifier.stories.d.ts +6 -0
  106. package/dist/components/headings/ElmFragmentIdentifier.vue.d.ts +8 -0
  107. package/dist/components/headings/ElmHeading1.vue.d.ts +3 -1
  108. package/dist/components/headings/ElmHeading2.vue.d.ts +3 -1
  109. package/dist/components/headings/ElmHeading3.vue.d.ts +3 -1
  110. package/dist/components/icon/ElmArrowIcon.stories.d.ts +6 -0
  111. package/dist/components/icon/ElmArrowIcon.vue.d.ts +26 -0
  112. package/dist/components/icon/ElmBookmarkIcon.stories.d.ts +8 -0
  113. package/dist/components/icon/ElmBookmarkIcon.vue.d.ts +7 -0
  114. package/dist/components/icon/ElmCubeIcon.vue.d.ts +1 -1
  115. package/dist/components/icon/ElmDotLoadingIcon.vue.d.ts +2 -2
  116. package/dist/components/icon/ElmLanguageIcon.vue.d.ts +1 -1
  117. package/dist/components/icon/ElmLoginIcon.stories.d.ts +6 -0
  118. package/dist/components/icon/ElmLoginIcon.vue.d.ts +18 -0
  119. package/dist/components/icon/languages/Bash.vue.d.ts +1 -1
  120. package/dist/components/icon/languages/{JavaScript.vue.d.ts → Css.vue.d.ts} +1 -1
  121. package/dist/components/icon/languages/Rust.vue.d.ts +1 -1
  122. package/dist/components/inline/ElmInlineLink.vue.d.ts +1 -1
  123. package/dist/components/inline/ElmInlineRuby.vue.d.ts +1 -1
  124. package/dist/components/inline/ElmInlineText.stories.d.ts +1 -0
  125. package/dist/components/inline/ElmInlineText.vue.d.ts +10 -1
  126. package/dist/components/inline/ElmTypingAnimation.stories.d.ts +6 -0
  127. package/dist/components/inline/ElmTypingAnimation.vue.d.ts +21 -0
  128. package/dist/components/jsonschema/ElmChildContainer.stories.d.ts +6 -0
  129. package/dist/components/jsonschema/ElmChildContainer.vue.d.ts +21 -0
  130. package/dist/components/jsonschema/ElmFieldAttribute.stories.d.ts +6 -0
  131. package/dist/components/jsonschema/ElmFieldAttribute.vue.d.ts +7 -0
  132. package/dist/components/jsonschema/ElmFieldType.stories.d.ts +7 -0
  133. package/dist/components/jsonschema/ElmFieldType.vue.d.ts +8 -0
  134. package/dist/components/jsonschema/ElmJsonSchema.stories.d.ts +7 -0
  135. package/dist/components/jsonschema/ElmJsonSchema.vue.d.ts +7 -0
  136. package/dist/components/media/ElmFile.vue.d.ts +6 -1
  137. package/dist/components/media/ElmImage.stories.d.ts +1 -0
  138. package/dist/components/media/ElmImage.vue.d.ts +5 -0
  139. package/dist/components/navigation/ElmBookmark.stories.d.ts +2 -0
  140. package/dist/components/navigation/ElmBookmark.vue.d.ts +13 -9
  141. package/dist/components/navigation/ElmBreadcrumb.vue.d.ts +3 -1
  142. package/dist/components/navigation/ElmPagetop.vue.d.ts +1 -1
  143. package/dist/components/navigation/ElmTableOfContents.vue.d.ts +1 -1
  144. package/dist/components/others/ElmColorSample.stories.d.ts +6 -0
  145. package/dist/components/others/ElmColorSample.vue.d.ts +8 -0
  146. package/dist/components/others/ElmColorTable.stories.d.ts +6 -0
  147. package/dist/components/others/ElmColorTable.vue.d.ts +11 -0
  148. package/dist/components/others/ElmTemplate.stories.d.ts +6 -0
  149. package/dist/components/others/ElmTyping.vue.d.ts +4 -0
  150. package/dist/components/renderer/ElmJsonRenderer.vue.d.ts +3 -8
  151. package/dist/components/renderer/ElmJsonRendererAsync.vue.d.ts +3 -0
  152. package/dist/components/table/ElmTable.vue.d.ts +8 -2
  153. package/dist/components/table/ElmTableBody.vue.d.ts +3 -2
  154. package/dist/components/table/ElmTableCell.vue.d.ts +2 -1
  155. package/dist/components/table/ElmTableHeader.vue.d.ts +3 -2
  156. package/dist/components/table/ElmTableRow.vue.d.ts +3 -2
  157. package/dist/components/template/ElmTemplate.vue.d.ts +1 -1
  158. package/dist/components/typography/ElmBlockQuote.vue.d.ts +5 -2
  159. package/dist/components/typography/ElmBulletedList.vue.d.ts +5 -2
  160. package/dist/components/typography/ElmCallout.vue.d.ts +5 -2
  161. package/dist/components/typography/ElmDivider.vue.d.ts +8 -1
  162. package/dist/components/typography/ElmListItem.vue.d.ts +3 -2
  163. package/dist/components/typography/ElmNumberedList.vue.d.ts +5 -2
  164. package/dist/components/typography/ElmParagraph.vue.d.ts +5 -2
  165. package/dist/coq-D7gLDqnE.js +6 -0
  166. package/dist/cpp-DgBvEX06.js +18 -0
  167. package/dist/crystal-Irrx0Pa-.js +18 -0
  168. package/dist/csharp-DP0xB1m9.js +6 -0
  169. package/dist/css-D1aVdRIU.js +6 -0
  170. package/dist/csv-DvCncUGQ.js +6 -0
  171. package/dist/cue-BXMrmvay.js +6 -0
  172. package/dist/cypher-Bjq2-Qil.js +6 -0
  173. package/dist/cytoscape.esm-D7d-JUdX.js +17637 -0
  174. package/dist/d-D6ZXmn3l.js +6 -0
  175. package/dist/dagre-4EVJKHTY-BYRN9jou.js +447 -0
  176. package/dist/dark-plus-pUHDTVV0.js +4 -0
  177. package/dist/dart-Dz59Is3F.js +6 -0
  178. package/dist/dax-BQnxIpeJ.js +6 -0
  179. package/dist/desktop-Db9vb-dl.js +6 -0
  180. package/dist/diagram-QW4FP2JN-Bs-8drax.js +126 -0
  181. package/dist/diff-CXJVWqiZ.js +6 -0
  182. package/dist/docker-CsHqm9tx.js +6 -0
  183. package/dist/dotenv-CpZf7hu_.js +6 -0
  184. package/dist/dracula-BtZx2Kac.js +4 -0
  185. package/dist/dracula-soft-BKa-aqBv.js +4 -0
  186. package/dist/dream-maker-B0kijSoP.js +6 -0
  187. package/dist/edge-DUKxyBaA.js +12 -0
  188. package/dist/elixir-DciEEYXV.js +8 -0
  189. package/dist/elm-C-_4e5ZU.js +8 -0
  190. package/dist/elmethis.js +68 -44
  191. package/dist/elmethis.umd.cjs +2424 -191
  192. package/dist/emacs-lisp-BAefI874.js +6 -0
  193. package/dist/erDiagram-6RL3IURR-ribDrswX.js +937 -0
  194. package/dist/erb-qWJ2Sxju.js +10 -0
  195. package/dist/erlang-zeJgoGSf.js +6 -0
  196. package/dist/everforest-dark-DMCBqXCK.js +4 -0
  197. package/dist/everforest-light-BbXl82Em.js +4 -0
  198. package/dist/fennel-DNqkz9pE.js +6 -0
  199. package/dist/fish-CgmTWKa-.js +6 -0
  200. package/dist/flowDiagram-7ASYPVHJ-CuBgt9gS.js +1484 -0
  201. package/dist/fluent-BapTxJsC.js +6 -0
  202. package/dist/fortran-fixed-form-BJHD-IIW.js +8 -0
  203. package/dist/fortran-free-form-DIGrsU3L.js +6 -0
  204. package/dist/fsharp-C9ST_v27.js +8 -0
  205. package/dist/ganttDiagram-NTVNEXSI-DBJrsNdL.js +2493 -0
  206. package/dist/gdresource-BDmP_ODe.js +10 -0
  207. package/dist/gdscript-C_KI5dtV.js +6 -0
  208. package/dist/gdshader-BGJEsM2Z.js +6 -0
  209. package/dist/genie-C9gPjc6J.js +6 -0
  210. package/dist/gherkin-bka1Exbx.js +6 -0
  211. package/dist/git-commit-CpnaV1vS.js +8 -0
  212. package/dist/git-rebase-i91KcDkj.js +8 -0
  213. package/dist/gitGraph-YCYPL57B-Dxn-b765.js +5 -0
  214. package/dist/gitGraphDiagram-NRZ2UAAF-CLVLlkG2.js +712 -0
  215. package/dist/github-dark-DenFmJkN.js +4 -0
  216. package/dist/github-dark-default-BJPUVz4H.js +4 -0
  217. package/dist/github-dark-dimmed-DUshB20C.js +4 -0
  218. package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
  219. package/dist/github-light-JYsPkUQd.js +4 -0
  220. package/dist/github-light-default-D99KPAby.js +4 -0
  221. package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
  222. package/dist/gleam-B4k9YFGD.js +6 -0
  223. package/dist/glimmer-js-Cy-seTWt.js +14 -0
  224. package/dist/glimmer-ts-BqS9vK74.js +14 -0
  225. package/dist/glsl-XLGYNq5B.js +8 -0
  226. package/dist/gnuplot-DnWoRZt-.js +6 -0
  227. package/dist/go-BE_MH2_f.js +6 -0
  228. package/dist/graph-Bez2_NoA.js +247 -0
  229. package/dist/graphql-DfqJ60AB.js +14 -0
  230. package/dist/groovy-CyKtXwrG.js +6 -0
  231. package/dist/hack-BcPvMs07.js +10 -0
  232. package/dist/haml-kgLjPoQR.js +10 -0
  233. package/dist/handlebars-CxEEvn8q.js +14 -0
  234. package/dist/haskell-DA6E-9ES.js +6 -0
  235. package/dist/haxe-CZZ33vZw.js +6 -0
  236. package/dist/hcl-BmHk-gID.js +6 -0
  237. package/dist/hjson-CgwED-oz.js +6 -0
  238. package/dist/hlsl-3-lv4gi7.js +6 -0
  239. package/dist/hooks/useElmethisTheme.d.ts +4 -0
  240. package/dist/hooks/useTyping.d.ts +17 -0
  241. package/dist/houston-BDYrDoDW.js +4 -0
  242. package/dist/html-CAwPY-4s.js +10 -0
  243. package/dist/html-derivative-CgU1HeVZ.js +8 -0
  244. package/dist/http-CtmMjKg2.js +14 -0
  245. package/dist/hxml-BNKImryz.js +8 -0
  246. package/dist/hy-C2xHhR6I.js +6 -0
  247. package/dist/imba-Drd0AMDo.js +8 -0
  248. package/dist/{index-DO0Qe0Kt.js → index-D1xdlTqU.js} +17156 -15920
  249. package/dist/index.d.ts +28 -4
  250. package/dist/info-46DW6VJ7-De-85lhs.js +5 -0
  251. package/dist/infoDiagram-A4XQUW5V-BPrPq9DF.js +22 -0
  252. package/dist/ini-BUcvsX-U.js +6 -0
  253. package/dist/init-DjUOC4st.js +16 -0
  254. package/dist/java-B7odJ7Ap.js +6 -0
  255. package/dist/javascript-fa8UlHZE.js +6 -0
  256. package/dist/jinja-BPjRosMt.js +11 -0
  257. package/dist/jison-BygvlveW.js +8 -0
  258. package/dist/journeyDiagram-G5WM74LC-CnI5BKTx.js +810 -0
  259. package/dist/json-Cz3rcMTA.js +6 -0
  260. package/dist/json5-uIDDV5qu.js +6 -0
  261. package/dist/jsonc-i-WRxL89.js +6 -0
  262. package/dist/jsonl-B0wQGTiP.js +6 -0
  263. package/dist/jsonnet-DEQ7IUoJ.js +6 -0
  264. package/dist/jssm-IG12tW_e.js +6 -0
  265. package/dist/jsx-Bkesy5tT.js +6 -0
  266. package/dist/julia-CRcgK_Of.js +16 -0
  267. package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
  268. package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
  269. package/dist/kanagawa-wave-CQwozSzG.js +4 -0
  270. package/dist/kanban-definition-QRCXZQQD-DrR4vU6r.js +718 -0
  271. package/dist/kotlin-DCgZY7Ii.js +6 -0
  272. package/dist/kusto-BrNSo3rV.js +6 -0
  273. package/dist/laserwave-6a00oqik.js +4 -0
  274. package/dist/latex-D-TusJJP.js +8 -0
  275. package/dist/layout-COyBDkVe.js +1325 -0
  276. package/dist/lean-CYSet4vs.js +6 -0
  277. package/dist/less-BPRpblJr.js +6 -0
  278. package/dist/light-plus-CZuVqSLX.js +4 -0
  279. package/dist/linear-vUygCKAW.js +423 -0
  280. package/dist/liquid-B7RQOxbw.js +14 -0
  281. package/dist/log-D2eRfqDn.js +6 -0
  282. package/dist/logo-QEAtGWZ9.js +6 -0
  283. package/dist/lua-BVfhNLDr.js +8 -0
  284. package/dist/luau-BjYGiqID.js +6 -0
  285. package/dist/make-BjuHP00g.js +6 -0
  286. package/dist/markdown-B7jjCkMW.js +6 -0
  287. package/dist/marko-vyeifSx8.js +14 -0
  288. package/dist/material-theme-D6KBX41T.js +4 -0
  289. package/dist/material-theme-darker-CkRroheE.js +4 -0
  290. package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
  291. package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
  292. package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
  293. package/dist/matlab-Co0cm4Uj.js +6 -0
  294. package/dist/mdc-AwGfuot8.js +12 -0
  295. package/dist/mdx-DIoECIFU.js +6 -0
  296. package/dist/mermaid-B8Znk7YO.js +6 -0
  297. package/dist/mermaid-parser.core-o6MVuPct.js +12479 -0
  298. package/dist/mermaid.core-CrPCZGbK.js +14844 -0
  299. package/dist/min-dark-C7ak0t6c.js +4 -0
  300. package/dist/min-light-CKFxVcPp.js +4 -0
  301. package/dist/mindmap-definition-GWI6TPTV-DC9-zuJZ.js +3219 -0
  302. package/dist/mipsasm-Dn465ziZ.js +6 -0
  303. package/dist/mojo-DPiIJnW3.js +6 -0
  304. package/dist/monokai-C1KBYcO0.js +4 -0
  305. package/dist/move-D0U3hAMk.js +6 -0
  306. package/dist/narrat-Dz4d7OmN.js +6 -0
  307. package/dist/nextflow-DW0Yq9a2.js +6 -0
  308. package/dist/nginx-Can2eAjw.js +8 -0
  309. package/dist/night-owl-Bm2rzalh.js +4 -0
  310. package/dist/nim-B1j3Kg94.js +20 -0
  311. package/dist/nix-DUbL-Ieg.js +6 -0
  312. package/dist/nord-CC5OiUXg.js +4 -0
  313. package/dist/nushell-DX7mjnU-.js +6 -0
  314. package/dist/objective-c-BVVh5_wH.js +6 -0
  315. package/dist/objective-cpp-B7rOm0GT.js +6 -0
  316. package/dist/ocaml-BZLsfx_o.js +6 -0
  317. package/dist/one-dark-pro-DTA3VF0_.js +4 -0
  318. package/dist/one-light-D9sNaUtq.js +4 -0
  319. package/dist/ordinal-DfAQgscy.js +61 -0
  320. package/dist/packet-W2GHVCYJ-BaD_yypn.js +5 -0
  321. package/dist/pascal-l2bqd7Dz.js +6 -0
  322. package/dist/perl-B6oy4kD0.js +16 -0
  323. package/dist/php-DGP0mMYG.js +18 -0
  324. package/dist/pie-BEWT4RHE-OeInp-RN.js +5 -0
  325. package/dist/pieDiagram-YF2LJOPJ-DviPVNka.js +161 -0
  326. package/dist/plastic-CSTz3KZp.js +4 -0
  327. package/dist/plsql-oVq_K_wH.js +6 -0
  328. package/dist/po-C82DhkWG.js +6 -0
  329. package/dist/poimandres-C-VADXHD.js +4 -0
  330. package/dist/polar-Ld-I0zJ7.js +6 -0
  331. package/dist/postcss-BZ3MNRIJ.js +6 -0
  332. package/dist/powerquery-CgRa2XRw.js +6 -0
  333. package/dist/powershell-CJR6U-QA.js +6 -0
  334. package/dist/prisma-COL_v1x4.js +6 -0
  335. package/dist/prolog-CuvJOxqT.js +6 -0
  336. package/dist/proto-o9HLmF90.js +6 -0
  337. package/dist/pug-CBXnJ8g8.js +12 -0
  338. package/dist/puppet-BYzxAd8_.js +6 -0
  339. package/dist/purescript-B_1NgE2N.js +6 -0
  340. package/dist/python-DsQISJFZ.js +6 -0
  341. package/dist/qml-FlMIyjU9.js +8 -0
  342. package/dist/qmldir-BInDYbpo.js +6 -0
  343. package/dist/qss-D-h4NdUG.js +6 -0
  344. package/dist/quadrantDiagram-OS5C2QUG-ZXGTzIMD.js +1024 -0
  345. package/dist/r-F-9I-ITZ.js +6 -0
  346. package/dist/racket-BoD1TBFT.js +6 -0
  347. package/dist/raku-IaYcw19m.js +6 -0
  348. package/dist/razor-Bje1i-BN.js +10 -0
  349. package/dist/red-7y8PH7HH.js +4 -0
  350. package/dist/reg-CMUdAgIP.js +6 -0
  351. package/dist/regexp-CXbjUNFD.js +6 -0
  352. package/dist/rel-BaRn3QX7.js +6 -0
  353. package/dist/requirementDiagram-MIRIMTAZ-BBQg3ZoA.js +768 -0
  354. package/dist/riscv-D275NyXt.js +6 -0
  355. package/dist/rose-pine-DhT-HZE9.js +4 -0
  356. package/dist/rose-pine-dawn-DiCjL2i4.js +4 -0
  357. package/dist/rose-pine-moon-BNmGHlcn.js +4 -0
  358. package/dist/rst-B-Yhj7ct.js +22 -0
  359. package/dist/ruby-DTuHl1fB.js +30 -0
  360. package/dist/rust-Cii5SJWu.js +6 -0
  361. package/dist/sankeyDiagram-Y46BX6SQ-kRxFmf2d.js +805 -0
  362. package/dist/sas-E6uq4Yf6.js +8 -0
  363. package/dist/sass-eCUyDs9S.js +6 -0
  364. package/dist/scala-BoCxXFyN.js +6 -0
  365. package/dist/scheme-CJeyKjnR.js +6 -0
  366. package/dist/scss-DhHc4lxB.js +8 -0
  367. package/dist/sdbl-bnfMePEG.js +6 -0
  368. package/dist/sequenceDiagram-G6AWOVSC-J-adtWLC.js +2274 -0
  369. package/dist/shaderlab-CvqEIoL0.js +8 -0
  370. package/dist/shellscript-DXPd9Pjm.js +6 -0
  371. package/dist/shellsession-BM4Gi9UW.js +8 -0
  372. package/dist/slack-dark-i7wN4OET.js +4 -0
  373. package/dist/slack-ochin-ndHf0LoP.js +4 -0
  374. package/dist/smalltalk-C-SeEPAs.js +6 -0
  375. package/dist/snazzy-light-BlSJXAu4.js +4 -0
  376. package/dist/solarized-dark-UTmkh7lw.js +4 -0
  377. package/dist/solarized-light-BheCkDPT.js +4 -0
  378. package/dist/solidity-BG_k8fA_.js +6 -0
  379. package/dist/soy-yvpdUHGC.js +8 -0
  380. package/dist/sparql-DhuelBut.js +8 -0
  381. package/dist/splunk-5AdRU-op.js +6 -0
  382. package/dist/sql-CE1s-LNJ.js +6 -0
  383. package/dist/ssh-config-DHHGll-v.js +6 -0
  384. package/dist/stata-XG8GBm9b.js +8 -0
  385. package/dist/stateDiagram-MAYHULR4-CnqR21Ky.js +268 -0
  386. package/dist/stateDiagram-v2-4JROLMXI-BXZl6QHK.js +14 -0
  387. package/dist/stylus-Bx_GeJsi.js +6 -0
  388. package/dist/svelte-01qw6Rxm.js +14 -0
  389. package/dist/swift-BAWqNR8A.js +6 -0
  390. package/dist/synthwave-84-NU3C_KFZ.js +4 -0
  391. package/dist/system-verilog-Cui-g-ut.js +6 -0
  392. package/dist/systemd-CsKYQIQK.js +6 -0
  393. package/dist/talonscript-D2dGh8FO.js +6 -0
  394. package/dist/tasl-D3W8HMV6.js +6 -0
  395. package/dist/tcl-DBFP4l7q.js +6 -0
  396. package/dist/templ-CkuR9rNI.js +12 -0
  397. package/dist/terraform-CBat0YKl.js +6 -0
  398. package/dist/tex-mHs7a43s.js +8 -0
  399. package/dist/timeline-definition-U7ZMHBDA-DmgHfw1m.js +804 -0
  400. package/dist/tokyo-night-DP4TmcQl.js +4 -0
  401. package/dist/toml-4juXvPlK.js +6 -0
  402. package/dist/ts-tags-DA8sBOJH.js +41 -0
  403. package/dist/tsv-BtvSkaG0.js +6 -0
  404. package/dist/tsx-DiGsgWT8.js +6 -0
  405. package/dist/turtle-BJ2wmjPc.js +6 -0
  406. package/dist/twig-5rMZH5nB.js +18 -0
  407. package/dist/typescript-buWNZFwO.js +6 -0
  408. package/dist/typespec-bLbdsxJL.js +6 -0
  409. package/dist/typst-YfWVUfOB.js +6 -0
  410. package/dist/v-wa8Orrdd.js +6 -0
  411. package/dist/vala-DRdriFr_.js +6 -0
  412. package/dist/vb-E2_-jk4M.js +6 -0
  413. package/dist/verilog-B1iBoR5_.js +6 -0
  414. package/dist/vesper-CJsaOsSM.js +4 -0
  415. package/dist/vhdl-CRVaAhXk.js +6 -0
  416. package/dist/viml-B-zWOd7Z.js +6 -0
  417. package/dist/vitesse-black-BoGvW84i.js +4 -0
  418. package/dist/vitesse-dark-Cym-eLtO.js +4 -0
  419. package/dist/vitesse-light-CcmG315c.js +4 -0
  420. package/dist/vue-V5-KOnq6.js +31 -0
  421. package/dist/vue-html-B8gQHLrf.js +10 -0
  422. package/dist/vyper-7y1ADzZr.js +6 -0
  423. package/dist/wasm-BWqHbxc2.js +6 -0
  424. package/dist/wasm-DQxwEHae.js +7 -0
  425. package/dist/wenyan-BMYnfus1.js +6 -0
  426. package/dist/wgsl-Cg1wrNXn.js +6 -0
  427. package/dist/wikitext-CntM04PE.js +6 -0
  428. package/dist/wolfram-Ws5qPlX9.js +6 -0
  429. package/dist/xml-ChBsf5uy.js +8 -0
  430. package/dist/xsl-BefjlXrd.js +8 -0
  431. package/dist/xychartDiagram-6QU3TZC5-BTmney6_.js +1304 -0
  432. package/dist/yaml-Bbg74JKr.js +6 -0
  433. package/dist/zenscript-C7IWVCmN.js +6 -0
  434. package/dist/zig-ppDBI4fs.js +6 -0
  435. package/package.json +35 -23
  436. package/dist/JavaScript-CPGj6jvI.js +0 -22
  437. package/dist/TypeScript-Dk8QmsMS.js +0 -22
  438. package/dist/components/icon/languages/TypeScript.vue.d.ts +0 -2
  439. package/dist/components/inline/ElmInlineCode.vue.d.ts +0 -15
@@ -0,0 +1,4594 @@
1
+ import { aG as ke, _ as at, g as qe, s as Je, a as Qe, b as Ke, o as je, p as _e, I as tr, aa as er, x as rr, l as Fe, al as Ne, c as ge, aH as me, d as ir, G as nr, aI as ar, aJ as or } from "./mermaid.core-CrPCZGbK.js";
2
+ import { p as sr } from "./chunk-TMUBEWPD-Ch3JZI2O.js";
3
+ import { I as hr } from "./chunk-KFBOBJHC-kjD7HAK_.js";
4
+ import { p as lr } from "./mermaid-parser.core-o6MVuPct.js";
5
+ import { c as be } from "./cytoscape.esm-D7d-JUdX.js";
6
+ var le = { exports: {} }, fe = { exports: {} }, ce = { exports: {} }, fr = ce.exports, Oe;
7
+ function cr() {
8
+ return Oe || (Oe = 1, function(C, Y) {
9
+ (function(G, N) {
10
+ C.exports = N();
11
+ })(fr, function() {
12
+ return (
13
+ /******/
14
+ function(A) {
15
+ var G = {};
16
+ function N(u) {
17
+ if (G[u])
18
+ return G[u].exports;
19
+ var s = G[u] = {
20
+ /******/
21
+ i: u,
22
+ /******/
23
+ l: !1,
24
+ /******/
25
+ exports: {}
26
+ /******/
27
+ };
28
+ return A[u].call(s.exports, s, s.exports, N), s.l = !0, s.exports;
29
+ }
30
+ return N.m = A, N.c = G, N.i = function(u) {
31
+ return u;
32
+ }, N.d = function(u, s, i) {
33
+ N.o(u, s) || Object.defineProperty(u, s, {
34
+ /******/
35
+ configurable: !1,
36
+ /******/
37
+ enumerable: !0,
38
+ /******/
39
+ get: i
40
+ /******/
41
+ });
42
+ }, N.n = function(u) {
43
+ var s = u && u.__esModule ? (
44
+ /******/
45
+ function() {
46
+ return u.default;
47
+ }
48
+ ) : (
49
+ /******/
50
+ function() {
51
+ return u;
52
+ }
53
+ );
54
+ return N.d(s, "a", s), s;
55
+ }, N.o = function(u, s) {
56
+ return Object.prototype.hasOwnProperty.call(u, s);
57
+ }, N.p = "", N(N.s = 28);
58
+ }([
59
+ /* 0 */
60
+ /***/
61
+ function(A, G, N) {
62
+ function u() {
63
+ }
64
+ u.QUALITY = 1, u.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, u.DEFAULT_INCREMENTAL = !1, u.DEFAULT_ANIMATION_ON_LAYOUT = !0, u.DEFAULT_ANIMATION_DURING_LAYOUT = !1, u.DEFAULT_ANIMATION_PERIOD = 50, u.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, u.DEFAULT_GRAPH_MARGIN = 15, u.NODE_DIMENSIONS_INCLUDE_LABELS = !1, u.SIMPLE_NODE_SIZE = 40, u.SIMPLE_NODE_HALF_SIZE = u.SIMPLE_NODE_SIZE / 2, u.EMPTY_COMPOUND_NODE_SIZE = 40, u.MIN_EDGE_LENGTH = 1, u.WORLD_BOUNDARY = 1e6, u.INITIAL_WORLD_BOUNDARY = u.WORLD_BOUNDARY / 1e3, u.WORLD_CENTER_X = 1200, u.WORLD_CENTER_Y = 900, A.exports = u;
65
+ },
66
+ /* 1 */
67
+ /***/
68
+ function(A, G, N) {
69
+ var u = N(2), s = N(8), i = N(9);
70
+ function r(f, n, y) {
71
+ u.call(this, y), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = y, this.bendpoints = [], this.source = f, this.target = n;
72
+ }
73
+ r.prototype = Object.create(u.prototype);
74
+ for (var e in u)
75
+ r[e] = u[e];
76
+ r.prototype.getSource = function() {
77
+ return this.source;
78
+ }, r.prototype.getTarget = function() {
79
+ return this.target;
80
+ }, r.prototype.isInterGraph = function() {
81
+ return this.isInterGraph;
82
+ }, r.prototype.getLength = function() {
83
+ return this.length;
84
+ }, r.prototype.isOverlapingSourceAndTarget = function() {
85
+ return this.isOverlapingSourceAndTarget;
86
+ }, r.prototype.getBendpoints = function() {
87
+ return this.bendpoints;
88
+ }, r.prototype.getLca = function() {
89
+ return this.lca;
90
+ }, r.prototype.getSourceInLca = function() {
91
+ return this.sourceInLca;
92
+ }, r.prototype.getTargetInLca = function() {
93
+ return this.targetInLca;
94
+ }, r.prototype.getOtherEnd = function(f) {
95
+ if (this.source === f)
96
+ return this.target;
97
+ if (this.target === f)
98
+ return this.source;
99
+ throw "Node is not incident with this edge";
100
+ }, r.prototype.getOtherEndInGraph = function(f, n) {
101
+ for (var y = this.getOtherEnd(f), t = n.getGraphManager().getRoot(); ; ) {
102
+ if (y.getOwner() == n)
103
+ return y;
104
+ if (y.getOwner() == t)
105
+ break;
106
+ y = y.getOwner().getParent();
107
+ }
108
+ return null;
109
+ }, r.prototype.updateLength = function() {
110
+ var f = new Array(4);
111
+ this.isOverlapingSourceAndTarget = s.getIntersection(this.target.getRect(), this.source.getRect(), f), this.isOverlapingSourceAndTarget || (this.lengthX = f[0] - f[2], this.lengthY = f[1] - f[3], Math.abs(this.lengthX) < 1 && (this.lengthX = i.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = i.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
112
+ }, r.prototype.updateLengthSimple = function() {
113
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = i.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = i.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
114
+ }, A.exports = r;
115
+ },
116
+ /* 2 */
117
+ /***/
118
+ function(A, G, N) {
119
+ function u(s) {
120
+ this.vGraphObject = s;
121
+ }
122
+ A.exports = u;
123
+ },
124
+ /* 3 */
125
+ /***/
126
+ function(A, G, N) {
127
+ var u = N(2), s = N(10), i = N(13), r = N(0), e = N(16), f = N(5);
128
+ function n(t, h, o, c) {
129
+ o == null && c == null && (c = h), u.call(this, c), t.graphManager != null && (t = t.graphManager), this.estimatedSize = s.MIN_VALUE, this.inclusionTreeDepth = s.MAX_VALUE, this.vGraphObject = c, this.edges = [], this.graphManager = t, o != null && h != null ? this.rect = new i(h.x, h.y, o.width, o.height) : this.rect = new i();
130
+ }
131
+ n.prototype = Object.create(u.prototype);
132
+ for (var y in u)
133
+ n[y] = u[y];
134
+ n.prototype.getEdges = function() {
135
+ return this.edges;
136
+ }, n.prototype.getChild = function() {
137
+ return this.child;
138
+ }, n.prototype.getOwner = function() {
139
+ return this.owner;
140
+ }, n.prototype.getWidth = function() {
141
+ return this.rect.width;
142
+ }, n.prototype.setWidth = function(t) {
143
+ this.rect.width = t;
144
+ }, n.prototype.getHeight = function() {
145
+ return this.rect.height;
146
+ }, n.prototype.setHeight = function(t) {
147
+ this.rect.height = t;
148
+ }, n.prototype.getCenterX = function() {
149
+ return this.rect.x + this.rect.width / 2;
150
+ }, n.prototype.getCenterY = function() {
151
+ return this.rect.y + this.rect.height / 2;
152
+ }, n.prototype.getCenter = function() {
153
+ return new f(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
154
+ }, n.prototype.getLocation = function() {
155
+ return new f(this.rect.x, this.rect.y);
156
+ }, n.prototype.getRect = function() {
157
+ return this.rect;
158
+ }, n.prototype.getDiagonal = function() {
159
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
160
+ }, n.prototype.getHalfTheDiagonal = function() {
161
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
162
+ }, n.prototype.setRect = function(t, h) {
163
+ this.rect.x = t.x, this.rect.y = t.y, this.rect.width = h.width, this.rect.height = h.height;
164
+ }, n.prototype.setCenter = function(t, h) {
165
+ this.rect.x = t - this.rect.width / 2, this.rect.y = h - this.rect.height / 2;
166
+ }, n.prototype.setLocation = function(t, h) {
167
+ this.rect.x = t, this.rect.y = h;
168
+ }, n.prototype.moveBy = function(t, h) {
169
+ this.rect.x += t, this.rect.y += h;
170
+ }, n.prototype.getEdgeListToNode = function(t) {
171
+ var h = [], o = this;
172
+ return o.edges.forEach(function(c) {
173
+ if (c.target == t) {
174
+ if (c.source != o) throw "Incorrect edge source!";
175
+ h.push(c);
176
+ }
177
+ }), h;
178
+ }, n.prototype.getEdgesBetween = function(t) {
179
+ var h = [], o = this;
180
+ return o.edges.forEach(function(c) {
181
+ if (!(c.source == o || c.target == o)) throw "Incorrect edge source and/or target";
182
+ (c.target == t || c.source == t) && h.push(c);
183
+ }), h;
184
+ }, n.prototype.getNeighborsList = function() {
185
+ var t = /* @__PURE__ */ new Set(), h = this;
186
+ return h.edges.forEach(function(o) {
187
+ if (o.source == h)
188
+ t.add(o.target);
189
+ else {
190
+ if (o.target != h)
191
+ throw "Incorrect incidency!";
192
+ t.add(o.source);
193
+ }
194
+ }), t;
195
+ }, n.prototype.withChildren = function() {
196
+ var t = /* @__PURE__ */ new Set(), h, o;
197
+ if (t.add(this), this.child != null)
198
+ for (var c = this.child.getNodes(), l = 0; l < c.length; l++)
199
+ h = c[l], o = h.withChildren(), o.forEach(function(T) {
200
+ t.add(T);
201
+ });
202
+ return t;
203
+ }, n.prototype.getNoOfChildren = function() {
204
+ var t = 0, h;
205
+ if (this.child == null)
206
+ t = 1;
207
+ else
208
+ for (var o = this.child.getNodes(), c = 0; c < o.length; c++)
209
+ h = o[c], t += h.getNoOfChildren();
210
+ return t == 0 && (t = 1), t;
211
+ }, n.prototype.getEstimatedSize = function() {
212
+ if (this.estimatedSize == s.MIN_VALUE)
213
+ throw "assert failed";
214
+ return this.estimatedSize;
215
+ }, n.prototype.calcEstimatedSize = function() {
216
+ 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);
217
+ }, n.prototype.scatter = function() {
218
+ var t, h, o = -r.INITIAL_WORLD_BOUNDARY, c = r.INITIAL_WORLD_BOUNDARY;
219
+ t = r.WORLD_CENTER_X + e.nextDouble() * (c - o) + o;
220
+ var l = -r.INITIAL_WORLD_BOUNDARY, T = r.INITIAL_WORLD_BOUNDARY;
221
+ h = r.WORLD_CENTER_Y + e.nextDouble() * (T - l) + l, this.rect.x = t, this.rect.y = h;
222
+ }, n.prototype.updateBounds = function() {
223
+ if (this.getChild() == null)
224
+ throw "assert failed";
225
+ if (this.getChild().getNodes().length != 0) {
226
+ var t = this.getChild();
227
+ if (t.updateBounds(!0), this.rect.x = t.getLeft(), this.rect.y = t.getTop(), this.setWidth(t.getRight() - t.getLeft()), this.setHeight(t.getBottom() - t.getTop()), r.NODE_DIMENSIONS_INCLUDE_LABELS) {
228
+ var h = t.getRight() - t.getLeft(), o = t.getBottom() - t.getTop();
229
+ this.labelWidth && (this.labelPosHorizontal == "left" ? (this.rect.x -= this.labelWidth, this.setWidth(h + this.labelWidth)) : this.labelPosHorizontal == "center" && this.labelWidth > h ? (this.rect.x -= (this.labelWidth - h) / 2, this.setWidth(this.labelWidth)) : this.labelPosHorizontal == "right" && this.setWidth(h + this.labelWidth)), this.labelHeight && (this.labelPosVertical == "top" ? (this.rect.y -= this.labelHeight, this.setHeight(o + this.labelHeight)) : this.labelPosVertical == "center" && this.labelHeight > o ? (this.rect.y -= (this.labelHeight - o) / 2, this.setHeight(this.labelHeight)) : this.labelPosVertical == "bottom" && this.setHeight(o + this.labelHeight));
230
+ }
231
+ }
232
+ }, n.prototype.getInclusionTreeDepth = function() {
233
+ if (this.inclusionTreeDepth == s.MAX_VALUE)
234
+ throw "assert failed";
235
+ return this.inclusionTreeDepth;
236
+ }, n.prototype.transform = function(t) {
237
+ var h = this.rect.x;
238
+ h > r.WORLD_BOUNDARY ? h = r.WORLD_BOUNDARY : h < -r.WORLD_BOUNDARY && (h = -r.WORLD_BOUNDARY);
239
+ var o = this.rect.y;
240
+ o > r.WORLD_BOUNDARY ? o = r.WORLD_BOUNDARY : o < -r.WORLD_BOUNDARY && (o = -r.WORLD_BOUNDARY);
241
+ var c = new f(h, o), l = t.inverseTransformPoint(c);
242
+ this.setLocation(l.x, l.y);
243
+ }, n.prototype.getLeft = function() {
244
+ return this.rect.x;
245
+ }, n.prototype.getRight = function() {
246
+ return this.rect.x + this.rect.width;
247
+ }, n.prototype.getTop = function() {
248
+ return this.rect.y;
249
+ }, n.prototype.getBottom = function() {
250
+ return this.rect.y + this.rect.height;
251
+ }, n.prototype.getParent = function() {
252
+ return this.owner == null ? null : this.owner.getParent();
253
+ }, A.exports = n;
254
+ },
255
+ /* 4 */
256
+ /***/
257
+ function(A, G, N) {
258
+ var u = N(0);
259
+ function s() {
260
+ }
261
+ for (var i in u)
262
+ s[i] = u[i];
263
+ s.MAX_ITERATIONS = 2500, s.DEFAULT_EDGE_LENGTH = 50, s.DEFAULT_SPRING_STRENGTH = 0.45, s.DEFAULT_REPULSION_STRENGTH = 4500, s.DEFAULT_GRAVITY_STRENGTH = 0.4, s.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, s.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, s.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, s.COOLING_ADAPTATION_FACTOR = 0.33, s.ADAPTATION_LOWER_NODE_LIMIT = 1e3, s.ADAPTATION_UPPER_NODE_LIMIT = 5e3, s.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, s.MAX_NODE_DISPLACEMENT = s.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, s.MIN_REPULSION_DIST = s.DEFAULT_EDGE_LENGTH / 10, s.CONVERGENCE_CHECK_PERIOD = 100, s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, s.MIN_EDGE_LENGTH = 1, s.GRID_CALCULATION_CHECK_PERIOD = 10, A.exports = s;
264
+ },
265
+ /* 5 */
266
+ /***/
267
+ function(A, G, N) {
268
+ function u(s, i) {
269
+ s == null && i == null ? (this.x = 0, this.y = 0) : (this.x = s, this.y = i);
270
+ }
271
+ u.prototype.getX = function() {
272
+ return this.x;
273
+ }, u.prototype.getY = function() {
274
+ return this.y;
275
+ }, u.prototype.setX = function(s) {
276
+ this.x = s;
277
+ }, u.prototype.setY = function(s) {
278
+ this.y = s;
279
+ }, u.prototype.getDifference = function(s) {
280
+ return new DimensionD(this.x - s.x, this.y - s.y);
281
+ }, u.prototype.getCopy = function() {
282
+ return new u(this.x, this.y);
283
+ }, u.prototype.translate = function(s) {
284
+ return this.x += s.width, this.y += s.height, this;
285
+ }, A.exports = u;
286
+ },
287
+ /* 6 */
288
+ /***/
289
+ function(A, G, N) {
290
+ var u = N(2), s = N(10), i = N(0), r = N(7), e = N(3), f = N(1), n = N(13), y = N(12), t = N(11);
291
+ function h(c, l, T) {
292
+ u.call(this, T), this.estimatedSize = s.MIN_VALUE, this.margin = i.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = c, l != null && l instanceof r ? this.graphManager = l : l != null && l instanceof Layout && (this.graphManager = l.graphManager);
293
+ }
294
+ h.prototype = Object.create(u.prototype);
295
+ for (var o in u)
296
+ h[o] = u[o];
297
+ h.prototype.getNodes = function() {
298
+ return this.nodes;
299
+ }, h.prototype.getEdges = function() {
300
+ return this.edges;
301
+ }, h.prototype.getGraphManager = function() {
302
+ return this.graphManager;
303
+ }, h.prototype.getParent = function() {
304
+ return this.parent;
305
+ }, h.prototype.getLeft = function() {
306
+ return this.left;
307
+ }, h.prototype.getRight = function() {
308
+ return this.right;
309
+ }, h.prototype.getTop = function() {
310
+ return this.top;
311
+ }, h.prototype.getBottom = function() {
312
+ return this.bottom;
313
+ }, h.prototype.isConnected = function() {
314
+ return this.isConnected;
315
+ }, h.prototype.add = function(c, l, T) {
316
+ if (l == null && T == null) {
317
+ var g = c;
318
+ if (this.graphManager == null)
319
+ throw "Graph has no graph mgr!";
320
+ if (this.getNodes().indexOf(g) > -1)
321
+ throw "Node already in graph!";
322
+ return g.owner = this, this.getNodes().push(g), g;
323
+ } else {
324
+ var d = c;
325
+ if (!(this.getNodes().indexOf(l) > -1 && this.getNodes().indexOf(T) > -1))
326
+ throw "Source or target not in graph!";
327
+ if (!(l.owner == T.owner && l.owner == this))
328
+ throw "Both owners must be this graph!";
329
+ return l.owner != T.owner ? null : (d.source = l, d.target = T, d.isInterGraph = !1, this.getEdges().push(d), l.edges.push(d), T != l && T.edges.push(d), d);
330
+ }
331
+ }, h.prototype.remove = function(c) {
332
+ var l = c;
333
+ if (c instanceof e) {
334
+ if (l == null)
335
+ throw "Node is null!";
336
+ if (!(l.owner != null && l.owner == this))
337
+ throw "Owner graph is invalid!";
338
+ if (this.graphManager == null)
339
+ throw "Owner graph manager is invalid!";
340
+ for (var T = l.edges.slice(), g, d = T.length, L = 0; L < d; L++)
341
+ g = T[L], g.isInterGraph ? this.graphManager.remove(g) : g.source.owner.remove(g);
342
+ var F = this.nodes.indexOf(l);
343
+ if (F == -1)
344
+ throw "Node not in owner node list!";
345
+ this.nodes.splice(F, 1);
346
+ } else if (c instanceof f) {
347
+ var g = c;
348
+ if (g == null)
349
+ throw "Edge is null!";
350
+ if (!(g.source != null && g.target != null))
351
+ throw "Source and/or target is null!";
352
+ if (!(g.source.owner != null && g.target.owner != null && g.source.owner == this && g.target.owner == this))
353
+ throw "Source and/or target owner is invalid!";
354
+ var M = g.source.edges.indexOf(g), P = g.target.edges.indexOf(g);
355
+ if (!(M > -1 && P > -1))
356
+ throw "Source and/or target doesn't know this edge!";
357
+ g.source.edges.splice(M, 1), g.target != g.source && g.target.edges.splice(P, 1);
358
+ var F = g.source.owner.getEdges().indexOf(g);
359
+ if (F == -1)
360
+ throw "Not in owner's edge list!";
361
+ g.source.owner.getEdges().splice(F, 1);
362
+ }
363
+ }, h.prototype.updateLeftTop = function() {
364
+ for (var c = s.MAX_VALUE, l = s.MAX_VALUE, T, g, d, L = this.getNodes(), F = L.length, M = 0; M < F; M++) {
365
+ var P = L[M];
366
+ T = P.getTop(), g = P.getLeft(), c > T && (c = T), l > g && (l = g);
367
+ }
368
+ return c == s.MAX_VALUE ? null : (L[0].getParent().paddingLeft != null ? d = L[0].getParent().paddingLeft : d = this.margin, this.left = l - d, this.top = c - d, new y(this.left, this.top));
369
+ }, h.prototype.updateBounds = function(c) {
370
+ for (var l = s.MAX_VALUE, T = -s.MAX_VALUE, g = s.MAX_VALUE, d = -s.MAX_VALUE, L, F, M, P, J, V = this.nodes, Q = V.length, D = 0; D < Q; D++) {
371
+ var rt = V[D];
372
+ c && rt.child != null && rt.updateBounds(), L = rt.getLeft(), F = rt.getRight(), M = rt.getTop(), P = rt.getBottom(), l > L && (l = L), T < F && (T = F), g > M && (g = M), d < P && (d = P);
373
+ }
374
+ var a = new n(l, g, T - l, d - g);
375
+ l == s.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), V[0].getParent().paddingLeft != null ? J = V[0].getParent().paddingLeft : J = this.margin, this.left = a.x - J, this.right = a.x + a.width + J, this.top = a.y - J, this.bottom = a.y + a.height + J;
376
+ }, h.calculateBounds = function(c) {
377
+ for (var l = s.MAX_VALUE, T = -s.MAX_VALUE, g = s.MAX_VALUE, d = -s.MAX_VALUE, L, F, M, P, J = c.length, V = 0; V < J; V++) {
378
+ var Q = c[V];
379
+ L = Q.getLeft(), F = Q.getRight(), M = Q.getTop(), P = Q.getBottom(), l > L && (l = L), T < F && (T = F), g > M && (g = M), d < P && (d = P);
380
+ }
381
+ var D = new n(l, g, T - l, d - g);
382
+ return D;
383
+ }, h.prototype.getInclusionTreeDepth = function() {
384
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
385
+ }, h.prototype.getEstimatedSize = function() {
386
+ if (this.estimatedSize == s.MIN_VALUE)
387
+ throw "assert failed";
388
+ return this.estimatedSize;
389
+ }, h.prototype.calcEstimatedSize = function() {
390
+ for (var c = 0, l = this.nodes, T = l.length, g = 0; g < T; g++) {
391
+ var d = l[g];
392
+ c += d.calcEstimatedSize();
393
+ }
394
+ return c == 0 ? this.estimatedSize = i.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = c / Math.sqrt(this.nodes.length), this.estimatedSize;
395
+ }, h.prototype.updateConnected = function() {
396
+ var c = this;
397
+ if (this.nodes.length == 0) {
398
+ this.isConnected = !0;
399
+ return;
400
+ }
401
+ var l = new t(), T = /* @__PURE__ */ new Set(), g = this.nodes[0], d, L, F = g.withChildren();
402
+ for (F.forEach(function(D) {
403
+ l.push(D), T.add(D);
404
+ }); l.length !== 0; ) {
405
+ g = l.shift(), d = g.getEdges();
406
+ for (var M = d.length, P = 0; P < M; P++) {
407
+ var J = d[P];
408
+ if (L = J.getOtherEndInGraph(g, this), L != null && !T.has(L)) {
409
+ var V = L.withChildren();
410
+ V.forEach(function(D) {
411
+ l.push(D), T.add(D);
412
+ });
413
+ }
414
+ }
415
+ }
416
+ if (this.isConnected = !1, T.size >= this.nodes.length) {
417
+ var Q = 0;
418
+ T.forEach(function(D) {
419
+ D.owner == c && Q++;
420
+ }), Q == this.nodes.length && (this.isConnected = !0);
421
+ }
422
+ }, A.exports = h;
423
+ },
424
+ /* 7 */
425
+ /***/
426
+ function(A, G, N) {
427
+ var u, s = N(1);
428
+ function i(r) {
429
+ u = N(6), this.layout = r, this.graphs = [], this.edges = [];
430
+ }
431
+ i.prototype.addRoot = function() {
432
+ var r = this.layout.newGraph(), e = this.layout.newNode(null), f = this.add(r, e);
433
+ return this.setRootGraph(f), this.rootGraph;
434
+ }, i.prototype.add = function(r, e, f, n, y) {
435
+ if (f == null && n == null && y == null) {
436
+ if (r == null)
437
+ throw "Graph is null!";
438
+ if (e == null)
439
+ throw "Parent node is null!";
440
+ if (this.graphs.indexOf(r) > -1)
441
+ throw "Graph already in this graph mgr!";
442
+ if (this.graphs.push(r), r.parent != null)
443
+ throw "Already has a parent!";
444
+ if (e.child != null)
445
+ throw "Already has a child!";
446
+ return r.parent = e, e.child = r, r;
447
+ } else {
448
+ y = f, n = e, f = r;
449
+ var t = n.getOwner(), h = y.getOwner();
450
+ if (!(t != null && t.getGraphManager() == this))
451
+ throw "Source not in this graph mgr!";
452
+ if (!(h != null && h.getGraphManager() == this))
453
+ throw "Target not in this graph mgr!";
454
+ if (t == h)
455
+ return f.isInterGraph = !1, t.add(f, n, y);
456
+ if (f.isInterGraph = !0, f.source = n, f.target = y, this.edges.indexOf(f) > -1)
457
+ throw "Edge already in inter-graph edge list!";
458
+ if (this.edges.push(f), !(f.source != null && f.target != null))
459
+ throw "Edge source and/or target is null!";
460
+ if (!(f.source.edges.indexOf(f) == -1 && f.target.edges.indexOf(f) == -1))
461
+ throw "Edge already in source and/or target incidency list!";
462
+ return f.source.edges.push(f), f.target.edges.push(f), f;
463
+ }
464
+ }, i.prototype.remove = function(r) {
465
+ if (r instanceof u) {
466
+ var e = r;
467
+ if (e.getGraphManager() != this)
468
+ throw "Graph not in this graph mgr";
469
+ if (!(e == this.rootGraph || e.parent != null && e.parent.graphManager == this))
470
+ throw "Invalid parent node!";
471
+ var f = [];
472
+ f = f.concat(e.getEdges());
473
+ for (var n, y = f.length, t = 0; t < y; t++)
474
+ n = f[t], e.remove(n);
475
+ var h = [];
476
+ h = h.concat(e.getNodes());
477
+ var o;
478
+ y = h.length;
479
+ for (var t = 0; t < y; t++)
480
+ o = h[t], e.remove(o);
481
+ e == this.rootGraph && this.setRootGraph(null);
482
+ var c = this.graphs.indexOf(e);
483
+ this.graphs.splice(c, 1), e.parent = null;
484
+ } else if (r instanceof s) {
485
+ if (n = r, n == null)
486
+ throw "Edge is null!";
487
+ if (!n.isInterGraph)
488
+ throw "Not an inter-graph edge!";
489
+ if (!(n.source != null && n.target != null))
490
+ throw "Source and/or target is null!";
491
+ if (!(n.source.edges.indexOf(n) != -1 && n.target.edges.indexOf(n) != -1))
492
+ throw "Source and/or target doesn't know this edge!";
493
+ var c = n.source.edges.indexOf(n);
494
+ if (n.source.edges.splice(c, 1), c = n.target.edges.indexOf(n), n.target.edges.splice(c, 1), !(n.source.owner != null && n.source.owner.getGraphManager() != null))
495
+ throw "Edge owner graph or owner graph manager is null!";
496
+ if (n.source.owner.getGraphManager().edges.indexOf(n) == -1)
497
+ throw "Not in owner graph manager's edge list!";
498
+ var c = n.source.owner.getGraphManager().edges.indexOf(n);
499
+ n.source.owner.getGraphManager().edges.splice(c, 1);
500
+ }
501
+ }, i.prototype.updateBounds = function() {
502
+ this.rootGraph.updateBounds(!0);
503
+ }, i.prototype.getGraphs = function() {
504
+ return this.graphs;
505
+ }, i.prototype.getAllNodes = function() {
506
+ if (this.allNodes == null) {
507
+ for (var r = [], e = this.getGraphs(), f = e.length, n = 0; n < f; n++)
508
+ r = r.concat(e[n].getNodes());
509
+ this.allNodes = r;
510
+ }
511
+ return this.allNodes;
512
+ }, i.prototype.resetAllNodes = function() {
513
+ this.allNodes = null;
514
+ }, i.prototype.resetAllEdges = function() {
515
+ this.allEdges = null;
516
+ }, i.prototype.resetAllNodesToApplyGravitation = function() {
517
+ this.allNodesToApplyGravitation = null;
518
+ }, i.prototype.getAllEdges = function() {
519
+ if (this.allEdges == null) {
520
+ var r = [], e = this.getGraphs();
521
+ e.length;
522
+ for (var f = 0; f < e.length; f++)
523
+ r = r.concat(e[f].getEdges());
524
+ r = r.concat(this.edges), this.allEdges = r;
525
+ }
526
+ return this.allEdges;
527
+ }, i.prototype.getAllNodesToApplyGravitation = function() {
528
+ return this.allNodesToApplyGravitation;
529
+ }, i.prototype.setAllNodesToApplyGravitation = function(r) {
530
+ if (this.allNodesToApplyGravitation != null)
531
+ throw "assert failed";
532
+ this.allNodesToApplyGravitation = r;
533
+ }, i.prototype.getRoot = function() {
534
+ return this.rootGraph;
535
+ }, i.prototype.setRootGraph = function(r) {
536
+ if (r.getGraphManager() != this)
537
+ throw "Root not in this graph mgr!";
538
+ this.rootGraph = r, r.parent == null && (r.parent = this.layout.newNode("Root node"));
539
+ }, i.prototype.getLayout = function() {
540
+ return this.layout;
541
+ }, i.prototype.isOneAncestorOfOther = function(r, e) {
542
+ if (!(r != null && e != null))
543
+ throw "assert failed";
544
+ if (r == e)
545
+ return !0;
546
+ var f = r.getOwner(), n;
547
+ do {
548
+ if (n = f.getParent(), n == null)
549
+ break;
550
+ if (n == e)
551
+ return !0;
552
+ if (f = n.getOwner(), f == null)
553
+ break;
554
+ } while (!0);
555
+ f = e.getOwner();
556
+ do {
557
+ if (n = f.getParent(), n == null)
558
+ break;
559
+ if (n == r)
560
+ return !0;
561
+ if (f = n.getOwner(), f == null)
562
+ break;
563
+ } while (!0);
564
+ return !1;
565
+ }, i.prototype.calcLowestCommonAncestors = function() {
566
+ for (var r, e, f, n, y, t = this.getAllEdges(), h = t.length, o = 0; o < h; o++) {
567
+ if (r = t[o], e = r.source, f = r.target, r.lca = null, r.sourceInLca = e, r.targetInLca = f, e == f) {
568
+ r.lca = e.getOwner();
569
+ continue;
570
+ }
571
+ for (n = e.getOwner(); r.lca == null; ) {
572
+ for (r.targetInLca = f, y = f.getOwner(); r.lca == null; ) {
573
+ if (y == n) {
574
+ r.lca = y;
575
+ break;
576
+ }
577
+ if (y == this.rootGraph)
578
+ break;
579
+ if (r.lca != null)
580
+ throw "assert failed";
581
+ r.targetInLca = y.getParent(), y = r.targetInLca.getOwner();
582
+ }
583
+ if (n == this.rootGraph)
584
+ break;
585
+ r.lca == null && (r.sourceInLca = n.getParent(), n = r.sourceInLca.getOwner());
586
+ }
587
+ if (r.lca == null)
588
+ throw "assert failed";
589
+ }
590
+ }, i.prototype.calcLowestCommonAncestor = function(r, e) {
591
+ if (r == e)
592
+ return r.getOwner();
593
+ var f = r.getOwner();
594
+ do {
595
+ if (f == null)
596
+ break;
597
+ var n = e.getOwner();
598
+ do {
599
+ if (n == null)
600
+ break;
601
+ if (n == f)
602
+ return n;
603
+ n = n.getParent().getOwner();
604
+ } while (!0);
605
+ f = f.getParent().getOwner();
606
+ } while (!0);
607
+ return f;
608
+ }, i.prototype.calcInclusionTreeDepths = function(r, e) {
609
+ r == null && e == null && (r = this.rootGraph, e = 1);
610
+ for (var f, n = r.getNodes(), y = n.length, t = 0; t < y; t++)
611
+ f = n[t], f.inclusionTreeDepth = e, f.child != null && this.calcInclusionTreeDepths(f.child, e + 1);
612
+ }, i.prototype.includesInvalidEdge = function() {
613
+ for (var r, e = [], f = this.edges.length, n = 0; n < f; n++)
614
+ r = this.edges[n], this.isOneAncestorOfOther(r.source, r.target) && e.push(r);
615
+ for (var n = 0; n < e.length; n++)
616
+ this.remove(e[n]);
617
+ return !1;
618
+ }, A.exports = i;
619
+ },
620
+ /* 8 */
621
+ /***/
622
+ function(A, G, N) {
623
+ var u = N(12);
624
+ function s() {
625
+ }
626
+ s.calcSeparationAmount = function(i, r, e, f) {
627
+ if (!i.intersects(r))
628
+ throw "assert failed";
629
+ var n = new Array(2);
630
+ this.decideDirectionsForOverlappingNodes(i, r, n), e[0] = Math.min(i.getRight(), r.getRight()) - Math.max(i.x, r.x), e[1] = Math.min(i.getBottom(), r.getBottom()) - Math.max(i.y, r.y), i.getX() <= r.getX() && i.getRight() >= r.getRight() ? e[0] += Math.min(r.getX() - i.getX(), i.getRight() - r.getRight()) : r.getX() <= i.getX() && r.getRight() >= i.getRight() && (e[0] += Math.min(i.getX() - r.getX(), r.getRight() - i.getRight())), i.getY() <= r.getY() && i.getBottom() >= r.getBottom() ? e[1] += Math.min(r.getY() - i.getY(), i.getBottom() - r.getBottom()) : r.getY() <= i.getY() && r.getBottom() >= i.getBottom() && (e[1] += Math.min(i.getY() - r.getY(), r.getBottom() - i.getBottom()));
631
+ var y = Math.abs((r.getCenterY() - i.getCenterY()) / (r.getCenterX() - i.getCenterX()));
632
+ r.getCenterY() === i.getCenterY() && r.getCenterX() === i.getCenterX() && (y = 1);
633
+ var t = y * e[0], h = e[1] / y;
634
+ e[0] < h ? h = e[0] : t = e[1], e[0] = -1 * n[0] * (h / 2 + f), e[1] = -1 * n[1] * (t / 2 + f);
635
+ }, s.decideDirectionsForOverlappingNodes = function(i, r, e) {
636
+ i.getCenterX() < r.getCenterX() ? e[0] = -1 : e[0] = 1, i.getCenterY() < r.getCenterY() ? e[1] = -1 : e[1] = 1;
637
+ }, s.getIntersection2 = function(i, r, e) {
638
+ var f = i.getCenterX(), n = i.getCenterY(), y = r.getCenterX(), t = r.getCenterY();
639
+ if (i.intersects(r))
640
+ return e[0] = f, e[1] = n, e[2] = y, e[3] = t, !0;
641
+ var h = i.getX(), o = i.getY(), c = i.getRight(), l = i.getX(), T = i.getBottom(), g = i.getRight(), d = i.getWidthHalf(), L = i.getHeightHalf(), F = r.getX(), M = r.getY(), P = r.getRight(), J = r.getX(), V = r.getBottom(), Q = r.getRight(), D = r.getWidthHalf(), rt = r.getHeightHalf(), a = !1, m = !1;
642
+ if (f === y) {
643
+ if (n > t)
644
+ return e[0] = f, e[1] = o, e[2] = y, e[3] = V, !1;
645
+ if (n < t)
646
+ return e[0] = f, e[1] = T, e[2] = y, e[3] = M, !1;
647
+ } else if (n === t) {
648
+ if (f > y)
649
+ return e[0] = h, e[1] = n, e[2] = P, e[3] = t, !1;
650
+ if (f < y)
651
+ return e[0] = c, e[1] = n, e[2] = F, e[3] = t, !1;
652
+ } else {
653
+ var v = i.height / i.width, E = r.height / r.width, p = (t - n) / (y - f), I = void 0, w = void 0, R = void 0, H = void 0, x = void 0, k = void 0;
654
+ if (-v === p ? f > y ? (e[0] = l, e[1] = T, a = !0) : (e[0] = c, e[1] = o, a = !0) : v === p && (f > y ? (e[0] = h, e[1] = o, a = !0) : (e[0] = g, e[1] = T, a = !0)), -E === p ? y > f ? (e[2] = J, e[3] = V, m = !0) : (e[2] = P, e[3] = M, m = !0) : E === p && (y > f ? (e[2] = F, e[3] = M, m = !0) : (e[2] = Q, e[3] = V, m = !0)), a && m)
655
+ return !1;
656
+ if (f > y ? n > t ? (I = this.getCardinalDirection(v, p, 4), w = this.getCardinalDirection(E, p, 2)) : (I = this.getCardinalDirection(-v, p, 3), w = this.getCardinalDirection(-E, p, 1)) : n > t ? (I = this.getCardinalDirection(-v, p, 1), w = this.getCardinalDirection(-E, p, 3)) : (I = this.getCardinalDirection(v, p, 2), w = this.getCardinalDirection(E, p, 4)), !a)
657
+ switch (I) {
658
+ case 1:
659
+ H = o, R = f + -L / p, e[0] = R, e[1] = H;
660
+ break;
661
+ case 2:
662
+ R = g, H = n + d * p, e[0] = R, e[1] = H;
663
+ break;
664
+ case 3:
665
+ H = T, R = f + L / p, e[0] = R, e[1] = H;
666
+ break;
667
+ case 4:
668
+ R = l, H = n + -d * p, e[0] = R, e[1] = H;
669
+ break;
670
+ }
671
+ if (!m)
672
+ switch (w) {
673
+ case 1:
674
+ k = M, x = y + -rt / p, e[2] = x, e[3] = k;
675
+ break;
676
+ case 2:
677
+ x = Q, k = t + D * p, e[2] = x, e[3] = k;
678
+ break;
679
+ case 3:
680
+ k = V, x = y + rt / p, e[2] = x, e[3] = k;
681
+ break;
682
+ case 4:
683
+ x = J, k = t + -D * p, e[2] = x, e[3] = k;
684
+ break;
685
+ }
686
+ }
687
+ return !1;
688
+ }, s.getCardinalDirection = function(i, r, e) {
689
+ return i > r ? e : 1 + e % 4;
690
+ }, s.getIntersection = function(i, r, e, f) {
691
+ if (f == null)
692
+ return this.getIntersection2(i, r, e);
693
+ var n = i.x, y = i.y, t = r.x, h = r.y, o = e.x, c = e.y, l = f.x, T = f.y, g = void 0, d = void 0, L = void 0, F = void 0, M = void 0, P = void 0, J = void 0, V = void 0, Q = void 0;
694
+ return L = h - y, M = n - t, J = t * y - n * h, F = T - c, P = o - l, V = l * c - o * T, Q = L * P - F * M, Q === 0 ? null : (g = (M * V - P * J) / Q, d = (F * J - L * V) / Q, new u(g, d));
695
+ }, s.angleOfVector = function(i, r, e, f) {
696
+ var n = void 0;
697
+ return i !== e ? (n = Math.atan((f - r) / (e - i)), e < i ? n += Math.PI : f < r && (n += this.TWO_PI)) : f < r ? n = this.ONE_AND_HALF_PI : n = this.HALF_PI, n;
698
+ }, s.doIntersect = function(i, r, e, f) {
699
+ var n = i.x, y = i.y, t = r.x, h = r.y, o = e.x, c = e.y, l = f.x, T = f.y, g = (t - n) * (T - c) - (l - o) * (h - y);
700
+ if (g === 0)
701
+ return !1;
702
+ var d = ((T - c) * (l - n) + (o - l) * (T - y)) / g, L = ((y - h) * (l - n) + (t - n) * (T - y)) / g;
703
+ return 0 < d && d < 1 && 0 < L && L < 1;
704
+ }, s.findCircleLineIntersections = function(i, r, e, f, n, y, t) {
705
+ var h = (e - i) * (e - i) + (f - r) * (f - r), o = 2 * ((i - n) * (e - i) + (r - y) * (f - r)), c = (i - n) * (i - n) + (r - y) * (r - y) - t * t, l = o * o - 4 * h * c;
706
+ if (l >= 0) {
707
+ var T = (-o + Math.sqrt(o * o - 4 * h * c)) / (2 * h), g = (-o - Math.sqrt(o * o - 4 * h * c)) / (2 * h), d = null;
708
+ return T >= 0 && T <= 1 ? [T] : g >= 0 && g <= 1 ? [g] : d;
709
+ } else return null;
710
+ }, s.HALF_PI = 0.5 * Math.PI, s.ONE_AND_HALF_PI = 1.5 * Math.PI, s.TWO_PI = 2 * Math.PI, s.THREE_PI = 3 * Math.PI, A.exports = s;
711
+ },
712
+ /* 9 */
713
+ /***/
714
+ function(A, G, N) {
715
+ function u() {
716
+ }
717
+ u.sign = function(s) {
718
+ return s > 0 ? 1 : s < 0 ? -1 : 0;
719
+ }, u.floor = function(s) {
720
+ return s < 0 ? Math.ceil(s) : Math.floor(s);
721
+ }, u.ceil = function(s) {
722
+ return s < 0 ? Math.floor(s) : Math.ceil(s);
723
+ }, A.exports = u;
724
+ },
725
+ /* 10 */
726
+ /***/
727
+ function(A, G, N) {
728
+ function u() {
729
+ }
730
+ u.MAX_VALUE = 2147483647, u.MIN_VALUE = -2147483648, A.exports = u;
731
+ },
732
+ /* 11 */
733
+ /***/
734
+ function(A, G, N) {
735
+ var u = /* @__PURE__ */ function() {
736
+ function n(y, t) {
737
+ for (var h = 0; h < t.length; h++) {
738
+ var o = t[h];
739
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(y, o.key, o);
740
+ }
741
+ }
742
+ return function(y, t, h) {
743
+ return t && n(y.prototype, t), h && n(y, h), y;
744
+ };
745
+ }();
746
+ function s(n, y) {
747
+ if (!(n instanceof y))
748
+ throw new TypeError("Cannot call a class as a function");
749
+ }
750
+ var i = function(y) {
751
+ return { value: y, next: null, prev: null };
752
+ }, r = function(y, t, h, o) {
753
+ return y !== null ? y.next = t : o.head = t, h !== null ? h.prev = t : o.tail = t, t.prev = y, t.next = h, o.length++, t;
754
+ }, e = function(y, t) {
755
+ var h = y.prev, o = y.next;
756
+ return h !== null ? h.next = o : t.head = o, o !== null ? o.prev = h : t.tail = h, y.prev = y.next = null, t.length--, y;
757
+ }, f = function() {
758
+ function n(y) {
759
+ var t = this;
760
+ s(this, n), this.length = 0, this.head = null, this.tail = null, y != null && y.forEach(function(h) {
761
+ return t.push(h);
762
+ });
763
+ }
764
+ return u(n, [{
765
+ key: "size",
766
+ value: function() {
767
+ return this.length;
768
+ }
769
+ }, {
770
+ key: "insertBefore",
771
+ value: function(t, h) {
772
+ return r(h.prev, i(t), h, this);
773
+ }
774
+ }, {
775
+ key: "insertAfter",
776
+ value: function(t, h) {
777
+ return r(h, i(t), h.next, this);
778
+ }
779
+ }, {
780
+ key: "insertNodeBefore",
781
+ value: function(t, h) {
782
+ return r(h.prev, t, h, this);
783
+ }
784
+ }, {
785
+ key: "insertNodeAfter",
786
+ value: function(t, h) {
787
+ return r(h, t, h.next, this);
788
+ }
789
+ }, {
790
+ key: "push",
791
+ value: function(t) {
792
+ return r(this.tail, i(t), null, this);
793
+ }
794
+ }, {
795
+ key: "unshift",
796
+ value: function(t) {
797
+ return r(null, i(t), this.head, this);
798
+ }
799
+ }, {
800
+ key: "remove",
801
+ value: function(t) {
802
+ return e(t, this);
803
+ }
804
+ }, {
805
+ key: "pop",
806
+ value: function() {
807
+ return e(this.tail, this).value;
808
+ }
809
+ }, {
810
+ key: "popNode",
811
+ value: function() {
812
+ return e(this.tail, this);
813
+ }
814
+ }, {
815
+ key: "shift",
816
+ value: function() {
817
+ return e(this.head, this).value;
818
+ }
819
+ }, {
820
+ key: "shiftNode",
821
+ value: function() {
822
+ return e(this.head, this);
823
+ }
824
+ }, {
825
+ key: "get_object_at",
826
+ value: function(t) {
827
+ if (t <= this.length()) {
828
+ for (var h = 1, o = this.head; h < t; )
829
+ o = o.next, h++;
830
+ return o.value;
831
+ }
832
+ }
833
+ }, {
834
+ key: "set_object_at",
835
+ value: function(t, h) {
836
+ if (t <= this.length()) {
837
+ for (var o = 1, c = this.head; o < t; )
838
+ c = c.next, o++;
839
+ c.value = h;
840
+ }
841
+ }
842
+ }]), n;
843
+ }();
844
+ A.exports = f;
845
+ },
846
+ /* 12 */
847
+ /***/
848
+ function(A, G, N) {
849
+ function u(s, i, r) {
850
+ this.x = null, this.y = null, s == null && i == null && r == null ? (this.x = 0, this.y = 0) : typeof s == "number" && typeof i == "number" && r == null ? (this.x = s, this.y = i) : s.constructor.name == "Point" && i == null && r == null && (r = s, this.x = r.x, this.y = r.y);
851
+ }
852
+ u.prototype.getX = function() {
853
+ return this.x;
854
+ }, u.prototype.getY = function() {
855
+ return this.y;
856
+ }, u.prototype.getLocation = function() {
857
+ return new u(this.x, this.y);
858
+ }, u.prototype.setLocation = function(s, i, r) {
859
+ s.constructor.name == "Point" && i == null && r == null ? (r = s, this.setLocation(r.x, r.y)) : typeof s == "number" && typeof i == "number" && r == null && (parseInt(s) == s && parseInt(i) == i ? this.move(s, i) : (this.x = Math.floor(s + 0.5), this.y = Math.floor(i + 0.5)));
860
+ }, u.prototype.move = function(s, i) {
861
+ this.x = s, this.y = i;
862
+ }, u.prototype.translate = function(s, i) {
863
+ this.x += s, this.y += i;
864
+ }, u.prototype.equals = function(s) {
865
+ if (s.constructor.name == "Point") {
866
+ var i = s;
867
+ return this.x == i.x && this.y == i.y;
868
+ }
869
+ return this == s;
870
+ }, u.prototype.toString = function() {
871
+ return new u().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
872
+ }, A.exports = u;
873
+ },
874
+ /* 13 */
875
+ /***/
876
+ function(A, G, N) {
877
+ function u(s, i, r, e) {
878
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, s != null && i != null && r != null && e != null && (this.x = s, this.y = i, this.width = r, this.height = e);
879
+ }
880
+ u.prototype.getX = function() {
881
+ return this.x;
882
+ }, u.prototype.setX = function(s) {
883
+ this.x = s;
884
+ }, u.prototype.getY = function() {
885
+ return this.y;
886
+ }, u.prototype.setY = function(s) {
887
+ this.y = s;
888
+ }, u.prototype.getWidth = function() {
889
+ return this.width;
890
+ }, u.prototype.setWidth = function(s) {
891
+ this.width = s;
892
+ }, u.prototype.getHeight = function() {
893
+ return this.height;
894
+ }, u.prototype.setHeight = function(s) {
895
+ this.height = s;
896
+ }, u.prototype.getRight = function() {
897
+ return this.x + this.width;
898
+ }, u.prototype.getBottom = function() {
899
+ return this.y + this.height;
900
+ }, u.prototype.intersects = function(s) {
901
+ return !(this.getRight() < s.x || this.getBottom() < s.y || s.getRight() < this.x || s.getBottom() < this.y);
902
+ }, u.prototype.getCenterX = function() {
903
+ return this.x + this.width / 2;
904
+ }, u.prototype.getMinX = function() {
905
+ return this.getX();
906
+ }, u.prototype.getMaxX = function() {
907
+ return this.getX() + this.width;
908
+ }, u.prototype.getCenterY = function() {
909
+ return this.y + this.height / 2;
910
+ }, u.prototype.getMinY = function() {
911
+ return this.getY();
912
+ }, u.prototype.getMaxY = function() {
913
+ return this.getY() + this.height;
914
+ }, u.prototype.getWidthHalf = function() {
915
+ return this.width / 2;
916
+ }, u.prototype.getHeightHalf = function() {
917
+ return this.height / 2;
918
+ }, A.exports = u;
919
+ },
920
+ /* 14 */
921
+ /***/
922
+ function(A, G, N) {
923
+ var u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
924
+ return typeof i;
925
+ } : function(i) {
926
+ return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
927
+ };
928
+ function s() {
929
+ }
930
+ s.lastID = 0, s.createID = function(i) {
931
+ return s.isPrimitive(i) ? i : (i.uniqueID != null || (i.uniqueID = s.getString(), s.lastID++), i.uniqueID);
932
+ }, s.getString = function(i) {
933
+ return i == null && (i = s.lastID), "Object#" + i;
934
+ }, s.isPrimitive = function(i) {
935
+ var r = typeof i > "u" ? "undefined" : u(i);
936
+ return i == null || r != "object" && r != "function";
937
+ }, A.exports = s;
938
+ },
939
+ /* 15 */
940
+ /***/
941
+ function(A, G, N) {
942
+ function u(o) {
943
+ if (Array.isArray(o)) {
944
+ for (var c = 0, l = Array(o.length); c < o.length; c++)
945
+ l[c] = o[c];
946
+ return l;
947
+ } else
948
+ return Array.from(o);
949
+ }
950
+ var s = N(0), i = N(7), r = N(3), e = N(1), f = N(6), n = N(5), y = N(17), t = N(29);
951
+ function h(o) {
952
+ t.call(this), this.layoutQuality = s.QUALITY, this.createBendsAsNeeded = s.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = s.DEFAULT_INCREMENTAL, this.animationOnLayout = s.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = s.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = s.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = s.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new i(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, o != null && (this.isRemoteUse = o);
953
+ }
954
+ h.RANDOM_SEED = 1, h.prototype = Object.create(t.prototype), h.prototype.getGraphManager = function() {
955
+ return this.graphManager;
956
+ }, h.prototype.getAllNodes = function() {
957
+ return this.graphManager.getAllNodes();
958
+ }, h.prototype.getAllEdges = function() {
959
+ return this.graphManager.getAllEdges();
960
+ }, h.prototype.getAllNodesToApplyGravitation = function() {
961
+ return this.graphManager.getAllNodesToApplyGravitation();
962
+ }, h.prototype.newGraphManager = function() {
963
+ var o = new i(this);
964
+ return this.graphManager = o, o;
965
+ }, h.prototype.newGraph = function(o) {
966
+ return new f(null, this.graphManager, o);
967
+ }, h.prototype.newNode = function(o) {
968
+ return new r(this.graphManager, o);
969
+ }, h.prototype.newEdge = function(o) {
970
+ return new e(null, null, o);
971
+ }, h.prototype.checkLayoutSuccess = function() {
972
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
973
+ }, h.prototype.runLayout = function() {
974
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
975
+ var o;
976
+ return this.checkLayoutSuccess() ? o = !1 : o = this.layout(), s.ANIMATE === "during" ? !1 : (o && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, o);
977
+ }, h.prototype.doPostLayout = function() {
978
+ this.incremental || this.transform(), this.update();
979
+ }, h.prototype.update2 = function() {
980
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
981
+ for (var o = this.graphManager.getAllEdges(), c = 0; c < o.length; c++)
982
+ o[c];
983
+ for (var l = this.graphManager.getRoot().getNodes(), c = 0; c < l.length; c++)
984
+ l[c];
985
+ this.update(this.graphManager.getRoot());
986
+ }
987
+ }, h.prototype.update = function(o) {
988
+ if (o == null)
989
+ this.update2();
990
+ else if (o instanceof r) {
991
+ var c = o;
992
+ if (c.getChild() != null)
993
+ for (var l = c.getChild().getNodes(), T = 0; T < l.length; T++)
994
+ update(l[T]);
995
+ if (c.vGraphObject != null) {
996
+ var g = c.vGraphObject;
997
+ g.update(c);
998
+ }
999
+ } else if (o instanceof e) {
1000
+ var d = o;
1001
+ if (d.vGraphObject != null) {
1002
+ var L = d.vGraphObject;
1003
+ L.update(d);
1004
+ }
1005
+ } else if (o instanceof f) {
1006
+ var F = o;
1007
+ if (F.vGraphObject != null) {
1008
+ var M = F.vGraphObject;
1009
+ M.update(F);
1010
+ }
1011
+ }
1012
+ }, h.prototype.initParameters = function() {
1013
+ this.isSubLayout || (this.layoutQuality = s.QUALITY, this.animationDuringLayout = s.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = s.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = s.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = s.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = s.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = s.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1014
+ }, h.prototype.transform = function(o) {
1015
+ if (o == null)
1016
+ this.transform(new n(0, 0));
1017
+ else {
1018
+ var c = new y(), l = this.graphManager.getRoot().updateLeftTop();
1019
+ if (l != null) {
1020
+ c.setWorldOrgX(o.x), c.setWorldOrgY(o.y), c.setDeviceOrgX(l.x), c.setDeviceOrgY(l.y);
1021
+ for (var T = this.getAllNodes(), g, d = 0; d < T.length; d++)
1022
+ g = T[d], g.transform(c);
1023
+ }
1024
+ }
1025
+ }, h.prototype.positionNodesRandomly = function(o) {
1026
+ if (o == null)
1027
+ this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1028
+ else
1029
+ for (var c, l, T = o.getNodes(), g = 0; g < T.length; g++)
1030
+ c = T[g], l = c.getChild(), l == null || l.getNodes().length == 0 ? c.scatter() : (this.positionNodesRandomly(l), c.updateBounds());
1031
+ }, h.prototype.getFlatForest = function() {
1032
+ for (var o = [], c = !0, l = this.graphManager.getRoot().getNodes(), T = !0, g = 0; g < l.length; g++)
1033
+ l[g].getChild() != null && (T = !1);
1034
+ if (!T)
1035
+ return o;
1036
+ var d = /* @__PURE__ */ new Set(), L = [], F = /* @__PURE__ */ new Map(), M = [];
1037
+ for (M = M.concat(l); M.length > 0 && c; ) {
1038
+ for (L.push(M[0]); L.length > 0 && c; ) {
1039
+ var P = L[0];
1040
+ L.splice(0, 1), d.add(P);
1041
+ for (var J = P.getEdges(), g = 0; g < J.length; g++) {
1042
+ var V = J[g].getOtherEnd(P);
1043
+ if (F.get(P) != V)
1044
+ if (!d.has(V))
1045
+ L.push(V), F.set(V, P);
1046
+ else {
1047
+ c = !1;
1048
+ break;
1049
+ }
1050
+ }
1051
+ }
1052
+ if (!c)
1053
+ o = [];
1054
+ else {
1055
+ var Q = [].concat(u(d));
1056
+ o.push(Q);
1057
+ for (var g = 0; g < Q.length; g++) {
1058
+ var D = Q[g], rt = M.indexOf(D);
1059
+ rt > -1 && M.splice(rt, 1);
1060
+ }
1061
+ d = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ new Map();
1062
+ }
1063
+ }
1064
+ return o;
1065
+ }, h.prototype.createDummyNodesForBendpoints = function(o) {
1066
+ for (var c = [], l = o.source, T = this.graphManager.calcLowestCommonAncestor(o.source, o.target), g = 0; g < o.bendpoints.length; g++) {
1067
+ var d = this.newNode(null);
1068
+ d.setRect(new Point(0, 0), new Dimension(1, 1)), T.add(d);
1069
+ var L = this.newEdge(null);
1070
+ this.graphManager.add(L, l, d), c.add(d), l = d;
1071
+ }
1072
+ var L = this.newEdge(null);
1073
+ return this.graphManager.add(L, l, o.target), this.edgeToDummyNodes.set(o, c), o.isInterGraph() ? this.graphManager.remove(o) : T.remove(o), c;
1074
+ }, h.prototype.createBendpointsFromDummyNodes = function() {
1075
+ var o = [];
1076
+ o = o.concat(this.graphManager.getAllEdges()), o = [].concat(u(this.edgeToDummyNodes.keys())).concat(o);
1077
+ for (var c = 0; c < o.length; c++) {
1078
+ var l = o[c];
1079
+ if (l.bendpoints.length > 0) {
1080
+ for (var T = this.edgeToDummyNodes.get(l), g = 0; g < T.length; g++) {
1081
+ var d = T[g], L = new n(d.getCenterX(), d.getCenterY()), F = l.bendpoints.get(g);
1082
+ F.x = L.x, F.y = L.y, d.getOwner().remove(d);
1083
+ }
1084
+ this.graphManager.add(l, l.source, l.target);
1085
+ }
1086
+ }
1087
+ }, h.transform = function(o, c, l, T) {
1088
+ if (l != null && T != null) {
1089
+ var g = c;
1090
+ if (o <= 50) {
1091
+ var d = c / l;
1092
+ g -= (c - d) / 50 * (50 - o);
1093
+ } else {
1094
+ var L = c * T;
1095
+ g += (L - c) / 50 * (o - 50);
1096
+ }
1097
+ return g;
1098
+ } else {
1099
+ var F, M;
1100
+ return o <= 50 ? (F = 9 * c / 500, M = c / 10) : (F = 9 * c / 50, M = -8 * c), F * o + M;
1101
+ }
1102
+ }, h.findCenterOfTree = function(o) {
1103
+ var c = [];
1104
+ c = c.concat(o);
1105
+ var l = [], T = /* @__PURE__ */ new Map(), g = !1, d = null;
1106
+ (c.length == 1 || c.length == 2) && (g = !0, d = c[0]);
1107
+ for (var L = 0; L < c.length; L++) {
1108
+ var F = c[L], M = F.getNeighborsList().size;
1109
+ T.set(F, F.getNeighborsList().size), M == 1 && l.push(F);
1110
+ }
1111
+ var P = [];
1112
+ for (P = P.concat(l); !g; ) {
1113
+ var J = [];
1114
+ J = J.concat(P), P = [];
1115
+ for (var L = 0; L < c.length; L++) {
1116
+ var F = c[L], V = c.indexOf(F);
1117
+ V >= 0 && c.splice(V, 1);
1118
+ var Q = F.getNeighborsList();
1119
+ Q.forEach(function(a) {
1120
+ if (l.indexOf(a) < 0) {
1121
+ var m = T.get(a), v = m - 1;
1122
+ v == 1 && P.push(a), T.set(a, v);
1123
+ }
1124
+ });
1125
+ }
1126
+ l = l.concat(P), (c.length == 1 || c.length == 2) && (g = !0, d = c[0]);
1127
+ }
1128
+ return d;
1129
+ }, h.prototype.setGraphManager = function(o) {
1130
+ this.graphManager = o;
1131
+ }, A.exports = h;
1132
+ },
1133
+ /* 16 */
1134
+ /***/
1135
+ function(A, G, N) {
1136
+ function u() {
1137
+ }
1138
+ u.seed = 1, u.x = 0, u.nextDouble = function() {
1139
+ return u.x = Math.sin(u.seed++) * 1e4, u.x - Math.floor(u.x);
1140
+ }, A.exports = u;
1141
+ },
1142
+ /* 17 */
1143
+ /***/
1144
+ function(A, G, N) {
1145
+ var u = N(5);
1146
+ function s(i, r) {
1147
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1148
+ }
1149
+ s.prototype.getWorldOrgX = function() {
1150
+ return this.lworldOrgX;
1151
+ }, s.prototype.setWorldOrgX = function(i) {
1152
+ this.lworldOrgX = i;
1153
+ }, s.prototype.getWorldOrgY = function() {
1154
+ return this.lworldOrgY;
1155
+ }, s.prototype.setWorldOrgY = function(i) {
1156
+ this.lworldOrgY = i;
1157
+ }, s.prototype.getWorldExtX = function() {
1158
+ return this.lworldExtX;
1159
+ }, s.prototype.setWorldExtX = function(i) {
1160
+ this.lworldExtX = i;
1161
+ }, s.prototype.getWorldExtY = function() {
1162
+ return this.lworldExtY;
1163
+ }, s.prototype.setWorldExtY = function(i) {
1164
+ this.lworldExtY = i;
1165
+ }, s.prototype.getDeviceOrgX = function() {
1166
+ return this.ldeviceOrgX;
1167
+ }, s.prototype.setDeviceOrgX = function(i) {
1168
+ this.ldeviceOrgX = i;
1169
+ }, s.prototype.getDeviceOrgY = function() {
1170
+ return this.ldeviceOrgY;
1171
+ }, s.prototype.setDeviceOrgY = function(i) {
1172
+ this.ldeviceOrgY = i;
1173
+ }, s.prototype.getDeviceExtX = function() {
1174
+ return this.ldeviceExtX;
1175
+ }, s.prototype.setDeviceExtX = function(i) {
1176
+ this.ldeviceExtX = i;
1177
+ }, s.prototype.getDeviceExtY = function() {
1178
+ return this.ldeviceExtY;
1179
+ }, s.prototype.setDeviceExtY = function(i) {
1180
+ this.ldeviceExtY = i;
1181
+ }, s.prototype.transformX = function(i) {
1182
+ var r = 0, e = this.lworldExtX;
1183
+ return e != 0 && (r = this.ldeviceOrgX + (i - this.lworldOrgX) * this.ldeviceExtX / e), r;
1184
+ }, s.prototype.transformY = function(i) {
1185
+ var r = 0, e = this.lworldExtY;
1186
+ return e != 0 && (r = this.ldeviceOrgY + (i - this.lworldOrgY) * this.ldeviceExtY / e), r;
1187
+ }, s.prototype.inverseTransformX = function(i) {
1188
+ var r = 0, e = this.ldeviceExtX;
1189
+ return e != 0 && (r = this.lworldOrgX + (i - this.ldeviceOrgX) * this.lworldExtX / e), r;
1190
+ }, s.prototype.inverseTransformY = function(i) {
1191
+ var r = 0, e = this.ldeviceExtY;
1192
+ return e != 0 && (r = this.lworldOrgY + (i - this.ldeviceOrgY) * this.lworldExtY / e), r;
1193
+ }, s.prototype.inverseTransformPoint = function(i) {
1194
+ var r = new u(this.inverseTransformX(i.x), this.inverseTransformY(i.y));
1195
+ return r;
1196
+ }, A.exports = s;
1197
+ },
1198
+ /* 18 */
1199
+ /***/
1200
+ function(A, G, N) {
1201
+ function u(t) {
1202
+ if (Array.isArray(t)) {
1203
+ for (var h = 0, o = Array(t.length); h < t.length; h++)
1204
+ o[h] = t[h];
1205
+ return o;
1206
+ } else
1207
+ return Array.from(t);
1208
+ }
1209
+ var s = N(15), i = N(4), r = N(0), e = N(8), f = N(9);
1210
+ function n() {
1211
+ s.call(this), this.useSmartIdealEdgeLengthCalculation = i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = i.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = i.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = i.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * i.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = i.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = i.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = i.MAX_ITERATIONS;
1212
+ }
1213
+ n.prototype = Object.create(s.prototype);
1214
+ for (var y in s)
1215
+ n[y] = s[y];
1216
+ n.prototype.initParameters = function() {
1217
+ s.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1218
+ }, n.prototype.calcIdealEdgeLengths = function() {
1219
+ for (var t, h, o, c, l, T, g, d = this.getGraphManager().getAllEdges(), L = 0; L < d.length; L++)
1220
+ t = d[L], h = t.idealLength, t.isInterGraph && (c = t.getSource(), l = t.getTarget(), T = t.getSourceInLca().getEstimatedSize(), g = t.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (t.idealLength += T + g - 2 * r.SIMPLE_NODE_SIZE), o = t.getLca().getInclusionTreeDepth(), t.idealLength += h * i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (c.getInclusionTreeDepth() + l.getInclusionTreeDepth() - 2 * o));
1221
+ }, n.prototype.initSpringEmbedder = function() {
1222
+ var t = this.getAllNodes().length;
1223
+ this.incremental ? (t > i.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * i.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (t - i.ADAPTATION_LOWER_NODE_LIMIT) / (i.ADAPTATION_UPPER_NODE_LIMIT - i.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - i.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = i.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (t > i.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(i.COOLING_ADAPTATION_FACTOR, 1 - (t - i.ADAPTATION_LOWER_NODE_LIMIT) / (i.ADAPTATION_UPPER_NODE_LIMIT - i.ADAPTATION_LOWER_NODE_LIMIT) * (1 - i.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = i.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * i.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1224
+ }, n.prototype.calcSpringForces = function() {
1225
+ for (var t = this.getAllEdges(), h, o = 0; o < t.length; o++)
1226
+ h = t[o], this.calcSpringForce(h, h.idealLength);
1227
+ }, n.prototype.calcRepulsionForces = function() {
1228
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, o, c, l, T, g = this.getAllNodes(), d;
1229
+ if (this.useFRGridVariant)
1230
+ for (this.totalIterations % i.GRID_CALCULATION_CHECK_PERIOD == 1 && t && this.updateGrid(), d = /* @__PURE__ */ new Set(), o = 0; o < g.length; o++)
1231
+ l = g[o], this.calculateRepulsionForceOfANode(l, d, t, h), d.add(l);
1232
+ else
1233
+ for (o = 0; o < g.length; o++)
1234
+ for (l = g[o], c = o + 1; c < g.length; c++)
1235
+ T = g[c], l.getOwner() == T.getOwner() && this.calcRepulsionForce(l, T);
1236
+ }, n.prototype.calcGravitationalForces = function() {
1237
+ for (var t, h = this.getAllNodesToApplyGravitation(), o = 0; o < h.length; o++)
1238
+ t = h[o], this.calcGravitationalForce(t);
1239
+ }, n.prototype.moveNodes = function() {
1240
+ for (var t = this.getAllNodes(), h, o = 0; o < t.length; o++)
1241
+ h = t[o], h.move();
1242
+ }, n.prototype.calcSpringForce = function(t, h) {
1243
+ var o = t.getSource(), c = t.getTarget(), l, T, g, d;
1244
+ if (this.uniformLeafNodeSizes && o.getChild() == null && c.getChild() == null)
1245
+ t.updateLengthSimple();
1246
+ else if (t.updateLength(), t.isOverlapingSourceAndTarget)
1247
+ return;
1248
+ l = t.getLength(), l != 0 && (T = t.edgeElasticity * (l - h), g = T * (t.lengthX / l), d = T * (t.lengthY / l), o.springForceX += g, o.springForceY += d, c.springForceX -= g, c.springForceY -= d);
1249
+ }, n.prototype.calcRepulsionForce = function(t, h) {
1250
+ var o = t.getRect(), c = h.getRect(), l = new Array(2), T = new Array(4), g, d, L, F, M, P, J;
1251
+ if (o.intersects(c)) {
1252
+ e.calcSeparationAmount(o, c, l, i.DEFAULT_EDGE_LENGTH / 2), P = 2 * l[0], J = 2 * l[1];
1253
+ var V = t.noOfChildren * h.noOfChildren / (t.noOfChildren + h.noOfChildren);
1254
+ t.repulsionForceX -= V * P, t.repulsionForceY -= V * J, h.repulsionForceX += V * P, h.repulsionForceY += V * J;
1255
+ } else
1256
+ this.uniformLeafNodeSizes && t.getChild() == null && h.getChild() == null ? (g = c.getCenterX() - o.getCenterX(), d = c.getCenterY() - o.getCenterY()) : (e.getIntersection(o, c, T), g = T[2] - T[0], d = T[3] - T[1]), Math.abs(g) < i.MIN_REPULSION_DIST && (g = f.sign(g) * i.MIN_REPULSION_DIST), Math.abs(d) < i.MIN_REPULSION_DIST && (d = f.sign(d) * i.MIN_REPULSION_DIST), L = g * g + d * d, F = Math.sqrt(L), M = (t.nodeRepulsion / 2 + h.nodeRepulsion / 2) * t.noOfChildren * h.noOfChildren / L, P = M * g / F, J = M * d / F, t.repulsionForceX -= P, t.repulsionForceY -= J, h.repulsionForceX += P, h.repulsionForceY += J;
1257
+ }, n.prototype.calcGravitationalForce = function(t) {
1258
+ var h, o, c, l, T, g, d, L;
1259
+ h = t.getOwner(), o = (h.getRight() + h.getLeft()) / 2, c = (h.getTop() + h.getBottom()) / 2, l = t.getCenterX() - o, T = t.getCenterY() - c, g = Math.abs(l) + t.getWidth() / 2, d = Math.abs(T) + t.getHeight() / 2, t.getOwner() == this.graphManager.getRoot() ? (L = h.getEstimatedSize() * this.gravityRangeFactor, (g > L || d > L) && (t.gravitationForceX = -this.gravityConstant * l, t.gravitationForceY = -this.gravityConstant * T)) : (L = h.getEstimatedSize() * this.compoundGravityRangeFactor, (g > L || d > L) && (t.gravitationForceX = -this.gravityConstant * l * this.compoundGravityConstant, t.gravitationForceY = -this.gravityConstant * T * this.compoundGravityConstant));
1260
+ }, n.prototype.isConverged = function() {
1261
+ var t, h = !1;
1262
+ 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;
1263
+ }, n.prototype.animate = function() {
1264
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1265
+ }, n.prototype.calcNoOfChildrenForAllNodes = function() {
1266
+ for (var t, h = this.graphManager.getAllNodes(), o = 0; o < h.length; o++)
1267
+ t = h[o], t.noOfChildren = t.getNoOfChildren();
1268
+ }, n.prototype.calcGrid = function(t) {
1269
+ var h = 0, o = 0;
1270
+ h = parseInt(Math.ceil((t.getRight() - t.getLeft()) / this.repulsionRange)), o = parseInt(Math.ceil((t.getBottom() - t.getTop()) / this.repulsionRange));
1271
+ for (var c = new Array(h), l = 0; l < h; l++)
1272
+ c[l] = new Array(o);
1273
+ for (var l = 0; l < h; l++)
1274
+ for (var T = 0; T < o; T++)
1275
+ c[l][T] = new Array();
1276
+ return c;
1277
+ }, n.prototype.addNodeToGrid = function(t, h, o) {
1278
+ var c = 0, l = 0, T = 0, g = 0;
1279
+ c = parseInt(Math.floor((t.getRect().x - h) / this.repulsionRange)), l = parseInt(Math.floor((t.getRect().width + t.getRect().x - h) / this.repulsionRange)), T = parseInt(Math.floor((t.getRect().y - o) / this.repulsionRange)), g = parseInt(Math.floor((t.getRect().height + t.getRect().y - o) / this.repulsionRange));
1280
+ for (var d = c; d <= l; d++)
1281
+ for (var L = T; L <= g; L++)
1282
+ this.grid[d][L].push(t), t.setGridCoordinates(c, l, T, g);
1283
+ }, n.prototype.updateGrid = function() {
1284
+ var t, h, o = this.getAllNodes();
1285
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), t = 0; t < o.length; t++)
1286
+ h = o[t], this.addNodeToGrid(h, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1287
+ }, n.prototype.calculateRepulsionForceOfANode = function(t, h, o, c) {
1288
+ if (this.totalIterations % i.GRID_CALCULATION_CHECK_PERIOD == 1 && o || c) {
1289
+ var l = /* @__PURE__ */ new Set();
1290
+ t.surrounding = new Array();
1291
+ for (var T, g = this.grid, d = t.startX - 1; d < t.finishX + 2; d++)
1292
+ for (var L = t.startY - 1; L < t.finishY + 2; L++)
1293
+ if (!(d < 0 || L < 0 || d >= g.length || L >= g[0].length)) {
1294
+ for (var F = 0; F < g[d][L].length; F++)
1295
+ if (T = g[d][L][F], !(t.getOwner() != T.getOwner() || t == T) && !h.has(T) && !l.has(T)) {
1296
+ var M = Math.abs(t.getCenterX() - T.getCenterX()) - (t.getWidth() / 2 + T.getWidth() / 2), P = Math.abs(t.getCenterY() - T.getCenterY()) - (t.getHeight() / 2 + T.getHeight() / 2);
1297
+ M <= this.repulsionRange && P <= this.repulsionRange && l.add(T);
1298
+ }
1299
+ }
1300
+ t.surrounding = [].concat(u(l));
1301
+ }
1302
+ for (d = 0; d < t.surrounding.length; d++)
1303
+ this.calcRepulsionForce(t, t.surrounding[d]);
1304
+ }, n.prototype.calcRepulsionRange = function() {
1305
+ return 0;
1306
+ }, A.exports = n;
1307
+ },
1308
+ /* 19 */
1309
+ /***/
1310
+ function(A, G, N) {
1311
+ var u = N(1), s = N(4);
1312
+ function i(e, f, n) {
1313
+ u.call(this, e, f, n), this.idealLength = s.DEFAULT_EDGE_LENGTH, this.edgeElasticity = s.DEFAULT_SPRING_STRENGTH;
1314
+ }
1315
+ i.prototype = Object.create(u.prototype);
1316
+ for (var r in u)
1317
+ i[r] = u[r];
1318
+ A.exports = i;
1319
+ },
1320
+ /* 20 */
1321
+ /***/
1322
+ function(A, G, N) {
1323
+ var u = N(3), s = N(4);
1324
+ function i(e, f, n, y) {
1325
+ u.call(this, e, f, n, y), this.nodeRepulsion = s.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 = [];
1326
+ }
1327
+ i.prototype = Object.create(u.prototype);
1328
+ for (var r in u)
1329
+ i[r] = u[r];
1330
+ i.prototype.setGridCoordinates = function(e, f, n, y) {
1331
+ this.startX = e, this.finishX = f, this.startY = n, this.finishY = y;
1332
+ }, A.exports = i;
1333
+ },
1334
+ /* 21 */
1335
+ /***/
1336
+ function(A, G, N) {
1337
+ function u(s, i) {
1338
+ this.width = 0, this.height = 0, s !== null && i !== null && (this.height = i, this.width = s);
1339
+ }
1340
+ u.prototype.getWidth = function() {
1341
+ return this.width;
1342
+ }, u.prototype.setWidth = function(s) {
1343
+ this.width = s;
1344
+ }, u.prototype.getHeight = function() {
1345
+ return this.height;
1346
+ }, u.prototype.setHeight = function(s) {
1347
+ this.height = s;
1348
+ }, A.exports = u;
1349
+ },
1350
+ /* 22 */
1351
+ /***/
1352
+ function(A, G, N) {
1353
+ var u = N(14);
1354
+ function s() {
1355
+ this.map = {}, this.keys = [];
1356
+ }
1357
+ s.prototype.put = function(i, r) {
1358
+ var e = u.createID(i);
1359
+ this.contains(e) || (this.map[e] = r, this.keys.push(i));
1360
+ }, s.prototype.contains = function(i) {
1361
+ return u.createID(i), this.map[i] != null;
1362
+ }, s.prototype.get = function(i) {
1363
+ var r = u.createID(i);
1364
+ return this.map[r];
1365
+ }, s.prototype.keySet = function() {
1366
+ return this.keys;
1367
+ }, A.exports = s;
1368
+ },
1369
+ /* 23 */
1370
+ /***/
1371
+ function(A, G, N) {
1372
+ var u = N(14);
1373
+ function s() {
1374
+ this.set = {};
1375
+ }
1376
+ s.prototype.add = function(i) {
1377
+ var r = u.createID(i);
1378
+ this.contains(r) || (this.set[r] = i);
1379
+ }, s.prototype.remove = function(i) {
1380
+ delete this.set[u.createID(i)];
1381
+ }, s.prototype.clear = function() {
1382
+ this.set = {};
1383
+ }, s.prototype.contains = function(i) {
1384
+ return this.set[u.createID(i)] == i;
1385
+ }, s.prototype.isEmpty = function() {
1386
+ return this.size() === 0;
1387
+ }, s.prototype.size = function() {
1388
+ return Object.keys(this.set).length;
1389
+ }, s.prototype.addAllTo = function(i) {
1390
+ for (var r = Object.keys(this.set), e = r.length, f = 0; f < e; f++)
1391
+ i.push(this.set[r[f]]);
1392
+ }, s.prototype.size = function() {
1393
+ return Object.keys(this.set).length;
1394
+ }, s.prototype.addAll = function(i) {
1395
+ for (var r = i.length, e = 0; e < r; e++) {
1396
+ var f = i[e];
1397
+ this.add(f);
1398
+ }
1399
+ }, A.exports = s;
1400
+ },
1401
+ /* 24 */
1402
+ /***/
1403
+ function(A, G, N) {
1404
+ function u() {
1405
+ }
1406
+ u.multMat = function(s, i) {
1407
+ for (var r = [], e = 0; e < s.length; e++) {
1408
+ r[e] = [];
1409
+ for (var f = 0; f < i[0].length; f++) {
1410
+ r[e][f] = 0;
1411
+ for (var n = 0; n < s[0].length; n++)
1412
+ r[e][f] += s[e][n] * i[n][f];
1413
+ }
1414
+ }
1415
+ return r;
1416
+ }, u.transpose = function(s) {
1417
+ for (var i = [], r = 0; r < s[0].length; r++) {
1418
+ i[r] = [];
1419
+ for (var e = 0; e < s.length; e++)
1420
+ i[r][e] = s[e][r];
1421
+ }
1422
+ return i;
1423
+ }, u.multCons = function(s, i) {
1424
+ for (var r = [], e = 0; e < s.length; e++)
1425
+ r[e] = s[e] * i;
1426
+ return r;
1427
+ }, u.minusOp = function(s, i) {
1428
+ for (var r = [], e = 0; e < s.length; e++)
1429
+ r[e] = s[e] - i[e];
1430
+ return r;
1431
+ }, u.dotProduct = function(s, i) {
1432
+ for (var r = 0, e = 0; e < s.length; e++)
1433
+ r += s[e] * i[e];
1434
+ return r;
1435
+ }, u.mag = function(s) {
1436
+ return Math.sqrt(this.dotProduct(s, s));
1437
+ }, u.normalize = function(s) {
1438
+ for (var i = [], r = this.mag(s), e = 0; e < s.length; e++)
1439
+ i[e] = s[e] / r;
1440
+ return i;
1441
+ }, u.multGamma = function(s) {
1442
+ for (var i = [], r = 0, e = 0; e < s.length; e++)
1443
+ r += s[e];
1444
+ r *= -1 / s.length;
1445
+ for (var f = 0; f < s.length; f++)
1446
+ i[f] = r + s[f];
1447
+ return i;
1448
+ }, u.multL = function(s, i, r) {
1449
+ for (var e = [], f = [], n = [], y = 0; y < i[0].length; y++) {
1450
+ for (var t = 0, h = 0; h < i.length; h++)
1451
+ t += -0.5 * i[h][y] * s[h];
1452
+ f[y] = t;
1453
+ }
1454
+ for (var o = 0; o < r.length; o++) {
1455
+ for (var c = 0, l = 0; l < r.length; l++)
1456
+ c += r[o][l] * f[l];
1457
+ n[o] = c;
1458
+ }
1459
+ for (var T = 0; T < i.length; T++) {
1460
+ for (var g = 0, d = 0; d < i[0].length; d++)
1461
+ g += i[T][d] * n[d];
1462
+ e[T] = g;
1463
+ }
1464
+ return e;
1465
+ }, A.exports = u;
1466
+ },
1467
+ /* 25 */
1468
+ /***/
1469
+ function(A, G, N) {
1470
+ var u = /* @__PURE__ */ function() {
1471
+ function e(f, n) {
1472
+ for (var y = 0; y < n.length; y++) {
1473
+ var t = n[y];
1474
+ t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(f, t.key, t);
1475
+ }
1476
+ }
1477
+ return function(f, n, y) {
1478
+ return n && e(f.prototype, n), y && e(f, y), f;
1479
+ };
1480
+ }();
1481
+ function s(e, f) {
1482
+ if (!(e instanceof f))
1483
+ throw new TypeError("Cannot call a class as a function");
1484
+ }
1485
+ var i = N(11), r = function() {
1486
+ function e(f, n) {
1487
+ s(this, e), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1488
+ var y = void 0;
1489
+ f instanceof i ? y = f.size() : y = f.length, this._quicksort(f, 0, y - 1);
1490
+ }
1491
+ return u(e, [{
1492
+ key: "_quicksort",
1493
+ value: function(n, y, t) {
1494
+ if (y < t) {
1495
+ var h = this._partition(n, y, t);
1496
+ this._quicksort(n, y, h), this._quicksort(n, h + 1, t);
1497
+ }
1498
+ }
1499
+ }, {
1500
+ key: "_partition",
1501
+ value: function(n, y, t) {
1502
+ for (var h = this._get(n, y), o = y, c = t; ; ) {
1503
+ for (; this.compareFunction(h, this._get(n, c)); )
1504
+ c--;
1505
+ for (; this.compareFunction(this._get(n, o), h); )
1506
+ o++;
1507
+ if (o < c)
1508
+ this._swap(n, o, c), o++, c--;
1509
+ else return c;
1510
+ }
1511
+ }
1512
+ }, {
1513
+ key: "_get",
1514
+ value: function(n, y) {
1515
+ return n instanceof i ? n.get_object_at(y) : n[y];
1516
+ }
1517
+ }, {
1518
+ key: "_set",
1519
+ value: function(n, y, t) {
1520
+ n instanceof i ? n.set_object_at(y, t) : n[y] = t;
1521
+ }
1522
+ }, {
1523
+ key: "_swap",
1524
+ value: function(n, y, t) {
1525
+ var h = this._get(n, y);
1526
+ this._set(n, y, this._get(n, t)), this._set(n, t, h);
1527
+ }
1528
+ }, {
1529
+ key: "_defaultCompareFunction",
1530
+ value: function(n, y) {
1531
+ return y > n;
1532
+ }
1533
+ }]), e;
1534
+ }();
1535
+ A.exports = r;
1536
+ },
1537
+ /* 26 */
1538
+ /***/
1539
+ function(A, G, N) {
1540
+ function u() {
1541
+ }
1542
+ u.svd = function(s) {
1543
+ this.U = null, this.V = null, this.s = null, this.m = 0, this.n = 0, this.m = s.length, this.n = s[0].length;
1544
+ var i = Math.min(this.m, this.n);
1545
+ this.s = function(Nt) {
1546
+ for (var Mt = []; Nt-- > 0; )
1547
+ Mt.push(0);
1548
+ return Mt;
1549
+ }(Math.min(this.m + 1, this.n)), this.U = function(Nt) {
1550
+ var Mt = function Zt(Gt) {
1551
+ if (Gt.length == 0)
1552
+ return 0;
1553
+ for (var $t = [], Ft = 0; Ft < Gt[0]; Ft++)
1554
+ $t.push(Zt(Gt.slice(1)));
1555
+ return $t;
1556
+ };
1557
+ return Mt(Nt);
1558
+ }([this.m, i]), this.V = function(Nt) {
1559
+ var Mt = function Zt(Gt) {
1560
+ if (Gt.length == 0)
1561
+ return 0;
1562
+ for (var $t = [], Ft = 0; Ft < Gt[0]; Ft++)
1563
+ $t.push(Zt(Gt.slice(1)));
1564
+ return $t;
1565
+ };
1566
+ return Mt(Nt);
1567
+ }([this.n, this.n]);
1568
+ for (var r = function(Nt) {
1569
+ for (var Mt = []; Nt-- > 0; )
1570
+ Mt.push(0);
1571
+ return Mt;
1572
+ }(this.n), e = function(Nt) {
1573
+ for (var Mt = []; Nt-- > 0; )
1574
+ Mt.push(0);
1575
+ return Mt;
1576
+ }(this.m), f = !0, n = Math.min(this.m - 1, this.n), y = Math.max(0, Math.min(this.n - 2, this.m)), t = 0; t < Math.max(n, y); t++) {
1577
+ if (t < n) {
1578
+ this.s[t] = 0;
1579
+ for (var h = t; h < this.m; h++)
1580
+ this.s[t] = u.hypot(this.s[t], s[h][t]);
1581
+ if (this.s[t] !== 0) {
1582
+ s[t][t] < 0 && (this.s[t] = -this.s[t]);
1583
+ for (var o = t; o < this.m; o++)
1584
+ s[o][t] /= this.s[t];
1585
+ s[t][t] += 1;
1586
+ }
1587
+ this.s[t] = -this.s[t];
1588
+ }
1589
+ for (var c = t + 1; c < this.n; c++) {
1590
+ if (/* @__PURE__ */ function(Nt, Mt) {
1591
+ return Nt && Mt;
1592
+ }(t < n, this.s[t] !== 0)) {
1593
+ for (var l = 0, T = t; T < this.m; T++)
1594
+ l += s[T][t] * s[T][c];
1595
+ l = -l / s[t][t];
1596
+ for (var g = t; g < this.m; g++)
1597
+ s[g][c] += l * s[g][t];
1598
+ }
1599
+ r[c] = s[t][c];
1600
+ }
1601
+ if (/* @__PURE__ */ function(Nt, Mt) {
1602
+ return Mt;
1603
+ }(f, t < n))
1604
+ for (var d = t; d < this.m; d++)
1605
+ this.U[d][t] = s[d][t];
1606
+ if (t < y) {
1607
+ r[t] = 0;
1608
+ for (var L = t + 1; L < this.n; L++)
1609
+ r[t] = u.hypot(r[t], r[L]);
1610
+ if (r[t] !== 0) {
1611
+ r[t + 1] < 0 && (r[t] = -r[t]);
1612
+ for (var F = t + 1; F < this.n; F++)
1613
+ r[F] /= r[t];
1614
+ r[t + 1] += 1;
1615
+ }
1616
+ if (r[t] = -r[t], /* @__PURE__ */ function(Nt, Mt) {
1617
+ return Nt && Mt;
1618
+ }(t + 1 < this.m, r[t] !== 0)) {
1619
+ for (var M = t + 1; M < this.m; M++)
1620
+ e[M] = 0;
1621
+ for (var P = t + 1; P < this.n; P++)
1622
+ for (var J = t + 1; J < this.m; J++)
1623
+ e[J] += r[P] * s[J][P];
1624
+ for (var V = t + 1; V < this.n; V++)
1625
+ for (var Q = -r[V] / r[t + 1], D = t + 1; D < this.m; D++)
1626
+ s[D][V] += Q * e[D];
1627
+ }
1628
+ for (var rt = t + 1; rt < this.n; rt++)
1629
+ this.V[rt][t] = r[rt];
1630
+ }
1631
+ }
1632
+ var a = Math.min(this.n, this.m + 1);
1633
+ n < this.n && (this.s[n] = s[n][n]), this.m < a && (this.s[a - 1] = 0), y + 1 < a && (r[y] = s[y][a - 1]), r[a - 1] = 0;
1634
+ {
1635
+ for (var m = n; m < i; m++) {
1636
+ for (var v = 0; v < this.m; v++)
1637
+ this.U[v][m] = 0;
1638
+ this.U[m][m] = 1;
1639
+ }
1640
+ for (var E = n - 1; E >= 0; E--)
1641
+ if (this.s[E] !== 0) {
1642
+ for (var p = E + 1; p < i; p++) {
1643
+ for (var I = 0, w = E; w < this.m; w++)
1644
+ I += this.U[w][E] * this.U[w][p];
1645
+ I = -I / this.U[E][E];
1646
+ for (var R = E; R < this.m; R++)
1647
+ this.U[R][p] += I * this.U[R][E];
1648
+ }
1649
+ for (var H = E; H < this.m; H++)
1650
+ this.U[H][E] = -this.U[H][E];
1651
+ this.U[E][E] = 1 + this.U[E][E];
1652
+ for (var x = 0; x < E - 1; x++)
1653
+ this.U[x][E] = 0;
1654
+ } else {
1655
+ for (var k = 0; k < this.m; k++)
1656
+ this.U[k][E] = 0;
1657
+ this.U[E][E] = 1;
1658
+ }
1659
+ }
1660
+ for (var W = this.n - 1; W >= 0; W--) {
1661
+ if (/* @__PURE__ */ function(Nt, Mt) {
1662
+ return Nt && Mt;
1663
+ }(W < y, r[W] !== 0))
1664
+ for (var U = W + 1; U < i; U++) {
1665
+ for (var et = 0, z = W + 1; z < this.n; z++)
1666
+ et += this.V[z][W] * this.V[z][U];
1667
+ et = -et / this.V[W + 1][W];
1668
+ for (var O = W + 1; O < this.n; O++)
1669
+ this.V[O][U] += et * this.V[O][W];
1670
+ }
1671
+ for (var X = 0; X < this.n; X++)
1672
+ this.V[X][W] = 0;
1673
+ this.V[W][W] = 1;
1674
+ }
1675
+ for (var B = a - 1, _ = Math.pow(2, -52), lt = Math.pow(2, -966); a > 0; ) {
1676
+ var q = void 0, Rt = void 0;
1677
+ for (q = a - 2; q >= -1 && q !== -1; q--)
1678
+ if (Math.abs(r[q]) <= lt + _ * (Math.abs(this.s[q]) + Math.abs(this.s[q + 1]))) {
1679
+ r[q] = 0;
1680
+ break;
1681
+ }
1682
+ if (q === a - 2)
1683
+ Rt = 4;
1684
+ else {
1685
+ var Lt = void 0;
1686
+ for (Lt = a - 1; Lt >= q && Lt !== q; Lt--) {
1687
+ var vt = (Lt !== a ? Math.abs(r[Lt]) : 0) + (Lt !== q + 1 ? Math.abs(r[Lt - 1]) : 0);
1688
+ if (Math.abs(this.s[Lt]) <= lt + _ * vt) {
1689
+ this.s[Lt] = 0;
1690
+ break;
1691
+ }
1692
+ }
1693
+ Lt === q ? Rt = 3 : Lt === a - 1 ? Rt = 1 : (Rt = 2, q = Lt);
1694
+ }
1695
+ switch (q++, Rt) {
1696
+ case 1:
1697
+ {
1698
+ var it = r[a - 2];
1699
+ r[a - 2] = 0;
1700
+ for (var gt = a - 2; gt >= q; gt--) {
1701
+ var Tt = u.hypot(this.s[gt], it), At = this.s[gt] / Tt, Dt = it / Tt;
1702
+ this.s[gt] = Tt, gt !== q && (it = -Dt * r[gt - 1], r[gt - 1] = At * r[gt - 1]);
1703
+ for (var mt = 0; mt < this.n; mt++)
1704
+ Tt = At * this.V[mt][gt] + Dt * this.V[mt][a - 1], this.V[mt][a - 1] = -Dt * this.V[mt][gt] + At * this.V[mt][a - 1], this.V[mt][gt] = Tt;
1705
+ }
1706
+ }
1707
+ break;
1708
+ case 2:
1709
+ {
1710
+ var xt = r[q - 1];
1711
+ r[q - 1] = 0;
1712
+ for (var St = q; St < a; St++) {
1713
+ var Vt = u.hypot(this.s[St], xt), Xt = this.s[St] / Vt, Ut = xt / Vt;
1714
+ this.s[St] = Vt, xt = -Ut * r[St], r[St] = Xt * r[St];
1715
+ for (var bt = 0; bt < this.m; bt++)
1716
+ Vt = Xt * this.U[bt][St] + Ut * this.U[bt][q - 1], this.U[bt][q - 1] = -Ut * this.U[bt][St] + Xt * this.U[bt][q - 1], this.U[bt][St] = Vt;
1717
+ }
1718
+ }
1719
+ break;
1720
+ case 3:
1721
+ {
1722
+ var Ht = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[a - 1]), Math.abs(this.s[a - 2])), Math.abs(r[a - 2])), Math.abs(this.s[q])), Math.abs(r[q])), Bt = this.s[a - 1] / Ht, S = this.s[a - 2] / Ht, b = r[a - 2] / Ht, $ = this.s[q] / Ht, K = r[q] / Ht, Z = ((S + Bt) * (S - Bt) + b * b) / 2, nt = Bt * b * (Bt * b), ut = 0;
1723
+ /* @__PURE__ */ (function(Nt, Mt) {
1724
+ return Nt || Mt;
1725
+ })(Z !== 0, nt !== 0) && (ut = Math.sqrt(Z * Z + nt), Z < 0 && (ut = -ut), ut = nt / (Z + ut));
1726
+ for (var ot = ($ + Bt) * ($ - Bt) + ut, tt = $ * K, j = q; j < a - 1; j++) {
1727
+ var dt = u.hypot(ot, tt), wt = ot / dt, yt = tt / dt;
1728
+ j !== q && (r[j - 1] = dt), ot = wt * this.s[j] + yt * r[j], r[j] = wt * r[j] - yt * this.s[j], tt = yt * this.s[j + 1], this.s[j + 1] = wt * this.s[j + 1];
1729
+ for (var It = 0; It < this.n; It++)
1730
+ dt = wt * this.V[It][j] + yt * this.V[It][j + 1], this.V[It][j + 1] = -yt * this.V[It][j] + wt * this.V[It][j + 1], this.V[It][j] = dt;
1731
+ if (dt = u.hypot(ot, tt), wt = ot / dt, yt = tt / dt, this.s[j] = dt, ot = wt * r[j] + yt * this.s[j + 1], this.s[j + 1] = -yt * r[j] + wt * this.s[j + 1], tt = yt * r[j + 1], r[j + 1] = wt * r[j + 1], j < this.m - 1)
1732
+ for (var ft = 0; ft < this.m; ft++)
1733
+ dt = wt * this.U[ft][j] + yt * this.U[ft][j + 1], this.U[ft][j + 1] = -yt * this.U[ft][j] + wt * this.U[ft][j + 1], this.U[ft][j] = dt;
1734
+ }
1735
+ r[a - 2] = ot;
1736
+ }
1737
+ break;
1738
+ case 4:
1739
+ {
1740
+ if (this.s[q] <= 0) {
1741
+ this.s[q] = this.s[q] < 0 ? -this.s[q] : 0;
1742
+ for (var st = 0; st <= B; st++)
1743
+ this.V[st][q] = -this.V[st][q];
1744
+ }
1745
+ for (; q < B && !(this.s[q] >= this.s[q + 1]); ) {
1746
+ var Ct = this.s[q];
1747
+ if (this.s[q] = this.s[q + 1], this.s[q + 1] = Ct, q < this.n - 1)
1748
+ for (var ct = 0; ct < this.n; ct++)
1749
+ Ct = this.V[ct][q + 1], this.V[ct][q + 1] = this.V[ct][q], this.V[ct][q] = Ct;
1750
+ if (q < this.m - 1)
1751
+ for (var ht = 0; ht < this.m; ht++)
1752
+ Ct = this.U[ht][q + 1], this.U[ht][q + 1] = this.U[ht][q], this.U[ht][q] = Ct;
1753
+ q++;
1754
+ }
1755
+ a--;
1756
+ }
1757
+ break;
1758
+ }
1759
+ }
1760
+ var Wt = { U: this.U, V: this.V, S: this.s };
1761
+ return Wt;
1762
+ }, u.hypot = function(s, i) {
1763
+ var r = void 0;
1764
+ return Math.abs(s) > Math.abs(i) ? (r = i / s, r = Math.abs(s) * Math.sqrt(1 + r * r)) : i != 0 ? (r = s / i, r = Math.abs(i) * Math.sqrt(1 + r * r)) : r = 0, r;
1765
+ }, A.exports = u;
1766
+ },
1767
+ /* 27 */
1768
+ /***/
1769
+ function(A, G, N) {
1770
+ var u = /* @__PURE__ */ function() {
1771
+ function r(e, f) {
1772
+ for (var n = 0; n < f.length; n++) {
1773
+ var y = f[n];
1774
+ y.enumerable = y.enumerable || !1, y.configurable = !0, "value" in y && (y.writable = !0), Object.defineProperty(e, y.key, y);
1775
+ }
1776
+ }
1777
+ return function(e, f, n) {
1778
+ return f && r(e.prototype, f), n && r(e, n), e;
1779
+ };
1780
+ }();
1781
+ function s(r, e) {
1782
+ if (!(r instanceof e))
1783
+ throw new TypeError("Cannot call a class as a function");
1784
+ }
1785
+ var i = function() {
1786
+ function r(e, f) {
1787
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, y = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, t = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1788
+ s(this, r), this.sequence1 = e, this.sequence2 = f, this.match_score = n, this.mismatch_penalty = y, this.gap_penalty = t, this.iMax = e.length + 1, this.jMax = f.length + 1, this.grid = new Array(this.iMax);
1789
+ for (var h = 0; h < this.iMax; h++) {
1790
+ this.grid[h] = new Array(this.jMax);
1791
+ for (var o = 0; o < this.jMax; o++)
1792
+ this.grid[h][o] = 0;
1793
+ }
1794
+ this.tracebackGrid = new Array(this.iMax);
1795
+ for (var c = 0; c < this.iMax; c++) {
1796
+ this.tracebackGrid[c] = new Array(this.jMax);
1797
+ for (var l = 0; l < this.jMax; l++)
1798
+ this.tracebackGrid[c][l] = [null, null, null];
1799
+ }
1800
+ this.alignments = [], this.score = -1, this.computeGrids();
1801
+ }
1802
+ return u(r, [{
1803
+ key: "getScore",
1804
+ value: function() {
1805
+ return this.score;
1806
+ }
1807
+ }, {
1808
+ key: "getAlignments",
1809
+ value: function() {
1810
+ return this.alignments;
1811
+ }
1812
+ // Main dynamic programming procedure
1813
+ }, {
1814
+ key: "computeGrids",
1815
+ value: function() {
1816
+ for (var f = 1; f < this.jMax; f++)
1817
+ this.grid[0][f] = this.grid[0][f - 1] + this.gap_penalty, this.tracebackGrid[0][f] = [!1, !1, !0];
1818
+ for (var n = 1; n < this.iMax; n++)
1819
+ this.grid[n][0] = this.grid[n - 1][0] + this.gap_penalty, this.tracebackGrid[n][0] = [!1, !0, !1];
1820
+ for (var y = 1; y < this.iMax; y++)
1821
+ for (var t = 1; t < this.jMax; t++) {
1822
+ var h = void 0;
1823
+ this.sequence1[y - 1] === this.sequence2[t - 1] ? h = this.grid[y - 1][t - 1] + this.match_score : h = this.grid[y - 1][t - 1] + this.mismatch_penalty;
1824
+ var o = this.grid[y - 1][t] + this.gap_penalty, c = this.grid[y][t - 1] + this.gap_penalty, l = [h, o, c], T = this.arrayAllMaxIndexes(l);
1825
+ this.grid[y][t] = l[T[0]], this.tracebackGrid[y][t] = [T.includes(0), T.includes(1), T.includes(2)];
1826
+ }
1827
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1828
+ }
1829
+ // Gets all possible valid sequence combinations
1830
+ }, {
1831
+ key: "alignmentTraceback",
1832
+ value: function() {
1833
+ var f = [];
1834
+ for (f.push({
1835
+ pos: [this.sequence1.length, this.sequence2.length],
1836
+ seq1: "",
1837
+ seq2: ""
1838
+ }); f[0]; ) {
1839
+ var n = f[0], y = this.tracebackGrid[n.pos[0]][n.pos[1]];
1840
+ y[0] && f.push({
1841
+ pos: [n.pos[0] - 1, n.pos[1] - 1],
1842
+ seq1: this.sequence1[n.pos[0] - 1] + n.seq1,
1843
+ seq2: this.sequence2[n.pos[1] - 1] + n.seq2
1844
+ }), y[1] && f.push({
1845
+ pos: [n.pos[0] - 1, n.pos[1]],
1846
+ seq1: this.sequence1[n.pos[0] - 1] + n.seq1,
1847
+ seq2: "-" + n.seq2
1848
+ }), y[2] && f.push({
1849
+ pos: [n.pos[0], n.pos[1] - 1],
1850
+ seq1: "-" + n.seq1,
1851
+ seq2: this.sequence2[n.pos[1] - 1] + n.seq2
1852
+ }), n.pos[0] === 0 && n.pos[1] === 0 && this.alignments.push({
1853
+ sequence1: n.seq1,
1854
+ sequence2: n.seq2
1855
+ }), f.shift();
1856
+ }
1857
+ return this.alignments;
1858
+ }
1859
+ // Helper Functions
1860
+ }, {
1861
+ key: "getAllIndexes",
1862
+ value: function(f, n) {
1863
+ for (var y = [], t = -1; (t = f.indexOf(n, t + 1)) !== -1; )
1864
+ y.push(t);
1865
+ return y;
1866
+ }
1867
+ }, {
1868
+ key: "arrayAllMaxIndexes",
1869
+ value: function(f) {
1870
+ return this.getAllIndexes(f, Math.max.apply(null, f));
1871
+ }
1872
+ }]), r;
1873
+ }();
1874
+ A.exports = i;
1875
+ },
1876
+ /* 28 */
1877
+ /***/
1878
+ function(A, G, N) {
1879
+ var u = function() {
1880
+ };
1881
+ u.FDLayout = N(18), u.FDLayoutConstants = N(4), u.FDLayoutEdge = N(19), u.FDLayoutNode = N(20), u.DimensionD = N(21), u.HashMap = N(22), u.HashSet = N(23), u.IGeometry = N(8), u.IMath = N(9), u.Integer = N(10), u.Point = N(12), u.PointD = N(5), u.RandomSeed = N(16), u.RectangleD = N(13), u.Transform = N(17), u.UniqueIDGeneretor = N(14), u.Quicksort = N(25), u.LinkedList = N(11), u.LGraphObject = N(2), u.LGraph = N(6), u.LEdge = N(1), u.LGraphManager = N(7), u.LNode = N(3), u.Layout = N(15), u.LayoutConstants = N(0), u.NeedlemanWunsch = N(27), u.Matrix = N(24), u.SVD = N(26), A.exports = u;
1882
+ },
1883
+ /* 29 */
1884
+ /***/
1885
+ function(A, G, N) {
1886
+ function u() {
1887
+ this.listeners = [];
1888
+ }
1889
+ var s = u.prototype;
1890
+ s.addListener = function(i, r) {
1891
+ this.listeners.push({
1892
+ event: i,
1893
+ callback: r
1894
+ });
1895
+ }, s.removeListener = function(i, r) {
1896
+ for (var e = this.listeners.length; e >= 0; e--) {
1897
+ var f = this.listeners[e];
1898
+ f.event === i && f.callback === r && this.listeners.splice(e, 1);
1899
+ }
1900
+ }, s.emit = function(i, r) {
1901
+ for (var e = 0; e < this.listeners.length; e++) {
1902
+ var f = this.listeners[e];
1903
+ i === f.event && f.callback(r);
1904
+ }
1905
+ }, A.exports = u;
1906
+ }
1907
+ /******/
1908
+ ])
1909
+ );
1910
+ });
1911
+ }(ce)), ce.exports;
1912
+ }
1913
+ var ur = fe.exports, De;
1914
+ function gr() {
1915
+ return De || (De = 1, function(C, Y) {
1916
+ (function(G, N) {
1917
+ C.exports = N(cr());
1918
+ })(ur, function(A) {
1919
+ return (
1920
+ /******/
1921
+ (() => {
1922
+ var G = {
1923
+ /***/
1924
+ 45: (
1925
+ /***/
1926
+ (i, r, e) => {
1927
+ var f = {};
1928
+ f.layoutBase = e(551), f.CoSEConstants = e(806), f.CoSEEdge = e(767), f.CoSEGraph = e(880), f.CoSEGraphManager = e(578), f.CoSELayout = e(765), f.CoSENode = e(991), f.ConstraintHandler = e(902), i.exports = f;
1929
+ }
1930
+ ),
1931
+ /***/
1932
+ 806: (
1933
+ /***/
1934
+ (i, r, e) => {
1935
+ var f = e(551).FDLayoutConstants;
1936
+ function n() {
1937
+ }
1938
+ for (var y in f)
1939
+ n[y] = f[y];
1940
+ n.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, n.DEFAULT_RADIAL_SEPARATION = f.DEFAULT_EDGE_LENGTH, n.DEFAULT_COMPONENT_SEPERATION = 60, n.TILE = !0, n.TILING_PADDING_VERTICAL = 10, n.TILING_PADDING_HORIZONTAL = 10, n.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, n.ENFORCE_CONSTRAINTS = !0, n.APPLY_LAYOUT = !0, n.RELAX_MOVEMENT_ON_CONSTRAINTS = !0, n.TREE_REDUCTION_ON_INCREMENTAL = !0, n.PURE_INCREMENTAL = n.DEFAULT_INCREMENTAL, i.exports = n;
1941
+ }
1942
+ ),
1943
+ /***/
1944
+ 767: (
1945
+ /***/
1946
+ (i, r, e) => {
1947
+ var f = e(551).FDLayoutEdge;
1948
+ function n(t, h, o) {
1949
+ f.call(this, t, h, o);
1950
+ }
1951
+ n.prototype = Object.create(f.prototype);
1952
+ for (var y in f)
1953
+ n[y] = f[y];
1954
+ i.exports = n;
1955
+ }
1956
+ ),
1957
+ /***/
1958
+ 880: (
1959
+ /***/
1960
+ (i, r, e) => {
1961
+ var f = e(551).LGraph;
1962
+ function n(t, h, o) {
1963
+ f.call(this, t, h, o);
1964
+ }
1965
+ n.prototype = Object.create(f.prototype);
1966
+ for (var y in f)
1967
+ n[y] = f[y];
1968
+ i.exports = n;
1969
+ }
1970
+ ),
1971
+ /***/
1972
+ 578: (
1973
+ /***/
1974
+ (i, r, e) => {
1975
+ var f = e(551).LGraphManager;
1976
+ function n(t) {
1977
+ f.call(this, t);
1978
+ }
1979
+ n.prototype = Object.create(f.prototype);
1980
+ for (var y in f)
1981
+ n[y] = f[y];
1982
+ i.exports = n;
1983
+ }
1984
+ ),
1985
+ /***/
1986
+ 765: (
1987
+ /***/
1988
+ (i, r, e) => {
1989
+ var f = e(551).FDLayout, n = e(578), y = e(880), t = e(991), h = e(767), o = e(806), c = e(902), l = e(551).FDLayoutConstants, T = e(551).LayoutConstants, g = e(551).Point, d = e(551).PointD, L = e(551).DimensionD, F = e(551).Layout, M = e(551).Integer, P = e(551).IGeometry, J = e(551).LGraph, V = e(551).Transform, Q = e(551).LinkedList;
1990
+ function D() {
1991
+ f.call(this), this.toBeTiled = {}, this.constraints = {};
1992
+ }
1993
+ D.prototype = Object.create(f.prototype);
1994
+ for (var rt in f)
1995
+ D[rt] = f[rt];
1996
+ D.prototype.newGraphManager = function() {
1997
+ var a = new n(this);
1998
+ return this.graphManager = a, a;
1999
+ }, D.prototype.newGraph = function(a) {
2000
+ return new y(null, this.graphManager, a);
2001
+ }, D.prototype.newNode = function(a) {
2002
+ return new t(this.graphManager, a);
2003
+ }, D.prototype.newEdge = function(a) {
2004
+ return new h(null, null, a);
2005
+ }, D.prototype.initParameters = function() {
2006
+ f.prototype.initParameters.call(this, arguments), this.isSubLayout || (o.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = o.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = 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);
2007
+ }, D.prototype.initSpringEmbedder = function() {
2008
+ f.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / l.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = 0.04, this.coolingAdjuster = 1;
2009
+ }, D.prototype.layout = function() {
2010
+ var a = T.DEFAULT_CREATE_BENDS_AS_NEEDED;
2011
+ return a && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
2012
+ }, D.prototype.classicLayout = function() {
2013
+ 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) {
2014
+ if (o.TREE_REDUCTION_ON_INCREMENTAL) {
2015
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
2016
+ var m = new Set(this.getAllNodes()), v = this.nodesWithGravity.filter(function(I) {
2017
+ return m.has(I);
2018
+ });
2019
+ this.graphManager.setAllNodesToApplyGravitation(v);
2020
+ }
2021
+ } else {
2022
+ var a = this.getFlatForest();
2023
+ if (a.length > 0)
2024
+ this.positionNodesRadially(a);
2025
+ else {
2026
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
2027
+ var m = new Set(this.getAllNodes()), v = this.nodesWithGravity.filter(function(E) {
2028
+ return m.has(E);
2029
+ });
2030
+ this.graphManager.setAllNodesToApplyGravitation(v), this.positionNodesRandomly();
2031
+ }
2032
+ }
2033
+ return Object.keys(this.constraints).length > 0 && (c.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), o.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
2034
+ }, D.prototype.tick = function() {
2035
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
2036
+ if (this.prunedNodesAll.length > 0)
2037
+ this.isTreeGrowing = !0;
2038
+ else
2039
+ return !0;
2040
+ if (this.totalIterations % l.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
2041
+ if (this.isConverged())
2042
+ if (this.prunedNodesAll.length > 0)
2043
+ this.isTreeGrowing = !0;
2044
+ else
2045
+ return !0;
2046
+ 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));
2047
+ }
2048
+ if (this.isTreeGrowing) {
2049
+ if (this.growTreeIterations % 10 == 0)
2050
+ if (this.prunedNodesAll.length > 0) {
2051
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
2052
+ var a = new Set(this.getAllNodes()), m = this.nodesWithGravity.filter(function(p) {
2053
+ return a.has(p);
2054
+ });
2055
+ this.graphManager.setAllNodesToApplyGravitation(m), this.graphManager.updateBounds(), this.updateGrid(), o.PURE_INCREMENTAL ? this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL;
2056
+ } else
2057
+ this.isTreeGrowing = !1, this.isGrowthFinished = !0;
2058
+ this.growTreeIterations++;
2059
+ }
2060
+ if (this.isGrowthFinished) {
2061
+ if (this.isConverged())
2062
+ return !0;
2063
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), o.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++;
2064
+ }
2065
+ var v = !this.isTreeGrowing && !this.isGrowthFinished, E = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
2066
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(v, E), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
2067
+ }, D.prototype.getPositionsData = function() {
2068
+ for (var a = this.graphManager.getAllNodes(), m = {}, v = 0; v < a.length; v++) {
2069
+ var E = a[v].rect, p = a[v].id;
2070
+ m[p] = {
2071
+ id: p,
2072
+ x: E.getCenterX(),
2073
+ y: E.getCenterY(),
2074
+ w: E.width,
2075
+ h: E.height
2076
+ };
2077
+ }
2078
+ return m;
2079
+ }, D.prototype.runSpringEmbedder = function() {
2080
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
2081
+ var a = !1;
2082
+ if (l.ANIMATE === "during")
2083
+ this.emit("layoutstarted");
2084
+ else {
2085
+ for (; !a; )
2086
+ a = this.tick();
2087
+ this.graphManager.updateBounds();
2088
+ }
2089
+ }, D.prototype.moveNodes = function() {
2090
+ for (var a = this.getAllNodes(), m, v = 0; v < a.length; v++)
2091
+ m = a[v], m.calculateDisplacement();
2092
+ Object.keys(this.constraints).length > 0 && this.updateDisplacements();
2093
+ for (var v = 0; v < a.length; v++)
2094
+ m = a[v], m.move();
2095
+ }, D.prototype.initConstraintVariables = function() {
2096
+ var a = this;
2097
+ this.idToNodeMap = /* @__PURE__ */ new Map(), this.fixedNodeSet = /* @__PURE__ */ new Set();
2098
+ for (var m = this.graphManager.getAllNodes(), v = 0; v < m.length; v++) {
2099
+ var E = m[v];
2100
+ this.idToNodeMap.set(E.id, E);
2101
+ }
2102
+ var p = function O(X) {
2103
+ for (var B = X.getChild().getNodes(), _, lt = 0, q = 0; q < B.length; q++)
2104
+ _ = B[q], _.getChild() == null ? a.fixedNodeSet.has(_.id) && (lt += 100) : lt += O(_);
2105
+ return lt;
2106
+ };
2107
+ if (this.constraints.fixedNodeConstraint) {
2108
+ this.constraints.fixedNodeConstraint.forEach(function(B) {
2109
+ a.fixedNodeSet.add(B.nodeId);
2110
+ });
2111
+ for (var m = this.graphManager.getAllNodes(), E, v = 0; v < m.length; v++)
2112
+ if (E = m[v], E.getChild() != null) {
2113
+ var I = p(E);
2114
+ I > 0 && (E.fixedNodeWeight = I);
2115
+ }
2116
+ }
2117
+ if (this.constraints.relativePlacementConstraint) {
2118
+ var w = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
2119
+ if (this.dummyToNodeForVerticalAlignment = /* @__PURE__ */ new Map(), this.dummyToNodeForHorizontalAlignment = /* @__PURE__ */ new Map(), this.fixedNodesOnHorizontal = /* @__PURE__ */ new Set(), this.fixedNodesOnVertical = /* @__PURE__ */ new Set(), this.fixedNodeSet.forEach(function(O) {
2120
+ a.fixedNodesOnHorizontal.add(O), a.fixedNodesOnVertical.add(O);
2121
+ }), this.constraints.alignmentConstraint) {
2122
+ if (this.constraints.alignmentConstraint.vertical)
2123
+ for (var H = this.constraints.alignmentConstraint.vertical, v = 0; v < H.length; v++)
2124
+ this.dummyToNodeForVerticalAlignment.set("dummy" + v, []), H[v].forEach(function(X) {
2125
+ w.set(X, "dummy" + v), a.dummyToNodeForVerticalAlignment.get("dummy" + v).push(X), a.fixedNodeSet.has(X) && a.fixedNodesOnHorizontal.add("dummy" + v);
2126
+ });
2127
+ if (this.constraints.alignmentConstraint.horizontal)
2128
+ for (var x = this.constraints.alignmentConstraint.horizontal, v = 0; v < x.length; v++)
2129
+ this.dummyToNodeForHorizontalAlignment.set("dummy" + v, []), x[v].forEach(function(X) {
2130
+ R.set(X, "dummy" + v), a.dummyToNodeForHorizontalAlignment.get("dummy" + v).push(X), a.fixedNodeSet.has(X) && a.fixedNodesOnVertical.add("dummy" + v);
2131
+ });
2132
+ }
2133
+ if (o.RELAX_MOVEMENT_ON_CONSTRAINTS)
2134
+ this.shuffle = function(O) {
2135
+ var X, B, _;
2136
+ for (_ = O.length - 1; _ >= 2 * O.length / 3; _--)
2137
+ X = Math.floor(Math.random() * (_ + 1)), B = O[_], O[_] = O[X], O[X] = B;
2138
+ return O;
2139
+ }, this.nodesInRelativeHorizontal = [], this.nodesInRelativeVertical = [], this.nodeToRelativeConstraintMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToRelativeConstraintMapVertical = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapVertical = /* @__PURE__ */ new Map(), this.constraints.relativePlacementConstraint.forEach(function(O) {
2140
+ if (O.left) {
2141
+ var X = w.has(O.left) ? w.get(O.left) : O.left, B = w.has(O.right) ? w.get(O.right) : O.right;
2142
+ a.nodesInRelativeHorizontal.includes(X) || (a.nodesInRelativeHorizontal.push(X), a.nodeToRelativeConstraintMapHorizontal.set(X, []), a.dummyToNodeForVerticalAlignment.has(X) ? a.nodeToTempPositionMapHorizontal.set(X, a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()) : a.nodeToTempPositionMapHorizontal.set(X, a.idToNodeMap.get(X).getCenterX())), a.nodesInRelativeHorizontal.includes(B) || (a.nodesInRelativeHorizontal.push(B), a.nodeToRelativeConstraintMapHorizontal.set(B, []), a.dummyToNodeForVerticalAlignment.has(B) ? a.nodeToTempPositionMapHorizontal.set(B, a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()) : a.nodeToTempPositionMapHorizontal.set(B, a.idToNodeMap.get(B).getCenterX())), a.nodeToRelativeConstraintMapHorizontal.get(X).push({ right: B, gap: O.gap }), a.nodeToRelativeConstraintMapHorizontal.get(B).push({ left: X, gap: O.gap });
2143
+ } else {
2144
+ var _ = R.has(O.top) ? R.get(O.top) : O.top, lt = R.has(O.bottom) ? R.get(O.bottom) : O.bottom;
2145
+ a.nodesInRelativeVertical.includes(_) || (a.nodesInRelativeVertical.push(_), a.nodeToRelativeConstraintMapVertical.set(_, []), a.dummyToNodeForHorizontalAlignment.has(_) ? a.nodeToTempPositionMapVertical.set(_, a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()) : a.nodeToTempPositionMapVertical.set(_, a.idToNodeMap.get(_).getCenterY())), a.nodesInRelativeVertical.includes(lt) || (a.nodesInRelativeVertical.push(lt), a.nodeToRelativeConstraintMapVertical.set(lt, []), a.dummyToNodeForHorizontalAlignment.has(lt) ? a.nodeToTempPositionMapVertical.set(lt, a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()) : a.nodeToTempPositionMapVertical.set(lt, a.idToNodeMap.get(lt).getCenterY())), a.nodeToRelativeConstraintMapVertical.get(_).push({ bottom: lt, gap: O.gap }), a.nodeToRelativeConstraintMapVertical.get(lt).push({ top: _, gap: O.gap });
2146
+ }
2147
+ });
2148
+ else {
2149
+ var k = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map();
2150
+ this.constraints.relativePlacementConstraint.forEach(function(O) {
2151
+ if (O.left) {
2152
+ var X = w.has(O.left) ? w.get(O.left) : O.left, B = w.has(O.right) ? w.get(O.right) : O.right;
2153
+ k.has(X) ? k.get(X).push(B) : k.set(X, [B]), k.has(B) ? k.get(B).push(X) : k.set(B, [X]);
2154
+ } else {
2155
+ var _ = R.has(O.top) ? R.get(O.top) : O.top, lt = R.has(O.bottom) ? R.get(O.bottom) : O.bottom;
2156
+ W.has(_) ? W.get(_).push(lt) : W.set(_, [lt]), W.has(lt) ? W.get(lt).push(_) : W.set(lt, [_]);
2157
+ }
2158
+ });
2159
+ var U = function(X, B) {
2160
+ var _ = [], lt = [], q = new Q(), Rt = /* @__PURE__ */ new Set(), Lt = 0;
2161
+ return X.forEach(function(vt, it) {
2162
+ if (!Rt.has(it)) {
2163
+ _[Lt] = [], lt[Lt] = !1;
2164
+ var gt = it;
2165
+ for (q.push(gt), Rt.add(gt), _[Lt].push(gt); q.length != 0; ) {
2166
+ gt = q.shift(), B.has(gt) && (lt[Lt] = !0);
2167
+ var Tt = X.get(gt);
2168
+ Tt.forEach(function(At) {
2169
+ Rt.has(At) || (q.push(At), Rt.add(At), _[Lt].push(At));
2170
+ });
2171
+ }
2172
+ Lt++;
2173
+ }
2174
+ }), { components: _, isFixed: lt };
2175
+ }, et = U(k, a.fixedNodesOnHorizontal);
2176
+ this.componentsOnHorizontal = et.components, this.fixedComponentsOnHorizontal = et.isFixed;
2177
+ var z = U(W, a.fixedNodesOnVertical);
2178
+ this.componentsOnVertical = z.components, this.fixedComponentsOnVertical = z.isFixed;
2179
+ }
2180
+ }
2181
+ }, D.prototype.updateDisplacements = function() {
2182
+ var a = this;
2183
+ if (this.constraints.fixedNodeConstraint && this.constraints.fixedNodeConstraint.forEach(function(z) {
2184
+ var O = a.idToNodeMap.get(z.nodeId);
2185
+ O.displacementX = 0, O.displacementY = 0;
2186
+ }), this.constraints.alignmentConstraint) {
2187
+ if (this.constraints.alignmentConstraint.vertical)
2188
+ for (var m = this.constraints.alignmentConstraint.vertical, v = 0; v < m.length; v++) {
2189
+ for (var E = 0, p = 0; p < m[v].length; p++) {
2190
+ if (this.fixedNodeSet.has(m[v][p])) {
2191
+ E = 0;
2192
+ break;
2193
+ }
2194
+ E += this.idToNodeMap.get(m[v][p]).displacementX;
2195
+ }
2196
+ for (var I = E / m[v].length, p = 0; p < m[v].length; p++)
2197
+ this.idToNodeMap.get(m[v][p]).displacementX = I;
2198
+ }
2199
+ if (this.constraints.alignmentConstraint.horizontal)
2200
+ for (var w = this.constraints.alignmentConstraint.horizontal, v = 0; v < w.length; v++) {
2201
+ for (var R = 0, p = 0; p < w[v].length; p++) {
2202
+ if (this.fixedNodeSet.has(w[v][p])) {
2203
+ R = 0;
2204
+ break;
2205
+ }
2206
+ R += this.idToNodeMap.get(w[v][p]).displacementY;
2207
+ }
2208
+ for (var H = R / w[v].length, p = 0; p < w[v].length; p++)
2209
+ this.idToNodeMap.get(w[v][p]).displacementY = H;
2210
+ }
2211
+ }
2212
+ if (this.constraints.relativePlacementConstraint)
2213
+ if (o.RELAX_MOVEMENT_ON_CONSTRAINTS)
2214
+ this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(z) {
2215
+ if (!a.fixedNodesOnHorizontal.has(z)) {
2216
+ var O = 0;
2217
+ a.dummyToNodeForVerticalAlignment.has(z) ? O = a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(z)[0]).displacementX : O = a.idToNodeMap.get(z).displacementX, a.nodeToRelativeConstraintMapHorizontal.get(z).forEach(function(X) {
2218
+ if (X.right) {
2219
+ var B = a.nodeToTempPositionMapHorizontal.get(X.right) - a.nodeToTempPositionMapHorizontal.get(z) - O;
2220
+ B < X.gap && (O -= X.gap - B);
2221
+ } else {
2222
+ var B = a.nodeToTempPositionMapHorizontal.get(z) - a.nodeToTempPositionMapHorizontal.get(X.left) + O;
2223
+ B < X.gap && (O += X.gap - B);
2224
+ }
2225
+ }), a.nodeToTempPositionMapHorizontal.set(z, a.nodeToTempPositionMapHorizontal.get(z) + O), a.dummyToNodeForVerticalAlignment.has(z) ? a.dummyToNodeForVerticalAlignment.get(z).forEach(function(X) {
2226
+ a.idToNodeMap.get(X).displacementX = O;
2227
+ }) : a.idToNodeMap.get(z).displacementX = O;
2228
+ }
2229
+ }), this.nodesInRelativeVertical.forEach(function(z) {
2230
+ if (!a.fixedNodesOnHorizontal.has(z)) {
2231
+ var O = 0;
2232
+ a.dummyToNodeForHorizontalAlignment.has(z) ? O = a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(z)[0]).displacementY : O = a.idToNodeMap.get(z).displacementY, a.nodeToRelativeConstraintMapVertical.get(z).forEach(function(X) {
2233
+ if (X.bottom) {
2234
+ var B = a.nodeToTempPositionMapVertical.get(X.bottom) - a.nodeToTempPositionMapVertical.get(z) - O;
2235
+ B < X.gap && (O -= X.gap - B);
2236
+ } else {
2237
+ var B = a.nodeToTempPositionMapVertical.get(z) - a.nodeToTempPositionMapVertical.get(X.top) + O;
2238
+ B < X.gap && (O += X.gap - B);
2239
+ }
2240
+ }), a.nodeToTempPositionMapVertical.set(z, a.nodeToTempPositionMapVertical.get(z) + O), a.dummyToNodeForHorizontalAlignment.has(z) ? a.dummyToNodeForHorizontalAlignment.get(z).forEach(function(X) {
2241
+ a.idToNodeMap.get(X).displacementY = O;
2242
+ }) : a.idToNodeMap.get(z).displacementY = O;
2243
+ }
2244
+ });
2245
+ else {
2246
+ for (var v = 0; v < this.componentsOnHorizontal.length; v++) {
2247
+ var x = this.componentsOnHorizontal[v];
2248
+ if (this.fixedComponentsOnHorizontal[v])
2249
+ for (var p = 0; p < x.length; p++)
2250
+ this.dummyToNodeForVerticalAlignment.has(x[p]) ? this.dummyToNodeForVerticalAlignment.get(x[p]).forEach(function(X) {
2251
+ a.idToNodeMap.get(X).displacementX = 0;
2252
+ }) : this.idToNodeMap.get(x[p]).displacementX = 0;
2253
+ else {
2254
+ for (var k = 0, W = 0, p = 0; p < x.length; p++)
2255
+ if (this.dummyToNodeForVerticalAlignment.has(x[p])) {
2256
+ var U = this.dummyToNodeForVerticalAlignment.get(x[p]);
2257
+ k += U.length * this.idToNodeMap.get(U[0]).displacementX, W += U.length;
2258
+ } else
2259
+ k += this.idToNodeMap.get(x[p]).displacementX, W++;
2260
+ for (var et = k / W, p = 0; p < x.length; p++)
2261
+ this.dummyToNodeForVerticalAlignment.has(x[p]) ? this.dummyToNodeForVerticalAlignment.get(x[p]).forEach(function(X) {
2262
+ a.idToNodeMap.get(X).displacementX = et;
2263
+ }) : this.idToNodeMap.get(x[p]).displacementX = et;
2264
+ }
2265
+ }
2266
+ for (var v = 0; v < this.componentsOnVertical.length; v++) {
2267
+ var x = this.componentsOnVertical[v];
2268
+ if (this.fixedComponentsOnVertical[v])
2269
+ for (var p = 0; p < x.length; p++)
2270
+ this.dummyToNodeForHorizontalAlignment.has(x[p]) ? this.dummyToNodeForHorizontalAlignment.get(x[p]).forEach(function(B) {
2271
+ a.idToNodeMap.get(B).displacementY = 0;
2272
+ }) : this.idToNodeMap.get(x[p]).displacementY = 0;
2273
+ else {
2274
+ for (var k = 0, W = 0, p = 0; p < x.length; p++)
2275
+ if (this.dummyToNodeForHorizontalAlignment.has(x[p])) {
2276
+ var U = this.dummyToNodeForHorizontalAlignment.get(x[p]);
2277
+ k += U.length * this.idToNodeMap.get(U[0]).displacementY, W += U.length;
2278
+ } else
2279
+ k += this.idToNodeMap.get(x[p]).displacementY, W++;
2280
+ for (var et = k / W, p = 0; p < x.length; p++)
2281
+ this.dummyToNodeForHorizontalAlignment.has(x[p]) ? this.dummyToNodeForHorizontalAlignment.get(x[p]).forEach(function(q) {
2282
+ a.idToNodeMap.get(q).displacementY = et;
2283
+ }) : this.idToNodeMap.get(x[p]).displacementY = et;
2284
+ }
2285
+ }
2286
+ }
2287
+ }, D.prototype.calculateNodesToApplyGravitationTo = function() {
2288
+ var a = [], m, v = this.graphManager.getGraphs(), E = v.length, p;
2289
+ for (p = 0; p < E; p++)
2290
+ m = v[p], m.updateConnected(), m.isConnected || (a = a.concat(m.getNodes()));
2291
+ return a;
2292
+ }, D.prototype.createBendpoints = function() {
2293
+ var a = [];
2294
+ a = a.concat(this.graphManager.getAllEdges());
2295
+ var m = /* @__PURE__ */ new Set(), v;
2296
+ for (v = 0; v < a.length; v++) {
2297
+ var E = a[v];
2298
+ if (!m.has(E)) {
2299
+ var p = E.getSource(), I = E.getTarget();
2300
+ if (p == I)
2301
+ E.getBendpoints().push(new d()), E.getBendpoints().push(new d()), this.createDummyNodesForBendpoints(E), m.add(E);
2302
+ else {
2303
+ var w = [];
2304
+ if (w = w.concat(p.getEdgeListToNode(I)), w = w.concat(I.getEdgeListToNode(p)), !m.has(w[0])) {
2305
+ if (w.length > 1) {
2306
+ var R;
2307
+ for (R = 0; R < w.length; R++) {
2308
+ var H = w[R];
2309
+ H.getBendpoints().push(new d()), this.createDummyNodesForBendpoints(H);
2310
+ }
2311
+ }
2312
+ w.forEach(function(x) {
2313
+ m.add(x);
2314
+ });
2315
+ }
2316
+ }
2317
+ }
2318
+ if (m.size == a.length)
2319
+ break;
2320
+ }
2321
+ }, D.prototype.positionNodesRadially = function(a) {
2322
+ for (var m = new g(0, 0), v = Math.ceil(Math.sqrt(a.length)), E = 0, p = 0, I = 0, w = new d(0, 0), R = 0; R < a.length; R++) {
2323
+ R % v == 0 && (I = 0, p = E, R != 0 && (p += o.DEFAULT_COMPONENT_SEPERATION), E = 0);
2324
+ var H = a[R], x = F.findCenterOfTree(H);
2325
+ m.x = I, m.y = p, w = D.radialLayout(H, x, m), w.y > E && (E = Math.floor(w.y)), I = Math.floor(w.x + o.DEFAULT_COMPONENT_SEPERATION);
2326
+ }
2327
+ this.transform(new d(T.WORLD_CENTER_X - w.x / 2, T.WORLD_CENTER_Y - w.y / 2));
2328
+ }, D.radialLayout = function(a, m, v) {
2329
+ var E = Math.max(this.maxDiagonalInTree(a), o.DEFAULT_RADIAL_SEPARATION);
2330
+ D.branchRadialLayout(m, null, 0, 359, 0, E);
2331
+ var p = J.calculateBounds(a), I = new V();
2332
+ I.setDeviceOrgX(p.getMinX()), I.setDeviceOrgY(p.getMinY()), I.setWorldOrgX(v.x), I.setWorldOrgY(v.y);
2333
+ for (var w = 0; w < a.length; w++) {
2334
+ var R = a[w];
2335
+ R.transform(I);
2336
+ }
2337
+ var H = new d(p.getMaxX(), p.getMaxY());
2338
+ return I.inverseTransformPoint(H);
2339
+ }, D.branchRadialLayout = function(a, m, v, E, p, I) {
2340
+ var w = (E - v + 1) / 2;
2341
+ w < 0 && (w += 180);
2342
+ var R = (w + v) % 360, H = R * P.TWO_PI / 360, x = p * Math.cos(H), k = p * Math.sin(H);
2343
+ a.setCenter(x, k);
2344
+ var W = [];
2345
+ W = W.concat(a.getEdges());
2346
+ var U = W.length;
2347
+ m != null && U--;
2348
+ for (var et = 0, z = W.length, O, X = a.getEdgesBetween(m); X.length > 1; ) {
2349
+ var B = X[0];
2350
+ X.splice(0, 1);
2351
+ var _ = W.indexOf(B);
2352
+ _ >= 0 && W.splice(_, 1), z--, U--;
2353
+ }
2354
+ m != null ? O = (W.indexOf(X[0]) + 1) % z : O = 0;
2355
+ for (var lt = Math.abs(E - v) / U, q = O; et != U; q = ++q % z) {
2356
+ var Rt = W[q].getOtherEnd(a);
2357
+ if (Rt != m) {
2358
+ var Lt = (v + et * lt) % 360, vt = (Lt + lt) % 360;
2359
+ D.branchRadialLayout(Rt, a, Lt, vt, p + I, I), et++;
2360
+ }
2361
+ }
2362
+ }, D.maxDiagonalInTree = function(a) {
2363
+ for (var m = M.MIN_VALUE, v = 0; v < a.length; v++) {
2364
+ var E = a[v], p = E.getDiagonal();
2365
+ p > m && (m = p);
2366
+ }
2367
+ return m;
2368
+ }, D.prototype.calcRepulsionRange = function() {
2369
+ return 2 * (this.level + 1) * this.idealEdgeLength;
2370
+ }, D.prototype.groupZeroDegreeMembers = function() {
2371
+ var a = this, m = {};
2372
+ this.memberGroups = {}, this.idToDummyNode = {};
2373
+ for (var v = [], E = this.graphManager.getAllNodes(), p = 0; p < E.length; p++) {
2374
+ var I = E[p], w = I.getParent();
2375
+ this.getNodeDegreeWithChildren(I) === 0 && (w.id == null || !this.getToBeTiled(w)) && v.push(I);
2376
+ }
2377
+ for (var p = 0; p < v.length; p++) {
2378
+ var I = v[p], R = I.getParent().id;
2379
+ typeof m[R] > "u" && (m[R] = []), m[R] = m[R].concat(I);
2380
+ }
2381
+ Object.keys(m).forEach(function(H) {
2382
+ if (m[H].length > 1) {
2383
+ var x = "DummyCompound_" + H;
2384
+ a.memberGroups[x] = m[H];
2385
+ var k = m[H][0].getParent(), W = new t(a.graphManager);
2386
+ W.id = x, W.paddingLeft = k.paddingLeft || 0, W.paddingRight = k.paddingRight || 0, W.paddingBottom = k.paddingBottom || 0, W.paddingTop = k.paddingTop || 0, a.idToDummyNode[x] = W;
2387
+ var U = a.getGraphManager().add(a.newGraph(), W), et = k.getChild();
2388
+ et.add(W);
2389
+ for (var z = 0; z < m[H].length; z++) {
2390
+ var O = m[H][z];
2391
+ et.remove(O), U.add(O);
2392
+ }
2393
+ }
2394
+ });
2395
+ }, D.prototype.clearCompounds = function() {
2396
+ var a = {}, m = {};
2397
+ this.performDFSOnCompounds();
2398
+ for (var v = 0; v < this.compoundOrder.length; v++)
2399
+ m[this.compoundOrder[v].id] = this.compoundOrder[v], a[this.compoundOrder[v].id] = [].concat(this.compoundOrder[v].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[v].getChild()), this.compoundOrder[v].child = null;
2400
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(a, m);
2401
+ }, D.prototype.clearZeroDegreeMembers = function() {
2402
+ var a = this, m = this.tiledZeroDegreePack = [];
2403
+ Object.keys(this.memberGroups).forEach(function(v) {
2404
+ var E = a.idToDummyNode[v];
2405
+ if (m[v] = a.tileNodes(a.memberGroups[v], E.paddingLeft + E.paddingRight), E.rect.width = m[v].width, E.rect.height = m[v].height, E.setCenter(m[v].centerX, m[v].centerY), E.labelMarginLeft = 0, E.labelMarginTop = 0, o.NODE_DIMENSIONS_INCLUDE_LABELS) {
2406
+ var p = E.rect.width, I = E.rect.height;
2407
+ E.labelWidth && (E.labelPosHorizontal == "left" ? (E.rect.x -= E.labelWidth, E.setWidth(p + E.labelWidth), E.labelMarginLeft = E.labelWidth) : E.labelPosHorizontal == "center" && E.labelWidth > p ? (E.rect.x -= (E.labelWidth - p) / 2, E.setWidth(E.labelWidth), E.labelMarginLeft = (E.labelWidth - p) / 2) : E.labelPosHorizontal == "right" && E.setWidth(p + E.labelWidth)), E.labelHeight && (E.labelPosVertical == "top" ? (E.rect.y -= E.labelHeight, E.setHeight(I + E.labelHeight), E.labelMarginTop = E.labelHeight) : E.labelPosVertical == "center" && E.labelHeight > I ? (E.rect.y -= (E.labelHeight - I) / 2, E.setHeight(E.labelHeight), E.labelMarginTop = (E.labelHeight - I) / 2) : E.labelPosVertical == "bottom" && E.setHeight(I + E.labelHeight));
2408
+ }
2409
+ });
2410
+ }, D.prototype.repopulateCompounds = function() {
2411
+ for (var a = this.compoundOrder.length - 1; a >= 0; a--) {
2412
+ var m = this.compoundOrder[a], v = m.id, E = m.paddingLeft, p = m.paddingTop, I = m.labelMarginLeft, w = m.labelMarginTop;
2413
+ this.adjustLocations(this.tiledMemberPack[v], m.rect.x, m.rect.y, E, p, I, w);
2414
+ }
2415
+ }, D.prototype.repopulateZeroDegreeMembers = function() {
2416
+ var a = this, m = this.tiledZeroDegreePack;
2417
+ Object.keys(m).forEach(function(v) {
2418
+ var E = a.idToDummyNode[v], p = E.paddingLeft, I = E.paddingTop, w = E.labelMarginLeft, R = E.labelMarginTop;
2419
+ a.adjustLocations(m[v], E.rect.x, E.rect.y, p, I, w, R);
2420
+ });
2421
+ }, D.prototype.getToBeTiled = function(a) {
2422
+ var m = a.id;
2423
+ if (this.toBeTiled[m] != null)
2424
+ return this.toBeTiled[m];
2425
+ var v = a.getChild();
2426
+ if (v == null)
2427
+ return this.toBeTiled[m] = !1, !1;
2428
+ for (var E = v.getNodes(), p = 0; p < E.length; p++) {
2429
+ var I = E[p];
2430
+ if (this.getNodeDegree(I) > 0)
2431
+ return this.toBeTiled[m] = !1, !1;
2432
+ if (I.getChild() == null) {
2433
+ this.toBeTiled[I.id] = !1;
2434
+ continue;
2435
+ }
2436
+ if (!this.getToBeTiled(I))
2437
+ return this.toBeTiled[m] = !1, !1;
2438
+ }
2439
+ return this.toBeTiled[m] = !0, !0;
2440
+ }, D.prototype.getNodeDegree = function(a) {
2441
+ a.id;
2442
+ for (var m = a.getEdges(), v = 0, E = 0; E < m.length; E++) {
2443
+ var p = m[E];
2444
+ p.getSource().id !== p.getTarget().id && (v = v + 1);
2445
+ }
2446
+ return v;
2447
+ }, D.prototype.getNodeDegreeWithChildren = function(a) {
2448
+ var m = this.getNodeDegree(a);
2449
+ if (a.getChild() == null)
2450
+ return m;
2451
+ for (var v = a.getChild().getNodes(), E = 0; E < v.length; E++) {
2452
+ var p = v[E];
2453
+ m += this.getNodeDegreeWithChildren(p);
2454
+ }
2455
+ return m;
2456
+ }, D.prototype.performDFSOnCompounds = function() {
2457
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2458
+ }, D.prototype.fillCompexOrderByDFS = function(a) {
2459
+ for (var m = 0; m < a.length; m++) {
2460
+ var v = a[m];
2461
+ v.getChild() != null && this.fillCompexOrderByDFS(v.getChild().getNodes()), this.getToBeTiled(v) && this.compoundOrder.push(v);
2462
+ }
2463
+ }, D.prototype.adjustLocations = function(a, m, v, E, p, I, w) {
2464
+ m += E + I, v += p + w;
2465
+ for (var R = m, H = 0; H < a.rows.length; H++) {
2466
+ var x = a.rows[H];
2467
+ m = R;
2468
+ for (var k = 0, W = 0; W < x.length; W++) {
2469
+ var U = x[W];
2470
+ U.rect.x = m, U.rect.y = v, m += U.rect.width + a.horizontalPadding, U.rect.height > k && (k = U.rect.height);
2471
+ }
2472
+ v += k + a.verticalPadding;
2473
+ }
2474
+ }, D.prototype.tileCompoundMembers = function(a, m) {
2475
+ var v = this;
2476
+ this.tiledMemberPack = [], Object.keys(a).forEach(function(E) {
2477
+ var p = m[E];
2478
+ if (v.tiledMemberPack[E] = v.tileNodes(a[E], p.paddingLeft + p.paddingRight), p.rect.width = v.tiledMemberPack[E].width, p.rect.height = v.tiledMemberPack[E].height, p.setCenter(v.tiledMemberPack[E].centerX, v.tiledMemberPack[E].centerY), p.labelMarginLeft = 0, p.labelMarginTop = 0, o.NODE_DIMENSIONS_INCLUDE_LABELS) {
2479
+ var I = p.rect.width, w = p.rect.height;
2480
+ p.labelWidth && (p.labelPosHorizontal == "left" ? (p.rect.x -= p.labelWidth, p.setWidth(I + p.labelWidth), p.labelMarginLeft = p.labelWidth) : p.labelPosHorizontal == "center" && p.labelWidth > I ? (p.rect.x -= (p.labelWidth - I) / 2, p.setWidth(p.labelWidth), p.labelMarginLeft = (p.labelWidth - I) / 2) : p.labelPosHorizontal == "right" && p.setWidth(I + 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));
2481
+ }
2482
+ });
2483
+ }, D.prototype.tileNodes = function(a, m) {
2484
+ var v = this.tileNodesByFavoringDim(a, m, !0), E = this.tileNodesByFavoringDim(a, m, !1), p = this.getOrgRatio(v), I = this.getOrgRatio(E), w;
2485
+ return I < p ? w = E : w = v, w;
2486
+ }, D.prototype.getOrgRatio = function(a) {
2487
+ var m = a.width, v = a.height, E = m / v;
2488
+ return E < 1 && (E = 1 / E), E;
2489
+ }, D.prototype.calcIdealRowWidth = function(a, m) {
2490
+ var v = o.TILING_PADDING_VERTICAL, E = o.TILING_PADDING_HORIZONTAL, p = a.length, I = 0, w = 0, R = 0;
2491
+ a.forEach(function(z) {
2492
+ I += z.getWidth(), w += z.getHeight(), z.getWidth() > R && (R = z.getWidth());
2493
+ });
2494
+ var H = I / p, x = w / p, k = Math.pow(v - E, 2) + 4 * (H + E) * (x + v) * p, W = (E - v + Math.sqrt(k)) / (2 * (H + E)), U;
2495
+ m ? (U = Math.ceil(W), U == W && U++) : U = Math.floor(W);
2496
+ var et = U * (H + E) - E;
2497
+ return R > et && (et = R), et += E * 2, et;
2498
+ }, D.prototype.tileNodesByFavoringDim = function(a, m, v) {
2499
+ var E = o.TILING_PADDING_VERTICAL, p = o.TILING_PADDING_HORIZONTAL, I = o.TILING_COMPARE_BY, w = {
2500
+ rows: [],
2501
+ rowWidth: [],
2502
+ rowHeight: [],
2503
+ width: 0,
2504
+ height: m,
2505
+ // assume minHeight equals to minWidth
2506
+ verticalPadding: E,
2507
+ horizontalPadding: p,
2508
+ centerX: 0,
2509
+ centerY: 0
2510
+ };
2511
+ I && (w.idealRowWidth = this.calcIdealRowWidth(a, v));
2512
+ var R = function(O) {
2513
+ return O.rect.width * O.rect.height;
2514
+ }, H = function(O, X) {
2515
+ return R(X) - R(O);
2516
+ };
2517
+ a.sort(function(z, O) {
2518
+ var X = H;
2519
+ return w.idealRowWidth ? (X = I, X(z.id, O.id)) : X(z, O);
2520
+ });
2521
+ for (var x = 0, k = 0, W = 0; W < a.length; W++) {
2522
+ var U = a[W];
2523
+ x += U.getCenterX(), k += U.getCenterY();
2524
+ }
2525
+ w.centerX = x / a.length, w.centerY = k / a.length;
2526
+ for (var W = 0; W < a.length; W++) {
2527
+ var U = a[W];
2528
+ if (w.rows.length == 0)
2529
+ this.insertNodeToRow(w, U, 0, m);
2530
+ else if (this.canAddHorizontal(w, U.rect.width, U.rect.height)) {
2531
+ var et = w.rows.length - 1;
2532
+ w.idealRowWidth || (et = this.getShortestRowIndex(w)), this.insertNodeToRow(w, U, et, m);
2533
+ } else
2534
+ this.insertNodeToRow(w, U, w.rows.length, m);
2535
+ this.shiftToLastRow(w);
2536
+ }
2537
+ return w;
2538
+ }, D.prototype.insertNodeToRow = function(a, m, v, E) {
2539
+ var p = E;
2540
+ if (v == a.rows.length) {
2541
+ var I = [];
2542
+ a.rows.push(I), a.rowWidth.push(p), a.rowHeight.push(0);
2543
+ }
2544
+ var w = a.rowWidth[v] + m.rect.width;
2545
+ a.rows[v].length > 0 && (w += a.horizontalPadding), a.rowWidth[v] = w, a.width < w && (a.width = w);
2546
+ var R = m.rect.height;
2547
+ v > 0 && (R += a.verticalPadding);
2548
+ var H = 0;
2549
+ R > a.rowHeight[v] && (H = a.rowHeight[v], a.rowHeight[v] = R, H = a.rowHeight[v] - H), a.height += H, a.rows[v].push(m);
2550
+ }, D.prototype.getShortestRowIndex = function(a) {
2551
+ for (var m = -1, v = Number.MAX_VALUE, E = 0; E < a.rows.length; E++)
2552
+ a.rowWidth[E] < v && (m = E, v = a.rowWidth[E]);
2553
+ return m;
2554
+ }, D.prototype.getLongestRowIndex = function(a) {
2555
+ for (var m = -1, v = Number.MIN_VALUE, E = 0; E < a.rows.length; E++)
2556
+ a.rowWidth[E] > v && (m = E, v = a.rowWidth[E]);
2557
+ return m;
2558
+ }, D.prototype.canAddHorizontal = function(a, m, v) {
2559
+ if (a.idealRowWidth) {
2560
+ var E = a.rows.length - 1, p = a.rowWidth[E];
2561
+ return p + m + a.horizontalPadding <= a.idealRowWidth;
2562
+ }
2563
+ var I = this.getShortestRowIndex(a);
2564
+ if (I < 0)
2565
+ return !0;
2566
+ var w = a.rowWidth[I];
2567
+ if (w + a.horizontalPadding + m <= a.width) return !0;
2568
+ var R = 0;
2569
+ a.rowHeight[I] < v && I > 0 && (R = v + a.verticalPadding - a.rowHeight[I]);
2570
+ var H;
2571
+ a.width - w >= m + a.horizontalPadding ? H = (a.height + R) / (w + m + a.horizontalPadding) : H = (a.height + R) / a.width, R = v + a.verticalPadding;
2572
+ var x;
2573
+ return a.width < m ? x = (a.height + R) / m : x = (a.height + R) / a.width, x < 1 && (x = 1 / x), H < 1 && (H = 1 / H), H < x;
2574
+ }, D.prototype.shiftToLastRow = function(a) {
2575
+ var m = this.getLongestRowIndex(a), v = a.rowWidth.length - 1, E = a.rows[m], p = E[E.length - 1], I = p.width + a.horizontalPadding;
2576
+ if (a.width - a.rowWidth[v] > I && m != v) {
2577
+ E.splice(-1, 1), a.rows[v].push(p), a.rowWidth[m] = a.rowWidth[m] - I, a.rowWidth[v] = a.rowWidth[v] + I, a.width = a.rowWidth[instance.getLongestRowIndex(a)];
2578
+ for (var w = Number.MIN_VALUE, R = 0; R < E.length; R++)
2579
+ E[R].height > w && (w = E[R].height);
2580
+ m > 0 && (w += a.verticalPadding);
2581
+ var H = a.rowHeight[m] + a.rowHeight[v];
2582
+ a.rowHeight[m] = w, a.rowHeight[v] < p.height + a.verticalPadding && (a.rowHeight[v] = p.height + a.verticalPadding);
2583
+ var x = a.rowHeight[m] + a.rowHeight[v];
2584
+ a.height += x - H, this.shiftToLastRow(a);
2585
+ }
2586
+ }, D.prototype.tilingPreLayout = function() {
2587
+ o.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2588
+ }, D.prototype.tilingPostLayout = function() {
2589
+ o.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2590
+ }, D.prototype.reduceTrees = function() {
2591
+ for (var a = [], m = !0, v; m; ) {
2592
+ var E = this.graphManager.getAllNodes(), p = [];
2593
+ m = !1;
2594
+ for (var I = 0; I < E.length; I++)
2595
+ if (v = E[I], v.getEdges().length == 1 && !v.getEdges()[0].isInterGraph && v.getChild() == null) {
2596
+ if (o.PURE_INCREMENTAL) {
2597
+ var w = v.getEdges()[0].getOtherEnd(v), R = new L(v.getCenterX() - w.getCenterX(), v.getCenterY() - w.getCenterY());
2598
+ p.push([v, v.getEdges()[0], v.getOwner(), R]);
2599
+ } else
2600
+ p.push([v, v.getEdges()[0], v.getOwner()]);
2601
+ m = !0;
2602
+ }
2603
+ if (m == !0) {
2604
+ for (var H = [], x = 0; x < p.length; x++)
2605
+ p[x][0].getEdges().length == 1 && (H.push(p[x]), p[x][0].getOwner().remove(p[x][0]));
2606
+ a.push(H), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2607
+ }
2608
+ }
2609
+ this.prunedNodesAll = a;
2610
+ }, D.prototype.growTree = function(a) {
2611
+ for (var m = a.length, v = a[m - 1], E, p = 0; p < v.length; p++)
2612
+ E = v[p], this.findPlaceforPrunedNode(E), E[2].add(E[0]), E[2].add(E[1], E[1].source, E[1].target);
2613
+ a.splice(a.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2614
+ }, D.prototype.findPlaceforPrunedNode = function(a) {
2615
+ var m, v, E = a[0];
2616
+ if (E == a[1].source ? v = a[1].target : v = a[1].source, o.PURE_INCREMENTAL)
2617
+ E.setCenter(v.getCenterX() + a[3].getWidth(), v.getCenterY() + a[3].getHeight());
2618
+ else {
2619
+ var p = v.startX, I = v.finishX, w = v.startY, R = v.finishY, H = 0, x = 0, k = 0, W = 0, U = [H, k, x, W];
2620
+ if (w > 0)
2621
+ for (var et = p; et <= I; et++)
2622
+ U[0] += this.grid[et][w - 1].length + this.grid[et][w].length - 1;
2623
+ if (I < this.grid.length - 1)
2624
+ for (var et = w; et <= R; et++)
2625
+ U[1] += this.grid[I + 1][et].length + this.grid[I][et].length - 1;
2626
+ if (R < this.grid[0].length - 1)
2627
+ for (var et = p; et <= I; et++)
2628
+ U[2] += this.grid[et][R + 1].length + this.grid[et][R].length - 1;
2629
+ if (p > 0)
2630
+ for (var et = w; et <= R; et++)
2631
+ U[3] += this.grid[p - 1][et].length + this.grid[p][et].length - 1;
2632
+ for (var z = M.MAX_VALUE, O, X, B = 0; B < U.length; B++)
2633
+ U[B] < z ? (z = U[B], O = 1, X = B) : U[B] == z && O++;
2634
+ if (O == 3 && z == 0)
2635
+ U[0] == 0 && U[1] == 0 && U[2] == 0 ? m = 1 : U[0] == 0 && U[1] == 0 && U[3] == 0 ? m = 0 : U[0] == 0 && U[2] == 0 && U[3] == 0 ? m = 3 : U[1] == 0 && U[2] == 0 && U[3] == 0 && (m = 2);
2636
+ else if (O == 2 && z == 0) {
2637
+ var _ = Math.floor(Math.random() * 2);
2638
+ U[0] == 0 && U[1] == 0 ? _ == 0 ? m = 0 : m = 1 : U[0] == 0 && U[2] == 0 ? _ == 0 ? m = 0 : m = 2 : U[0] == 0 && U[3] == 0 ? _ == 0 ? m = 0 : m = 3 : U[1] == 0 && U[2] == 0 ? _ == 0 ? m = 1 : m = 2 : U[1] == 0 && U[3] == 0 ? _ == 0 ? m = 1 : m = 3 : _ == 0 ? m = 2 : m = 3;
2639
+ } else if (O == 4 && z == 0) {
2640
+ var _ = Math.floor(Math.random() * 4);
2641
+ m = _;
2642
+ } else
2643
+ m = X;
2644
+ m == 0 ? E.setCenter(v.getCenterX(), v.getCenterY() - v.getHeight() / 2 - l.DEFAULT_EDGE_LENGTH - E.getHeight() / 2) : m == 1 ? E.setCenter(v.getCenterX() + v.getWidth() / 2 + l.DEFAULT_EDGE_LENGTH + E.getWidth() / 2, v.getCenterY()) : m == 2 ? E.setCenter(v.getCenterX(), v.getCenterY() + v.getHeight() / 2 + l.DEFAULT_EDGE_LENGTH + E.getHeight() / 2) : E.setCenter(v.getCenterX() - v.getWidth() / 2 - l.DEFAULT_EDGE_LENGTH - E.getWidth() / 2, v.getCenterY());
2645
+ }
2646
+ }, i.exports = D;
2647
+ }
2648
+ ),
2649
+ /***/
2650
+ 991: (
2651
+ /***/
2652
+ (i, r, e) => {
2653
+ var f = e(551).FDLayoutNode, n = e(551).IMath;
2654
+ function y(h, o, c, l) {
2655
+ f.call(this, h, o, c, l);
2656
+ }
2657
+ y.prototype = Object.create(f.prototype);
2658
+ for (var t in f)
2659
+ y[t] = f[t];
2660
+ y.prototype.calculateDisplacement = function() {
2661
+ var h = this.graphManager.getLayout();
2662
+ 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 * n.sign(this.displacementX)), Math.abs(this.displacementY) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementY = h.coolingFactor * h.maxNodeDisplacement * n.sign(this.displacementY)), this.child && this.child.getNodes().length > 0 && this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
2663
+ }, y.prototype.propogateDisplacementToChildren = function(h, o) {
2664
+ for (var c = this.getChild().getNodes(), l, T = 0; T < c.length; T++)
2665
+ l = c[T], l.getChild() == null ? (l.displacementX += h, l.displacementY += o) : l.propogateDisplacementToChildren(h, o);
2666
+ }, y.prototype.move = function() {
2667
+ var h = this.graphManager.getLayout();
2668
+ (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;
2669
+ }, y.prototype.setPred1 = function(h) {
2670
+ this.pred1 = h;
2671
+ }, y.prototype.getPred1 = function() {
2672
+ return pred1;
2673
+ }, y.prototype.getPred2 = function() {
2674
+ return pred2;
2675
+ }, y.prototype.setNext = function(h) {
2676
+ this.next = h;
2677
+ }, y.prototype.getNext = function() {
2678
+ return next;
2679
+ }, y.prototype.setProcessed = function(h) {
2680
+ this.processed = h;
2681
+ }, y.prototype.isProcessed = function() {
2682
+ return processed;
2683
+ }, i.exports = y;
2684
+ }
2685
+ ),
2686
+ /***/
2687
+ 902: (
2688
+ /***/
2689
+ (i, r, e) => {
2690
+ function f(c) {
2691
+ if (Array.isArray(c)) {
2692
+ for (var l = 0, T = Array(c.length); l < c.length; l++)
2693
+ T[l] = c[l];
2694
+ return T;
2695
+ } else
2696
+ return Array.from(c);
2697
+ }
2698
+ var n = e(806), y = e(551).LinkedList, t = e(551).Matrix, h = e(551).SVD;
2699
+ function o() {
2700
+ }
2701
+ o.handleConstraints = function(c) {
2702
+ var l = {};
2703
+ l.fixedNodeConstraint = c.constraints.fixedNodeConstraint, l.alignmentConstraint = c.constraints.alignmentConstraint, l.relativePlacementConstraint = c.constraints.relativePlacementConstraint;
2704
+ for (var T = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), d = [], L = [], F = c.getAllNodes(), M = 0, P = 0; P < F.length; P++) {
2705
+ var J = F[P];
2706
+ J.getChild() == null && (g.set(J.id, M++), d.push(J.getCenterX()), L.push(J.getCenterY()), T.set(J.id, J));
2707
+ }
2708
+ l.relativePlacementConstraint && l.relativePlacementConstraint.forEach(function(S) {
2709
+ !S.gap && S.gap != 0 && (S.left ? S.gap = n.DEFAULT_EDGE_LENGTH + T.get(S.left).getWidth() / 2 + T.get(S.right).getWidth() / 2 : S.gap = n.DEFAULT_EDGE_LENGTH + T.get(S.top).getHeight() / 2 + T.get(S.bottom).getHeight() / 2);
2710
+ });
2711
+ var V = function(b, $) {
2712
+ return { x: b.x - $.x, y: b.y - $.y };
2713
+ }, Q = function(b) {
2714
+ var $ = 0, K = 0;
2715
+ return b.forEach(function(Z) {
2716
+ $ += d[g.get(Z)], K += L[g.get(Z)];
2717
+ }), { x: $ / b.size, y: K / b.size };
2718
+ }, D = function(b, $, K, Z, nt) {
2719
+ function ut(ft, st) {
2720
+ var Ct = new Set(ft), ct = !0, ht = !1, Wt = void 0;
2721
+ try {
2722
+ for (var Nt = st[Symbol.iterator](), Mt; !(ct = (Mt = Nt.next()).done); ct = !0) {
2723
+ var Zt = Mt.value;
2724
+ Ct.add(Zt);
2725
+ }
2726
+ } catch (Gt) {
2727
+ ht = !0, Wt = Gt;
2728
+ } finally {
2729
+ try {
2730
+ !ct && Nt.return && Nt.return();
2731
+ } finally {
2732
+ if (ht)
2733
+ throw Wt;
2734
+ }
2735
+ }
2736
+ return Ct;
2737
+ }
2738
+ var ot = /* @__PURE__ */ new Map();
2739
+ b.forEach(function(ft, st) {
2740
+ ot.set(st, 0);
2741
+ }), b.forEach(function(ft, st) {
2742
+ ft.forEach(function(Ct) {
2743
+ ot.set(Ct.id, ot.get(Ct.id) + 1);
2744
+ });
2745
+ });
2746
+ var tt = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), dt = new y();
2747
+ ot.forEach(function(ft, st) {
2748
+ ft == 0 ? (dt.push(st), K || ($ == "horizontal" ? tt.set(st, g.has(st) ? d[g.get(st)] : Z.get(st)) : tt.set(st, g.has(st) ? L[g.get(st)] : Z.get(st)))) : tt.set(st, Number.NEGATIVE_INFINITY), K && j.set(st, /* @__PURE__ */ new Set([st]));
2749
+ }), K && nt.forEach(function(ft) {
2750
+ var st = [];
2751
+ if (ft.forEach(function(ht) {
2752
+ K.has(ht) && st.push(ht);
2753
+ }), st.length > 0) {
2754
+ var Ct = 0;
2755
+ st.forEach(function(ht) {
2756
+ $ == "horizontal" ? (tt.set(ht, g.has(ht) ? d[g.get(ht)] : Z.get(ht)), Ct += tt.get(ht)) : (tt.set(ht, g.has(ht) ? L[g.get(ht)] : Z.get(ht)), Ct += tt.get(ht));
2757
+ }), Ct = Ct / st.length, ft.forEach(function(ht) {
2758
+ K.has(ht) || tt.set(ht, Ct);
2759
+ });
2760
+ } else {
2761
+ var ct = 0;
2762
+ ft.forEach(function(ht) {
2763
+ $ == "horizontal" ? ct += g.has(ht) ? d[g.get(ht)] : Z.get(ht) : ct += g.has(ht) ? L[g.get(ht)] : Z.get(ht);
2764
+ }), ct = ct / ft.length, ft.forEach(function(ht) {
2765
+ tt.set(ht, ct);
2766
+ });
2767
+ }
2768
+ });
2769
+ for (var wt = function() {
2770
+ var st = dt.shift(), Ct = b.get(st);
2771
+ Ct.forEach(function(ct) {
2772
+ if (tt.get(ct.id) < tt.get(st) + ct.gap)
2773
+ if (K && K.has(ct.id)) {
2774
+ var ht = void 0;
2775
+ if ($ == "horizontal" ? ht = g.has(ct.id) ? d[g.get(ct.id)] : Z.get(ct.id) : ht = g.has(ct.id) ? L[g.get(ct.id)] : Z.get(ct.id), tt.set(ct.id, ht), ht < tt.get(st) + ct.gap) {
2776
+ var Wt = tt.get(st) + ct.gap - ht;
2777
+ j.get(st).forEach(function(Nt) {
2778
+ tt.set(Nt, tt.get(Nt) - Wt);
2779
+ });
2780
+ }
2781
+ } else
2782
+ tt.set(ct.id, tt.get(st) + ct.gap);
2783
+ ot.set(ct.id, ot.get(ct.id) - 1), ot.get(ct.id) == 0 && dt.push(ct.id), K && j.set(ct.id, ut(j.get(st), j.get(ct.id)));
2784
+ });
2785
+ }; dt.length != 0; )
2786
+ wt();
2787
+ if (K) {
2788
+ var yt = /* @__PURE__ */ new Set();
2789
+ b.forEach(function(ft, st) {
2790
+ ft.length == 0 && yt.add(st);
2791
+ });
2792
+ var It = [];
2793
+ j.forEach(function(ft, st) {
2794
+ if (yt.has(st)) {
2795
+ var Ct = !1, ct = !0, ht = !1, Wt = void 0;
2796
+ try {
2797
+ for (var Nt = ft[Symbol.iterator](), Mt; !(ct = (Mt = Nt.next()).done); ct = !0) {
2798
+ var Zt = Mt.value;
2799
+ K.has(Zt) && (Ct = !0);
2800
+ }
2801
+ } catch (Ft) {
2802
+ ht = !0, Wt = Ft;
2803
+ } finally {
2804
+ try {
2805
+ !ct && Nt.return && Nt.return();
2806
+ } finally {
2807
+ if (ht)
2808
+ throw Wt;
2809
+ }
2810
+ }
2811
+ if (!Ct) {
2812
+ var Gt = !1, $t = void 0;
2813
+ It.forEach(function(Ft, qt) {
2814
+ Ft.has([].concat(f(ft))[0]) && (Gt = !0, $t = qt);
2815
+ }), Gt ? ft.forEach(function(Ft) {
2816
+ It[$t].add(Ft);
2817
+ }) : It.push(new Set(ft));
2818
+ }
2819
+ }
2820
+ }), It.forEach(function(ft, st) {
2821
+ var Ct = Number.POSITIVE_INFINITY, ct = Number.POSITIVE_INFINITY, ht = Number.NEGATIVE_INFINITY, Wt = Number.NEGATIVE_INFINITY, Nt = !0, Mt = !1, Zt = void 0;
2822
+ try {
2823
+ for (var Gt = ft[Symbol.iterator](), $t; !(Nt = ($t = Gt.next()).done); Nt = !0) {
2824
+ var Ft = $t.value, qt = void 0;
2825
+ $ == "horizontal" ? qt = g.has(Ft) ? d[g.get(Ft)] : Z.get(Ft) : qt = g.has(Ft) ? L[g.get(Ft)] : Z.get(Ft);
2826
+ var _t = tt.get(Ft);
2827
+ qt < Ct && (Ct = qt), qt > ht && (ht = qt), _t < ct && (ct = _t), _t > Wt && (Wt = _t);
2828
+ }
2829
+ } catch (ie) {
2830
+ Mt = !0, Zt = ie;
2831
+ } finally {
2832
+ try {
2833
+ !Nt && Gt.return && Gt.return();
2834
+ } finally {
2835
+ if (Mt)
2836
+ throw Zt;
2837
+ }
2838
+ }
2839
+ var de = (Ct + ht) / 2 - (ct + Wt) / 2, Kt = !0, te = !1, ee = void 0;
2840
+ try {
2841
+ for (var jt = ft[Symbol.iterator](), se; !(Kt = (se = jt.next()).done); Kt = !0) {
2842
+ var re = se.value;
2843
+ tt.set(re, tt.get(re) + de);
2844
+ }
2845
+ } catch (ie) {
2846
+ te = !0, ee = ie;
2847
+ } finally {
2848
+ try {
2849
+ !Kt && jt.return && jt.return();
2850
+ } finally {
2851
+ if (te)
2852
+ throw ee;
2853
+ }
2854
+ }
2855
+ });
2856
+ }
2857
+ return tt;
2858
+ }, rt = function(b) {
2859
+ var $ = 0, K = 0, Z = 0, nt = 0;
2860
+ if (b.forEach(function(j) {
2861
+ j.left ? d[g.get(j.left)] - d[g.get(j.right)] >= 0 ? $++ : K++ : L[g.get(j.top)] - L[g.get(j.bottom)] >= 0 ? Z++ : nt++;
2862
+ }), $ > K && Z > nt)
2863
+ for (var ut = 0; ut < g.size; ut++)
2864
+ d[ut] = -1 * d[ut], L[ut] = -1 * L[ut];
2865
+ else if ($ > K)
2866
+ for (var ot = 0; ot < g.size; ot++)
2867
+ d[ot] = -1 * d[ot];
2868
+ else if (Z > nt)
2869
+ for (var tt = 0; tt < g.size; tt++)
2870
+ L[tt] = -1 * L[tt];
2871
+ }, a = function(b) {
2872
+ var $ = [], K = new y(), Z = /* @__PURE__ */ new Set(), nt = 0;
2873
+ return b.forEach(function(ut, ot) {
2874
+ if (!Z.has(ot)) {
2875
+ $[nt] = [];
2876
+ var tt = ot;
2877
+ for (K.push(tt), Z.add(tt), $[nt].push(tt); K.length != 0; ) {
2878
+ tt = K.shift();
2879
+ var j = b.get(tt);
2880
+ j.forEach(function(dt) {
2881
+ Z.has(dt.id) || (K.push(dt.id), Z.add(dt.id), $[nt].push(dt.id));
2882
+ });
2883
+ }
2884
+ nt++;
2885
+ }
2886
+ }), $;
2887
+ }, m = function(b) {
2888
+ var $ = /* @__PURE__ */ new Map();
2889
+ return b.forEach(function(K, Z) {
2890
+ $.set(Z, []);
2891
+ }), b.forEach(function(K, Z) {
2892
+ K.forEach(function(nt) {
2893
+ $.get(Z).push(nt), $.get(nt.id).push({ id: Z, gap: nt.gap, direction: nt.direction });
2894
+ });
2895
+ }), $;
2896
+ }, v = function(b) {
2897
+ var $ = /* @__PURE__ */ new Map();
2898
+ return b.forEach(function(K, Z) {
2899
+ $.set(Z, []);
2900
+ }), b.forEach(function(K, Z) {
2901
+ K.forEach(function(nt) {
2902
+ $.get(nt.id).push({ id: Z, gap: nt.gap, direction: nt.direction });
2903
+ });
2904
+ }), $;
2905
+ }, E = [], p = [], I = !1, w = !1, R = /* @__PURE__ */ new Set(), H = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map(), k = [];
2906
+ if (l.fixedNodeConstraint && l.fixedNodeConstraint.forEach(function(S) {
2907
+ R.add(S.nodeId);
2908
+ }), l.relativePlacementConstraint && (l.relativePlacementConstraint.forEach(function(S) {
2909
+ S.left ? (H.has(S.left) ? H.get(S.left).push({ id: S.right, gap: S.gap, direction: "horizontal" }) : H.set(S.left, [{ id: S.right, gap: S.gap, direction: "horizontal" }]), H.has(S.right) || H.set(S.right, [])) : (H.has(S.top) ? H.get(S.top).push({ id: S.bottom, gap: S.gap, direction: "vertical" }) : H.set(S.top, [{ id: S.bottom, gap: S.gap, direction: "vertical" }]), H.has(S.bottom) || H.set(S.bottom, []));
2910
+ }), x = m(H), k = a(x)), n.TRANSFORM_ON_CONSTRAINT_HANDLING) {
2911
+ if (l.fixedNodeConstraint && l.fixedNodeConstraint.length > 1)
2912
+ l.fixedNodeConstraint.forEach(function(S, b) {
2913
+ E[b] = [S.position.x, S.position.y], p[b] = [d[g.get(S.nodeId)], L[g.get(S.nodeId)]];
2914
+ }), I = !0;
2915
+ else if (l.alignmentConstraint)
2916
+ (function() {
2917
+ var S = 0;
2918
+ if (l.alignmentConstraint.vertical) {
2919
+ for (var b = l.alignmentConstraint.vertical, $ = function(tt) {
2920
+ var j = /* @__PURE__ */ new Set();
2921
+ b[tt].forEach(function(yt) {
2922
+ j.add(yt);
2923
+ });
2924
+ var dt = new Set([].concat(f(j)).filter(function(yt) {
2925
+ return R.has(yt);
2926
+ })), wt = void 0;
2927
+ dt.size > 0 ? wt = d[g.get(dt.values().next().value)] : wt = Q(j).x, b[tt].forEach(function(yt) {
2928
+ E[S] = [wt, L[g.get(yt)]], p[S] = [d[g.get(yt)], L[g.get(yt)]], S++;
2929
+ });
2930
+ }, K = 0; K < b.length; K++)
2931
+ $(K);
2932
+ I = !0;
2933
+ }
2934
+ if (l.alignmentConstraint.horizontal) {
2935
+ for (var Z = l.alignmentConstraint.horizontal, nt = function(tt) {
2936
+ var j = /* @__PURE__ */ new Set();
2937
+ Z[tt].forEach(function(yt) {
2938
+ j.add(yt);
2939
+ });
2940
+ var dt = new Set([].concat(f(j)).filter(function(yt) {
2941
+ return R.has(yt);
2942
+ })), wt = void 0;
2943
+ dt.size > 0 ? wt = d[g.get(dt.values().next().value)] : wt = Q(j).y, Z[tt].forEach(function(yt) {
2944
+ E[S] = [d[g.get(yt)], wt], p[S] = [d[g.get(yt)], L[g.get(yt)]], S++;
2945
+ });
2946
+ }, ut = 0; ut < Z.length; ut++)
2947
+ nt(ut);
2948
+ I = !0;
2949
+ }
2950
+ l.relativePlacementConstraint && (w = !0);
2951
+ })();
2952
+ else if (l.relativePlacementConstraint) {
2953
+ for (var W = 0, U = 0, et = 0; et < k.length; et++)
2954
+ k[et].length > W && (W = k[et].length, U = et);
2955
+ if (W < x.size / 2)
2956
+ rt(l.relativePlacementConstraint), I = !1, w = !1;
2957
+ else {
2958
+ var z = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), X = [];
2959
+ k[U].forEach(function(S) {
2960
+ H.get(S).forEach(function(b) {
2961
+ b.direction == "horizontal" ? (z.has(S) ? z.get(S).push(b) : z.set(S, [b]), z.has(b.id) || z.set(b.id, []), X.push({ left: S, right: b.id })) : (O.has(S) ? O.get(S).push(b) : O.set(S, [b]), O.has(b.id) || O.set(b.id, []), X.push({ top: S, bottom: b.id }));
2962
+ });
2963
+ }), rt(X), w = !1;
2964
+ var B = D(z, "horizontal"), _ = D(O, "vertical");
2965
+ k[U].forEach(function(S, b) {
2966
+ p[b] = [d[g.get(S)], L[g.get(S)]], E[b] = [], B.has(S) ? E[b][0] = B.get(S) : E[b][0] = d[g.get(S)], _.has(S) ? E[b][1] = _.get(S) : E[b][1] = L[g.get(S)];
2967
+ }), I = !0;
2968
+ }
2969
+ }
2970
+ if (I) {
2971
+ for (var lt = void 0, q = t.transpose(E), Rt = t.transpose(p), Lt = 0; Lt < q.length; Lt++)
2972
+ q[Lt] = t.multGamma(q[Lt]), Rt[Lt] = t.multGamma(Rt[Lt]);
2973
+ var vt = t.multMat(q, t.transpose(Rt)), it = h.svd(vt);
2974
+ lt = t.multMat(it.V, t.transpose(it.U));
2975
+ for (var gt = 0; gt < g.size; gt++) {
2976
+ var Tt = [d[gt], L[gt]], At = [lt[0][0], lt[1][0]], Dt = [lt[0][1], lt[1][1]];
2977
+ d[gt] = t.dotProduct(Tt, At), L[gt] = t.dotProduct(Tt, Dt);
2978
+ }
2979
+ w && rt(l.relativePlacementConstraint);
2980
+ }
2981
+ }
2982
+ if (n.ENFORCE_CONSTRAINTS) {
2983
+ if (l.fixedNodeConstraint && l.fixedNodeConstraint.length > 0) {
2984
+ var mt = { x: 0, y: 0 };
2985
+ l.fixedNodeConstraint.forEach(function(S, b) {
2986
+ var $ = { x: d[g.get(S.nodeId)], y: L[g.get(S.nodeId)] }, K = S.position, Z = V(K, $);
2987
+ mt.x += Z.x, mt.y += Z.y;
2988
+ }), mt.x /= l.fixedNodeConstraint.length, mt.y /= l.fixedNodeConstraint.length, d.forEach(function(S, b) {
2989
+ d[b] += mt.x;
2990
+ }), L.forEach(function(S, b) {
2991
+ L[b] += mt.y;
2992
+ }), l.fixedNodeConstraint.forEach(function(S) {
2993
+ d[g.get(S.nodeId)] = S.position.x, L[g.get(S.nodeId)] = S.position.y;
2994
+ });
2995
+ }
2996
+ if (l.alignmentConstraint) {
2997
+ if (l.alignmentConstraint.vertical)
2998
+ for (var xt = l.alignmentConstraint.vertical, St = function(b) {
2999
+ var $ = /* @__PURE__ */ new Set();
3000
+ xt[b].forEach(function(nt) {
3001
+ $.add(nt);
3002
+ });
3003
+ var K = new Set([].concat(f($)).filter(function(nt) {
3004
+ return R.has(nt);
3005
+ })), Z = void 0;
3006
+ K.size > 0 ? Z = d[g.get(K.values().next().value)] : Z = Q($).x, $.forEach(function(nt) {
3007
+ R.has(nt) || (d[g.get(nt)] = Z);
3008
+ });
3009
+ }, Vt = 0; Vt < xt.length; Vt++)
3010
+ St(Vt);
3011
+ if (l.alignmentConstraint.horizontal)
3012
+ for (var Xt = l.alignmentConstraint.horizontal, Ut = function(b) {
3013
+ var $ = /* @__PURE__ */ new Set();
3014
+ Xt[b].forEach(function(nt) {
3015
+ $.add(nt);
3016
+ });
3017
+ var K = new Set([].concat(f($)).filter(function(nt) {
3018
+ return R.has(nt);
3019
+ })), Z = void 0;
3020
+ K.size > 0 ? Z = L[g.get(K.values().next().value)] : Z = Q($).y, $.forEach(function(nt) {
3021
+ R.has(nt) || (L[g.get(nt)] = Z);
3022
+ });
3023
+ }, bt = 0; bt < Xt.length; bt++)
3024
+ Ut(bt);
3025
+ }
3026
+ l.relativePlacementConstraint && function() {
3027
+ var S = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map(), nt = /* @__PURE__ */ new Map(), ut = /* @__PURE__ */ new Set(), ot = /* @__PURE__ */ new Set();
3028
+ if (R.forEach(function(Yt) {
3029
+ ut.add(Yt), ot.add(Yt);
3030
+ }), l.alignmentConstraint) {
3031
+ if (l.alignmentConstraint.vertical)
3032
+ for (var tt = l.alignmentConstraint.vertical, j = function(Et) {
3033
+ $.set("dummy" + Et, []), tt[Et].forEach(function(Ot) {
3034
+ S.set(Ot, "dummy" + Et), $.get("dummy" + Et).push(Ot), R.has(Ot) && ut.add("dummy" + Et);
3035
+ }), Z.set("dummy" + Et, d[g.get(tt[Et][0])]);
3036
+ }, dt = 0; dt < tt.length; dt++)
3037
+ j(dt);
3038
+ if (l.alignmentConstraint.horizontal)
3039
+ for (var wt = l.alignmentConstraint.horizontal, yt = function(Et) {
3040
+ K.set("dummy" + Et, []), wt[Et].forEach(function(Ot) {
3041
+ b.set(Ot, "dummy" + Et), K.get("dummy" + Et).push(Ot), R.has(Ot) && ot.add("dummy" + Et);
3042
+ }), nt.set("dummy" + Et, L[g.get(wt[Et][0])]);
3043
+ }, It = 0; It < wt.length; It++)
3044
+ yt(It);
3045
+ }
3046
+ var ft = /* @__PURE__ */ new Map(), st = /* @__PURE__ */ new Map(), Ct = function(Et) {
3047
+ H.get(Et).forEach(function(Ot) {
3048
+ var Jt = void 0, kt = void 0;
3049
+ Ot.direction == "horizontal" ? (Jt = S.get(Et) ? S.get(Et) : Et, S.get(Ot.id) ? kt = { id: S.get(Ot.id), gap: Ot.gap, direction: Ot.direction } : kt = Ot, ft.has(Jt) ? ft.get(Jt).push(kt) : ft.set(Jt, [kt]), ft.has(kt.id) || ft.set(kt.id, [])) : (Jt = b.get(Et) ? b.get(Et) : Et, b.get(Ot.id) ? kt = { id: b.get(Ot.id), gap: Ot.gap, direction: Ot.direction } : kt = Ot, st.has(Jt) ? st.get(Jt).push(kt) : st.set(Jt, [kt]), st.has(kt.id) || st.set(kt.id, []));
3050
+ });
3051
+ }, ct = !0, ht = !1, Wt = void 0;
3052
+ try {
3053
+ for (var Nt = H.keys()[Symbol.iterator](), Mt; !(ct = (Mt = Nt.next()).done); ct = !0) {
3054
+ var Zt = Mt.value;
3055
+ Ct(Zt);
3056
+ }
3057
+ } catch (Yt) {
3058
+ ht = !0, Wt = Yt;
3059
+ } finally {
3060
+ try {
3061
+ !ct && Nt.return && Nt.return();
3062
+ } finally {
3063
+ if (ht)
3064
+ throw Wt;
3065
+ }
3066
+ }
3067
+ var Gt = m(ft), $t = m(st), Ft = a(Gt), qt = a($t), _t = v(ft), de = v(st), Kt = [], te = [];
3068
+ Ft.forEach(function(Yt, Et) {
3069
+ Kt[Et] = [], Yt.forEach(function(Ot) {
3070
+ _t.get(Ot).length == 0 && Kt[Et].push(Ot);
3071
+ });
3072
+ }), qt.forEach(function(Yt, Et) {
3073
+ te[Et] = [], Yt.forEach(function(Ot) {
3074
+ de.get(Ot).length == 0 && te[Et].push(Ot);
3075
+ });
3076
+ });
3077
+ var ee = D(ft, "horizontal", ut, Z, Kt), jt = D(st, "vertical", ot, nt, te), se = function(Et) {
3078
+ $.get(Et) ? $.get(Et).forEach(function(Ot) {
3079
+ d[g.get(Ot)] = ee.get(Et);
3080
+ }) : d[g.get(Et)] = ee.get(Et);
3081
+ }, re = !0, ie = !1, Le = void 0;
3082
+ try {
3083
+ for (var ve = ee.keys()[Symbol.iterator](), Ce; !(re = (Ce = ve.next()).done); re = !0) {
3084
+ var pe = Ce.value;
3085
+ se(pe);
3086
+ }
3087
+ } catch (Yt) {
3088
+ ie = !0, Le = Yt;
3089
+ } finally {
3090
+ try {
3091
+ !re && ve.return && ve.return();
3092
+ } finally {
3093
+ if (ie)
3094
+ throw Le;
3095
+ }
3096
+ }
3097
+ var Ze = function(Et) {
3098
+ K.get(Et) ? K.get(Et).forEach(function(Ot) {
3099
+ L[g.get(Ot)] = jt.get(Et);
3100
+ }) : L[g.get(Et)] = jt.get(Et);
3101
+ }, ye = !0, Me = !1, Ae = void 0;
3102
+ try {
3103
+ for (var Ee = jt.keys()[Symbol.iterator](), we; !(ye = (we = Ee.next()).done); ye = !0) {
3104
+ var pe = we.value;
3105
+ Ze(pe);
3106
+ }
3107
+ } catch (Yt) {
3108
+ Me = !0, Ae = Yt;
3109
+ } finally {
3110
+ try {
3111
+ !ye && Ee.return && Ee.return();
3112
+ } finally {
3113
+ if (Me)
3114
+ throw Ae;
3115
+ }
3116
+ }
3117
+ }();
3118
+ }
3119
+ for (var Ht = 0; Ht < F.length; Ht++) {
3120
+ var Bt = F[Ht];
3121
+ Bt.getChild() == null && Bt.setCenter(d[g.get(Bt.id)], L[g.get(Bt.id)]);
3122
+ }
3123
+ }, i.exports = o;
3124
+ }
3125
+ ),
3126
+ /***/
3127
+ 551: (
3128
+ /***/
3129
+ (i) => {
3130
+ i.exports = A;
3131
+ }
3132
+ )
3133
+ /******/
3134
+ }, N = {};
3135
+ function u(i) {
3136
+ var r = N[i];
3137
+ if (r !== void 0)
3138
+ return r.exports;
3139
+ var e = N[i] = {
3140
+ /******/
3141
+ // no module.id needed
3142
+ /******/
3143
+ // no module.loaded needed
3144
+ /******/
3145
+ exports: {}
3146
+ /******/
3147
+ };
3148
+ return G[i](e, e.exports, u), e.exports;
3149
+ }
3150
+ var s = u(45);
3151
+ return s;
3152
+ })()
3153
+ );
3154
+ });
3155
+ }(fe)), fe.exports;
3156
+ }
3157
+ var dr = le.exports, xe;
3158
+ function vr() {
3159
+ return xe || (xe = 1, function(C, Y) {
3160
+ (function(G, N) {
3161
+ C.exports = N(gr());
3162
+ })(dr, function(A) {
3163
+ return (
3164
+ /******/
3165
+ (() => {
3166
+ var G = {
3167
+ /***/
3168
+ 658: (
3169
+ /***/
3170
+ (i) => {
3171
+ i.exports = Object.assign != null ? Object.assign.bind(Object) : function(r) {
3172
+ for (var e = arguments.length, f = Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
3173
+ f[n - 1] = arguments[n];
3174
+ return f.forEach(function(y) {
3175
+ Object.keys(y).forEach(function(t) {
3176
+ return r[t] = y[t];
3177
+ });
3178
+ }), r;
3179
+ };
3180
+ }
3181
+ ),
3182
+ /***/
3183
+ 548: (
3184
+ /***/
3185
+ (i, r, e) => {
3186
+ var f = /* @__PURE__ */ function() {
3187
+ function t(h, o) {
3188
+ var c = [], l = !0, T = !1, g = void 0;
3189
+ try {
3190
+ for (var d = h[Symbol.iterator](), L; !(l = (L = d.next()).done) && (c.push(L.value), !(o && c.length === o)); l = !0)
3191
+ ;
3192
+ } catch (F) {
3193
+ T = !0, g = F;
3194
+ } finally {
3195
+ try {
3196
+ !l && d.return && d.return();
3197
+ } finally {
3198
+ if (T) throw g;
3199
+ }
3200
+ }
3201
+ return c;
3202
+ }
3203
+ return function(h, o) {
3204
+ if (Array.isArray(h))
3205
+ return h;
3206
+ if (Symbol.iterator in Object(h))
3207
+ return t(h, o);
3208
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
3209
+ };
3210
+ }(), n = e(140).layoutBase.LinkedList, y = {};
3211
+ y.getTopMostNodes = function(t) {
3212
+ for (var h = {}, o = 0; o < t.length; o++)
3213
+ h[t[o].id()] = !0;
3214
+ var c = t.filter(function(l, T) {
3215
+ typeof l == "number" && (l = T);
3216
+ for (var g = l.parent()[0]; g != null; ) {
3217
+ if (h[g.id()])
3218
+ return !1;
3219
+ g = g.parent()[0];
3220
+ }
3221
+ return !0;
3222
+ });
3223
+ return c;
3224
+ }, y.connectComponents = function(t, h, o, c) {
3225
+ var l = new n(), T = /* @__PURE__ */ new Set(), g = [], d = void 0, L = void 0, F = void 0, M = !1, P = 1, J = [], V = [], Q = function() {
3226
+ var rt = t.collection();
3227
+ V.push(rt);
3228
+ var a = o[0], m = t.collection();
3229
+ m.merge(a).merge(a.descendants().intersection(h)), g.push(a), m.forEach(function(p) {
3230
+ l.push(p), T.add(p), rt.merge(p);
3231
+ });
3232
+ for (var v = function() {
3233
+ a = l.shift();
3234
+ var I = t.collection();
3235
+ a.neighborhood().nodes().forEach(function(x) {
3236
+ h.intersection(a.edgesWith(x)).length > 0 && I.merge(x);
3237
+ });
3238
+ for (var w = 0; w < I.length; w++) {
3239
+ var R = I[w];
3240
+ if (d = o.intersection(R.union(R.ancestors())), d != null && !T.has(d[0])) {
3241
+ var H = d.union(d.descendants());
3242
+ H.forEach(function(x) {
3243
+ l.push(x), T.add(x), rt.merge(x), o.has(x) && g.push(x);
3244
+ });
3245
+ }
3246
+ }
3247
+ }; l.length != 0; )
3248
+ v();
3249
+ if (rt.forEach(function(p) {
3250
+ h.intersection(p.connectedEdges()).forEach(function(I) {
3251
+ rt.has(I.source()) && rt.has(I.target()) && rt.merge(I);
3252
+ });
3253
+ }), g.length == o.length && (M = !0), !M || M && P > 1) {
3254
+ L = g[0], F = L.connectedEdges().length, g.forEach(function(p) {
3255
+ p.connectedEdges().length < F && (F = p.connectedEdges().length, L = p);
3256
+ }), J.push(L.id());
3257
+ var E = t.collection();
3258
+ E.merge(g[0]), g.forEach(function(p) {
3259
+ E.merge(p);
3260
+ }), g = [], o = o.difference(E), P++;
3261
+ }
3262
+ };
3263
+ do
3264
+ Q();
3265
+ while (!M);
3266
+ return c && J.length > 0 && c.set("dummy" + (c.size + 1), J), V;
3267
+ }, y.relocateComponent = function(t, h, o) {
3268
+ if (!o.fixedNodeConstraint) {
3269
+ var c = Number.POSITIVE_INFINITY, l = Number.NEGATIVE_INFINITY, T = Number.POSITIVE_INFINITY, g = Number.NEGATIVE_INFINITY;
3270
+ if (o.quality == "draft") {
3271
+ var d = !0, L = !1, F = void 0;
3272
+ try {
3273
+ for (var M = h.nodeIndexes[Symbol.iterator](), P; !(d = (P = M.next()).done); d = !0) {
3274
+ var J = P.value, V = f(J, 2), Q = V[0], D = V[1], rt = o.cy.getElementById(Q);
3275
+ if (rt) {
3276
+ var a = rt.boundingBox(), m = h.xCoords[D] - a.w / 2, v = h.xCoords[D] + a.w / 2, E = h.yCoords[D] - a.h / 2, p = h.yCoords[D] + a.h / 2;
3277
+ m < c && (c = m), v > l && (l = v), E < T && (T = E), p > g && (g = p);
3278
+ }
3279
+ }
3280
+ } catch (x) {
3281
+ L = !0, F = x;
3282
+ } finally {
3283
+ try {
3284
+ !d && M.return && M.return();
3285
+ } finally {
3286
+ if (L)
3287
+ throw F;
3288
+ }
3289
+ }
3290
+ var I = t.x - (l + c) / 2, w = t.y - (g + T) / 2;
3291
+ h.xCoords = h.xCoords.map(function(x) {
3292
+ return x + I;
3293
+ }), h.yCoords = h.yCoords.map(function(x) {
3294
+ return x + w;
3295
+ });
3296
+ } else {
3297
+ Object.keys(h).forEach(function(x) {
3298
+ var k = h[x], W = k.getRect().x, U = k.getRect().x + k.getRect().width, et = k.getRect().y, z = k.getRect().y + k.getRect().height;
3299
+ W < c && (c = W), U > l && (l = U), et < T && (T = et), z > g && (g = z);
3300
+ });
3301
+ var R = t.x - (l + c) / 2, H = t.y - (g + T) / 2;
3302
+ Object.keys(h).forEach(function(x) {
3303
+ var k = h[x];
3304
+ k.setCenter(k.getCenterX() + R, k.getCenterY() + H);
3305
+ });
3306
+ }
3307
+ }
3308
+ }, y.calcBoundingBox = function(t, h, o, c) {
3309
+ for (var l = Number.MAX_SAFE_INTEGER, T = Number.MIN_SAFE_INTEGER, g = Number.MAX_SAFE_INTEGER, d = Number.MIN_SAFE_INTEGER, L = void 0, F = void 0, M = void 0, P = void 0, J = t.descendants().not(":parent"), V = J.length, Q = 0; Q < V; Q++) {
3310
+ var D = J[Q];
3311
+ L = h[c.get(D.id())] - D.width() / 2, F = h[c.get(D.id())] + D.width() / 2, M = o[c.get(D.id())] - D.height() / 2, P = o[c.get(D.id())] + D.height() / 2, l > L && (l = L), T < F && (T = F), g > M && (g = M), d < P && (d = P);
3312
+ }
3313
+ var rt = {};
3314
+ return rt.topLeftX = l, rt.topLeftY = g, rt.width = T - l, rt.height = d - g, rt;
3315
+ }, y.calcParentsWithoutChildren = function(t, h) {
3316
+ var o = t.collection();
3317
+ return h.nodes(":parent").forEach(function(c) {
3318
+ var l = !1;
3319
+ c.children().forEach(function(T) {
3320
+ T.css("display") != "none" && (l = !0);
3321
+ }), l || o.merge(c);
3322
+ }), o;
3323
+ }, i.exports = y;
3324
+ }
3325
+ ),
3326
+ /***/
3327
+ 816: (
3328
+ /***/
3329
+ (i, r, e) => {
3330
+ var f = e(548), n = e(140).CoSELayout, y = e(140).CoSENode, t = e(140).layoutBase.PointD, h = e(140).layoutBase.DimensionD, o = e(140).layoutBase.LayoutConstants, c = e(140).layoutBase.FDLayoutConstants, l = e(140).CoSEConstants, T = function(d, L) {
3331
+ var F = d.cy, M = d.eles, P = M.nodes(), J = M.edges(), V = void 0, Q = void 0, D = void 0, rt = {};
3332
+ d.randomize && (V = L.nodeIndexes, Q = L.xCoords, D = L.yCoords);
3333
+ var a = function(x) {
3334
+ return typeof x == "function";
3335
+ }, m = function(x, k) {
3336
+ return a(x) ? x(k) : x;
3337
+ }, v = f.calcParentsWithoutChildren(F, M), E = function H(x, k, W, U) {
3338
+ for (var et = k.length, z = 0; z < et; z++) {
3339
+ var O = k[z], X = null;
3340
+ O.intersection(v).length == 0 && (X = O.children());
3341
+ var B = void 0, _ = O.layoutDimensions({
3342
+ nodeDimensionsIncludeLabels: U.nodeDimensionsIncludeLabels
3343
+ });
3344
+ if (O.outerWidth() != null && O.outerHeight() != null)
3345
+ if (U.randomize)
3346
+ if (!O.isParent())
3347
+ B = x.add(new y(W.graphManager, new t(Q[V.get(O.id())] - _.w / 2, D[V.get(O.id())] - _.h / 2), new h(parseFloat(_.w), parseFloat(_.h))));
3348
+ else {
3349
+ var lt = f.calcBoundingBox(O, Q, D, V);
3350
+ O.intersection(v).length == 0 ? B = x.add(new y(W.graphManager, new t(lt.topLeftX, lt.topLeftY), new h(lt.width, lt.height))) : B = x.add(new y(W.graphManager, new t(lt.topLeftX, lt.topLeftY), new h(parseFloat(_.w), parseFloat(_.h))));
3351
+ }
3352
+ else
3353
+ B = x.add(new y(W.graphManager, new t(O.position("x") - _.w / 2, O.position("y") - _.h / 2), new h(parseFloat(_.w), parseFloat(_.h))));
3354
+ else
3355
+ B = x.add(new y(this.graphManager));
3356
+ if (B.id = O.data("id"), B.nodeRepulsion = m(U.nodeRepulsion, O), B.paddingLeft = parseInt(O.css("padding")), B.paddingTop = parseInt(O.css("padding")), B.paddingRight = parseInt(O.css("padding")), B.paddingBottom = parseInt(O.css("padding")), U.nodeDimensionsIncludeLabels && (B.labelWidth = O.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).w, B.labelHeight = O.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).h, B.labelPosVertical = O.css("text-valign"), B.labelPosHorizontal = O.css("text-halign")), rt[O.data("id")] = B, isNaN(B.rect.x) && (B.rect.x = 0), isNaN(B.rect.y) && (B.rect.y = 0), X != null && X.length > 0) {
3357
+ var q = void 0;
3358
+ q = W.getGraphManager().add(W.newGraph(), B), H(q, X, W, U);
3359
+ }
3360
+ }
3361
+ }, p = function(x, k, W) {
3362
+ for (var U = 0, et = 0, z = 0; z < W.length; z++) {
3363
+ var O = W[z], X = rt[O.data("source")], B = rt[O.data("target")];
3364
+ if (X && B && X !== B && X.getEdgesBetween(B).length == 0) {
3365
+ var _ = k.add(x.newEdge(), X, B);
3366
+ _.id = O.id(), _.idealLength = m(d.idealEdgeLength, O), _.edgeElasticity = m(d.edgeElasticity, O), U += _.idealLength, et++;
3367
+ }
3368
+ }
3369
+ d.idealEdgeLength != null && (et > 0 ? l.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = U / et : a(d.idealEdgeLength) ? l.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = 50 : l.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = d.idealEdgeLength, l.MIN_REPULSION_DIST = c.MIN_REPULSION_DIST = c.DEFAULT_EDGE_LENGTH / 10, l.DEFAULT_RADIAL_SEPARATION = c.DEFAULT_EDGE_LENGTH);
3370
+ }, I = function(x, k) {
3371
+ k.fixedNodeConstraint && (x.constraints.fixedNodeConstraint = k.fixedNodeConstraint), k.alignmentConstraint && (x.constraints.alignmentConstraint = k.alignmentConstraint), k.relativePlacementConstraint && (x.constraints.relativePlacementConstraint = k.relativePlacementConstraint);
3372
+ };
3373
+ d.nestingFactor != null && (l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = d.nestingFactor), d.gravity != null && (l.DEFAULT_GRAVITY_STRENGTH = c.DEFAULT_GRAVITY_STRENGTH = d.gravity), d.numIter != null && (l.MAX_ITERATIONS = c.MAX_ITERATIONS = d.numIter), d.gravityRange != null && (l.DEFAULT_GRAVITY_RANGE_FACTOR = c.DEFAULT_GRAVITY_RANGE_FACTOR = d.gravityRange), d.gravityCompound != null && (l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = c.DEFAULT_COMPOUND_GRAVITY_STRENGTH = d.gravityCompound), d.gravityRangeCompound != null && (l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = d.gravityRangeCompound), d.initialEnergyOnIncremental != null && (l.DEFAULT_COOLING_FACTOR_INCREMENTAL = c.DEFAULT_COOLING_FACTOR_INCREMENTAL = d.initialEnergyOnIncremental), d.tilingCompareBy != null && (l.TILING_COMPARE_BY = d.tilingCompareBy), d.quality == "proof" ? o.QUALITY = 2 : o.QUALITY = 0, l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = o.NODE_DIMENSIONS_INCLUDE_LABELS = d.nodeDimensionsIncludeLabels, l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = o.DEFAULT_INCREMENTAL = !d.randomize, l.ANIMATE = c.ANIMATE = o.ANIMATE = d.animate, l.TILE = d.tile, l.TILING_PADDING_VERTICAL = typeof d.tilingPaddingVertical == "function" ? d.tilingPaddingVertical.call() : d.tilingPaddingVertical, l.TILING_PADDING_HORIZONTAL = typeof d.tilingPaddingHorizontal == "function" ? d.tilingPaddingHorizontal.call() : d.tilingPaddingHorizontal, l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = o.DEFAULT_INCREMENTAL = !0, l.PURE_INCREMENTAL = !d.randomize, o.DEFAULT_UNIFORM_LEAF_NODE_SIZES = d.uniformNodeDimensions, d.step == "transformed" && (l.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, l.ENFORCE_CONSTRAINTS = !1, l.APPLY_LAYOUT = !1), d.step == "enforced" && (l.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, l.ENFORCE_CONSTRAINTS = !0, l.APPLY_LAYOUT = !1), d.step == "cose" && (l.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, l.ENFORCE_CONSTRAINTS = !1, l.APPLY_LAYOUT = !0), d.step == "all" && (d.randomize ? l.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : l.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, l.ENFORCE_CONSTRAINTS = !0, l.APPLY_LAYOUT = !0), d.fixedNodeConstraint || d.alignmentConstraint || d.relativePlacementConstraint ? l.TREE_REDUCTION_ON_INCREMENTAL = !1 : l.TREE_REDUCTION_ON_INCREMENTAL = !0;
3374
+ var w = new n(), R = w.newGraphManager();
3375
+ return E(R.addRoot(), f.getTopMostNodes(P), w, d), p(w, R, J), I(w, d), w.runLayout(), rt;
3376
+ };
3377
+ i.exports = { coseLayout: T };
3378
+ }
3379
+ ),
3380
+ /***/
3381
+ 212: (
3382
+ /***/
3383
+ (i, r, e) => {
3384
+ var f = /* @__PURE__ */ function() {
3385
+ function d(L, F) {
3386
+ for (var M = 0; M < F.length; M++) {
3387
+ var P = F[M];
3388
+ P.enumerable = P.enumerable || !1, P.configurable = !0, "value" in P && (P.writable = !0), Object.defineProperty(L, P.key, P);
3389
+ }
3390
+ }
3391
+ return function(L, F, M) {
3392
+ return F && d(L.prototype, F), M && d(L, M), L;
3393
+ };
3394
+ }();
3395
+ function n(d, L) {
3396
+ if (!(d instanceof L))
3397
+ throw new TypeError("Cannot call a class as a function");
3398
+ }
3399
+ var y = e(658), t = e(548), h = e(657), o = h.spectralLayout, c = e(816), l = c.coseLayout, T = Object.freeze({
3400
+ // 'draft', 'default' or 'proof'
3401
+ // - 'draft' only applies spectral layout
3402
+ // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)
3403
+ // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate)
3404
+ quality: "default",
3405
+ // Use random node positions at beginning of layout
3406
+ // if this is set to false, then quality option must be "proof"
3407
+ randomize: !0,
3408
+ // Whether or not to animate the layout
3409
+ animate: !0,
3410
+ // Duration of animation in ms, if enabled
3411
+ animationDuration: 1e3,
3412
+ // Easing of animation, if enabled
3413
+ animationEasing: void 0,
3414
+ // Fit the viewport to the repositioned nodes
3415
+ fit: !0,
3416
+ // Padding around layout
3417
+ padding: 30,
3418
+ // Whether to include labels in node dimensions. Valid in "proof" quality
3419
+ nodeDimensionsIncludeLabels: !1,
3420
+ // Whether or not simple nodes (non-compound nodes) are of uniform dimensions
3421
+ uniformNodeDimensions: !1,
3422
+ // Whether to pack disconnected components - valid only if randomize: true
3423
+ packComponents: !0,
3424
+ // Layout step - all, transformed, enforced, cose - for debug purpose only
3425
+ step: "all",
3426
+ /* spectral layout options */
3427
+ // False for random, true for greedy
3428
+ samplingType: !0,
3429
+ // Sample size to construct distance matrix
3430
+ sampleSize: 25,
3431
+ // Separation amount between nodes
3432
+ nodeSeparation: 75,
3433
+ // Power iteration tolerance
3434
+ piTol: 1e-7,
3435
+ /* CoSE layout options */
3436
+ // Node repulsion (non overlapping) multiplier
3437
+ nodeRepulsion: function(L) {
3438
+ return 4500;
3439
+ },
3440
+ // Ideal edge (non nested) length
3441
+ idealEdgeLength: function(L) {
3442
+ return 50;
3443
+ },
3444
+ // Divisor to compute edge forces
3445
+ edgeElasticity: function(L) {
3446
+ return 0.45;
3447
+ },
3448
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
3449
+ nestingFactor: 0.1,
3450
+ // Gravity force (constant)
3451
+ gravity: 0.25,
3452
+ // Maximum number of iterations to perform
3453
+ numIter: 2500,
3454
+ // For enabling tiling
3455
+ tile: !0,
3456
+ // The function that specifies the criteria for comparing nodes while sorting them during tiling operation.
3457
+ // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.
3458
+ tilingCompareBy: void 0,
3459
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
3460
+ tilingPaddingVertical: 10,
3461
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
3462
+ tilingPaddingHorizontal: 10,
3463
+ // Gravity range (constant) for compounds
3464
+ gravityRangeCompound: 1.5,
3465
+ // Gravity force (constant) for compounds
3466
+ gravityCompound: 1,
3467
+ // Gravity range (constant)
3468
+ gravityRange: 3.8,
3469
+ // Initial cooling factor for incremental layout
3470
+ initialEnergyOnIncremental: 0.3,
3471
+ /* constraint options */
3472
+ // Fix required nodes to predefined positions
3473
+ // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]
3474
+ fixedNodeConstraint: void 0,
3475
+ // Align required nodes in vertical/horizontal direction
3476
+ // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}
3477
+ alignmentConstraint: void 0,
3478
+ // Place two nodes relatively in vertical/horizontal direction
3479
+ // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]
3480
+ relativePlacementConstraint: void 0,
3481
+ /* layout event callbacks */
3482
+ ready: function() {
3483
+ },
3484
+ // on layoutready
3485
+ stop: function() {
3486
+ }
3487
+ // on layoutstop
3488
+ }), g = function() {
3489
+ function d(L) {
3490
+ n(this, d), this.options = y({}, T, L);
3491
+ }
3492
+ return f(d, [{
3493
+ key: "run",
3494
+ value: function() {
3495
+ var F = this, M = this.options, P = M.cy, J = M.eles, V = [], Q = [], D = void 0, rt = [];
3496
+ M.fixedNodeConstraint && (!Array.isArray(M.fixedNodeConstraint) || M.fixedNodeConstraint.length == 0) && (M.fixedNodeConstraint = void 0), M.alignmentConstraint && (M.alignmentConstraint.vertical && (!Array.isArray(M.alignmentConstraint.vertical) || M.alignmentConstraint.vertical.length == 0) && (M.alignmentConstraint.vertical = void 0), M.alignmentConstraint.horizontal && (!Array.isArray(M.alignmentConstraint.horizontal) || M.alignmentConstraint.horizontal.length == 0) && (M.alignmentConstraint.horizontal = void 0)), M.relativePlacementConstraint && (!Array.isArray(M.relativePlacementConstraint) || M.relativePlacementConstraint.length == 0) && (M.relativePlacementConstraint = void 0);
3497
+ var a = M.fixedNodeConstraint || M.alignmentConstraint || M.relativePlacementConstraint;
3498
+ a && (M.tile = !1, M.packComponents = !1);
3499
+ var m = void 0, v = !1;
3500
+ if (P.layoutUtilities && M.packComponents && (m = P.layoutUtilities("get"), m || (m = P.layoutUtilities()), v = !0), J.nodes().length > 0)
3501
+ if (v) {
3502
+ var I = t.getTopMostNodes(M.eles.nodes());
3503
+ if (D = t.connectComponents(P, M.eles, I), D.forEach(function(vt) {
3504
+ var it = vt.boundingBox();
3505
+ rt.push({ x: it.x1 + it.w / 2, y: it.y1 + it.h / 2 });
3506
+ }), M.randomize && D.forEach(function(vt) {
3507
+ M.eles = vt, V.push(o(M));
3508
+ }), M.quality == "default" || M.quality == "proof") {
3509
+ var w = P.collection();
3510
+ if (M.tile) {
3511
+ var R = /* @__PURE__ */ new Map(), H = [], x = [], k = 0, W = { nodeIndexes: R, xCoords: H, yCoords: x }, U = [];
3512
+ if (D.forEach(function(vt, it) {
3513
+ vt.edges().length == 0 && (vt.nodes().forEach(function(gt, Tt) {
3514
+ w.merge(vt.nodes()[Tt]), gt.isParent() || (W.nodeIndexes.set(vt.nodes()[Tt].id(), k++), W.xCoords.push(vt.nodes()[0].position().x), W.yCoords.push(vt.nodes()[0].position().y));
3515
+ }), U.push(it));
3516
+ }), w.length > 1) {
3517
+ var et = w.boundingBox();
3518
+ rt.push({ x: et.x1 + et.w / 2, y: et.y1 + et.h / 2 }), D.push(w), V.push(W);
3519
+ for (var z = U.length - 1; z >= 0; z--)
3520
+ D.splice(U[z], 1), V.splice(U[z], 1), rt.splice(U[z], 1);
3521
+ }
3522
+ }
3523
+ D.forEach(function(vt, it) {
3524
+ M.eles = vt, Q.push(l(M, V[it])), t.relocateComponent(rt[it], Q[it], M);
3525
+ });
3526
+ } else
3527
+ D.forEach(function(vt, it) {
3528
+ t.relocateComponent(rt[it], V[it], M);
3529
+ });
3530
+ var O = /* @__PURE__ */ new Set();
3531
+ if (D.length > 1) {
3532
+ var X = [], B = J.filter(function(vt) {
3533
+ return vt.css("display") == "none";
3534
+ });
3535
+ D.forEach(function(vt, it) {
3536
+ var gt = void 0;
3537
+ if (M.quality == "draft" && (gt = V[it].nodeIndexes), vt.nodes().not(B).length > 0) {
3538
+ var Tt = {};
3539
+ Tt.edges = [], Tt.nodes = [];
3540
+ var At = void 0;
3541
+ vt.nodes().not(B).forEach(function(Dt) {
3542
+ if (M.quality == "draft")
3543
+ if (!Dt.isParent())
3544
+ At = gt.get(Dt.id()), Tt.nodes.push({ x: V[it].xCoords[At] - Dt.boundingbox().w / 2, y: V[it].yCoords[At] - Dt.boundingbox().h / 2, width: Dt.boundingbox().w, height: Dt.boundingbox().h });
3545
+ else {
3546
+ var mt = t.calcBoundingBox(Dt, V[it].xCoords, V[it].yCoords, gt);
3547
+ Tt.nodes.push({ x: mt.topLeftX, y: mt.topLeftY, width: mt.width, height: mt.height });
3548
+ }
3549
+ else
3550
+ Q[it][Dt.id()] && Tt.nodes.push({ x: Q[it][Dt.id()].getLeft(), y: Q[it][Dt.id()].getTop(), width: Q[it][Dt.id()].getWidth(), height: Q[it][Dt.id()].getHeight() });
3551
+ }), vt.edges().forEach(function(Dt) {
3552
+ var mt = Dt.source(), xt = Dt.target();
3553
+ if (mt.css("display") != "none" && xt.css("display") != "none")
3554
+ if (M.quality == "draft") {
3555
+ var St = gt.get(mt.id()), Vt = gt.get(xt.id()), Xt = [], Ut = [];
3556
+ if (mt.isParent()) {
3557
+ var bt = t.calcBoundingBox(mt, V[it].xCoords, V[it].yCoords, gt);
3558
+ Xt.push(bt.topLeftX + bt.width / 2), Xt.push(bt.topLeftY + bt.height / 2);
3559
+ } else
3560
+ Xt.push(V[it].xCoords[St]), Xt.push(V[it].yCoords[St]);
3561
+ if (xt.isParent()) {
3562
+ var Ht = t.calcBoundingBox(xt, V[it].xCoords, V[it].yCoords, gt);
3563
+ Ut.push(Ht.topLeftX + Ht.width / 2), Ut.push(Ht.topLeftY + Ht.height / 2);
3564
+ } else
3565
+ Ut.push(V[it].xCoords[Vt]), Ut.push(V[it].yCoords[Vt]);
3566
+ Tt.edges.push({ startX: Xt[0], startY: Xt[1], endX: Ut[0], endY: Ut[1] });
3567
+ } else
3568
+ Q[it][mt.id()] && Q[it][xt.id()] && Tt.edges.push({ startX: Q[it][mt.id()].getCenterX(), startY: Q[it][mt.id()].getCenterY(), endX: Q[it][xt.id()].getCenterX(), endY: Q[it][xt.id()].getCenterY() });
3569
+ }), Tt.nodes.length > 0 && (X.push(Tt), O.add(it));
3570
+ }
3571
+ });
3572
+ var _ = m.packComponents(X, M.randomize).shifts;
3573
+ if (M.quality == "draft")
3574
+ V.forEach(function(vt, it) {
3575
+ var gt = vt.xCoords.map(function(At) {
3576
+ return At + _[it].dx;
3577
+ }), Tt = vt.yCoords.map(function(At) {
3578
+ return At + _[it].dy;
3579
+ });
3580
+ vt.xCoords = gt, vt.yCoords = Tt;
3581
+ });
3582
+ else {
3583
+ var lt = 0;
3584
+ O.forEach(function(vt) {
3585
+ Object.keys(Q[vt]).forEach(function(it) {
3586
+ var gt = Q[vt][it];
3587
+ gt.setCenter(gt.getCenterX() + _[lt].dx, gt.getCenterY() + _[lt].dy);
3588
+ }), lt++;
3589
+ });
3590
+ }
3591
+ }
3592
+ } else {
3593
+ var E = M.eles.boundingBox();
3594
+ if (rt.push({ x: E.x1 + E.w / 2, y: E.y1 + E.h / 2 }), M.randomize) {
3595
+ var p = o(M);
3596
+ V.push(p);
3597
+ }
3598
+ M.quality == "default" || M.quality == "proof" ? (Q.push(l(M, V[0])), t.relocateComponent(rt[0], Q[0], M)) : t.relocateComponent(rt[0], V[0], M);
3599
+ }
3600
+ var q = function(it, gt) {
3601
+ if (M.quality == "default" || M.quality == "proof") {
3602
+ typeof it == "number" && (it = gt);
3603
+ var Tt = void 0, At = void 0, Dt = it.data("id");
3604
+ return Q.forEach(function(xt) {
3605
+ Dt in xt && (Tt = { x: xt[Dt].getRect().getCenterX(), y: xt[Dt].getRect().getCenterY() }, At = xt[Dt]);
3606
+ }), M.nodeDimensionsIncludeLabels && (At.labelWidth && (At.labelPosHorizontal == "left" ? Tt.x += At.labelWidth / 2 : At.labelPosHorizontal == "right" && (Tt.x -= At.labelWidth / 2)), At.labelHeight && (At.labelPosVertical == "top" ? Tt.y += At.labelHeight / 2 : At.labelPosVertical == "bottom" && (Tt.y -= At.labelHeight / 2))), Tt == null && (Tt = { x: it.position("x"), y: it.position("y") }), {
3607
+ x: Tt.x,
3608
+ y: Tt.y
3609
+ };
3610
+ } else {
3611
+ var mt = void 0;
3612
+ return V.forEach(function(xt) {
3613
+ var St = xt.nodeIndexes.get(it.id());
3614
+ St != null && (mt = { x: xt.xCoords[St], y: xt.yCoords[St] });
3615
+ }), mt == null && (mt = { x: it.position("x"), y: it.position("y") }), {
3616
+ x: mt.x,
3617
+ y: mt.y
3618
+ };
3619
+ }
3620
+ };
3621
+ if (M.quality == "default" || M.quality == "proof" || M.randomize) {
3622
+ var Rt = t.calcParentsWithoutChildren(P, J), Lt = J.filter(function(vt) {
3623
+ return vt.css("display") == "none";
3624
+ });
3625
+ M.eles = J.not(Lt), J.nodes().not(":parent").not(Lt).layoutPositions(F, M, q), Rt.length > 0 && Rt.forEach(function(vt) {
3626
+ vt.position(q(vt));
3627
+ });
3628
+ } else
3629
+ console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
3630
+ }
3631
+ }]), d;
3632
+ }();
3633
+ i.exports = g;
3634
+ }
3635
+ ),
3636
+ /***/
3637
+ 657: (
3638
+ /***/
3639
+ (i, r, e) => {
3640
+ var f = e(548), n = e(140).layoutBase.Matrix, y = e(140).layoutBase.SVD, t = function(o) {
3641
+ var c = o.cy, l = o.eles, T = l.nodes(), g = l.nodes(":parent"), d = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), M = [], P = [], J = [], V = [], Q = [], D = [], rt = [], a = [], m = void 0, v = 1e8, E = 1e-9, p = o.piTol, I = o.samplingType, w = o.nodeSeparation, R = void 0, H = function() {
3642
+ for (var b = 0, $ = 0, K = !1; $ < R; ) {
3643
+ b = Math.floor(Math.random() * m), K = !1;
3644
+ for (var Z = 0; Z < $; Z++)
3645
+ if (V[Z] == b) {
3646
+ K = !0;
3647
+ break;
3648
+ }
3649
+ if (!K)
3650
+ V[$] = b, $++;
3651
+ else
3652
+ continue;
3653
+ }
3654
+ }, x = function(b, $, K) {
3655
+ for (var Z = [], nt = 0, ut = 0, ot = 0, tt = void 0, j = [], dt = 0, wt = 1, yt = 0; yt < m; yt++)
3656
+ j[yt] = v;
3657
+ for (Z[ut] = b, j[b] = 0; ut >= nt; ) {
3658
+ ot = Z[nt++];
3659
+ for (var It = M[ot], ft = 0; ft < It.length; ft++)
3660
+ tt = L.get(It[ft]), j[tt] == v && (j[tt] = j[ot] + 1, Z[++ut] = tt);
3661
+ D[ot][$] = j[ot] * w;
3662
+ }
3663
+ if (K) {
3664
+ for (var st = 0; st < m; st++)
3665
+ D[st][$] < Q[st] && (Q[st] = D[st][$]);
3666
+ for (var Ct = 0; Ct < m; Ct++)
3667
+ Q[Ct] > dt && (dt = Q[Ct], wt = Ct);
3668
+ }
3669
+ return wt;
3670
+ }, k = function(b) {
3671
+ var $ = void 0;
3672
+ if (b) {
3673
+ $ = Math.floor(Math.random() * m);
3674
+ for (var Z = 0; Z < m; Z++)
3675
+ Q[Z] = v;
3676
+ for (var nt = 0; nt < R; nt++)
3677
+ V[nt] = $, $ = x($, nt, b);
3678
+ } else {
3679
+ H();
3680
+ for (var K = 0; K < R; K++)
3681
+ x(V[K], K, b);
3682
+ }
3683
+ for (var ut = 0; ut < m; ut++)
3684
+ for (var ot = 0; ot < R; ot++)
3685
+ D[ut][ot] *= D[ut][ot];
3686
+ for (var tt = 0; tt < R; tt++)
3687
+ rt[tt] = [];
3688
+ for (var j = 0; j < R; j++)
3689
+ for (var dt = 0; dt < R; dt++)
3690
+ rt[j][dt] = D[V[dt]][j];
3691
+ }, W = function() {
3692
+ for (var b = y.svd(rt), $ = b.S, K = b.U, Z = b.V, nt = $[0] * $[0] * $[0], ut = [], ot = 0; ot < R; ot++) {
3693
+ ut[ot] = [];
3694
+ for (var tt = 0; tt < R; tt++)
3695
+ ut[ot][tt] = 0, ot == tt && (ut[ot][tt] = $[ot] / ($[ot] * $[ot] + nt / ($[ot] * $[ot])));
3696
+ }
3697
+ a = n.multMat(n.multMat(Z, ut), n.transpose(K));
3698
+ }, U = function() {
3699
+ for (var b = void 0, $ = void 0, K = [], Z = [], nt = [], ut = [], ot = 0; ot < m; ot++)
3700
+ K[ot] = Math.random(), Z[ot] = Math.random();
3701
+ K = n.normalize(K), Z = n.normalize(Z);
3702
+ for (var tt = E, j = E, dt = void 0; ; ) {
3703
+ for (var wt = 0; wt < m; wt++)
3704
+ nt[wt] = K[wt];
3705
+ if (K = n.multGamma(n.multL(n.multGamma(nt), D, a)), b = n.dotProduct(nt, K), K = n.normalize(K), tt = n.dotProduct(nt, K), dt = Math.abs(tt / j), dt <= 1 + p && dt >= 1)
3706
+ break;
3707
+ j = tt;
3708
+ }
3709
+ for (var yt = 0; yt < m; yt++)
3710
+ nt[yt] = K[yt];
3711
+ for (j = E; ; ) {
3712
+ for (var It = 0; It < m; It++)
3713
+ ut[It] = Z[It];
3714
+ if (ut = n.minusOp(ut, n.multCons(nt, n.dotProduct(nt, ut))), Z = n.multGamma(n.multL(n.multGamma(ut), D, a)), $ = n.dotProduct(ut, Z), Z = n.normalize(Z), tt = n.dotProduct(ut, Z), dt = Math.abs(tt / j), dt <= 1 + p && dt >= 1)
3715
+ break;
3716
+ j = tt;
3717
+ }
3718
+ for (var ft = 0; ft < m; ft++)
3719
+ ut[ft] = Z[ft];
3720
+ P = n.multCons(nt, Math.sqrt(Math.abs(b))), J = n.multCons(ut, Math.sqrt(Math.abs($)));
3721
+ };
3722
+ f.connectComponents(c, l, f.getTopMostNodes(T), d), g.forEach(function(S) {
3723
+ f.connectComponents(c, l, f.getTopMostNodes(S.descendants().intersection(l)), d);
3724
+ });
3725
+ for (var et = 0, z = 0; z < T.length; z++)
3726
+ T[z].isParent() || L.set(T[z].id(), et++);
3727
+ var O = !0, X = !1, B = void 0;
3728
+ try {
3729
+ for (var _ = d.keys()[Symbol.iterator](), lt; !(O = (lt = _.next()).done); O = !0) {
3730
+ var q = lt.value;
3731
+ L.set(q, et++);
3732
+ }
3733
+ } catch (S) {
3734
+ X = !0, B = S;
3735
+ } finally {
3736
+ try {
3737
+ !O && _.return && _.return();
3738
+ } finally {
3739
+ if (X)
3740
+ throw B;
3741
+ }
3742
+ }
3743
+ for (var Rt = 0; Rt < L.size; Rt++)
3744
+ M[Rt] = [];
3745
+ g.forEach(function(S) {
3746
+ for (var b = S.children().intersection(l); b.nodes(":childless").length == 0; )
3747
+ b = b.nodes()[0].children().intersection(l);
3748
+ var $ = 0, K = b.nodes(":childless")[0].connectedEdges().length;
3749
+ b.nodes(":childless").forEach(function(Z, nt) {
3750
+ Z.connectedEdges().length < K && (K = Z.connectedEdges().length, $ = nt);
3751
+ }), F.set(S.id(), b.nodes(":childless")[$].id());
3752
+ }), T.forEach(function(S) {
3753
+ var b = void 0;
3754
+ S.isParent() ? b = L.get(F.get(S.id())) : b = L.get(S.id()), S.neighborhood().nodes().forEach(function($) {
3755
+ l.intersection(S.edgesWith($)).length > 0 && ($.isParent() ? M[b].push(F.get($.id())) : M[b].push($.id()));
3756
+ });
3757
+ });
3758
+ var Lt = function(b) {
3759
+ var $ = L.get(b), K = void 0;
3760
+ d.get(b).forEach(function(Z) {
3761
+ c.getElementById(Z).isParent() ? K = F.get(Z) : K = Z, M[$].push(K), M[L.get(K)].push(b);
3762
+ });
3763
+ }, vt = !0, it = !1, gt = void 0;
3764
+ try {
3765
+ for (var Tt = d.keys()[Symbol.iterator](), At; !(vt = (At = Tt.next()).done); vt = !0) {
3766
+ var Dt = At.value;
3767
+ Lt(Dt);
3768
+ }
3769
+ } catch (S) {
3770
+ it = !0, gt = S;
3771
+ } finally {
3772
+ try {
3773
+ !vt && Tt.return && Tt.return();
3774
+ } finally {
3775
+ if (it)
3776
+ throw gt;
3777
+ }
3778
+ }
3779
+ m = L.size;
3780
+ var mt = void 0;
3781
+ if (m > 2) {
3782
+ R = m < o.sampleSize ? m : o.sampleSize;
3783
+ for (var xt = 0; xt < m; xt++)
3784
+ D[xt] = [];
3785
+ for (var St = 0; St < R; St++)
3786
+ a[St] = [];
3787
+ return o.quality == "draft" || o.step == "all" ? (k(I), W(), U(), mt = { nodeIndexes: L, xCoords: P, yCoords: J }) : (L.forEach(function(S, b) {
3788
+ P.push(c.getElementById(b).position("x")), J.push(c.getElementById(b).position("y"));
3789
+ }), mt = { nodeIndexes: L, xCoords: P, yCoords: J }), mt;
3790
+ } else {
3791
+ var Vt = L.keys(), Xt = c.getElementById(Vt.next().value), Ut = Xt.position(), bt = Xt.outerWidth();
3792
+ if (P.push(Ut.x), J.push(Ut.y), m == 2) {
3793
+ var Ht = c.getElementById(Vt.next().value), Bt = Ht.outerWidth();
3794
+ P.push(Ut.x + bt / 2 + Bt / 2 + o.idealEdgeLength), J.push(Ut.y);
3795
+ }
3796
+ return mt = { nodeIndexes: L, xCoords: P, yCoords: J }, mt;
3797
+ }
3798
+ };
3799
+ i.exports = { spectralLayout: t };
3800
+ }
3801
+ ),
3802
+ /***/
3803
+ 579: (
3804
+ /***/
3805
+ (i, r, e) => {
3806
+ var f = e(212), n = function(t) {
3807
+ t && t("layout", "fcose", f);
3808
+ };
3809
+ typeof cytoscape < "u" && n(cytoscape), i.exports = n;
3810
+ }
3811
+ ),
3812
+ /***/
3813
+ 140: (
3814
+ /***/
3815
+ (i) => {
3816
+ i.exports = A;
3817
+ }
3818
+ )
3819
+ /******/
3820
+ }, N = {};
3821
+ function u(i) {
3822
+ var r = N[i];
3823
+ if (r !== void 0)
3824
+ return r.exports;
3825
+ var e = N[i] = {
3826
+ /******/
3827
+ // no module.id needed
3828
+ /******/
3829
+ // no module.loaded needed
3830
+ /******/
3831
+ exports: {}
3832
+ /******/
3833
+ };
3834
+ return G[i](e, e.exports, u), e.exports;
3835
+ }
3836
+ var s = u(579);
3837
+ return s;
3838
+ })()
3839
+ );
3840
+ });
3841
+ }(le)), le.exports;
3842
+ }
3843
+ var pr = vr();
3844
+ const yr = /* @__PURE__ */ ke(pr);
3845
+ var Ie = {
3846
+ L: "left",
3847
+ R: "right",
3848
+ T: "top",
3849
+ B: "bottom"
3850
+ }, Re = {
3851
+ L: /* @__PURE__ */ at((C) => `${C},${C / 2} 0,${C} 0,0`, "L"),
3852
+ R: /* @__PURE__ */ at((C) => `0,${C / 2} ${C},0 ${C},${C}`, "R"),
3853
+ T: /* @__PURE__ */ at((C) => `0,0 ${C},0 ${C / 2},${C}`, "T"),
3854
+ B: /* @__PURE__ */ at((C) => `${C / 2},0 ${C},${C} 0,${C}`, "B")
3855
+ }, he = {
3856
+ L: /* @__PURE__ */ at((C, Y) => C - Y + 2, "L"),
3857
+ R: /* @__PURE__ */ at((C, Y) => C - 2, "R"),
3858
+ T: /* @__PURE__ */ at((C, Y) => C - Y + 2, "T"),
3859
+ B: /* @__PURE__ */ at((C, Y) => C - 2, "B")
3860
+ }, Er = /* @__PURE__ */ at(function(C) {
3861
+ return zt(C) ? C === "L" ? "R" : "L" : C === "T" ? "B" : "T";
3862
+ }, "getOppositeArchitectureDirection"), Se = /* @__PURE__ */ at(function(C) {
3863
+ const Y = C;
3864
+ return Y === "L" || Y === "R" || Y === "T" || Y === "B";
3865
+ }, "isArchitectureDirection"), zt = /* @__PURE__ */ at(function(C) {
3866
+ const Y = C;
3867
+ return Y === "L" || Y === "R";
3868
+ }, "isArchitectureDirectionX"), Qt = /* @__PURE__ */ at(function(C) {
3869
+ const Y = C;
3870
+ return Y === "T" || Y === "B";
3871
+ }, "isArchitectureDirectionY"), Pe = /* @__PURE__ */ at(function(C, Y) {
3872
+ const A = zt(C) && Qt(Y), G = Qt(C) && zt(Y);
3873
+ return A || G;
3874
+ }, "isArchitectureDirectionXY"), mr = /* @__PURE__ */ at(function(C) {
3875
+ const Y = C[0], A = C[1], G = zt(Y) && Qt(A), N = Qt(Y) && zt(A);
3876
+ return G || N;
3877
+ }, "isArchitecturePairXY"), Tr = /* @__PURE__ */ at(function(C) {
3878
+ return C !== "LL" && C !== "RR" && C !== "TT" && C !== "BB";
3879
+ }, "isValidArchitectureDirectionPair"), Te = /* @__PURE__ */ at(function(C, Y) {
3880
+ const A = `${C}${Y}`;
3881
+ return Tr(A) ? A : void 0;
3882
+ }, "getArchitectureDirectionPair"), Nr = /* @__PURE__ */ at(function([C, Y], A) {
3883
+ const G = A[0], N = A[1];
3884
+ return zt(G) ? Qt(N) ? [C + (G === "L" ? -1 : 1), Y + (N === "T" ? 1 : -1)] : [C + (G === "L" ? -1 : 1), Y] : zt(N) ? [C + (N === "L" ? 1 : -1), Y + (G === "T" ? 1 : -1)] : [C, Y + (G === "T" ? 1 : -1)];
3885
+ }, "shiftPositionByArchitectureDirectionPair"), Lr = /* @__PURE__ */ at(function(C) {
3886
+ return C === "LT" || C === "TL" ? [1, 1] : C === "BL" || C === "LB" ? [1, -1] : C === "BR" || C === "RB" ? [-1, -1] : [-1, 1];
3887
+ }, "getArchitectureDirectionXYFactors"), Cr = /* @__PURE__ */ at(function(C) {
3888
+ return C.type === "service";
3889
+ }, "isArchitectureService"), Mr = /* @__PURE__ */ at(function(C) {
3890
+ return C.type === "junction";
3891
+ }, "isArchitectureJunction"), Ge = /* @__PURE__ */ at((C) => C.data(), "edgeData"), ae = /* @__PURE__ */ at((C) => C.data(), "nodeData"), Ue = nr.architecture, pt = new hr(() => ({
3892
+ nodes: {},
3893
+ groups: {},
3894
+ edges: [],
3895
+ registeredIds: {},
3896
+ config: Ue,
3897
+ dataStructures: void 0,
3898
+ elements: {}
3899
+ })), Ar = /* @__PURE__ */ at(() => {
3900
+ pt.reset(), rr();
3901
+ }, "clear"), wr = /* @__PURE__ */ at(function({
3902
+ id: C,
3903
+ icon: Y,
3904
+ in: A,
3905
+ title: G,
3906
+ iconText: N
3907
+ }) {
3908
+ if (pt.records.registeredIds[C] !== void 0)
3909
+ throw new Error(
3910
+ `The service id [${C}] is already in use by another ${pt.records.registeredIds[C]}`
3911
+ );
3912
+ if (A !== void 0) {
3913
+ if (C === A)
3914
+ throw new Error(`The service [${C}] cannot be placed within itself`);
3915
+ if (pt.records.registeredIds[A] === void 0)
3916
+ throw new Error(
3917
+ `The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`
3918
+ );
3919
+ if (pt.records.registeredIds[A] === "node")
3920
+ throw new Error(`The service [${C}]'s parent is not a group`);
3921
+ }
3922
+ pt.records.registeredIds[C] = "node", pt.records.nodes[C] = {
3923
+ id: C,
3924
+ type: "service",
3925
+ icon: Y,
3926
+ iconText: N,
3927
+ title: G,
3928
+ edges: [],
3929
+ in: A
3930
+ };
3931
+ }, "addService"), Or = /* @__PURE__ */ at(() => Object.values(pt.records.nodes).filter(Cr), "getServices"), Dr = /* @__PURE__ */ at(function({ id: C, in: Y }) {
3932
+ pt.records.registeredIds[C] = "node", pt.records.nodes[C] = {
3933
+ id: C,
3934
+ type: "junction",
3935
+ edges: [],
3936
+ in: Y
3937
+ };
3938
+ }, "addJunction"), xr = /* @__PURE__ */ at(() => Object.values(pt.records.nodes).filter(Mr), "getJunctions"), Ir = /* @__PURE__ */ at(() => Object.values(pt.records.nodes), "getNodes"), Rr = /* @__PURE__ */ at((C) => pt.records.nodes[C], "getNode"), Sr = /* @__PURE__ */ at(function({ id: C, icon: Y, in: A, title: G }) {
3939
+ if (pt.records.registeredIds[C] !== void 0)
3940
+ throw new Error(
3941
+ `The group id [${C}] is already in use by another ${pt.records.registeredIds[C]}`
3942
+ );
3943
+ if (A !== void 0) {
3944
+ if (C === A)
3945
+ throw new Error(`The group [${C}] cannot be placed within itself`);
3946
+ if (pt.records.registeredIds[A] === void 0)
3947
+ throw new Error(
3948
+ `The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`
3949
+ );
3950
+ if (pt.records.registeredIds[A] === "node")
3951
+ throw new Error(`The group [${C}]'s parent is not a group`);
3952
+ }
3953
+ pt.records.registeredIds[C] = "group", pt.records.groups[C] = {
3954
+ id: C,
3955
+ icon: Y,
3956
+ title: G,
3957
+ in: A
3958
+ };
3959
+ }, "addGroup"), Fr = /* @__PURE__ */ at(() => Object.values(pt.records.groups), "getGroups"), br = /* @__PURE__ */ at(function({
3960
+ lhsId: C,
3961
+ rhsId: Y,
3962
+ lhsDir: A,
3963
+ rhsDir: G,
3964
+ lhsInto: N,
3965
+ rhsInto: u,
3966
+ lhsGroup: s,
3967
+ rhsGroup: i,
3968
+ title: r
3969
+ }) {
3970
+ if (!Se(A))
3971
+ throw new Error(
3972
+ `Invalid direction given for left hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${A}`
3973
+ );
3974
+ if (!Se(G))
3975
+ throw new Error(
3976
+ `Invalid direction given for right hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${G}`
3977
+ );
3978
+ if (pt.records.nodes[C] === void 0 && pt.records.groups[C] === void 0)
3979
+ throw new Error(
3980
+ `The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`
3981
+ );
3982
+ if (pt.records.nodes[Y] === void 0 && pt.records.groups[C] === void 0)
3983
+ throw new Error(
3984
+ `The right-hand id [${Y}] does not yet exist. Please create the service/group before declaring an edge to it.`
3985
+ );
3986
+ const e = pt.records.nodes[C].in, f = pt.records.nodes[Y].in;
3987
+ if (s && e && f && e == f)
3988
+ throw new Error(
3989
+ `The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`
3990
+ );
3991
+ if (i && e && f && e == f)
3992
+ throw new Error(
3993
+ `The right-hand id [${Y}] is modified to traverse the group boundary, but the edge does not pass through two groups.`
3994
+ );
3995
+ const n = {
3996
+ lhsId: C,
3997
+ lhsDir: A,
3998
+ lhsInto: N,
3999
+ lhsGroup: s,
4000
+ rhsId: Y,
4001
+ rhsDir: G,
4002
+ rhsInto: u,
4003
+ rhsGroup: i,
4004
+ title: r
4005
+ };
4006
+ pt.records.edges.push(n), pt.records.nodes[C] && pt.records.nodes[Y] && (pt.records.nodes[C].edges.push(pt.records.edges[pt.records.edges.length - 1]), pt.records.nodes[Y].edges.push(pt.records.edges[pt.records.edges.length - 1]));
4007
+ }, "addEdge"), Pr = /* @__PURE__ */ at(() => pt.records.edges, "getEdges"), Gr = /* @__PURE__ */ at(() => {
4008
+ if (pt.records.dataStructures === void 0) {
4009
+ const C = Object.entries(pt.records.nodes).reduce((s, [i, r]) => (s[i] = r.edges.reduce((e, f) => {
4010
+ if (f.lhsId === i) {
4011
+ const n = Te(f.lhsDir, f.rhsDir);
4012
+ n && (e[n] = f.rhsId);
4013
+ } else {
4014
+ const n = Te(f.rhsDir, f.lhsDir);
4015
+ n && (e[n] = f.lhsId);
4016
+ }
4017
+ return e;
4018
+ }, {}), s), {}), Y = Object.keys(C)[0], A = { [Y]: 1 }, G = Object.keys(C).reduce(
4019
+ (s, i) => i === Y ? s : { ...s, [i]: 1 },
4020
+ {}
4021
+ ), N = /* @__PURE__ */ at((s) => {
4022
+ const i = { [s]: [0, 0] }, r = [s];
4023
+ for (; r.length > 0; ) {
4024
+ const e = r.shift();
4025
+ if (e) {
4026
+ A[e] = 1, delete G[e];
4027
+ const f = C[e], [n, y] = i[e];
4028
+ Object.entries(f).forEach(([t, h]) => {
4029
+ A[h] || (i[h] = Nr(
4030
+ [n, y],
4031
+ t
4032
+ ), r.push(h));
4033
+ });
4034
+ }
4035
+ }
4036
+ return i;
4037
+ }, "BFS"), u = [N(Y)];
4038
+ for (; Object.keys(G).length > 0; )
4039
+ u.push(N(Object.keys(G)[0]));
4040
+ pt.records.dataStructures = {
4041
+ adjList: C,
4042
+ spatialMaps: u
4043
+ };
4044
+ }
4045
+ return pt.records.dataStructures;
4046
+ }, "getDataStructures"), Ur = /* @__PURE__ */ at((C, Y) => {
4047
+ pt.records.elements[C] = Y;
4048
+ }, "setElementForId"), Yr = /* @__PURE__ */ at((C) => pt.records.elements[C], "getElementById"), ue = {
4049
+ clear: Ar,
4050
+ setDiagramTitle: _e,
4051
+ getDiagramTitle: je,
4052
+ setAccTitle: Ke,
4053
+ getAccTitle: Qe,
4054
+ setAccDescription: Je,
4055
+ getAccDescription: qe,
4056
+ addService: wr,
4057
+ getServices: Or,
4058
+ addJunction: Dr,
4059
+ getJunctions: xr,
4060
+ getNodes: Ir,
4061
+ getNode: Rr,
4062
+ addGroup: Sr,
4063
+ getGroups: Fr,
4064
+ addEdge: br,
4065
+ getEdges: Pr,
4066
+ setElementForId: Ur,
4067
+ getElementById: Yr,
4068
+ getDataStructures: Gr
4069
+ };
4070
+ function Pt(C) {
4071
+ const Y = ge().architecture;
4072
+ return Y != null && Y[C] ? Y[C] : Ue[C];
4073
+ }
4074
+ at(Pt, "getConfigField");
4075
+ var Xr = /* @__PURE__ */ at((C, Y) => {
4076
+ sr(C, Y), C.groups.map(Y.addGroup), C.services.map((A) => Y.addService({ ...A, type: "service" })), C.junctions.map((A) => Y.addJunction({ ...A, type: "junction" })), C.edges.map(Y.addEdge);
4077
+ }, "populateDb"), Hr = {
4078
+ parse: /* @__PURE__ */ at(async (C) => {
4079
+ const Y = await lr("architecture", C);
4080
+ Fe.debug(Y), Xr(Y, ue);
4081
+ }, "parse")
4082
+ }, Wr = /* @__PURE__ */ at((C) => `
4083
+ .edge {
4084
+ stroke-width: ${C.archEdgeWidth};
4085
+ stroke: ${C.archEdgeColor};
4086
+ fill: none;
4087
+ }
4088
+
4089
+ .arrow {
4090
+ fill: ${C.archEdgeArrowColor};
4091
+ }
4092
+
4093
+ .node-bkg {
4094
+ fill: none;
4095
+ stroke: ${C.archGroupBorderColor};
4096
+ stroke-width: ${C.archGroupBorderWidth};
4097
+ stroke-dasharray: 8;
4098
+ }
4099
+ .node-icon-text {
4100
+ display: flex;
4101
+ align-items: center;
4102
+ }
4103
+
4104
+ .node-icon-text > div {
4105
+ color: #fff;
4106
+ margin: 1px;
4107
+ height: fit-content;
4108
+ text-align: center;
4109
+ overflow: hidden;
4110
+ display: -webkit-box;
4111
+ -webkit-box-orient: vertical;
4112
+ }
4113
+ `, "getStyles"), Vr = Wr, ne = /* @__PURE__ */ at((C) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${C}</g>`, "wrapIcon"), oe = {
4114
+ prefix: "mermaid-architecture",
4115
+ height: 80,
4116
+ width: 80,
4117
+ icons: {
4118
+ database: {
4119
+ body: ne(
4120
+ '<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;"/>'
4121
+ )
4122
+ },
4123
+ server: {
4124
+ body: ne(
4125
+ '<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>'
4126
+ )
4127
+ },
4128
+ disk: {
4129
+ body: ne(
4130
+ '<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;"/>'
4131
+ )
4132
+ },
4133
+ internet: {
4134
+ body: ne(
4135
+ '<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;"/>'
4136
+ )
4137
+ },
4138
+ cloud: {
4139
+ body: ne(
4140
+ '<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;"/>'
4141
+ )
4142
+ },
4143
+ unknown: or,
4144
+ blank: {
4145
+ body: ne("")
4146
+ }
4147
+ }
4148
+ }, zr = /* @__PURE__ */ at(async function(C, Y) {
4149
+ const A = Pt("padding"), G = Pt("iconSize"), N = G / 2, u = G / 6, s = u / 2;
4150
+ await Promise.all(
4151
+ Y.edges().map(async (i) => {
4152
+ var P, J;
4153
+ const {
4154
+ source: r,
4155
+ sourceDir: e,
4156
+ sourceArrow: f,
4157
+ sourceGroup: n,
4158
+ target: y,
4159
+ targetDir: t,
4160
+ targetArrow: h,
4161
+ targetGroup: o,
4162
+ label: c
4163
+ } = Ge(i);
4164
+ let { x: l, y: T } = i[0].sourceEndpoint();
4165
+ const { x: g, y: d } = i[0].midpoint();
4166
+ let { x: L, y: F } = i[0].targetEndpoint();
4167
+ const M = A + 4;
4168
+ if (n && (zt(e) ? l += e === "L" ? -M : M : T += e === "T" ? -M : M + 18), o && (zt(t) ? L += t === "L" ? -M : M : F += t === "T" ? -M : M + 18), !n && ((P = ue.getNode(r)) == null ? void 0 : P.type) === "junction" && (zt(e) ? l += e === "L" ? N : -N : T += e === "T" ? N : -N), !o && ((J = ue.getNode(y)) == null ? void 0 : J.type) === "junction" && (zt(t) ? L += t === "L" ? N : -N : F += t === "T" ? N : -N), i[0]._private.rscratch) {
4169
+ const V = C.insert("g");
4170
+ if (V.insert("path").attr("d", `M ${l},${T} L ${g},${d} L${L},${F} `).attr("class", "edge"), f) {
4171
+ const Q = zt(e) ? he[e](l, u) : l - s, D = Qt(e) ? he[e](T, u) : T - s;
4172
+ V.insert("polygon").attr("points", Re[e](u)).attr("transform", `translate(${Q},${D})`).attr("class", "arrow");
4173
+ }
4174
+ if (h) {
4175
+ const Q = zt(t) ? he[t](L, u) : L - s, D = Qt(t) ? he[t](F, u) : F - s;
4176
+ V.insert("polygon").attr("points", Re[t](u)).attr("transform", `translate(${Q},${D})`).attr("class", "arrow");
4177
+ }
4178
+ if (c) {
4179
+ const Q = Pe(e, t) ? "XY" : zt(e) ? "X" : "Y";
4180
+ let D = 0;
4181
+ Q === "X" ? D = Math.abs(l - L) : Q === "Y" ? D = Math.abs(T - F) / 1.5 : D = Math.abs(l - L) / 2;
4182
+ const rt = V.append("g");
4183
+ if (await Ne(
4184
+ rt,
4185
+ c,
4186
+ {
4187
+ useHtmlLabels: !1,
4188
+ width: D,
4189
+ classes: "architecture-service-label"
4190
+ },
4191
+ ge()
4192
+ ), rt.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), Q === "X")
4193
+ rt.attr("transform", "translate(" + g + ", " + d + ")");
4194
+ else if (Q === "Y")
4195
+ rt.attr("transform", "translate(" + g + ", " + d + ") rotate(-90)");
4196
+ else if (Q === "XY") {
4197
+ const a = Te(e, t);
4198
+ if (a && mr(a)) {
4199
+ const m = rt.node().getBoundingClientRect(), [v, E] = Lr(a);
4200
+ rt.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * v * E * 45})`);
4201
+ const p = rt.node().getBoundingClientRect();
4202
+ rt.attr(
4203
+ "transform",
4204
+ `
4205
+ translate(${g}, ${d - m.height / 2})
4206
+ translate(${v * p.width / 2}, ${E * p.height / 2})
4207
+ rotate(${-1 * v * E * 45}, 0, ${m.height / 2})
4208
+ `
4209
+ );
4210
+ }
4211
+ }
4212
+ }
4213
+ }
4214
+ })
4215
+ );
4216
+ }, "drawEdges"), Br = /* @__PURE__ */ at(async function(C, Y) {
4217
+ const G = Pt("padding") * 0.75, N = Pt("fontSize"), s = Pt("iconSize") / 2;
4218
+ await Promise.all(
4219
+ Y.nodes().map(async (i) => {
4220
+ const r = ae(i);
4221
+ if (r.type === "group") {
4222
+ const { h: e, w: f, x1: n, y1: y } = i.boundingBox();
4223
+ C.append("rect").attr("x", n + s).attr("y", y + s).attr("width", f).attr("height", e).attr("class", "node-bkg");
4224
+ const t = C.append("g");
4225
+ let h = n, o = y;
4226
+ if (r.icon) {
4227
+ const c = t.append("g");
4228
+ c.html(
4229
+ `<g>${await me(r.icon, { height: G, width: G, fallbackPrefix: oe.prefix })}</g>`
4230
+ ), c.attr(
4231
+ "transform",
4232
+ "translate(" + (h + s + 1) + ", " + (o + s + 1) + ")"
4233
+ ), h += G, o += N / 2 - 1 - 2;
4234
+ }
4235
+ if (r.label) {
4236
+ const c = t.append("g");
4237
+ await Ne(
4238
+ c,
4239
+ r.label,
4240
+ {
4241
+ useHtmlLabels: !1,
4242
+ width: f,
4243
+ classes: "architecture-service-label"
4244
+ },
4245
+ ge()
4246
+ ), c.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), c.attr(
4247
+ "transform",
4248
+ "translate(" + (h + s + 4) + ", " + (o + s + 2) + ")"
4249
+ );
4250
+ }
4251
+ }
4252
+ })
4253
+ );
4254
+ }, "drawGroups"), $r = /* @__PURE__ */ at(async function(C, Y, A) {
4255
+ for (const G of A) {
4256
+ const N = Y.append("g"), u = Pt("iconSize");
4257
+ if (G.title) {
4258
+ const e = N.append("g");
4259
+ await Ne(
4260
+ e,
4261
+ G.title,
4262
+ {
4263
+ useHtmlLabels: !1,
4264
+ width: u * 1.5,
4265
+ classes: "architecture-service-label"
4266
+ },
4267
+ ge()
4268
+ ), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + u / 2 + ", " + u + ")");
4269
+ }
4270
+ const s = N.append("g");
4271
+ if (G.icon)
4272
+ s.html(
4273
+ `<g>${await me(G.icon, { height: u, width: u, fallbackPrefix: oe.prefix })}</g>`
4274
+ );
4275
+ else if (G.iconText) {
4276
+ s.html(
4277
+ `<g>${await me("blank", { height: u, width: u, fallbackPrefix: oe.prefix })}</g>`
4278
+ );
4279
+ const n = s.append("g").append("foreignObject").attr("width", u).attr("height", u).append("div").attr("class", "node-icon-text").attr("style", `height: ${u}px;`).append("div").html(G.iconText), y = parseInt(
4280
+ window.getComputedStyle(n.node(), null).getPropertyValue("font-size").replace(/\D/g, "")
4281
+ ) ?? 16;
4282
+ n.attr("style", `-webkit-line-clamp: ${Math.floor((u - 2) / y)};`);
4283
+ } else
4284
+ s.append("path").attr("class", "node-bkg").attr("id", "node-" + G.id).attr(
4285
+ "d",
4286
+ `M0 ${u} v${-u} q0,-5 5,-5 h${u} q5,0 5,5 v${u} H0 Z`
4287
+ );
4288
+ N.attr("class", "architecture-service");
4289
+ const { width: i, height: r } = N._groups[0][0].getBBox();
4290
+ G.width = i, G.height = r, C.setElementForId(G.id, N);
4291
+ }
4292
+ return 0;
4293
+ }, "drawServices"), Zr = /* @__PURE__ */ at(function(C, Y, A) {
4294
+ A.forEach((G) => {
4295
+ const N = Y.append("g"), u = Pt("iconSize");
4296
+ N.append("g").append("rect").attr("id", "node-" + G.id).attr("fill-opacity", "0").attr("width", u).attr("height", u), N.attr("class", "architecture-junction");
4297
+ const { width: i, height: r } = N._groups[0][0].getBBox();
4298
+ N.width = i, N.height = r, C.setElementForId(G.id, N);
4299
+ });
4300
+ }, "drawJunctions");
4301
+ ar([
4302
+ {
4303
+ name: oe.prefix,
4304
+ icons: oe
4305
+ }
4306
+ ]);
4307
+ be.use(yr);
4308
+ function Ye(C, Y) {
4309
+ C.forEach((A) => {
4310
+ Y.add({
4311
+ group: "nodes",
4312
+ data: {
4313
+ type: "service",
4314
+ id: A.id,
4315
+ icon: A.icon,
4316
+ label: A.title,
4317
+ parent: A.in,
4318
+ width: Pt("iconSize"),
4319
+ height: Pt("iconSize")
4320
+ },
4321
+ classes: "node-service"
4322
+ });
4323
+ });
4324
+ }
4325
+ at(Ye, "addServices");
4326
+ function Xe(C, Y) {
4327
+ C.forEach((A) => {
4328
+ Y.add({
4329
+ group: "nodes",
4330
+ data: {
4331
+ type: "junction",
4332
+ id: A.id,
4333
+ parent: A.in,
4334
+ width: Pt("iconSize"),
4335
+ height: Pt("iconSize")
4336
+ },
4337
+ classes: "node-junction"
4338
+ });
4339
+ });
4340
+ }
4341
+ at(Xe, "addJunctions");
4342
+ function He(C, Y) {
4343
+ Y.nodes().map((A) => {
4344
+ const G = ae(A);
4345
+ if (G.type === "group")
4346
+ return;
4347
+ G.x = A.position().x, G.y = A.position().y, C.getElementById(G.id).attr("transform", "translate(" + (G.x || 0) + "," + (G.y || 0) + ")");
4348
+ });
4349
+ }
4350
+ at(He, "positionNodes");
4351
+ function We(C, Y) {
4352
+ C.forEach((A) => {
4353
+ Y.add({
4354
+ group: "nodes",
4355
+ data: {
4356
+ type: "group",
4357
+ id: A.id,
4358
+ icon: A.icon,
4359
+ label: A.title,
4360
+ parent: A.in
4361
+ },
4362
+ classes: "node-group"
4363
+ });
4364
+ });
4365
+ }
4366
+ at(We, "addGroups");
4367
+ function Ve(C, Y) {
4368
+ C.forEach((A) => {
4369
+ const { lhsId: G, rhsId: N, lhsInto: u, lhsGroup: s, rhsInto: i, lhsDir: r, rhsDir: e, rhsGroup: f, title: n } = A, y = Pe(A.lhsDir, A.rhsDir) ? "segments" : "straight", t = {
4370
+ id: `${G}-${N}`,
4371
+ label: n,
4372
+ source: G,
4373
+ sourceDir: r,
4374
+ sourceArrow: u,
4375
+ sourceGroup: s,
4376
+ sourceEndpoint: r === "L" ? "0 50%" : r === "R" ? "100% 50%" : r === "T" ? "50% 0" : "50% 100%",
4377
+ target: N,
4378
+ targetDir: e,
4379
+ targetArrow: i,
4380
+ targetGroup: f,
4381
+ targetEndpoint: e === "L" ? "0 50%" : e === "R" ? "100% 50%" : e === "T" ? "50% 0" : "50% 100%"
4382
+ };
4383
+ Y.add({
4384
+ group: "edges",
4385
+ data: t,
4386
+ classes: y
4387
+ });
4388
+ });
4389
+ }
4390
+ at(Ve, "addEdges");
4391
+ function ze(C) {
4392
+ const Y = C.map((N) => {
4393
+ const u = {}, s = {};
4394
+ return Object.entries(N).forEach(([i, [r, e]]) => {
4395
+ u[e] || (u[e] = []), s[r] || (s[r] = []), u[e].push(i), s[r].push(i);
4396
+ }), {
4397
+ horiz: Object.values(u).filter((i) => i.length > 1),
4398
+ vert: Object.values(s).filter((i) => i.length > 1)
4399
+ };
4400
+ }), [A, G] = Y.reduce(
4401
+ ([N, u], { horiz: s, vert: i }) => [
4402
+ [...N, ...s],
4403
+ [...u, ...i]
4404
+ ],
4405
+ [[], []]
4406
+ );
4407
+ return {
4408
+ horizontal: A,
4409
+ vertical: G
4410
+ };
4411
+ }
4412
+ at(ze, "getAlignments");
4413
+ function Be(C) {
4414
+ const Y = [], A = /* @__PURE__ */ at((N) => `${N[0]},${N[1]}`, "posToStr"), G = /* @__PURE__ */ at((N) => N.split(",").map((u) => parseInt(u)), "strToPos");
4415
+ return C.forEach((N) => {
4416
+ const u = Object.fromEntries(
4417
+ Object.entries(N).map(([e, f]) => [A(f), e])
4418
+ ), s = [A([0, 0])], i = {}, r = {
4419
+ L: [-1, 0],
4420
+ R: [1, 0],
4421
+ T: [0, 1],
4422
+ B: [0, -1]
4423
+ };
4424
+ for (; s.length > 0; ) {
4425
+ const e = s.shift();
4426
+ if (e) {
4427
+ i[e] = 1;
4428
+ const f = u[e];
4429
+ if (f) {
4430
+ const n = G(e);
4431
+ Object.entries(r).forEach(([y, t]) => {
4432
+ const h = A([n[0] + t[0], n[1] + t[1]]), o = u[h];
4433
+ o && !i[h] && (s.push(h), Y.push({
4434
+ [Ie[y]]: o,
4435
+ [Ie[Er(y)]]: f,
4436
+ gap: 1.5 * Pt("iconSize")
4437
+ }));
4438
+ });
4439
+ }
4440
+ }
4441
+ }
4442
+ }), Y;
4443
+ }
4444
+ at(Be, "getRelativeConstraints");
4445
+ function $e(C, Y, A, G, { spatialMaps: N }) {
4446
+ return new Promise((u) => {
4447
+ const s = ir("body").append("div").attr("id", "cy").attr("style", "display:none"), i = be({
4448
+ container: document.getElementById("cy"),
4449
+ style: [
4450
+ {
4451
+ selector: "edge",
4452
+ style: {
4453
+ "curve-style": "straight",
4454
+ label: "data(label)",
4455
+ "source-endpoint": "data(sourceEndpoint)",
4456
+ "target-endpoint": "data(targetEndpoint)"
4457
+ }
4458
+ },
4459
+ {
4460
+ selector: "edge.segments",
4461
+ style: {
4462
+ "curve-style": "segments",
4463
+ "segment-weights": "0",
4464
+ "segment-distances": [0.5],
4465
+ // @ts-ignore Incorrect library types
4466
+ "edge-distances": "endpoints",
4467
+ "source-endpoint": "data(sourceEndpoint)",
4468
+ "target-endpoint": "data(targetEndpoint)"
4469
+ }
4470
+ },
4471
+ {
4472
+ selector: "node",
4473
+ style: {
4474
+ // @ts-ignore Incorrect library types
4475
+ "compound-sizing-wrt-labels": "include"
4476
+ }
4477
+ },
4478
+ {
4479
+ selector: "node[label]",
4480
+ style: {
4481
+ "text-valign": "bottom",
4482
+ "text-halign": "center",
4483
+ "font-size": `${Pt("fontSize")}px`
4484
+ }
4485
+ },
4486
+ {
4487
+ selector: ".node-service",
4488
+ style: {
4489
+ label: "data(label)",
4490
+ width: "data(width)",
4491
+ height: "data(height)"
4492
+ }
4493
+ },
4494
+ {
4495
+ selector: ".node-junction",
4496
+ style: {
4497
+ width: "data(width)",
4498
+ height: "data(height)"
4499
+ }
4500
+ },
4501
+ {
4502
+ selector: ".node-group",
4503
+ style: {
4504
+ // @ts-ignore Incorrect library types
4505
+ padding: `${Pt("padding")}px`
4506
+ }
4507
+ }
4508
+ ]
4509
+ });
4510
+ s.remove(), We(A, i), Ye(C, i), Xe(Y, i), Ve(G, i);
4511
+ const r = ze(N), e = Be(N), f = i.layout({
4512
+ name: "fcose",
4513
+ quality: "proof",
4514
+ styleEnabled: !1,
4515
+ animate: !1,
4516
+ nodeDimensionsIncludeLabels: !1,
4517
+ // Adjust the edge parameters if it passes through the border of a group
4518
+ // Hacky fix for: https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues/67
4519
+ idealEdgeLength(n) {
4520
+ const [y, t] = n.connectedNodes(), { parent: h } = ae(y), { parent: o } = ae(t);
4521
+ return h === o ? 1.5 * Pt("iconSize") : 0.5 * Pt("iconSize");
4522
+ },
4523
+ edgeElasticity(n) {
4524
+ const [y, t] = n.connectedNodes(), { parent: h } = ae(y), { parent: o } = ae(t);
4525
+ return h === o ? 0.45 : 1e-3;
4526
+ },
4527
+ alignmentConstraint: r,
4528
+ relativePlacementConstraint: e
4529
+ });
4530
+ f.one("layoutstop", () => {
4531
+ var y;
4532
+ function n(t, h, o, c) {
4533
+ let l, T;
4534
+ const { x: g, y: d } = t, { x: L, y: F } = h;
4535
+ T = (c - d + (g - o) * (d - F) / (g - L)) / Math.sqrt(1 + Math.pow((d - F) / (g - L), 2)), l = Math.sqrt(Math.pow(c - d, 2) + Math.pow(o - g, 2) - Math.pow(T, 2));
4536
+ const M = Math.sqrt(Math.pow(L - g, 2) + Math.pow(F - d, 2));
4537
+ l = l / M;
4538
+ let P = (L - g) * (c - d) - (F - d) * (o - g);
4539
+ switch (!0) {
4540
+ case P >= 0:
4541
+ P = 1;
4542
+ break;
4543
+ case P < 0:
4544
+ P = -1;
4545
+ break;
4546
+ }
4547
+ let J = (L - g) * (o - g) + (F - d) * (c - d);
4548
+ switch (!0) {
4549
+ case J >= 0:
4550
+ J = 1;
4551
+ break;
4552
+ case J < 0:
4553
+ J = -1;
4554
+ break;
4555
+ }
4556
+ return T = Math.abs(T) * P, l = l * J, {
4557
+ distances: T,
4558
+ weights: l
4559
+ };
4560
+ }
4561
+ at(n, "getSegmentWeights"), i.startBatch();
4562
+ for (const t of Object.values(i.edges()))
4563
+ if ((y = t.data) != null && y.call(t)) {
4564
+ const { x: h, y: o } = t.source().position(), { x: c, y: l } = t.target().position();
4565
+ if (h !== c && o !== l) {
4566
+ const T = t.sourceEndpoint(), g = t.targetEndpoint(), { sourceDir: d } = Ge(t), [L, F] = Qt(d) ? [T.x, g.y] : [g.x, T.y], { weights: M, distances: P } = n(T, g, L, F);
4567
+ t.style("segment-distances", P), t.style("segment-weights", M);
4568
+ }
4569
+ }
4570
+ i.endBatch(), f.run();
4571
+ }), f.run(), i.ready((n) => {
4572
+ Fe.info("Ready", n), u(i);
4573
+ });
4574
+ });
4575
+ }
4576
+ at($e, "layoutArchitecture");
4577
+ var kr = /* @__PURE__ */ at(async (C, Y, A, G) => {
4578
+ const N = G.db, u = N.getServices(), s = N.getJunctions(), i = N.getGroups(), r = N.getEdges(), e = N.getDataStructures(), f = tr(Y), n = f.append("g");
4579
+ n.attr("class", "architecture-edges");
4580
+ const y = f.append("g");
4581
+ y.attr("class", "architecture-services");
4582
+ const t = f.append("g");
4583
+ t.attr("class", "architecture-groups"), await $r(N, y, u), Zr(N, y, s);
4584
+ const h = await $e(u, s, i, r, e);
4585
+ await zr(n, h), await Br(t, h), He(N, h), er(void 0, f, Pt("padding"), Pt("useMaxWidth"));
4586
+ }, "draw"), qr = { draw: kr }, ti = {
4587
+ parser: Hr,
4588
+ db: ue,
4589
+ renderer: qr,
4590
+ styles: Vr
4591
+ };
4592
+ export {
4593
+ ti as diagram
4594
+ };