@foris/ai-agent 0.1.1 → 0.3.0

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