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