@jackuait/blok 0.10.0-beta.6 → 0.10.0-beta.8

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 (448) hide show
  1. package/codemod/migrate-editorjs-to-blok.js +0 -2
  2. package/codemod/test.js +0 -6
  3. package/dist/blok.mjs +2 -2
  4. package/dist/chunks/_basePickBy-DISiGhsr.mjs +410 -0
  5. package/dist/chunks/_baseUniq-gAuHRtRF.mjs +1045 -0
  6. package/dist/chunks/_getTag-Aj56Wgor.mjs +26 -0
  7. package/dist/chunks/arc-D-pL2Ftf.mjs +80 -0
  8. package/dist/chunks/architecture-YZFGNWBL-CuqTb_ae.mjs +3 -0
  9. package/dist/chunks/architectureDiagram-Q4EWVU46-DS7mqjL2.mjs +4066 -0
  10. package/dist/chunks/array-BsrkCVSZ.mjs +6 -0
  11. package/dist/chunks/blockDiagram-DXYQGD6D-BTtcn4NG.mjs +3259 -0
  12. package/dist/chunks/{blok-BdlR_lX6.mjs → blok-CRvF-xVm.mjs} +2142 -2171
  13. package/dist/chunks/c-C6JXJf5K.mjs +5 -0
  14. package/dist/chunks/c4Diagram-AHTNJAMY-Y4Dcwcoo.mjs +2956 -0
  15. package/dist/chunks/ccount-C9Y7nqDe.mjs +10 -0
  16. package/dist/chunks/channel-Cln-eWE0.mjs +5 -0
  17. package/dist/chunks/chunk-2KRD3SAO-DkM7qh-k.mjs +20 -0
  18. package/dist/chunks/chunk-336JU56O-B17AtzlK.mjs +49 -0
  19. package/dist/chunks/chunk-426QAEUC-D6UAVUog.mjs +13 -0
  20. package/dist/chunks/chunk-4BX2VUAB-CgIkjF7Z.mjs +19 -0
  21. package/dist/chunks/chunk-4TB4RGXK-BUP4eON3.mjs +3250 -0
  22. package/dist/chunks/chunk-55IACEB6-zZ-IgaSt.mjs +8 -0
  23. package/dist/chunks/chunk-5FUZZQ4R-DsZnJYxM.mjs +3786 -0
  24. package/dist/chunks/chunk-5PVQY5BW-CORl9dnu.mjs +1692 -0
  25. package/dist/chunks/chunk-67CJDMHE-m0UKdcSH.mjs +20 -0
  26. package/dist/chunks/chunk-7N4EOEYR-DKNajFZd.mjs +29 -0
  27. package/dist/chunks/chunk-AA7GKIK3-BeLhNzKa.mjs +24 -0
  28. package/dist/chunks/chunk-BSJP7CBP-CJExmx8a.mjs +83 -0
  29. package/dist/chunks/chunk-CIAEETIT-CTikoJ19.mjs +20 -0
  30. package/dist/chunks/{chunk-Byubey_H.mjs → chunk-D6kmoKXy.mjs} +5 -5
  31. package/dist/chunks/chunk-EDXVE4YY-DjInnnwb.mjs +26 -0
  32. package/dist/chunks/chunk-ENJZ2VHE-CIl5FRDA.mjs +566 -0
  33. package/dist/chunks/chunk-FMBD7UC4-DjV0W7UE.mjs +5 -0
  34. package/dist/chunks/chunk-FOC6F5B3-LmHCCWYY.mjs +20 -0
  35. package/dist/chunks/chunk-ICPOFSXX-BHZIN46A.mjs +3290 -0
  36. package/dist/chunks/chunk-K5T4RW27-BPZ6fFnW.mjs +16370 -0
  37. package/dist/chunks/chunk-KGLVRYIC-S1OQdW76.mjs +20 -0
  38. package/dist/chunks/chunk-LIHQZDEY-CjtyJlI6.mjs +55 -0
  39. package/dist/chunks/chunk-ORNJ4GCN-CdO0hAge.mjs +25 -0
  40. package/dist/chunks/chunk-OYMX7WX6-ApX8eV4o.mjs +2038 -0
  41. package/dist/chunks/chunk-QZHKN3VN-BGFuA6-k.mjs +12 -0
  42. package/dist/chunks/chunk-U2HBQHQK-B88ZUOTL.mjs +1875 -0
  43. package/dist/chunks/chunk-X2U36JSP-1VS5TyCr.mjs +68 -0
  44. package/dist/chunks/chunk-XPW4576I-BMupdrvo.mjs +1146 -0
  45. package/dist/chunks/chunk-YZCP3GAM-BQ7eEsm2.mjs +60 -0
  46. package/dist/chunks/chunk-ZZ45TVLE-D1xks9zd.mjs +33 -0
  47. package/dist/chunks/classDiagram-6PBFFD2Q-C59BZJxp.mjs +30 -0
  48. package/dist/chunks/classDiagram-v2-HSJHXN6E-7a0qeMsE.mjs +30 -0
  49. package/dist/chunks/clone-Ckjt1LtE.mjs +8 -0
  50. package/dist/chunks/{constants-Cp8O0UfP.mjs → constants-BOZ5plBi.mjs} +49 -50
  51. package/dist/chunks/core-Bm6DWt7D.mjs +4501 -0
  52. package/dist/chunks/cose-bilkent-S5V4N54A-Bpcs2jA_.mjs +2246 -0
  53. package/dist/chunks/cpp-BdjvAny0.mjs +16 -0
  54. package/dist/chunks/csharp-YHxeHpeH.mjs +3 -0
  55. package/dist/chunks/css-DdLevFaX.mjs +3 -0
  56. package/dist/chunks/cytoscape.esm-BvD8wo00.mjs +18108 -0
  57. package/dist/chunks/dagre-CGNbYTKq.mjs +1536 -0
  58. package/dist/chunks/dagre-KV5264BT-DUD9ikgN.mjs +298 -0
  59. package/dist/chunks/dart-DrPWqfcC.mjs +3 -0
  60. package/dist/chunks/defaultLocale-ChuSeAxU.mjs +201 -0
  61. package/dist/chunks/diagram-5BDNPKRD-CZGfTYEe.mjs +112 -0
  62. package/dist/chunks/diagram-G4DWMVQ6-CuS0-h95.mjs +546 -0
  63. package/dist/chunks/diagram-MMDJMWI5-C-AEApYz.mjs +234 -0
  64. package/dist/chunks/diagram-TYMM5635-CiwAJVMq.mjs +144 -0
  65. package/dist/chunks/dist-Ctq-pyfb.mjs +59 -0
  66. package/dist/chunks/dockerfile-C68ALcaN.mjs +3 -0
  67. package/dist/chunks/engine-javascript-CJpnSvzf.mjs +2373 -0
  68. package/dist/chunks/erDiagram-SMLLAGMA-DeH5yck2.mjs +1712 -0
  69. package/dist/chunks/flowDiagram-DWJPFMVM-Cr6dwmQ5.mjs +4175 -0
  70. package/dist/chunks/ganttDiagram-T4ZO3ILL-K-divBg_.mjs +3083 -0
  71. package/dist/chunks/gitGraph-7Q5UKJZL-Dl-vQzrq.mjs +3 -0
  72. package/dist/chunks/gitGraphDiagram-UUTBAWPF-UytPZv72.mjs +792 -0
  73. package/dist/chunks/go-Fm5N96DN.mjs +3 -0
  74. package/dist/chunks/graphlib-Cye9EPNq.mjs +223 -0
  75. package/dist/chunks/graphql-BSnqmqgO.mjs +11 -0
  76. package/dist/chunks/html-BLNeZvnp.mjs +10 -0
  77. package/dist/chunks/{i18next-loader-oDO9ZKUV.mjs → i18next-loader-CwsYu0n6.mjs} +2 -2
  78. package/dist/chunks/info-OMHHGYJF-BOejJvJR.mjs +3 -0
  79. package/dist/chunks/infoDiagram-42DDH7IO-DuYnDbF3.mjs +29 -0
  80. package/dist/chunks/init-C6T-mugb.mjs +15 -0
  81. package/dist/chunks/ishikawaDiagram-UXIWVN3A-CHc59dLn.mjs +719 -0
  82. package/dist/chunks/java-83DWBpzu.mjs +5 -0
  83. package/dist/chunks/javascript-CBgeF1Xx.mjs +3 -0
  84. package/dist/chunks/journeyDiagram-VCZTEJTY-CD25C4_n.mjs +885 -0
  85. package/dist/chunks/json-BI17y-1H.mjs +3 -0
  86. package/dist/chunks/kanban-definition-6JOO6SKY-CTCT6N_p.mjs +980 -0
  87. package/dist/chunks/{katex-NjLaA6AJ.mjs → katex-CmTPfM0f.mjs} +1 -1
  88. package/dist/chunks/kotlin-DjnvsrfO.mjs +3 -0
  89. package/dist/chunks/latex-24n3TcOR.mjs +5 -0
  90. package/dist/chunks/{lightweight-i18n-DTySD6f6.mjs → lightweight-i18n-Cvv8CWh4.mjs} +13 -0
  91. package/dist/chunks/line-Dct5pMmw.mjs +34 -0
  92. package/dist/chunks/linear-BRCpMvtr.mjs +289 -0
  93. package/dist/chunks/lua-DV0fuZWx.mjs +5 -0
  94. package/dist/chunks/markdown-BqQYT45f.mjs +3 -0
  95. package/dist/chunks/{mdast-util-math-yS0EygZV.mjs → mdast-util-math-BlK2Zu-1.mjs} +1 -1
  96. package/dist/chunks/mermaid-parser.core-CA3DKkuk.mjs +57 -0
  97. package/dist/chunks/mermaid-vF0cEnZ0.mjs +3 -0
  98. package/dist/chunks/mermaid.core-CA8nc1sZ.mjs +989 -0
  99. package/dist/{messages-BYQ769S5.mjs → chunks/messages-8IHf7ZP3.mjs} +26 -1
  100. package/dist/chunks/{messages-DRv4g-IA.mjs → messages-A_MkXDlG.mjs} +26 -1
  101. package/dist/chunks/{messages-vN4T4r67.mjs → messages-B0vPBsWq.mjs} +26 -1
  102. package/dist/chunks/{messages-BDXl53cy2.mjs → messages-B2N4fUi72.mjs} +26 -1
  103. package/dist/chunks/{messages-DopbvJlg.mjs → messages-B4UMuyjT.mjs} +31 -6
  104. package/dist/{messages-uCsQjz7M.mjs → chunks/messages-B9kmbUWV.mjs} +26 -1
  105. package/dist/{messages-JK9Okzsy2.mjs → chunks/messages-BA8Iv99Y2.mjs} +26 -1
  106. package/dist/chunks/{messages-yszqJukE.mjs → messages-BAsb5CgZ.mjs} +26 -1
  107. package/dist/{messages-CEEzfqMO2.mjs → chunks/messages-BDZA10kl2.mjs} +29 -4
  108. package/dist/{messages-BeI2HORe2.mjs → chunks/messages-BE6lHKwf.mjs} +26 -1
  109. package/dist/{messages--cUQf9JX.mjs → chunks/messages-BQYvBqm2.mjs} +27 -2
  110. package/dist/{messages-CsiGzUSP2.mjs → chunks/messages-BSghd0ez.mjs} +26 -1
  111. package/dist/chunks/{messages-BXn9Vzbx2.mjs → messages-BUVhHx0q2.mjs} +26 -1
  112. package/dist/chunks/{messages-5ArOv8cj.mjs → messages-BVjoM7P0.mjs} +26 -1
  113. package/dist/chunks/{messages-CvlMT1e62.mjs → messages-BXM80fdr2.mjs} +26 -1
  114. package/dist/chunks/{messages-BlcRm2I3.mjs → messages-BYlSMRkd.mjs} +26 -1
  115. package/dist/chunks/{messages-bmwto4UV.mjs → messages-BYxLFj7y.mjs} +26 -1
  116. package/dist/chunks/{messages-SSDr5fGF2.mjs → messages-BeFqtIrc2.mjs} +26 -1
  117. package/dist/{messages-CD8K1g_t2.mjs → chunks/messages-Bfnq1xv4.mjs} +26 -1
  118. package/dist/chunks/{messages-B5fKJXd6.mjs → messages-BhzzNkN-.mjs} +26 -1
  119. package/dist/{messages-Dq_v7slw2.mjs → chunks/messages-BjadX8jR2.mjs} +26 -1
  120. package/dist/{messages-x353UCBI.mjs → chunks/messages-Bp8qin1R.mjs} +26 -1
  121. package/dist/{messages-hrSlVSHp.mjs → chunks/messages-Bphq_Bt3.mjs} +33 -8
  122. package/dist/chunks/{messages-CF_PfacZ.mjs → messages-Bxvi1ebN.mjs} +26 -1
  123. package/dist/chunks/{messages-DdmWzF5M.mjs → messages-C0HvoMPb.mjs} +27 -2
  124. package/dist/chunks/{messages-C5aCWL7B.mjs → messages-C3aX3q0H.mjs} +26 -1
  125. package/dist/{messages-DbZsJAff.mjs → chunks/messages-C6Mpiacw.mjs} +26 -1
  126. package/dist/{messages-PvMdmlxI.mjs → chunks/messages-C7VGpihw.mjs} +28 -3
  127. package/dist/chunks/{messages-DGD6BiGd.mjs → messages-CKBhDGI3.mjs} +28 -3
  128. package/dist/chunks/{messages-BaoJwsEZ.mjs → messages-COO5xmcA.mjs} +26 -1
  129. package/dist/chunks/{messages-Dz3UhEco2.mjs → messages-CSJ_zb3a2.mjs} +26 -1
  130. package/dist/chunks/{messages-CjVPwkVy.mjs → messages-CSL-6xfb2.mjs} +26 -1
  131. package/dist/{messages-B4lhNMKm2.mjs → chunks/messages-CVdpweyf2.mjs} +28 -3
  132. package/dist/chunks/{messages-DQ5ng0_t2.mjs → messages-Cdf0W9H02.mjs} +26 -1
  133. package/dist/{messages-Bug6Du35.mjs → chunks/messages-Ck81cQkn2.mjs} +26 -1
  134. package/dist/chunks/{messages-DUGEqDEG.mjs → messages-Cmf6NhSC.mjs} +26 -1
  135. package/dist/chunks/{messages-BMq9k_lI.mjs → messages-Cs81Z_Bh.mjs} +26 -1
  136. package/dist/{messages-B3Yhiycb2.mjs → chunks/messages-Cu-Wevxs2.mjs} +27 -2
  137. package/dist/{messages-DIKCwGog.mjs → chunks/messages-D3zojZ94.mjs} +30 -5
  138. package/dist/{messages-Bdk4ocMI.mjs → chunks/messages-D55HRx5O2.mjs} +26 -1
  139. package/dist/{messages-CvvbLyTy2.mjs → chunks/messages-D9N2MvQx2.mjs} +26 -1
  140. package/dist/{messages-C5Uufygq.mjs → chunks/messages-DG-4DPmP.mjs} +26 -1
  141. package/dist/{messages-C8f1I5EQ2.mjs → chunks/messages-DGL1ySqb2.mjs} +27 -2
  142. package/dist/chunks/{messages-D8-N0FmU.mjs → messages-DJoNVjqP.mjs} +27 -2
  143. package/dist/chunks/{messages-CcyIKgGU.mjs → messages-DMVXnAYj.mjs} +30 -5
  144. package/dist/chunks/{messages-CZ5Sbf8U.mjs → messages-DOuS1Qge.mjs} +26 -1
  145. package/dist/chunks/{messages-BXSXk3oS2.mjs → messages-DWu1r4gc2.mjs} +28 -3
  146. package/dist/{messages-KqWQKmIu2.mjs → chunks/messages-DlLXpgWM2.mjs} +27 -2
  147. package/dist/{messages-DQN1y6E9.mjs → chunks/messages-DlonA3wa.mjs} +28 -3
  148. package/dist/chunks/{messages-DVKifYlq.mjs → messages-Dr0Ekmbz.mjs} +49 -24
  149. package/dist/{messages-DACg1XAu.mjs → chunks/messages-DzTk8bJ5.mjs} +26 -1
  150. package/dist/{messages-BOE2mzCj2.mjs → chunks/messages-FWfsxpBz.mjs} +26 -1
  151. package/dist/{messages-CBPiFbEf2.mjs → chunks/messages-G416eyjY.mjs} +26 -1
  152. package/dist/chunks/{messages-DZwCufSb.mjs → messages-Je5YvxiY.mjs} +26 -1
  153. package/dist/chunks/{messages-DN-194c32.mjs → messages-JyvWu4rf2.mjs} +26 -1
  154. package/dist/chunks/{messages-CqgEz7C5.mjs → messages-KdawW5Na.mjs} +26 -1
  155. package/dist/{messages-X80Nh0ib.mjs → chunks/messages-MxpWO1db.mjs} +27 -2
  156. package/dist/chunks/{messages-CnQydQJd2.mjs → messages-NEqrrYvE2.mjs} +26 -1
  157. package/dist/{messages-DkvQ-6HC2.mjs → chunks/messages-RInp1ytX.mjs} +28 -3
  158. package/dist/chunks/{messages-DSO2U-ul.mjs → messages-TRUuyiFB.mjs} +26 -1
  159. package/dist/chunks/{messages-BhcYsC_M2.mjs → messages-aZcy0JQq2.mjs} +26 -1
  160. package/dist/chunks/{messages-ByAqzAhB.mjs → messages-iS34FHFB.mjs} +26 -1
  161. package/dist/{messages-12_eyAo-.mjs → chunks/messages-ihCjSFJI2.mjs} +26 -1
  162. package/dist/{messages-mipkPgwQ2.mjs → chunks/messages-jfVpL9c-2.mjs} +26 -1
  163. package/dist/{messages-Cb3wXGnc.mjs → chunks/messages-p1mbe__S.mjs} +27 -2
  164. package/dist/chunks/{messages-Dgng6KN8.mjs → messages-rCd0Rrw6.mjs} +28 -3
  165. package/dist/{messages-Dj79y02X.mjs → chunks/messages-xuqyb6Ff2.mjs} +26 -1
  166. package/dist/chunks/{micromark-extension-math-CCEGWpdz.mjs → micromark-extension-math-BbkUb36G.mjs} +2 -2
  167. package/dist/chunks/mindmap-definition-QFDTVHPH-hNnyBkEP.mjs +1013 -0
  168. package/dist/chunks/objectWithoutProperties-D0XxKB4n.mjs +23 -0
  169. package/dist/chunks/one-light-DmNO_Y4X.mjs +4 -0
  170. package/dist/chunks/ordinal-B-kolV-i.mjs +65 -0
  171. package/dist/chunks/packet-4T2RLAQJ-B5ZMgwzZ.mjs +3 -0
  172. package/dist/chunks/path-rIMjg_tH.mjs +85 -0
  173. package/dist/chunks/php-DmXKyPwJ.mjs +18 -0
  174. package/dist/chunks/pie-ZZUOXDRM-B9l6y0XJ.mjs +3 -0
  175. package/dist/chunks/pieDiagram-DEJITSTG-Gw-fsc6U.mjs +179 -0
  176. package/dist/chunks/python-DfwfY9t5.mjs +3 -0
  177. package/dist/chunks/quadrantDiagram-34T5L4WZ-CQ5fGYI5.mjs +1960 -0
  178. package/dist/chunks/r-BD2D7qEW.mjs +5 -0
  179. package/dist/chunks/radar-PYXPWWZC-D5kYmUaB.mjs +3 -0
  180. package/dist/chunks/requirementDiagram-MS252O5E-DjWKB42c.mjs +2224 -0
  181. package/dist/chunks/rough.esm-cmMIcj7N.mjs +1353 -0
  182. package/dist/chunks/ruby-DdOo03Kg.mjs +33 -0
  183. package/dist/chunks/rust-DEDueB5R.mjs +3 -0
  184. package/dist/chunks/sankeyDiagram-XADWPNL6-BIN2evSB.mjs +909 -0
  185. package/dist/chunks/scala-CsjqvxE4.mjs +3 -0
  186. package/dist/chunks/sequenceDiagram-FGHM5R23-CQz2lMoS.mjs +4181 -0
  187. package/dist/chunks/shellscript-Bh5zEpnQ.mjs +3 -0
  188. package/dist/chunks/sql-D9CrOi1i.mjs +3 -0
  189. package/dist/chunks/src-DVJl6f6s.mjs +2149 -0
  190. package/dist/chunks/stateDiagram-FHFEXIEX-BIBFsF65.mjs +218 -0
  191. package/dist/chunks/stateDiagram-v2-QKLJ7IA2-BZUmAVw7.mjs +28 -0
  192. package/dist/chunks/swift-Dpyt0s2c.mjs +3 -0
  193. package/dist/chunks/timeline-definition-GMOUNBTQ-CzvQ7Lav.mjs +1084 -0
  194. package/dist/chunks/{tools-DGOsJbHH.mjs → tools-CnqCfv2L.mjs} +2116 -1268
  195. package/dist/chunks/treeView-SZITEDCU-BNtnNxpI.mjs +3 -0
  196. package/dist/chunks/treemap-W4RFUUIX-DYENULz2.mjs +3 -0
  197. package/dist/chunks/typescript-DO5cd4m8.mjs +5 -0
  198. package/dist/chunks/vennDiagram-DHZGUBPP-B0DmLQqe.mjs +1876 -0
  199. package/dist/chunks/vitesse-dark-CcorSKT2.mjs +4 -0
  200. package/dist/chunks/wardley-RL74JXVD-ByNHVBTb.mjs +3 -0
  201. package/dist/chunks/wardleyDiagram-NUSXRM2D-CzoKesUw.mjs +594 -0
  202. package/dist/chunks/xml-g8kXXALs.mjs +5 -0
  203. package/dist/chunks/xychartDiagram-5P7HB3ND-CixwR8r2.mjs +2017 -0
  204. package/dist/chunks/yaml-CrNNZyLb.mjs +3 -0
  205. package/dist/cli.mjs +1 -1
  206. package/dist/full.mjs +3 -3
  207. package/dist/locales.mjs +80 -67
  208. package/dist/markdown.mjs +385 -393
  209. package/dist/{chunks/messages-9l49jauY.mjs → messages-5jvKxQNu2.mjs} +26 -1
  210. package/dist/{messages-CkySRhtd2.mjs → messages-7QD-X6XT2.mjs} +26 -1
  211. package/dist/{chunks/messages-Btr121zI2.mjs → messages-96iaAUds2.mjs} +27 -2
  212. package/dist/{chunks/messages-BAP2OAQk.mjs → messages-B19o-Teb.mjs} +28 -3
  213. package/dist/{messages-DJU4YLij.mjs → messages-B1ZUQagA.mjs} +26 -1
  214. package/dist/{messages-Dg2CDXZi2.mjs → messages-B7ieAJBd2.mjs} +26 -1
  215. package/dist/{messages-CByBLxWk.mjs → messages-BECMxmfX.mjs} +26 -1
  216. package/dist/{messages-CwCEcbWG.mjs → messages-BIHc0KHY.mjs} +27 -2
  217. package/dist/{messages-D8WvwU42.mjs → messages-BIoeoik5.mjs} +26 -1
  218. package/dist/{messages-D38h5XlF.mjs → messages-BJeGJksD.mjs} +26 -1
  219. package/dist/{messages-Cd23UgLV2.mjs → messages-BRZX964b2.mjs} +27 -2
  220. package/dist/{chunks/messages-B9N__q552.mjs → messages-BTQPpoM42.mjs} +29 -4
  221. package/dist/{messages-CUzBNjnc.mjs → messages-BYNcD6uR.mjs} +26 -1
  222. package/dist/{messages-DjWfVYHS2.mjs → messages-BYmmMDrN2.mjs} +26 -1
  223. package/dist/{chunks/messages-DkTxBa1V.mjs → messages-BbYq1pk-.mjs} +26 -1
  224. package/dist/{chunks/messages-BHhbHLoq.mjs → messages-BiUGXvYr2.mjs} +26 -1
  225. package/dist/{messages-So3SHdIc2.mjs → messages-BiiongNz2.mjs} +26 -1
  226. package/dist/{chunks/messages-BxBID_0B.mjs → messages-Bm0Feca1.mjs} +30 -5
  227. package/dist/{messages-C2veeQpU.mjs → messages-BmAn22OX.mjs} +26 -1
  228. package/dist/{messages-KbYSpNrE.mjs → messages-Bq3F2Tp_.mjs} +26 -1
  229. package/dist/{chunks/messages-Dux1S0-D2.mjs → messages-BsycN_JI2.mjs} +26 -1
  230. package/dist/{messages-DRU_IgoW.mjs → messages-BwHs4cm1.mjs} +30 -5
  231. package/dist/{messages-Cv-DKlZd.mjs → messages-CJTy6JZt.mjs} +26 -1
  232. package/dist/{chunks/messages-D7n_wJK7.mjs → messages-CR_L_UtK.mjs} +26 -1
  233. package/dist/{messages-DnhEzmXJ2.mjs → messages-CSUHBs4c2.mjs} +26 -1
  234. package/dist/{messages-C_HmWyXc2.mjs → messages-CWIXvnDf2.mjs} +26 -1
  235. package/dist/{messages-KSxF8eib.mjs → messages-CcF4y-E4.mjs} +26 -1
  236. package/dist/{chunks/messages-CL3mCbi6.mjs → messages-Ce6KVEbT.mjs} +27 -2
  237. package/dist/{chunks/messages-C-jA6Rf7.mjs → messages-Ci0KqX-J.mjs} +33 -8
  238. package/dist/{chunks/messages-DMyRdafk2.mjs → messages-CjbnogEC.mjs} +26 -1
  239. package/dist/{chunks/messages-BlO_37l_.mjs → messages-CmB406HW.mjs} +28 -3
  240. package/dist/{messages-Cho2VTAX.mjs → messages-CqXtJTpU.mjs} +26 -1
  241. package/dist/{messages-CWEL1WDy2.mjs → messages-D0aw5_0k2.mjs} +28 -3
  242. package/dist/{messages-CgEDVri-2.mjs → messages-D8FQWulF2.mjs} +26 -1
  243. package/dist/{chunks/messages-B5aAzExz.mjs → messages-DBiVgUs2.mjs} +27 -2
  244. package/dist/{chunks/messages-DYizZHT2.mjs → messages-DIJlIqlQ2.mjs} +26 -1
  245. package/dist/{messages-BPL7riv-.mjs → messages-DLX_iBDJ.mjs} +26 -1
  246. package/dist/{messages-vptt-pVF.mjs → messages-DLlc9QPw.mjs} +26 -1
  247. package/dist/{chunks/messages-876bKyUj2.mjs → messages-DMr62KiO2.mjs} +26 -1
  248. package/dist/{chunks/messages-CgedvWCf.mjs → messages-DPA-mMWC2.mjs} +27 -2
  249. package/dist/{messages-vcoib5Ga.mjs → messages-DTh9a8mR.mjs} +26 -1
  250. package/dist/{chunks/messages-DgEGJECT.mjs → messages-DY4IqlhY.mjs} +26 -1
  251. package/dist/{chunks/messages-CdzF0Hvl.mjs → messages-DYTTu0O12.mjs} +26 -1
  252. package/dist/{messages-rbox5gSb2.mjs → messages-DbySKTKt2.mjs} +28 -3
  253. package/dist/{chunks/messages-BGCQCeWd.mjs → messages-Ddnj2iTG2.mjs} +26 -1
  254. package/dist/{chunks/messages-CNEJxD8q2.mjs → messages-DkLU_rWm.mjs} +26 -1
  255. package/dist/{chunks/messages-FYl9woii2.mjs → messages-Dl3Sv6Rq2.mjs} +27 -2
  256. package/dist/{messages-Clsh86WQ.mjs → messages-Dl5Y2-Ia.mjs} +49 -24
  257. package/dist/{chunks/messages-CKRJDX0K2.mjs → messages-DnG0ef8t2.mjs} +28 -3
  258. package/dist/{chunks/messages-CyxDkx8a.mjs → messages-DnGJD4TL.mjs} +26 -1
  259. package/dist/{chunks/messages-DnJHflSh.mjs → messages-Dnp9N6RU2.mjs} +26 -1
  260. package/dist/{chunks/messages-Jps5Tc77.mjs → messages-Dvn35ksS.mjs} +26 -1
  261. package/dist/{messages-ChTWmxS8.mjs → messages-Dw__BcTj.mjs} +26 -1
  262. package/dist/{messages-D7juvhHp.mjs → messages-Dy-Y_nEI.mjs} +26 -1
  263. package/dist/{messages-CNNcKuGH.mjs → messages-E_ZuzGDt.mjs} +26 -1
  264. package/dist/{chunks/messages-DJO0ERQT.mjs → messages-F2xRoY1w.mjs} +26 -1
  265. package/dist/{messages-DqJTZbwt.mjs → messages-Smt4GBbj.mjs} +31 -6
  266. package/dist/{chunks/messages-D8dKkyII2.mjs → messages-aMXpHt5X2.mjs} +26 -1
  267. package/dist/{chunks/messages-DWD0ry9x.mjs → messages-aWZH50vu2.mjs} +28 -3
  268. package/dist/{chunks/messages-BbfLRqLh2.mjs → messages-dv19AkyJ.mjs} +26 -1
  269. package/dist/{chunks/messages-Dw2rmKMi2.mjs → messages-hWwSRF-2.mjs} +26 -1
  270. package/dist/{messages-En8LDjUB.mjs → messages-j7o5rT9s.mjs} +26 -1
  271. package/dist/{chunks/messages-NJsvFwJj.mjs → messages-nUVjeh7K.mjs} +27 -2
  272. package/dist/{messages-Cg1CF4pw.mjs → messages-nlhESX9t.mjs} +26 -1
  273. package/dist/{messages-CSl0Wla62.mjs → messages-rk-A1Wa42.mjs} +28 -3
  274. package/dist/{messages-nOe1gJYu.mjs → messages-xh2eOLvs.mjs} +26 -1
  275. package/dist/{messages-B_sKqaeK.mjs → messages-ynAe7ewZ.mjs} +26 -1
  276. package/dist/react.mjs +26 -25
  277. package/dist/tools.mjs +2 -2
  278. package/dist/vendor.LICENSE.txt +4065 -316
  279. package/package.json +2 -1
  280. package/src/components/constants/data-attributes.ts +0 -2
  281. package/src/components/i18n/locales/am/messages.json +26 -1
  282. package/src/components/i18n/locales/ar/messages.json +26 -1
  283. package/src/components/i18n/locales/az/messages.json +26 -1
  284. package/src/components/i18n/locales/bg/messages.json +26 -1
  285. package/src/components/i18n/locales/bn/messages.json +26 -1
  286. package/src/components/i18n/locales/bs/messages.json +28 -3
  287. package/src/components/i18n/locales/cs/messages.json +30 -5
  288. package/src/components/i18n/locales/da/messages.json +33 -8
  289. package/src/components/i18n/locales/de/messages.json +31 -6
  290. package/src/components/i18n/locales/dv/messages.json +26 -1
  291. package/src/components/i18n/locales/el/messages.json +26 -1
  292. package/src/components/i18n/locales/en/messages.json +13 -0
  293. package/src/components/i18n/locales/es/messages.json +27 -2
  294. package/src/components/i18n/locales/et/messages.json +30 -5
  295. package/src/components/i18n/locales/fa/messages.json +26 -1
  296. package/src/components/i18n/locales/fi/messages.json +26 -1
  297. package/src/components/i18n/locales/fil/messages.json +49 -24
  298. package/src/components/i18n/locales/fr/messages.json +27 -2
  299. package/src/components/i18n/locales/gu/messages.json +26 -1
  300. package/src/components/i18n/locales/he/messages.json +26 -1
  301. package/src/components/i18n/locales/hi/messages.json +26 -1
  302. package/src/components/i18n/locales/hr/messages.json +28 -3
  303. package/src/components/i18n/locales/hu/messages.json +27 -2
  304. package/src/components/i18n/locales/hy/messages.json +26 -1
  305. package/src/components/i18n/locales/id/messages.json +26 -1
  306. package/src/components/i18n/locales/it/messages.json +27 -2
  307. package/src/components/i18n/locales/ja/messages.json +26 -1
  308. package/src/components/i18n/locales/ka/messages.json +26 -1
  309. package/src/components/i18n/locales/km/messages.json +26 -1
  310. package/src/components/i18n/locales/kn/messages.json +26 -1
  311. package/src/components/i18n/locales/ko/messages.json +26 -1
  312. package/src/components/i18n/locales/ku/messages.json +26 -1
  313. package/src/components/i18n/locales/lo/messages.json +26 -1
  314. package/src/components/i18n/locales/lt/messages.json +26 -1
  315. package/src/components/i18n/locales/lv/messages.json +26 -1
  316. package/src/components/i18n/locales/mk/messages.json +26 -1
  317. package/src/components/i18n/locales/ml/messages.json +26 -1
  318. package/src/components/i18n/locales/mn/messages.json +26 -1
  319. package/src/components/i18n/locales/mr/messages.json +26 -1
  320. package/src/components/i18n/locales/ms/messages.json +28 -3
  321. package/src/components/i18n/locales/my/messages.json +26 -1
  322. package/src/components/i18n/locales/ne/messages.json +26 -1
  323. package/src/components/i18n/locales/nl/messages.json +28 -3
  324. package/src/components/i18n/locales/no/messages.json +29 -4
  325. package/src/components/i18n/locales/pa/messages.json +26 -1
  326. package/src/components/i18n/locales/pl/messages.json +27 -2
  327. package/src/components/i18n/locales/ps/messages.json +26 -1
  328. package/src/components/i18n/locales/pt/messages.json +27 -2
  329. package/src/components/i18n/locales/ro/messages.json +27 -2
  330. package/src/components/i18n/locales/ru/messages.json +26 -1
  331. package/src/components/i18n/locales/sd/messages.json +26 -1
  332. package/src/components/i18n/locales/si/messages.json +26 -1
  333. package/src/components/i18n/locales/sk/messages.json +28 -3
  334. package/src/components/i18n/locales/sl/messages.json +28 -3
  335. package/src/components/i18n/locales/sq/messages.json +27 -2
  336. package/src/components/i18n/locales/sr/messages.json +26 -1
  337. package/src/components/i18n/locales/sv/messages.json +28 -3
  338. package/src/components/i18n/locales/sw/messages.json +26 -1
  339. package/src/components/i18n/locales/ta/messages.json +26 -1
  340. package/src/components/i18n/locales/te/messages.json +26 -1
  341. package/src/components/i18n/locales/th/messages.json +26 -1
  342. package/src/components/i18n/locales/tr/messages.json +26 -1
  343. package/src/components/i18n/locales/ug/messages.json +26 -1
  344. package/src/components/i18n/locales/uk/messages.json +26 -1
  345. package/src/components/i18n/locales/ur/messages.json +26 -1
  346. package/src/components/i18n/locales/vi/messages.json +26 -1
  347. package/src/components/i18n/locales/yi/messages.json +26 -1
  348. package/src/components/i18n/locales/zh/messages.json +26 -1
  349. package/src/components/icons/index.ts +38 -0
  350. package/src/components/modules/api/ui.ts +0 -3
  351. package/src/components/modules/ui.ts +0 -13
  352. package/src/stories/EditorModes.stories.ts +0 -60
  353. package/src/styles/main.css +44 -2
  354. package/src/tools/callout/emoji-picker/index.ts +3 -2
  355. package/src/tools/code/code-keyboard.ts +16 -9
  356. package/src/tools/code/constants.ts +26 -3
  357. package/src/tools/code/dom-builder.ts +40 -5
  358. package/src/tools/code/highlight-applier.ts +229 -0
  359. package/src/tools/code/index.ts +141 -1
  360. package/src/tools/code/mermaid-loader.ts +45 -0
  361. package/src/tools/code/shiki-loader.ts +135 -0
  362. package/src/tools/table/core/table-commands.ts +16 -0
  363. package/src/tools/table/core/table-controller.ts +29 -0
  364. package/src/tools/table/core/table-events.ts +17 -0
  365. package/src/tools/table/index.ts +194 -11
  366. package/src/tools/table/table-cell-blocks.ts +9 -6
  367. package/src/tools/table/table-cell-clipboard.ts +6 -1
  368. package/src/tools/table/table-cell-placement-picker.ts +133 -0
  369. package/src/tools/table/table-cell-selection.ts +174 -19
  370. package/src/tools/table/table-core.ts +321 -113
  371. package/src/tools/table/table-map.ts +279 -0
  372. package/src/tools/table/table-model.ts +901 -1
  373. package/src/tools/table/table-operations.ts +78 -44
  374. package/src/tools/table/table-resize.ts +19 -17
  375. package/src/tools/table/table-row-col-drag.ts +24 -10
  376. package/src/tools/table/types.ts +24 -2
  377. package/types/data-attributes.d.ts +0 -1
  378. package/types/tools/code.d.ts +2 -0
  379. /package/dist/chunks/{am-CS-JjQ0N.mjs → am-BxlkYGsI.mjs} +0 -0
  380. /package/dist/chunks/{ar-Dt4XzR5U.mjs → ar-9vlpr9V8.mjs} +0 -0
  381. /package/dist/chunks/{az-CaDTXby8.mjs → az-ON63W_FP.mjs} +0 -0
  382. /package/dist/chunks/{bg-D1pLog-R.mjs → bg-CtXWTP5w.mjs} +0 -0
  383. /package/dist/chunks/{bn-Db_ae60m.mjs → bn-BERvhXM4.mjs} +0 -0
  384. /package/dist/chunks/{bs-DJTg1R9e.mjs → bs-CBg8NVPG.mjs} +0 -0
  385. /package/dist/chunks/{cs-_Gc21gSL.mjs → cs-DeQddxS7.mjs} +0 -0
  386. /package/dist/chunks/{da-xDB8uhCd.mjs → da-DyTo-ec_.mjs} +0 -0
  387. /package/dist/chunks/{de-B6gVjh1Z.mjs → de-Cu7545m1.mjs} +0 -0
  388. /package/dist/chunks/{default-DIfXCS2E.mjs → default-qigT1Xpq.mjs} +0 -0
  389. /package/dist/chunks/{el-ClbRSnOs.mjs → el-oiubLRBq.mjs} +0 -0
  390. /package/dist/chunks/{es-CuY9rnLK.mjs → es-DZUC6Klv.mjs} +0 -0
  391. /package/dist/chunks/{et-BLu5lDVc.mjs → et-CDeklAog.mjs} +0 -0
  392. /package/dist/chunks/{fa-P3gnrZH8.mjs → fa-Cafp7_Li.mjs} +0 -0
  393. /package/dist/chunks/{fi-B8PVHLjq.mjs → fi-BD_V_aVW.mjs} +0 -0
  394. /package/dist/chunks/{fil-B9JII5iF.mjs → fil-Crsfbtx4.mjs} +0 -0
  395. /package/dist/chunks/{fr-BWLDZdcc.mjs → fr-BGGc04Zv.mjs} +0 -0
  396. /package/dist/chunks/{gu-BH3R_s4c.mjs → gu-Vg_BgCTp.mjs} +0 -0
  397. /package/dist/chunks/{he-CCmeCVR_.mjs → he-DTY9chlZ.mjs} +0 -0
  398. /package/dist/chunks/{hi-BBav00DN.mjs → hi-DChMXk0x.mjs} +0 -0
  399. /package/dist/chunks/{hr-B5ZX0r9G.mjs → hr-BWVgNU8k.mjs} +0 -0
  400. /package/dist/chunks/{hu-1jgDa3YU.mjs → hu-B37awHXA.mjs} +0 -0
  401. /package/dist/chunks/{hy-LX4Kp2PE.mjs → hy-DGC_GDHh.mjs} +0 -0
  402. /package/dist/chunks/{i18next-KNC_XV5x.mjs → i18next-CXx5niYF.mjs} +0 -0
  403. /package/dist/chunks/{id-CcG40D1H.mjs → id-V7cw6La2.mjs} +0 -0
  404. /package/dist/chunks/{it-Cb8_K72W.mjs → it-DrTGP8Rn.mjs} +0 -0
  405. /package/dist/chunks/{ja-ipCH91mv.mjs → ja-DS4pbJEG.mjs} +0 -0
  406. /package/dist/chunks/{ka-BRvREIgq.mjs → ka-BueyosRh.mjs} +0 -0
  407. /package/dist/chunks/{km-BJwVw7Fg.mjs → km-B0K891yW.mjs} +0 -0
  408. /package/dist/chunks/{kn-BPgUazCC.mjs → kn-BQ__skg8.mjs} +0 -0
  409. /package/dist/chunks/{ko-CQLzxe7k.mjs → ko-BuPxi_7e.mjs} +0 -0
  410. /package/dist/chunks/{ku-BHhHu8Iz.mjs → ku-nQjwPRw2.mjs} +0 -0
  411. /package/dist/chunks/{lo-DsTgYblY.mjs → lo-K5NVFoq1.mjs} +0 -0
  412. /package/dist/chunks/{lt-CDzHJm71.mjs → lt-D3xD6Eb2.mjs} +0 -0
  413. /package/dist/chunks/{lv-MLLIAnIX.mjs → lv-DH13mzZj.mjs} +0 -0
  414. /package/dist/chunks/{micromark-factory-space-WwmyBO_J.mjs → micromark-factory-space-y4SDWQKm.mjs} +0 -0
  415. /package/dist/chunks/{mk-DQdmUquZ.mjs → mk-Bb48BcDA.mjs} +0 -0
  416. /package/dist/chunks/{ml-DqehZnra.mjs → ml-BHPEj1kD.mjs} +0 -0
  417. /package/dist/chunks/{mn-4cFkKFjW.mjs → mn-BNGzpdI6.mjs} +0 -0
  418. /package/dist/chunks/{mr-DWiztOP4.mjs → mr-D5PgU-cH.mjs} +0 -0
  419. /package/dist/chunks/{ms-BSz-iSnc.mjs → ms-DPkxqKz5.mjs} +0 -0
  420. /package/dist/chunks/{my-DbtbM1MW.mjs → my-DZGcyfxy.mjs} +0 -0
  421. /package/dist/chunks/{native-CzYG0YgY.mjs → native-D0cfLXsM.mjs} +0 -0
  422. /package/dist/chunks/{ne-CqALWw_f.mjs → ne-BU_Wh4Wv.mjs} +0 -0
  423. /package/dist/chunks/{nl-D_ra6RvH.mjs → nl-DtAPk1mK.mjs} +0 -0
  424. /package/dist/chunks/{no-Cg_kz_jl.mjs → no-CdW3n3BY.mjs} +0 -0
  425. /package/dist/chunks/{notifier-BOwxj_Ok.mjs → notifier-CuvTt9pe.mjs} +0 -0
  426. /package/dist/chunks/{pa-NLAsNqwY.mjs → pa-BacCHz87.mjs} +0 -0
  427. /package/dist/chunks/{pl-NHKp4YDg.mjs → pl-8zBJbmhZ.mjs} +0 -0
  428. /package/dist/chunks/{ps-D1zEqNeg.mjs → ps-c6nGXD-W.mjs} +0 -0
  429. /package/dist/chunks/{pt-DBtqbUEB.mjs → pt-B5yR8Qhr.mjs} +0 -0
  430. /package/dist/chunks/{ro-lqr63ai5.mjs → ro-Nscylsqb.mjs} +0 -0
  431. /package/dist/chunks/{ru-BycNnDyN.mjs → ru-DxERQkVJ.mjs} +0 -0
  432. /package/dist/chunks/{sd-DpHpIN9Z.mjs → sd-5z-QY3q9.mjs} +0 -0
  433. /package/dist/chunks/{si-BwiwaC7N.mjs → si-DTL0mzrx.mjs} +0 -0
  434. /package/dist/chunks/{sk-CqRHT2Gp.mjs → sk-DrGczTvY.mjs} +0 -0
  435. /package/dist/chunks/{sl-DA348uQ_.mjs → sl-D8nJjig4.mjs} +0 -0
  436. /package/dist/chunks/{sq-D7JNgve1.mjs → sq-C74Hm3YL.mjs} +0 -0
  437. /package/dist/chunks/{sr-D8RK6Kwp.mjs → sr-DAwB05Gj.mjs} +0 -0
  438. /package/dist/chunks/{sv-dwgT67ZG.mjs → sv-BkHBsN4y.mjs} +0 -0
  439. /package/dist/chunks/{sw-ZRRJnkem.mjs → sw-BBQLTq_z.mjs} +0 -0
  440. /package/dist/chunks/{ta-5x4L5Krl.mjs → ta-DRRzdKky.mjs} +0 -0
  441. /package/dist/chunks/{te-BZpEimwA.mjs → te-CedXLsKM.mjs} +0 -0
  442. /package/dist/chunks/{th-Bhr-33kv.mjs → th-DDOlGA0W.mjs} +0 -0
  443. /package/dist/chunks/{tr-6tSNKGNB.mjs → tr-ClgvwOlL.mjs} +0 -0
  444. /package/dist/chunks/{ug-_e-jvr2b.mjs → ug-bXxwiinM.mjs} +0 -0
  445. /package/dist/chunks/{uk-DooSc2Ja.mjs → uk-Dp46o_VT.mjs} +0 -0
  446. /package/dist/chunks/{ur-rb-krkIO.mjs → ur-MfEEhdFq.mjs} +0 -0
  447. /package/dist/chunks/{vi-CQkLn2AQ.mjs → vi-bt-3LPGO.mjs} +0 -0
  448. /package/dist/chunks/{zh-CXQ40Q2_.mjs → zh-Dgyb5Ly8.mjs} +0 -0
@@ -0,0 +1,2246 @@
1
+ import { o as e, t } from "./chunk-D6kmoKXy.mjs";
2
+ import { t as n } from "./objectSpread2-CWwMYL_U.mjs";
3
+ import { g as r, h as i, p as a } from "./src-DVJl6f6s.mjs";
4
+ import { t as o } from "./cytoscape.esm-BvD8wo00.mjs";
5
+ //#region node_modules/layout-base/layout-base.js
6
+ var s = /* @__PURE__ */ t(((e, t) => {
7
+ (function(n, r) {
8
+ typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.layoutBase = r() : n.layoutBase = r();
9
+ })(e, function() {
10
+ return (function(e) {
11
+ var t = {};
12
+ function n(r) {
13
+ if (t[r]) return t[r].exports;
14
+ var i = t[r] = {
15
+ i: r,
16
+ l: !1,
17
+ exports: {}
18
+ };
19
+ return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
20
+ }
21
+ return n.m = e, n.c = t, n.i = function(e) {
22
+ return e;
23
+ }, n.d = function(e, t, r) {
24
+ n.o(e, t) || Object.defineProperty(e, t, {
25
+ configurable: !1,
26
+ enumerable: !0,
27
+ get: r
28
+ });
29
+ }, n.n = function(e) {
30
+ var t = e && e.__esModule ? function() {
31
+ return e.default;
32
+ } : function() {
33
+ return e;
34
+ };
35
+ return n.d(t, "a", t), t;
36
+ }, n.o = function(e, t) {
37
+ return Object.prototype.hasOwnProperty.call(e, t);
38
+ }, n.p = "", n(n.s = 26);
39
+ })([
40
+ (function(e, t, n) {
41
+ function r() {}
42
+ r.QUALITY = 1, r.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, r.DEFAULT_INCREMENTAL = !1, r.DEFAULT_ANIMATION_ON_LAYOUT = !0, r.DEFAULT_ANIMATION_DURING_LAYOUT = !1, r.DEFAULT_ANIMATION_PERIOD = 50, r.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, r.DEFAULT_GRAPH_MARGIN = 15, r.NODE_DIMENSIONS_INCLUDE_LABELS = !1, r.SIMPLE_NODE_SIZE = 40, r.SIMPLE_NODE_HALF_SIZE = r.SIMPLE_NODE_SIZE / 2, r.EMPTY_COMPOUND_NODE_SIZE = 40, r.MIN_EDGE_LENGTH = 1, r.WORLD_BOUNDARY = 1e6, r.INITIAL_WORLD_BOUNDARY = r.WORLD_BOUNDARY / 1e3, r.WORLD_CENTER_X = 1200, r.WORLD_CENTER_Y = 900, e.exports = r;
43
+ }),
44
+ (function(e, t, n) {
45
+ var r = n(2), i = n(8), a = n(9);
46
+ function o(e, t, n) {
47
+ r.call(this, n), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = n, this.bendpoints = [], this.source = e, this.target = t;
48
+ }
49
+ for (var s in o.prototype = Object.create(r.prototype), r) o[s] = r[s];
50
+ o.prototype.getSource = function() {
51
+ return this.source;
52
+ }, o.prototype.getTarget = function() {
53
+ return this.target;
54
+ }, o.prototype.isInterGraph = function() {
55
+ return this.isInterGraph;
56
+ }, o.prototype.getLength = function() {
57
+ return this.length;
58
+ }, o.prototype.isOverlapingSourceAndTarget = function() {
59
+ return this.isOverlapingSourceAndTarget;
60
+ }, o.prototype.getBendpoints = function() {
61
+ return this.bendpoints;
62
+ }, o.prototype.getLca = function() {
63
+ return this.lca;
64
+ }, o.prototype.getSourceInLca = function() {
65
+ return this.sourceInLca;
66
+ }, o.prototype.getTargetInLca = function() {
67
+ return this.targetInLca;
68
+ }, o.prototype.getOtherEnd = function(e) {
69
+ if (this.source === e) return this.target;
70
+ if (this.target === e) return this.source;
71
+ throw "Node is not incident with this edge";
72
+ }, o.prototype.getOtherEndInGraph = function(e, t) {
73
+ for (var n = this.getOtherEnd(e), r = t.getGraphManager().getRoot();;) {
74
+ if (n.getOwner() == t) return n;
75
+ if (n.getOwner() == r) break;
76
+ n = n.getOwner().getParent();
77
+ }
78
+ return null;
79
+ }, o.prototype.updateLength = function() {
80
+ var e = [
81
+ ,
82
+ ,
83
+ ,
84
+ ,
85
+ ];
86
+ this.isOverlapingSourceAndTarget = i.getIntersection(this.target.getRect(), this.source.getRect(), e), this.isOverlapingSourceAndTarget || (this.lengthX = e[0] - e[2], this.lengthY = e[1] - e[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));
87
+ }, o.prototype.updateLengthSimple = function() {
88
+ 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);
89
+ }, e.exports = o;
90
+ }),
91
+ (function(e, t, n) {
92
+ function r(e) {
93
+ this.vGraphObject = e;
94
+ }
95
+ e.exports = r;
96
+ }),
97
+ (function(e, t, n) {
98
+ var r = n(2), i = n(10), a = n(13), o = n(0), s = n(16), c = n(4);
99
+ function l(e, t, n, o) {
100
+ n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, n != null && t != null ? this.rect = new a(t.x, t.y, n.width, n.height) : this.rect = new a();
101
+ }
102
+ for (var u in l.prototype = Object.create(r.prototype), r) l[u] = r[u];
103
+ l.prototype.getEdges = function() {
104
+ return this.edges;
105
+ }, l.prototype.getChild = function() {
106
+ return this.child;
107
+ }, l.prototype.getOwner = function() {
108
+ return this.owner;
109
+ }, l.prototype.getWidth = function() {
110
+ return this.rect.width;
111
+ }, l.prototype.setWidth = function(e) {
112
+ this.rect.width = e;
113
+ }, l.prototype.getHeight = function() {
114
+ return this.rect.height;
115
+ }, l.prototype.setHeight = function(e) {
116
+ this.rect.height = e;
117
+ }, l.prototype.getCenterX = function() {
118
+ return this.rect.x + this.rect.width / 2;
119
+ }, l.prototype.getCenterY = function() {
120
+ return this.rect.y + this.rect.height / 2;
121
+ }, l.prototype.getCenter = function() {
122
+ return new c(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
123
+ }, l.prototype.getLocation = function() {
124
+ return new c(this.rect.x, this.rect.y);
125
+ }, l.prototype.getRect = function() {
126
+ return this.rect;
127
+ }, l.prototype.getDiagonal = function() {
128
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
129
+ }, l.prototype.getHalfTheDiagonal = function() {
130
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
131
+ }, l.prototype.setRect = function(e, t) {
132
+ this.rect.x = e.x, this.rect.y = e.y, this.rect.width = t.width, this.rect.height = t.height;
133
+ }, l.prototype.setCenter = function(e, t) {
134
+ this.rect.x = e - this.rect.width / 2, this.rect.y = t - this.rect.height / 2;
135
+ }, l.prototype.setLocation = function(e, t) {
136
+ this.rect.x = e, this.rect.y = t;
137
+ }, l.prototype.moveBy = function(e, t) {
138
+ this.rect.x += e, this.rect.y += t;
139
+ }, l.prototype.getEdgeListToNode = function(e) {
140
+ var t = [], n = this;
141
+ return n.edges.forEach(function(r) {
142
+ if (r.target == e) {
143
+ if (r.source != n) throw "Incorrect edge source!";
144
+ t.push(r);
145
+ }
146
+ }), t;
147
+ }, l.prototype.getEdgesBetween = function(e) {
148
+ var t = [], n = this;
149
+ return n.edges.forEach(function(r) {
150
+ if (!(r.source == n || r.target == n)) throw "Incorrect edge source and/or target";
151
+ (r.target == e || r.source == e) && t.push(r);
152
+ }), t;
153
+ }, l.prototype.getNeighborsList = function() {
154
+ var e = /* @__PURE__ */ new Set(), t = this;
155
+ return t.edges.forEach(function(n) {
156
+ if (n.source == t) e.add(n.target);
157
+ else {
158
+ if (n.target != t) throw "Incorrect incidency!";
159
+ e.add(n.source);
160
+ }
161
+ }), e;
162
+ }, l.prototype.withChildren = function() {
163
+ var e = /* @__PURE__ */ new Set(), t, n;
164
+ if (e.add(this), this.child != null) for (var r = this.child.getNodes(), i = 0; i < r.length; i++) t = r[i], n = t.withChildren(), n.forEach(function(t) {
165
+ e.add(t);
166
+ });
167
+ return e;
168
+ }, l.prototype.getNoOfChildren = function() {
169
+ var e = 0, t;
170
+ if (this.child == null) e = 1;
171
+ else for (var n = this.child.getNodes(), r = 0; r < n.length; r++) t = n[r], e += t.getNoOfChildren();
172
+ return e == 0 && (e = 1), e;
173
+ }, l.prototype.getEstimatedSize = function() {
174
+ if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
175
+ return this.estimatedSize;
176
+ }, l.prototype.calcEstimatedSize = function() {
177
+ 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);
178
+ }, l.prototype.scatter = function() {
179
+ var e, t, n = -o.INITIAL_WORLD_BOUNDARY, r = o.INITIAL_WORLD_BOUNDARY;
180
+ e = o.WORLD_CENTER_X + s.nextDouble() * (r - n) + n;
181
+ var i = -o.INITIAL_WORLD_BOUNDARY, a = o.INITIAL_WORLD_BOUNDARY;
182
+ t = o.WORLD_CENTER_Y + s.nextDouble() * (a - i) + i, this.rect.x = e, this.rect.y = t;
183
+ }, l.prototype.updateBounds = function() {
184
+ if (this.getChild() == null) throw "assert failed";
185
+ if (this.getChild().getNodes().length != 0) {
186
+ var e = this.getChild();
187
+ if (e.updateBounds(!0), this.rect.x = e.getLeft(), this.rect.y = e.getTop(), this.setWidth(e.getRight() - e.getLeft()), this.setHeight(e.getBottom() - e.getTop()), o.NODE_DIMENSIONS_INCLUDE_LABELS) {
188
+ var t = e.getRight() - e.getLeft(), n = e.getBottom() - e.getTop();
189
+ this.labelWidth > t && (this.rect.x -= (this.labelWidth - t) / 2, this.setWidth(this.labelWidth)), this.labelHeight > n && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - n) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - n), this.setHeight(this.labelHeight));
190
+ }
191
+ }
192
+ }, l.prototype.getInclusionTreeDepth = function() {
193
+ if (this.inclusionTreeDepth == i.MAX_VALUE) throw "assert failed";
194
+ return this.inclusionTreeDepth;
195
+ }, l.prototype.transform = function(e) {
196
+ var t = this.rect.x;
197
+ t > o.WORLD_BOUNDARY ? t = o.WORLD_BOUNDARY : t < -o.WORLD_BOUNDARY && (t = -o.WORLD_BOUNDARY);
198
+ var n = this.rect.y;
199
+ n > o.WORLD_BOUNDARY ? n = o.WORLD_BOUNDARY : n < -o.WORLD_BOUNDARY && (n = -o.WORLD_BOUNDARY);
200
+ var r = new c(t, n), i = e.inverseTransformPoint(r);
201
+ this.setLocation(i.x, i.y);
202
+ }, l.prototype.getLeft = function() {
203
+ return this.rect.x;
204
+ }, l.prototype.getRight = function() {
205
+ return this.rect.x + this.rect.width;
206
+ }, l.prototype.getTop = function() {
207
+ return this.rect.y;
208
+ }, l.prototype.getBottom = function() {
209
+ return this.rect.y + this.rect.height;
210
+ }, l.prototype.getParent = function() {
211
+ return this.owner == null ? null : this.owner.getParent();
212
+ }, e.exports = l;
213
+ }),
214
+ (function(e, t, n) {
215
+ function r(e, t) {
216
+ e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
217
+ }
218
+ r.prototype.getX = function() {
219
+ return this.x;
220
+ }, r.prototype.getY = function() {
221
+ return this.y;
222
+ }, r.prototype.setX = function(e) {
223
+ this.x = e;
224
+ }, r.prototype.setY = function(e) {
225
+ this.y = e;
226
+ }, r.prototype.getDifference = function(e) {
227
+ return new DimensionD(this.x - e.x, this.y - e.y);
228
+ }, r.prototype.getCopy = function() {
229
+ return new r(this.x, this.y);
230
+ }, r.prototype.translate = function(e) {
231
+ return this.x += e.width, this.y += e.height, this;
232
+ }, e.exports = r;
233
+ }),
234
+ (function(e, t, n) {
235
+ var r = n(2), i = n(10), a = n(0), o = n(6), s = n(3), c = n(1), l = n(13), u = n(12), d = n(11);
236
+ function f(e, t, n) {
237
+ r.call(this, n), this.estimatedSize = i.MIN_VALUE, this.margin = a.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = e, t != null && t instanceof o ? this.graphManager = t : t != null && t instanceof Layout && (this.graphManager = t.graphManager);
238
+ }
239
+ for (var p in f.prototype = Object.create(r.prototype), r) f[p] = r[p];
240
+ f.prototype.getNodes = function() {
241
+ return this.nodes;
242
+ }, f.prototype.getEdges = function() {
243
+ return this.edges;
244
+ }, f.prototype.getGraphManager = function() {
245
+ return this.graphManager;
246
+ }, f.prototype.getParent = function() {
247
+ return this.parent;
248
+ }, f.prototype.getLeft = function() {
249
+ return this.left;
250
+ }, f.prototype.getRight = function() {
251
+ return this.right;
252
+ }, f.prototype.getTop = function() {
253
+ return this.top;
254
+ }, f.prototype.getBottom = function() {
255
+ return this.bottom;
256
+ }, f.prototype.isConnected = function() {
257
+ return this.isConnected;
258
+ }, f.prototype.add = function(e, t, n) {
259
+ if (t == null && n == null) {
260
+ var r = e;
261
+ if (this.graphManager == null) throw "Graph has no graph mgr!";
262
+ if (this.getNodes().indexOf(r) > -1) throw "Node already in graph!";
263
+ return r.owner = this, this.getNodes().push(r), r;
264
+ } else {
265
+ var i = e;
266
+ if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
267
+ if (!(t.owner == n.owner && t.owner == this)) throw "Both owners must be this graph!";
268
+ return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
269
+ }
270
+ }, f.prototype.remove = function(e) {
271
+ var t = e;
272
+ if (e instanceof s) {
273
+ if (t == null) throw "Node is null!";
274
+ if (!(t.owner != null && t.owner == this)) throw "Owner graph is invalid!";
275
+ if (this.graphManager == null) throw "Owner graph manager is invalid!";
276
+ for (var n = t.edges.slice(), r, i = n.length, a = 0; a < i; a++) r = n[a], r.isInterGraph ? this.graphManager.remove(r) : r.source.owner.remove(r);
277
+ var o = this.nodes.indexOf(t);
278
+ if (o == -1) throw "Node not in owner node list!";
279
+ this.nodes.splice(o, 1);
280
+ } else if (e instanceof c) {
281
+ var r = e;
282
+ if (r == null) throw "Edge is null!";
283
+ if (!(r.source != null && r.target != null)) throw "Source and/or target is null!";
284
+ if (!(r.source.owner != null && r.target.owner != null && r.source.owner == this && r.target.owner == this)) throw "Source and/or target owner is invalid!";
285
+ var l = r.source.edges.indexOf(r), u = r.target.edges.indexOf(r);
286
+ if (!(l > -1 && u > -1)) throw "Source and/or target doesn't know this edge!";
287
+ r.source.edges.splice(l, 1), r.target != r.source && r.target.edges.splice(u, 1);
288
+ var o = r.source.owner.getEdges().indexOf(r);
289
+ if (o == -1) throw "Not in owner's edge list!";
290
+ r.source.owner.getEdges().splice(o, 1);
291
+ }
292
+ }, f.prototype.updateLeftTop = function() {
293
+ for (var e = i.MAX_VALUE, t = i.MAX_VALUE, n, r, a, o = this.getNodes(), s = o.length, c = 0; c < s; c++) {
294
+ var l = o[c];
295
+ n = l.getTop(), r = l.getLeft(), e > n && (e = n), t > r && (t = r);
296
+ }
297
+ return e == i.MAX_VALUE ? null : (a = o[0].getParent().paddingLeft == null ? this.margin : o[0].getParent().paddingLeft, this.left = t - a, this.top = e - a, new u(this.left, this.top));
298
+ }, f.prototype.updateBounds = function(e) {
299
+ for (var t = i.MAX_VALUE, n = -i.MAX_VALUE, r = i.MAX_VALUE, a = -i.MAX_VALUE, o, s, c, u, d, f = this.nodes, p = f.length, m = 0; m < p; m++) {
300
+ var h = f[m];
301
+ e && h.child != null && h.updateBounds(), o = h.getLeft(), s = h.getRight(), c = h.getTop(), u = h.getBottom(), t > o && (t = o), n < s && (n = s), r > c && (r = c), a < u && (a = u);
302
+ }
303
+ var g = new l(t, r, n - t, a - r);
304
+ t == i.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), d = f[0].getParent().paddingLeft == null ? this.margin : f[0].getParent().paddingLeft, this.left = g.x - d, this.right = g.x + g.width + d, this.top = g.y - d, this.bottom = g.y + g.height + d;
305
+ }, f.calculateBounds = function(e) {
306
+ for (var t = i.MAX_VALUE, n = -i.MAX_VALUE, r = i.MAX_VALUE, a = -i.MAX_VALUE, o, s, c, u, d = e.length, f = 0; f < d; f++) {
307
+ var p = e[f];
308
+ o = p.getLeft(), s = p.getRight(), c = p.getTop(), u = p.getBottom(), t > o && (t = o), n < s && (n = s), r > c && (r = c), a < u && (a = u);
309
+ }
310
+ return new l(t, r, n - t, a - r);
311
+ }, f.prototype.getInclusionTreeDepth = function() {
312
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
313
+ }, f.prototype.getEstimatedSize = function() {
314
+ if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
315
+ return this.estimatedSize;
316
+ }, f.prototype.calcEstimatedSize = function() {
317
+ for (var e = 0, t = this.nodes, n = t.length, r = 0; r < n; r++) {
318
+ var i = t[r];
319
+ e += i.calcEstimatedSize();
320
+ }
321
+ return e == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = e / Math.sqrt(this.nodes.length), this.estimatedSize;
322
+ }, f.prototype.updateConnected = function() {
323
+ var e = this;
324
+ if (this.nodes.length == 0) {
325
+ this.isConnected = !0;
326
+ return;
327
+ }
328
+ var t = new d(), n = /* @__PURE__ */ new Set(), r = this.nodes[0], i, a;
329
+ for (r.withChildren().forEach(function(e) {
330
+ t.push(e), n.add(e);
331
+ }); t.length !== 0;) {
332
+ r = t.shift(), i = r.getEdges();
333
+ for (var o = i.length, s = 0; s < o; s++) a = i[s].getOtherEndInGraph(r, this), a != null && !n.has(a) && a.withChildren().forEach(function(e) {
334
+ t.push(e), n.add(e);
335
+ });
336
+ }
337
+ if (this.isConnected = !1, n.size >= this.nodes.length) {
338
+ var c = 0;
339
+ n.forEach(function(t) {
340
+ t.owner == e && c++;
341
+ }), c == this.nodes.length && (this.isConnected = !0);
342
+ }
343
+ }, e.exports = f;
344
+ }),
345
+ (function(e, t, n) {
346
+ var r, i = n(1);
347
+ function a(e) {
348
+ r = n(5), this.layout = e, this.graphs = [], this.edges = [];
349
+ }
350
+ a.prototype.addRoot = function() {
351
+ var e = this.layout.newGraph(), t = this.layout.newNode(null), n = this.add(e, t);
352
+ return this.setRootGraph(n), this.rootGraph;
353
+ }, a.prototype.add = function(e, t, n, r, i) {
354
+ if (n == null && r == null && i == null) {
355
+ if (e == null) throw "Graph is null!";
356
+ if (t == null) throw "Parent node is null!";
357
+ if (this.graphs.indexOf(e) > -1) throw "Graph already in this graph mgr!";
358
+ if (this.graphs.push(e), e.parent != null) throw "Already has a parent!";
359
+ if (t.child != null) throw "Already has a child!";
360
+ return e.parent = t, t.child = e, e;
361
+ } else {
362
+ i = n, r = t, n = e;
363
+ var a = r.getOwner(), o = i.getOwner();
364
+ if (!(a != null && a.getGraphManager() == this)) throw "Source not in this graph mgr!";
365
+ if (!(o != null && o.getGraphManager() == this)) throw "Target not in this graph mgr!";
366
+ if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
367
+ if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
368
+ if (this.edges.push(n), !(n.source != null && n.target != null)) throw "Edge source and/or target is null!";
369
+ if (!(n.source.edges.indexOf(n) == -1 && n.target.edges.indexOf(n) == -1)) throw "Edge already in source and/or target incidency list!";
370
+ return n.source.edges.push(n), n.target.edges.push(n), n;
371
+ }
372
+ }, a.prototype.remove = function(e) {
373
+ if (e instanceof r) {
374
+ var t = e;
375
+ if (t.getGraphManager() != this) throw "Graph not in this graph mgr";
376
+ if (!(t == this.rootGraph || t.parent != null && t.parent.graphManager == this)) throw "Invalid parent node!";
377
+ var n = [];
378
+ n = n.concat(t.getEdges());
379
+ for (var a, o = n.length, s = 0; s < o; s++) a = n[s], t.remove(a);
380
+ var c = [];
381
+ c = c.concat(t.getNodes());
382
+ var l;
383
+ o = c.length;
384
+ for (var s = 0; s < o; s++) l = c[s], t.remove(l);
385
+ t == this.rootGraph && this.setRootGraph(null);
386
+ var u = this.graphs.indexOf(t);
387
+ this.graphs.splice(u, 1), t.parent = null;
388
+ } else if (e instanceof i) {
389
+ if (a = e, a == null) throw "Edge is null!";
390
+ if (!a.isInterGraph) throw "Not an inter-graph edge!";
391
+ if (!(a.source != null && a.target != null)) throw "Source and/or target is null!";
392
+ if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1)) throw "Source and/or target doesn't know this edge!";
393
+ var u = a.source.edges.indexOf(a);
394
+ if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), !(a.source.owner != null && a.source.owner.getGraphManager() != null)) throw "Edge owner graph or owner graph manager is null!";
395
+ if (a.source.owner.getGraphManager().edges.indexOf(a) == -1) throw "Not in owner graph manager's edge list!";
396
+ var u = a.source.owner.getGraphManager().edges.indexOf(a);
397
+ a.source.owner.getGraphManager().edges.splice(u, 1);
398
+ }
399
+ }, a.prototype.updateBounds = function() {
400
+ this.rootGraph.updateBounds(!0);
401
+ }, a.prototype.getGraphs = function() {
402
+ return this.graphs;
403
+ }, a.prototype.getAllNodes = function() {
404
+ if (this.allNodes == null) {
405
+ for (var e = [], t = this.getGraphs(), n = t.length, r = 0; r < n; r++) e = e.concat(t[r].getNodes());
406
+ this.allNodes = e;
407
+ }
408
+ return this.allNodes;
409
+ }, a.prototype.resetAllNodes = function() {
410
+ this.allNodes = null;
411
+ }, a.prototype.resetAllEdges = function() {
412
+ this.allEdges = null;
413
+ }, a.prototype.resetAllNodesToApplyGravitation = function() {
414
+ this.allNodesToApplyGravitation = null;
415
+ }, a.prototype.getAllEdges = function() {
416
+ if (this.allEdges == null) {
417
+ var e = [], t = this.getGraphs();
418
+ t.length;
419
+ for (var n = 0; n < t.length; n++) e = e.concat(t[n].getEdges());
420
+ e = e.concat(this.edges), this.allEdges = e;
421
+ }
422
+ return this.allEdges;
423
+ }, a.prototype.getAllNodesToApplyGravitation = function() {
424
+ return this.allNodesToApplyGravitation;
425
+ }, a.prototype.setAllNodesToApplyGravitation = function(e) {
426
+ if (this.allNodesToApplyGravitation != null) throw "assert failed";
427
+ this.allNodesToApplyGravitation = e;
428
+ }, a.prototype.getRoot = function() {
429
+ return this.rootGraph;
430
+ }, a.prototype.setRootGraph = function(e) {
431
+ if (e.getGraphManager() != this) throw "Root not in this graph mgr!";
432
+ this.rootGraph = e, e.parent == null && (e.parent = this.layout.newNode("Root node"));
433
+ }, a.prototype.getLayout = function() {
434
+ return this.layout;
435
+ }, a.prototype.isOneAncestorOfOther = function(e, t) {
436
+ if (!(e != null && t != null)) throw "assert failed";
437
+ if (e == t) return !0;
438
+ var n = e.getOwner(), r;
439
+ do {
440
+ if (r = n.getParent(), r == null) break;
441
+ if (r == t) return !0;
442
+ if (n = r.getOwner(), n == null) break;
443
+ } while (!0);
444
+ n = t.getOwner();
445
+ do {
446
+ if (r = n.getParent(), r == null) break;
447
+ if (r == e) return !0;
448
+ if (n = r.getOwner(), n == null) break;
449
+ } while (!0);
450
+ return !1;
451
+ }, a.prototype.calcLowestCommonAncestors = function() {
452
+ for (var e, t, n, r, i, a = this.getAllEdges(), o = a.length, s = 0; s < o; s++) {
453
+ if (e = a[s], t = e.source, n = e.target, e.lca = null, e.sourceInLca = t, e.targetInLca = n, t == n) {
454
+ e.lca = t.getOwner();
455
+ continue;
456
+ }
457
+ for (r = t.getOwner(); e.lca == null;) {
458
+ for (e.targetInLca = n, i = n.getOwner(); e.lca == null;) {
459
+ if (i == r) {
460
+ e.lca = i;
461
+ break;
462
+ }
463
+ if (i == this.rootGraph) break;
464
+ if (e.lca != null) throw "assert failed";
465
+ e.targetInLca = i.getParent(), i = e.targetInLca.getOwner();
466
+ }
467
+ if (r == this.rootGraph) break;
468
+ e.lca == null && (e.sourceInLca = r.getParent(), r = e.sourceInLca.getOwner());
469
+ }
470
+ if (e.lca == null) throw "assert failed";
471
+ }
472
+ }, a.prototype.calcLowestCommonAncestor = function(e, t) {
473
+ if (e == t) return e.getOwner();
474
+ var n = e.getOwner();
475
+ do {
476
+ if (n == null) break;
477
+ var r = t.getOwner();
478
+ do {
479
+ if (r == null) break;
480
+ if (r == n) return r;
481
+ r = r.getParent().getOwner();
482
+ } while (!0);
483
+ n = n.getParent().getOwner();
484
+ } while (!0);
485
+ return n;
486
+ }, a.prototype.calcInclusionTreeDepths = function(e, t) {
487
+ e == null && t == null && (e = this.rootGraph, t = 1);
488
+ for (var n, r = e.getNodes(), i = r.length, a = 0; a < i; a++) n = r[a], n.inclusionTreeDepth = t, n.child != null && this.calcInclusionTreeDepths(n.child, t + 1);
489
+ }, a.prototype.includesInvalidEdge = function() {
490
+ for (var e, t = this.edges.length, n = 0; n < t; n++) if (e = this.edges[n], this.isOneAncestorOfOther(e.source, e.target)) return !0;
491
+ return !1;
492
+ }, e.exports = a;
493
+ }),
494
+ (function(e, t, n) {
495
+ var r = n(0);
496
+ function i() {}
497
+ for (var a in r) i[a] = r[a];
498
+ i.MAX_ITERATIONS = 2500, i.DEFAULT_EDGE_LENGTH = 50, i.DEFAULT_SPRING_STRENGTH = .45, i.DEFAULT_REPULSION_STRENGTH = 4500, i.DEFAULT_GRAVITY_STRENGTH = .4, i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, i.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, i.DEFAULT_COOLING_FACTOR_INCREMENTAL = .3, i.COOLING_ADAPTATION_FACTOR = .33, i.ADAPTATION_LOWER_NODE_LIMIT = 1e3, i.ADAPTATION_UPPER_NODE_LIMIT = 5e3, i.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, i.MAX_NODE_DISPLACEMENT = i.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, i.MIN_REPULSION_DIST = i.DEFAULT_EDGE_LENGTH / 10, i.CONVERGENCE_CHECK_PERIOD = 100, i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = .1, i.MIN_EDGE_LENGTH = 1, i.GRID_CALCULATION_CHECK_PERIOD = 10, e.exports = i;
499
+ }),
500
+ (function(e, t, n) {
501
+ var r = n(12);
502
+ function i() {}
503
+ i.calcSeparationAmount = function(e, t, n, r) {
504
+ if (!e.intersects(t)) throw "assert failed";
505
+ var i = [, ,];
506
+ this.decideDirectionsForOverlappingNodes(e, t, i), n[0] = Math.min(e.getRight(), t.getRight()) - Math.max(e.x, t.x), n[1] = Math.min(e.getBottom(), t.getBottom()) - Math.max(e.y, t.y), e.getX() <= t.getX() && e.getRight() >= t.getRight() ? n[0] += Math.min(t.getX() - e.getX(), e.getRight() - t.getRight()) : t.getX() <= e.getX() && t.getRight() >= e.getRight() && (n[0] += Math.min(e.getX() - t.getX(), t.getRight() - e.getRight())), e.getY() <= t.getY() && e.getBottom() >= t.getBottom() ? n[1] += Math.min(t.getY() - e.getY(), e.getBottom() - t.getBottom()) : t.getY() <= e.getY() && t.getBottom() >= e.getBottom() && (n[1] += Math.min(e.getY() - t.getY(), t.getBottom() - e.getBottom()));
507
+ var a = Math.abs((t.getCenterY() - e.getCenterY()) / (t.getCenterX() - e.getCenterX()));
508
+ t.getCenterY() === e.getCenterY() && t.getCenterX() === e.getCenterX() && (a = 1);
509
+ var o = a * n[0], s = n[1] / a;
510
+ n[0] < s ? s = n[0] : o = n[1], n[0] = -1 * i[0] * (s / 2 + r), n[1] = -1 * i[1] * (o / 2 + r);
511
+ }, i.decideDirectionsForOverlappingNodes = function(e, t, n) {
512
+ e.getCenterX() < t.getCenterX() ? n[0] = -1 : n[0] = 1, e.getCenterY() < t.getCenterY() ? n[1] = -1 : n[1] = 1;
513
+ }, i.getIntersection2 = function(e, t, n) {
514
+ var r = e.getCenterX(), i = e.getCenterY(), a = t.getCenterX(), o = t.getCenterY();
515
+ if (e.intersects(t)) return n[0] = r, n[1] = i, n[2] = a, n[3] = o, !0;
516
+ var s = e.getX(), c = e.getY(), l = e.getRight(), u = e.getX(), d = e.getBottom(), f = e.getRight(), p = e.getWidthHalf(), m = e.getHeightHalf(), h = t.getX(), g = t.getY(), _ = t.getRight(), v = t.getX(), y = t.getBottom(), b = t.getRight(), x = t.getWidthHalf(), S = t.getHeightHalf(), C = !1, w = !1;
517
+ if (r === a) {
518
+ if (i > o) return n[0] = r, n[1] = c, n[2] = a, n[3] = y, !1;
519
+ if (i < o) return n[0] = r, n[1] = d, n[2] = a, n[3] = g, !1;
520
+ } else if (i === o) {
521
+ if (r > a) return n[0] = s, n[1] = i, n[2] = _, n[3] = o, !1;
522
+ if (r < a) return n[0] = l, n[1] = i, n[2] = h, n[3] = o, !1;
523
+ } else {
524
+ var T = e.height / e.width, E = t.height / t.width, D = (o - i) / (a - r), O = void 0, k = void 0, A = void 0, j = void 0, M = void 0, N = void 0;
525
+ if (-T === D ? r > a ? (n[0] = u, n[1] = d, C = !0) : (n[0] = l, n[1] = c, C = !0) : T === D && (r > a ? (n[0] = s, n[1] = c, C = !0) : (n[0] = f, n[1] = d, C = !0)), -E === D ? a > r ? (n[2] = v, n[3] = y, w = !0) : (n[2] = _, n[3] = g, w = !0) : E === D && (a > r ? (n[2] = h, n[3] = g, w = !0) : (n[2] = b, n[3] = y, w = !0)), C && w) return !1;
526
+ if (r > a ? i > o ? (O = this.getCardinalDirection(T, D, 4), k = this.getCardinalDirection(E, D, 2)) : (O = this.getCardinalDirection(-T, D, 3), k = this.getCardinalDirection(-E, D, 1)) : i > o ? (O = this.getCardinalDirection(-T, D, 1), k = this.getCardinalDirection(-E, D, 3)) : (O = this.getCardinalDirection(T, D, 2), k = this.getCardinalDirection(E, D, 4)), !C) switch (O) {
527
+ case 1:
528
+ j = c, A = r + -m / D, n[0] = A, n[1] = j;
529
+ break;
530
+ case 2:
531
+ A = f, j = i + p * D, n[0] = A, n[1] = j;
532
+ break;
533
+ case 3:
534
+ j = d, A = r + m / D, n[0] = A, n[1] = j;
535
+ break;
536
+ case 4:
537
+ A = u, j = i + -p * D, n[0] = A, n[1] = j;
538
+ break;
539
+ }
540
+ if (!w) switch (k) {
541
+ case 1:
542
+ N = g, M = a + -S / D, n[2] = M, n[3] = N;
543
+ break;
544
+ case 2:
545
+ M = b, N = o + x * D, n[2] = M, n[3] = N;
546
+ break;
547
+ case 3:
548
+ N = y, M = a + S / D, n[2] = M, n[3] = N;
549
+ break;
550
+ case 4:
551
+ M = v, N = o + -x * D, n[2] = M, n[3] = N;
552
+ break;
553
+ }
554
+ }
555
+ return !1;
556
+ }, i.getCardinalDirection = function(e, t, n) {
557
+ return e > t ? n : 1 + n % 4;
558
+ }, i.getIntersection = function(e, t, n, i) {
559
+ if (i == null) return this.getIntersection2(e, t, n);
560
+ var a = e.x, o = e.y, s = t.x, c = t.y, l = n.x, u = n.y, d = i.x, f = i.y, p = void 0, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0, y = void 0, b = void 0, x = void 0;
561
+ return h = c - o, _ = a - s, y = s * o - a * c, g = f - u, v = l - d, b = d * u - l * f, x = h * v - g * _, x === 0 ? null : (p = (_ * b - v * y) / x, m = (g * y - h * b) / x, new r(p, m));
562
+ }, i.angleOfVector = function(e, t, n, r) {
563
+ var i = void 0;
564
+ return e === n ? i = r < t ? this.ONE_AND_HALF_PI : this.HALF_PI : (i = Math.atan((r - t) / (n - e)), n < e ? i += Math.PI : r < t && (i += this.TWO_PI)), i;
565
+ }, i.doIntersect = function(e, t, n, r) {
566
+ var i = e.x, a = e.y, o = t.x, s = t.y, c = n.x, l = n.y, u = r.x, d = r.y, f = (o - i) * (d - l) - (u - c) * (s - a);
567
+ if (f === 0) return !1;
568
+ var p = ((d - l) * (u - i) + (c - u) * (d - a)) / f, m = ((a - s) * (u - i) + (o - i) * (d - a)) / f;
569
+ return 0 < p && p < 1 && 0 < m && m < 1;
570
+ }, i.HALF_PI = .5 * Math.PI, i.ONE_AND_HALF_PI = 1.5 * Math.PI, i.TWO_PI = 2 * Math.PI, i.THREE_PI = 3 * Math.PI, e.exports = i;
571
+ }),
572
+ (function(e, t, n) {
573
+ function r() {}
574
+ r.sign = function(e) {
575
+ return e > 0 ? 1 : e < 0 ? -1 : 0;
576
+ }, r.floor = function(e) {
577
+ return e < 0 ? Math.ceil(e) : Math.floor(e);
578
+ }, r.ceil = function(e) {
579
+ return e < 0 ? Math.floor(e) : Math.ceil(e);
580
+ }, e.exports = r;
581
+ }),
582
+ (function(e, t, n) {
583
+ function r() {}
584
+ r.MAX_VALUE = 2147483647, r.MIN_VALUE = -2147483648, e.exports = r;
585
+ }),
586
+ (function(e, t, n) {
587
+ var r = function() {
588
+ function e(e, t) {
589
+ for (var n = 0; n < t.length; n++) {
590
+ var r = t[n];
591
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
592
+ }
593
+ }
594
+ return function(t, n, r) {
595
+ return n && e(t.prototype, n), r && e(t, r), t;
596
+ };
597
+ }();
598
+ function i(e, t) {
599
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
600
+ }
601
+ var a = function(e) {
602
+ return {
603
+ value: e,
604
+ next: null,
605
+ prev: null
606
+ };
607
+ }, o = function(e, t, n, r) {
608
+ return e === null ? r.head = t : e.next = t, n === null ? r.tail = t : n.prev = t, t.prev = e, t.next = n, r.length++, t;
609
+ }, s = function(e, t) {
610
+ var n = e.prev, r = e.next;
611
+ return n === null ? t.head = r : n.next = r, r === null ? t.tail = n : r.prev = n, e.prev = e.next = null, t.length--, e;
612
+ };
613
+ e.exports = function() {
614
+ function e(t) {
615
+ var n = this;
616
+ i(this, e), this.length = 0, this.head = null, this.tail = null, t != null && t.forEach(function(e) {
617
+ return n.push(e);
618
+ });
619
+ }
620
+ return r(e, [
621
+ {
622
+ key: "size",
623
+ value: function() {
624
+ return this.length;
625
+ }
626
+ },
627
+ {
628
+ key: "insertBefore",
629
+ value: function(e, t) {
630
+ return o(t.prev, a(e), t, this);
631
+ }
632
+ },
633
+ {
634
+ key: "insertAfter",
635
+ value: function(e, t) {
636
+ return o(t, a(e), t.next, this);
637
+ }
638
+ },
639
+ {
640
+ key: "insertNodeBefore",
641
+ value: function(e, t) {
642
+ return o(t.prev, e, t, this);
643
+ }
644
+ },
645
+ {
646
+ key: "insertNodeAfter",
647
+ value: function(e, t) {
648
+ return o(t, e, t.next, this);
649
+ }
650
+ },
651
+ {
652
+ key: "push",
653
+ value: function(e) {
654
+ return o(this.tail, a(e), null, this);
655
+ }
656
+ },
657
+ {
658
+ key: "unshift",
659
+ value: function(e) {
660
+ return o(null, a(e), this.head, this);
661
+ }
662
+ },
663
+ {
664
+ key: "remove",
665
+ value: function(e) {
666
+ return s(e, this);
667
+ }
668
+ },
669
+ {
670
+ key: "pop",
671
+ value: function() {
672
+ return s(this.tail, this).value;
673
+ }
674
+ },
675
+ {
676
+ key: "popNode",
677
+ value: function() {
678
+ return s(this.tail, this);
679
+ }
680
+ },
681
+ {
682
+ key: "shift",
683
+ value: function() {
684
+ return s(this.head, this).value;
685
+ }
686
+ },
687
+ {
688
+ key: "shiftNode",
689
+ value: function() {
690
+ return s(this.head, this);
691
+ }
692
+ },
693
+ {
694
+ key: "get_object_at",
695
+ value: function(e) {
696
+ if (e <= this.length()) {
697
+ for (var t = 1, n = this.head; t < e;) n = n.next, t++;
698
+ return n.value;
699
+ }
700
+ }
701
+ },
702
+ {
703
+ key: "set_object_at",
704
+ value: function(e, t) {
705
+ if (e <= this.length()) {
706
+ for (var n = 1, r = this.head; n < e;) r = r.next, n++;
707
+ r.value = t;
708
+ }
709
+ }
710
+ }
711
+ ]), e;
712
+ }();
713
+ }),
714
+ (function(e, t, n) {
715
+ function r(e, t, n) {
716
+ this.x = null, this.y = null, e == null && t == null && n == null ? (this.x = 0, this.y = 0) : typeof e == "number" && typeof t == "number" && n == null ? (this.x = e, this.y = t) : e.constructor.name == "Point" && t == null && n == null && (n = e, this.x = n.x, this.y = n.y);
717
+ }
718
+ r.prototype.getX = function() {
719
+ return this.x;
720
+ }, r.prototype.getY = function() {
721
+ return this.y;
722
+ }, r.prototype.getLocation = function() {
723
+ return new r(this.x, this.y);
724
+ }, r.prototype.setLocation = function(e, t, n) {
725
+ e.constructor.name == "Point" && t == null && n == null ? (n = e, this.setLocation(n.x, n.y)) : typeof e == "number" && typeof t == "number" && n == null && (parseInt(e) == e && parseInt(t) == t ? this.move(e, t) : (this.x = Math.floor(e + .5), this.y = Math.floor(t + .5)));
726
+ }, r.prototype.move = function(e, t) {
727
+ this.x = e, this.y = t;
728
+ }, r.prototype.translate = function(e, t) {
729
+ this.x += e, this.y += t;
730
+ }, r.prototype.equals = function(e) {
731
+ if (e.constructor.name == "Point") {
732
+ var t = e;
733
+ return this.x == t.x && this.y == t.y;
734
+ }
735
+ return this == e;
736
+ }, r.prototype.toString = function() {
737
+ return new r().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
738
+ }, e.exports = r;
739
+ }),
740
+ (function(e, t, n) {
741
+ function r(e, t, n, r) {
742
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && n != null && r != null && (this.x = e, this.y = t, this.width = n, this.height = r);
743
+ }
744
+ r.prototype.getX = function() {
745
+ return this.x;
746
+ }, r.prototype.setX = function(e) {
747
+ this.x = e;
748
+ }, r.prototype.getY = function() {
749
+ return this.y;
750
+ }, r.prototype.setY = function(e) {
751
+ this.y = e;
752
+ }, r.prototype.getWidth = function() {
753
+ return this.width;
754
+ }, r.prototype.setWidth = function(e) {
755
+ this.width = e;
756
+ }, r.prototype.getHeight = function() {
757
+ return this.height;
758
+ }, r.prototype.setHeight = function(e) {
759
+ this.height = e;
760
+ }, r.prototype.getRight = function() {
761
+ return this.x + this.width;
762
+ }, r.prototype.getBottom = function() {
763
+ return this.y + this.height;
764
+ }, r.prototype.intersects = function(e) {
765
+ return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
766
+ }, r.prototype.getCenterX = function() {
767
+ return this.x + this.width / 2;
768
+ }, r.prototype.getMinX = function() {
769
+ return this.getX();
770
+ }, r.prototype.getMaxX = function() {
771
+ return this.getX() + this.width;
772
+ }, r.prototype.getCenterY = function() {
773
+ return this.y + this.height / 2;
774
+ }, r.prototype.getMinY = function() {
775
+ return this.getY();
776
+ }, r.prototype.getMaxY = function() {
777
+ return this.getY() + this.height;
778
+ }, r.prototype.getWidthHalf = function() {
779
+ return this.width / 2;
780
+ }, r.prototype.getHeightHalf = function() {
781
+ return this.height / 2;
782
+ }, e.exports = r;
783
+ }),
784
+ (function(e, t, n) {
785
+ var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
786
+ return typeof e;
787
+ } : function(e) {
788
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
789
+ };
790
+ function i() {}
791
+ i.lastID = 0, i.createID = function(e) {
792
+ return i.isPrimitive(e) ? e : e.uniqueID == null ? (e.uniqueID = i.getString(), i.lastID++, e.uniqueID) : e.uniqueID;
793
+ }, i.getString = function(e) {
794
+ return e == null && (e = i.lastID), "Object#" + e;
795
+ }, i.isPrimitive = function(e) {
796
+ var t = e === void 0 ? "undefined" : r(e);
797
+ return e == null || t != "object" && t != "function";
798
+ }, e.exports = i;
799
+ }),
800
+ (function(e, t, n) {
801
+ function r(e) {
802
+ if (Array.isArray(e)) {
803
+ for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
804
+ return n;
805
+ } else return Array.from(e);
806
+ }
807
+ var i = n(0), a = n(6), o = n(3), s = n(1), c = n(5), l = n(4), u = n(17), d = n(27);
808
+ function f(e) {
809
+ d.call(this), this.layoutQuality = i.QUALITY, this.createBendsAsNeeded = i.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = i.DEFAULT_INCREMENTAL, this.animationOnLayout = i.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = i.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = i.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = i.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new a(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, e != null && (this.isRemoteUse = e);
810
+ }
811
+ f.RANDOM_SEED = 1, f.prototype = Object.create(d.prototype), f.prototype.getGraphManager = function() {
812
+ return this.graphManager;
813
+ }, f.prototype.getAllNodes = function() {
814
+ return this.graphManager.getAllNodes();
815
+ }, f.prototype.getAllEdges = function() {
816
+ return this.graphManager.getAllEdges();
817
+ }, f.prototype.getAllNodesToApplyGravitation = function() {
818
+ return this.graphManager.getAllNodesToApplyGravitation();
819
+ }, f.prototype.newGraphManager = function() {
820
+ var e = new a(this);
821
+ return this.graphManager = e, e;
822
+ }, f.prototype.newGraph = function(e) {
823
+ return new c(null, this.graphManager, e);
824
+ }, f.prototype.newNode = function(e) {
825
+ return new o(this.graphManager, e);
826
+ }, f.prototype.newEdge = function(e) {
827
+ return new s(null, null, e);
828
+ }, f.prototype.checkLayoutSuccess = function() {
829
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
830
+ }, f.prototype.runLayout = function() {
831
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
832
+ var e = this.checkLayoutSuccess() ? !1 : this.layout();
833
+ return i.ANIMATE === "during" ? !1 : (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
834
+ }, f.prototype.doPostLayout = function() {
835
+ this.incremental || this.transform(), this.update();
836
+ }, f.prototype.update2 = function() {
837
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
838
+ for (var e = this.graphManager.getAllEdges(), t = 0; t < e.length; t++) e[t];
839
+ for (var n = this.graphManager.getRoot().getNodes(), t = 0; t < n.length; t++) n[t];
840
+ this.update(this.graphManager.getRoot());
841
+ }
842
+ }, f.prototype.update = function(e) {
843
+ if (e == null) this.update2();
844
+ else if (e instanceof o) {
845
+ var t = e;
846
+ if (t.getChild() != null) for (var n = t.getChild().getNodes(), r = 0; r < n.length; r++) update(n[r]);
847
+ t.vGraphObject != null && t.vGraphObject.update(t);
848
+ } else if (e instanceof s) {
849
+ var i = e;
850
+ i.vGraphObject != null && i.vGraphObject.update(i);
851
+ } else if (e instanceof c) {
852
+ var a = e;
853
+ a.vGraphObject != null && a.vGraphObject.update(a);
854
+ }
855
+ }, f.prototype.initParameters = function() {
856
+ this.isSubLayout || (this.layoutQuality = i.QUALITY, this.animationDuringLayout = i.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = i.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = i.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = i.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = i.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = i.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
857
+ }, f.prototype.transform = function(e) {
858
+ if (e == null) this.transform(new l(0, 0));
859
+ else {
860
+ var t = new u(), n = this.graphManager.getRoot().updateLeftTop();
861
+ if (n != null) {
862
+ t.setWorldOrgX(e.x), t.setWorldOrgY(e.y), t.setDeviceOrgX(n.x), t.setDeviceOrgY(n.y);
863
+ for (var r = this.getAllNodes(), i, a = 0; a < r.length; a++) i = r[a], i.transform(t);
864
+ }
865
+ }
866
+ }, f.prototype.positionNodesRandomly = function(e) {
867
+ if (e == null) this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
868
+ else for (var t, n, r = e.getNodes(), i = 0; i < r.length; i++) t = r[i], n = t.getChild(), n == null || n.getNodes().length == 0 ? t.scatter() : (this.positionNodesRandomly(n), t.updateBounds());
869
+ }, f.prototype.getFlatForest = function() {
870
+ for (var e = [], t = !0, n = this.graphManager.getRoot().getNodes(), i = !0, a = 0; a < n.length; a++) n[a].getChild() != null && (i = !1);
871
+ if (!i) return e;
872
+ var o = /* @__PURE__ */ new Set(), s = [], c = /* @__PURE__ */ new Map(), l = [];
873
+ for (l = l.concat(n); l.length > 0 && t;) {
874
+ for (s.push(l[0]); s.length > 0 && t;) {
875
+ var u = s[0];
876
+ s.splice(0, 1), o.add(u);
877
+ for (var d = u.getEdges(), a = 0; a < d.length; a++) {
878
+ var f = d[a].getOtherEnd(u);
879
+ if (c.get(u) != f) if (!o.has(f)) s.push(f), c.set(f, u);
880
+ else {
881
+ t = !1;
882
+ break;
883
+ }
884
+ }
885
+ }
886
+ if (!t) e = [];
887
+ else {
888
+ var p = [].concat(r(o));
889
+ e.push(p);
890
+ for (var a = 0; a < p.length; a++) {
891
+ var m = p[a], h = l.indexOf(m);
892
+ h > -1 && l.splice(h, 1);
893
+ }
894
+ o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
895
+ }
896
+ }
897
+ return e;
898
+ }, f.prototype.createDummyNodesForBendpoints = function(e) {
899
+ for (var t = [], n = e.source, r = this.graphManager.calcLowestCommonAncestor(e.source, e.target), i = 0; i < e.bendpoints.length; i++) {
900
+ var a = this.newNode(null);
901
+ a.setRect(new Point(0, 0), new Dimension(1, 1)), r.add(a);
902
+ var o = this.newEdge(null);
903
+ this.graphManager.add(o, n, a), t.add(a), n = a;
904
+ }
905
+ var o = this.newEdge(null);
906
+ return this.graphManager.add(o, n, e.target), this.edgeToDummyNodes.set(e, t), e.isInterGraph() ? this.graphManager.remove(e) : r.remove(e), t;
907
+ }, f.prototype.createBendpointsFromDummyNodes = function() {
908
+ var e = [];
909
+ e = e.concat(this.graphManager.getAllEdges()), e = [].concat(r(this.edgeToDummyNodes.keys()), e);
910
+ for (var t = 0; t < e.length; t++) {
911
+ var n = e[t];
912
+ if (n.bendpoints.length > 0) {
913
+ for (var i = this.edgeToDummyNodes.get(n), a = 0; a < i.length; a++) {
914
+ var o = i[a], s = new l(o.getCenterX(), o.getCenterY()), c = n.bendpoints.get(a);
915
+ c.x = s.x, c.y = s.y, o.getOwner().remove(o);
916
+ }
917
+ this.graphManager.add(n, n.source, n.target);
918
+ }
919
+ }
920
+ }, f.transform = function(e, t, n, r) {
921
+ if (n != null && r != null) {
922
+ var i = t;
923
+ if (e <= 50) {
924
+ var a = t / n;
925
+ i -= (t - a) / 50 * (50 - e);
926
+ } else {
927
+ var o = t * r;
928
+ i += (o - t) / 50 * (e - 50);
929
+ }
930
+ return i;
931
+ } else {
932
+ var s, c;
933
+ return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
934
+ }
935
+ }, f.findCenterOfTree = function(e) {
936
+ var t = [];
937
+ t = t.concat(e);
938
+ var n = [], r = /* @__PURE__ */ new Map(), i = !1, a = null;
939
+ (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
940
+ for (var o = 0; o < t.length; o++) {
941
+ var s = t[o], c = s.getNeighborsList().size;
942
+ r.set(s, s.getNeighborsList().size), c == 1 && n.push(s);
943
+ }
944
+ var l = [];
945
+ for (l = l.concat(n); !i;) {
946
+ var u = [];
947
+ u = u.concat(l), l = [];
948
+ for (var o = 0; o < t.length; o++) {
949
+ var s = t[o], d = t.indexOf(s);
950
+ d >= 0 && t.splice(d, 1), s.getNeighborsList().forEach(function(e) {
951
+ if (n.indexOf(e) < 0) {
952
+ var t = r.get(e) - 1;
953
+ t == 1 && l.push(e), r.set(e, t);
954
+ }
955
+ });
956
+ }
957
+ n = n.concat(l), (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
958
+ }
959
+ return a;
960
+ }, f.prototype.setGraphManager = function(e) {
961
+ this.graphManager = e;
962
+ }, e.exports = f;
963
+ }),
964
+ (function(e, t, n) {
965
+ function r() {}
966
+ r.seed = 1, r.x = 0, r.nextDouble = function() {
967
+ return r.x = Math.sin(r.seed++) * 1e4, r.x - Math.floor(r.x);
968
+ }, e.exports = r;
969
+ }),
970
+ (function(e, t, n) {
971
+ var r = n(4);
972
+ function i(e, t) {
973
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
974
+ }
975
+ i.prototype.getWorldOrgX = function() {
976
+ return this.lworldOrgX;
977
+ }, i.prototype.setWorldOrgX = function(e) {
978
+ this.lworldOrgX = e;
979
+ }, i.prototype.getWorldOrgY = function() {
980
+ return this.lworldOrgY;
981
+ }, i.prototype.setWorldOrgY = function(e) {
982
+ this.lworldOrgY = e;
983
+ }, i.prototype.getWorldExtX = function() {
984
+ return this.lworldExtX;
985
+ }, i.prototype.setWorldExtX = function(e) {
986
+ this.lworldExtX = e;
987
+ }, i.prototype.getWorldExtY = function() {
988
+ return this.lworldExtY;
989
+ }, i.prototype.setWorldExtY = function(e) {
990
+ this.lworldExtY = e;
991
+ }, i.prototype.getDeviceOrgX = function() {
992
+ return this.ldeviceOrgX;
993
+ }, i.prototype.setDeviceOrgX = function(e) {
994
+ this.ldeviceOrgX = e;
995
+ }, i.prototype.getDeviceOrgY = function() {
996
+ return this.ldeviceOrgY;
997
+ }, i.prototype.setDeviceOrgY = function(e) {
998
+ this.ldeviceOrgY = e;
999
+ }, i.prototype.getDeviceExtX = function() {
1000
+ return this.ldeviceExtX;
1001
+ }, i.prototype.setDeviceExtX = function(e) {
1002
+ this.ldeviceExtX = e;
1003
+ }, i.prototype.getDeviceExtY = function() {
1004
+ return this.ldeviceExtY;
1005
+ }, i.prototype.setDeviceExtY = function(e) {
1006
+ this.ldeviceExtY = e;
1007
+ }, i.prototype.transformX = function(e) {
1008
+ var t = 0, n = this.lworldExtX;
1009
+ return n != 0 && (t = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / n), t;
1010
+ }, i.prototype.transformY = function(e) {
1011
+ var t = 0, n = this.lworldExtY;
1012
+ return n != 0 && (t = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / n), t;
1013
+ }, i.prototype.inverseTransformX = function(e) {
1014
+ var t = 0, n = this.ldeviceExtX;
1015
+ return n != 0 && (t = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / n), t;
1016
+ }, i.prototype.inverseTransformY = function(e) {
1017
+ var t = 0, n = this.ldeviceExtY;
1018
+ return n != 0 && (t = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / n), t;
1019
+ }, i.prototype.inverseTransformPoint = function(e) {
1020
+ return new r(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
1021
+ }, e.exports = i;
1022
+ }),
1023
+ (function(e, t, n) {
1024
+ function r(e) {
1025
+ if (Array.isArray(e)) {
1026
+ for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
1027
+ return n;
1028
+ } else return Array.from(e);
1029
+ }
1030
+ var i = n(15), a = n(7), o = n(0), s = n(8), c = n(9);
1031
+ function l() {
1032
+ i.call(this), this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = a.DEFAULT_EDGE_LENGTH, this.springConstant = a.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = a.DEFAULT_REPULSION_STRENGTH, 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;
1033
+ }
1034
+ for (var u in l.prototype = Object.create(i.prototype), i) l[u] = i[u];
1035
+ l.prototype.initParameters = function() {
1036
+ i.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1037
+ }, l.prototype.calcIdealEdgeLengths = function() {
1038
+ for (var e, t, n, r, i, s, c = this.getGraphManager().getAllEdges(), l = 0; l < c.length; l++) e = c[l], e.idealLength = this.idealEdgeLength, e.isInterGraph && (n = e.getSource(), r = e.getTarget(), i = e.getSourceInLca().getEstimatedSize(), s = e.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (e.idealLength += i + s - 2 * o.SIMPLE_NODE_SIZE), t = e.getLca().getInclusionTreeDepth(), e.idealLength += a.DEFAULT_EDGE_LENGTH * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (n.getInclusionTreeDepth() + r.getInclusionTreeDepth() - 2 * t));
1039
+ }, l.prototype.initSpringEmbedder = function() {
1040
+ var e = this.getAllNodes().length;
1041
+ this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - 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) : (e > a.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - 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.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1042
+ }, l.prototype.calcSpringForces = function() {
1043
+ for (var e = this.getAllEdges(), t, n = 0; n < e.length; n++) t = e[n], this.calcSpringForce(t, t.idealLength);
1044
+ }, l.prototype.calcRepulsionForces = function() {
1045
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n, r, i, o, s = this.getAllNodes(), c;
1046
+ if (this.useFRGridVariant) for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && e && this.updateGrid(), c = /* @__PURE__ */ new Set(), n = 0; n < s.length; n++) i = s[n], this.calculateRepulsionForceOfANode(i, c, e, t), c.add(i);
1047
+ else for (n = 0; n < s.length; n++) for (i = s[n], r = n + 1; r < s.length; r++) o = s[r], i.getOwner() == o.getOwner() && this.calcRepulsionForce(i, o);
1048
+ }, l.prototype.calcGravitationalForces = function() {
1049
+ for (var e, t = this.getAllNodesToApplyGravitation(), n = 0; n < t.length; n++) e = t[n], this.calcGravitationalForce(e);
1050
+ }, l.prototype.moveNodes = function() {
1051
+ for (var e = this.getAllNodes(), t, n = 0; n < e.length; n++) t = e[n], t.move();
1052
+ }, l.prototype.calcSpringForce = function(e, t) {
1053
+ var n = e.getSource(), r = e.getTarget(), i, a, o, s;
1054
+ if (this.uniformLeafNodeSizes && n.getChild() == null && r.getChild() == null) e.updateLengthSimple();
1055
+ else if (e.updateLength(), e.isOverlapingSourceAndTarget) return;
1056
+ i = e.getLength(), i != 0 && (a = this.springConstant * (i - t), o = a * (e.lengthX / i), s = a * (e.lengthY / i), n.springForceX += o, n.springForceY += s, r.springForceX -= o, r.springForceY -= s);
1057
+ }, l.prototype.calcRepulsionForce = function(e, t) {
1058
+ var n = e.getRect(), r = t.getRect(), i = [, ,], o = [
1059
+ ,
1060
+ ,
1061
+ ,
1062
+ ,
1063
+ ], l, u, d, f, p, m, h;
1064
+ if (n.intersects(r)) {
1065
+ s.calcSeparationAmount(n, r, i, a.DEFAULT_EDGE_LENGTH / 2), m = 2 * i[0], h = 2 * i[1];
1066
+ var g = e.noOfChildren * t.noOfChildren / (e.noOfChildren + t.noOfChildren);
1067
+ e.repulsionForceX -= g * m, e.repulsionForceY -= g * h, t.repulsionForceX += g * m, t.repulsionForceY += g * h;
1068
+ } else this.uniformLeafNodeSizes && e.getChild() == null && t.getChild() == null ? (l = r.getCenterX() - n.getCenterX(), u = r.getCenterY() - n.getCenterY()) : (s.getIntersection(n, r, o), l = o[2] - o[0], u = o[3] - o[1]), Math.abs(l) < a.MIN_REPULSION_DIST && (l = c.sign(l) * a.MIN_REPULSION_DIST), Math.abs(u) < a.MIN_REPULSION_DIST && (u = c.sign(u) * a.MIN_REPULSION_DIST), d = l * l + u * u, f = Math.sqrt(d), p = this.repulsionConstant * e.noOfChildren * t.noOfChildren / d, m = p * l / f, h = p * u / f, e.repulsionForceX -= m, e.repulsionForceY -= h, t.repulsionForceX += m, t.repulsionForceY += h;
1069
+ }, l.prototype.calcGravitationalForce = function(e) {
1070
+ var t = e.getOwner(), n = (t.getRight() + t.getLeft()) / 2, r = (t.getTop() + t.getBottom()) / 2, i = e.getCenterX() - n, a = e.getCenterY() - r, o = Math.abs(i) + e.getWidth() / 2, s = Math.abs(a) + e.getHeight() / 2, c;
1071
+ e.getOwner() == this.graphManager.getRoot() ? (c = t.getEstimatedSize() * this.gravityRangeFactor, (o > c || s > c) && (e.gravitationForceX = -this.gravityConstant * i, e.gravitationForceY = -this.gravityConstant * a)) : (c = t.getEstimatedSize() * this.compoundGravityRangeFactor, (o > c || s > c) && (e.gravitationForceX = -this.gravityConstant * i * this.compoundGravityConstant, e.gravitationForceY = -this.gravityConstant * a * this.compoundGravityConstant));
1072
+ }, l.prototype.isConverged = function() {
1073
+ var e, t = !1;
1074
+ return this.totalIterations > this.maxIterations / 3 && (t = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), e = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, e || t;
1075
+ }, l.prototype.animate = function() {
1076
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1077
+ }, l.prototype.calcNoOfChildrenForAllNodes = function() {
1078
+ for (var e, t = this.graphManager.getAllNodes(), n = 0; n < t.length; n++) e = t[n], e.noOfChildren = e.getNoOfChildren();
1079
+ }, l.prototype.calcGrid = function(e) {
1080
+ var t = 0, n = 0;
1081
+ t = parseInt(Math.ceil((e.getRight() - e.getLeft()) / this.repulsionRange)), n = parseInt(Math.ceil((e.getBottom() - e.getTop()) / this.repulsionRange));
1082
+ for (var r = Array(t), i = 0; i < t; i++) r[i] = Array(n);
1083
+ for (var i = 0; i < t; i++) for (var a = 0; a < n; a++) r[i][a] = [];
1084
+ return r;
1085
+ }, l.prototype.addNodeToGrid = function(e, t, n) {
1086
+ var r = 0, i = 0, a = 0, o = 0;
1087
+ r = parseInt(Math.floor((e.getRect().x - t) / this.repulsionRange)), i = parseInt(Math.floor((e.getRect().width + e.getRect().x - t) / this.repulsionRange)), a = parseInt(Math.floor((e.getRect().y - n) / this.repulsionRange)), o = parseInt(Math.floor((e.getRect().height + e.getRect().y - n) / this.repulsionRange));
1088
+ for (var s = r; s <= i; s++) for (var c = a; c <= o; c++) this.grid[s][c].push(e), e.setGridCoordinates(r, i, a, o);
1089
+ }, l.prototype.updateGrid = function() {
1090
+ var e, t, n = this.getAllNodes();
1091
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), e = 0; e < n.length; e++) t = n[e], this.addNodeToGrid(t, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1092
+ }, l.prototype.calculateRepulsionForceOfANode = function(e, t, n, i) {
1093
+ if (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && n || i) {
1094
+ var o = /* @__PURE__ */ new Set();
1095
+ e.surrounding = [];
1096
+ for (var s, c = this.grid, l = e.startX - 1; l < e.finishX + 2; l++) for (var u = e.startY - 1; u < e.finishY + 2; u++) if (!(l < 0 || u < 0 || l >= c.length || u >= c[0].length)) {
1097
+ for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], !(e.getOwner() != s.getOwner() || e == s) && !t.has(s) && !o.has(s)) {
1098
+ var f = Math.abs(e.getCenterX() - s.getCenterX()) - (e.getWidth() / 2 + s.getWidth() / 2), p = Math.abs(e.getCenterY() - s.getCenterY()) - (e.getHeight() / 2 + s.getHeight() / 2);
1099
+ f <= this.repulsionRange && p <= this.repulsionRange && o.add(s);
1100
+ }
1101
+ }
1102
+ e.surrounding = [].concat(r(o));
1103
+ }
1104
+ for (l = 0; l < e.surrounding.length; l++) this.calcRepulsionForce(e, e.surrounding[l]);
1105
+ }, l.prototype.calcRepulsionRange = function() {
1106
+ return 0;
1107
+ }, e.exports = l;
1108
+ }),
1109
+ (function(e, t, n) {
1110
+ var r = n(1), i = n(7);
1111
+ function a(e, t, n) {
1112
+ r.call(this, e, t, n), this.idealLength = i.DEFAULT_EDGE_LENGTH;
1113
+ }
1114
+ for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
1115
+ e.exports = a;
1116
+ }),
1117
+ (function(e, t, n) {
1118
+ var r = n(3);
1119
+ function i(e, t, n, i) {
1120
+ r.call(this, e, t, n, i), 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 = [];
1121
+ }
1122
+ for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1123
+ i.prototype.setGridCoordinates = function(e, t, n, r) {
1124
+ this.startX = e, this.finishX = t, this.startY = n, this.finishY = r;
1125
+ }, e.exports = i;
1126
+ }),
1127
+ (function(e, t, n) {
1128
+ function r(e, t) {
1129
+ this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1130
+ }
1131
+ r.prototype.getWidth = function() {
1132
+ return this.width;
1133
+ }, r.prototype.setWidth = function(e) {
1134
+ this.width = e;
1135
+ }, r.prototype.getHeight = function() {
1136
+ return this.height;
1137
+ }, r.prototype.setHeight = function(e) {
1138
+ this.height = e;
1139
+ }, e.exports = r;
1140
+ }),
1141
+ (function(e, t, n) {
1142
+ var r = n(14);
1143
+ function i() {
1144
+ this.map = {}, this.keys = [];
1145
+ }
1146
+ i.prototype.put = function(e, t) {
1147
+ var n = r.createID(e);
1148
+ this.contains(n) || (this.map[n] = t, this.keys.push(e));
1149
+ }, i.prototype.contains = function(e) {
1150
+ return r.createID(e), this.map[e] != null;
1151
+ }, i.prototype.get = function(e) {
1152
+ var t = r.createID(e);
1153
+ return this.map[t];
1154
+ }, i.prototype.keySet = function() {
1155
+ return this.keys;
1156
+ }, e.exports = i;
1157
+ }),
1158
+ (function(e, t, n) {
1159
+ var r = n(14);
1160
+ function i() {
1161
+ this.set = {};
1162
+ }
1163
+ i.prototype.add = function(e) {
1164
+ var t = r.createID(e);
1165
+ this.contains(t) || (this.set[t] = e);
1166
+ }, i.prototype.remove = function(e) {
1167
+ delete this.set[r.createID(e)];
1168
+ }, i.prototype.clear = function() {
1169
+ this.set = {};
1170
+ }, i.prototype.contains = function(e) {
1171
+ return this.set[r.createID(e)] == e;
1172
+ }, i.prototype.isEmpty = function() {
1173
+ return this.size() === 0;
1174
+ }, i.prototype.size = function() {
1175
+ return Object.keys(this.set).length;
1176
+ }, i.prototype.addAllTo = function(e) {
1177
+ for (var t = Object.keys(this.set), n = t.length, r = 0; r < n; r++) e.push(this.set[t[r]]);
1178
+ }, i.prototype.size = function() {
1179
+ return Object.keys(this.set).length;
1180
+ }, i.prototype.addAll = function(e) {
1181
+ for (var t = e.length, n = 0; n < t; n++) {
1182
+ var r = e[n];
1183
+ this.add(r);
1184
+ }
1185
+ }, e.exports = i;
1186
+ }),
1187
+ (function(e, t, n) {
1188
+ var r = function() {
1189
+ function e(e, t) {
1190
+ for (var n = 0; n < t.length; n++) {
1191
+ var r = t[n];
1192
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1193
+ }
1194
+ }
1195
+ return function(t, n, r) {
1196
+ return n && e(t.prototype, n), r && e(t, r), t;
1197
+ };
1198
+ }();
1199
+ function i(e, t) {
1200
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1201
+ }
1202
+ var a = n(11);
1203
+ e.exports = function() {
1204
+ function e(t, n) {
1205
+ i(this, e), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1206
+ var r = void 0;
1207
+ r = t instanceof a ? t.size() : t.length, this._quicksort(t, 0, r - 1);
1208
+ }
1209
+ return r(e, [
1210
+ {
1211
+ key: "_quicksort",
1212
+ value: function(e, t, n) {
1213
+ if (t < n) {
1214
+ var r = this._partition(e, t, n);
1215
+ this._quicksort(e, t, r), this._quicksort(e, r + 1, n);
1216
+ }
1217
+ }
1218
+ },
1219
+ {
1220
+ key: "_partition",
1221
+ value: function(e, t, n) {
1222
+ for (var r = this._get(e, t), i = t, a = n;;) {
1223
+ for (; this.compareFunction(r, this._get(e, a));) a--;
1224
+ for (; this.compareFunction(this._get(e, i), r);) i++;
1225
+ if (i < a) this._swap(e, i, a), i++, a--;
1226
+ else return a;
1227
+ }
1228
+ }
1229
+ },
1230
+ {
1231
+ key: "_get",
1232
+ value: function(e, t) {
1233
+ return e instanceof a ? e.get_object_at(t) : e[t];
1234
+ }
1235
+ },
1236
+ {
1237
+ key: "_set",
1238
+ value: function(e, t, n) {
1239
+ e instanceof a ? e.set_object_at(t, n) : e[t] = n;
1240
+ }
1241
+ },
1242
+ {
1243
+ key: "_swap",
1244
+ value: function(e, t, n) {
1245
+ var r = this._get(e, t);
1246
+ this._set(e, t, this._get(e, n)), this._set(e, n, r);
1247
+ }
1248
+ },
1249
+ {
1250
+ key: "_defaultCompareFunction",
1251
+ value: function(e, t) {
1252
+ return t > e;
1253
+ }
1254
+ }
1255
+ ]), e;
1256
+ }();
1257
+ }),
1258
+ (function(e, t, n) {
1259
+ var r = function() {
1260
+ function e(e, t) {
1261
+ for (var n = 0; n < t.length; n++) {
1262
+ var r = t[n];
1263
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1264
+ }
1265
+ }
1266
+ return function(t, n, r) {
1267
+ return n && e(t.prototype, n), r && e(t, r), t;
1268
+ };
1269
+ }();
1270
+ function i(e, t) {
1271
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1272
+ }
1273
+ e.exports = function() {
1274
+ function e(t, n) {
1275
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1276
+ i(this, e), this.sequence1 = t, this.sequence2 = n, this.match_score = r, this.mismatch_penalty = a, this.gap_penalty = o, this.iMax = t.length + 1, this.jMax = n.length + 1, this.grid = Array(this.iMax);
1277
+ for (var s = 0; s < this.iMax; s++) {
1278
+ this.grid[s] = Array(this.jMax);
1279
+ for (var c = 0; c < this.jMax; c++) this.grid[s][c] = 0;
1280
+ }
1281
+ this.tracebackGrid = Array(this.iMax);
1282
+ for (var l = 0; l < this.iMax; l++) {
1283
+ this.tracebackGrid[l] = Array(this.jMax);
1284
+ for (var u = 0; u < this.jMax; u++) this.tracebackGrid[l][u] = [
1285
+ null,
1286
+ null,
1287
+ null
1288
+ ];
1289
+ }
1290
+ this.alignments = [], this.score = -1, this.computeGrids();
1291
+ }
1292
+ return r(e, [
1293
+ {
1294
+ key: "getScore",
1295
+ value: function() {
1296
+ return this.score;
1297
+ }
1298
+ },
1299
+ {
1300
+ key: "getAlignments",
1301
+ value: function() {
1302
+ return this.alignments;
1303
+ }
1304
+ },
1305
+ {
1306
+ key: "computeGrids",
1307
+ value: function() {
1308
+ for (var e = 1; e < this.jMax; e++) this.grid[0][e] = this.grid[0][e - 1] + this.gap_penalty, this.tracebackGrid[0][e] = [
1309
+ !1,
1310
+ !1,
1311
+ !0
1312
+ ];
1313
+ for (var t = 1; t < this.iMax; t++) this.grid[t][0] = this.grid[t - 1][0] + this.gap_penalty, this.tracebackGrid[t][0] = [
1314
+ !1,
1315
+ !0,
1316
+ !1
1317
+ ];
1318
+ for (var n = 1; n < this.iMax; n++) for (var r = 1; r < this.jMax; r++) {
1319
+ var i = void 0;
1320
+ i = this.sequence1[n - 1] === this.sequence2[r - 1] ? this.grid[n - 1][r - 1] + this.match_score : this.grid[n - 1][r - 1] + this.mismatch_penalty;
1321
+ var a = this.grid[n - 1][r] + this.gap_penalty, o = this.grid[n][r - 1] + this.gap_penalty, s = [
1322
+ i,
1323
+ a,
1324
+ o
1325
+ ], c = this.arrayAllMaxIndexes(s);
1326
+ this.grid[n][r] = s[c[0]], this.tracebackGrid[n][r] = [
1327
+ c.includes(0),
1328
+ c.includes(1),
1329
+ c.includes(2)
1330
+ ];
1331
+ }
1332
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1333
+ }
1334
+ },
1335
+ {
1336
+ key: "alignmentTraceback",
1337
+ value: function() {
1338
+ var e = [];
1339
+ for (e.push({
1340
+ pos: [this.sequence1.length, this.sequence2.length],
1341
+ seq1: "",
1342
+ seq2: ""
1343
+ }); e[0];) {
1344
+ var t = e[0], n = this.tracebackGrid[t.pos[0]][t.pos[1]];
1345
+ n[0] && e.push({
1346
+ pos: [t.pos[0] - 1, t.pos[1] - 1],
1347
+ seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
1348
+ seq2: this.sequence2[t.pos[1] - 1] + t.seq2
1349
+ }), n[1] && e.push({
1350
+ pos: [t.pos[0] - 1, t.pos[1]],
1351
+ seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
1352
+ seq2: "-" + t.seq2
1353
+ }), n[2] && e.push({
1354
+ pos: [t.pos[0], t.pos[1] - 1],
1355
+ seq1: "-" + t.seq1,
1356
+ seq2: this.sequence2[t.pos[1] - 1] + t.seq2
1357
+ }), t.pos[0] === 0 && t.pos[1] === 0 && this.alignments.push({
1358
+ sequence1: t.seq1,
1359
+ sequence2: t.seq2
1360
+ }), e.shift();
1361
+ }
1362
+ return this.alignments;
1363
+ }
1364
+ },
1365
+ {
1366
+ key: "getAllIndexes",
1367
+ value: function(e, t) {
1368
+ for (var n = [], r = -1; (r = e.indexOf(t, r + 1)) !== -1;) n.push(r);
1369
+ return n;
1370
+ }
1371
+ },
1372
+ {
1373
+ key: "arrayAllMaxIndexes",
1374
+ value: function(e) {
1375
+ return this.getAllIndexes(e, Math.max.apply(null, e));
1376
+ }
1377
+ }
1378
+ ]), e;
1379
+ }();
1380
+ }),
1381
+ (function(e, t, n) {
1382
+ var r = function() {};
1383
+ r.FDLayout = n(18), r.FDLayoutConstants = n(7), r.FDLayoutEdge = n(19), r.FDLayoutNode = n(20), r.DimensionD = n(21), r.HashMap = n(22), r.HashSet = n(23), r.IGeometry = n(8), r.IMath = n(9), r.Integer = n(10), r.Point = n(12), r.PointD = n(4), r.RandomSeed = n(16), r.RectangleD = n(13), r.Transform = n(17), r.UniqueIDGeneretor = n(14), r.Quicksort = n(24), r.LinkedList = n(11), r.LGraphObject = n(2), r.LGraph = n(5), r.LEdge = n(1), r.LGraphManager = n(6), r.LNode = n(3), r.Layout = n(15), r.LayoutConstants = n(0), r.NeedlemanWunsch = n(25), e.exports = r;
1384
+ }),
1385
+ (function(e, t, n) {
1386
+ function r() {
1387
+ this.listeners = [];
1388
+ }
1389
+ var i = r.prototype;
1390
+ i.addListener = function(e, t) {
1391
+ this.listeners.push({
1392
+ event: e,
1393
+ callback: t
1394
+ });
1395
+ }, i.removeListener = function(e, t) {
1396
+ for (var n = this.listeners.length; n >= 0; n--) {
1397
+ var r = this.listeners[n];
1398
+ r.event === e && r.callback === t && this.listeners.splice(n, 1);
1399
+ }
1400
+ }, i.emit = function(e, t) {
1401
+ for (var n = 0; n < this.listeners.length; n++) {
1402
+ var r = this.listeners[n];
1403
+ e === r.event && r.callback(t);
1404
+ }
1405
+ }, e.exports = r;
1406
+ })
1407
+ ]);
1408
+ });
1409
+ })), c = /* @__PURE__ */ t(((e, t) => {
1410
+ (function(n, r) {
1411
+ typeof e == "object" && typeof t == "object" ? t.exports = r(s()) : typeof define == "function" && define.amd ? define(["layout-base"], r) : typeof e == "object" ? e.coseBase = r(s()) : n.coseBase = r(n.layoutBase);
1412
+ })(e, function(e) {
1413
+ return (function(e) {
1414
+ var t = {};
1415
+ function n(r) {
1416
+ if (t[r]) return t[r].exports;
1417
+ var i = t[r] = {
1418
+ i: r,
1419
+ l: !1,
1420
+ exports: {}
1421
+ };
1422
+ return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
1423
+ }
1424
+ return n.m = e, n.c = t, n.i = function(e) {
1425
+ return e;
1426
+ }, n.d = function(e, t, r) {
1427
+ n.o(e, t) || Object.defineProperty(e, t, {
1428
+ configurable: !1,
1429
+ enumerable: !0,
1430
+ get: r
1431
+ });
1432
+ }, n.n = function(e) {
1433
+ var t = e && e.__esModule ? function() {
1434
+ return e.default;
1435
+ } : function() {
1436
+ return e;
1437
+ };
1438
+ return n.d(t, "a", t), t;
1439
+ }, n.o = function(e, t) {
1440
+ return Object.prototype.hasOwnProperty.call(e, t);
1441
+ }, n.p = "", n(n.s = 7);
1442
+ })([
1443
+ (function(t, n) {
1444
+ t.exports = e;
1445
+ }),
1446
+ (function(e, t, n) {
1447
+ var r = n(0).FDLayoutConstants;
1448
+ function i() {}
1449
+ for (var a in r) i[a] = r[a];
1450
+ i.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, i.DEFAULT_RADIAL_SEPARATION = r.DEFAULT_EDGE_LENGTH, i.DEFAULT_COMPONENT_SEPERATION = 60, i.TILE = !0, i.TILING_PADDING_VERTICAL = 10, i.TILING_PADDING_HORIZONTAL = 10, i.TREE_REDUCTION_ON_INCREMENTAL = !1, e.exports = i;
1451
+ }),
1452
+ (function(e, t, n) {
1453
+ var r = n(0).FDLayoutEdge;
1454
+ function i(e, t, n) {
1455
+ r.call(this, e, t, n);
1456
+ }
1457
+ for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1458
+ e.exports = i;
1459
+ }),
1460
+ (function(e, t, n) {
1461
+ var r = n(0).LGraph;
1462
+ function i(e, t, n) {
1463
+ r.call(this, e, t, n);
1464
+ }
1465
+ for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1466
+ e.exports = i;
1467
+ }),
1468
+ (function(e, t, n) {
1469
+ var r = n(0).LGraphManager;
1470
+ function i(e) {
1471
+ r.call(this, e);
1472
+ }
1473
+ for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1474
+ e.exports = i;
1475
+ }),
1476
+ (function(e, t, n) {
1477
+ var r = n(0).FDLayoutNode, i = n(0).IMath;
1478
+ function a(e, t, n, i) {
1479
+ r.call(this, e, t, n, i);
1480
+ }
1481
+ for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
1482
+ a.prototype.move = function() {
1483
+ var e = this.graphManager.getLayout();
1484
+ this.displacementX = e.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = e.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > e.coolingFactor * e.maxNodeDisplacement && (this.displacementX = e.coolingFactor * e.maxNodeDisplacement * i.sign(this.displacementX)), Math.abs(this.displacementY) > e.coolingFactor * e.maxNodeDisplacement && (this.displacementY = e.coolingFactor * e.maxNodeDisplacement * i.sign(this.displacementY)), this.child == null || this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), e.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;
1485
+ }, a.prototype.propogateDisplacementToChildren = function(e, t) {
1486
+ for (var n = this.getChild().getNodes(), r, i = 0; i < n.length; i++) r = n[i], r.getChild() == null ? (r.moveBy(e, t), r.displacementX += e, r.displacementY += t) : r.propogateDisplacementToChildren(e, t);
1487
+ }, a.prototype.setPred1 = function(e) {
1488
+ this.pred1 = e;
1489
+ }, a.prototype.getPred1 = function() {
1490
+ return pred1;
1491
+ }, a.prototype.getPred2 = function() {
1492
+ return pred2;
1493
+ }, a.prototype.setNext = function(e) {
1494
+ this.next = e;
1495
+ }, a.prototype.getNext = function() {
1496
+ return next;
1497
+ }, a.prototype.setProcessed = function(e) {
1498
+ this.processed = e;
1499
+ }, a.prototype.isProcessed = function() {
1500
+ return processed;
1501
+ }, e.exports = a;
1502
+ }),
1503
+ (function(e, t, n) {
1504
+ var r = n(0).FDLayout, i = n(4), a = n(3), o = n(5), s = n(2), c = n(1), l = n(0).FDLayoutConstants, u = n(0).LayoutConstants, d = n(0).Point, f = n(0).PointD, p = n(0).Layout, m = n(0).Integer, h = n(0).IGeometry, g = n(0).LGraph, _ = n(0).Transform;
1505
+ function v() {
1506
+ r.call(this), this.toBeTiled = {};
1507
+ }
1508
+ for (var y in v.prototype = Object.create(r.prototype), r) v[y] = r[y];
1509
+ v.prototype.newGraphManager = function() {
1510
+ var e = new i(this);
1511
+ return this.graphManager = e, e;
1512
+ }, v.prototype.newGraph = function(e) {
1513
+ return new a(null, this.graphManager, e);
1514
+ }, v.prototype.newNode = function(e) {
1515
+ return new o(this.graphManager, e);
1516
+ }, v.prototype.newEdge = function(e) {
1517
+ return new s(null, null, e);
1518
+ }, v.prototype.initParameters = function() {
1519
+ r.prototype.initParameters.call(this, arguments), this.isSubLayout || (c.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = l.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = l.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = l.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = l.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / l.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = l.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1520
+ }, v.prototype.layout = function() {
1521
+ return u.DEFAULT_CREATE_BENDS_AS_NEEDED && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1522
+ }, v.prototype.classicLayout = function() {
1523
+ 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) {
1524
+ var e = this.getFlatForest();
1525
+ if (e.length > 0) this.positionNodesRadially(e);
1526
+ else {
1527
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1528
+ var t = new Set(this.getAllNodes()), n = this.nodesWithGravity.filter(function(e) {
1529
+ return t.has(e);
1530
+ });
1531
+ this.graphManager.setAllNodesToApplyGravitation(n), this.positionNodesRandomly();
1532
+ }
1533
+ } else if (c.TREE_REDUCTION_ON_INCREMENTAL) {
1534
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1535
+ var t = new Set(this.getAllNodes()), n = this.nodesWithGravity.filter(function(e) {
1536
+ return t.has(e);
1537
+ });
1538
+ this.graphManager.setAllNodesToApplyGravitation(n);
1539
+ }
1540
+ return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1541
+ }, v.prototype.tick = function() {
1542
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1543
+ else return !0;
1544
+ if (this.totalIterations % l.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1545
+ if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1546
+ else return !0;
1547
+ this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - 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));
1548
+ }
1549
+ if (this.isTreeGrowing) {
1550
+ if (this.growTreeIterations % 10 == 0) if (this.prunedNodesAll.length > 0) {
1551
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1552
+ var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1553
+ return e.has(t);
1554
+ });
1555
+ this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1556
+ } else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1557
+ this.growTreeIterations++;
1558
+ }
1559
+ if (this.isGrowthFinished) {
1560
+ if (this.isConverged()) return !0;
1561
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1562
+ }
1563
+ var n = !this.isTreeGrowing && !this.isGrowthFinished, r = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1564
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(n, r), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1565
+ }, v.prototype.getPositionsData = function() {
1566
+ for (var e = this.graphManager.getAllNodes(), t = {}, n = 0; n < e.length; n++) {
1567
+ var r = e[n].rect, i = e[n].id;
1568
+ t[i] = {
1569
+ id: i,
1570
+ x: r.getCenterX(),
1571
+ y: r.getCenterY(),
1572
+ w: r.width,
1573
+ h: r.height
1574
+ };
1575
+ }
1576
+ return t;
1577
+ }, v.prototype.runSpringEmbedder = function() {
1578
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1579
+ var e = !1;
1580
+ if (l.ANIMATE === "during") this.emit("layoutstarted");
1581
+ else {
1582
+ for (; !e;) e = this.tick();
1583
+ this.graphManager.updateBounds();
1584
+ }
1585
+ }, v.prototype.calculateNodesToApplyGravitationTo = function() {
1586
+ var e = [], t, n = this.graphManager.getGraphs(), r = n.length, i;
1587
+ for (i = 0; i < r; i++) t = n[i], t.updateConnected(), t.isConnected || (e = e.concat(t.getNodes()));
1588
+ return e;
1589
+ }, v.prototype.createBendpoints = function() {
1590
+ var e = [];
1591
+ e = e.concat(this.graphManager.getAllEdges());
1592
+ var t = /* @__PURE__ */ new Set(), n;
1593
+ for (n = 0; n < e.length; n++) {
1594
+ var r = e[n];
1595
+ if (!t.has(r)) {
1596
+ var i = r.getSource(), a = r.getTarget();
1597
+ if (i == a) r.getBendpoints().push(new f()), r.getBendpoints().push(new f()), this.createDummyNodesForBendpoints(r), t.add(r);
1598
+ else {
1599
+ var o = [];
1600
+ if (o = o.concat(i.getEdgeListToNode(a)), o = o.concat(a.getEdgeListToNode(i)), !t.has(o[0])) {
1601
+ if (o.length > 1) {
1602
+ var s;
1603
+ for (s = 0; s < o.length; s++) {
1604
+ var c = o[s];
1605
+ c.getBendpoints().push(new f()), this.createDummyNodesForBendpoints(c);
1606
+ }
1607
+ }
1608
+ o.forEach(function(e) {
1609
+ t.add(e);
1610
+ });
1611
+ }
1612
+ }
1613
+ }
1614
+ if (t.size == e.length) break;
1615
+ }
1616
+ }, v.prototype.positionNodesRadially = function(e) {
1617
+ for (var t = new d(0, 0), n = Math.ceil(Math.sqrt(e.length)), r = 0, i = 0, a = 0, o = new f(0, 0), s = 0; s < e.length; s++) {
1618
+ s % n == 0 && (a = 0, i = r, s != 0 && (i += c.DEFAULT_COMPONENT_SEPERATION), r = 0);
1619
+ var l = e[s], m = p.findCenterOfTree(l);
1620
+ t.x = a, t.y = i, o = v.radialLayout(l, m, t), o.y > r && (r = Math.floor(o.y)), a = Math.floor(o.x + c.DEFAULT_COMPONENT_SEPERATION);
1621
+ }
1622
+ this.transform(new f(u.WORLD_CENTER_X - o.x / 2, u.WORLD_CENTER_Y - o.y / 2));
1623
+ }, v.radialLayout = function(e, t, n) {
1624
+ var r = Math.max(this.maxDiagonalInTree(e), c.DEFAULT_RADIAL_SEPARATION);
1625
+ v.branchRadialLayout(t, null, 0, 359, 0, r);
1626
+ var i = g.calculateBounds(e), a = new _();
1627
+ a.setDeviceOrgX(i.getMinX()), a.setDeviceOrgY(i.getMinY()), a.setWorldOrgX(n.x), a.setWorldOrgY(n.y);
1628
+ for (var o = 0; o < e.length; o++) e[o].transform(a);
1629
+ var s = new f(i.getMaxX(), i.getMaxY());
1630
+ return a.inverseTransformPoint(s);
1631
+ }, v.branchRadialLayout = function(e, t, n, r, i, a) {
1632
+ var o = (r - n + 1) / 2;
1633
+ o < 0 && (o += 180);
1634
+ var s = (o + n) % 360 * h.TWO_PI / 360, c = i * Math.cos(s), l = i * Math.sin(s);
1635
+ e.setCenter(c, l);
1636
+ var u = [];
1637
+ u = u.concat(e.getEdges());
1638
+ var d = u.length;
1639
+ t != null && d--;
1640
+ for (var f = 0, p = u.length, m, g = e.getEdgesBetween(t); g.length > 1;) {
1641
+ var _ = g[0];
1642
+ g.splice(0, 1);
1643
+ var y = u.indexOf(_);
1644
+ y >= 0 && u.splice(y, 1), p--, d--;
1645
+ }
1646
+ m = t == null ? 0 : (u.indexOf(g[0]) + 1) % p;
1647
+ for (var b = Math.abs(r - n) / d, x = m; f != d; x = ++x % p) {
1648
+ var S = u[x].getOtherEnd(e);
1649
+ if (S != t) {
1650
+ var C = (n + f * b) % 360, w = (C + b) % 360;
1651
+ v.branchRadialLayout(S, e, C, w, i + a, a), f++;
1652
+ }
1653
+ }
1654
+ }, v.maxDiagonalInTree = function(e) {
1655
+ for (var t = m.MIN_VALUE, n = 0; n < e.length; n++) {
1656
+ var r = e[n].getDiagonal();
1657
+ r > t && (t = r);
1658
+ }
1659
+ return t;
1660
+ }, v.prototype.calcRepulsionRange = function() {
1661
+ return 2 * (this.level + 1) * this.idealEdgeLength;
1662
+ }, v.prototype.groupZeroDegreeMembers = function() {
1663
+ var e = this, t = {};
1664
+ this.memberGroups = {}, this.idToDummyNode = {};
1665
+ for (var n = [], r = this.graphManager.getAllNodes(), i = 0; i < r.length; i++) {
1666
+ var a = r[i], s = a.getParent();
1667
+ this.getNodeDegreeWithChildren(a) === 0 && (s.id == null || !this.getToBeTiled(s)) && n.push(a);
1668
+ }
1669
+ for (var i = 0; i < n.length; i++) {
1670
+ var a = n[i], c = a.getParent().id;
1671
+ t[c] === void 0 && (t[c] = []), t[c] = t[c].concat(a);
1672
+ }
1673
+ Object.keys(t).forEach(function(n) {
1674
+ if (t[n].length > 1) {
1675
+ var r = "DummyCompound_" + n;
1676
+ e.memberGroups[r] = t[n];
1677
+ var i = t[n][0].getParent(), a = new o(e.graphManager);
1678
+ a.id = r, a.paddingLeft = i.paddingLeft || 0, a.paddingRight = i.paddingRight || 0, a.paddingBottom = i.paddingBottom || 0, a.paddingTop = i.paddingTop || 0, e.idToDummyNode[r] = a;
1679
+ var s = e.getGraphManager().add(e.newGraph(), a), c = i.getChild();
1680
+ c.add(a);
1681
+ for (var l = 0; l < t[n].length; l++) {
1682
+ var u = t[n][l];
1683
+ c.remove(u), s.add(u);
1684
+ }
1685
+ }
1686
+ });
1687
+ }, v.prototype.clearCompounds = function() {
1688
+ var e = {}, t = {};
1689
+ this.performDFSOnCompounds();
1690
+ for (var n = 0; n < this.compoundOrder.length; n++) t[this.compoundOrder[n].id] = this.compoundOrder[n], e[this.compoundOrder[n].id] = [].concat(this.compoundOrder[n].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[n].getChild()), this.compoundOrder[n].child = null;
1691
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(e, t);
1692
+ }, v.prototype.clearZeroDegreeMembers = function() {
1693
+ var e = this, t = this.tiledZeroDegreePack = [];
1694
+ Object.keys(this.memberGroups).forEach(function(n) {
1695
+ var r = e.idToDummyNode[n];
1696
+ t[n] = e.tileNodes(e.memberGroups[n], r.paddingLeft + r.paddingRight), r.rect.width = t[n].width, r.rect.height = t[n].height;
1697
+ });
1698
+ }, v.prototype.repopulateCompounds = function() {
1699
+ for (var e = this.compoundOrder.length - 1; e >= 0; e--) {
1700
+ var t = this.compoundOrder[e], n = t.id, r = t.paddingLeft, i = t.paddingTop;
1701
+ this.adjustLocations(this.tiledMemberPack[n], t.rect.x, t.rect.y, r, i);
1702
+ }
1703
+ }, v.prototype.repopulateZeroDegreeMembers = function() {
1704
+ var e = this, t = this.tiledZeroDegreePack;
1705
+ Object.keys(t).forEach(function(n) {
1706
+ var r = e.idToDummyNode[n], i = r.paddingLeft, a = r.paddingTop;
1707
+ e.adjustLocations(t[n], r.rect.x, r.rect.y, i, a);
1708
+ });
1709
+ }, v.prototype.getToBeTiled = function(e) {
1710
+ var t = e.id;
1711
+ if (this.toBeTiled[t] != null) return this.toBeTiled[t];
1712
+ var n = e.getChild();
1713
+ if (n == null) return this.toBeTiled[t] = !1, !1;
1714
+ for (var r = n.getNodes(), i = 0; i < r.length; i++) {
1715
+ var a = r[i];
1716
+ if (this.getNodeDegree(a) > 0) return this.toBeTiled[t] = !1, !1;
1717
+ if (a.getChild() == null) {
1718
+ this.toBeTiled[a.id] = !1;
1719
+ continue;
1720
+ }
1721
+ if (!this.getToBeTiled(a)) return this.toBeTiled[t] = !1, !1;
1722
+ }
1723
+ return this.toBeTiled[t] = !0, !0;
1724
+ }, v.prototype.getNodeDegree = function(e) {
1725
+ e.id;
1726
+ for (var t = e.getEdges(), n = 0, r = 0; r < t.length; r++) {
1727
+ var i = t[r];
1728
+ i.getSource().id !== i.getTarget().id && (n += 1);
1729
+ }
1730
+ return n;
1731
+ }, v.prototype.getNodeDegreeWithChildren = function(e) {
1732
+ var t = this.getNodeDegree(e);
1733
+ if (e.getChild() == null) return t;
1734
+ for (var n = e.getChild().getNodes(), r = 0; r < n.length; r++) {
1735
+ var i = n[r];
1736
+ t += this.getNodeDegreeWithChildren(i);
1737
+ }
1738
+ return t;
1739
+ }, v.prototype.performDFSOnCompounds = function() {
1740
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
1741
+ }, v.prototype.fillCompexOrderByDFS = function(e) {
1742
+ for (var t = 0; t < e.length; t++) {
1743
+ var n = e[t];
1744
+ n.getChild() != null && this.fillCompexOrderByDFS(n.getChild().getNodes()), this.getToBeTiled(n) && this.compoundOrder.push(n);
1745
+ }
1746
+ }, v.prototype.adjustLocations = function(e, t, n, r, i) {
1747
+ t += r, n += i;
1748
+ for (var a = t, o = 0; o < e.rows.length; o++) {
1749
+ var s = e.rows[o];
1750
+ t = a;
1751
+ for (var c = 0, l = 0; l < s.length; l++) {
1752
+ var u = s[l];
1753
+ u.rect.x = t, u.rect.y = n, t += u.rect.width + e.horizontalPadding, u.rect.height > c && (c = u.rect.height);
1754
+ }
1755
+ n += c + e.verticalPadding;
1756
+ }
1757
+ }, v.prototype.tileCompoundMembers = function(e, t) {
1758
+ var n = this;
1759
+ this.tiledMemberPack = [], Object.keys(e).forEach(function(r) {
1760
+ var i = t[r];
1761
+ n.tiledMemberPack[r] = n.tileNodes(e[r], i.paddingLeft + i.paddingRight), i.rect.width = n.tiledMemberPack[r].width, i.rect.height = n.tiledMemberPack[r].height;
1762
+ });
1763
+ }, v.prototype.tileNodes = function(e, t) {
1764
+ var n = {
1765
+ rows: [],
1766
+ rowWidth: [],
1767
+ rowHeight: [],
1768
+ width: 0,
1769
+ height: t,
1770
+ verticalPadding: c.TILING_PADDING_VERTICAL,
1771
+ horizontalPadding: c.TILING_PADDING_HORIZONTAL
1772
+ };
1773
+ e.sort(function(e, t) {
1774
+ return e.rect.width * e.rect.height > t.rect.width * t.rect.height ? -1 : e.rect.width * e.rect.height < t.rect.width * t.rect.height ? 1 : 0;
1775
+ });
1776
+ for (var r = 0; r < e.length; r++) {
1777
+ var i = e[r];
1778
+ n.rows.length == 0 ? this.insertNodeToRow(n, i, 0, t) : this.canAddHorizontal(n, i.rect.width, i.rect.height) ? this.insertNodeToRow(n, i, this.getShortestRowIndex(n), t) : this.insertNodeToRow(n, i, n.rows.length, t), this.shiftToLastRow(n);
1779
+ }
1780
+ return n;
1781
+ }, v.prototype.insertNodeToRow = function(e, t, n, r) {
1782
+ var i = r;
1783
+ n == e.rows.length && (e.rows.push([]), e.rowWidth.push(i), e.rowHeight.push(0));
1784
+ var a = e.rowWidth[n] + t.rect.width;
1785
+ e.rows[n].length > 0 && (a += e.horizontalPadding), e.rowWidth[n] = a, e.width < a && (e.width = a);
1786
+ var o = t.rect.height;
1787
+ n > 0 && (o += e.verticalPadding);
1788
+ var s = 0;
1789
+ o > e.rowHeight[n] && (s = e.rowHeight[n], e.rowHeight[n] = o, s = e.rowHeight[n] - s), e.height += s, e.rows[n].push(t);
1790
+ }, v.prototype.getShortestRowIndex = function(e) {
1791
+ for (var t = -1, n = Number.MAX_VALUE, r = 0; r < e.rows.length; r++) e.rowWidth[r] < n && (t = r, n = e.rowWidth[r]);
1792
+ return t;
1793
+ }, v.prototype.getLongestRowIndex = function(e) {
1794
+ for (var t = -1, n = Number.MIN_VALUE, r = 0; r < e.rows.length; r++) e.rowWidth[r] > n && (t = r, n = e.rowWidth[r]);
1795
+ return t;
1796
+ }, v.prototype.canAddHorizontal = function(e, t, n) {
1797
+ var r = this.getShortestRowIndex(e);
1798
+ if (r < 0) return !0;
1799
+ var i = e.rowWidth[r];
1800
+ if (i + e.horizontalPadding + t <= e.width) return !0;
1801
+ var a = 0;
1802
+ e.rowHeight[r] < n && r > 0 && (a = n + e.verticalPadding - e.rowHeight[r]);
1803
+ var o = e.width - i >= t + e.horizontalPadding ? (e.height + a) / (i + t + e.horizontalPadding) : (e.height + a) / e.width;
1804
+ a = n + e.verticalPadding;
1805
+ var s = e.width < t ? (e.height + a) / t : (e.height + a) / e.width;
1806
+ return s < 1 && (s = 1 / s), o < 1 && (o = 1 / o), o < s;
1807
+ }, v.prototype.shiftToLastRow = function(e) {
1808
+ var t = this.getLongestRowIndex(e), n = e.rowWidth.length - 1, r = e.rows[t], i = r[r.length - 1], a = i.width + e.horizontalPadding;
1809
+ if (e.width - e.rowWidth[n] > a && t != n) {
1810
+ r.splice(-1, 1), e.rows[n].push(i), e.rowWidth[t] = e.rowWidth[t] - a, e.rowWidth[n] = e.rowWidth[n] + a, e.width = e.rowWidth[instance.getLongestRowIndex(e)];
1811
+ for (var o = Number.MIN_VALUE, s = 0; s < r.length; s++) r[s].height > o && (o = r[s].height);
1812
+ t > 0 && (o += e.verticalPadding);
1813
+ var c = e.rowHeight[t] + e.rowHeight[n];
1814
+ e.rowHeight[t] = o, e.rowHeight[n] < i.height + e.verticalPadding && (e.rowHeight[n] = i.height + e.verticalPadding);
1815
+ var l = e.rowHeight[t] + e.rowHeight[n];
1816
+ e.height += l - c, this.shiftToLastRow(e);
1817
+ }
1818
+ }, v.prototype.tilingPreLayout = function() {
1819
+ c.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
1820
+ }, v.prototype.tilingPostLayout = function() {
1821
+ c.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
1822
+ }, v.prototype.reduceTrees = function() {
1823
+ for (var e = [], t = !0, n; t;) {
1824
+ var r = this.graphManager.getAllNodes(), i = [];
1825
+ t = !1;
1826
+ for (var a = 0; a < r.length; a++) n = r[a], n.getEdges().length == 1 && !n.getEdges()[0].isInterGraph && n.getChild() == null && (i.push([
1827
+ n,
1828
+ n.getEdges()[0],
1829
+ n.getOwner()
1830
+ ]), t = !0);
1831
+ if (t == 1) {
1832
+ for (var o = [], s = 0; s < i.length; s++) i[s][0].getEdges().length == 1 && (o.push(i[s]), i[s][0].getOwner().remove(i[s][0]));
1833
+ e.push(o), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
1834
+ }
1835
+ }
1836
+ this.prunedNodesAll = e;
1837
+ }, v.prototype.growTree = function(e) {
1838
+ for (var t = e[e.length - 1], n, r = 0; r < t.length; r++) n = t[r], this.findPlaceforPrunedNode(n), n[2].add(n[0]), n[2].add(n[1], n[1].source, n[1].target);
1839
+ e.splice(e.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
1840
+ }, v.prototype.findPlaceforPrunedNode = function(e) {
1841
+ var t, n, r = e[0];
1842
+ n = r == e[1].source ? e[1].target : e[1].source;
1843
+ var i = n.startX, a = n.finishX, o = n.startY, s = n.finishY, c = [
1844
+ 0,
1845
+ 0,
1846
+ 0,
1847
+ 0
1848
+ ];
1849
+ if (o > 0) for (var u = i; u <= a; u++) c[0] += this.grid[u][o - 1].length + this.grid[u][o].length - 1;
1850
+ if (a < this.grid.length - 1) for (var u = o; u <= s; u++) c[1] += this.grid[a + 1][u].length + this.grid[a][u].length - 1;
1851
+ if (s < this.grid[0].length - 1) for (var u = i; u <= a; u++) c[2] += this.grid[u][s + 1].length + this.grid[u][s].length - 1;
1852
+ if (i > 0) for (var u = o; u <= s; u++) c[3] += this.grid[i - 1][u].length + this.grid[i][u].length - 1;
1853
+ for (var d = m.MAX_VALUE, f, p, h = 0; h < c.length; h++) c[h] < d ? (d = c[h], f = 1, p = h) : c[h] == d && f++;
1854
+ if (f == 3 && d == 0) c[0] == 0 && c[1] == 0 && c[2] == 0 ? t = 1 : c[0] == 0 && c[1] == 0 && c[3] == 0 ? t = 0 : c[0] == 0 && c[2] == 0 && c[3] == 0 ? t = 3 : c[1] == 0 && c[2] == 0 && c[3] == 0 && (t = 2);
1855
+ else if (f == 2 && d == 0) {
1856
+ var g = Math.floor(Math.random() * 2);
1857
+ t = c[0] == 0 && c[1] == 0 ? g == 0 ? 0 : 1 : c[0] == 0 && c[2] == 0 ? g == 0 ? 0 : 2 : c[0] == 0 && c[3] == 0 ? g == 0 ? 0 : 3 : c[1] == 0 && c[2] == 0 ? g == 0 ? 1 : 2 : c[1] == 0 && c[3] == 0 ? g == 0 ? 1 : 3 : g == 0 ? 2 : 3;
1858
+ } else if (f == 4 && d == 0) {
1859
+ var g = Math.floor(Math.random() * 4);
1860
+ t = g;
1861
+ } else t = p;
1862
+ t == 0 ? r.setCenter(n.getCenterX(), n.getCenterY() - n.getHeight() / 2 - l.DEFAULT_EDGE_LENGTH - r.getHeight() / 2) : t == 1 ? r.setCenter(n.getCenterX() + n.getWidth() / 2 + l.DEFAULT_EDGE_LENGTH + r.getWidth() / 2, n.getCenterY()) : t == 2 ? r.setCenter(n.getCenterX(), n.getCenterY() + n.getHeight() / 2 + l.DEFAULT_EDGE_LENGTH + r.getHeight() / 2) : r.setCenter(n.getCenterX() - n.getWidth() / 2 - l.DEFAULT_EDGE_LENGTH - r.getWidth() / 2, n.getCenterY());
1863
+ }, e.exports = v;
1864
+ }),
1865
+ (function(e, t, n) {
1866
+ var r = {};
1867
+ r.layoutBase = n(0), r.CoSEConstants = n(1), r.CoSEEdge = n(2), r.CoSEGraph = n(3), r.CoSEGraphManager = n(4), r.CoSELayout = n(6), r.CoSENode = n(5), e.exports = r;
1868
+ })
1869
+ ]);
1870
+ });
1871
+ })), l = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1872
+ (function(n, r) {
1873
+ typeof e == "object" && typeof t == "object" ? t.exports = r(c()) : typeof define == "function" && define.amd ? define(["cose-base"], r) : typeof e == "object" ? e.cytoscapeCoseBilkent = r(c()) : n.cytoscapeCoseBilkent = r(n.coseBase);
1874
+ })(e, function(e) {
1875
+ return (function(e) {
1876
+ var t = {};
1877
+ function n(r) {
1878
+ if (t[r]) return t[r].exports;
1879
+ var i = t[r] = {
1880
+ i: r,
1881
+ l: !1,
1882
+ exports: {}
1883
+ };
1884
+ return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
1885
+ }
1886
+ return n.m = e, n.c = t, n.i = function(e) {
1887
+ return e;
1888
+ }, n.d = function(e, t, r) {
1889
+ n.o(e, t) || Object.defineProperty(e, t, {
1890
+ configurable: !1,
1891
+ enumerable: !0,
1892
+ get: r
1893
+ });
1894
+ }, n.n = function(e) {
1895
+ var t = e && e.__esModule ? function() {
1896
+ return e.default;
1897
+ } : function() {
1898
+ return e;
1899
+ };
1900
+ return n.d(t, "a", t), t;
1901
+ }, n.o = function(e, t) {
1902
+ return Object.prototype.hasOwnProperty.call(e, t);
1903
+ }, n.p = "", n(n.s = 1);
1904
+ })([(function(t, n) {
1905
+ t.exports = e;
1906
+ }), (function(e, t, n) {
1907
+ var r = n(0).layoutBase.LayoutConstants, i = n(0).layoutBase.FDLayoutConstants, a = n(0).CoSEConstants, o = n(0).CoSELayout, s = n(0).CoSENode, c = n(0).layoutBase.PointD, l = n(0).layoutBase.DimensionD, u = {
1908
+ ready: function() {},
1909
+ stop: function() {},
1910
+ quality: "default",
1911
+ nodeDimensionsIncludeLabels: !1,
1912
+ refresh: 30,
1913
+ fit: !0,
1914
+ padding: 10,
1915
+ randomize: !0,
1916
+ nodeRepulsion: 4500,
1917
+ idealEdgeLength: 50,
1918
+ edgeElasticity: .45,
1919
+ nestingFactor: .1,
1920
+ gravity: .25,
1921
+ numIter: 2500,
1922
+ tile: !0,
1923
+ animate: "end",
1924
+ animationDuration: 500,
1925
+ tilingPaddingVertical: 10,
1926
+ tilingPaddingHorizontal: 10,
1927
+ gravityRangeCompound: 1.5,
1928
+ gravityCompound: 1,
1929
+ gravityRange: 3.8,
1930
+ initialEnergyOnIncremental: .5
1931
+ };
1932
+ function d(e, t) {
1933
+ var n = {};
1934
+ for (var r in e) n[r] = e[r];
1935
+ for (var r in t) n[r] = t[r];
1936
+ return n;
1937
+ }
1938
+ function f(e) {
1939
+ this.options = d(u, e), p(this.options);
1940
+ }
1941
+ var p = function(e) {
1942
+ e.nodeRepulsion != null && (a.DEFAULT_REPULSION_STRENGTH = i.DEFAULT_REPULSION_STRENGTH = e.nodeRepulsion), e.idealEdgeLength != null && (a.DEFAULT_EDGE_LENGTH = i.DEFAULT_EDGE_LENGTH = e.idealEdgeLength), e.edgeElasticity != null && (a.DEFAULT_SPRING_STRENGTH = i.DEFAULT_SPRING_STRENGTH = e.edgeElasticity), e.nestingFactor != null && (a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (a.DEFAULT_GRAVITY_STRENGTH = i.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (a.MAX_ITERATIONS = i.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (a.DEFAULT_GRAVITY_RANGE_FACTOR = i.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (a.DEFAULT_COMPOUND_GRAVITY_STRENGTH = i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (a.DEFAULT_COOLING_FACTOR_INCREMENTAL = i.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.quality == "draft" ? r.QUALITY = 0 : e.quality == "proof" ? r.QUALITY = 2 : r.QUALITY = 1, a.NODE_DIMENSIONS_INCLUDE_LABELS = i.NODE_DIMENSIONS_INCLUDE_LABELS = r.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, a.DEFAULT_INCREMENTAL = i.DEFAULT_INCREMENTAL = r.DEFAULT_INCREMENTAL = !e.randomize, a.ANIMATE = i.ANIMATE = r.ANIMATE = e.animate, a.TILE = e.tile, a.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, a.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal;
1943
+ };
1944
+ f.prototype.run = function() {
1945
+ var e, t, n = this.options;
1946
+ this.idToLNode = {};
1947
+ var r = this.layout = new o(), i = this;
1948
+ i.stopped = !1, this.cy = this.options.cy, this.cy.trigger({
1949
+ type: "layoutstart",
1950
+ layout: this
1951
+ });
1952
+ var a = r.newGraphManager();
1953
+ this.gm = a;
1954
+ var s = this.options.eles.nodes(), c = this.options.eles.edges();
1955
+ this.root = a.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(s), r);
1956
+ for (var l = 0; l < c.length; l++) {
1957
+ var u = c[l], d = this.idToLNode[u.data("source")], f = this.idToLNode[u.data("target")];
1958
+ if (d !== f && d.getEdgesBetween(f).length == 0) {
1959
+ var p = a.add(r.newEdge(), d, f);
1960
+ p.id = u.id();
1961
+ }
1962
+ }
1963
+ var m = function(e, t) {
1964
+ typeof e == "number" && (e = t);
1965
+ var n = e.data("id"), r = i.idToLNode[n];
1966
+ return {
1967
+ x: r.getRect().getCenterX(),
1968
+ y: r.getRect().getCenterY()
1969
+ };
1970
+ }, h = function a() {
1971
+ for (var o = function() {
1972
+ n.fit && n.cy.fit(n.eles, n.padding), e || (e = !0, i.cy.one("layoutready", n.ready), i.cy.trigger({
1973
+ type: "layoutready",
1974
+ layout: i
1975
+ }));
1976
+ }, s = i.options.refresh, c, l = 0; l < s && !c; l++) c = i.stopped || i.layout.tick();
1977
+ if (c) {
1978
+ r.checkLayoutSuccess() && !r.isSubLayout && r.doPostLayout(), r.tilingPostLayout && r.tilingPostLayout(), r.isLayoutFinished = !0, i.options.eles.nodes().positions(m), o(), i.cy.one("layoutstop", i.options.stop), i.cy.trigger({
1979
+ type: "layoutstop",
1980
+ layout: i
1981
+ }), t && cancelAnimationFrame(t), e = !1;
1982
+ return;
1983
+ }
1984
+ var u = i.layout.getPositionsData();
1985
+ n.eles.nodes().positions(function(e, t) {
1986
+ if (typeof e == "number" && (e = t), !e.isParent()) {
1987
+ for (var n = e.id(), r = u[n], i = e; r == null && (r = u[i.data("parent")] || u["DummyCompound_" + i.data("parent")], u[n] = r, i = i.parent()[0], i != null););
1988
+ return r == null ? {
1989
+ x: e.position("x"),
1990
+ y: e.position("y")
1991
+ } : {
1992
+ x: r.x,
1993
+ y: r.y
1994
+ };
1995
+ }
1996
+ }), o(), t = requestAnimationFrame(a);
1997
+ };
1998
+ return r.addListener("layoutstarted", function() {
1999
+ i.options.animate === "during" && (t = requestAnimationFrame(h));
2000
+ }), r.runLayout(), this.options.animate !== "during" && (i.options.eles.nodes().not(":parent").layoutPositions(i, i.options, m), e = !1), this;
2001
+ }, f.prototype.getTopMostNodes = function(e) {
2002
+ for (var t = {}, n = 0; n < e.length; n++) t[e[n].id()] = !0;
2003
+ return e.filter(function(e, n) {
2004
+ typeof e == "number" && (e = n);
2005
+ for (var r = e.parent()[0]; r != null;) {
2006
+ if (t[r.id()]) return !1;
2007
+ r = r.parent()[0];
2008
+ }
2009
+ return !0;
2010
+ });
2011
+ }, f.prototype.processChildrenList = function(e, t, n) {
2012
+ for (var r = t.length, i = 0; i < r; i++) {
2013
+ var a = t[i], o = a.children(), u, d = a.layoutDimensions({ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels });
2014
+ if (u = a.outerWidth() != null && a.outerHeight() != null ? e.add(new s(n.graphManager, new c(a.position("x") - d.w / 2, a.position("y") - d.h / 2), new l(parseFloat(d.w), parseFloat(d.h)))) : e.add(new s(this.graphManager)), u.id = a.data("id"), u.paddingLeft = parseInt(a.css("padding")), u.paddingTop = parseInt(a.css("padding")), u.paddingRight = parseInt(a.css("padding")), u.paddingBottom = parseInt(a.css("padding")), this.options.nodeDimensionsIncludeLabels && a.isParent()) {
2015
+ var f = a.boundingBox({
2016
+ includeLabels: !0,
2017
+ includeNodes: !1
2018
+ }).w, p = a.boundingBox({
2019
+ includeLabels: !0,
2020
+ includeNodes: !1
2021
+ }).h, m = a.css("text-halign");
2022
+ u.labelWidth = f, u.labelHeight = p, u.labelPos = m;
2023
+ }
2024
+ if (this.idToLNode[a.data("id")] = u, isNaN(u.rect.x) && (u.rect.x = 0), isNaN(u.rect.y) && (u.rect.y = 0), o != null && o.length > 0) {
2025
+ var h = n.getGraphManager().add(n.newGraph(), u);
2026
+ this.processChildrenList(h, o, n);
2027
+ }
2028
+ }
2029
+ }, f.prototype.stop = function() {
2030
+ return this.stopped = !0, this;
2031
+ };
2032
+ var m = function(e) {
2033
+ e("layout", "cose-bilkent", f);
2034
+ };
2035
+ typeof cytoscape < "u" && m(cytoscape), e.exports = m;
2036
+ })]);
2037
+ });
2038
+ })))(), 1);
2039
+ o.use(l.default);
2040
+ function u(e, t) {
2041
+ e.forEach((e) => {
2042
+ var n, r, i;
2043
+ let a = {
2044
+ id: e.id,
2045
+ labelText: e.label,
2046
+ height: e.height,
2047
+ width: e.width,
2048
+ padding: (n = e.padding) == null ? 0 : n
2049
+ };
2050
+ Object.keys(e).forEach((t) => {
2051
+ [
2052
+ "id",
2053
+ "label",
2054
+ "height",
2055
+ "width",
2056
+ "padding",
2057
+ "x",
2058
+ "y"
2059
+ ].includes(t) || (a[t] = e[t]);
2060
+ }), t.add({
2061
+ group: "nodes",
2062
+ data: a,
2063
+ position: {
2064
+ x: (r = e.x) == null ? 0 : r,
2065
+ y: (i = e.y) == null ? 0 : i
2066
+ }
2067
+ });
2068
+ });
2069
+ }
2070
+ i(u, "addNodes");
2071
+ function d(e, t) {
2072
+ e.forEach((e) => {
2073
+ let n = {
2074
+ id: e.id,
2075
+ source: e.start,
2076
+ target: e.end
2077
+ };
2078
+ Object.keys(e).forEach((t) => {
2079
+ [
2080
+ "id",
2081
+ "start",
2082
+ "end"
2083
+ ].includes(t) || (n[t] = e[t]);
2084
+ }), t.add({
2085
+ group: "edges",
2086
+ data: n
2087
+ });
2088
+ });
2089
+ }
2090
+ i(d, "addEdges");
2091
+ function f(e) {
2092
+ return new Promise((t) => {
2093
+ let n = a("body").append("div").attr("id", "cy").attr("style", "display:none"), i = o({
2094
+ container: document.getElementById("cy"),
2095
+ style: [{
2096
+ selector: "edge",
2097
+ style: { "curve-style": "bezier" }
2098
+ }]
2099
+ });
2100
+ n.remove(), u(e.nodes, i), d(e.edges, i), i.nodes().forEach(function(e) {
2101
+ e.layoutDimensions = () => {
2102
+ let t = e.data();
2103
+ return {
2104
+ w: t.width,
2105
+ h: t.height
2106
+ };
2107
+ };
2108
+ }), i.layout({
2109
+ name: "cose-bilkent",
2110
+ quality: "proof",
2111
+ styleEnabled: !1,
2112
+ animate: !1
2113
+ }).run(), i.ready((e) => {
2114
+ r.info("Cytoscape ready", e), t(i);
2115
+ });
2116
+ });
2117
+ }
2118
+ i(f, "createCytoscapeInstance");
2119
+ function p(e) {
2120
+ return e.nodes().map((e) => {
2121
+ let t = e.data(), n = e.position(), r = {
2122
+ id: t.id,
2123
+ x: n.x,
2124
+ y: n.y
2125
+ };
2126
+ return Object.keys(t).forEach((e) => {
2127
+ e !== "id" && (r[e] = t[e]);
2128
+ }), r;
2129
+ });
2130
+ }
2131
+ i(p, "extractPositionedNodes");
2132
+ function m(e) {
2133
+ return e.edges().map((e) => {
2134
+ let t = e.data(), n = e._private.rscratch, r = {
2135
+ id: t.id,
2136
+ source: t.source,
2137
+ target: t.target,
2138
+ startX: n.startX,
2139
+ startY: n.startY,
2140
+ midX: n.midX,
2141
+ midY: n.midY,
2142
+ endX: n.endX,
2143
+ endY: n.endY
2144
+ };
2145
+ return Object.keys(t).forEach((e) => {
2146
+ [
2147
+ "id",
2148
+ "source",
2149
+ "target"
2150
+ ].includes(e) || (r[e] = t[e]);
2151
+ }), r;
2152
+ });
2153
+ }
2154
+ i(m, "extractPositionedEdges");
2155
+ async function h(e, t) {
2156
+ r.debug("Starting cose-bilkent layout algorithm");
2157
+ try {
2158
+ g(e);
2159
+ let t = await f(e), n = p(t), i = m(t);
2160
+ return r.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`), {
2161
+ nodes: n,
2162
+ edges: i
2163
+ };
2164
+ } catch (e) {
2165
+ throw r.error("Error in cose-bilkent layout algorithm:", e), e;
2166
+ }
2167
+ }
2168
+ i(h, "executeCoseBilkentLayout");
2169
+ function g(e) {
2170
+ if (!e) throw Error("Layout data is required");
2171
+ if (!e.config) throw Error("Configuration is required in layout data");
2172
+ if (!e.rootNode) throw Error("Root node is required");
2173
+ if (!e.nodes || !Array.isArray(e.nodes)) throw Error("No nodes found in layout data");
2174
+ if (!Array.isArray(e.edges)) throw Error("Edges array is required in layout data");
2175
+ return !0;
2176
+ }
2177
+ i(g, "validateLayoutData");
2178
+ var _ = /* @__PURE__ */ i(async (e, t, { insertCluster: r, insertEdge: i, insertEdgeLabel: a, insertMarkers: o, insertNode: s, log: c, positionEdgeLabel: l }, { algorithm: u }) => {
2179
+ let d = {}, f = {}, p = t.select("g");
2180
+ o(p, e.markers, e.type, e.diagramId);
2181
+ let m = p.insert("g").attr("class", "subgraphs"), g = p.insert("g").attr("class", "edgePaths"), _ = p.insert("g").attr("class", "edgeLabels"), v = p.insert("g").attr("class", "nodes");
2182
+ c.debug("Inserting nodes into DOM for dimension calculation"), await Promise.all(e.nodes.map(async (t) => {
2183
+ if (t.isGroup) {
2184
+ let e = n({}, t);
2185
+ f[t.id] = e, d[t.id] = e, await r(m, t);
2186
+ } else {
2187
+ let r = n({}, t);
2188
+ d[t.id] = r;
2189
+ let i = await s(v, t, {
2190
+ config: e.config,
2191
+ dir: e.direction || "TB"
2192
+ }), a = i.node().getBBox();
2193
+ r.width = a.width, r.height = a.height, r.domId = i, c.debug(`Node ${t.id} dimensions: ${a.width}x${a.height}`);
2194
+ }
2195
+ })), c.debug("Running cose-bilkent layout algorithm");
2196
+ let y = await h(n(n({}, e), {}, { nodes: e.nodes.map((e) => {
2197
+ let t = d[e.id];
2198
+ return n(n({}, e), {}, {
2199
+ width: t.width,
2200
+ height: t.height
2201
+ });
2202
+ }) }), e.config);
2203
+ c.debug("Positioning nodes based on layout results"), y.nodes.forEach((e) => {
2204
+ let t = d[e.id];
2205
+ t != null && t.domId && (t.domId.attr("transform", `translate(${e.x}, ${e.y})`), t.x = e.x, t.y = e.y, c.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`));
2206
+ }), y.edges.forEach((t) => {
2207
+ let n = e.edges.find((e) => e.id === t.id);
2208
+ n && (n.points = [
2209
+ {
2210
+ x: t.startX,
2211
+ y: t.startY
2212
+ },
2213
+ {
2214
+ x: t.midX,
2215
+ y: t.midY
2216
+ },
2217
+ {
2218
+ x: t.endX,
2219
+ y: t.endY
2220
+ }
2221
+ ]);
2222
+ }), c.debug("Inserting and positioning edges"), await Promise.all(e.edges.map(async (t) => {
2223
+ var r, o;
2224
+ await a(_, t);
2225
+ let s = d[(r = t.start) == null ? "" : r], u = d[(o = t.end) == null ? "" : o];
2226
+ if (s && u) {
2227
+ let r = y.edges.find((e) => e.id === t.id);
2228
+ if (r) {
2229
+ c.debug("APA01 positionedEdge", r);
2230
+ let a = n({}, t);
2231
+ l(a, i(g, a, f, e.type, s, u, e.diagramId));
2232
+ } else {
2233
+ let r = n(n({}, t), {}, { points: [{
2234
+ x: s.x || 0,
2235
+ y: s.y || 0
2236
+ }, {
2237
+ x: u.x || 0,
2238
+ y: u.y || 0
2239
+ }] });
2240
+ l(r, i(g, r, f, e.type, s, u, e.diagramId));
2241
+ }
2242
+ }
2243
+ })), c.debug("Cose-bilkent rendering completed");
2244
+ }, "render");
2245
+ //#endregion
2246
+ export { _ as render };