@altimateai/ui-components 0.0.77-beta.7 → 0.0.77

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 (405) hide show
  1. package/dist/CoachForm.css +1 -1
  2. package/dist/CoachForm.js +24114 -67797
  3. package/dist/DbtDocsRenderer.js +1 -1
  4. package/dist/Stack.js +2274 -2824
  5. package/dist/Switch.js +87 -128
  6. package/dist/ToggleGroup.js +4788 -5963
  7. package/dist/_basePickBy.js +60 -60
  8. package/dist/_baseUniq.js +152 -152
  9. package/dist/arc.js +53 -53
  10. package/dist/architectureDiagram-VXUJARFQ.js +4315 -480
  11. package/dist/assets/icons/index.js +1 -1
  12. package/dist/blockDiagram-VD42YOAC.js +1 -1
  13. package/dist/c4Diagram-YG6GDRKO.js +22 -22
  14. package/dist/channel.js +2 -2
  15. package/dist/chatbotV2/index.d.ts +19 -57
  16. package/dist/chatbotV2/index.js +56 -91
  17. package/dist/chunk-4BX2VUAB.js +1 -1
  18. package/dist/chunk-55IACEB6.js +2 -2
  19. package/dist/chunk-B4BG7PRW.js +1 -1
  20. package/dist/chunk-DI55MBZ5.js +14 -14
  21. package/dist/chunk-FMBD7UC4.js +1 -1
  22. package/dist/chunk-QN33PNHL.js +5 -5
  23. package/dist/chunk-QZHKN3VN.js +1 -1
  24. package/dist/chunk-TZMSLE5B.js +1 -1
  25. package/dist/classDiagram-2ON5EDUG.js +1 -1
  26. package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
  27. package/dist/cose-bilkent-S5V4N54A.js +2535 -160
  28. package/dist/dagre-6UL2VRFP.js +101 -101
  29. package/dist/dayjs.min.js +2 -2
  30. package/dist/defaultLocale.js +3 -3
  31. package/dist/diagram-PSM6KHXK.js +414 -198
  32. package/dist/diagram-QEK2KX5R.js +26 -26
  33. package/dist/diagram-S2PKOQOG.js +12 -12
  34. package/dist/erDiagram-Q2GNP2WA.js +1 -1
  35. package/dist/flowDiagram-NV44I4VS.js +6 -6
  36. package/dist/ganttDiagram-LVOFAZNH.js +1718 -843
  37. package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
  38. package/dist/graph.js +18 -17
  39. package/dist/index.d.ts +6 -101
  40. package/dist/index.js +37 -37
  41. package/dist/index2.js +684 -216
  42. package/dist/infoDiagram-F6ZHWCRC.js +14 -14
  43. package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
  44. package/dist/kanban-definition-3W4ZIXB7.js +42 -42
  45. package/dist/layout.js +678 -567
  46. package/dist/lineage/index.js +1315 -1308
  47. package/dist/linear.js +1 -1
  48. package/dist/main.css +1 -1
  49. package/dist/main.js +151 -151
  50. package/dist/mermaid-parser.core.js +155 -155
  51. package/dist/mindmap-definition-VGOIOE7T.js +28 -28
  52. package/dist/pieDiagram-ADFJNKIX.js +108 -68
  53. package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
  54. package/dist/redux-toolkit.modern.js +555 -563
  55. package/dist/requirementDiagram-UZGBJVZJ.js +14 -14
  56. package/dist/sankeyDiagram-TZEHDZUN.js +622 -229
  57. package/dist/sequenceDiagram-WL72ISMW.js +1 -1
  58. package/dist/shadcn/index.d.ts +40 -24
  59. package/dist/shadcn/index.js +4733 -6547
  60. package/dist/stateDiagram-FKZM4ZOC.js +33 -33
  61. package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
  62. package/dist/storybook/Typography.stories.tsx +120 -93
  63. package/dist/timeline-definition-IT6M3QCI.js +63 -63
  64. package/dist/{types-UHJCpYj0.d.ts → types-ByRPUpXR.d.ts} +116 -25
  65. package/dist/xychartDiagram-PRI3JC2R.js +491 -449
  66. package/package.json +1 -1
  67. package/dist/abap.js +0 -6
  68. package/dist/actionscript-3.js +0 -6
  69. package/dist/ada.js +0 -6
  70. package/dist/andromeeda.js +0 -4
  71. package/dist/angular-html.js +0 -32
  72. package/dist/angular-ts.js +0 -21
  73. package/dist/apache.js +0 -6
  74. package/dist/apex.js +0 -6
  75. package/dist/apl.js +0 -16
  76. package/dist/applescript.js +0 -6
  77. package/dist/ara.js +0 -6
  78. package/dist/architectureDiagram-VXUJARFQ2.js +0 -831
  79. package/dist/asciidoc.js +0 -6
  80. package/dist/asm.js +0 -6
  81. package/dist/astro.js +0 -18
  82. package/dist/aurora-x.js +0 -4
  83. package/dist/awk.js +0 -6
  84. package/dist/ayu-dark.js +0 -4
  85. package/dist/ballerina.js +0 -6
  86. package/dist/band.js +0 -46
  87. package/dist/bat.js +0 -6
  88. package/dist/beancount.js +0 -6
  89. package/dist/berry.js +0 -6
  90. package/dist/bibtex.js +0 -6
  91. package/dist/bicep.js +0 -6
  92. package/dist/blade.js +0 -20
  93. package/dist/blockDiagram-VD42YOAC2.js +0 -2266
  94. package/dist/bsl.js +0 -8
  95. package/dist/c.js +0 -6
  96. package/dist/c3.js +0 -6
  97. package/dist/c4Diagram-YG6GDRKO2.js +0 -1582
  98. package/dist/cadence.js +0 -6
  99. package/dist/cairo.js +0 -8
  100. package/dist/catppuccin-frappe.js +0 -4
  101. package/dist/catppuccin-latte.js +0 -4
  102. package/dist/catppuccin-macchiato.js +0 -4
  103. package/dist/catppuccin-mocha.js +0 -4
  104. package/dist/chunk-4BX2VUAB2.js +0 -9
  105. package/dist/chunk-55IACEB62.js +0 -9
  106. package/dist/chunk-B4BG7PRW2.js +0 -1377
  107. package/dist/chunk-DI55MBZ52.js +0 -1382
  108. package/dist/chunk-FMBD7UC42.js +0 -19
  109. package/dist/chunk-QN33PNHL2.js +0 -20
  110. package/dist/chunk-QZHKN3VN2.js +0 -15
  111. package/dist/chunk-TZMSLE5B2.js +0 -64
  112. package/dist/clarity.js +0 -6
  113. package/dist/classDiagram-2ON5EDUG2.js +0 -17
  114. package/dist/classDiagram-v2-WZHVMYZB2.js +0 -17
  115. package/dist/clojure.js +0 -6
  116. package/dist/cmake.js +0 -6
  117. package/dist/cobol.js +0 -10
  118. package/dist/code-block-37QAKDTI.js +0 -27
  119. package/dist/codeowners.js +0 -6
  120. package/dist/codeql.js +0 -6
  121. package/dist/coffee.js +0 -8
  122. package/dist/common-lisp.js +0 -6
  123. package/dist/coq.js +0 -6
  124. package/dist/cose-bilkent-S5V4N54A2.js +0 -231
  125. package/dist/cpp.js +0 -18
  126. package/dist/crystal.js +0 -18
  127. package/dist/csharp.js +0 -6
  128. package/dist/css.js +0 -6
  129. package/dist/csv.js +0 -6
  130. package/dist/cue.js +0 -6
  131. package/dist/cypher.js +0 -6
  132. package/dist/cytoscape-cose-bilkent.js +0 -2380
  133. package/dist/cytoscape-fcose.js +0 -3840
  134. package/dist/d.js +0 -6
  135. package/dist/dagre-6UL2VRFP2.js +0 -447
  136. package/dist/dark-plus.js +0 -4
  137. package/dist/dart.js +0 -6
  138. package/dist/dax.js +0 -6
  139. package/dist/desktop.js +0 -6
  140. package/dist/diagram-PSM6KHXK2.js +0 -319
  141. package/dist/diagram-QEK2KX5R2.js +0 -221
  142. package/dist/diagram-S2PKOQOG2.js +0 -143
  143. package/dist/diff.js +0 -6
  144. package/dist/docker.js +0 -6
  145. package/dist/dotenv.js +0 -6
  146. package/dist/dracula-soft.js +0 -4
  147. package/dist/dracula.js +0 -4
  148. package/dist/dream-maker.js +0 -6
  149. package/dist/edge.js +0 -12
  150. package/dist/elixir.js +0 -8
  151. package/dist/elm.js +0 -8
  152. package/dist/emacs-lisp.js +0 -6
  153. package/dist/erDiagram-Q2GNP2WA2.js +0 -843
  154. package/dist/erb.js +0 -10
  155. package/dist/erlang.js +0 -8
  156. package/dist/everforest-dark.js +0 -4
  157. package/dist/everforest-light.js +0 -4
  158. package/dist/fennel.js +0 -6
  159. package/dist/fish.js +0 -6
  160. package/dist/flowDiagram-NV44I4VS2.js +0 -1628
  161. package/dist/fluent.js +0 -6
  162. package/dist/fortran-fixed-form.js +0 -8
  163. package/dist/fortran-free-form.js +0 -6
  164. package/dist/fsharp.js +0 -8
  165. package/dist/ganttDiagram-JELNMOA3.js +0 -1788
  166. package/dist/gdresource.js +0 -10
  167. package/dist/gdscript.js +0 -6
  168. package/dist/gdshader.js +0 -6
  169. package/dist/genie.js +0 -6
  170. package/dist/gherkin.js +0 -6
  171. package/dist/git-commit.js +0 -8
  172. package/dist/git-rebase.js +0 -8
  173. package/dist/gitGraphDiagram-NY62KEGX2.js +0 -713
  174. package/dist/github-dark-default.js +0 -4
  175. package/dist/github-dark-dimmed.js +0 -4
  176. package/dist/github-dark-high-contrast.js +0 -4
  177. package/dist/github-dark.js +0 -4
  178. package/dist/github-light-default.js +0 -4
  179. package/dist/github-light-high-contrast.js +0 -4
  180. package/dist/github-light.js +0 -4
  181. package/dist/gleam.js +0 -6
  182. package/dist/glimmer-js.js +0 -14
  183. package/dist/glimmer-ts.js +0 -14
  184. package/dist/glsl.js +0 -8
  185. package/dist/gn.js +0 -6
  186. package/dist/gnuplot.js +0 -6
  187. package/dist/go.js +0 -6
  188. package/dist/graph2.js +0 -246
  189. package/dist/graphql.js +0 -14
  190. package/dist/groovy.js +0 -6
  191. package/dist/gruvbox-dark-hard.js +0 -4
  192. package/dist/gruvbox-dark-medium.js +0 -4
  193. package/dist/gruvbox-dark-soft.js +0 -4
  194. package/dist/gruvbox-light-hard.js +0 -4
  195. package/dist/gruvbox-light-medium.js +0 -4
  196. package/dist/gruvbox-light-soft.js +0 -4
  197. package/dist/hack.js +0 -10
  198. package/dist/haml.js +0 -10
  199. package/dist/handlebars.js +0 -14
  200. package/dist/haskell.js +0 -6
  201. package/dist/haxe.js +0 -6
  202. package/dist/hcl.js +0 -6
  203. package/dist/hjson.js +0 -6
  204. package/dist/hlsl.js +0 -6
  205. package/dist/houston.js +0 -4
  206. package/dist/html-derivative.js +0 -8
  207. package/dist/html.js +0 -10
  208. package/dist/http.js +0 -14
  209. package/dist/hurl.js +0 -12
  210. package/dist/hxml.js +0 -8
  211. package/dist/hy.js +0 -6
  212. package/dist/imba.js +0 -6
  213. package/dist/index3.js +0 -689
  214. package/dist/infoDiagram-WHAUD3N6.js +0 -24
  215. package/dist/ini.js +0 -6
  216. package/dist/java.js +0 -6
  217. package/dist/javascript.js +0 -6
  218. package/dist/jinja.js +0 -11
  219. package/dist/jison.js +0 -8
  220. package/dist/journeyDiagram-XKPGCS4Q2.js +0 -837
  221. package/dist/json.js +0 -6
  222. package/dist/json5.js +0 -6
  223. package/dist/jsonc.js +0 -6
  224. package/dist/jsonl.js +0 -6
  225. package/dist/jsonnet.js +0 -6
  226. package/dist/jssm.js +0 -6
  227. package/dist/jsx.js +0 -6
  228. package/dist/julia.js +0 -16
  229. package/dist/kanagawa-dragon.js +0 -4
  230. package/dist/kanagawa-lotus.js +0 -4
  231. package/dist/kanagawa-wave.js +0 -4
  232. package/dist/kanban-definition-3W4ZIXB72.js +0 -720
  233. package/dist/katex2.js +0 -11691
  234. package/dist/kdl.js +0 -6
  235. package/dist/kotlin.js +0 -6
  236. package/dist/kusto.js +0 -6
  237. package/dist/laserwave.js +0 -4
  238. package/dist/latex.js +0 -8
  239. package/dist/layout2.js +0 -1224
  240. package/dist/lean.js +0 -6
  241. package/dist/less.js +0 -6
  242. package/dist/light-plus.js +0 -4
  243. package/dist/liquid.js +0 -14
  244. package/dist/llvm.js +0 -6
  245. package/dist/log.js +0 -6
  246. package/dist/logo.js +0 -6
  247. package/dist/lua.js +0 -8
  248. package/dist/luau.js +0 -6
  249. package/dist/make.js +0 -6
  250. package/dist/markdown.js +0 -6
  251. package/dist/marko.js +0 -14
  252. package/dist/material-theme-darker.js +0 -4
  253. package/dist/material-theme-lighter.js +0 -4
  254. package/dist/material-theme-ocean.js +0 -4
  255. package/dist/material-theme-palenight.js +0 -4
  256. package/dist/material-theme.js +0 -4
  257. package/dist/matlab.js +0 -6
  258. package/dist/mdc.js +0 -12
  259. package/dist/mdx.js +0 -6
  260. package/dist/mermaid-4DMBBIKO.js +0 -4
  261. package/dist/mermaid.js +0 -6
  262. package/dist/min-dark.js +0 -4
  263. package/dist/min-light.js +0 -4
  264. package/dist/mindmap-definition-VGOIOE7T2.js +0 -786
  265. package/dist/mipsasm.js +0 -6
  266. package/dist/mojo.js +0 -6
  267. package/dist/monokai.js +0 -4
  268. package/dist/moonbit.js +0 -6
  269. package/dist/move.js +0 -6
  270. package/dist/narrat.js +0 -6
  271. package/dist/nextflow.js +0 -6
  272. package/dist/nginx.js +0 -8
  273. package/dist/night-owl.js +0 -4
  274. package/dist/nim.js +0 -20
  275. package/dist/nix.js +0 -9
  276. package/dist/nord.js +0 -4
  277. package/dist/nushell.js +0 -6
  278. package/dist/objective-c.js +0 -6
  279. package/dist/objective-cpp.js +0 -6
  280. package/dist/ocaml.js +0 -6
  281. package/dist/one-dark-pro.js +0 -4
  282. package/dist/one-light.js +0 -4
  283. package/dist/openscad.js +0 -6
  284. package/dist/pascal.js +0 -6
  285. package/dist/perl.js +0 -16
  286. package/dist/php.js +0 -18
  287. package/dist/pie.js +0 -45
  288. package/dist/pieDiagram-ADFJNKIX2.js +0 -123
  289. package/dist/pkl.js +0 -6
  290. package/dist/plastic.js +0 -4
  291. package/dist/plsql.js +0 -6
  292. package/dist/po.js +0 -6
  293. package/dist/poimandres.js +0 -4
  294. package/dist/polar.js +0 -6
  295. package/dist/postcss.js +0 -6
  296. package/dist/powerquery.js +0 -6
  297. package/dist/powershell.js +0 -6
  298. package/dist/prisma.js +0 -6
  299. package/dist/prolog.js +0 -6
  300. package/dist/proto.js +0 -6
  301. package/dist/pug.js +0 -12
  302. package/dist/puppet.js +0 -6
  303. package/dist/purescript.js +0 -6
  304. package/dist/python.js +0 -6
  305. package/dist/qml.js +0 -8
  306. package/dist/qmldir.js +0 -6
  307. package/dist/qss.js +0 -6
  308. package/dist/quadrantDiagram-AYHSOK5B2.js +0 -1025
  309. package/dist/r.js +0 -6
  310. package/dist/racket.js +0 -6
  311. package/dist/raku.js +0 -6
  312. package/dist/razor.js +0 -10
  313. package/dist/red.js +0 -4
  314. package/dist/reg.js +0 -6
  315. package/dist/regexp.js +0 -6
  316. package/dist/rel.js +0 -6
  317. package/dist/requirementDiagram-UZGBJVZJ2.js +0 -852
  318. package/dist/riscv.js +0 -6
  319. package/dist/rose-pine-dawn.js +0 -4
  320. package/dist/rose-pine-moon.js +0 -4
  321. package/dist/rose-pine.js +0 -4
  322. package/dist/rosmsg.js +0 -6
  323. package/dist/rst.js +0 -22
  324. package/dist/ruby.js +0 -30
  325. package/dist/rust.js +0 -6
  326. package/dist/sankeyDiagram-TZEHDZUN2.js +0 -418
  327. package/dist/sankeyLinkHorizontal.js +0 -403
  328. package/dist/sas.js +0 -8
  329. package/dist/sass.js +0 -6
  330. package/dist/scala.js +0 -6
  331. package/dist/scheme.js +0 -6
  332. package/dist/scss.js +0 -8
  333. package/dist/sdbl.js +0 -6
  334. package/dist/sequenceDiagram-WL72ISMW2.js +0 -2523
  335. package/dist/shaderlab.js +0 -8
  336. package/dist/shellscript.js +0 -6
  337. package/dist/shellsession.js +0 -8
  338. package/dist/slack-dark.js +0 -4
  339. package/dist/slack-ochin.js +0 -4
  340. package/dist/smalltalk.js +0 -6
  341. package/dist/snazzy-light.js +0 -4
  342. package/dist/solarized-dark.js +0 -4
  343. package/dist/solarized-light.js +0 -4
  344. package/dist/solidity.js +0 -6
  345. package/dist/soy.js +0 -8
  346. package/dist/sparql.js +0 -8
  347. package/dist/splunk.js +0 -6
  348. package/dist/sql.js +0 -6
  349. package/dist/ssh-config.js +0 -6
  350. package/dist/stata.js +0 -8
  351. package/dist/stateDiagram-FKZM4ZOC2.js +0 -264
  352. package/dist/stateDiagram-v2-4FDKWEC32.js +0 -17
  353. package/dist/stylus.js +0 -6
  354. package/dist/svelte.js +0 -14
  355. package/dist/swift.js +0 -6
  356. package/dist/synthwave-84.js +0 -4
  357. package/dist/system-verilog.js +0 -6
  358. package/dist/systemd.js +0 -6
  359. package/dist/talonscript.js +0 -6
  360. package/dist/tasl.js +0 -6
  361. package/dist/tcl.js +0 -6
  362. package/dist/templ.js +0 -12
  363. package/dist/terraform.js +0 -6
  364. package/dist/tex.js +0 -8
  365. package/dist/time.js +0 -900
  366. package/dist/timeline-definition-IT6M3QCI2.js +0 -802
  367. package/dist/tokyo-night.js +0 -4
  368. package/dist/toml.js +0 -6
  369. package/dist/ts-tags.js +0 -41
  370. package/dist/tsv.js +0 -6
  371. package/dist/tsx.js +0 -6
  372. package/dist/turtle.js +0 -6
  373. package/dist/twig.js +0 -18
  374. package/dist/typescript.js +0 -6
  375. package/dist/typespec.js +0 -6
  376. package/dist/typst.js +0 -6
  377. package/dist/union.js +0 -8
  378. package/dist/v.js +0 -6
  379. package/dist/vala.js +0 -6
  380. package/dist/vb.js +0 -6
  381. package/dist/verilog.js +0 -6
  382. package/dist/vesper.js +0 -4
  383. package/dist/vhdl.js +0 -6
  384. package/dist/viml.js +0 -6
  385. package/dist/vitesse-black.js +0 -4
  386. package/dist/vitesse-dark.js +0 -4
  387. package/dist/vitesse-light.js +0 -4
  388. package/dist/vue-html.js +0 -8
  389. package/dist/vue-vine.js +0 -18
  390. package/dist/vue.js +0 -31
  391. package/dist/vyper.js +0 -6
  392. package/dist/wasm.js +0 -7
  393. package/dist/wasm2.js +0 -6
  394. package/dist/wenyan.js +0 -6
  395. package/dist/wgsl.js +0 -6
  396. package/dist/wikitext.js +0 -6
  397. package/dist/wit.js +0 -6
  398. package/dist/wolfram.js +0 -6
  399. package/dist/xml.js +0 -8
  400. package/dist/xsl.js +0 -8
  401. package/dist/xychartDiagram-PRI3JC2R2.js +0 -1299
  402. package/dist/yaml.js +0 -6
  403. package/dist/zenscript.js +0 -6
  404. package/dist/zig.js +0 -6
  405. package/dist/zipObject.js +0 -128
@@ -1,49 +1,2424 @@
1
- import { _ as l, l as y } from "./CoachForm.js";
2
- import { c as P } from "./cytoscape.esm.js";
3
- import { c as k } from "./cytoscape-cose-bilkent.js";
4
- import { s as q } from "./redux-toolkit.modern.js";
5
- P.use(k);
6
- function D(t, o) {
7
- t.forEach((e) => {
8
- const n = {
9
- id: e.id,
10
- labelText: e.label,
11
- height: e.height,
12
- width: e.width,
13
- padding: e.padding ?? 0
1
+ import { a1 as V, ad as k } from "./CoachForm.js";
2
+ import { c as J } from "./cytoscape.esm.js";
3
+ import { c as $, g as lt, s as gt } from "./redux-toolkit.modern.js";
4
+ var tt = { exports: {} }, Z = { exports: {} }, Q = { exports: {} }, q;
5
+ function ut() {
6
+ return q || (q = 1, function(G, b) {
7
+ (function(I, T) {
8
+ G.exports = T();
9
+ })($, function() {
10
+ return (
11
+ /******/
12
+ function(N) {
13
+ var I = {};
14
+ function T(o) {
15
+ if (I[o])
16
+ return I[o].exports;
17
+ var e = I[o] = {
18
+ /******/
19
+ i: o,
20
+ /******/
21
+ l: !1,
22
+ /******/
23
+ exports: {}
24
+ /******/
25
+ };
26
+ return N[o].call(e.exports, e, e.exports, T), e.l = !0, e.exports;
27
+ }
28
+ return T.m = N, T.c = I, T.i = function(o) {
29
+ return o;
30
+ }, T.d = function(o, e, t) {
31
+ T.o(o, e) || Object.defineProperty(o, e, {
32
+ /******/
33
+ configurable: !1,
34
+ /******/
35
+ enumerable: !0,
36
+ /******/
37
+ get: t
38
+ /******/
39
+ });
40
+ }, T.n = function(o) {
41
+ var e = o && o.__esModule ? (
42
+ /******/
43
+ function() {
44
+ return o.default;
45
+ }
46
+ ) : (
47
+ /******/
48
+ function() {
49
+ return o;
50
+ }
51
+ );
52
+ return T.d(e, "a", e), e;
53
+ }, T.o = function(o, e) {
54
+ return Object.prototype.hasOwnProperty.call(o, e);
55
+ }, T.p = "", T(T.s = 26);
56
+ }([
57
+ /* 0 */
58
+ /***/
59
+ function(N, I, T) {
60
+ function o() {
61
+ }
62
+ o.QUALITY = 1, o.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, o.DEFAULT_INCREMENTAL = !1, o.DEFAULT_ANIMATION_ON_LAYOUT = !0, o.DEFAULT_ANIMATION_DURING_LAYOUT = !1, o.DEFAULT_ANIMATION_PERIOD = 50, o.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, o.DEFAULT_GRAPH_MARGIN = 15, o.NODE_DIMENSIONS_INCLUDE_LABELS = !1, o.SIMPLE_NODE_SIZE = 40, o.SIMPLE_NODE_HALF_SIZE = o.SIMPLE_NODE_SIZE / 2, o.EMPTY_COMPOUND_NODE_SIZE = 40, o.MIN_EDGE_LENGTH = 1, o.WORLD_BOUNDARY = 1e6, o.INITIAL_WORLD_BOUNDARY = o.WORLD_BOUNDARY / 1e3, o.WORLD_CENTER_X = 1200, o.WORLD_CENTER_Y = 900, N.exports = o;
63
+ },
64
+ /* 1 */
65
+ /***/
66
+ function(N, I, T) {
67
+ var o = T(2), e = T(8), t = T(9);
68
+ function i(g, n, d) {
69
+ o.call(this, d), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = d, this.bendpoints = [], this.source = g, this.target = n;
70
+ }
71
+ i.prototype = Object.create(o.prototype);
72
+ for (var l in o)
73
+ i[l] = o[l];
74
+ i.prototype.getSource = function() {
75
+ return this.source;
76
+ }, i.prototype.getTarget = function() {
77
+ return this.target;
78
+ }, i.prototype.isInterGraph = function() {
79
+ return this.isInterGraph;
80
+ }, i.prototype.getLength = function() {
81
+ return this.length;
82
+ }, i.prototype.isOverlapingSourceAndTarget = function() {
83
+ return this.isOverlapingSourceAndTarget;
84
+ }, i.prototype.getBendpoints = function() {
85
+ return this.bendpoints;
86
+ }, i.prototype.getLca = function() {
87
+ return this.lca;
88
+ }, i.prototype.getSourceInLca = function() {
89
+ return this.sourceInLca;
90
+ }, i.prototype.getTargetInLca = function() {
91
+ return this.targetInLca;
92
+ }, i.prototype.getOtherEnd = function(g) {
93
+ if (this.source === g)
94
+ return this.target;
95
+ if (this.target === g)
96
+ return this.source;
97
+ throw "Node is not incident with this edge";
98
+ }, i.prototype.getOtherEndInGraph = function(g, n) {
99
+ for (var d = this.getOtherEnd(g), r = n.getGraphManager().getRoot(); ; ) {
100
+ if (d.getOwner() == n)
101
+ return d;
102
+ if (d.getOwner() == r)
103
+ break;
104
+ d = d.getOwner().getParent();
105
+ }
106
+ return null;
107
+ }, i.prototype.updateLength = function() {
108
+ var g = new Array(4);
109
+ this.isOverlapingSourceAndTarget = e.getIntersection(this.target.getRect(), this.source.getRect(), g), this.isOverlapingSourceAndTarget || (this.lengthX = g[0] - g[2], this.lengthY = g[1] - g[3], Math.abs(this.lengthX) < 1 && (this.lengthX = t.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = t.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
110
+ }, i.prototype.updateLengthSimple = function() {
111
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = t.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = t.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
112
+ }, N.exports = i;
113
+ },
114
+ /* 2 */
115
+ /***/
116
+ function(N, I, T) {
117
+ function o(e) {
118
+ this.vGraphObject = e;
119
+ }
120
+ N.exports = o;
121
+ },
122
+ /* 3 */
123
+ /***/
124
+ function(N, I, T) {
125
+ var o = T(2), e = T(10), t = T(13), i = T(0), l = T(16), g = T(4);
126
+ function n(r, h, a, p) {
127
+ a == null && p == null && (p = h), o.call(this, p), r.graphManager != null && (r = r.graphManager), this.estimatedSize = e.MIN_VALUE, this.inclusionTreeDepth = e.MAX_VALUE, this.vGraphObject = p, this.edges = [], this.graphManager = r, a != null && h != null ? this.rect = new t(h.x, h.y, a.width, a.height) : this.rect = new t();
128
+ }
129
+ n.prototype = Object.create(o.prototype);
130
+ for (var d in o)
131
+ n[d] = o[d];
132
+ n.prototype.getEdges = function() {
133
+ return this.edges;
134
+ }, n.prototype.getChild = function() {
135
+ return this.child;
136
+ }, n.prototype.getOwner = function() {
137
+ return this.owner;
138
+ }, n.prototype.getWidth = function() {
139
+ return this.rect.width;
140
+ }, n.prototype.setWidth = function(r) {
141
+ this.rect.width = r;
142
+ }, n.prototype.getHeight = function() {
143
+ return this.rect.height;
144
+ }, n.prototype.setHeight = function(r) {
145
+ this.rect.height = r;
146
+ }, n.prototype.getCenterX = function() {
147
+ return this.rect.x + this.rect.width / 2;
148
+ }, n.prototype.getCenterY = function() {
149
+ return this.rect.y + this.rect.height / 2;
150
+ }, n.prototype.getCenter = function() {
151
+ return new g(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
152
+ }, n.prototype.getLocation = function() {
153
+ return new g(this.rect.x, this.rect.y);
154
+ }, n.prototype.getRect = function() {
155
+ return this.rect;
156
+ }, n.prototype.getDiagonal = function() {
157
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
158
+ }, n.prototype.getHalfTheDiagonal = function() {
159
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
160
+ }, n.prototype.setRect = function(r, h) {
161
+ this.rect.x = r.x, this.rect.y = r.y, this.rect.width = h.width, this.rect.height = h.height;
162
+ }, n.prototype.setCenter = function(r, h) {
163
+ this.rect.x = r - this.rect.width / 2, this.rect.y = h - this.rect.height / 2;
164
+ }, n.prototype.setLocation = function(r, h) {
165
+ this.rect.x = r, this.rect.y = h;
166
+ }, n.prototype.moveBy = function(r, h) {
167
+ this.rect.x += r, this.rect.y += h;
168
+ }, n.prototype.getEdgeListToNode = function(r) {
169
+ var h = [], a = this;
170
+ return a.edges.forEach(function(p) {
171
+ if (p.target == r) {
172
+ if (p.source != a) throw "Incorrect edge source!";
173
+ h.push(p);
174
+ }
175
+ }), h;
176
+ }, n.prototype.getEdgesBetween = function(r) {
177
+ var h = [], a = this;
178
+ return a.edges.forEach(function(p) {
179
+ if (!(p.source == a || p.target == a)) throw "Incorrect edge source and/or target";
180
+ (p.target == r || p.source == r) && h.push(p);
181
+ }), h;
182
+ }, n.prototype.getNeighborsList = function() {
183
+ var r = /* @__PURE__ */ new Set(), h = this;
184
+ return h.edges.forEach(function(a) {
185
+ if (a.source == h)
186
+ r.add(a.target);
187
+ else {
188
+ if (a.target != h)
189
+ throw "Incorrect incidency!";
190
+ r.add(a.source);
191
+ }
192
+ }), r;
193
+ }, n.prototype.withChildren = function() {
194
+ var r = /* @__PURE__ */ new Set(), h, a;
195
+ if (r.add(this), this.child != null)
196
+ for (var p = this.child.getNodes(), v = 0; v < p.length; v++)
197
+ h = p[v], a = h.withChildren(), a.forEach(function(D) {
198
+ r.add(D);
199
+ });
200
+ return r;
201
+ }, n.prototype.getNoOfChildren = function() {
202
+ var r = 0, h;
203
+ if (this.child == null)
204
+ r = 1;
205
+ else
206
+ for (var a = this.child.getNodes(), p = 0; p < a.length; p++)
207
+ h = a[p], r += h.getNoOfChildren();
208
+ return r == 0 && (r = 1), r;
209
+ }, n.prototype.getEstimatedSize = function() {
210
+ if (this.estimatedSize == e.MIN_VALUE)
211
+ throw "assert failed";
212
+ return this.estimatedSize;
213
+ }, n.prototype.calcEstimatedSize = function() {
214
+ 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);
215
+ }, n.prototype.scatter = function() {
216
+ var r, h, a = -i.INITIAL_WORLD_BOUNDARY, p = i.INITIAL_WORLD_BOUNDARY;
217
+ r = i.WORLD_CENTER_X + l.nextDouble() * (p - a) + a;
218
+ var v = -i.INITIAL_WORLD_BOUNDARY, D = i.INITIAL_WORLD_BOUNDARY;
219
+ h = i.WORLD_CENTER_Y + l.nextDouble() * (D - v) + v, this.rect.x = r, this.rect.y = h;
220
+ }, n.prototype.updateBounds = function() {
221
+ if (this.getChild() == null)
222
+ throw "assert failed";
223
+ if (this.getChild().getNodes().length != 0) {
224
+ var r = this.getChild();
225
+ if (r.updateBounds(!0), this.rect.x = r.getLeft(), this.rect.y = r.getTop(), this.setWidth(r.getRight() - r.getLeft()), this.setHeight(r.getBottom() - r.getTop()), i.NODE_DIMENSIONS_INCLUDE_LABELS) {
226
+ var h = r.getRight() - r.getLeft(), a = r.getBottom() - r.getTop();
227
+ this.labelWidth > h && (this.rect.x -= (this.labelWidth - h) / 2, this.setWidth(this.labelWidth)), this.labelHeight > a && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - a) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - a), this.setHeight(this.labelHeight));
228
+ }
229
+ }
230
+ }, n.prototype.getInclusionTreeDepth = function() {
231
+ if (this.inclusionTreeDepth == e.MAX_VALUE)
232
+ throw "assert failed";
233
+ return this.inclusionTreeDepth;
234
+ }, n.prototype.transform = function(r) {
235
+ var h = this.rect.x;
236
+ h > i.WORLD_BOUNDARY ? h = i.WORLD_BOUNDARY : h < -i.WORLD_BOUNDARY && (h = -i.WORLD_BOUNDARY);
237
+ var a = this.rect.y;
238
+ a > i.WORLD_BOUNDARY ? a = i.WORLD_BOUNDARY : a < -i.WORLD_BOUNDARY && (a = -i.WORLD_BOUNDARY);
239
+ var p = new g(h, a), v = r.inverseTransformPoint(p);
240
+ this.setLocation(v.x, v.y);
241
+ }, n.prototype.getLeft = function() {
242
+ return this.rect.x;
243
+ }, n.prototype.getRight = function() {
244
+ return this.rect.x + this.rect.width;
245
+ }, n.prototype.getTop = function() {
246
+ return this.rect.y;
247
+ }, n.prototype.getBottom = function() {
248
+ return this.rect.y + this.rect.height;
249
+ }, n.prototype.getParent = function() {
250
+ return this.owner == null ? null : this.owner.getParent();
251
+ }, N.exports = n;
252
+ },
253
+ /* 4 */
254
+ /***/
255
+ function(N, I, T) {
256
+ function o(e, t) {
257
+ e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
258
+ }
259
+ o.prototype.getX = function() {
260
+ return this.x;
261
+ }, o.prototype.getY = function() {
262
+ return this.y;
263
+ }, o.prototype.setX = function(e) {
264
+ this.x = e;
265
+ }, o.prototype.setY = function(e) {
266
+ this.y = e;
267
+ }, o.prototype.getDifference = function(e) {
268
+ return new DimensionD(this.x - e.x, this.y - e.y);
269
+ }, o.prototype.getCopy = function() {
270
+ return new o(this.x, this.y);
271
+ }, o.prototype.translate = function(e) {
272
+ return this.x += e.width, this.y += e.height, this;
273
+ }, N.exports = o;
274
+ },
275
+ /* 5 */
276
+ /***/
277
+ function(N, I, T) {
278
+ var o = T(2), e = T(10), t = T(0), i = T(6), l = T(3), g = T(1), n = T(13), d = T(12), r = T(11);
279
+ function h(p, v, D) {
280
+ o.call(this, D), this.estimatedSize = e.MIN_VALUE, this.margin = t.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = p, v != null && v instanceof i ? this.graphManager = v : v != null && v instanceof Layout && (this.graphManager = v.graphManager);
281
+ }
282
+ h.prototype = Object.create(o.prototype);
283
+ for (var a in o)
284
+ h[a] = o[a];
285
+ h.prototype.getNodes = function() {
286
+ return this.nodes;
287
+ }, h.prototype.getEdges = function() {
288
+ return this.edges;
289
+ }, h.prototype.getGraphManager = function() {
290
+ return this.graphManager;
291
+ }, h.prototype.getParent = function() {
292
+ return this.parent;
293
+ }, h.prototype.getLeft = function() {
294
+ return this.left;
295
+ }, h.prototype.getRight = function() {
296
+ return this.right;
297
+ }, h.prototype.getTop = function() {
298
+ return this.top;
299
+ }, h.prototype.getBottom = function() {
300
+ return this.bottom;
301
+ }, h.prototype.isConnected = function() {
302
+ return this.isConnected;
303
+ }, h.prototype.add = function(p, v, D) {
304
+ if (v == null && D == null) {
305
+ var u = p;
306
+ if (this.graphManager == null)
307
+ throw "Graph has no graph mgr!";
308
+ if (this.getNodes().indexOf(u) > -1)
309
+ throw "Node already in graph!";
310
+ return u.owner = this, this.getNodes().push(u), u;
311
+ } else {
312
+ var E = p;
313
+ if (!(this.getNodes().indexOf(v) > -1 && this.getNodes().indexOf(D) > -1))
314
+ throw "Source or target not in graph!";
315
+ if (!(v.owner == D.owner && v.owner == this))
316
+ throw "Both owners must be this graph!";
317
+ return v.owner != D.owner ? null : (E.source = v, E.target = D, E.isInterGraph = !1, this.getEdges().push(E), v.edges.push(E), D != v && D.edges.push(E), E);
318
+ }
319
+ }, h.prototype.remove = function(p) {
320
+ var v = p;
321
+ if (p instanceof l) {
322
+ if (v == null)
323
+ throw "Node is null!";
324
+ if (!(v.owner != null && v.owner == this))
325
+ throw "Owner graph is invalid!";
326
+ if (this.graphManager == null)
327
+ throw "Owner graph manager is invalid!";
328
+ for (var D = v.edges.slice(), u, E = D.length, y = 0; y < E; y++)
329
+ u = D[y], u.isInterGraph ? this.graphManager.remove(u) : u.source.owner.remove(u);
330
+ var O = this.nodes.indexOf(v);
331
+ if (O == -1)
332
+ throw "Node not in owner node list!";
333
+ this.nodes.splice(O, 1);
334
+ } else if (p instanceof g) {
335
+ var u = p;
336
+ if (u == null)
337
+ throw "Edge is null!";
338
+ if (!(u.source != null && u.target != null))
339
+ throw "Source and/or target is null!";
340
+ if (!(u.source.owner != null && u.target.owner != null && u.source.owner == this && u.target.owner == this))
341
+ throw "Source and/or target owner is invalid!";
342
+ var s = u.source.edges.indexOf(u), f = u.target.edges.indexOf(u);
343
+ if (!(s > -1 && f > -1))
344
+ throw "Source and/or target doesn't know this edge!";
345
+ u.source.edges.splice(s, 1), u.target != u.source && u.target.edges.splice(f, 1);
346
+ var O = u.source.owner.getEdges().indexOf(u);
347
+ if (O == -1)
348
+ throw "Not in owner's edge list!";
349
+ u.source.owner.getEdges().splice(O, 1);
350
+ }
351
+ }, h.prototype.updateLeftTop = function() {
352
+ for (var p = e.MAX_VALUE, v = e.MAX_VALUE, D, u, E, y = this.getNodes(), O = y.length, s = 0; s < O; s++) {
353
+ var f = y[s];
354
+ D = f.getTop(), u = f.getLeft(), p > D && (p = D), v > u && (v = u);
355
+ }
356
+ return p == e.MAX_VALUE ? null : (y[0].getParent().paddingLeft != null ? E = y[0].getParent().paddingLeft : E = this.margin, this.left = v - E, this.top = p - E, new d(this.left, this.top));
357
+ }, h.prototype.updateBounds = function(p) {
358
+ for (var v = e.MAX_VALUE, D = -e.MAX_VALUE, u = e.MAX_VALUE, E = -e.MAX_VALUE, y, O, s, f, c, L = this.nodes, A = L.length, m = 0; m < A; m++) {
359
+ var R = L[m];
360
+ p && R.child != null && R.updateBounds(), y = R.getLeft(), O = R.getRight(), s = R.getTop(), f = R.getBottom(), v > y && (v = y), D < O && (D = O), u > s && (u = s), E < f && (E = f);
361
+ }
362
+ var C = new n(v, u, D - v, E - u);
363
+ v == e.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), L[0].getParent().paddingLeft != null ? c = L[0].getParent().paddingLeft : c = this.margin, this.left = C.x - c, this.right = C.x + C.width + c, this.top = C.y - c, this.bottom = C.y + C.height + c;
364
+ }, h.calculateBounds = function(p) {
365
+ for (var v = e.MAX_VALUE, D = -e.MAX_VALUE, u = e.MAX_VALUE, E = -e.MAX_VALUE, y, O, s, f, c = p.length, L = 0; L < c; L++) {
366
+ var A = p[L];
367
+ y = A.getLeft(), O = A.getRight(), s = A.getTop(), f = A.getBottom(), v > y && (v = y), D < O && (D = O), u > s && (u = s), E < f && (E = f);
368
+ }
369
+ var m = new n(v, u, D - v, E - u);
370
+ return m;
371
+ }, h.prototype.getInclusionTreeDepth = function() {
372
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
373
+ }, h.prototype.getEstimatedSize = function() {
374
+ if (this.estimatedSize == e.MIN_VALUE)
375
+ throw "assert failed";
376
+ return this.estimatedSize;
377
+ }, h.prototype.calcEstimatedSize = function() {
378
+ for (var p = 0, v = this.nodes, D = v.length, u = 0; u < D; u++) {
379
+ var E = v[u];
380
+ p += E.calcEstimatedSize();
381
+ }
382
+ return p == 0 ? this.estimatedSize = t.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = p / Math.sqrt(this.nodes.length), this.estimatedSize;
383
+ }, h.prototype.updateConnected = function() {
384
+ var p = this;
385
+ if (this.nodes.length == 0) {
386
+ this.isConnected = !0;
387
+ return;
388
+ }
389
+ var v = new r(), D = /* @__PURE__ */ new Set(), u = this.nodes[0], E, y, O = u.withChildren();
390
+ for (O.forEach(function(m) {
391
+ v.push(m), D.add(m);
392
+ }); v.length !== 0; ) {
393
+ u = v.shift(), E = u.getEdges();
394
+ for (var s = E.length, f = 0; f < s; f++) {
395
+ var c = E[f];
396
+ if (y = c.getOtherEndInGraph(u, this), y != null && !D.has(y)) {
397
+ var L = y.withChildren();
398
+ L.forEach(function(m) {
399
+ v.push(m), D.add(m);
400
+ });
401
+ }
402
+ }
403
+ }
404
+ if (this.isConnected = !1, D.size >= this.nodes.length) {
405
+ var A = 0;
406
+ D.forEach(function(m) {
407
+ m.owner == p && A++;
408
+ }), A == this.nodes.length && (this.isConnected = !0);
409
+ }
410
+ }, N.exports = h;
411
+ },
412
+ /* 6 */
413
+ /***/
414
+ function(N, I, T) {
415
+ var o, e = T(1);
416
+ function t(i) {
417
+ o = T(5), this.layout = i, this.graphs = [], this.edges = [];
418
+ }
419
+ t.prototype.addRoot = function() {
420
+ var i = this.layout.newGraph(), l = this.layout.newNode(null), g = this.add(i, l);
421
+ return this.setRootGraph(g), this.rootGraph;
422
+ }, t.prototype.add = function(i, l, g, n, d) {
423
+ if (g == null && n == null && d == null) {
424
+ if (i == null)
425
+ throw "Graph is null!";
426
+ if (l == null)
427
+ throw "Parent node is null!";
428
+ if (this.graphs.indexOf(i) > -1)
429
+ throw "Graph already in this graph mgr!";
430
+ if (this.graphs.push(i), i.parent != null)
431
+ throw "Already has a parent!";
432
+ if (l.child != null)
433
+ throw "Already has a child!";
434
+ return i.parent = l, l.child = i, i;
435
+ } else {
436
+ d = g, n = l, g = i;
437
+ var r = n.getOwner(), h = d.getOwner();
438
+ if (!(r != null && r.getGraphManager() == this))
439
+ throw "Source not in this graph mgr!";
440
+ if (!(h != null && h.getGraphManager() == this))
441
+ throw "Target not in this graph mgr!";
442
+ if (r == h)
443
+ return g.isInterGraph = !1, r.add(g, n, d);
444
+ if (g.isInterGraph = !0, g.source = n, g.target = d, this.edges.indexOf(g) > -1)
445
+ throw "Edge already in inter-graph edge list!";
446
+ if (this.edges.push(g), !(g.source != null && g.target != null))
447
+ throw "Edge source and/or target is null!";
448
+ if (!(g.source.edges.indexOf(g) == -1 && g.target.edges.indexOf(g) == -1))
449
+ throw "Edge already in source and/or target incidency list!";
450
+ return g.source.edges.push(g), g.target.edges.push(g), g;
451
+ }
452
+ }, t.prototype.remove = function(i) {
453
+ if (i instanceof o) {
454
+ var l = i;
455
+ if (l.getGraphManager() != this)
456
+ throw "Graph not in this graph mgr";
457
+ if (!(l == this.rootGraph || l.parent != null && l.parent.graphManager == this))
458
+ throw "Invalid parent node!";
459
+ var g = [];
460
+ g = g.concat(l.getEdges());
461
+ for (var n, d = g.length, r = 0; r < d; r++)
462
+ n = g[r], l.remove(n);
463
+ var h = [];
464
+ h = h.concat(l.getNodes());
465
+ var a;
466
+ d = h.length;
467
+ for (var r = 0; r < d; r++)
468
+ a = h[r], l.remove(a);
469
+ l == this.rootGraph && this.setRootGraph(null);
470
+ var p = this.graphs.indexOf(l);
471
+ this.graphs.splice(p, 1), l.parent = null;
472
+ } else if (i instanceof e) {
473
+ if (n = i, n == null)
474
+ throw "Edge is null!";
475
+ if (!n.isInterGraph)
476
+ throw "Not an inter-graph edge!";
477
+ if (!(n.source != null && n.target != null))
478
+ throw "Source and/or target is null!";
479
+ if (!(n.source.edges.indexOf(n) != -1 && n.target.edges.indexOf(n) != -1))
480
+ throw "Source and/or target doesn't know this edge!";
481
+ var p = n.source.edges.indexOf(n);
482
+ if (n.source.edges.splice(p, 1), p = n.target.edges.indexOf(n), n.target.edges.splice(p, 1), !(n.source.owner != null && n.source.owner.getGraphManager() != null))
483
+ throw "Edge owner graph or owner graph manager is null!";
484
+ if (n.source.owner.getGraphManager().edges.indexOf(n) == -1)
485
+ throw "Not in owner graph manager's edge list!";
486
+ var p = n.source.owner.getGraphManager().edges.indexOf(n);
487
+ n.source.owner.getGraphManager().edges.splice(p, 1);
488
+ }
489
+ }, t.prototype.updateBounds = function() {
490
+ this.rootGraph.updateBounds(!0);
491
+ }, t.prototype.getGraphs = function() {
492
+ return this.graphs;
493
+ }, t.prototype.getAllNodes = function() {
494
+ if (this.allNodes == null) {
495
+ for (var i = [], l = this.getGraphs(), g = l.length, n = 0; n < g; n++)
496
+ i = i.concat(l[n].getNodes());
497
+ this.allNodes = i;
498
+ }
499
+ return this.allNodes;
500
+ }, t.prototype.resetAllNodes = function() {
501
+ this.allNodes = null;
502
+ }, t.prototype.resetAllEdges = function() {
503
+ this.allEdges = null;
504
+ }, t.prototype.resetAllNodesToApplyGravitation = function() {
505
+ this.allNodesToApplyGravitation = null;
506
+ }, t.prototype.getAllEdges = function() {
507
+ if (this.allEdges == null) {
508
+ var i = [], l = this.getGraphs();
509
+ l.length;
510
+ for (var g = 0; g < l.length; g++)
511
+ i = i.concat(l[g].getEdges());
512
+ i = i.concat(this.edges), this.allEdges = i;
513
+ }
514
+ return this.allEdges;
515
+ }, t.prototype.getAllNodesToApplyGravitation = function() {
516
+ return this.allNodesToApplyGravitation;
517
+ }, t.prototype.setAllNodesToApplyGravitation = function(i) {
518
+ if (this.allNodesToApplyGravitation != null)
519
+ throw "assert failed";
520
+ this.allNodesToApplyGravitation = i;
521
+ }, t.prototype.getRoot = function() {
522
+ return this.rootGraph;
523
+ }, t.prototype.setRootGraph = function(i) {
524
+ if (i.getGraphManager() != this)
525
+ throw "Root not in this graph mgr!";
526
+ this.rootGraph = i, i.parent == null && (i.parent = this.layout.newNode("Root node"));
527
+ }, t.prototype.getLayout = function() {
528
+ return this.layout;
529
+ }, t.prototype.isOneAncestorOfOther = function(i, l) {
530
+ if (!(i != null && l != null))
531
+ throw "assert failed";
532
+ if (i == l)
533
+ return !0;
534
+ var g = i.getOwner(), n;
535
+ do {
536
+ if (n = g.getParent(), n == null)
537
+ break;
538
+ if (n == l)
539
+ return !0;
540
+ if (g = n.getOwner(), g == null)
541
+ break;
542
+ } while (!0);
543
+ g = l.getOwner();
544
+ do {
545
+ if (n = g.getParent(), n == null)
546
+ break;
547
+ if (n == i)
548
+ return !0;
549
+ if (g = n.getOwner(), g == null)
550
+ break;
551
+ } while (!0);
552
+ return !1;
553
+ }, t.prototype.calcLowestCommonAncestors = function() {
554
+ for (var i, l, g, n, d, r = this.getAllEdges(), h = r.length, a = 0; a < h; a++) {
555
+ if (i = r[a], l = i.source, g = i.target, i.lca = null, i.sourceInLca = l, i.targetInLca = g, l == g) {
556
+ i.lca = l.getOwner();
557
+ continue;
558
+ }
559
+ for (n = l.getOwner(); i.lca == null; ) {
560
+ for (i.targetInLca = g, d = g.getOwner(); i.lca == null; ) {
561
+ if (d == n) {
562
+ i.lca = d;
563
+ break;
564
+ }
565
+ if (d == this.rootGraph)
566
+ break;
567
+ if (i.lca != null)
568
+ throw "assert failed";
569
+ i.targetInLca = d.getParent(), d = i.targetInLca.getOwner();
570
+ }
571
+ if (n == this.rootGraph)
572
+ break;
573
+ i.lca == null && (i.sourceInLca = n.getParent(), n = i.sourceInLca.getOwner());
574
+ }
575
+ if (i.lca == null)
576
+ throw "assert failed";
577
+ }
578
+ }, t.prototype.calcLowestCommonAncestor = function(i, l) {
579
+ if (i == l)
580
+ return i.getOwner();
581
+ var g = i.getOwner();
582
+ do {
583
+ if (g == null)
584
+ break;
585
+ var n = l.getOwner();
586
+ do {
587
+ if (n == null)
588
+ break;
589
+ if (n == g)
590
+ return n;
591
+ n = n.getParent().getOwner();
592
+ } while (!0);
593
+ g = g.getParent().getOwner();
594
+ } while (!0);
595
+ return g;
596
+ }, t.prototype.calcInclusionTreeDepths = function(i, l) {
597
+ i == null && l == null && (i = this.rootGraph, l = 1);
598
+ for (var g, n = i.getNodes(), d = n.length, r = 0; r < d; r++)
599
+ g = n[r], g.inclusionTreeDepth = l, g.child != null && this.calcInclusionTreeDepths(g.child, l + 1);
600
+ }, t.prototype.includesInvalidEdge = function() {
601
+ for (var i, l = this.edges.length, g = 0; g < l; g++)
602
+ if (i = this.edges[g], this.isOneAncestorOfOther(i.source, i.target))
603
+ return !0;
604
+ return !1;
605
+ }, N.exports = t;
606
+ },
607
+ /* 7 */
608
+ /***/
609
+ function(N, I, T) {
610
+ var o = T(0);
611
+ function e() {
612
+ }
613
+ for (var t in o)
614
+ e[t] = o[t];
615
+ e.MAX_ITERATIONS = 2500, e.DEFAULT_EDGE_LENGTH = 50, e.DEFAULT_SPRING_STRENGTH = 0.45, e.DEFAULT_REPULSION_STRENGTH = 4500, e.DEFAULT_GRAVITY_STRENGTH = 0.4, e.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, e.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, e.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, e.COOLING_ADAPTATION_FACTOR = 0.33, e.ADAPTATION_LOWER_NODE_LIMIT = 1e3, e.ADAPTATION_UPPER_NODE_LIMIT = 5e3, e.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, e.MAX_NODE_DISPLACEMENT = e.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, e.MIN_REPULSION_DIST = e.DEFAULT_EDGE_LENGTH / 10, e.CONVERGENCE_CHECK_PERIOD = 100, e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, e.MIN_EDGE_LENGTH = 1, e.GRID_CALCULATION_CHECK_PERIOD = 10, N.exports = e;
616
+ },
617
+ /* 8 */
618
+ /***/
619
+ function(N, I, T) {
620
+ var o = T(12);
621
+ function e() {
622
+ }
623
+ e.calcSeparationAmount = function(t, i, l, g) {
624
+ if (!t.intersects(i))
625
+ throw "assert failed";
626
+ var n = new Array(2);
627
+ this.decideDirectionsForOverlappingNodes(t, i, n), l[0] = Math.min(t.getRight(), i.getRight()) - Math.max(t.x, i.x), l[1] = Math.min(t.getBottom(), i.getBottom()) - Math.max(t.y, i.y), t.getX() <= i.getX() && t.getRight() >= i.getRight() ? l[0] += Math.min(i.getX() - t.getX(), t.getRight() - i.getRight()) : i.getX() <= t.getX() && i.getRight() >= t.getRight() && (l[0] += Math.min(t.getX() - i.getX(), i.getRight() - t.getRight())), t.getY() <= i.getY() && t.getBottom() >= i.getBottom() ? l[1] += Math.min(i.getY() - t.getY(), t.getBottom() - i.getBottom()) : i.getY() <= t.getY() && i.getBottom() >= t.getBottom() && (l[1] += Math.min(t.getY() - i.getY(), i.getBottom() - t.getBottom()));
628
+ var d = Math.abs((i.getCenterY() - t.getCenterY()) / (i.getCenterX() - t.getCenterX()));
629
+ i.getCenterY() === t.getCenterY() && i.getCenterX() === t.getCenterX() && (d = 1);
630
+ var r = d * l[0], h = l[1] / d;
631
+ l[0] < h ? h = l[0] : r = l[1], l[0] = -1 * n[0] * (h / 2 + g), l[1] = -1 * n[1] * (r / 2 + g);
632
+ }, e.decideDirectionsForOverlappingNodes = function(t, i, l) {
633
+ t.getCenterX() < i.getCenterX() ? l[0] = -1 : l[0] = 1, t.getCenterY() < i.getCenterY() ? l[1] = -1 : l[1] = 1;
634
+ }, e.getIntersection2 = function(t, i, l) {
635
+ var g = t.getCenterX(), n = t.getCenterY(), d = i.getCenterX(), r = i.getCenterY();
636
+ if (t.intersects(i))
637
+ return l[0] = g, l[1] = n, l[2] = d, l[3] = r, !0;
638
+ var h = t.getX(), a = t.getY(), p = t.getRight(), v = t.getX(), D = t.getBottom(), u = t.getRight(), E = t.getWidthHalf(), y = t.getHeightHalf(), O = i.getX(), s = i.getY(), f = i.getRight(), c = i.getX(), L = i.getBottom(), A = i.getRight(), m = i.getWidthHalf(), R = i.getHeightHalf(), C = !1, M = !1;
639
+ if (g === d) {
640
+ if (n > r)
641
+ return l[0] = g, l[1] = a, l[2] = d, l[3] = L, !1;
642
+ if (n < r)
643
+ return l[0] = g, l[1] = D, l[2] = d, l[3] = s, !1;
644
+ } else if (n === r) {
645
+ if (g > d)
646
+ return l[0] = h, l[1] = n, l[2] = f, l[3] = r, !1;
647
+ if (g < d)
648
+ return l[0] = p, l[1] = n, l[2] = O, l[3] = r, !1;
649
+ } else {
650
+ var S = t.height / t.width, Y = i.height / i.width, w = (r - n) / (d - g), x = void 0, F = void 0, U = void 0, P = void 0, _ = void 0, X = void 0;
651
+ if (-S === w ? g > d ? (l[0] = v, l[1] = D, C = !0) : (l[0] = p, l[1] = a, C = !0) : S === w && (g > d ? (l[0] = h, l[1] = a, C = !0) : (l[0] = u, l[1] = D, C = !0)), -Y === w ? d > g ? (l[2] = c, l[3] = L, M = !0) : (l[2] = f, l[3] = s, M = !0) : Y === w && (d > g ? (l[2] = O, l[3] = s, M = !0) : (l[2] = A, l[3] = L, M = !0)), C && M)
652
+ return !1;
653
+ if (g > d ? n > r ? (x = this.getCardinalDirection(S, w, 4), F = this.getCardinalDirection(Y, w, 2)) : (x = this.getCardinalDirection(-S, w, 3), F = this.getCardinalDirection(-Y, w, 1)) : n > r ? (x = this.getCardinalDirection(-S, w, 1), F = this.getCardinalDirection(-Y, w, 3)) : (x = this.getCardinalDirection(S, w, 2), F = this.getCardinalDirection(Y, w, 4)), !C)
654
+ switch (x) {
655
+ case 1:
656
+ P = a, U = g + -y / w, l[0] = U, l[1] = P;
657
+ break;
658
+ case 2:
659
+ U = u, P = n + E * w, l[0] = U, l[1] = P;
660
+ break;
661
+ case 3:
662
+ P = D, U = g + y / w, l[0] = U, l[1] = P;
663
+ break;
664
+ case 4:
665
+ U = v, P = n + -E * w, l[0] = U, l[1] = P;
666
+ break;
667
+ }
668
+ if (!M)
669
+ switch (F) {
670
+ case 1:
671
+ X = s, _ = d + -R / w, l[2] = _, l[3] = X;
672
+ break;
673
+ case 2:
674
+ _ = A, X = r + m * w, l[2] = _, l[3] = X;
675
+ break;
676
+ case 3:
677
+ X = L, _ = d + R / w, l[2] = _, l[3] = X;
678
+ break;
679
+ case 4:
680
+ _ = c, X = r + -m * w, l[2] = _, l[3] = X;
681
+ break;
682
+ }
683
+ }
684
+ return !1;
685
+ }, e.getCardinalDirection = function(t, i, l) {
686
+ return t > i ? l : 1 + l % 4;
687
+ }, e.getIntersection = function(t, i, l, g) {
688
+ if (g == null)
689
+ return this.getIntersection2(t, i, l);
690
+ var n = t.x, d = t.y, r = i.x, h = i.y, a = l.x, p = l.y, v = g.x, D = g.y, u = void 0, E = void 0, y = void 0, O = void 0, s = void 0, f = void 0, c = void 0, L = void 0, A = void 0;
691
+ return y = h - d, s = n - r, c = r * d - n * h, O = D - p, f = a - v, L = v * p - a * D, A = y * f - O * s, A === 0 ? null : (u = (s * L - f * c) / A, E = (O * c - y * L) / A, new o(u, E));
692
+ }, e.angleOfVector = function(t, i, l, g) {
693
+ var n = void 0;
694
+ return t !== l ? (n = Math.atan((g - i) / (l - t)), l < t ? n += Math.PI : g < i && (n += this.TWO_PI)) : g < i ? n = this.ONE_AND_HALF_PI : n = this.HALF_PI, n;
695
+ }, e.doIntersect = function(t, i, l, g) {
696
+ var n = t.x, d = t.y, r = i.x, h = i.y, a = l.x, p = l.y, v = g.x, D = g.y, u = (r - n) * (D - p) - (v - a) * (h - d);
697
+ if (u === 0)
698
+ return !1;
699
+ var E = ((D - p) * (v - n) + (a - v) * (D - d)) / u, y = ((d - h) * (v - n) + (r - n) * (D - d)) / u;
700
+ return 0 < E && E < 1 && 0 < y && y < 1;
701
+ }, e.HALF_PI = 0.5 * Math.PI, e.ONE_AND_HALF_PI = 1.5 * Math.PI, e.TWO_PI = 2 * Math.PI, e.THREE_PI = 3 * Math.PI, N.exports = e;
702
+ },
703
+ /* 9 */
704
+ /***/
705
+ function(N, I, T) {
706
+ function o() {
707
+ }
708
+ o.sign = function(e) {
709
+ return e > 0 ? 1 : e < 0 ? -1 : 0;
710
+ }, o.floor = function(e) {
711
+ return e < 0 ? Math.ceil(e) : Math.floor(e);
712
+ }, o.ceil = function(e) {
713
+ return e < 0 ? Math.floor(e) : Math.ceil(e);
714
+ }, N.exports = o;
715
+ },
716
+ /* 10 */
717
+ /***/
718
+ function(N, I, T) {
719
+ function o() {
720
+ }
721
+ o.MAX_VALUE = 2147483647, o.MIN_VALUE = -2147483648, N.exports = o;
722
+ },
723
+ /* 11 */
724
+ /***/
725
+ function(N, I, T) {
726
+ var o = /* @__PURE__ */ function() {
727
+ function n(d, r) {
728
+ for (var h = 0; h < r.length; h++) {
729
+ var a = r[h];
730
+ a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(d, a.key, a);
731
+ }
732
+ }
733
+ return function(d, r, h) {
734
+ return r && n(d.prototype, r), h && n(d, h), d;
735
+ };
736
+ }();
737
+ function e(n, d) {
738
+ if (!(n instanceof d))
739
+ throw new TypeError("Cannot call a class as a function");
740
+ }
741
+ var t = function(d) {
742
+ return { value: d, next: null, prev: null };
743
+ }, i = function(d, r, h, a) {
744
+ return d !== null ? d.next = r : a.head = r, h !== null ? h.prev = r : a.tail = r, r.prev = d, r.next = h, a.length++, r;
745
+ }, l = function(d, r) {
746
+ var h = d.prev, a = d.next;
747
+ return h !== null ? h.next = a : r.head = a, a !== null ? a.prev = h : r.tail = h, d.prev = d.next = null, r.length--, d;
748
+ }, g = function() {
749
+ function n(d) {
750
+ var r = this;
751
+ e(this, n), this.length = 0, this.head = null, this.tail = null, d != null && d.forEach(function(h) {
752
+ return r.push(h);
753
+ });
754
+ }
755
+ return o(n, [{
756
+ key: "size",
757
+ value: function() {
758
+ return this.length;
759
+ }
760
+ }, {
761
+ key: "insertBefore",
762
+ value: function(r, h) {
763
+ return i(h.prev, t(r), h, this);
764
+ }
765
+ }, {
766
+ key: "insertAfter",
767
+ value: function(r, h) {
768
+ return i(h, t(r), h.next, this);
769
+ }
770
+ }, {
771
+ key: "insertNodeBefore",
772
+ value: function(r, h) {
773
+ return i(h.prev, r, h, this);
774
+ }
775
+ }, {
776
+ key: "insertNodeAfter",
777
+ value: function(r, h) {
778
+ return i(h, r, h.next, this);
779
+ }
780
+ }, {
781
+ key: "push",
782
+ value: function(r) {
783
+ return i(this.tail, t(r), null, this);
784
+ }
785
+ }, {
786
+ key: "unshift",
787
+ value: function(r) {
788
+ return i(null, t(r), this.head, this);
789
+ }
790
+ }, {
791
+ key: "remove",
792
+ value: function(r) {
793
+ return l(r, this);
794
+ }
795
+ }, {
796
+ key: "pop",
797
+ value: function() {
798
+ return l(this.tail, this).value;
799
+ }
800
+ }, {
801
+ key: "popNode",
802
+ value: function() {
803
+ return l(this.tail, this);
804
+ }
805
+ }, {
806
+ key: "shift",
807
+ value: function() {
808
+ return l(this.head, this).value;
809
+ }
810
+ }, {
811
+ key: "shiftNode",
812
+ value: function() {
813
+ return l(this.head, this);
814
+ }
815
+ }, {
816
+ key: "get_object_at",
817
+ value: function(r) {
818
+ if (r <= this.length()) {
819
+ for (var h = 1, a = this.head; h < r; )
820
+ a = a.next, h++;
821
+ return a.value;
822
+ }
823
+ }
824
+ }, {
825
+ key: "set_object_at",
826
+ value: function(r, h) {
827
+ if (r <= this.length()) {
828
+ for (var a = 1, p = this.head; a < r; )
829
+ p = p.next, a++;
830
+ p.value = h;
831
+ }
832
+ }
833
+ }]), n;
834
+ }();
835
+ N.exports = g;
836
+ },
837
+ /* 12 */
838
+ /***/
839
+ function(N, I, T) {
840
+ function o(e, t, i) {
841
+ this.x = null, this.y = null, e == null && t == null && i == null ? (this.x = 0, this.y = 0) : typeof e == "number" && typeof t == "number" && i == null ? (this.x = e, this.y = t) : e.constructor.name == "Point" && t == null && i == null && (i = e, this.x = i.x, this.y = i.y);
842
+ }
843
+ o.prototype.getX = function() {
844
+ return this.x;
845
+ }, o.prototype.getY = function() {
846
+ return this.y;
847
+ }, o.prototype.getLocation = function() {
848
+ return new o(this.x, this.y);
849
+ }, o.prototype.setLocation = function(e, t, i) {
850
+ e.constructor.name == "Point" && t == null && i == null ? (i = e, this.setLocation(i.x, i.y)) : typeof e == "number" && typeof t == "number" && i == null && (parseInt(e) == e && parseInt(t) == t ? this.move(e, t) : (this.x = Math.floor(e + 0.5), this.y = Math.floor(t + 0.5)));
851
+ }, o.prototype.move = function(e, t) {
852
+ this.x = e, this.y = t;
853
+ }, o.prototype.translate = function(e, t) {
854
+ this.x += e, this.y += t;
855
+ }, o.prototype.equals = function(e) {
856
+ if (e.constructor.name == "Point") {
857
+ var t = e;
858
+ return this.x == t.x && this.y == t.y;
859
+ }
860
+ return this == e;
861
+ }, o.prototype.toString = function() {
862
+ return new o().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
863
+ }, N.exports = o;
864
+ },
865
+ /* 13 */
866
+ /***/
867
+ function(N, I, T) {
868
+ function o(e, t, i, l) {
869
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && i != null && l != null && (this.x = e, this.y = t, this.width = i, this.height = l);
870
+ }
871
+ o.prototype.getX = function() {
872
+ return this.x;
873
+ }, o.prototype.setX = function(e) {
874
+ this.x = e;
875
+ }, o.prototype.getY = function() {
876
+ return this.y;
877
+ }, o.prototype.setY = function(e) {
878
+ this.y = e;
879
+ }, o.prototype.getWidth = function() {
880
+ return this.width;
881
+ }, o.prototype.setWidth = function(e) {
882
+ this.width = e;
883
+ }, o.prototype.getHeight = function() {
884
+ return this.height;
885
+ }, o.prototype.setHeight = function(e) {
886
+ this.height = e;
887
+ }, o.prototype.getRight = function() {
888
+ return this.x + this.width;
889
+ }, o.prototype.getBottom = function() {
890
+ return this.y + this.height;
891
+ }, o.prototype.intersects = function(e) {
892
+ return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
893
+ }, o.prototype.getCenterX = function() {
894
+ return this.x + this.width / 2;
895
+ }, o.prototype.getMinX = function() {
896
+ return this.getX();
897
+ }, o.prototype.getMaxX = function() {
898
+ return this.getX() + this.width;
899
+ }, o.prototype.getCenterY = function() {
900
+ return this.y + this.height / 2;
901
+ }, o.prototype.getMinY = function() {
902
+ return this.getY();
903
+ }, o.prototype.getMaxY = function() {
904
+ return this.getY() + this.height;
905
+ }, o.prototype.getWidthHalf = function() {
906
+ return this.width / 2;
907
+ }, o.prototype.getHeightHalf = function() {
908
+ return this.height / 2;
909
+ }, N.exports = o;
910
+ },
911
+ /* 14 */
912
+ /***/
913
+ function(N, I, T) {
914
+ var o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
915
+ return typeof t;
916
+ } : function(t) {
917
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
918
+ };
919
+ function e() {
920
+ }
921
+ e.lastID = 0, e.createID = function(t) {
922
+ return e.isPrimitive(t) ? t : (t.uniqueID != null || (t.uniqueID = e.getString(), e.lastID++), t.uniqueID);
923
+ }, e.getString = function(t) {
924
+ return t == null && (t = e.lastID), "Object#" + t;
925
+ }, e.isPrimitive = function(t) {
926
+ var i = typeof t > "u" ? "undefined" : o(t);
927
+ return t == null || i != "object" && i != "function";
928
+ }, N.exports = e;
929
+ },
930
+ /* 15 */
931
+ /***/
932
+ function(N, I, T) {
933
+ function o(a) {
934
+ if (Array.isArray(a)) {
935
+ for (var p = 0, v = Array(a.length); p < a.length; p++)
936
+ v[p] = a[p];
937
+ return v;
938
+ } else
939
+ return Array.from(a);
940
+ }
941
+ var e = T(0), t = T(6), i = T(3), l = T(1), g = T(5), n = T(4), d = T(17), r = T(27);
942
+ function h(a) {
943
+ r.call(this), this.layoutQuality = e.QUALITY, this.createBendsAsNeeded = e.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = e.DEFAULT_INCREMENTAL, this.animationOnLayout = e.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = e.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = e.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = e.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new t(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, a != null && (this.isRemoteUse = a);
944
+ }
945
+ h.RANDOM_SEED = 1, h.prototype = Object.create(r.prototype), h.prototype.getGraphManager = function() {
946
+ return this.graphManager;
947
+ }, h.prototype.getAllNodes = function() {
948
+ return this.graphManager.getAllNodes();
949
+ }, h.prototype.getAllEdges = function() {
950
+ return this.graphManager.getAllEdges();
951
+ }, h.prototype.getAllNodesToApplyGravitation = function() {
952
+ return this.graphManager.getAllNodesToApplyGravitation();
953
+ }, h.prototype.newGraphManager = function() {
954
+ var a = new t(this);
955
+ return this.graphManager = a, a;
956
+ }, h.prototype.newGraph = function(a) {
957
+ return new g(null, this.graphManager, a);
958
+ }, h.prototype.newNode = function(a) {
959
+ return new i(this.graphManager, a);
960
+ }, h.prototype.newEdge = function(a) {
961
+ return new l(null, null, a);
962
+ }, h.prototype.checkLayoutSuccess = function() {
963
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
964
+ }, h.prototype.runLayout = function() {
965
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
966
+ var a;
967
+ return this.checkLayoutSuccess() ? a = !1 : a = this.layout(), e.ANIMATE === "during" ? !1 : (a && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, a);
968
+ }, h.prototype.doPostLayout = function() {
969
+ this.incremental || this.transform(), this.update();
970
+ }, h.prototype.update2 = function() {
971
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
972
+ for (var a = this.graphManager.getAllEdges(), p = 0; p < a.length; p++)
973
+ a[p];
974
+ for (var v = this.graphManager.getRoot().getNodes(), p = 0; p < v.length; p++)
975
+ v[p];
976
+ this.update(this.graphManager.getRoot());
977
+ }
978
+ }, h.prototype.update = function(a) {
979
+ if (a == null)
980
+ this.update2();
981
+ else if (a instanceof i) {
982
+ var p = a;
983
+ if (p.getChild() != null)
984
+ for (var v = p.getChild().getNodes(), D = 0; D < v.length; D++)
985
+ update(v[D]);
986
+ if (p.vGraphObject != null) {
987
+ var u = p.vGraphObject;
988
+ u.update(p);
989
+ }
990
+ } else if (a instanceof l) {
991
+ var E = a;
992
+ if (E.vGraphObject != null) {
993
+ var y = E.vGraphObject;
994
+ y.update(E);
995
+ }
996
+ } else if (a instanceof g) {
997
+ var O = a;
998
+ if (O.vGraphObject != null) {
999
+ var s = O.vGraphObject;
1000
+ s.update(O);
1001
+ }
1002
+ }
1003
+ }, h.prototype.initParameters = function() {
1004
+ this.isSubLayout || (this.layoutQuality = e.QUALITY, this.animationDuringLayout = e.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = e.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = e.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = e.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = e.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = e.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1005
+ }, h.prototype.transform = function(a) {
1006
+ if (a == null)
1007
+ this.transform(new n(0, 0));
1008
+ else {
1009
+ var p = new d(), v = this.graphManager.getRoot().updateLeftTop();
1010
+ if (v != null) {
1011
+ p.setWorldOrgX(a.x), p.setWorldOrgY(a.y), p.setDeviceOrgX(v.x), p.setDeviceOrgY(v.y);
1012
+ for (var D = this.getAllNodes(), u, E = 0; E < D.length; E++)
1013
+ u = D[E], u.transform(p);
1014
+ }
1015
+ }
1016
+ }, h.prototype.positionNodesRandomly = function(a) {
1017
+ if (a == null)
1018
+ this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1019
+ else
1020
+ for (var p, v, D = a.getNodes(), u = 0; u < D.length; u++)
1021
+ p = D[u], v = p.getChild(), v == null || v.getNodes().length == 0 ? p.scatter() : (this.positionNodesRandomly(v), p.updateBounds());
1022
+ }, h.prototype.getFlatForest = function() {
1023
+ for (var a = [], p = !0, v = this.graphManager.getRoot().getNodes(), D = !0, u = 0; u < v.length; u++)
1024
+ v[u].getChild() != null && (D = !1);
1025
+ if (!D)
1026
+ return a;
1027
+ var E = /* @__PURE__ */ new Set(), y = [], O = /* @__PURE__ */ new Map(), s = [];
1028
+ for (s = s.concat(v); s.length > 0 && p; ) {
1029
+ for (y.push(s[0]); y.length > 0 && p; ) {
1030
+ var f = y[0];
1031
+ y.splice(0, 1), E.add(f);
1032
+ for (var c = f.getEdges(), u = 0; u < c.length; u++) {
1033
+ var L = c[u].getOtherEnd(f);
1034
+ if (O.get(f) != L)
1035
+ if (!E.has(L))
1036
+ y.push(L), O.set(L, f);
1037
+ else {
1038
+ p = !1;
1039
+ break;
1040
+ }
1041
+ }
1042
+ }
1043
+ if (!p)
1044
+ a = [];
1045
+ else {
1046
+ var A = [].concat(o(E));
1047
+ a.push(A);
1048
+ for (var u = 0; u < A.length; u++) {
1049
+ var m = A[u], R = s.indexOf(m);
1050
+ R > -1 && s.splice(R, 1);
1051
+ }
1052
+ E = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Map();
1053
+ }
1054
+ }
1055
+ return a;
1056
+ }, h.prototype.createDummyNodesForBendpoints = function(a) {
1057
+ for (var p = [], v = a.source, D = this.graphManager.calcLowestCommonAncestor(a.source, a.target), u = 0; u < a.bendpoints.length; u++) {
1058
+ var E = this.newNode(null);
1059
+ E.setRect(new Point(0, 0), new Dimension(1, 1)), D.add(E);
1060
+ var y = this.newEdge(null);
1061
+ this.graphManager.add(y, v, E), p.add(E), v = E;
1062
+ }
1063
+ var y = this.newEdge(null);
1064
+ return this.graphManager.add(y, v, a.target), this.edgeToDummyNodes.set(a, p), a.isInterGraph() ? this.graphManager.remove(a) : D.remove(a), p;
1065
+ }, h.prototype.createBendpointsFromDummyNodes = function() {
1066
+ var a = [];
1067
+ a = a.concat(this.graphManager.getAllEdges()), a = [].concat(o(this.edgeToDummyNodes.keys())).concat(a);
1068
+ for (var p = 0; p < a.length; p++) {
1069
+ var v = a[p];
1070
+ if (v.bendpoints.length > 0) {
1071
+ for (var D = this.edgeToDummyNodes.get(v), u = 0; u < D.length; u++) {
1072
+ var E = D[u], y = new n(E.getCenterX(), E.getCenterY()), O = v.bendpoints.get(u);
1073
+ O.x = y.x, O.y = y.y, E.getOwner().remove(E);
1074
+ }
1075
+ this.graphManager.add(v, v.source, v.target);
1076
+ }
1077
+ }
1078
+ }, h.transform = function(a, p, v, D) {
1079
+ if (v != null && D != null) {
1080
+ var u = p;
1081
+ if (a <= 50) {
1082
+ var E = p / v;
1083
+ u -= (p - E) / 50 * (50 - a);
1084
+ } else {
1085
+ var y = p * D;
1086
+ u += (y - p) / 50 * (a - 50);
1087
+ }
1088
+ return u;
1089
+ } else {
1090
+ var O, s;
1091
+ return a <= 50 ? (O = 9 * p / 500, s = p / 10) : (O = 9 * p / 50, s = -8 * p), O * a + s;
1092
+ }
1093
+ }, h.findCenterOfTree = function(a) {
1094
+ var p = [];
1095
+ p = p.concat(a);
1096
+ var v = [], D = /* @__PURE__ */ new Map(), u = !1, E = null;
1097
+ (p.length == 1 || p.length == 2) && (u = !0, E = p[0]);
1098
+ for (var y = 0; y < p.length; y++) {
1099
+ var O = p[y], s = O.getNeighborsList().size;
1100
+ D.set(O, O.getNeighborsList().size), s == 1 && v.push(O);
1101
+ }
1102
+ var f = [];
1103
+ for (f = f.concat(v); !u; ) {
1104
+ var c = [];
1105
+ c = c.concat(f), f = [];
1106
+ for (var y = 0; y < p.length; y++) {
1107
+ var O = p[y], L = p.indexOf(O);
1108
+ L >= 0 && p.splice(L, 1);
1109
+ var A = O.getNeighborsList();
1110
+ A.forEach(function(C) {
1111
+ if (v.indexOf(C) < 0) {
1112
+ var M = D.get(C), S = M - 1;
1113
+ S == 1 && f.push(C), D.set(C, S);
1114
+ }
1115
+ });
1116
+ }
1117
+ v = v.concat(f), (p.length == 1 || p.length == 2) && (u = !0, E = p[0]);
1118
+ }
1119
+ return E;
1120
+ }, h.prototype.setGraphManager = function(a) {
1121
+ this.graphManager = a;
1122
+ }, N.exports = h;
1123
+ },
1124
+ /* 16 */
1125
+ /***/
1126
+ function(N, I, T) {
1127
+ function o() {
1128
+ }
1129
+ o.seed = 1, o.x = 0, o.nextDouble = function() {
1130
+ return o.x = Math.sin(o.seed++) * 1e4, o.x - Math.floor(o.x);
1131
+ }, N.exports = o;
1132
+ },
1133
+ /* 17 */
1134
+ /***/
1135
+ function(N, I, T) {
1136
+ var o = T(4);
1137
+ function e(t, i) {
1138
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1139
+ }
1140
+ e.prototype.getWorldOrgX = function() {
1141
+ return this.lworldOrgX;
1142
+ }, e.prototype.setWorldOrgX = function(t) {
1143
+ this.lworldOrgX = t;
1144
+ }, e.prototype.getWorldOrgY = function() {
1145
+ return this.lworldOrgY;
1146
+ }, e.prototype.setWorldOrgY = function(t) {
1147
+ this.lworldOrgY = t;
1148
+ }, e.prototype.getWorldExtX = function() {
1149
+ return this.lworldExtX;
1150
+ }, e.prototype.setWorldExtX = function(t) {
1151
+ this.lworldExtX = t;
1152
+ }, e.prototype.getWorldExtY = function() {
1153
+ return this.lworldExtY;
1154
+ }, e.prototype.setWorldExtY = function(t) {
1155
+ this.lworldExtY = t;
1156
+ }, e.prototype.getDeviceOrgX = function() {
1157
+ return this.ldeviceOrgX;
1158
+ }, e.prototype.setDeviceOrgX = function(t) {
1159
+ this.ldeviceOrgX = t;
1160
+ }, e.prototype.getDeviceOrgY = function() {
1161
+ return this.ldeviceOrgY;
1162
+ }, e.prototype.setDeviceOrgY = function(t) {
1163
+ this.ldeviceOrgY = t;
1164
+ }, e.prototype.getDeviceExtX = function() {
1165
+ return this.ldeviceExtX;
1166
+ }, e.prototype.setDeviceExtX = function(t) {
1167
+ this.ldeviceExtX = t;
1168
+ }, e.prototype.getDeviceExtY = function() {
1169
+ return this.ldeviceExtY;
1170
+ }, e.prototype.setDeviceExtY = function(t) {
1171
+ this.ldeviceExtY = t;
1172
+ }, e.prototype.transformX = function(t) {
1173
+ var i = 0, l = this.lworldExtX;
1174
+ return l != 0 && (i = this.ldeviceOrgX + (t - this.lworldOrgX) * this.ldeviceExtX / l), i;
1175
+ }, e.prototype.transformY = function(t) {
1176
+ var i = 0, l = this.lworldExtY;
1177
+ return l != 0 && (i = this.ldeviceOrgY + (t - this.lworldOrgY) * this.ldeviceExtY / l), i;
1178
+ }, e.prototype.inverseTransformX = function(t) {
1179
+ var i = 0, l = this.ldeviceExtX;
1180
+ return l != 0 && (i = this.lworldOrgX + (t - this.ldeviceOrgX) * this.lworldExtX / l), i;
1181
+ }, e.prototype.inverseTransformY = function(t) {
1182
+ var i = 0, l = this.ldeviceExtY;
1183
+ return l != 0 && (i = this.lworldOrgY + (t - this.ldeviceOrgY) * this.lworldExtY / l), i;
1184
+ }, e.prototype.inverseTransformPoint = function(t) {
1185
+ var i = new o(this.inverseTransformX(t.x), this.inverseTransformY(t.y));
1186
+ return i;
1187
+ }, N.exports = e;
1188
+ },
1189
+ /* 18 */
1190
+ /***/
1191
+ function(N, I, T) {
1192
+ function o(r) {
1193
+ if (Array.isArray(r)) {
1194
+ for (var h = 0, a = Array(r.length); h < r.length; h++)
1195
+ a[h] = r[h];
1196
+ return a;
1197
+ } else
1198
+ return Array.from(r);
1199
+ }
1200
+ var e = T(15), t = T(7), i = T(0), l = T(8), g = T(9);
1201
+ function n() {
1202
+ e.call(this), this.useSmartIdealEdgeLengthCalculation = t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = t.DEFAULT_EDGE_LENGTH, this.springConstant = t.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = t.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = t.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = t.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = t.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * t.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = t.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = t.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = t.MAX_ITERATIONS;
1203
+ }
1204
+ n.prototype = Object.create(e.prototype);
1205
+ for (var d in e)
1206
+ n[d] = e[d];
1207
+ n.prototype.initParameters = function() {
1208
+ e.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1209
+ }, n.prototype.calcIdealEdgeLengths = function() {
1210
+ for (var r, h, a, p, v, D, u = this.getGraphManager().getAllEdges(), E = 0; E < u.length; E++)
1211
+ r = u[E], r.idealLength = this.idealEdgeLength, r.isInterGraph && (a = r.getSource(), p = r.getTarget(), v = r.getSourceInLca().getEstimatedSize(), D = r.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (r.idealLength += v + D - 2 * i.SIMPLE_NODE_SIZE), h = r.getLca().getInclusionTreeDepth(), r.idealLength += t.DEFAULT_EDGE_LENGTH * t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (a.getInclusionTreeDepth() + p.getInclusionTreeDepth() - 2 * h));
1212
+ }, n.prototype.initSpringEmbedder = function() {
1213
+ var r = this.getAllNodes().length;
1214
+ this.incremental ? (r > t.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * t.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (r - t.ADAPTATION_LOWER_NODE_LIMIT) / (t.ADAPTATION_UPPER_NODE_LIMIT - t.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - t.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = t.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (r > t.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(t.COOLING_ADAPTATION_FACTOR, 1 - (r - t.ADAPTATION_LOWER_NODE_LIMIT) / (t.ADAPTATION_UPPER_NODE_LIMIT - t.ADAPTATION_LOWER_NODE_LIMIT) * (1 - t.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = t.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1215
+ }, n.prototype.calcSpringForces = function() {
1216
+ for (var r = this.getAllEdges(), h, a = 0; a < r.length; a++)
1217
+ h = r[a], this.calcSpringForce(h, h.idealLength);
1218
+ }, n.prototype.calcRepulsionForces = function() {
1219
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, a, p, v, D, u = this.getAllNodes(), E;
1220
+ if (this.useFRGridVariant)
1221
+ for (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && r && this.updateGrid(), E = /* @__PURE__ */ new Set(), a = 0; a < u.length; a++)
1222
+ v = u[a], this.calculateRepulsionForceOfANode(v, E, r, h), E.add(v);
1223
+ else
1224
+ for (a = 0; a < u.length; a++)
1225
+ for (v = u[a], p = a + 1; p < u.length; p++)
1226
+ D = u[p], v.getOwner() == D.getOwner() && this.calcRepulsionForce(v, D);
1227
+ }, n.prototype.calcGravitationalForces = function() {
1228
+ for (var r, h = this.getAllNodesToApplyGravitation(), a = 0; a < h.length; a++)
1229
+ r = h[a], this.calcGravitationalForce(r);
1230
+ }, n.prototype.moveNodes = function() {
1231
+ for (var r = this.getAllNodes(), h, a = 0; a < r.length; a++)
1232
+ h = r[a], h.move();
1233
+ }, n.prototype.calcSpringForce = function(r, h) {
1234
+ var a = r.getSource(), p = r.getTarget(), v, D, u, E;
1235
+ if (this.uniformLeafNodeSizes && a.getChild() == null && p.getChild() == null)
1236
+ r.updateLengthSimple();
1237
+ else if (r.updateLength(), r.isOverlapingSourceAndTarget)
1238
+ return;
1239
+ v = r.getLength(), v != 0 && (D = this.springConstant * (v - h), u = D * (r.lengthX / v), E = D * (r.lengthY / v), a.springForceX += u, a.springForceY += E, p.springForceX -= u, p.springForceY -= E);
1240
+ }, n.prototype.calcRepulsionForce = function(r, h) {
1241
+ var a = r.getRect(), p = h.getRect(), v = new Array(2), D = new Array(4), u, E, y, O, s, f, c;
1242
+ if (a.intersects(p)) {
1243
+ l.calcSeparationAmount(a, p, v, t.DEFAULT_EDGE_LENGTH / 2), f = 2 * v[0], c = 2 * v[1];
1244
+ var L = r.noOfChildren * h.noOfChildren / (r.noOfChildren + h.noOfChildren);
1245
+ r.repulsionForceX -= L * f, r.repulsionForceY -= L * c, h.repulsionForceX += L * f, h.repulsionForceY += L * c;
1246
+ } else
1247
+ this.uniformLeafNodeSizes && r.getChild() == null && h.getChild() == null ? (u = p.getCenterX() - a.getCenterX(), E = p.getCenterY() - a.getCenterY()) : (l.getIntersection(a, p, D), u = D[2] - D[0], E = D[3] - D[1]), Math.abs(u) < t.MIN_REPULSION_DIST && (u = g.sign(u) * t.MIN_REPULSION_DIST), Math.abs(E) < t.MIN_REPULSION_DIST && (E = g.sign(E) * t.MIN_REPULSION_DIST), y = u * u + E * E, O = Math.sqrt(y), s = this.repulsionConstant * r.noOfChildren * h.noOfChildren / y, f = s * u / O, c = s * E / O, r.repulsionForceX -= f, r.repulsionForceY -= c, h.repulsionForceX += f, h.repulsionForceY += c;
1248
+ }, n.prototype.calcGravitationalForce = function(r) {
1249
+ var h, a, p, v, D, u, E, y;
1250
+ h = r.getOwner(), a = (h.getRight() + h.getLeft()) / 2, p = (h.getTop() + h.getBottom()) / 2, v = r.getCenterX() - a, D = r.getCenterY() - p, u = Math.abs(v) + r.getWidth() / 2, E = Math.abs(D) + r.getHeight() / 2, r.getOwner() == this.graphManager.getRoot() ? (y = h.getEstimatedSize() * this.gravityRangeFactor, (u > y || E > y) && (r.gravitationForceX = -this.gravityConstant * v, r.gravitationForceY = -this.gravityConstant * D)) : (y = h.getEstimatedSize() * this.compoundGravityRangeFactor, (u > y || E > y) && (r.gravitationForceX = -this.gravityConstant * v * this.compoundGravityConstant, r.gravitationForceY = -this.gravityConstant * D * this.compoundGravityConstant));
1251
+ }, n.prototype.isConverged = function() {
1252
+ var r, h = !1;
1253
+ return this.totalIterations > this.maxIterations / 3 && (h = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), r = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, r || h;
1254
+ }, n.prototype.animate = function() {
1255
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1256
+ }, n.prototype.calcNoOfChildrenForAllNodes = function() {
1257
+ for (var r, h = this.graphManager.getAllNodes(), a = 0; a < h.length; a++)
1258
+ r = h[a], r.noOfChildren = r.getNoOfChildren();
1259
+ }, n.prototype.calcGrid = function(r) {
1260
+ var h = 0, a = 0;
1261
+ h = parseInt(Math.ceil((r.getRight() - r.getLeft()) / this.repulsionRange)), a = parseInt(Math.ceil((r.getBottom() - r.getTop()) / this.repulsionRange));
1262
+ for (var p = new Array(h), v = 0; v < h; v++)
1263
+ p[v] = new Array(a);
1264
+ for (var v = 0; v < h; v++)
1265
+ for (var D = 0; D < a; D++)
1266
+ p[v][D] = new Array();
1267
+ return p;
1268
+ }, n.prototype.addNodeToGrid = function(r, h, a) {
1269
+ var p = 0, v = 0, D = 0, u = 0;
1270
+ p = parseInt(Math.floor((r.getRect().x - h) / this.repulsionRange)), v = parseInt(Math.floor((r.getRect().width + r.getRect().x - h) / this.repulsionRange)), D = parseInt(Math.floor((r.getRect().y - a) / this.repulsionRange)), u = parseInt(Math.floor((r.getRect().height + r.getRect().y - a) / this.repulsionRange));
1271
+ for (var E = p; E <= v; E++)
1272
+ for (var y = D; y <= u; y++)
1273
+ this.grid[E][y].push(r), r.setGridCoordinates(p, v, D, u);
1274
+ }, n.prototype.updateGrid = function() {
1275
+ var r, h, a = this.getAllNodes();
1276
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), r = 0; r < a.length; r++)
1277
+ h = a[r], this.addNodeToGrid(h, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1278
+ }, n.prototype.calculateRepulsionForceOfANode = function(r, h, a, p) {
1279
+ if (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && a || p) {
1280
+ var v = /* @__PURE__ */ new Set();
1281
+ r.surrounding = new Array();
1282
+ for (var D, u = this.grid, E = r.startX - 1; E < r.finishX + 2; E++)
1283
+ for (var y = r.startY - 1; y < r.finishY + 2; y++)
1284
+ if (!(E < 0 || y < 0 || E >= u.length || y >= u[0].length)) {
1285
+ for (var O = 0; O < u[E][y].length; O++)
1286
+ if (D = u[E][y][O], !(r.getOwner() != D.getOwner() || r == D) && !h.has(D) && !v.has(D)) {
1287
+ var s = Math.abs(r.getCenterX() - D.getCenterX()) - (r.getWidth() / 2 + D.getWidth() / 2), f = Math.abs(r.getCenterY() - D.getCenterY()) - (r.getHeight() / 2 + D.getHeight() / 2);
1288
+ s <= this.repulsionRange && f <= this.repulsionRange && v.add(D);
1289
+ }
1290
+ }
1291
+ r.surrounding = [].concat(o(v));
1292
+ }
1293
+ for (E = 0; E < r.surrounding.length; E++)
1294
+ this.calcRepulsionForce(r, r.surrounding[E]);
1295
+ }, n.prototype.calcRepulsionRange = function() {
1296
+ return 0;
1297
+ }, N.exports = n;
1298
+ },
1299
+ /* 19 */
1300
+ /***/
1301
+ function(N, I, T) {
1302
+ var o = T(1), e = T(7);
1303
+ function t(l, g, n) {
1304
+ o.call(this, l, g, n), this.idealLength = e.DEFAULT_EDGE_LENGTH;
1305
+ }
1306
+ t.prototype = Object.create(o.prototype);
1307
+ for (var i in o)
1308
+ t[i] = o[i];
1309
+ N.exports = t;
1310
+ },
1311
+ /* 20 */
1312
+ /***/
1313
+ function(N, I, T) {
1314
+ var o = T(3);
1315
+ function e(i, l, g, n) {
1316
+ o.call(this, i, l, g, n), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = [];
1317
+ }
1318
+ e.prototype = Object.create(o.prototype);
1319
+ for (var t in o)
1320
+ e[t] = o[t];
1321
+ e.prototype.setGridCoordinates = function(i, l, g, n) {
1322
+ this.startX = i, this.finishX = l, this.startY = g, this.finishY = n;
1323
+ }, N.exports = e;
1324
+ },
1325
+ /* 21 */
1326
+ /***/
1327
+ function(N, I, T) {
1328
+ function o(e, t) {
1329
+ this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1330
+ }
1331
+ o.prototype.getWidth = function() {
1332
+ return this.width;
1333
+ }, o.prototype.setWidth = function(e) {
1334
+ this.width = e;
1335
+ }, o.prototype.getHeight = function() {
1336
+ return this.height;
1337
+ }, o.prototype.setHeight = function(e) {
1338
+ this.height = e;
1339
+ }, N.exports = o;
1340
+ },
1341
+ /* 22 */
1342
+ /***/
1343
+ function(N, I, T) {
1344
+ var o = T(14);
1345
+ function e() {
1346
+ this.map = {}, this.keys = [];
1347
+ }
1348
+ e.prototype.put = function(t, i) {
1349
+ var l = o.createID(t);
1350
+ this.contains(l) || (this.map[l] = i, this.keys.push(t));
1351
+ }, e.prototype.contains = function(t) {
1352
+ return o.createID(t), this.map[t] != null;
1353
+ }, e.prototype.get = function(t) {
1354
+ var i = o.createID(t);
1355
+ return this.map[i];
1356
+ }, e.prototype.keySet = function() {
1357
+ return this.keys;
1358
+ }, N.exports = e;
1359
+ },
1360
+ /* 23 */
1361
+ /***/
1362
+ function(N, I, T) {
1363
+ var o = T(14);
1364
+ function e() {
1365
+ this.set = {};
1366
+ }
1367
+ e.prototype.add = function(t) {
1368
+ var i = o.createID(t);
1369
+ this.contains(i) || (this.set[i] = t);
1370
+ }, e.prototype.remove = function(t) {
1371
+ delete this.set[o.createID(t)];
1372
+ }, e.prototype.clear = function() {
1373
+ this.set = {};
1374
+ }, e.prototype.contains = function(t) {
1375
+ return this.set[o.createID(t)] == t;
1376
+ }, e.prototype.isEmpty = function() {
1377
+ return this.size() === 0;
1378
+ }, e.prototype.size = function() {
1379
+ return Object.keys(this.set).length;
1380
+ }, e.prototype.addAllTo = function(t) {
1381
+ for (var i = Object.keys(this.set), l = i.length, g = 0; g < l; g++)
1382
+ t.push(this.set[i[g]]);
1383
+ }, e.prototype.size = function() {
1384
+ return Object.keys(this.set).length;
1385
+ }, e.prototype.addAll = function(t) {
1386
+ for (var i = t.length, l = 0; l < i; l++) {
1387
+ var g = t[l];
1388
+ this.add(g);
1389
+ }
1390
+ }, N.exports = e;
1391
+ },
1392
+ /* 24 */
1393
+ /***/
1394
+ function(N, I, T) {
1395
+ var o = /* @__PURE__ */ function() {
1396
+ function l(g, n) {
1397
+ for (var d = 0; d < n.length; d++) {
1398
+ var r = n[d];
1399
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(g, r.key, r);
1400
+ }
1401
+ }
1402
+ return function(g, n, d) {
1403
+ return n && l(g.prototype, n), d && l(g, d), g;
1404
+ };
1405
+ }();
1406
+ function e(l, g) {
1407
+ if (!(l instanceof g))
1408
+ throw new TypeError("Cannot call a class as a function");
1409
+ }
1410
+ var t = T(11), i = function() {
1411
+ function l(g, n) {
1412
+ e(this, l), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1413
+ var d = void 0;
1414
+ g instanceof t ? d = g.size() : d = g.length, this._quicksort(g, 0, d - 1);
1415
+ }
1416
+ return o(l, [{
1417
+ key: "_quicksort",
1418
+ value: function(n, d, r) {
1419
+ if (d < r) {
1420
+ var h = this._partition(n, d, r);
1421
+ this._quicksort(n, d, h), this._quicksort(n, h + 1, r);
1422
+ }
1423
+ }
1424
+ }, {
1425
+ key: "_partition",
1426
+ value: function(n, d, r) {
1427
+ for (var h = this._get(n, d), a = d, p = r; ; ) {
1428
+ for (; this.compareFunction(h, this._get(n, p)); )
1429
+ p--;
1430
+ for (; this.compareFunction(this._get(n, a), h); )
1431
+ a++;
1432
+ if (a < p)
1433
+ this._swap(n, a, p), a++, p--;
1434
+ else return p;
1435
+ }
1436
+ }
1437
+ }, {
1438
+ key: "_get",
1439
+ value: function(n, d) {
1440
+ return n instanceof t ? n.get_object_at(d) : n[d];
1441
+ }
1442
+ }, {
1443
+ key: "_set",
1444
+ value: function(n, d, r) {
1445
+ n instanceof t ? n.set_object_at(d, r) : n[d] = r;
1446
+ }
1447
+ }, {
1448
+ key: "_swap",
1449
+ value: function(n, d, r) {
1450
+ var h = this._get(n, d);
1451
+ this._set(n, d, this._get(n, r)), this._set(n, r, h);
1452
+ }
1453
+ }, {
1454
+ key: "_defaultCompareFunction",
1455
+ value: function(n, d) {
1456
+ return d > n;
1457
+ }
1458
+ }]), l;
1459
+ }();
1460
+ N.exports = i;
1461
+ },
1462
+ /* 25 */
1463
+ /***/
1464
+ function(N, I, T) {
1465
+ var o = /* @__PURE__ */ function() {
1466
+ function i(l, g) {
1467
+ for (var n = 0; n < g.length; n++) {
1468
+ var d = g[n];
1469
+ d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(l, d.key, d);
1470
+ }
1471
+ }
1472
+ return function(l, g, n) {
1473
+ return g && i(l.prototype, g), n && i(l, n), l;
1474
+ };
1475
+ }();
1476
+ function e(i, l) {
1477
+ if (!(i instanceof l))
1478
+ throw new TypeError("Cannot call a class as a function");
1479
+ }
1480
+ var t = function() {
1481
+ function i(l, g) {
1482
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, d = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1483
+ e(this, i), this.sequence1 = l, this.sequence2 = g, this.match_score = n, this.mismatch_penalty = d, this.gap_penalty = r, this.iMax = l.length + 1, this.jMax = g.length + 1, this.grid = new Array(this.iMax);
1484
+ for (var h = 0; h < this.iMax; h++) {
1485
+ this.grid[h] = new Array(this.jMax);
1486
+ for (var a = 0; a < this.jMax; a++)
1487
+ this.grid[h][a] = 0;
1488
+ }
1489
+ this.tracebackGrid = new Array(this.iMax);
1490
+ for (var p = 0; p < this.iMax; p++) {
1491
+ this.tracebackGrid[p] = new Array(this.jMax);
1492
+ for (var v = 0; v < this.jMax; v++)
1493
+ this.tracebackGrid[p][v] = [null, null, null];
1494
+ }
1495
+ this.alignments = [], this.score = -1, this.computeGrids();
1496
+ }
1497
+ return o(i, [{
1498
+ key: "getScore",
1499
+ value: function() {
1500
+ return this.score;
1501
+ }
1502
+ }, {
1503
+ key: "getAlignments",
1504
+ value: function() {
1505
+ return this.alignments;
1506
+ }
1507
+ // Main dynamic programming procedure
1508
+ }, {
1509
+ key: "computeGrids",
1510
+ value: function() {
1511
+ for (var g = 1; g < this.jMax; g++)
1512
+ this.grid[0][g] = this.grid[0][g - 1] + this.gap_penalty, this.tracebackGrid[0][g] = [!1, !1, !0];
1513
+ for (var n = 1; n < this.iMax; n++)
1514
+ this.grid[n][0] = this.grid[n - 1][0] + this.gap_penalty, this.tracebackGrid[n][0] = [!1, !0, !1];
1515
+ for (var d = 1; d < this.iMax; d++)
1516
+ for (var r = 1; r < this.jMax; r++) {
1517
+ var h = void 0;
1518
+ this.sequence1[d - 1] === this.sequence2[r - 1] ? h = this.grid[d - 1][r - 1] + this.match_score : h = this.grid[d - 1][r - 1] + this.mismatch_penalty;
1519
+ var a = this.grid[d - 1][r] + this.gap_penalty, p = this.grid[d][r - 1] + this.gap_penalty, v = [h, a, p], D = this.arrayAllMaxIndexes(v);
1520
+ this.grid[d][r] = v[D[0]], this.tracebackGrid[d][r] = [D.includes(0), D.includes(1), D.includes(2)];
1521
+ }
1522
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1523
+ }
1524
+ // Gets all possible valid sequence combinations
1525
+ }, {
1526
+ key: "alignmentTraceback",
1527
+ value: function() {
1528
+ var g = [];
1529
+ for (g.push({
1530
+ pos: [this.sequence1.length, this.sequence2.length],
1531
+ seq1: "",
1532
+ seq2: ""
1533
+ }); g[0]; ) {
1534
+ var n = g[0], d = this.tracebackGrid[n.pos[0]][n.pos[1]];
1535
+ d[0] && g.push({
1536
+ pos: [n.pos[0] - 1, n.pos[1] - 1],
1537
+ seq1: this.sequence1[n.pos[0] - 1] + n.seq1,
1538
+ seq2: this.sequence2[n.pos[1] - 1] + n.seq2
1539
+ }), d[1] && g.push({
1540
+ pos: [n.pos[0] - 1, n.pos[1]],
1541
+ seq1: this.sequence1[n.pos[0] - 1] + n.seq1,
1542
+ seq2: "-" + n.seq2
1543
+ }), d[2] && g.push({
1544
+ pos: [n.pos[0], n.pos[1] - 1],
1545
+ seq1: "-" + n.seq1,
1546
+ seq2: this.sequence2[n.pos[1] - 1] + n.seq2
1547
+ }), n.pos[0] === 0 && n.pos[1] === 0 && this.alignments.push({
1548
+ sequence1: n.seq1,
1549
+ sequence2: n.seq2
1550
+ }), g.shift();
1551
+ }
1552
+ return this.alignments;
1553
+ }
1554
+ // Helper Functions
1555
+ }, {
1556
+ key: "getAllIndexes",
1557
+ value: function(g, n) {
1558
+ for (var d = [], r = -1; (r = g.indexOf(n, r + 1)) !== -1; )
1559
+ d.push(r);
1560
+ return d;
1561
+ }
1562
+ }, {
1563
+ key: "arrayAllMaxIndexes",
1564
+ value: function(g) {
1565
+ return this.getAllIndexes(g, Math.max.apply(null, g));
1566
+ }
1567
+ }]), i;
1568
+ }();
1569
+ N.exports = t;
1570
+ },
1571
+ /* 26 */
1572
+ /***/
1573
+ function(N, I, T) {
1574
+ var o = function() {
1575
+ };
1576
+ o.FDLayout = T(18), o.FDLayoutConstants = T(7), o.FDLayoutEdge = T(19), o.FDLayoutNode = T(20), o.DimensionD = T(21), o.HashMap = T(22), o.HashSet = T(23), o.IGeometry = T(8), o.IMath = T(9), o.Integer = T(10), o.Point = T(12), o.PointD = T(4), o.RandomSeed = T(16), o.RectangleD = T(13), o.Transform = T(17), o.UniqueIDGeneretor = T(14), o.Quicksort = T(24), o.LinkedList = T(11), o.LGraphObject = T(2), o.LGraph = T(5), o.LEdge = T(1), o.LGraphManager = T(6), o.LNode = T(3), o.Layout = T(15), o.LayoutConstants = T(0), o.NeedlemanWunsch = T(25), N.exports = o;
1577
+ },
1578
+ /* 27 */
1579
+ /***/
1580
+ function(N, I, T) {
1581
+ function o() {
1582
+ this.listeners = [];
1583
+ }
1584
+ var e = o.prototype;
1585
+ e.addListener = function(t, i) {
1586
+ this.listeners.push({
1587
+ event: t,
1588
+ callback: i
1589
+ });
1590
+ }, e.removeListener = function(t, i) {
1591
+ for (var l = this.listeners.length; l >= 0; l--) {
1592
+ var g = this.listeners[l];
1593
+ g.event === t && g.callback === i && this.listeners.splice(l, 1);
1594
+ }
1595
+ }, e.emit = function(t, i) {
1596
+ for (var l = 0; l < this.listeners.length; l++) {
1597
+ var g = this.listeners[l];
1598
+ t === g.event && g.callback(i);
1599
+ }
1600
+ }, N.exports = o;
1601
+ }
1602
+ /******/
1603
+ ])
1604
+ );
1605
+ });
1606
+ }(Q)), Q.exports;
1607
+ }
1608
+ var z;
1609
+ function ft() {
1610
+ return z || (z = 1, function(G, b) {
1611
+ (function(I, T) {
1612
+ G.exports = T(ut());
1613
+ })($, function(N) {
1614
+ return (
1615
+ /******/
1616
+ function(I) {
1617
+ var T = {};
1618
+ function o(e) {
1619
+ if (T[e])
1620
+ return T[e].exports;
1621
+ var t = T[e] = {
1622
+ /******/
1623
+ i: e,
1624
+ /******/
1625
+ l: !1,
1626
+ /******/
1627
+ exports: {}
1628
+ /******/
1629
+ };
1630
+ return I[e].call(t.exports, t, t.exports, o), t.l = !0, t.exports;
1631
+ }
1632
+ return o.m = I, o.c = T, o.i = function(e) {
1633
+ return e;
1634
+ }, o.d = function(e, t, i) {
1635
+ o.o(e, t) || Object.defineProperty(e, t, {
1636
+ /******/
1637
+ configurable: !1,
1638
+ /******/
1639
+ enumerable: !0,
1640
+ /******/
1641
+ get: i
1642
+ /******/
1643
+ });
1644
+ }, o.n = function(e) {
1645
+ var t = e && e.__esModule ? (
1646
+ /******/
1647
+ function() {
1648
+ return e.default;
1649
+ }
1650
+ ) : (
1651
+ /******/
1652
+ function() {
1653
+ return e;
1654
+ }
1655
+ );
1656
+ return o.d(t, "a", t), t;
1657
+ }, o.o = function(e, t) {
1658
+ return Object.prototype.hasOwnProperty.call(e, t);
1659
+ }, o.p = "", o(o.s = 7);
1660
+ }([
1661
+ /* 0 */
1662
+ /***/
1663
+ function(I, T) {
1664
+ I.exports = N;
1665
+ },
1666
+ /* 1 */
1667
+ /***/
1668
+ function(I, T, o) {
1669
+ var e = o(0).FDLayoutConstants;
1670
+ function t() {
1671
+ }
1672
+ for (var i in e)
1673
+ t[i] = e[i];
1674
+ t.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, t.DEFAULT_RADIAL_SEPARATION = e.DEFAULT_EDGE_LENGTH, t.DEFAULT_COMPONENT_SEPERATION = 60, t.TILE = !0, t.TILING_PADDING_VERTICAL = 10, t.TILING_PADDING_HORIZONTAL = 10, t.TREE_REDUCTION_ON_INCREMENTAL = !1, I.exports = t;
1675
+ },
1676
+ /* 2 */
1677
+ /***/
1678
+ function(I, T, o) {
1679
+ var e = o(0).FDLayoutEdge;
1680
+ function t(l, g, n) {
1681
+ e.call(this, l, g, n);
1682
+ }
1683
+ t.prototype = Object.create(e.prototype);
1684
+ for (var i in e)
1685
+ t[i] = e[i];
1686
+ I.exports = t;
1687
+ },
1688
+ /* 3 */
1689
+ /***/
1690
+ function(I, T, o) {
1691
+ var e = o(0).LGraph;
1692
+ function t(l, g, n) {
1693
+ e.call(this, l, g, n);
1694
+ }
1695
+ t.prototype = Object.create(e.prototype);
1696
+ for (var i in e)
1697
+ t[i] = e[i];
1698
+ I.exports = t;
1699
+ },
1700
+ /* 4 */
1701
+ /***/
1702
+ function(I, T, o) {
1703
+ var e = o(0).LGraphManager;
1704
+ function t(l) {
1705
+ e.call(this, l);
1706
+ }
1707
+ t.prototype = Object.create(e.prototype);
1708
+ for (var i in e)
1709
+ t[i] = e[i];
1710
+ I.exports = t;
1711
+ },
1712
+ /* 5 */
1713
+ /***/
1714
+ function(I, T, o) {
1715
+ var e = o(0).FDLayoutNode, t = o(0).IMath;
1716
+ function i(g, n, d, r) {
1717
+ e.call(this, g, n, d, r);
1718
+ }
1719
+ i.prototype = Object.create(e.prototype);
1720
+ for (var l in e)
1721
+ i[l] = e[l];
1722
+ i.prototype.move = function() {
1723
+ var g = this.graphManager.getLayout();
1724
+ this.displacementX = g.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = g.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementX = g.coolingFactor * g.maxNodeDisplacement * t.sign(this.displacementX)), Math.abs(this.displacementY) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementY = g.coolingFactor * g.maxNodeDisplacement * t.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), g.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0;
1725
+ }, i.prototype.propogateDisplacementToChildren = function(g, n) {
1726
+ for (var d = this.getChild().getNodes(), r, h = 0; h < d.length; h++)
1727
+ r = d[h], r.getChild() == null ? (r.moveBy(g, n), r.displacementX += g, r.displacementY += n) : r.propogateDisplacementToChildren(g, n);
1728
+ }, i.prototype.setPred1 = function(g) {
1729
+ this.pred1 = g;
1730
+ }, i.prototype.getPred1 = function() {
1731
+ return pred1;
1732
+ }, i.prototype.getPred2 = function() {
1733
+ return pred2;
1734
+ }, i.prototype.setNext = function(g) {
1735
+ this.next = g;
1736
+ }, i.prototype.getNext = function() {
1737
+ return next;
1738
+ }, i.prototype.setProcessed = function(g) {
1739
+ this.processed = g;
1740
+ }, i.prototype.isProcessed = function() {
1741
+ return processed;
1742
+ }, I.exports = i;
1743
+ },
1744
+ /* 6 */
1745
+ /***/
1746
+ function(I, T, o) {
1747
+ var e = o(0).FDLayout, t = o(4), i = o(3), l = o(5), g = o(2), n = o(1), d = o(0).FDLayoutConstants, r = o(0).LayoutConstants, h = o(0).Point, a = o(0).PointD, p = o(0).Layout, v = o(0).Integer, D = o(0).IGeometry, u = o(0).LGraph, E = o(0).Transform;
1748
+ function y() {
1749
+ e.call(this), this.toBeTiled = {};
1750
+ }
1751
+ y.prototype = Object.create(e.prototype);
1752
+ for (var O in e)
1753
+ y[O] = e[O];
1754
+ y.prototype.newGraphManager = function() {
1755
+ var s = new t(this);
1756
+ return this.graphManager = s, s;
1757
+ }, y.prototype.newGraph = function(s) {
1758
+ return new i(null, this.graphManager, s);
1759
+ }, y.prototype.newNode = function(s) {
1760
+ return new l(this.graphManager, s);
1761
+ }, y.prototype.newEdge = function(s) {
1762
+ return new g(null, null, s);
1763
+ }, y.prototype.initParameters = function() {
1764
+ e.prototype.initParameters.call(this, arguments), this.isSubLayout || (n.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = n.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = d.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = d.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = d.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = d.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = d.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / d.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = d.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1765
+ }, y.prototype.layout = function() {
1766
+ var s = r.DEFAULT_CREATE_BENDS_AS_NEEDED;
1767
+ return s && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1768
+ }, y.prototype.classicLayout = function() {
1769
+ 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) {
1770
+ if (n.TREE_REDUCTION_ON_INCREMENTAL) {
1771
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1772
+ var f = new Set(this.getAllNodes()), c = this.nodesWithGravity.filter(function(m) {
1773
+ return f.has(m);
1774
+ });
1775
+ this.graphManager.setAllNodesToApplyGravitation(c);
1776
+ }
1777
+ } else {
1778
+ var s = this.getFlatForest();
1779
+ if (s.length > 0)
1780
+ this.positionNodesRadially(s);
1781
+ else {
1782
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1783
+ var f = new Set(this.getAllNodes()), c = this.nodesWithGravity.filter(function(L) {
1784
+ return f.has(L);
1785
+ });
1786
+ this.graphManager.setAllNodesToApplyGravitation(c), this.positionNodesRandomly();
1787
+ }
1788
+ }
1789
+ return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1790
+ }, y.prototype.tick = function() {
1791
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
1792
+ if (this.prunedNodesAll.length > 0)
1793
+ this.isTreeGrowing = !0;
1794
+ else
1795
+ return !0;
1796
+ if (this.totalIterations % d.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1797
+ if (this.isConverged())
1798
+ if (this.prunedNodesAll.length > 0)
1799
+ this.isTreeGrowing = !0;
1800
+ else
1801
+ return !0;
1802
+ 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));
1803
+ }
1804
+ if (this.isTreeGrowing) {
1805
+ if (this.growTreeIterations % 10 == 0)
1806
+ if (this.prunedNodesAll.length > 0) {
1807
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1808
+ var s = new Set(this.getAllNodes()), f = this.nodesWithGravity.filter(function(A) {
1809
+ return s.has(A);
1810
+ });
1811
+ this.graphManager.setAllNodesToApplyGravitation(f), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = d.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1812
+ } else
1813
+ this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1814
+ this.growTreeIterations++;
1815
+ }
1816
+ if (this.isGrowthFinished) {
1817
+ if (this.isConverged())
1818
+ return !0;
1819
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = d.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1820
+ }
1821
+ var c = !this.isTreeGrowing && !this.isGrowthFinished, L = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1822
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(c, L), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1823
+ }, y.prototype.getPositionsData = function() {
1824
+ for (var s = this.graphManager.getAllNodes(), f = {}, c = 0; c < s.length; c++) {
1825
+ var L = s[c].rect, A = s[c].id;
1826
+ f[A] = {
1827
+ id: A,
1828
+ x: L.getCenterX(),
1829
+ y: L.getCenterY(),
1830
+ w: L.width,
1831
+ h: L.height
1832
+ };
1833
+ }
1834
+ return f;
1835
+ }, y.prototype.runSpringEmbedder = function() {
1836
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1837
+ var s = !1;
1838
+ if (d.ANIMATE === "during")
1839
+ this.emit("layoutstarted");
1840
+ else {
1841
+ for (; !s; )
1842
+ s = this.tick();
1843
+ this.graphManager.updateBounds();
1844
+ }
1845
+ }, y.prototype.calculateNodesToApplyGravitationTo = function() {
1846
+ var s = [], f, c = this.graphManager.getGraphs(), L = c.length, A;
1847
+ for (A = 0; A < L; A++)
1848
+ f = c[A], f.updateConnected(), f.isConnected || (s = s.concat(f.getNodes()));
1849
+ return s;
1850
+ }, y.prototype.createBendpoints = function() {
1851
+ var s = [];
1852
+ s = s.concat(this.graphManager.getAllEdges());
1853
+ var f = /* @__PURE__ */ new Set(), c;
1854
+ for (c = 0; c < s.length; c++) {
1855
+ var L = s[c];
1856
+ if (!f.has(L)) {
1857
+ var A = L.getSource(), m = L.getTarget();
1858
+ if (A == m)
1859
+ L.getBendpoints().push(new a()), L.getBendpoints().push(new a()), this.createDummyNodesForBendpoints(L), f.add(L);
1860
+ else {
1861
+ var R = [];
1862
+ if (R = R.concat(A.getEdgeListToNode(m)), R = R.concat(m.getEdgeListToNode(A)), !f.has(R[0])) {
1863
+ if (R.length > 1) {
1864
+ var C;
1865
+ for (C = 0; C < R.length; C++) {
1866
+ var M = R[C];
1867
+ M.getBendpoints().push(new a()), this.createDummyNodesForBendpoints(M);
1868
+ }
1869
+ }
1870
+ R.forEach(function(S) {
1871
+ f.add(S);
1872
+ });
1873
+ }
1874
+ }
1875
+ }
1876
+ if (f.size == s.length)
1877
+ break;
1878
+ }
1879
+ }, y.prototype.positionNodesRadially = function(s) {
1880
+ for (var f = new h(0, 0), c = Math.ceil(Math.sqrt(s.length)), L = 0, A = 0, m = 0, R = new a(0, 0), C = 0; C < s.length; C++) {
1881
+ C % c == 0 && (m = 0, A = L, C != 0 && (A += n.DEFAULT_COMPONENT_SEPERATION), L = 0);
1882
+ var M = s[C], S = p.findCenterOfTree(M);
1883
+ f.x = m, f.y = A, R = y.radialLayout(M, S, f), R.y > L && (L = Math.floor(R.y)), m = Math.floor(R.x + n.DEFAULT_COMPONENT_SEPERATION);
1884
+ }
1885
+ this.transform(new a(r.WORLD_CENTER_X - R.x / 2, r.WORLD_CENTER_Y - R.y / 2));
1886
+ }, y.radialLayout = function(s, f, c) {
1887
+ var L = Math.max(this.maxDiagonalInTree(s), n.DEFAULT_RADIAL_SEPARATION);
1888
+ y.branchRadialLayout(f, null, 0, 359, 0, L);
1889
+ var A = u.calculateBounds(s), m = new E();
1890
+ m.setDeviceOrgX(A.getMinX()), m.setDeviceOrgY(A.getMinY()), m.setWorldOrgX(c.x), m.setWorldOrgY(c.y);
1891
+ for (var R = 0; R < s.length; R++) {
1892
+ var C = s[R];
1893
+ C.transform(m);
1894
+ }
1895
+ var M = new a(A.getMaxX(), A.getMaxY());
1896
+ return m.inverseTransformPoint(M);
1897
+ }, y.branchRadialLayout = function(s, f, c, L, A, m) {
1898
+ var R = (L - c + 1) / 2;
1899
+ R < 0 && (R += 180);
1900
+ var C = (R + c) % 360, M = C * D.TWO_PI / 360, S = A * Math.cos(M), Y = A * Math.sin(M);
1901
+ s.setCenter(S, Y);
1902
+ var w = [];
1903
+ w = w.concat(s.getEdges());
1904
+ var x = w.length;
1905
+ f != null && x--;
1906
+ for (var F = 0, U = w.length, P, _ = s.getEdgesBetween(f); _.length > 1; ) {
1907
+ var X = _[0];
1908
+ _.splice(0, 1);
1909
+ var H = w.indexOf(X);
1910
+ H >= 0 && w.splice(H, 1), U--, x--;
1911
+ }
1912
+ f != null ? P = (w.indexOf(_[0]) + 1) % U : P = 0;
1913
+ for (var W = Math.abs(L - c) / x, B = P; F != x; B = ++B % U) {
1914
+ var K = w[B].getOtherEnd(s);
1915
+ if (K != f) {
1916
+ var j = (c + F * W) % 360, ht = (j + W) % 360;
1917
+ y.branchRadialLayout(K, s, j, ht, A + m, m), F++;
1918
+ }
1919
+ }
1920
+ }, y.maxDiagonalInTree = function(s) {
1921
+ for (var f = v.MIN_VALUE, c = 0; c < s.length; c++) {
1922
+ var L = s[c], A = L.getDiagonal();
1923
+ A > f && (f = A);
1924
+ }
1925
+ return f;
1926
+ }, y.prototype.calcRepulsionRange = function() {
1927
+ return 2 * (this.level + 1) * this.idealEdgeLength;
1928
+ }, y.prototype.groupZeroDegreeMembers = function() {
1929
+ var s = this, f = {};
1930
+ this.memberGroups = {}, this.idToDummyNode = {};
1931
+ for (var c = [], L = this.graphManager.getAllNodes(), A = 0; A < L.length; A++) {
1932
+ var m = L[A], R = m.getParent();
1933
+ this.getNodeDegreeWithChildren(m) === 0 && (R.id == null || !this.getToBeTiled(R)) && c.push(m);
1934
+ }
1935
+ for (var A = 0; A < c.length; A++) {
1936
+ var m = c[A], C = m.getParent().id;
1937
+ typeof f[C] > "u" && (f[C] = []), f[C] = f[C].concat(m);
1938
+ }
1939
+ Object.keys(f).forEach(function(M) {
1940
+ if (f[M].length > 1) {
1941
+ var S = "DummyCompound_" + M;
1942
+ s.memberGroups[S] = f[M];
1943
+ var Y = f[M][0].getParent(), w = new l(s.graphManager);
1944
+ w.id = S, w.paddingLeft = Y.paddingLeft || 0, w.paddingRight = Y.paddingRight || 0, w.paddingBottom = Y.paddingBottom || 0, w.paddingTop = Y.paddingTop || 0, s.idToDummyNode[S] = w;
1945
+ var x = s.getGraphManager().add(s.newGraph(), w), F = Y.getChild();
1946
+ F.add(w);
1947
+ for (var U = 0; U < f[M].length; U++) {
1948
+ var P = f[M][U];
1949
+ F.remove(P), x.add(P);
1950
+ }
1951
+ }
1952
+ });
1953
+ }, y.prototype.clearCompounds = function() {
1954
+ var s = {}, f = {};
1955
+ this.performDFSOnCompounds();
1956
+ for (var c = 0; c < this.compoundOrder.length; c++)
1957
+ f[this.compoundOrder[c].id] = this.compoundOrder[c], s[this.compoundOrder[c].id] = [].concat(this.compoundOrder[c].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[c].getChild()), this.compoundOrder[c].child = null;
1958
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(s, f);
1959
+ }, y.prototype.clearZeroDegreeMembers = function() {
1960
+ var s = this, f = this.tiledZeroDegreePack = [];
1961
+ Object.keys(this.memberGroups).forEach(function(c) {
1962
+ var L = s.idToDummyNode[c];
1963
+ f[c] = s.tileNodes(s.memberGroups[c], L.paddingLeft + L.paddingRight), L.rect.width = f[c].width, L.rect.height = f[c].height;
1964
+ });
1965
+ }, y.prototype.repopulateCompounds = function() {
1966
+ for (var s = this.compoundOrder.length - 1; s >= 0; s--) {
1967
+ var f = this.compoundOrder[s], c = f.id, L = f.paddingLeft, A = f.paddingTop;
1968
+ this.adjustLocations(this.tiledMemberPack[c], f.rect.x, f.rect.y, L, A);
1969
+ }
1970
+ }, y.prototype.repopulateZeroDegreeMembers = function() {
1971
+ var s = this, f = this.tiledZeroDegreePack;
1972
+ Object.keys(f).forEach(function(c) {
1973
+ var L = s.idToDummyNode[c], A = L.paddingLeft, m = L.paddingTop;
1974
+ s.adjustLocations(f[c], L.rect.x, L.rect.y, A, m);
1975
+ });
1976
+ }, y.prototype.getToBeTiled = function(s) {
1977
+ var f = s.id;
1978
+ if (this.toBeTiled[f] != null)
1979
+ return this.toBeTiled[f];
1980
+ var c = s.getChild();
1981
+ if (c == null)
1982
+ return this.toBeTiled[f] = !1, !1;
1983
+ for (var L = c.getNodes(), A = 0; A < L.length; A++) {
1984
+ var m = L[A];
1985
+ if (this.getNodeDegree(m) > 0)
1986
+ return this.toBeTiled[f] = !1, !1;
1987
+ if (m.getChild() == null) {
1988
+ this.toBeTiled[m.id] = !1;
1989
+ continue;
1990
+ }
1991
+ if (!this.getToBeTiled(m))
1992
+ return this.toBeTiled[f] = !1, !1;
1993
+ }
1994
+ return this.toBeTiled[f] = !0, !0;
1995
+ }, y.prototype.getNodeDegree = function(s) {
1996
+ s.id;
1997
+ for (var f = s.getEdges(), c = 0, L = 0; L < f.length; L++) {
1998
+ var A = f[L];
1999
+ A.getSource().id !== A.getTarget().id && (c = c + 1);
2000
+ }
2001
+ return c;
2002
+ }, y.prototype.getNodeDegreeWithChildren = function(s) {
2003
+ var f = this.getNodeDegree(s);
2004
+ if (s.getChild() == null)
2005
+ return f;
2006
+ for (var c = s.getChild().getNodes(), L = 0; L < c.length; L++) {
2007
+ var A = c[L];
2008
+ f += this.getNodeDegreeWithChildren(A);
2009
+ }
2010
+ return f;
2011
+ }, y.prototype.performDFSOnCompounds = function() {
2012
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2013
+ }, y.prototype.fillCompexOrderByDFS = function(s) {
2014
+ for (var f = 0; f < s.length; f++) {
2015
+ var c = s[f];
2016
+ c.getChild() != null && this.fillCompexOrderByDFS(c.getChild().getNodes()), this.getToBeTiled(c) && this.compoundOrder.push(c);
2017
+ }
2018
+ }, y.prototype.adjustLocations = function(s, f, c, L, A) {
2019
+ f += L, c += A;
2020
+ for (var m = f, R = 0; R < s.rows.length; R++) {
2021
+ var C = s.rows[R];
2022
+ f = m;
2023
+ for (var M = 0, S = 0; S < C.length; S++) {
2024
+ var Y = C[S];
2025
+ Y.rect.x = f, Y.rect.y = c, f += Y.rect.width + s.horizontalPadding, Y.rect.height > M && (M = Y.rect.height);
2026
+ }
2027
+ c += M + s.verticalPadding;
2028
+ }
2029
+ }, y.prototype.tileCompoundMembers = function(s, f) {
2030
+ var c = this;
2031
+ this.tiledMemberPack = [], Object.keys(s).forEach(function(L) {
2032
+ var A = f[L];
2033
+ c.tiledMemberPack[L] = c.tileNodes(s[L], A.paddingLeft + A.paddingRight), A.rect.width = c.tiledMemberPack[L].width, A.rect.height = c.tiledMemberPack[L].height;
2034
+ });
2035
+ }, y.prototype.tileNodes = function(s, f) {
2036
+ var c = n.TILING_PADDING_VERTICAL, L = n.TILING_PADDING_HORIZONTAL, A = {
2037
+ rows: [],
2038
+ rowWidth: [],
2039
+ rowHeight: [],
2040
+ width: 0,
2041
+ height: f,
2042
+ // assume minHeight equals to minWidth
2043
+ verticalPadding: c,
2044
+ horizontalPadding: L
2045
+ };
2046
+ s.sort(function(C, M) {
2047
+ return C.rect.width * C.rect.height > M.rect.width * M.rect.height ? -1 : C.rect.width * C.rect.height < M.rect.width * M.rect.height ? 1 : 0;
2048
+ });
2049
+ for (var m = 0; m < s.length; m++) {
2050
+ var R = s[m];
2051
+ A.rows.length == 0 ? this.insertNodeToRow(A, R, 0, f) : this.canAddHorizontal(A, R.rect.width, R.rect.height) ? this.insertNodeToRow(A, R, this.getShortestRowIndex(A), f) : this.insertNodeToRow(A, R, A.rows.length, f), this.shiftToLastRow(A);
2052
+ }
2053
+ return A;
2054
+ }, y.prototype.insertNodeToRow = function(s, f, c, L) {
2055
+ var A = L;
2056
+ if (c == s.rows.length) {
2057
+ var m = [];
2058
+ s.rows.push(m), s.rowWidth.push(A), s.rowHeight.push(0);
2059
+ }
2060
+ var R = s.rowWidth[c] + f.rect.width;
2061
+ s.rows[c].length > 0 && (R += s.horizontalPadding), s.rowWidth[c] = R, s.width < R && (s.width = R);
2062
+ var C = f.rect.height;
2063
+ c > 0 && (C += s.verticalPadding);
2064
+ var M = 0;
2065
+ C > s.rowHeight[c] && (M = s.rowHeight[c], s.rowHeight[c] = C, M = s.rowHeight[c] - M), s.height += M, s.rows[c].push(f);
2066
+ }, y.prototype.getShortestRowIndex = function(s) {
2067
+ for (var f = -1, c = Number.MAX_VALUE, L = 0; L < s.rows.length; L++)
2068
+ s.rowWidth[L] < c && (f = L, c = s.rowWidth[L]);
2069
+ return f;
2070
+ }, y.prototype.getLongestRowIndex = function(s) {
2071
+ for (var f = -1, c = Number.MIN_VALUE, L = 0; L < s.rows.length; L++)
2072
+ s.rowWidth[L] > c && (f = L, c = s.rowWidth[L]);
2073
+ return f;
2074
+ }, y.prototype.canAddHorizontal = function(s, f, c) {
2075
+ var L = this.getShortestRowIndex(s);
2076
+ if (L < 0)
2077
+ return !0;
2078
+ var A = s.rowWidth[L];
2079
+ if (A + s.horizontalPadding + f <= s.width) return !0;
2080
+ var m = 0;
2081
+ s.rowHeight[L] < c && L > 0 && (m = c + s.verticalPadding - s.rowHeight[L]);
2082
+ var R;
2083
+ s.width - A >= f + s.horizontalPadding ? R = (s.height + m) / (A + f + s.horizontalPadding) : R = (s.height + m) / s.width, m = c + s.verticalPadding;
2084
+ var C;
2085
+ return s.width < f ? C = (s.height + m) / f : C = (s.height + m) / s.width, C < 1 && (C = 1 / C), R < 1 && (R = 1 / R), R < C;
2086
+ }, y.prototype.shiftToLastRow = function(s) {
2087
+ var f = this.getLongestRowIndex(s), c = s.rowWidth.length - 1, L = s.rows[f], A = L[L.length - 1], m = A.width + s.horizontalPadding;
2088
+ if (s.width - s.rowWidth[c] > m && f != c) {
2089
+ L.splice(-1, 1), s.rows[c].push(A), s.rowWidth[f] = s.rowWidth[f] - m, s.rowWidth[c] = s.rowWidth[c] + m, s.width = s.rowWidth[instance.getLongestRowIndex(s)];
2090
+ for (var R = Number.MIN_VALUE, C = 0; C < L.length; C++)
2091
+ L[C].height > R && (R = L[C].height);
2092
+ f > 0 && (R += s.verticalPadding);
2093
+ var M = s.rowHeight[f] + s.rowHeight[c];
2094
+ s.rowHeight[f] = R, s.rowHeight[c] < A.height + s.verticalPadding && (s.rowHeight[c] = A.height + s.verticalPadding);
2095
+ var S = s.rowHeight[f] + s.rowHeight[c];
2096
+ s.height += S - M, this.shiftToLastRow(s);
2097
+ }
2098
+ }, y.prototype.tilingPreLayout = function() {
2099
+ n.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2100
+ }, y.prototype.tilingPostLayout = function() {
2101
+ n.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2102
+ }, y.prototype.reduceTrees = function() {
2103
+ for (var s = [], f = !0, c; f; ) {
2104
+ var L = this.graphManager.getAllNodes(), A = [];
2105
+ f = !1;
2106
+ for (var m = 0; m < L.length; m++)
2107
+ c = L[m], c.getEdges().length == 1 && !c.getEdges()[0].isInterGraph && c.getChild() == null && (A.push([c, c.getEdges()[0], c.getOwner()]), f = !0);
2108
+ if (f == !0) {
2109
+ for (var R = [], C = 0; C < A.length; C++)
2110
+ A[C][0].getEdges().length == 1 && (R.push(A[C]), A[C][0].getOwner().remove(A[C][0]));
2111
+ s.push(R), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2112
+ }
2113
+ }
2114
+ this.prunedNodesAll = s;
2115
+ }, y.prototype.growTree = function(s) {
2116
+ for (var f = s.length, c = s[f - 1], L, A = 0; A < c.length; A++)
2117
+ L = c[A], this.findPlaceforPrunedNode(L), L[2].add(L[0]), L[2].add(L[1], L[1].source, L[1].target);
2118
+ s.splice(s.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2119
+ }, y.prototype.findPlaceforPrunedNode = function(s) {
2120
+ var f, c, L = s[0];
2121
+ L == s[1].source ? c = s[1].target : c = s[1].source;
2122
+ var A = c.startX, m = c.finishX, R = c.startY, C = c.finishY, M = 0, S = 0, Y = 0, w = 0, x = [M, Y, S, w];
2123
+ if (R > 0)
2124
+ for (var F = A; F <= m; F++)
2125
+ x[0] += this.grid[F][R - 1].length + this.grid[F][R].length - 1;
2126
+ if (m < this.grid.length - 1)
2127
+ for (var F = R; F <= C; F++)
2128
+ x[1] += this.grid[m + 1][F].length + this.grid[m][F].length - 1;
2129
+ if (C < this.grid[0].length - 1)
2130
+ for (var F = A; F <= m; F++)
2131
+ x[2] += this.grid[F][C + 1].length + this.grid[F][C].length - 1;
2132
+ if (A > 0)
2133
+ for (var F = R; F <= C; F++)
2134
+ x[3] += this.grid[A - 1][F].length + this.grid[A][F].length - 1;
2135
+ for (var U = v.MAX_VALUE, P, _, X = 0; X < x.length; X++)
2136
+ x[X] < U ? (U = x[X], P = 1, _ = X) : x[X] == U && P++;
2137
+ if (P == 3 && U == 0)
2138
+ x[0] == 0 && x[1] == 0 && x[2] == 0 ? f = 1 : x[0] == 0 && x[1] == 0 && x[3] == 0 ? f = 0 : x[0] == 0 && x[2] == 0 && x[3] == 0 ? f = 3 : x[1] == 0 && x[2] == 0 && x[3] == 0 && (f = 2);
2139
+ else if (P == 2 && U == 0) {
2140
+ var H = Math.floor(Math.random() * 2);
2141
+ x[0] == 0 && x[1] == 0 ? H == 0 ? f = 0 : f = 1 : x[0] == 0 && x[2] == 0 ? H == 0 ? f = 0 : f = 2 : x[0] == 0 && x[3] == 0 ? H == 0 ? f = 0 : f = 3 : x[1] == 0 && x[2] == 0 ? H == 0 ? f = 1 : f = 2 : x[1] == 0 && x[3] == 0 ? H == 0 ? f = 1 : f = 3 : H == 0 ? f = 2 : f = 3;
2142
+ } else if (P == 4 && U == 0) {
2143
+ var H = Math.floor(Math.random() * 4);
2144
+ f = H;
2145
+ } else
2146
+ f = _;
2147
+ f == 0 ? L.setCenter(c.getCenterX(), c.getCenterY() - c.getHeight() / 2 - d.DEFAULT_EDGE_LENGTH - L.getHeight() / 2) : f == 1 ? L.setCenter(c.getCenterX() + c.getWidth() / 2 + d.DEFAULT_EDGE_LENGTH + L.getWidth() / 2, c.getCenterY()) : f == 2 ? L.setCenter(c.getCenterX(), c.getCenterY() + c.getHeight() / 2 + d.DEFAULT_EDGE_LENGTH + L.getHeight() / 2) : L.setCenter(c.getCenterX() - c.getWidth() / 2 - d.DEFAULT_EDGE_LENGTH - L.getWidth() / 2, c.getCenterY());
2148
+ }, I.exports = y;
2149
+ },
2150
+ /* 7 */
2151
+ /***/
2152
+ function(I, T, o) {
2153
+ var e = {};
2154
+ e.layoutBase = o(0), e.CoSEConstants = o(1), e.CoSEEdge = o(2), e.CoSEGraph = o(3), e.CoSEGraphManager = o(4), e.CoSELayout = o(6), e.CoSENode = o(5), I.exports = e;
2155
+ }
2156
+ /******/
2157
+ ])
2158
+ );
2159
+ });
2160
+ }(Z)), Z.exports;
2161
+ }
2162
+ (function(G, b) {
2163
+ (function(I, T) {
2164
+ G.exports = T(ft());
2165
+ })($, function(N) {
2166
+ return (
2167
+ /******/
2168
+ function(I) {
2169
+ var T = {};
2170
+ function o(e) {
2171
+ if (T[e])
2172
+ return T[e].exports;
2173
+ var t = T[e] = {
2174
+ /******/
2175
+ i: e,
2176
+ /******/
2177
+ l: !1,
2178
+ /******/
2179
+ exports: {}
2180
+ /******/
2181
+ };
2182
+ return I[e].call(t.exports, t, t.exports, o), t.l = !0, t.exports;
2183
+ }
2184
+ return o.m = I, o.c = T, o.i = function(e) {
2185
+ return e;
2186
+ }, o.d = function(e, t, i) {
2187
+ o.o(e, t) || Object.defineProperty(e, t, {
2188
+ /******/
2189
+ configurable: !1,
2190
+ /******/
2191
+ enumerable: !0,
2192
+ /******/
2193
+ get: i
2194
+ /******/
2195
+ });
2196
+ }, o.n = function(e) {
2197
+ var t = e && e.__esModule ? (
2198
+ /******/
2199
+ function() {
2200
+ return e.default;
2201
+ }
2202
+ ) : (
2203
+ /******/
2204
+ function() {
2205
+ return e;
2206
+ }
2207
+ );
2208
+ return o.d(t, "a", t), t;
2209
+ }, o.o = function(e, t) {
2210
+ return Object.prototype.hasOwnProperty.call(e, t);
2211
+ }, o.p = "", o(o.s = 1);
2212
+ }([
2213
+ /* 0 */
2214
+ /***/
2215
+ function(I, T) {
2216
+ I.exports = N;
2217
+ },
2218
+ /* 1 */
2219
+ /***/
2220
+ function(I, T, o) {
2221
+ var e = o(0).layoutBase.LayoutConstants, t = o(0).layoutBase.FDLayoutConstants, i = o(0).CoSEConstants, l = o(0).CoSELayout, g = o(0).CoSENode, n = o(0).layoutBase.PointD, d = o(0).layoutBase.DimensionD, r = {
2222
+ // Called on `layoutready`
2223
+ ready: function() {
2224
+ },
2225
+ // Called on `layoutstop`
2226
+ stop: function() {
2227
+ },
2228
+ // 'draft', 'default' or 'proof"
2229
+ // - 'draft' fast cooling rate
2230
+ // - 'default' moderate cooling rate
2231
+ // - "proof" slow cooling rate
2232
+ quality: "default",
2233
+ // include labels in node dimensions
2234
+ nodeDimensionsIncludeLabels: !1,
2235
+ // number of ticks per frame; higher is faster but more jerky
2236
+ refresh: 30,
2237
+ // Whether to fit the network view after when done
2238
+ fit: !0,
2239
+ // Padding on fit
2240
+ padding: 10,
2241
+ // Whether to enable incremental mode
2242
+ randomize: !0,
2243
+ // Node repulsion (non overlapping) multiplier
2244
+ nodeRepulsion: 4500,
2245
+ // Ideal edge (non nested) length
2246
+ idealEdgeLength: 50,
2247
+ // Divisor to compute edge forces
2248
+ edgeElasticity: 0.45,
2249
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
2250
+ nestingFactor: 0.1,
2251
+ // Gravity force (constant)
2252
+ gravity: 0.25,
2253
+ // Maximum number of iterations to perform
2254
+ numIter: 2500,
2255
+ // For enabling tiling
2256
+ tile: !0,
2257
+ // Type of layout animation. The option set is {'during', 'end', false}
2258
+ animate: "end",
2259
+ // Duration for animate:end
2260
+ animationDuration: 500,
2261
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
2262
+ tilingPaddingVertical: 10,
2263
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
2264
+ tilingPaddingHorizontal: 10,
2265
+ // Gravity range (constant) for compounds
2266
+ gravityRangeCompound: 1.5,
2267
+ // Gravity force (constant) for compounds
2268
+ gravityCompound: 1,
2269
+ // Gravity range (constant)
2270
+ gravityRange: 3.8,
2271
+ // Initial cooling factor for incremental layout
2272
+ initialEnergyOnIncremental: 0.5
2273
+ };
2274
+ function h(D, u) {
2275
+ var E = {};
2276
+ for (var y in D)
2277
+ E[y] = D[y];
2278
+ for (var y in u)
2279
+ E[y] = u[y];
2280
+ return E;
2281
+ }
2282
+ function a(D) {
2283
+ this.options = h(r, D), p(this.options);
2284
+ }
2285
+ var p = function(u) {
2286
+ u.nodeRepulsion != null && (i.DEFAULT_REPULSION_STRENGTH = t.DEFAULT_REPULSION_STRENGTH = u.nodeRepulsion), u.idealEdgeLength != null && (i.DEFAULT_EDGE_LENGTH = t.DEFAULT_EDGE_LENGTH = u.idealEdgeLength), u.edgeElasticity != null && (i.DEFAULT_SPRING_STRENGTH = t.DEFAULT_SPRING_STRENGTH = u.edgeElasticity), u.nestingFactor != null && (i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = u.nestingFactor), u.gravity != null && (i.DEFAULT_GRAVITY_STRENGTH = t.DEFAULT_GRAVITY_STRENGTH = u.gravity), u.numIter != null && (i.MAX_ITERATIONS = t.MAX_ITERATIONS = u.numIter), u.gravityRange != null && (i.DEFAULT_GRAVITY_RANGE_FACTOR = t.DEFAULT_GRAVITY_RANGE_FACTOR = u.gravityRange), u.gravityCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = u.gravityCompound), u.gravityRangeCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = u.gravityRangeCompound), u.initialEnergyOnIncremental != null && (i.DEFAULT_COOLING_FACTOR_INCREMENTAL = t.DEFAULT_COOLING_FACTOR_INCREMENTAL = u.initialEnergyOnIncremental), u.quality == "draft" ? e.QUALITY = 0 : u.quality == "proof" ? e.QUALITY = 2 : e.QUALITY = 1, i.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = u.nodeDimensionsIncludeLabels, i.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = !u.randomize, i.ANIMATE = t.ANIMATE = e.ANIMATE = u.animate, i.TILE = u.tile, i.TILING_PADDING_VERTICAL = typeof u.tilingPaddingVertical == "function" ? u.tilingPaddingVertical.call() : u.tilingPaddingVertical, i.TILING_PADDING_HORIZONTAL = typeof u.tilingPaddingHorizontal == "function" ? u.tilingPaddingHorizontal.call() : u.tilingPaddingHorizontal;
2287
+ };
2288
+ a.prototype.run = function() {
2289
+ var D, u, E = this.options;
2290
+ this.idToLNode = {};
2291
+ var y = this.layout = new l(), O = this;
2292
+ O.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
2293
+ var s = y.newGraphManager();
2294
+ this.gm = s;
2295
+ var f = this.options.eles.nodes(), c = this.options.eles.edges();
2296
+ this.root = s.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(f), y);
2297
+ for (var L = 0; L < c.length; L++) {
2298
+ var A = c[L], m = this.idToLNode[A.data("source")], R = this.idToLNode[A.data("target")];
2299
+ if (m !== R && m.getEdgesBetween(R).length == 0) {
2300
+ var C = s.add(y.newEdge(), m, R);
2301
+ C.id = A.id();
2302
+ }
2303
+ }
2304
+ var M = function(w, x) {
2305
+ typeof w == "number" && (w = x);
2306
+ var F = w.data("id"), U = O.idToLNode[F];
2307
+ return {
2308
+ x: U.getRect().getCenterX(),
2309
+ y: U.getRect().getCenterY()
2310
+ };
2311
+ }, S = function Y() {
2312
+ for (var w = function() {
2313
+ E.fit && E.cy.fit(E.eles, E.padding), D || (D = !0, O.cy.one("layoutready", E.ready), O.cy.trigger({ type: "layoutready", layout: O }));
2314
+ }, x = O.options.refresh, F, U = 0; U < x && !F; U++)
2315
+ F = O.stopped || O.layout.tick();
2316
+ if (F) {
2317
+ y.checkLayoutSuccess() && !y.isSubLayout && y.doPostLayout(), y.tilingPostLayout && y.tilingPostLayout(), y.isLayoutFinished = !0, O.options.eles.nodes().positions(M), w(), O.cy.one("layoutstop", O.options.stop), O.cy.trigger({ type: "layoutstop", layout: O }), u && cancelAnimationFrame(u), D = !1;
2318
+ return;
2319
+ }
2320
+ var P = O.layout.getPositionsData();
2321
+ E.eles.nodes().positions(function(_, X) {
2322
+ if (typeof _ == "number" && (_ = X), !_.isParent()) {
2323
+ for (var H = _.id(), W = P[H], B = _; W == null && (W = P[B.data("parent")] || P["DummyCompound_" + B.data("parent")], P[H] = W, B = B.parent()[0], B != null); )
2324
+ ;
2325
+ return W != null ? {
2326
+ x: W.x,
2327
+ y: W.y
2328
+ } : {
2329
+ x: _.position("x"),
2330
+ y: _.position("y")
2331
+ };
2332
+ }
2333
+ }), w(), u = requestAnimationFrame(Y);
2334
+ };
2335
+ return y.addListener("layoutstarted", function() {
2336
+ O.options.animate === "during" && (u = requestAnimationFrame(S));
2337
+ }), y.runLayout(), this.options.animate !== "during" && (O.options.eles.nodes().not(":parent").layoutPositions(O, O.options, M), D = !1), this;
2338
+ }, a.prototype.getTopMostNodes = function(D) {
2339
+ for (var u = {}, E = 0; E < D.length; E++)
2340
+ u[D[E].id()] = !0;
2341
+ var y = D.filter(function(O, s) {
2342
+ typeof O == "number" && (O = s);
2343
+ for (var f = O.parent()[0]; f != null; ) {
2344
+ if (u[f.id()])
2345
+ return !1;
2346
+ f = f.parent()[0];
2347
+ }
2348
+ return !0;
2349
+ });
2350
+ return y;
2351
+ }, a.prototype.processChildrenList = function(D, u, E) {
2352
+ for (var y = u.length, O = 0; O < y; O++) {
2353
+ var s = u[O], f = s.children(), c, L = s.layoutDimensions({
2354
+ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
2355
+ });
2356
+ if (s.outerWidth() != null && s.outerHeight() != null ? c = D.add(new g(E.graphManager, new n(s.position("x") - L.w / 2, s.position("y") - L.h / 2), new d(parseFloat(L.w), parseFloat(L.h)))) : c = D.add(new g(this.graphManager)), c.id = s.data("id"), c.paddingLeft = parseInt(s.css("padding")), c.paddingTop = parseInt(s.css("padding")), c.paddingRight = parseInt(s.css("padding")), c.paddingBottom = parseInt(s.css("padding")), this.options.nodeDimensionsIncludeLabels && s.isParent()) {
2357
+ var A = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, m = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, R = s.css("text-halign");
2358
+ c.labelWidth = A, c.labelHeight = m, c.labelPos = R;
2359
+ }
2360
+ if (this.idToLNode[s.data("id")] = c, isNaN(c.rect.x) && (c.rect.x = 0), isNaN(c.rect.y) && (c.rect.y = 0), f != null && f.length > 0) {
2361
+ var C;
2362
+ C = E.getGraphManager().add(E.newGraph(), c), this.processChildrenList(C, f, E);
2363
+ }
2364
+ }
2365
+ }, a.prototype.stop = function() {
2366
+ return this.stopped = !0, this;
2367
+ };
2368
+ var v = function(u) {
2369
+ u("layout", "cose-bilkent", a);
2370
+ };
2371
+ typeof cytoscape < "u" && v(cytoscape), I.exports = v;
2372
+ }
2373
+ /******/
2374
+ ])
2375
+ );
2376
+ });
2377
+ })(tt);
2378
+ var ct = tt.exports;
2379
+ const pt = /* @__PURE__ */ lt(ct);
2380
+ J.use(pt);
2381
+ function et(G, b) {
2382
+ G.forEach((N) => {
2383
+ const I = {
2384
+ id: N.id,
2385
+ labelText: N.label,
2386
+ height: N.height,
2387
+ width: N.width,
2388
+ padding: N.padding ?? 0
14
2389
  };
15
- Object.keys(e).forEach((i) => {
16
- ["id", "label", "height", "width", "padding", "x", "y"].includes(i) || (n[i] = e[i]);
17
- }), o.add({
2390
+ Object.keys(N).forEach((T) => {
2391
+ ["id", "label", "height", "width", "padding", "x", "y"].includes(T) || (I[T] = N[T]);
2392
+ }), b.add({
18
2393
  group: "nodes",
19
- data: n,
2394
+ data: I,
20
2395
  position: {
21
- x: e.x ?? 0,
22
- y: e.y ?? 0
2396
+ x: N.x ?? 0,
2397
+ y: N.y ?? 0
23
2398
  }
24
2399
  });
25
2400
  });
26
2401
  }
27
- l(D, "addNodes");
28
- function I(t, o) {
29
- t.forEach((e) => {
30
- const n = {
31
- id: e.id,
32
- source: e.start,
33
- target: e.end
2402
+ V(et, "addNodes");
2403
+ function rt(G, b) {
2404
+ G.forEach((N) => {
2405
+ const I = {
2406
+ id: N.id,
2407
+ source: N.start,
2408
+ target: N.end
34
2409
  };
35
- Object.keys(e).forEach((i) => {
36
- ["id", "start", "end"].includes(i) || (n[i] = e[i]);
37
- }), o.add({
2410
+ Object.keys(N).forEach((T) => {
2411
+ ["id", "start", "end"].includes(T) || (I[T] = N[T]);
2412
+ }), b.add({
38
2413
  group: "edges",
39
- data: n
2414
+ data: I
40
2415
  });
41
2416
  });
42
2417
  }
43
- l(I, "addEdges");
44
- function $(t) {
45
- return new Promise((o) => {
46
- const e = q("body").append("div").attr("id", "cy").attr("style", "display:none"), n = P({
2418
+ V(rt, "addEdges");
2419
+ function it(G) {
2420
+ return new Promise((b) => {
2421
+ const N = gt("body").append("div").attr("id", "cy").attr("style", "display:none"), I = J({
47
2422
  container: document.getElementById("cy"),
48
2423
  // container to render in
49
2424
  style: [
@@ -55,177 +2430,177 @@ function $(t) {
55
2430
  }
56
2431
  ]
57
2432
  });
58
- e.remove(), D(t.nodes, n), I(t.edges, n), n.nodes().forEach(function(a) {
59
- a.layoutDimensions = () => {
60
- const m = a.data();
61
- return { w: m.width, h: m.height };
2433
+ N.remove(), et(G.nodes, I), rt(G.edges, I), I.nodes().forEach(function(o) {
2434
+ o.layoutDimensions = () => {
2435
+ const e = o.data();
2436
+ return { w: e.width, h: e.height };
62
2437
  };
63
2438
  });
64
- const i = {
2439
+ const T = {
65
2440
  name: "cose-bilkent",
66
2441
  // @ts-ignore Types for cose-bilkent are not correct?
67
2442
  quality: "proof",
68
2443
  styleEnabled: !1,
69
2444
  animate: !1
70
2445
  };
71
- n.layout(i).run(), n.ready((a) => {
72
- y.info("Cytoscape ready", a), o(n);
2446
+ I.layout(T).run(), I.ready((o) => {
2447
+ k.info("Cytoscape ready", o), b(I);
73
2448
  });
74
2449
  });
75
2450
  }
76
- l($, "createCytoscapeInstance");
77
- function X(t) {
78
- return t.nodes().map((o) => {
79
- const e = o.data(), n = o.position(), i = {
80
- id: e.id,
81
- x: n.x,
82
- y: n.y
2451
+ V(it, "createCytoscapeInstance");
2452
+ function nt(G) {
2453
+ return G.nodes().map((b) => {
2454
+ const N = b.data(), I = b.position(), T = {
2455
+ id: N.id,
2456
+ x: I.x,
2457
+ y: I.y
83
2458
  };
84
- return Object.keys(e).forEach((a) => {
85
- a !== "id" && (i[a] = e[a]);
86
- }), i;
2459
+ return Object.keys(N).forEach((o) => {
2460
+ o !== "id" && (T[o] = N[o]);
2461
+ }), T;
87
2462
  });
88
2463
  }
89
- l(X, "extractPositionedNodes");
90
- function Y(t) {
91
- return t.edges().map((o) => {
92
- const e = o.data(), n = o._private.rscratch, i = {
93
- id: e.id,
94
- source: e.source,
95
- target: e.target,
96
- startX: n.startX,
97
- startY: n.startY,
98
- midX: n.midX,
99
- midY: n.midY,
100
- endX: n.endX,
101
- endY: n.endY
2464
+ V(nt, "extractPositionedNodes");
2465
+ function ot(G) {
2466
+ return G.edges().map((b) => {
2467
+ const N = b.data(), I = b._private.rscratch, T = {
2468
+ id: N.id,
2469
+ source: N.source,
2470
+ target: N.target,
2471
+ startX: I.startX,
2472
+ startY: I.startY,
2473
+ midX: I.midX,
2474
+ midY: I.midY,
2475
+ endX: I.endX,
2476
+ endY: I.endY
102
2477
  };
103
- return Object.keys(e).forEach((a) => {
104
- ["id", "source", "target"].includes(a) || (i[a] = e[a]);
105
- }), i;
2478
+ return Object.keys(N).forEach((o) => {
2479
+ ["id", "source", "target"].includes(o) || (T[o] = N[o]);
2480
+ }), T;
106
2481
  });
107
2482
  }
108
- l(Y, "extractPositionedEdges");
109
- async function v(t, o) {
110
- y.debug("Starting cose-bilkent layout algorithm");
2483
+ V(ot, "extractPositionedEdges");
2484
+ async function st(G, b) {
2485
+ k.debug("Starting cose-bilkent layout algorithm");
111
2486
  try {
112
- B(t);
113
- const e = await $(t), n = X(e), i = Y(e);
114
- return y.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`), {
115
- nodes: n,
116
- edges: i
2487
+ at(G);
2488
+ const N = await it(G), I = nt(N), T = ot(N);
2489
+ return k.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`), {
2490
+ nodes: I,
2491
+ edges: T
117
2492
  };
118
- } catch (e) {
119
- throw y.error("Error in cose-bilkent layout algorithm:", e), e;
2493
+ } catch (N) {
2494
+ throw k.error("Error in cose-bilkent layout algorithm:", N), N;
120
2495
  }
121
2496
  }
122
- l(v, "executeCoseBilkentLayout");
123
- function B(t) {
124
- if (!t)
2497
+ V(st, "executeCoseBilkentLayout");
2498
+ function at(G) {
2499
+ if (!G)
125
2500
  throw new Error("Layout data is required");
126
- if (!t.config)
2501
+ if (!G.config)
127
2502
  throw new Error("Configuration is required in layout data");
128
- if (!t.rootNode)
2503
+ if (!G.rootNode)
129
2504
  throw new Error("Root node is required");
130
- if (!t.nodes || !Array.isArray(t.nodes))
2505
+ if (!G.nodes || !Array.isArray(G.nodes))
131
2506
  throw new Error("No nodes found in layout data");
132
- if (!Array.isArray(t.edges))
2507
+ if (!Array.isArray(G.edges))
133
2508
  throw new Error("Edges array is required in layout data");
134
2509
  return !0;
135
2510
  }
136
- l(B, "validateLayoutData");
137
- var O = /* @__PURE__ */ l(async (t, o, {
138
- insertCluster: e,
139
- insertEdge: n,
140
- insertEdgeLabel: i,
141
- insertMarkers: a,
142
- insertNode: m,
143
- log: c,
144
- positionEdgeLabel: x
145
- }, { algorithm: j }) => {
146
- const u = {}, p = {}, f = o.select("g");
147
- a(f, t.markers, t.type, t.diagramId);
148
- const C = f.insert("g").attr("class", "subgraphs"), E = f.insert("g").attr("class", "edgePaths"), A = f.insert("g").attr("class", "edgeLabels"), N = f.insert("g").attr("class", "nodes");
149
- c.debug("Inserting nodes into DOM for dimension calculation"), await Promise.all(
150
- t.nodes.map(async (s) => {
151
- if (s.isGroup) {
152
- const r = { ...s };
153
- p[s.id] = r, u[s.id] = r, await e(C, s);
2511
+ V(at, "validateLayoutData");
2512
+ var dt = /* @__PURE__ */ V(async (G, b, {
2513
+ insertCluster: N,
2514
+ insertEdge: I,
2515
+ insertEdgeLabel: T,
2516
+ insertMarkers: o,
2517
+ insertNode: e,
2518
+ log: t,
2519
+ positionEdgeLabel: i
2520
+ }, { algorithm: l }) => {
2521
+ const g = {}, n = {}, d = b.select("g");
2522
+ o(d, G.markers, G.type, G.diagramId);
2523
+ const r = d.insert("g").attr("class", "subgraphs"), h = d.insert("g").attr("class", "edgePaths"), a = d.insert("g").attr("class", "edgeLabels"), p = d.insert("g").attr("class", "nodes");
2524
+ t.debug("Inserting nodes into DOM for dimension calculation"), await Promise.all(
2525
+ G.nodes.map(async (u) => {
2526
+ if (u.isGroup) {
2527
+ const E = { ...u };
2528
+ n[u.id] = E, g[u.id] = E, await N(r, u);
154
2529
  } else {
155
- const r = { ...s };
156
- u[s.id] = r;
157
- const d = await m(N, s, {
158
- config: t.config,
159
- dir: t.direction || "TB"
160
- }), g = d.node().getBBox();
161
- r.width = g.width, r.height = g.height, r.domId = d, c.debug(`Node ${s.id} dimensions: ${g.width}x${g.height}`);
2530
+ const E = { ...u };
2531
+ g[u.id] = E;
2532
+ const y = await e(p, u, {
2533
+ config: G.config,
2534
+ dir: G.direction || "TB"
2535
+ }), O = y.node().getBBox();
2536
+ E.width = O.width, E.height = O.height, E.domId = y, t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`);
162
2537
  }
163
2538
  })
164
- ), c.debug("Running cose-bilkent layout algorithm");
165
- const _ = {
166
- ...t,
167
- nodes: t.nodes.map((s) => {
168
- const r = u[s.id];
2539
+ ), t.debug("Running cose-bilkent layout algorithm");
2540
+ const v = {
2541
+ ...G,
2542
+ nodes: G.nodes.map((u) => {
2543
+ const E = g[u.id];
169
2544
  return {
170
- ...s,
171
- width: r.width,
172
- height: r.height
2545
+ ...u,
2546
+ width: E.width,
2547
+ height: E.height
173
2548
  };
174
2549
  })
175
- }, b = await v(_, t.config);
176
- c.debug("Positioning nodes based on layout results"), b.nodes.forEach((s) => {
177
- const r = u[s.id];
178
- r != null && r.domId && (r.domId.attr(
2550
+ }, D = await st(v, G.config);
2551
+ t.debug("Positioning nodes based on layout results"), D.nodes.forEach((u) => {
2552
+ const E = g[u.id];
2553
+ E != null && E.domId && (E.domId.attr(
179
2554
  "transform",
180
- `translate(${s.x}, ${s.y})`
181
- ), r.x = s.x, r.y = s.y, c.debug(`Positioned node ${r.id} at center (${s.x}, ${s.y})`));
182
- }), b.edges.forEach((s) => {
183
- const r = t.edges.find((d) => d.id === s.id);
184
- r && (r.points = [
185
- { x: s.startX, y: s.startY },
186
- { x: s.midX, y: s.midY },
187
- { x: s.endX, y: s.endY }
2555
+ `translate(${u.x}, ${u.y})`
2556
+ ), E.x = u.x, E.y = u.y, t.debug(`Positioned node ${E.id} at center (${u.x}, ${u.y})`));
2557
+ }), D.edges.forEach((u) => {
2558
+ const E = G.edges.find((y) => y.id === u.id);
2559
+ E && (E.points = [
2560
+ { x: u.startX, y: u.startY },
2561
+ { x: u.midX, y: u.midY },
2562
+ { x: u.endX, y: u.endY }
188
2563
  ]);
189
- }), c.debug("Inserting and positioning edges"), await Promise.all(
190
- t.edges.map(async (s) => {
191
- await i(A, s);
192
- const r = u[s.start ?? ""], d = u[s.end ?? ""];
193
- if (r && d) {
194
- const g = b.edges.find((h) => h.id === s.id);
195
- if (g) {
196
- c.debug("APA01 positionedEdge", g);
197
- const h = { ...s }, w = n(
198
- E,
2564
+ }), t.debug("Inserting and positioning edges"), await Promise.all(
2565
+ G.edges.map(async (u) => {
2566
+ await T(a, u);
2567
+ const E = g[u.start ?? ""], y = g[u.end ?? ""];
2568
+ if (E && y) {
2569
+ const O = D.edges.find((s) => s.id === u.id);
2570
+ if (O) {
2571
+ t.debug("APA01 positionedEdge", O);
2572
+ const s = { ...u }, f = I(
199
2573
  h,
200
- p,
201
- t.type,
202
- r,
203
- d,
204
- t.diagramId
2574
+ s,
2575
+ n,
2576
+ G.type,
2577
+ E,
2578
+ y,
2579
+ G.diagramId
205
2580
  );
206
- x(h, w);
2581
+ i(s, f);
207
2582
  } else {
208
- const h = {
209
- ...s,
2583
+ const s = {
2584
+ ...u,
210
2585
  points: [
211
- { x: r.x || 0, y: r.y || 0 },
212
- { x: d.x || 0, y: d.y || 0 }
2586
+ { x: E.x || 0, y: E.y || 0 },
2587
+ { x: y.x || 0, y: y.y || 0 }
213
2588
  ]
214
- }, w = n(
215
- E,
2589
+ }, f = I(
216
2590
  h,
217
- p,
218
- t.type,
219
- r,
220
- d,
221
- t.diagramId
2591
+ s,
2592
+ n,
2593
+ G.type,
2594
+ E,
2595
+ y,
2596
+ G.diagramId
222
2597
  );
223
- x(h, w);
2598
+ i(s, f);
224
2599
  }
225
2600
  }
226
2601
  })
227
- ), c.debug("Cose-bilkent rendering completed");
228
- }, "render"), z = O;
2602
+ ), t.debug("Cose-bilkent rendering completed");
2603
+ }, "render"), Lt = dt;
229
2604
  export {
230
- z as render
2605
+ Lt as render
231
2606
  };