@deep-eye/core 1.3.41 → 1.3.43

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 (180) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{UTIF-Ba2kW3Aa.cjs → UTIF-CNo7Ns4z.cjs} +1 -1
  3. package/dist/{UTIF-CHghZ-lP.js → UTIF-D9Mnq595.js} +1 -1
  4. package/dist/{___vite-browser-external_commonjs-proxy-C0C1nUrz.js → ___vite-browser-external_commonjs-proxy-MrvSFFFT.js} +1 -1
  5. package/dist/{___vite-browser-external_commonjs-proxy-4W9NpFji.cjs → ___vite-browser-external_commonjs-proxy-eaTgiLkd.cjs} +1 -1
  6. package/dist/{abnfDiagram-VCTEODGH-CoUGiF1L.js → abnfDiagram-VCTEODGH-CouNcRC3.js} +3 -3
  7. package/dist/{abnfDiagram-VCTEODGH-F-RRkCny.cjs → abnfDiagram-VCTEODGH-kEgRVGFU.cjs} +1 -1
  8. package/dist/{aiden0z-pptx-renderer.es-B_sD-OCt.js → aiden0z-pptx-renderer.es-BUyPRUg4.js} +1 -1
  9. package/dist/{aiden0z-pptx-renderer.es-4P7ou7B9.cjs → aiden0z-pptx-renderer.es-Dyb4LxHK.cjs} +1 -1
  10. package/dist/{architectureDiagram-5GKGNRK7-CDIz4PRs.js → architectureDiagram-5GKGNRK7-1OTlRwi_.js} +3 -3
  11. package/dist/{architectureDiagram-5GKGNRK7-BW05415u.cjs → architectureDiagram-5GKGNRK7-DtX9GhOX.cjs} +1 -1
  12. package/dist/{blockDiagram-I7D4REHJ-CtzSgArW.cjs → blockDiagram-I7D4REHJ-Bv8KjFMg.cjs} +1 -1
  13. package/dist/{blockDiagram-I7D4REHJ-D_ZwEUTC.js → blockDiagram-I7D4REHJ-Cw1Y7tfI.js} +3 -3
  14. package/dist/{c4Diagram-7LVT6UL2-9hsbPBqM.js → c4Diagram-7LVT6UL2-BRvY4TDG.js} +2 -2
  15. package/dist/{c4Diagram-7LVT6UL2-yQrW4Atf.cjs → c4Diagram-7LVT6UL2-Cbgk-iVn.cjs} +1 -1
  16. package/dist/{channel-BKpZF4Sk.cjs → channel-DkBU2PNC.cjs} +1 -1
  17. package/dist/{channel-J4irjU8w.js → channel-Dqk6kupu.js} +1 -1
  18. package/dist/chat-token.css +44 -0
  19. package/dist/{chunk-2Q5K7J3B-KAcSK2vt.js → chunk-2Q5K7J3B-B0ZvA8yL.js} +1 -1
  20. package/dist/{chunk-2Q5K7J3B-RUPn64dQ.cjs → chunk-2Q5K7J3B-CHhc8puj.cjs} +1 -1
  21. package/dist/{chunk-5VM5RSS4-H97ko7S0.cjs → chunk-5VM5RSS4-Bnh8CDqQ.cjs} +1 -1
  22. package/dist/{chunk-5VM5RSS4-CAUtwO_a.js → chunk-5VM5RSS4-CcHCbj8X.js} +1 -1
  23. package/dist/{chunk-F27PBJKO-DrIyit6C.js → chunk-F27PBJKO-B3lwfLwb.js} +1 -1
  24. package/dist/{chunk-F27PBJKO-0C0illZa.cjs → chunk-F27PBJKO-BBLa3Bi3.cjs} +1 -1
  25. package/dist/{chunk-IMKFNOWR-DcEEU5Xv.js → chunk-IMKFNOWR-B67_1FtL.js} +5 -5
  26. package/dist/{chunk-IMKFNOWR-2ij2TBND.cjs → chunk-IMKFNOWR-C_Zqxk3t.cjs} +1 -1
  27. package/dist/{chunk-JWPE2WC7-CqoXHHTD.js → chunk-JWPE2WC7-B5QdRkL1.js} +1 -1
  28. package/dist/{chunk-JWPE2WC7-C2pEJElF.cjs → chunk-JWPE2WC7-BBgLF2gY.cjs} +1 -1
  29. package/dist/{chunk-POPQ4Y6H-D5_9ytZA.js → chunk-POPQ4Y6H-B_y_CeQm.js} +1 -1
  30. package/dist/{chunk-POPQ4Y6H-DwnW_x6j.cjs → chunk-POPQ4Y6H-C813WtSQ.cjs} +1 -1
  31. package/dist/{chunk-SHT3W25Y-GbWbtx1Q.cjs → chunk-SHT3W25Y-C3AiuRaY.cjs} +1 -1
  32. package/dist/{chunk-SHT3W25Y-BKYLZ5S5.js → chunk-SHT3W25Y-CTtCc2AT.js} +7 -7
  33. package/dist/{chunk-SVP7TREG-wCMx5Rfs.cjs → chunk-SVP7TREG-BsnArkSu.cjs} +1 -1
  34. package/dist/{chunk-SVP7TREG-CTyHEvhD.js → chunk-SVP7TREG-_MWqpb2W.js} +1 -1
  35. package/dist/{chunk-TICWLB2K-DXrZSTjQ.js → chunk-TICWLB2K-4e13rgbv.js} +6 -6
  36. package/dist/{chunk-TICWLB2K-kKfJLzGU.cjs → chunk-TICWLB2K-If1p3wgV.cjs} +1 -1
  37. package/dist/{chunk-XXDRQBXY-XSZmfPQz.js → chunk-XXDRQBXY-98DDsDbT.js} +1 -1
  38. package/dist/{chunk-XXDRQBXY-DrevnJZ_.cjs → chunk-XXDRQBXY-GZWKf9Nw.cjs} +1 -1
  39. package/dist/{classDiagram-ZZMXUADV-CaIlGIUP.cjs → classDiagram-ZZMXUADV-CFkjicIR.cjs} +1 -1
  40. package/dist/{classDiagram-ZZMXUADV-BUPxcj44.js → classDiagram-ZZMXUADV-CL8_Jh81.js} +2 -2
  41. package/dist/{classDiagram-v2-VYDZK3BY-CaIlGIUP.cjs → classDiagram-v2-VYDZK3BY-CFkjicIR.cjs} +1 -1
  42. package/dist/{classDiagram-v2-VYDZK3BY-BUPxcj44.js → classDiagram-v2-VYDZK3BY-CL8_Jh81.js} +2 -2
  43. package/dist/components/chat/ChatApp.vue.d.ts.map +1 -1
  44. package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
  45. package/dist/components/chat/chatErrors.d.ts.map +1 -1
  46. package/dist/components/chat/chatQueue.d.ts +9 -0
  47. package/dist/components/chat/chatQueue.d.ts.map +1 -1
  48. package/dist/components/chat/chatQueueStorage.d.ts +10 -0
  49. package/dist/components/chat/chatQueueStorage.d.ts.map +1 -0
  50. package/dist/components/chat/components/ChatActionbar.vue.d.ts.map +1 -1
  51. package/dist/components/chat/components/ChatQueue.vue.d.ts +8 -2
  52. package/dist/components/chat/components/ChatQueue.vue.d.ts.map +1 -1
  53. package/dist/components/chat/components/ChatQueueEditingBanner.vue.d.ts +14 -0
  54. package/dist/components/chat/components/ChatQueueEditingBanner.vue.d.ts.map +1 -0
  55. package/dist/components/chat/components/ChatSender.vue.d.ts +14 -0
  56. package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
  57. package/dist/components/chat/components/ChatSkillPanel.vue.d.ts.map +1 -1
  58. package/dist/components/chat/components/ConversationList.vue.d.ts.map +1 -1
  59. package/dist/components/chat/components/OpenFileViewerHost.vue.d.ts.map +1 -1
  60. package/dist/components/chat/components/document-viewer/office/domNav.d.ts +4 -1
  61. package/dist/components/chat/components/document-viewer/office/domNav.d.ts.map +1 -1
  62. package/dist/components/chat/components/index.d.ts +1 -0
  63. package/dist/components/chat/components/index.d.ts.map +1 -1
  64. package/dist/components/chat/imageUrl.d.ts +5 -0
  65. package/dist/components/chat/imageUrl.d.ts.map +1 -1
  66. package/dist/components/chat/index.d.ts +2 -1
  67. package/dist/components/chat/index.d.ts.map +1 -1
  68. package/dist/components/chat/openFileViewer.d.ts +14 -0
  69. package/dist/components/chat/openFileViewer.d.ts.map +1 -1
  70. package/dist/components/chat/previewRenderers.d.ts +1 -1
  71. package/dist/components/chat/previewRenderers.d.ts.map +1 -1
  72. package/dist/components/chat/responseStream.d.ts +20 -0
  73. package/dist/components/chat/responseStream.d.ts.map +1 -1
  74. package/dist/components/chat/types.d.ts +5 -0
  75. package/dist/components/chat/types.d.ts.map +1 -1
  76. package/dist/components/skill/avatarThumb.d.ts +6 -2
  77. package/dist/components/skill/avatarThumb.d.ts.map +1 -1
  78. package/dist/components/skill/types.d.ts +3 -1
  79. package/dist/components/skill/types.d.ts.map +1 -1
  80. package/dist/components/ui/components/UiMenuSubmenuList.vue.d.ts.map +1 -1
  81. package/dist/{cose-bilkent-JH36ORCC-CLyag-H_.js → cose-bilkent-JH36ORCC-6mWQQuOt.js} +2 -2
  82. package/dist/{cose-bilkent-JH36ORCC-CuLiZOwZ.cjs → cose-bilkent-JH36ORCC-CsScJdoG.cjs} +1 -1
  83. package/dist/{cynefinDiagram-5FMLGOSQ-DPmPBitQ.cjs → cynefinDiagram-5FMLGOSQ-BnngR7pq.cjs} +1 -1
  84. package/dist/{cynefinDiagram-5FMLGOSQ-Yjom7G_l.js → cynefinDiagram-5FMLGOSQ-CoLcL7ZA.js} +2 -2
  85. package/dist/{dagre-GXQ25YYZ-oC5W7jop.js → dagre-GXQ25YYZ-3lpvpvso.js} +2 -2
  86. package/dist/{dagre-GXQ25YYZ-BhuLPJA5.cjs → dagre-GXQ25YYZ-Bhv8qOBH.cjs} +1 -1
  87. package/dist/{diagram-S7CK7UJ4-DmPNHoIr.js → diagram-S7CK7UJ4-6MwNq647.js} +3 -3
  88. package/dist/{diagram-S7CK7UJ4-BxNxjPFh.cjs → diagram-S7CK7UJ4-BhVOJYKY.cjs} +1 -1
  89. package/dist/{diagram-UQ7AKVKN-B01qnzRc.js → diagram-UQ7AKVKN-B_2_Dtp_.js} +2 -2
  90. package/dist/{diagram-UQ7AKVKN-CTIt6cxf.cjs → diagram-UQ7AKVKN-avabJAI9.cjs} +1 -1
  91. package/dist/{diagram-VSXAHHWV-Bojelns7.js → diagram-VSXAHHWV-Bpom0y-q.js} +2 -2
  92. package/dist/{diagram-VSXAHHWV-Dhl_Wm73.cjs → diagram-VSXAHHWV-BxniJyeO.cjs} +1 -1
  93. package/dist/{diagram-VX7I27RA-DT5nwoLZ.cjs → diagram-VX7I27RA-BYKIp7hA.cjs} +1 -1
  94. package/dist/{diagram-VX7I27RA-BodgvRe_.js → diagram-VX7I27RA-S-PfmXQ6.js} +3 -3
  95. package/dist/{diagram-Z3DM3KII-Tjpg4KSQ.js → diagram-Z3DM3KII-BdoNmMF3.js} +2 -2
  96. package/dist/{diagram-Z3DM3KII-C9zDzdZz.cjs → diagram-Z3DM3KII-hiK16n5D.cjs} +1 -1
  97. package/dist/{ebnfDiagram-PWID7BFC-r3bNNQ6i.js → ebnfDiagram-PWID7BFC-DzK6n8RG.js} +3 -3
  98. package/dist/{ebnfDiagram-PWID7BFC-BjoVoCLe.cjs → ebnfDiagram-PWID7BFC-IPvBtBPC.cjs} +1 -1
  99. package/dist/{erDiagram-RLTQ6QDP-DzXCBQoC.cjs → erDiagram-RLTQ6QDP-BZusALre.cjs} +1 -1
  100. package/dist/{erDiagram-RLTQ6QDP-DRBCxlpa.js → erDiagram-RLTQ6QDP-DoeO2aC0.js} +4 -4
  101. package/dist/flowDiagram-HODETNUW-B8TA9ArC.js +8 -0
  102. package/dist/flowDiagram-HODETNUW-BQpwnmHX.cjs +1 -0
  103. package/dist/{ganttDiagram-EL5Y4UJY-CieJtgSE.js → ganttDiagram-EL5Y4UJY-CiIaJ7m0.js} +2 -2
  104. package/dist/{ganttDiagram-EL5Y4UJY-Dfb3-h1O.cjs → ganttDiagram-EL5Y4UJY-DSRVZh6R.cjs} +1 -1
  105. package/dist/{gitGraphDiagram-WWUBYQGX-CGUC9Gzs.js → gitGraphDiagram-WWUBYQGX-3F4xF18E.js} +3 -3
  106. package/dist/{gitGraphDiagram-WWUBYQGX-CWIDZ0GU.cjs → gitGraphDiagram-WWUBYQGX-s9xXyI9B.cjs} +1 -1
  107. package/dist/{heic2any-vk2Xlz29.cjs → heic2any-Bfqt69hz.cjs} +1 -1
  108. package/dist/{heic2any-BRs6AKoi.js → heic2any-DJ3c9U4y.js} +1 -1
  109. package/dist/{index-CCOK35r6.js → index--YoMkXo9.js} +16 -16
  110. package/dist/{index-B0cE0piS.cjs → index-BC2qEBFr.cjs} +1 -1
  111. package/dist/{index-D105U-NX.cjs → index-BKr1iOws.cjs} +7 -7
  112. package/dist/{index-JXevpeyk.js → index-Ba4aZ_98.js} +1 -1
  113. package/dist/{index-CUkszHov.cjs → index-CEieYUBJ.cjs} +1 -1
  114. package/dist/{index-BLJdsyqx.js → index-CQbDbceS.js} +1 -1
  115. package/dist/{index-C133fEhe.js → index-CziT0loz.js} +34881 -34272
  116. package/dist/{index-Bd0dm3h9.cjs → index-DdYnjFY-.cjs} +1 -1
  117. package/dist/{index-Bq2SsXsC.js → index-DhRWwKRQ.js} +2 -2
  118. package/dist/{index-D5GmTDI9.cjs → index-lovKxtNm.cjs} +226 -226
  119. package/dist/{index-Dx_tvSnm.js → index-miU7UFnS.js} +1 -1
  120. package/dist/{index-v3QHsxEb.cjs → index-sc5hJR2-.cjs} +1 -1
  121. package/dist/index.cjs +1 -1
  122. package/dist/index.js +425 -414
  123. package/dist/{infoDiagram-27XIBGKW-oePGjwWH.js → infoDiagram-27XIBGKW-BEVadbwv.js} +1 -1
  124. package/dist/{infoDiagram-27XIBGKW-DvKGigmx.cjs → infoDiagram-27XIBGKW-D0rbER-u.cjs} +1 -1
  125. package/dist/{ishikawaDiagram-5VMMS53U-DP4YNkQh.js → ishikawaDiagram-5VMMS53U-B8lktXvG.js} +1 -1
  126. package/dist/{ishikawaDiagram-5VMMS53U-b2Z_Xr5l.cjs → ishikawaDiagram-5VMMS53U-CeOS9vB-.cjs} +1 -1
  127. package/dist/{journeyDiagram-3NMN7TZE-DXZQ2Hnm.js → journeyDiagram-3NMN7TZE-BPSbOrby.js} +3 -3
  128. package/dist/{journeyDiagram-3NMN7TZE-X6qkw6hB.cjs → journeyDiagram-3NMN7TZE-DrjObKMS.cjs} +1 -1
  129. package/dist/{kanban-definition-UXKFOSKX-DT5OovTe.js → kanban-definition-UXKFOSKX-CeIPpP7g.js} +2 -2
  130. package/dist/{kanban-definition-UXKFOSKX-0CeKOz3I.cjs → kanban-definition-UXKFOSKX-DjJPD3iu.cjs} +1 -1
  131. package/dist/{layout-BFxr1rNK.cjs → layout-ABAzIcCC.cjs} +1 -1
  132. package/dist/{layout-Bn232-5f.js → layout-DRasA2Pr.js} +1 -1
  133. package/dist/{leaflet-src-d90-O-MR.js → leaflet-src-BW43Nil-.js} +1 -1
  134. package/dist/{leaflet-src-D9zvEgNY.cjs → leaflet-src-CUYwBwH8.cjs} +1 -1
  135. package/dist/{mermaid.core-BZ22HWSY.js → mermaid.core-CcH8M8P-.js} +44 -44
  136. package/dist/{mermaid.core-DB-ckht7.cjs → mermaid.core-CdbCpwrG.cjs} +4 -4
  137. package/dist/{mindmap-definition-YA3MSWOX-CTo15cAt.cjs → mindmap-definition-YA3MSWOX-BBlhZraF.cjs} +1 -1
  138. package/dist/{mindmap-definition-YA3MSWOX-DsADX-f6.js → mindmap-definition-YA3MSWOX-CeXARLhX.js} +3 -3
  139. package/dist/{pegDiagram-XKGWAZYB-Bmfi5QyI.cjs → pegDiagram-XKGWAZYB-CQbL2INS.cjs} +1 -1
  140. package/dist/{pegDiagram-XKGWAZYB-BrHMbluF.js → pegDiagram-XKGWAZYB-J3obWd9O.js} +3 -3
  141. package/dist/{pieDiagram-E7YTZNPT-BM8Rl5DP.js → pieDiagram-E7YTZNPT-DC-1gUQz.js} +2 -2
  142. package/dist/{pieDiagram-E7YTZNPT-DWiQSNFE.cjs → pieDiagram-E7YTZNPT-lwTGTNMk.cjs} +1 -1
  143. package/dist/{prism-3IJB4TcV.cjs → prism-BG3Uv4K5.cjs} +1 -1
  144. package/dist/{prism-B3cCcL22.js → prism-DWwsQ9Pw.js} +1 -1
  145. package/dist/{quadrantDiagram-AXDQQJYC-Bj82D10l.cjs → quadrantDiagram-AXDQQJYC-DkDX5foN.cjs} +1 -1
  146. package/dist/{quadrantDiagram-AXDQQJYC-iNMOP57a.js → quadrantDiagram-AXDQQJYC-bI9LBopt.js} +1 -1
  147. package/dist/{railroadDiagram-O6MQD6OU-Bmbf1y1G.js → railroadDiagram-O6MQD6OU-DaRjWxXU.js} +3 -3
  148. package/dist/{railroadDiagram-O6MQD6OU-CjVKtLer.cjs → railroadDiagram-O6MQD6OU-Y7gmjqp6.cjs} +1 -1
  149. package/dist/{requirementDiagram-BXWQKSXE-gnXF5hun.cjs → requirementDiagram-BXWQKSXE-CmHYRhp-.cjs} +1 -1
  150. package/dist/{requirementDiagram-BXWQKSXE-Bhb0GPxJ.js → requirementDiagram-BXWQKSXE-lLlNbYrv.js} +3 -3
  151. package/dist/{sankeyDiagram-P5KCCOFB-DOzBXDtE.js → sankeyDiagram-P5KCCOFB-BtsYpmyg.js} +1 -1
  152. package/dist/{sankeyDiagram-P5KCCOFB-CWkgZr57.cjs → sankeyDiagram-P5KCCOFB-zUXqEfSQ.cjs} +1 -1
  153. package/dist/{sequenceDiagram-WJ2MYXX4-CSG589nF.cjs → sequenceDiagram-WJ2MYXX4-BsFfpAW6.cjs} +1 -1
  154. package/dist/{sequenceDiagram-WJ2MYXX4-B9d4bS6x.js → sequenceDiagram-WJ2MYXX4-Y0w6-B3h.js} +3 -3
  155. package/dist/{sizeCapture-INFHLROL-i25oZDdg.cjs → sizeCapture-INFHLROL-B--6-NBm.cjs} +1 -1
  156. package/dist/{sizeCapture-INFHLROL-DfWssgMs.js → sizeCapture-INFHLROL-DKmvIzdT.js} +1 -1
  157. package/dist/{stateDiagram-D77RDMKH-DXT2pVBP.js → stateDiagram-D77RDMKH-BM2Gvi6w.js} +3 -3
  158. package/dist/{stateDiagram-D77RDMKH-BbOTK6vv.cjs → stateDiagram-D77RDMKH-DWMlIL9R.cjs} +1 -1
  159. package/dist/{stateDiagram-v2-MP3YSRHH-DAh6ajq3.js → stateDiagram-v2-MP3YSRHH-5dYNiydK.js} +2 -2
  160. package/dist/{stateDiagram-v2-MP3YSRHH-CIr7yNAI.cjs → stateDiagram-v2-MP3YSRHH-B5QFtQan.cjs} +1 -1
  161. package/dist/style.css +2 -2
  162. package/dist/{swimlanes-42K2YHIH-CA1ZW-St.cjs → swimlanes-42K2YHIH-Dm72H4dT.cjs} +1 -1
  163. package/dist/{swimlanes-42K2YHIH-BtlkwZua.js → swimlanes-42K2YHIH-QwJlgMT7.js} +1 -1
  164. package/dist/{swimlanesDiagram-VR7AAH4N-UTLZwNjw.cjs → swimlanesDiagram-VR7AAH4N-CUQRy9Kg.cjs} +1 -1
  165. package/dist/{swimlanesDiagram-VR7AAH4N-2rv6Tcc2.js → swimlanesDiagram-VR7AAH4N-NSktRGku.js} +2 -2
  166. package/dist/{timeline-definition-24CTP7MA-DHQ1qJXu.js → timeline-definition-24CTP7MA-DO7fOP_a.js} +1 -1
  167. package/dist/{timeline-definition-24CTP7MA-DZHgw-pc.cjs → timeline-definition-24CTP7MA-Dvsvd-Kv.cjs} +1 -1
  168. package/dist/{togeojson-Cl47qSIx.cjs → togeojson-BMrsKX0G.cjs} +1 -1
  169. package/dist/{togeojson-D3HgFZzg.js → togeojson-D6KNMaLn.js} +1 -1
  170. package/dist/{vennDiagram-4TSXK5OY-q94HhdDk.js → vennDiagram-4TSXK5OY-DQWMji1w.js} +1 -1
  171. package/dist/{vennDiagram-4TSXK5OY-BTzq13gl.cjs → vennDiagram-4TSXK5OY-MJjso0Jj.cjs} +1 -1
  172. package/dist/{wardleyDiagram-VM6X3IG4-C8lIVOJN.cjs → wardleyDiagram-VM6X3IG4-iF7QMfiH.cjs} +1 -1
  173. package/dist/{wardleyDiagram-VM6X3IG4-30hpyYRy.js → wardleyDiagram-VM6X3IG4-nzhhx8lA.js} +2 -2
  174. package/dist/{xychartDiagram-S5SC5T6Z-C2mkPvAl.js → xychartDiagram-S5SC5T6Z-BwLxxcrp.js} +1 -1
  175. package/dist/{xychartDiagram-S5SC5T6Z-CGpz4hp1.cjs → xychartDiagram-S5SC5T6Z-DjnMQutC.cjs} +1 -1
  176. package/dist/{xz-decompress-9ZnXrl30.js → xz-decompress-BOv5AR4Q.js} +2 -2
  177. package/dist/{xz-decompress-Co-UzLJJ.cjs → xz-decompress-oLfQ9asS.cjs} +1 -1
  178. package/package.json +1 -1
  179. package/dist/flowDiagram-HODETNUW-BviQppd7.cjs +0 -1
  180. package/dist/flowDiagram-HODETNUW-aCo0aMQt.js +0 -8
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./mermaid.core-DB-ckht7.cjs"),z=require("./cytoscape.esm-BMd_KE48.cjs"),k=require("./index-D5GmTDI9.cjs"),ht=require("d3");var J={exports:{}},Z={exports:{}},Q={exports:{}},j;function lt(){return j||(j=1,function(G,b){(function(I,T){G.exports=T()})(k.commonjsGlobal,function(){return function(N){var I={};function T(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=N,T.c=I,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)}([function(N,I,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o},function(N,I,T){var o=T(2),e=T(8),t=T(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i},function(N,I,T){function o(e){this.vGraphObject=e}N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(13),i=T(0),l=T(16),g=T(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){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)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n},function(N,I,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(0),i=T(6),l=T(3),g=T(1),n=T(13),d=T(12),r=T(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var E=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(E.source=v,E.target=D,E.isInterGraph=!1,this.getEdges().push(E),v.edges.push(E),D!=v&&D.edges.push(E),E)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,E=D.length,y=0;y<E;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,E,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?E=y[0].getParent().paddingLeft:E=this.margin,this.left=v-E,this.top=p-E,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c,L=this.nodes,A=L.length,m=0;m<A;m++){var R=L[m];p&&R.child!=null&&R.updateBounds(),y=R.getLeft(),O=R.getRight(),s=R.getTop(),f=R.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),E<f&&(E=f)}var C=new n(v,u,D-v,E-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),L[0].getParent().paddingLeft!=null?c=L[0].getParent().paddingLeft:c=this.margin,this.left=C.x-c,this.right=C.x+C.width+c,this.top=C.y-c,this.bottom=C.y+C.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c=p.length,L=0;L<c;L++){var A=p[L];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),E<f&&(E=f)}var m=new n(v,u,D-v,E-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var E=v[u];p+=E.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],E,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),E=u.getEdges();for(var s=E.length,f=0;f<s;f++){var c=E[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var L=y.withChildren();L.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h},function(N,I,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t},function(N,I,T){var o=T(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e},function(N,I,T){var o=T(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),E=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),L=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),R=i.getHeightHalf(),C=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=L,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,_=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,P=void 0,U=void 0,Y=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,C=!0):(l[0]=p,l[1]=a,C=!0):S===w&&(g>d?(l[0]=h,l[1]=a,C=!0):(l[0]=u,l[1]=D,C=!0)),-_===w?d>g?(l[2]=c,l[3]=L,M=!0):(l[2]=f,l[3]=s,M=!0):_===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=L,M=!0)),C&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(_,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-_,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-_,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(_,w,4)),!C)switch(x){case 1:U=a,P=g+-y/w,l[0]=P,l[1]=U;break;case 2:P=u,U=n+E*w,l[0]=P,l[1]=U;break;case 3:U=D,P=g+y/w,l[0]=P,l[1]=U;break;case 4:P=v,U=n+-E*w,l[0]=P,l[1]=U;break}if(!M)switch(F){case 1:X=s,Y=d+-R/w,l[2]=Y,l[3]=X;break;case 2:Y=A,X=r+m*w,l[2]=Y,l[3]=X;break;case 3:X=L,Y=d+R/w,l[2]=Y,l[3]=X;break;case 4:Y=c,X=r+-m*w,l[2]=Y,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,E=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,L=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,L=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*L-f*c)/A,E=(O*c-y*L)/A,new o(u,E))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var E=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<E&&E<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e},function(N,I,T){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o},function(N,I,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o},function(N,I,T){var o=function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}}();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d!=null&&d.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n}();N.exports=g},function(N,I,T){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o},function(N,I,T){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o},function(N,I,T){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e},function(N,I,T){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=T(0),t=T(6),i=T(3),l=T(1),g=T(5),n=T(4),d=T(17),r=T(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var E=a;if(E.vGraphObject!=null){var y=E.vGraphObject;y.update(E)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,E=0;E<D.length;E++)u=D[E],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var E=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),E.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var L=c[u].getOtherEnd(f);if(O.get(f)!=L)if(!E.has(L))y.push(L),O.set(L,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(E));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],R=s.indexOf(m);R>-1&&s.splice(R,1)}E=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),D.add(E);var y=this.newEdge(null);this.graphManager.add(y,v,E),p.add(E),v=E}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var E=D[u],y=new n(E.getCenterX(),E.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,E.getOwner().remove(E)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var E=p/v;u-=(p-E)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,E=null;(p.length==1||p.length==2)&&(u=!0,E=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],L=p.indexOf(O);L>=0&&p.splice(L,1);var A=O.getNeighborsList();A.forEach(function(C){if(v.indexOf(C)<0){var M=D.get(C),S=M-1;S==1&&f.push(C),D.set(C,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,E=p[0])}return E},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h},function(N,I,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o},function(N,I,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e},function(N,I,T){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=T(15),t=T(7),i=T(0),l=T(8),g=T(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),E=0;E<u.length;E++)r=u[E],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),E=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,E,r,h),E.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,E;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),E=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=E,p.springForceX-=u,p.springForceY-=E)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,E,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var L=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=L*f,r.repulsionForceY-=L*c,h.repulsionForceX+=L*f,h.repulsionForceY+=L*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),E=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],E=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(E)<t.MIN_REPULSION_DIST&&(E=g.sign(E)*t.MIN_REPULSION_DIST),y=u*u+E*E,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*E/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,E,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,E=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var E=p;E<=v;E++)for(var y=D;y<=u;y++)this.grid[E][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,E=r.startX-1;E<r.finishX+2;E++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(E<0||y<0||E>=u.length||y>=u[0].length)){for(var O=0;O<u[E][y].length;O++)if(D=u[E][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(E=0;E<r.surrounding.length;E++)this.calcRepulsionForce(r,r.surrounding[E])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n},function(N,I,T){var o=T(1),e=T(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t},function(N,I,T){var o=T(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e},function(N,I,T){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o},function(N,I,T){var o=T(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e},function(N,I,T){var o=T(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e},function(N,I,T){var o=function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}}();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=T(11),i=function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l}();N.exports=i},function(N,I,T){var o=function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}}();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i}();N.exports=t},function(N,I,T){var o=function(){};o.FDLayout=T(18),o.FDLayoutConstants=T(7),o.FDLayoutEdge=T(19),o.FDLayoutNode=T(20),o.DimensionD=T(21),o.HashMap=T(22),o.HashSet=T(23),o.IGeometry=T(8),o.IMath=T(9),o.Integer=T(10),o.Point=T(12),o.PointD=T(4),o.RandomSeed=T(16),o.RectangleD=T(13),o.Transform=T(17),o.UniqueIDGeneretor=T(14),o.Quicksort=T(24),o.LinkedList=T(11),o.LGraphObject=T(2),o.LGraph=T(5),o.LEdge=T(1),o.LGraphManager=T(6),o.LNode=T(3),o.Layout=T(15),o.LayoutConstants=T(0),o.NeedlemanWunsch=T(25),N.exports=o},function(N,I,T){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o}])})}(Q)),Q.exports}var q;function gt(){return q||(q=1,function(G,b){(function(I,T){G.exports=T(lt())})(k.commonjsGlobal,function(N){return function(I){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)}([function(I,T){I.exports=N},function(I,T,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t},function(I,T,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i},function(I,T,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,E=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){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){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(L){return f.has(L)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var L=s[c].rect,A=s[c].id;f[A]={id:A,x:L.getCenterX(),y:L.getCenterY(),w:L.width,h:L.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),L=c.length,A;for(A=0;A<L;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var L=s[c];if(!f.has(L)){var A=L.getSource(),m=L.getTarget();if(A==m)L.getBendpoints().push(new a),L.getBendpoints().push(new a),this.createDummyNodesForBendpoints(L),f.add(L);else{var R=[];if(R=R.concat(A.getEdgeListToNode(m)),R=R.concat(m.getEdgeListToNode(A)),!f.has(R[0])){if(R.length>1){var C;for(C=0;C<R.length;C++){var M=R[C];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}R.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),L=0,A=0,m=0,R=new a(0,0),C=0;C<s.length;C++){C%c==0&&(m=0,A=L,C!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),L=0);var M=s[C],S=p.findCenterOfTree(M);f.x=m,f.y=A,R=y.radialLayout(M,S,f),R.y>L&&(L=Math.floor(R.y)),m=Math.floor(R.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-R.x/2,r.WORLD_CENTER_Y-R.y/2))},y.radialLayout=function(s,f,c){var L=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,L);var A=u.calculateBounds(s),m=new E;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var R=0;R<s.length;R++){var C=s[R];C.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,L,A,m){var R=(L-c+1)/2;R<0&&(R+=180);var C=(R+c)%360,M=C*D.TWO_PI/360,S=A*Math.cos(M),_=A*Math.sin(M);s.setCenter(S,_);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,P=w.length,U,Y=s.getEdgesBetween(f);Y.length>1;){var X=Y[0];Y.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),P--,x--}f!=null?U=(w.indexOf(Y[0])+1)%P:U=0;for(var B=Math.abs(L-c)/x,V=U;F!=x;V=++V%P){var $=w[V].getOtherEnd(s);if($!=f){var K=(c+F*B)%360,at=(K+B)%360;y.branchRadialLayout($,s,K,at,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var L=s[c],A=L.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],L=this.graphManager.getAllNodes(),A=0;A<L.length;A++){var m=L[A],R=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(R.id==null||!this.getToBeTiled(R))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],C=m.getParent().id;typeof f[C]>"u"&&(f[C]=[]),f[C]=f[C].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var _=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=_.paddingLeft||0,w.paddingRight=_.paddingRight||0,w.paddingBottom=_.paddingBottom||0,w.paddingTop=_.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=_.getChild();F.add(w);for(var P=0;P<f[M].length;P++){var U=f[M][P];F.remove(U),x.add(U)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var L=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],L.paddingLeft+L.paddingRight),L.rect.width=f[c].width,L.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,L=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,L,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var L=s.idToDummyNode[c],A=L.paddingLeft,m=L.paddingTop;s.adjustLocations(f[c],L.rect.x,L.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var L=c.getNodes(),A=0;A<L.length;A++){var m=L[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,L=0;L<f.length;L++){var A=f[L];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),L=0;L<c.length;L++){var A=c[L];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,L,A){f+=L,c+=A;for(var m=f,R=0;R<s.rows.length;R++){var C=s.rows[R];f=m;for(var M=0,S=0;S<C.length;S++){var _=C[S];_.rect.x=f,_.rect.y=c,f+=_.rect.width+s.horizontalPadding,_.rect.height>M&&(M=_.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(L){var A=f[L];c.tiledMemberPack[L]=c.tileNodes(s[L],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[L].width,A.rect.height=c.tiledMemberPack[L].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,L=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:L};s.sort(function(C,M){return C.rect.width*C.rect.height>M.rect.width*M.rect.height?-1:C.rect.width*C.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var R=s[m];A.rows.length==0?this.insertNodeToRow(A,R,0,f):this.canAddHorizontal(A,R.rect.width,R.rect.height)?this.insertNodeToRow(A,R,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,R,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,L){var A=L;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var R=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(R+=s.horizontalPadding),s.rowWidth[c]=R,s.width<R&&(s.width=R);var C=f.rect.height;c>0&&(C+=s.verticalPadding);var M=0;C>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=C,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,L=0;L<s.rows.length;L++)s.rowWidth[L]<c&&(f=L,c=s.rowWidth[L]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,L=0;L<s.rows.length;L++)s.rowWidth[L]>c&&(f=L,c=s.rowWidth[L]);return f},y.prototype.canAddHorizontal=function(s,f,c){var L=this.getShortestRowIndex(s);if(L<0)return!0;var A=s.rowWidth[L];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[L]<c&&L>0&&(m=c+s.verticalPadding-s.rowHeight[L]);var R;s.width-A>=f+s.horizontalPadding?R=(s.height+m)/(A+f+s.horizontalPadding):R=(s.height+m)/s.width,m=c+s.verticalPadding;var C;return s.width<f?C=(s.height+m)/f:C=(s.height+m)/s.width,C<1&&(C=1/C),R<1&&(R=1/R),R<C},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,L=s.rows[f],A=L[L.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){L.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,C=0;C<L.length;C++)L[C].height>R&&(R=L[C].height);f>0&&(R+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=R,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var L=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<L.length;m++)c=L[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var R=[],C=0;C<A.length;C++)A[C][0].getEdges().length==1&&(R.push(A[C]),A[C][0].getOwner().remove(A[C][0]));s.push(R),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],L,A=0;A<c.length;A++)L=c[A],this.findPlaceforPrunedNode(L),L[2].add(L[0]),L[2].add(L[1],L[1].source,L[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,L=s[0];L==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,R=c.startY,C=c.finishY,M=0,S=0,_=0,w=0,x=[M,_,S,w];if(R>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(m<this.grid.length-1)for(var F=R;F<=C;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(C<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][C+1].length+this.grid[F][C].length-1;if(A>0)for(var F=R;F<=C;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var P=v.MAX_VALUE,U,Y,X=0;X<x.length;X++)x[X]<P?(P=x[X],U=1,Y=X):x[X]==P&&U++;if(U==3&&P==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(U==2&&P==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(U==4&&P==0){var H=Math.floor(Math.random()*4);f=H}else f=Y;f==0?L.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-L.getHeight()/2):f==1?L.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+L.getWidth()/2,c.getCenterY()):f==2?L.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+L.getHeight()/2):L.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-L.getWidth()/2,c.getCenterY())},I.exports=y},function(I,T,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e}])})}(Z)),Z.exports}(function(G,b){(function(I,T){G.exports=T(gt())})(k.commonjsGlobal,function(N){return function(I){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(I,T){I.exports=N},function(I,T,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var E={};for(var y in D)E[y]=D[y];for(var y in u)E[y]=u[y];return E}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,E=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var L=0;L<c.length;L++){var A=c[L],m=this.idToLNode[A.data("source")],R=this.idToLNode[A.data("target")];if(m!==R&&m.getEdgesBetween(R).length==0){var C=s.add(y.newEdge(),m,R);C.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),P=O.idToLNode[F];return{x:P.getRect().getCenterX(),y:P.getRect().getCenterY()}},S=function _(){for(var w=function(){E.fit&&E.cy.fit(E.eles,E.padding),D||(D=!0,O.cy.one("layoutready",E.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,P=0;P<x&&!F;P++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var U=O.layout.getPositionsData();E.eles.nodes().positions(function(Y,X){if(typeof Y=="number"&&(Y=X),!Y.isParent()){for(var H=Y.id(),B=U[H],V=Y;B==null&&(B=U[V.data("parent")]||U["DummyCompound_"+V.data("parent")],U[H]=B,V=V.parent()[0],V!=null););return B!=null?{x:B.x,y:B.y}:{x:Y.position("x"),y:Y.position("y")}}}),w(),u=requestAnimationFrame(_)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},E=0;E<D.length;E++)u[D[E].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,E){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,L=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(E.graphManager,new n(s.position("x")-L.w/2,s.position("y")-L.h/2),new d(parseFloat(L.w),parseFloat(L.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,R=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=R}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var C;C=E.getGraphManager().add(E.newGraph(),c),this.processChildrenList(C,f,E)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v}])})})(J);var ut=J.exports;const ft=k.getDefaultExportFromCjs(ut);z.cytoscape.use(ft);function tt(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(T=>{["id","label","height","width","padding","x","y"].includes(T)||(I[T]=N[T])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}W.__name(tt,"addNodes");function et(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(T=>{["id","start","end"].includes(T)||(I[T]=N[T])}),b.add({group:"edges",data:I})})}W.__name(et,"addEdges");function rt(G){return new Promise(b=>{const N=ht.select("body").append("div").attr("id","cy").attr("style","display:none"),I=z.cytoscape({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),tt(G.nodes,I),et(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const T={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(T).run(),I.ready(o=>{W.log.info("Cytoscape ready",o),b(I)})})}W.__name(rt,"createCytoscapeInstance");function it(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),T={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(T[o]=N[o])}),T})}W.__name(it,"extractPositionedNodes");function nt(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,T={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(T[o]=N[o])}),T})}W.__name(nt,"extractPositionedEdges");async function ot(G,b){W.log.debug("Starting cose-bilkent layout algorithm");try{st(G);const N=await rt(G),I=it(N),T=nt(N);return W.log.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`),{nodes:I,edges:T}}catch(N){throw W.log.error("Error in cose-bilkent layout algorithm:",N),N}}W.__name(ot,"executeCoseBilkentLayout");function st(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}W.__name(st,"validateLayoutData");var ct=W.__name(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:T,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const E={...u};n[u.id]=E,g[u.id]=E,await N(r,u)}else{const E={...u};g[u.id]=E;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();E.width=O.width,E.height=O.height,E.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const E=g[u.id];return{...u,width:E.width,height:E.height}})},D=await ot(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const E=g[u.id];E!=null&&E.domId&&(E.domId.attr("transform",`translate(${u.x}, ${u.y})`),E.x=u.x,E.y=u.y,t.debug(`Positioned node ${E.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const E=G.edges.find(y=>y.id===u.id);E&&(E.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await T(a,u);const E=g[u.start??""],y=g[u.end??""];if(E&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:E.x||0,y:E.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),pt=ct;exports.render=pt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./mermaid.core-CdbCpwrG.cjs"),z=require("./cytoscape.esm-BMd_KE48.cjs"),k=require("./index-lovKxtNm.cjs"),ht=require("d3");var J={exports:{}},Z={exports:{}},Q={exports:{}},j;function lt(){return j||(j=1,function(G,b){(function(I,T){G.exports=T()})(k.commonjsGlobal,function(){return function(N){var I={};function T(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=N,T.c=I,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)}([function(N,I,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o},function(N,I,T){var o=T(2),e=T(8),t=T(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i},function(N,I,T){function o(e){this.vGraphObject=e}N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(13),i=T(0),l=T(16),g=T(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){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)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n},function(N,I,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(0),i=T(6),l=T(3),g=T(1),n=T(13),d=T(12),r=T(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var E=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(E.source=v,E.target=D,E.isInterGraph=!1,this.getEdges().push(E),v.edges.push(E),D!=v&&D.edges.push(E),E)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,E=D.length,y=0;y<E;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,E,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?E=y[0].getParent().paddingLeft:E=this.margin,this.left=v-E,this.top=p-E,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c,L=this.nodes,A=L.length,m=0;m<A;m++){var R=L[m];p&&R.child!=null&&R.updateBounds(),y=R.getLeft(),O=R.getRight(),s=R.getTop(),f=R.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),E<f&&(E=f)}var C=new n(v,u,D-v,E-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),L[0].getParent().paddingLeft!=null?c=L[0].getParent().paddingLeft:c=this.margin,this.left=C.x-c,this.right=C.x+C.width+c,this.top=C.y-c,this.bottom=C.y+C.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c=p.length,L=0;L<c;L++){var A=p[L];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),E<f&&(E=f)}var m=new n(v,u,D-v,E-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var E=v[u];p+=E.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],E,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),E=u.getEdges();for(var s=E.length,f=0;f<s;f++){var c=E[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var L=y.withChildren();L.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h},function(N,I,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t},function(N,I,T){var o=T(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e},function(N,I,T){var o=T(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),E=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),L=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),R=i.getHeightHalf(),C=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=L,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,_=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,P=void 0,U=void 0,Y=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,C=!0):(l[0]=p,l[1]=a,C=!0):S===w&&(g>d?(l[0]=h,l[1]=a,C=!0):(l[0]=u,l[1]=D,C=!0)),-_===w?d>g?(l[2]=c,l[3]=L,M=!0):(l[2]=f,l[3]=s,M=!0):_===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=L,M=!0)),C&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(_,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-_,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-_,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(_,w,4)),!C)switch(x){case 1:U=a,P=g+-y/w,l[0]=P,l[1]=U;break;case 2:P=u,U=n+E*w,l[0]=P,l[1]=U;break;case 3:U=D,P=g+y/w,l[0]=P,l[1]=U;break;case 4:P=v,U=n+-E*w,l[0]=P,l[1]=U;break}if(!M)switch(F){case 1:X=s,Y=d+-R/w,l[2]=Y,l[3]=X;break;case 2:Y=A,X=r+m*w,l[2]=Y,l[3]=X;break;case 3:X=L,Y=d+R/w,l[2]=Y,l[3]=X;break;case 4:Y=c,X=r+-m*w,l[2]=Y,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,E=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,L=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,L=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*L-f*c)/A,E=(O*c-y*L)/A,new o(u,E))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var E=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<E&&E<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e},function(N,I,T){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o},function(N,I,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o},function(N,I,T){var o=function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}}();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d!=null&&d.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n}();N.exports=g},function(N,I,T){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o},function(N,I,T){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o},function(N,I,T){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e},function(N,I,T){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=T(0),t=T(6),i=T(3),l=T(1),g=T(5),n=T(4),d=T(17),r=T(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var E=a;if(E.vGraphObject!=null){var y=E.vGraphObject;y.update(E)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,E=0;E<D.length;E++)u=D[E],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var E=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),E.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var L=c[u].getOtherEnd(f);if(O.get(f)!=L)if(!E.has(L))y.push(L),O.set(L,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(E));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],R=s.indexOf(m);R>-1&&s.splice(R,1)}E=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),D.add(E);var y=this.newEdge(null);this.graphManager.add(y,v,E),p.add(E),v=E}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var E=D[u],y=new n(E.getCenterX(),E.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,E.getOwner().remove(E)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var E=p/v;u-=(p-E)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,E=null;(p.length==1||p.length==2)&&(u=!0,E=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],L=p.indexOf(O);L>=0&&p.splice(L,1);var A=O.getNeighborsList();A.forEach(function(C){if(v.indexOf(C)<0){var M=D.get(C),S=M-1;S==1&&f.push(C),D.set(C,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,E=p[0])}return E},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h},function(N,I,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o},function(N,I,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e},function(N,I,T){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=T(15),t=T(7),i=T(0),l=T(8),g=T(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),E=0;E<u.length;E++)r=u[E],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),E=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,E,r,h),E.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,E;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),E=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=E,p.springForceX-=u,p.springForceY-=E)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,E,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var L=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=L*f,r.repulsionForceY-=L*c,h.repulsionForceX+=L*f,h.repulsionForceY+=L*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),E=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],E=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(E)<t.MIN_REPULSION_DIST&&(E=g.sign(E)*t.MIN_REPULSION_DIST),y=u*u+E*E,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*E/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,E,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,E=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var E=p;E<=v;E++)for(var y=D;y<=u;y++)this.grid[E][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,E=r.startX-1;E<r.finishX+2;E++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(E<0||y<0||E>=u.length||y>=u[0].length)){for(var O=0;O<u[E][y].length;O++)if(D=u[E][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(E=0;E<r.surrounding.length;E++)this.calcRepulsionForce(r,r.surrounding[E])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n},function(N,I,T){var o=T(1),e=T(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t},function(N,I,T){var o=T(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e},function(N,I,T){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o},function(N,I,T){var o=T(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e},function(N,I,T){var o=T(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e},function(N,I,T){var o=function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}}();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=T(11),i=function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l}();N.exports=i},function(N,I,T){var o=function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}}();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i}();N.exports=t},function(N,I,T){var o=function(){};o.FDLayout=T(18),o.FDLayoutConstants=T(7),o.FDLayoutEdge=T(19),o.FDLayoutNode=T(20),o.DimensionD=T(21),o.HashMap=T(22),o.HashSet=T(23),o.IGeometry=T(8),o.IMath=T(9),o.Integer=T(10),o.Point=T(12),o.PointD=T(4),o.RandomSeed=T(16),o.RectangleD=T(13),o.Transform=T(17),o.UniqueIDGeneretor=T(14),o.Quicksort=T(24),o.LinkedList=T(11),o.LGraphObject=T(2),o.LGraph=T(5),o.LEdge=T(1),o.LGraphManager=T(6),o.LNode=T(3),o.Layout=T(15),o.LayoutConstants=T(0),o.NeedlemanWunsch=T(25),N.exports=o},function(N,I,T){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o}])})}(Q)),Q.exports}var q;function gt(){return q||(q=1,function(G,b){(function(I,T){G.exports=T(lt())})(k.commonjsGlobal,function(N){return function(I){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)}([function(I,T){I.exports=N},function(I,T,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t},function(I,T,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i},function(I,T,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,E=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){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){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(L){return f.has(L)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var L=s[c].rect,A=s[c].id;f[A]={id:A,x:L.getCenterX(),y:L.getCenterY(),w:L.width,h:L.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),L=c.length,A;for(A=0;A<L;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var L=s[c];if(!f.has(L)){var A=L.getSource(),m=L.getTarget();if(A==m)L.getBendpoints().push(new a),L.getBendpoints().push(new a),this.createDummyNodesForBendpoints(L),f.add(L);else{var R=[];if(R=R.concat(A.getEdgeListToNode(m)),R=R.concat(m.getEdgeListToNode(A)),!f.has(R[0])){if(R.length>1){var C;for(C=0;C<R.length;C++){var M=R[C];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}R.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),L=0,A=0,m=0,R=new a(0,0),C=0;C<s.length;C++){C%c==0&&(m=0,A=L,C!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),L=0);var M=s[C],S=p.findCenterOfTree(M);f.x=m,f.y=A,R=y.radialLayout(M,S,f),R.y>L&&(L=Math.floor(R.y)),m=Math.floor(R.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-R.x/2,r.WORLD_CENTER_Y-R.y/2))},y.radialLayout=function(s,f,c){var L=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,L);var A=u.calculateBounds(s),m=new E;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var R=0;R<s.length;R++){var C=s[R];C.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,L,A,m){var R=(L-c+1)/2;R<0&&(R+=180);var C=(R+c)%360,M=C*D.TWO_PI/360,S=A*Math.cos(M),_=A*Math.sin(M);s.setCenter(S,_);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,P=w.length,U,Y=s.getEdgesBetween(f);Y.length>1;){var X=Y[0];Y.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),P--,x--}f!=null?U=(w.indexOf(Y[0])+1)%P:U=0;for(var B=Math.abs(L-c)/x,V=U;F!=x;V=++V%P){var $=w[V].getOtherEnd(s);if($!=f){var K=(c+F*B)%360,at=(K+B)%360;y.branchRadialLayout($,s,K,at,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var L=s[c],A=L.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],L=this.graphManager.getAllNodes(),A=0;A<L.length;A++){var m=L[A],R=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(R.id==null||!this.getToBeTiled(R))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],C=m.getParent().id;typeof f[C]>"u"&&(f[C]=[]),f[C]=f[C].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var _=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=_.paddingLeft||0,w.paddingRight=_.paddingRight||0,w.paddingBottom=_.paddingBottom||0,w.paddingTop=_.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=_.getChild();F.add(w);for(var P=0;P<f[M].length;P++){var U=f[M][P];F.remove(U),x.add(U)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var L=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],L.paddingLeft+L.paddingRight),L.rect.width=f[c].width,L.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,L=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,L,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var L=s.idToDummyNode[c],A=L.paddingLeft,m=L.paddingTop;s.adjustLocations(f[c],L.rect.x,L.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var L=c.getNodes(),A=0;A<L.length;A++){var m=L[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,L=0;L<f.length;L++){var A=f[L];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),L=0;L<c.length;L++){var A=c[L];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,L,A){f+=L,c+=A;for(var m=f,R=0;R<s.rows.length;R++){var C=s.rows[R];f=m;for(var M=0,S=0;S<C.length;S++){var _=C[S];_.rect.x=f,_.rect.y=c,f+=_.rect.width+s.horizontalPadding,_.rect.height>M&&(M=_.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(L){var A=f[L];c.tiledMemberPack[L]=c.tileNodes(s[L],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[L].width,A.rect.height=c.tiledMemberPack[L].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,L=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:L};s.sort(function(C,M){return C.rect.width*C.rect.height>M.rect.width*M.rect.height?-1:C.rect.width*C.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var R=s[m];A.rows.length==0?this.insertNodeToRow(A,R,0,f):this.canAddHorizontal(A,R.rect.width,R.rect.height)?this.insertNodeToRow(A,R,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,R,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,L){var A=L;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var R=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(R+=s.horizontalPadding),s.rowWidth[c]=R,s.width<R&&(s.width=R);var C=f.rect.height;c>0&&(C+=s.verticalPadding);var M=0;C>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=C,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,L=0;L<s.rows.length;L++)s.rowWidth[L]<c&&(f=L,c=s.rowWidth[L]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,L=0;L<s.rows.length;L++)s.rowWidth[L]>c&&(f=L,c=s.rowWidth[L]);return f},y.prototype.canAddHorizontal=function(s,f,c){var L=this.getShortestRowIndex(s);if(L<0)return!0;var A=s.rowWidth[L];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[L]<c&&L>0&&(m=c+s.verticalPadding-s.rowHeight[L]);var R;s.width-A>=f+s.horizontalPadding?R=(s.height+m)/(A+f+s.horizontalPadding):R=(s.height+m)/s.width,m=c+s.verticalPadding;var C;return s.width<f?C=(s.height+m)/f:C=(s.height+m)/s.width,C<1&&(C=1/C),R<1&&(R=1/R),R<C},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,L=s.rows[f],A=L[L.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){L.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,C=0;C<L.length;C++)L[C].height>R&&(R=L[C].height);f>0&&(R+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=R,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var L=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<L.length;m++)c=L[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var R=[],C=0;C<A.length;C++)A[C][0].getEdges().length==1&&(R.push(A[C]),A[C][0].getOwner().remove(A[C][0]));s.push(R),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],L,A=0;A<c.length;A++)L=c[A],this.findPlaceforPrunedNode(L),L[2].add(L[0]),L[2].add(L[1],L[1].source,L[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,L=s[0];L==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,R=c.startY,C=c.finishY,M=0,S=0,_=0,w=0,x=[M,_,S,w];if(R>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(m<this.grid.length-1)for(var F=R;F<=C;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(C<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][C+1].length+this.grid[F][C].length-1;if(A>0)for(var F=R;F<=C;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var P=v.MAX_VALUE,U,Y,X=0;X<x.length;X++)x[X]<P?(P=x[X],U=1,Y=X):x[X]==P&&U++;if(U==3&&P==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(U==2&&P==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(U==4&&P==0){var H=Math.floor(Math.random()*4);f=H}else f=Y;f==0?L.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-L.getHeight()/2):f==1?L.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+L.getWidth()/2,c.getCenterY()):f==2?L.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+L.getHeight()/2):L.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-L.getWidth()/2,c.getCenterY())},I.exports=y},function(I,T,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e}])})}(Z)),Z.exports}(function(G,b){(function(I,T){G.exports=T(gt())})(k.commonjsGlobal,function(N){return function(I){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(I,T){I.exports=N},function(I,T,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var E={};for(var y in D)E[y]=D[y];for(var y in u)E[y]=u[y];return E}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,E=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var L=0;L<c.length;L++){var A=c[L],m=this.idToLNode[A.data("source")],R=this.idToLNode[A.data("target")];if(m!==R&&m.getEdgesBetween(R).length==0){var C=s.add(y.newEdge(),m,R);C.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),P=O.idToLNode[F];return{x:P.getRect().getCenterX(),y:P.getRect().getCenterY()}},S=function _(){for(var w=function(){E.fit&&E.cy.fit(E.eles,E.padding),D||(D=!0,O.cy.one("layoutready",E.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,P=0;P<x&&!F;P++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var U=O.layout.getPositionsData();E.eles.nodes().positions(function(Y,X){if(typeof Y=="number"&&(Y=X),!Y.isParent()){for(var H=Y.id(),B=U[H],V=Y;B==null&&(B=U[V.data("parent")]||U["DummyCompound_"+V.data("parent")],U[H]=B,V=V.parent()[0],V!=null););return B!=null?{x:B.x,y:B.y}:{x:Y.position("x"),y:Y.position("y")}}}),w(),u=requestAnimationFrame(_)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},E=0;E<D.length;E++)u[D[E].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,E){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,L=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(E.graphManager,new n(s.position("x")-L.w/2,s.position("y")-L.h/2),new d(parseFloat(L.w),parseFloat(L.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,R=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=R}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var C;C=E.getGraphManager().add(E.newGraph(),c),this.processChildrenList(C,f,E)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v}])})})(J);var ut=J.exports;const ft=k.getDefaultExportFromCjs(ut);z.cytoscape.use(ft);function tt(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(T=>{["id","label","height","width","padding","x","y"].includes(T)||(I[T]=N[T])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}W.__name(tt,"addNodes");function et(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(T=>{["id","start","end"].includes(T)||(I[T]=N[T])}),b.add({group:"edges",data:I})})}W.__name(et,"addEdges");function rt(G){return new Promise(b=>{const N=ht.select("body").append("div").attr("id","cy").attr("style","display:none"),I=z.cytoscape({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),tt(G.nodes,I),et(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const T={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(T).run(),I.ready(o=>{W.log.info("Cytoscape ready",o),b(I)})})}W.__name(rt,"createCytoscapeInstance");function it(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),T={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(T[o]=N[o])}),T})}W.__name(it,"extractPositionedNodes");function nt(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,T={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(T[o]=N[o])}),T})}W.__name(nt,"extractPositionedEdges");async function ot(G,b){W.log.debug("Starting cose-bilkent layout algorithm");try{st(G);const N=await rt(G),I=it(N),T=nt(N);return W.log.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`),{nodes:I,edges:T}}catch(N){throw W.log.error("Error in cose-bilkent layout algorithm:",N),N}}W.__name(ot,"executeCoseBilkentLayout");function st(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}W.__name(st,"validateLayoutData");var ct=W.__name(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:T,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const E={...u};n[u.id]=E,g[u.id]=E,await N(r,u)}else{const E={...u};g[u.id]=E;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();E.width=O.width,E.height=O.height,E.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const E=g[u.id];return{...u,width:E.width,height:E.height}})},D=await ot(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const E=g[u.id];E!=null&&E.domId&&(E.domId.attr("transform",`translate(${u.x}, ${u.y})`),E.x=u.x,E.y=u.y,t.debug(`Positioned node ${E.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const E=G.edges.find(y=>y.id===u.id);E&&(E.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await T(a,u);const E=g[u.start??""],y=g[u.end??""];if(E&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:E.x||0,y:E.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),pt=ct;exports.render=pt;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pt=require("./chunk-JWPE2WC7-C2pEJElF.cjs"),a=require("./mermaid.core-DB-ckht7.cjs"),yt=require("./cynefin-OW5HDTMX-DaKNJZN5.cjs");var et=a.__name(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=et(),ut=a.__name(()=>H.domains,"getDomains"),gt=a.__name(()=>H.transitions,"getTransitions"),ht=a.__name(t=>{if(t)for(const e of t){const n=e.domain,o=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:o})}},"setDomains"),xt=a.__name(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(a.log.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),$t=a.__name(()=>a.cleanAndMerge({...a.defaultConfig_default.cynefin,...a.getConfig().cynefin}),"getConfig"),bt=a.__name(()=>{a.clear(),H=et()},"clear"),G={getDomains:ut,getTransitions:gt,setDomains:ht,setTransitions:xt,getConfig:$t,clear:bt,setAccTitle:a.setAccTitle,getAccTitle:a.getAccTitle,setDiagramTitle:a.setDiagramTitle,getDiagramTitle:a.getDiagramTitle,getAccDescription:a.getAccDescription,setAccDescription:a.setAccDescription},Ct=a.__name(t=>{pt.populateCommonDb(t,G),G.setDomains(t.domains),G.setTransitions(t.transitions)},"populate"),wt={parse:a.__name(async t=>{const e=await yt.parse("cynefin",t);a.log.debug(e),Ct(e)},"parse")};function F(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}a.__name(F,"seededRandom");function nt(t){let e=0;for(let n=0;n<t.length;n++){const o=t.charCodeAt(n);e=(e<<5)-e+o,e|=0}return e}a.__name(nt,"hashString");function at(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:nt(e)}a.__name(at,"resolveSeed");function ot(t,e,n,o){const c=t/2,m=o??t*.015,_=7,N=e/_,d=[];for(let r=0;r<=_;r++){const p=F(n+r*17)*m*2-m;d.push({x:c+p,y:r*N})}let D=`M${d[0].x},${d[0].y}`;for(let r=0;r<d.length-1;r++){const p=d[r],s=d[r+1],f=(p.y+s.y)/2,b=r%2===0?1:-1,g=m*1.5*b*F(n+r*31+7),I=p.x+g,R=f,V=s.x-g;D+=` C${I},${R} ${V},${f} ${s.x},${s.y}`}return D}a.__name(ot,"generateFoldPath");function rt(t,e,n,o){const c=e/2,m=o??e*.015,_=7,N=t/_,d=[];for(let r=0;r<=_;r++){const p=F(n+r*23)*m*2-m;d.push({x:r*N,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let r=0;r<d.length-1;r++){const p=d[r],s=d[r+1],f=(p.x+s.x)/2,b=r%2===0?1:-1,g=m*1.5*b*F(n+r*37+11),I=f,R=p.y+g,V=f,M=s.y-g;D+=` C${I},${R} ${V},${M} ${s.x},${s.y}`}return D}a.__name(rt,"generateHorizontalBoundary");function it(t,e){const n=t/2,o=e*.5,c=e,m=t*.03;return[`M${n},${o}`,`C${n+m},${o+(c-o)*.2}`,`${n-m*1.5},${o+(c-o)*.55}`,`${n+m*.5},${o+(c-o)*.75}`,`C${n-m},${o+(c-o)*.85}`,`${n+m*.3},${o+(c-o)*.95}`,`${n},${c}`].join(" ")}a.__name(it,"generateCliffPath");function st(t,e,n,o){return[`M${t-n},${e}`,`A${n},${o} 0 1,1 ${t+n},${e}`,`A${n},${o} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}a.__name(st,"generateConfusionPath");var tt={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},_t=a.__name((t,e)=>{const n=t/2,o=e/2;return{complex:{cx:n/2,cy:o/2,x:0,y:0,w:n,h:o},complicated:{cx:n+n/2,cy:o/2,x:n,y:0,w:n,h:o},chaotic:{cx:n/2,cy:o+o/2,x:0,y:o,w:n,h:o},clear:{cx:n+n/2,cy:o+o/2,x:n,y:o,w:n,h:o},confusion:{cx:n,cy:o,x:n*.7,y:o*.7,w:n*.6,h:o*.6}}},"getDomainLayouts"),Dt=a.__name(()=>{const t=a.getThemeVariables3(),e=a.getConfig();return a.cleanAndMerge(t,e.themeVariables).cynefin},"getCynefinDomainColors"),j=3,vt=a.__name((t,e,n,o)=>{const c=o.db,m=c.getDomains(),_=c.getTransitions(),N=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),r=c.getConfig(),p=Dt();a.log.debug("Rendering Cynefin diagram");const s=r.width,f=r.height,b=r.padding,g=r.showDomainDescriptions,I=r.boundaryAmplitude,R=s+b*2,V=f+b*2,M={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},v=a.selectSvgElement(e);a.configureSvgSize(v,V,R,r.useMaxWidth??!0),v.attr("viewBox",`0 0 ${R} ${V}`),d&&v.append("title").text(d),D&&v.append("desc").text(D);const T=v.append("g").attr("transform",`translate(${b}, ${b})`),E=_t(s,f),q=at(r.seed,e),ct=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const i=E[l];ct.append("rect").attr("class","cynefinDomain").attr("x",i.x).attr("y",i.y).attr("width",i.w).attr("height",i.h).attr("fill",M[l]).attr("fill-opacity",.4).attr("stroke","none")}const Y=T.append("g").attr("class","cynefin-boundaries");Y.append("path").attr("class","cynefinBoundary").attr("d",ot(s,f,q,I)).attr("fill","none"),Y.append("path").attr("class","cynefinBoundary").attr("d",rt(s,f,q+100,I)).attr("fill","none"),Y.append("path").attr("class","cynefinCliff").attr("d",it(s,f)).attr("fill","none");const lt=s*.15,dt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",st(s/2,f/2,lt,dt)).attr("fill",M.confusion).attr("fill-opacity",.5);const U=T.append("g").attr("class","cynefin-labels");for(const l of X){const i=E[l];U.append("text").attr("class","cynefinDomainLabel").attr("x",i.cx).attr("y",g?i.cy-30:i.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(U.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",g?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),g){const l=T.append("g").attr("class","cynefin-subtitles");for(const i of X){const u=E[i],y=tt[i];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(tt.confusion.practice)}const J=T.append("g").attr("class","cynefin-items"),A=26,Q=10,ft=["complex","complicated","chaotic","clear","confusion"];for(const l of ft){const i=m.get(l);if(!i||i.items.length===0)continue;const u=E[l],y=l==="confusion";let z=i.items,L=0;y&&i.items.length>j&&(L=i.items.length-j,z=i.items.slice(0,j));let k;if(y){const x=g?22:14;k=u.cy+x}else k=u.cy+(g?25:15);if([...z].forEach((x,B)=>{const C=k+B*(A+4),S=J.append("g"),P=S.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(x.label);let $=x.label.length*7;const h=P.node();if(h&&typeof h.getBBox=="function"){const O=h.getBBox();O.width>0&&($=O.width)}const w=$+Q*2,W=u.cx-w/2;S.attr("transform",`translate(${W}, ${C})`),S.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",w).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",M[l]).attr("fill-opacity",.95),P.attr("x",w/2).attr("y",A/2)}),L>0){const x=k+z.length*(A+4),B=`+${L} more`,C=J.append("g"),S=C.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(B);let P=B.length*7;const $=S.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const h=P+Q*2,w=u.cx-h/2;C.attr("transform",`translate(${w}, ${x})`),C.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",h).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",M[l]).attr("fill-opacity",.6),S.attr("x",h/2).attr("y",A/2)}}if(_.length>0){const l=v.select("defs").empty()?v.append("defs"):v.select("defs"),i=`cynefin-arrow-${e}`;l.append("marker").attr("id",i).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");_.forEach(y=>{const z=E[y.from],L=E[y.to];if(!z||!L)return;if(y.from===y.to){a.log.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const k=z.cx,x=z.cy,B=L.cx,C=L.cy,S=(k+B)/2,P=(x+C)/2,$=B-k,h=C-x,w=Math.sqrt($*$+h*h),W=w*.15,O=-h/w,mt=$/w,Z=S+O*W,K=P+mt*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${k},${x} Q${Z},${K} ${B},${C}`).attr("fill","none").attr("marker-end",`url(#${i})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",Z).attr("y",K-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}N&&T.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(N)},"draw"),Tt={draw:vt},At=a.__name(()=>{const t=a.getThemeVariables3(),e=a.getConfig();return a.cleanAndMerge(t,e.themeVariables).cynefin},"getCynefinTheme"),kt=a.__name(()=>{const t=At();return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pt=require("./chunk-JWPE2WC7-BBgLF2gY.cjs"),a=require("./mermaid.core-CdbCpwrG.cjs"),yt=require("./cynefin-OW5HDTMX-DaKNJZN5.cjs");var et=a.__name(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=et(),ut=a.__name(()=>H.domains,"getDomains"),gt=a.__name(()=>H.transitions,"getTransitions"),ht=a.__name(t=>{if(t)for(const e of t){const n=e.domain,o=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:o})}},"setDomains"),xt=a.__name(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(a.log.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),$t=a.__name(()=>a.cleanAndMerge({...a.defaultConfig_default.cynefin,...a.getConfig().cynefin}),"getConfig"),bt=a.__name(()=>{a.clear(),H=et()},"clear"),G={getDomains:ut,getTransitions:gt,setDomains:ht,setTransitions:xt,getConfig:$t,clear:bt,setAccTitle:a.setAccTitle,getAccTitle:a.getAccTitle,setDiagramTitle:a.setDiagramTitle,getDiagramTitle:a.getDiagramTitle,getAccDescription:a.getAccDescription,setAccDescription:a.setAccDescription},Ct=a.__name(t=>{pt.populateCommonDb(t,G),G.setDomains(t.domains),G.setTransitions(t.transitions)},"populate"),wt={parse:a.__name(async t=>{const e=await yt.parse("cynefin",t);a.log.debug(e),Ct(e)},"parse")};function F(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}a.__name(F,"seededRandom");function nt(t){let e=0;for(let n=0;n<t.length;n++){const o=t.charCodeAt(n);e=(e<<5)-e+o,e|=0}return e}a.__name(nt,"hashString");function at(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:nt(e)}a.__name(at,"resolveSeed");function ot(t,e,n,o){const c=t/2,m=o??t*.015,_=7,N=e/_,d=[];for(let r=0;r<=_;r++){const p=F(n+r*17)*m*2-m;d.push({x:c+p,y:r*N})}let D=`M${d[0].x},${d[0].y}`;for(let r=0;r<d.length-1;r++){const p=d[r],s=d[r+1],f=(p.y+s.y)/2,b=r%2===0?1:-1,g=m*1.5*b*F(n+r*31+7),I=p.x+g,R=f,V=s.x-g;D+=` C${I},${R} ${V},${f} ${s.x},${s.y}`}return D}a.__name(ot,"generateFoldPath");function rt(t,e,n,o){const c=e/2,m=o??e*.015,_=7,N=t/_,d=[];for(let r=0;r<=_;r++){const p=F(n+r*23)*m*2-m;d.push({x:r*N,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let r=0;r<d.length-1;r++){const p=d[r],s=d[r+1],f=(p.x+s.x)/2,b=r%2===0?1:-1,g=m*1.5*b*F(n+r*37+11),I=f,R=p.y+g,V=f,M=s.y-g;D+=` C${I},${R} ${V},${M} ${s.x},${s.y}`}return D}a.__name(rt,"generateHorizontalBoundary");function it(t,e){const n=t/2,o=e*.5,c=e,m=t*.03;return[`M${n},${o}`,`C${n+m},${o+(c-o)*.2}`,`${n-m*1.5},${o+(c-o)*.55}`,`${n+m*.5},${o+(c-o)*.75}`,`C${n-m},${o+(c-o)*.85}`,`${n+m*.3},${o+(c-o)*.95}`,`${n},${c}`].join(" ")}a.__name(it,"generateCliffPath");function st(t,e,n,o){return[`M${t-n},${e}`,`A${n},${o} 0 1,1 ${t+n},${e}`,`A${n},${o} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}a.__name(st,"generateConfusionPath");var tt={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},_t=a.__name((t,e)=>{const n=t/2,o=e/2;return{complex:{cx:n/2,cy:o/2,x:0,y:0,w:n,h:o},complicated:{cx:n+n/2,cy:o/2,x:n,y:0,w:n,h:o},chaotic:{cx:n/2,cy:o+o/2,x:0,y:o,w:n,h:o},clear:{cx:n+n/2,cy:o+o/2,x:n,y:o,w:n,h:o},confusion:{cx:n,cy:o,x:n*.7,y:o*.7,w:n*.6,h:o*.6}}},"getDomainLayouts"),Dt=a.__name(()=>{const t=a.getThemeVariables3(),e=a.getConfig();return a.cleanAndMerge(t,e.themeVariables).cynefin},"getCynefinDomainColors"),j=3,vt=a.__name((t,e,n,o)=>{const c=o.db,m=c.getDomains(),_=c.getTransitions(),N=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),r=c.getConfig(),p=Dt();a.log.debug("Rendering Cynefin diagram");const s=r.width,f=r.height,b=r.padding,g=r.showDomainDescriptions,I=r.boundaryAmplitude,R=s+b*2,V=f+b*2,M={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},v=a.selectSvgElement(e);a.configureSvgSize(v,V,R,r.useMaxWidth??!0),v.attr("viewBox",`0 0 ${R} ${V}`),d&&v.append("title").text(d),D&&v.append("desc").text(D);const T=v.append("g").attr("transform",`translate(${b}, ${b})`),E=_t(s,f),q=at(r.seed,e),ct=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const i=E[l];ct.append("rect").attr("class","cynefinDomain").attr("x",i.x).attr("y",i.y).attr("width",i.w).attr("height",i.h).attr("fill",M[l]).attr("fill-opacity",.4).attr("stroke","none")}const Y=T.append("g").attr("class","cynefin-boundaries");Y.append("path").attr("class","cynefinBoundary").attr("d",ot(s,f,q,I)).attr("fill","none"),Y.append("path").attr("class","cynefinBoundary").attr("d",rt(s,f,q+100,I)).attr("fill","none"),Y.append("path").attr("class","cynefinCliff").attr("d",it(s,f)).attr("fill","none");const lt=s*.15,dt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",st(s/2,f/2,lt,dt)).attr("fill",M.confusion).attr("fill-opacity",.5);const U=T.append("g").attr("class","cynefin-labels");for(const l of X){const i=E[l];U.append("text").attr("class","cynefinDomainLabel").attr("x",i.cx).attr("y",g?i.cy-30:i.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(U.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",g?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),g){const l=T.append("g").attr("class","cynefin-subtitles");for(const i of X){const u=E[i],y=tt[i];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(tt.confusion.practice)}const J=T.append("g").attr("class","cynefin-items"),A=26,Q=10,ft=["complex","complicated","chaotic","clear","confusion"];for(const l of ft){const i=m.get(l);if(!i||i.items.length===0)continue;const u=E[l],y=l==="confusion";let z=i.items,L=0;y&&i.items.length>j&&(L=i.items.length-j,z=i.items.slice(0,j));let k;if(y){const x=g?22:14;k=u.cy+x}else k=u.cy+(g?25:15);if([...z].forEach((x,B)=>{const C=k+B*(A+4),S=J.append("g"),P=S.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(x.label);let $=x.label.length*7;const h=P.node();if(h&&typeof h.getBBox=="function"){const O=h.getBBox();O.width>0&&($=O.width)}const w=$+Q*2,W=u.cx-w/2;S.attr("transform",`translate(${W}, ${C})`),S.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",w).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",M[l]).attr("fill-opacity",.95),P.attr("x",w/2).attr("y",A/2)}),L>0){const x=k+z.length*(A+4),B=`+${L} more`,C=J.append("g"),S=C.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(B);let P=B.length*7;const $=S.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const h=P+Q*2,w=u.cx-h/2;C.attr("transform",`translate(${w}, ${x})`),C.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",h).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",M[l]).attr("fill-opacity",.6),S.attr("x",h/2).attr("y",A/2)}}if(_.length>0){const l=v.select("defs").empty()?v.append("defs"):v.select("defs"),i=`cynefin-arrow-${e}`;l.append("marker").attr("id",i).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");_.forEach(y=>{const z=E[y.from],L=E[y.to];if(!z||!L)return;if(y.from===y.to){a.log.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const k=z.cx,x=z.cy,B=L.cx,C=L.cy,S=(k+B)/2,P=(x+C)/2,$=B-k,h=C-x,w=Math.sqrt($*$+h*h),W=w*.15,O=-h/w,mt=$/w,Z=S+O*W,K=P+mt*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${k},${x} Q${Z},${K} ${B},${C}`).attr("fill","none").attr("marker-end",`url(#${i})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",Z).attr("y",K-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}N&&T.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(N)},"draw"),Tt={draw:vt},At=a.__name(()=>{const t=a.getThemeVariables3(),e=a.getConfig();return a.cleanAndMerge(t,e.themeVariables).cynefin},"getCynefinTheme"),kt=a.__name(()=>{const t=At();return`
2
2
  .cynefinDomain {
3
3
  stroke: none;
4
4
  }
@@ -1,5 +1,5 @@
1
- import { p as xt } from "./chunk-JWPE2WC7-CqoXHHTD.js";
2
- import { s as gt, g as $t, v as bt, t as wt, a as Ct, b as vt, _ as s, l as O, L as Dt, d as kt, A as At, H as U, F as Q, I as Tt, N as ot } from "./mermaid.core-BZ22HWSY.js";
1
+ import { p as xt } from "./chunk-JWPE2WC7-B5QdRkL1.js";
2
+ import { s as gt, g as $t, v as bt, t as wt, a as Ct, b as vt, _ as s, l as O, L as Dt, d as kt, A as At, H as U, F as Q, I as Tt, N as ot } from "./mermaid.core-CcH8M8P-.js";
3
3
  import { p as Bt } from "./cynefin-OW5HDTMX-wW817aKN.js";
4
4
  var rt = /* @__PURE__ */ s(() => ({
5
5
  domains: /* @__PURE__ */ new Map(),
@@ -1,5 +1,5 @@
1
- import { _ as m, ab as D, c as A, V as Y, l as p, ac as _, ad as H, ae as w, af as J, ag as T, ah as z, ai as R, aj as F, ak as j, al as C, a4 as P, a2 as W, am as q, an as U } from "./mermaid.core-BZ22HWSY.js";
2
- import { l as V } from "./layout-Bn232-5f.js";
1
+ import { _ as m, ab as D, c as A, V as Y, l as p, ac as _, ad as H, ae as w, af as J, ag as T, ah as z, ai as R, aj as F, ak as j, al as C, a4 as P, a2 as W, am as q, an as U } from "./mermaid.core-CcH8M8P-.js";
2
+ import { l as V } from "./layout-DRasA2Pr.js";
3
3
  var v = /* @__PURE__ */ m((t, e, d) => Math.max(e, Math.min(d, t)), "clamp"), B = /* @__PURE__ */ m((t = "TB") => {
4
4
  switch (t) {
5
5
  case "BT":
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./mermaid.core-DB-ckht7.cjs"),I=require("./layout-BFxr1rNK.cjs");var N=t.__name((r,e,l)=>Math.max(e,Math.min(l,r)),"clamp"),X=t.__name((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),G=t.__name(r=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram"||r==="er"||r==="classDiagram","shouldMergeSelfLoopSegments"),O=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],k=t.__name((r,e,l,f,i)=>{const h=[],m=new Set;if(l.forEach(({start:g,end:o})=>{g!==f&&m.add(g),o!==f&&m.add(o)}),m.forEach(g=>{const o=r.node(g);typeof(o==null?void 0:o.x)=="number"&&typeof(o==null?void 0:o.y)=="number"&&h.push(o)}),h.length===0&&l.forEach(({edge:g})=>{(g.points??[]).forEach(o=>{typeof(o==null?void 0:o.x)=="number"&&typeof(o==null?void 0:o.y)=="number"&&h.push(o)})}),h.length===0)return X(i);const c=h.reduce((g,o)=>({x:g.x+o.x/h.length,y:g.y+o.y/h.length}),{x:0,y:0}),d=c.x-e.x,n=c.y-e.y;return Math.abs(d)>Math.abs(n)?d>0?"right":"left":Math.abs(n)>0?n>0?"bottom":"top":X(i)},"getSelfLoopSide"),A=t.__name((r,e="top",l=0,f=0)=>{const i=r.x,h=r.y-l,m=r.width/2,c=r.height/2,d=Math.max(36,Math.min(100,r.width*.8)),n=N(Math.max(f,r.width*.35),36,d),g=N(Math.min(r.width,r.height)*.45,24,48);switch(e){case"bottom":{const o=h+c;return[{x:i-n/2,y:o},{x:i-n/2,y:o+g},{x:i+n/2,y:o+g},{x:i+n/2,y:o}]}case"right":{const o=i+m;return[{x:o,y:h-n/2},{x:o+g,y:h-n/2},{x:o+g,y:h+n/2},{x:o,y:h+n/2}]}case"left":{const o=i-m;return[{x:o,y:h-n/2},{x:o-g,y:h-n/2},{x:o-g,y:h+n/2},{x:o,y:h+n/2}]}case"top":default:{const o=h-c;return[{x:i-n/2,y:o},{x:i-n/2,y:o-g},{x:i+n/2,y:o-g},{x:i+n/2,y:o}]}}},"getSelfLoopPoints"),H=t.__name((r,e,l="top",f=0,i={})=>{const m=r.x,c=r.y-f,d=i.width??0,n=i.height??0;switch(l){case"bottom":return{x:m,y:Math.max(...e.map(g=>g.y))+n/2+4};case"right":return{x:Math.max(...e.map(g=>g.x))+d/2+4,y:c};case"left":return{x:Math.min(...e.map(g=>g.x))-d/2-4,y:c};case"top":default:return{x:m,y:Math.min(...e.map(g=>g.y))-n/2-4}}},"getSelfLoopLabelPosition"),_=t.__name((r,e=0,{mergeSelfLoops:l=!0}={})=>{var m;const f=new Map,i=[],h=(m=r.graph())==null?void 0:m.rankdir;return r.edges().forEach(c=>{const d=r.edge(c);if(l&&d.selfLoop){const n=d.selfLoop.id;f.has(n)||f.set(n,[]),f.get(n).push({edge:d,start:c.v,end:c.w})}else i.push({edge:d,start:c.v,end:c.w})}),f.forEach(c=>{if(c.length!==3){c.forEach(b=>i.push(b));return}c.sort((b,E)=>b.edge.selfLoop.order-E.edge.selfLoop.order);const[d,n,g]=c,o=d.edge.originalEdge??n.edge.originalEdge??g.edge.originalEdge??n.edge,a=r.node(o.start);if(!a){c.forEach(b=>i.push(b));return}const L={width:n.edge.width,height:n.edge.height},y=k(r,a,c,o.start,h),u=A(a,y,e,L.width??0),s=H(a,u,y,e,L),p={...n.edge,...o,id:o.id,points:u,start:o.start,end:o.end,x:s.x,y:s.y,width:L.width,height:L.height,labelStyle:n.edge.labelStyle,fromCluster:d.edge.fromCluster??n.edge.fromCluster??g.edge.fromCluster,toCluster:d.edge.toCluster??n.edge.toCluster??g.edge.toCluster};delete p.selfLoop,delete p.originalEdge,i.push({edge:p,start:p.start,end:p.end})}),i},"getEdgesToRender"),R=t.__name(async({element:r,graph:e,diagramType:l,id:f,parentCluster:i,siteConfig:h})=>{const m=e.graph().rankdir;t.log.trace("Dir in recursive render - dir:",m);const{clusters:c,edgePaths:d,edgeLabels:n,nodes:g,rootGroups:o}=t.createLayoutElementGroups(r,{edgePathsClass:"edgePaths"});e.nodes()?t.log.info("Recursive render XXX",e.nodes()):t.log.info("No nodes found for",e),e.edges().length>0&&t.log.info("Recursive edges",e.edge(e.edges()[0]));const a=G(l);await Promise.all(e.nodes().map(async function(u){const s=e.node(u);if(i!==void 0){const p=JSON.parse(JSON.stringify(i.clusterData));t.log.trace(`Setting data for parent cluster XXX
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./mermaid.core-CdbCpwrG.cjs"),I=require("./layout-ABAzIcCC.cjs");var N=t.__name((r,e,l)=>Math.max(e,Math.min(l,r)),"clamp"),X=t.__name((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),G=t.__name(r=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram"||r==="er"||r==="classDiagram","shouldMergeSelfLoopSegments"),O=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],k=t.__name((r,e,l,f,i)=>{const h=[],m=new Set;if(l.forEach(({start:g,end:o})=>{g!==f&&m.add(g),o!==f&&m.add(o)}),m.forEach(g=>{const o=r.node(g);typeof(o==null?void 0:o.x)=="number"&&typeof(o==null?void 0:o.y)=="number"&&h.push(o)}),h.length===0&&l.forEach(({edge:g})=>{(g.points??[]).forEach(o=>{typeof(o==null?void 0:o.x)=="number"&&typeof(o==null?void 0:o.y)=="number"&&h.push(o)})}),h.length===0)return X(i);const c=h.reduce((g,o)=>({x:g.x+o.x/h.length,y:g.y+o.y/h.length}),{x:0,y:0}),d=c.x-e.x,n=c.y-e.y;return Math.abs(d)>Math.abs(n)?d>0?"right":"left":Math.abs(n)>0?n>0?"bottom":"top":X(i)},"getSelfLoopSide"),A=t.__name((r,e="top",l=0,f=0)=>{const i=r.x,h=r.y-l,m=r.width/2,c=r.height/2,d=Math.max(36,Math.min(100,r.width*.8)),n=N(Math.max(f,r.width*.35),36,d),g=N(Math.min(r.width,r.height)*.45,24,48);switch(e){case"bottom":{const o=h+c;return[{x:i-n/2,y:o},{x:i-n/2,y:o+g},{x:i+n/2,y:o+g},{x:i+n/2,y:o}]}case"right":{const o=i+m;return[{x:o,y:h-n/2},{x:o+g,y:h-n/2},{x:o+g,y:h+n/2},{x:o,y:h+n/2}]}case"left":{const o=i-m;return[{x:o,y:h-n/2},{x:o-g,y:h-n/2},{x:o-g,y:h+n/2},{x:o,y:h+n/2}]}case"top":default:{const o=h-c;return[{x:i-n/2,y:o},{x:i-n/2,y:o-g},{x:i+n/2,y:o-g},{x:i+n/2,y:o}]}}},"getSelfLoopPoints"),H=t.__name((r,e,l="top",f=0,i={})=>{const m=r.x,c=r.y-f,d=i.width??0,n=i.height??0;switch(l){case"bottom":return{x:m,y:Math.max(...e.map(g=>g.y))+n/2+4};case"right":return{x:Math.max(...e.map(g=>g.x))+d/2+4,y:c};case"left":return{x:Math.min(...e.map(g=>g.x))-d/2-4,y:c};case"top":default:return{x:m,y:Math.min(...e.map(g=>g.y))-n/2-4}}},"getSelfLoopLabelPosition"),_=t.__name((r,e=0,{mergeSelfLoops:l=!0}={})=>{var m;const f=new Map,i=[],h=(m=r.graph())==null?void 0:m.rankdir;return r.edges().forEach(c=>{const d=r.edge(c);if(l&&d.selfLoop){const n=d.selfLoop.id;f.has(n)||f.set(n,[]),f.get(n).push({edge:d,start:c.v,end:c.w})}else i.push({edge:d,start:c.v,end:c.w})}),f.forEach(c=>{if(c.length!==3){c.forEach(b=>i.push(b));return}c.sort((b,E)=>b.edge.selfLoop.order-E.edge.selfLoop.order);const[d,n,g]=c,o=d.edge.originalEdge??n.edge.originalEdge??g.edge.originalEdge??n.edge,a=r.node(o.start);if(!a){c.forEach(b=>i.push(b));return}const L={width:n.edge.width,height:n.edge.height},y=k(r,a,c,o.start,h),u=A(a,y,e,L.width??0),s=H(a,u,y,e,L),p={...n.edge,...o,id:o.id,points:u,start:o.start,end:o.end,x:s.x,y:s.y,width:L.width,height:L.height,labelStyle:n.edge.labelStyle,fromCluster:d.edge.fromCluster??n.edge.fromCluster??g.edge.fromCluster,toCluster:d.edge.toCluster??n.edge.toCluster??g.edge.toCluster};delete p.selfLoop,delete p.originalEdge,i.push({edge:p,start:p.start,end:p.end})}),i},"getEdgesToRender"),R=t.__name(async({element:r,graph:e,diagramType:l,id:f,parentCluster:i,siteConfig:h})=>{const m=e.graph().rankdir;t.log.trace("Dir in recursive render - dir:",m);const{clusters:c,edgePaths:d,edgeLabels:n,nodes:g,rootGroups:o}=t.createLayoutElementGroups(r,{edgePathsClass:"edgePaths"});e.nodes()?t.log.info("Recursive render XXX",e.nodes()):t.log.info("No nodes found for",e),e.edges().length>0&&t.log.info("Recursive edges",e.edge(e.edges()[0]));const a=G(l);await Promise.all(e.nodes().map(async function(u){const s=e.node(u);if(i!==void 0){const p=JSON.parse(JSON.stringify(i.clusterData));t.log.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,u,`
3
3
  data=`,p.height,`
4
4
  Parent cluster`,i.height),e.setNode(i.id,p),e.parent(u)||(t.log.trace("Setting parent",u,i.id),e.setParent(u,i.id,p))}if(t.log.info("(Insert) Node XXX"+u+": "+JSON.stringify(e.node(u))),s!=null&&s.clusterNode){t.log.info("Cluster identified XBX",u,s.width,e.node(u));const{ranksep:p,nodesep:b}=e.graph();s.graph.setGraph({...s.graph.graph(),ranksep:p+25,nodesep:b});const E=await z({element:g,graph:s.graph,diagramType:l,id:f,parentCluster:e.node(u),siteConfig:h}),w=E.elem;t.updateNodeBounds(s,w),s.diff=E.diff||0,t.log.info("New compound node after recursive render XAX",u,"width",s.width,"height",s.height),t.setNodeElem(w,s)}else e.children(u).length>0?(t.log.trace("Cluster - the non recursive path XBX",u,s.id,s,s.width,"Graph:",e),t.log.trace(t.findNonClusterChild(s.id,e)),t.clusterDb.set(s.id,{id:t.findNonClusterChild(s.id,e),node:s})):(t.log.trace("Node - the non recursive path XAX",u,g,e.node(u),m),await t.insertMeasuredNode(g,e.node(u),{config:h,dir:m}))})),await t.__name(async()=>{const u=e.edges().map(async function(s){var b,E,w,D;const p=e.edge(s.v,s.w,s.name);if(t.log.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),t.log.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(e.edge(s))),t.log.info("Fix",t.clusterDb,"ids:",s.v,s.w,"Translating: ",t.clusterDb.get(s.v),t.clusterDb.get(s.w)),a&&p.selfLoop){if(p.selfLoop.order!==1)return;const S={...p.originalEdge,...p,id:p.selfLoop.id,startLabelLeft:((b=p.originalEdge)==null?void 0:b.startLabelLeft)??p.startLabelLeft,startLabelRight:((E=p.originalEdge)==null?void 0:E.startLabelRight)??p.startLabelRight,endLabelLeft:((w=p.originalEdge)==null?void 0:w.endLabelLeft)??p.endLabelLeft,endLabelRight:((D=p.originalEdge)==null?void 0:D.endLabelRight)??p.endLabelRight};await t.insertEdgeLabel(n,S),p.width=S.width,p.height=S.height,p.labelStyle=S.labelStyle;return}await t.insertEdgeLabel(n,p)});await Promise.all(u)},"processEdges")();const{subGraphTitleTotalMargin:y}=t.getSubGraphTitleMargins(h);return{elem:o,graph:e,groups:{clusters:c,edgePaths:d,edgeLabels:n,nodes:g,rootGroups:o},diagramType:l,id:f,mergeSelfLoops:a,subGraphTitleTotalMargin:y}},"measureDagreGraph"),P=t.__name(r=>{t.log.info("############################################# XXX"),t.log.info("### Layout ### XXX"),t.log.info("############################################# XXX"),I.layout(r)},"runDagreGraphLayout"),T=t.__name((r,e,l)=>{const f=r.node(e);if(!f)return;const i={...f};return f!=null&&f.clusterNode?i.y=(f.y??0)+l:r.children(e).length>0?i.height=(f.height??0)+l:i.y=(f.y??0)+l/2,i},"normalizeDagreNode"),C=t.__name((r,e)=>{O.forEach(l=>{e[l]!==void 0&&(r[l]=e[l])})},"applyDagreNodeLayout"),Y=t.__name((r,e,l,f)=>({...r,start:r.start??e,end:r.end??l,points:(r.points??[]).map(i=>({...i,y:typeof i.y=="number"?i.y+f:i.y}))}),"normalizeDagreEdge"),v=t.__name((r,e)=>{const{graph:l,mergeSelfLoops:f,subGraphTitleTotalMargin:i=0}=e,h=new Map(r.nodes.map(c=>[c.id,c]));t.sortNodesByHierarchy(l).forEach(c=>{const d=T(l,c,i);if(!d)return;C(l.node(c),d);const n=h.get(c);n&&C(n,d)});const m=i/2;return r.edges=_(l,m,{mergeSelfLoops:f}).map(({edge:c,start:d,end:n})=>Y(c,d,n,m)),r},"applyDagreLayoutResult"),J=t.__name(async({elem:r,graph:e,groups:{clusters:l,edgePaths:f},diagramType:i,id:h,mergeSelfLoops:m,subGraphTitleTotalMargin:c})=>{let d=0;await Promise.all(t.sortNodesByHierarchy(e).map(async function(o){var L;const a=e.node(o);if(t.log.info("Position XBX => "+o+": ("+a.x,","+a.y,") width: ",a.width," height: ",a.height),a!=null&&a.clusterNode)a.y+=c,t.log.info("A tainted cluster node XBX1",o,a.id,a.width,a.height,a.x,a.y,e.parent(o)),t.clusterDb.get(a.id).node=a,t.positionNode(a);else if(e.children(o).length>0){t.log.info("A pure cluster node XBX1",o,a.id,a.x,a.y,a.width,a.height,e.parent(o)),a.height+=c,e.node(a.parentId);const y=(a==null?void 0:a.padding)/2||0,u=((L=a==null?void 0:a.labelBBox)==null?void 0:L.height)||0,s=u-y||0;t.log.debug("OffsetY",s,"labelHeight",u,"halfPadding",y),await t.insertCluster(l,a),t.clusterDb.get(a.id).node=a}else{const y=e.node(a.parentId);a.y+=c/2,t.log.info("A regular node XBX1 - using the padding",a.id,"parent",a.parentId,a.width,a.height,a.x,a.y,"offsetY",a.offsetY,"parent",y,y==null?void 0:y.offsetY,a),t.positionNode(a)}}));const n=c/2;return _(e,n,{mergeSelfLoops:m}).forEach(function({edge:o,start:a,end:L}){t.log.info("Edge "+a+" -> "+L+": "+JSON.stringify(o),o),o.points.forEach(p=>p.y+=n);const y=e.node(a),u=e.node(L),s=t.insertEdge(f,o,t.clusterDb,i,y,u,h);t.positionEdgeLabel(o,s)}),e.nodes().forEach(function(o){const a=e.node(o);t.log.info(o,a.type,a.diff),a.isGroup&&(d=a.diff)}),t.log.warn("Returning from recursive render XAX",r,d),{elem:r,diff:d}},"paintDagreLayoutCore"),z=t.__name(async r=>{const e=await R(r);return P(e.graph),await J(e)},"renderDagreSubgraph"),x=t.__name(r=>{var l,f,i,h,m,c;const e=new t.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r.direction,nodesep:((l=r.config)==null?void 0:l.nodeSpacing)||r.nodeSpacing||((i=(f=r.config)==null?void 0:f.flowchart)==null?void 0:i.nodeSpacing),ranksep:((h=r.config)==null?void 0:h.rankSpacing)||r.rankSpacing||((c=(m=r.config)==null?void 0:m.flowchart)==null?void 0:c.rankSpacing),marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return r.nodes.forEach(d=>{e.setNode(d.id,{...d}),d.parentId&&e.setParent(d.id,d.parentId)}),t.log.debug("Edges:",r.edges),r.edges.forEach(d=>{if(d.start===d.end){const n=d.start,g=n+"---"+n+"---1",o=n+"---"+n+"---2",a=e.node(n);e.setNode(g,{domId:g,id:g,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(g,a.parentId),e.setNode(o,{domId:o,id:o,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(o,a.parentId);const L=structuredClone(d),y=structuredClone(d),u=structuredClone(d),s=structuredClone(d);y.originalEdge=L,y.selfLoop={id:L.id,order:0},u.originalEdge=L,u.selfLoop={id:L.id,order:1},s.originalEdge=L,s.selfLoop={id:L.id,order:2},y.label="",y.arrowTypeEnd="none",y.endLabelLeft="",y.endLabelRight="",y.startLabelLeft="",y.id=n+"-cyclic-special-1",u.startLabelRight="",u.startLabelLeft="",u.endLabelLeft="",u.endLabelRight="",u.arrowTypeStart="none",u.arrowTypeEnd="none",u.id=n+"-cyclic-special-mid",s.label="",s.startLabelRight="",s.startLabelLeft="",s.arrowTypeStart="none",a.isGroup&&(y.fromCluster=n,s.toCluster=n),s.id=n+"-cyclic-special-2",s.arrowTypeStart="none",e.setEdge(n,g,y,n+"-cyclic-special-0"),e.setEdge(g,o,u,n+"-cyclic-special-1"),e.setEdge(o,n,s,n+"-cyclic-special-2")}else e.setEdge(d.start,d.end,{...d},d.id)}),t.adjustClustersAndEdges(e),{graph:e}},"prepareLayoutForDagre"),B=t.__name(async(r,{element:e,preparedLayout:l})=>{const f=l??x(r),i=t.getConfig2(),h=await R({element:e,graph:f.graph,diagramType:r.type,id:r.diagramId,parentCluster:void 0,siteConfig:i});return f.measuredLayout=h,h},"measureDagreLayout"),M=t.__name((r,e)=>{var f;const l=(f=e.preparedLayout)==null?void 0:f.measuredLayout;if(!l)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return P(l.graph),v(r,l),l},"runDagreLayoutCore"),F=t.__name((r,{measure:e})=>t.sortNodesByHierarchy(e.graph).map(l=>e.graph.node(l)).filter(Boolean),"getDagrePaintNodes"),q=t.__name((r,e,{measure:l})=>r?l.graph.node(r):void 0,"getDagreEdgeNode"),j=t.createCommonLayoutRenderer({prepareLayout:x,measureLayout:B,runLayoutCore:M,paintOptions:{clusterDb:t.clusterDb,getNodes:F,getEdgeNode:q,skipNode:t.__name((r,{measure:e})=>!e.graph.hasNode(r.id),"skipNode"),isCluster:t.__name((r,{measure:e})=>e.graph.hasNode(r.id)&&(e.graph.children(r.id)??[]).length>0,"isCluster")}});exports.applyDagreLayoutResult=v;exports.getEdgesToRender=_;exports.measureDagreLayout=B;exports.prepareLayoutForDagre=x;exports.render=j;exports.runDagreLayoutCore=M;
@@ -1,6 +1,6 @@
1
- import { I as X } from "./chunk-2Q5K7J3B-KAcSK2vt.js";
2
- import { p as z } from "./chunk-JWPE2WC7-CqoXHHTD.js";
3
- import { t as O, b as G, s as Y, v as F, g as P, a as Z, _ as g, H as A, l as E, L as q, d as U, F as L, A as j, i as J, a5 as K, I as Q, a6 as ee } from "./mermaid.core-BZ22HWSY.js";
1
+ import { I as X } from "./chunk-2Q5K7J3B-B0ZvA8yL.js";
2
+ import { p as z } from "./chunk-JWPE2WC7-B5QdRkL1.js";
3
+ import { t as O, b as G, s as Y, v as F, g as P, a as Z, _ as g, H as A, l as E, L as q, d as U, F as L, A as j, i as J, a5 as K, I as Q, a6 as ee } from "./mermaid.core-CcH8M8P-.js";
4
4
  import { p as te } from "./cynefin-OW5HDTMX-wW817aKN.js";
5
5
  var D = /[─━│┃└┗├┣]/, _ = /[└┗├┣]/, re = /[─━]/, V = /^[\s│┃]+$/, $ = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/, k = /^\s*%%/, ne = " ";
6
6
  function S(r) {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("./chunk-2Q5K7J3B-RUPn64dQ.cjs"),W=require("./chunk-JWPE2WC7-C2pEJElF.cjs"),i=require("./mermaid.core-DB-ckht7.cjs"),H=require("./cynefin-OW5HDTMX-DaKNJZN5.cjs");var $=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,O=/[─━]/,B=/^[\s│┃]+$/,A=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,X=" ";function N(n){return n.some(t=>$.test(t))}i.__name(N,"isBoxDrawingFormat");function E(n){for(const t of n){const e=D.exec(t);if(e!=null&&e.index&&e.index>0)return e.index}return 4}i.__name(E,"inferSegmentWidth");function L(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,o)=>{const a=parseInt(o,10),s=t.get(a);return s?`line ${s}`:e})}i.__name(L,"remapErrorLines");function S(n){const t=n.split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("./chunk-2Q5K7J3B-CHhc8puj.cjs"),W=require("./chunk-JWPE2WC7-BBgLF2gY.cjs"),i=require("./mermaid.core-CdbCpwrG.cjs"),H=require("./cynefin-OW5HDTMX-DaKNJZN5.cjs");var $=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,O=/[─━]/,B=/^[\s│┃]+$/,A=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,X=" ";function N(n){return n.some(t=>$.test(t))}i.__name(N,"isBoxDrawingFormat");function E(n){for(const t of n){const e=D.exec(t);if(e!=null&&e.index&&e.index>0)return e.index}return 4}i.__name(E,"inferSegmentWidth");function L(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,o)=>{const a=parseInt(o,10),s=t.get(a);return s?`line ${s}`:e})}i.__name(L,"remapErrorLines");function S(n){const t=n.split(`
2
2
  `),e=new Map;let o=-1;for(const[h,d]of t.entries())if(d.trim()==="treeView-beta"){o=h;break}if(o===-1)return{text:n,lineMap:e};const a=[];for(let h=o+1;h<t.length;h++){const d=t[h];d.trim()===""||k.test(d)||A.test(d)||B.test(d)||a.push(d.replace(/\t/g," "))}if(!N(a))return{text:n,lineMap:e};const s=E(a),r=[];let l=0;for(let h=0;h<=o;h++)r.push(t[h]),l++,e.set(l,h+1);for(let h=o+1;h<t.length;h++){const d=t[h],f=d.trim(),c=h+1;if(f===""){r.push(d),l++,e.set(l,c);continue}if(k.test(d)){r.push(d),l++,e.set(l,c);continue}if(A.test(d)){r.push(d),l++,e.set(l,c);continue}if(B.test(d))continue;const p=d.replace(/\t/g," "),g=D.exec(p);if((g==null?void 0:g.index)!==void 0){const w=g.index,m=Math.round(w/s)+1;let u=w+1;for(;u<p.length&&O.test(p[u]);)u++;for(;u<p.length&&p[u]===" ";)u++;const v=p.slice(u).trimEnd();if(!v)throw new Error(`Line ${c}: Empty node — expected a filename or directory name after the box-drawing prefix`);const x=X.repeat(m);r.push(x+v),l++,e.set(l,c)}else{if(/^[\s─━│┃└┗├┣]+$/.test(p))continue;if($.test(p))r.push(d),l++,e.set(l,c);else{if(/^\s+/.test(p))throw new Error(`Line ${c}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);r.push(d),l++,e.set(l,c)}}}return{text:r.join(`
3
3
  `),lineMap:e}}i.__name(S,"preprocessBoxDrawing");var _=new R.ImperativeState(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),z=i.__name(()=>{_.reset(),i.clear()},"clear"),G=i.__name(()=>_.records.stack[0],"getRoot"),P=i.__name(()=>_.records.cnt,"getCount"),q=i.defaultConfig_default.treeView,Y=i.__name(()=>i.cleanAndMerge(q,i.getConfig().treeView),"getConfig"),F=i.__name((n,t,e,o,a,s)=>{for(;n<=_.records.stack[_.records.stack.length-1].level;)_.records.stack.pop();const r={id:_.records.cnt++,level:n,name:t,nodeType:e,icon:a,cssClass:o,description:s,children:[]};_.records.stack[_.records.stack.length-1].children.push(r),_.records.stack.push(r)},"addNode"),Z={clear:z,addNode:F,getRoot:G,getCount:P,getConfig:Y,getAccTitle:i.getAccTitle,getAccDescription:i.getAccDescription,getDiagramTitle:i.getDiagramTitle,setAccDescription:i.setAccDescription,setAccTitle:i.setAccTitle,setDiagramTitle:i.setDiagramTitle},C=Z,j=i.__name(n=>{W.populateCommonDb(n,C);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let o=t.name;const a=o.endsWith("/");a&&(o=o.slice(0,-1));const s=a?"directory":"file",r=t.classAnnotation||void 0,l=t.iconAnnotation,h=l!==void 0?l||"none":void 0,d=t.descAnnotation||void 0,f=d?i.sanitizeText(d,i.getConfig()):void 0;C.addNode(e,o,s,r,h,f)}},"populate"),J={parse:i.__name(async n=>{const{text:t,lineMap:e}=S(n);try{const o=await H.parse("treeView",t);i.log.debug(o),j(o)}catch(o){throw e.size>0&&o instanceof Error&&(o.message=L(o.message,e)),o}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function M(n,t){var a;const e=(a=t==null?void 0:t.filenameIcons)==null?void 0:a[n];if(e)return e;const o=n.lastIndexOf(".");if(o>0){const s=n.substring(o).toLowerCase(),r=t==null?void 0:t.extensionIcons;return(r==null?void 0:r[s])??(r==null?void 0:r[s.slice(1)])}}i.__name(M,"detectIcon");function y(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}i.__name(y,"qualifyIcon");function T(n,t){if(n.icon!=="none"){if(n.icon)return y(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=M(n.name,t);if(e==="none")return;if(e)return y(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}i.__name(T,"getNodeIcon");i.registerIconPacks([{name:b.prefix,icons:b}]);var I=14,U=4,K=16,Q=i.__name(async(n,t)=>{const e=[],o=i.__name(s=>{const r=T(s,t);r&&e.push({icon:r,node:s}),s.children.forEach(o)},"collect");o(n);const a=await Promise.all(e.map(async({icon:s,node:r})=>({id:r.id,svg:await i.getIconSVG(s,{height:I,width:I})})));return new Map(a.map(({id:s,svg:r})=>[s,r]))},"resolveNodeIcons"),ee=i.__name((n,t,e,o,a,s)=>{var x;const r=o.append("g");let l="treeView-node-label";e.nodeType==="directory"&&(l+=" treeView-node-dir"),e.cssClass&&(l+=` ${e.cssClass}`);const h=I+U,d=T(e,a),f=d!==void 0;d&&r.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+a.paddingX}, ${t+a.paddingY})`).html(s.get(e.id)??"");const c=r.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",l),{height:p,width:g}=c.node().getBBox(),w=p+a.paddingY*2,m=n+a.paddingX+(f?h:0);c.attr("x",m),c.attr("y",t+w/2);const u=m+g,v=g+a.paddingX*2+(f?h:0);return e.BBox={x:n,y:t,width:v,height:w},(x=e.cssClass)!=null&&x.split(/\s+/).includes("highlight")&&r.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",w-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:r,labelRightEdge:u,centerY:t+w/2}},"positionLabel"),V=i.__name((n,t,e,o,a,s)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",o).attr("y2",a).attr("stroke-width",s).attr("class","treeView-node-line"),"positionLine"),te=i.__name((n,t,e,o)=>{var f;let a=0,s=0;const r=[],l=i.__name((c,p,g,w)=>{const m=w*(g.rowIndent+g.paddingX),u=ee(m,a,p,c,g,o);r.push(u);const{height:v,width:x}=p.BBox;V(c,m-g.rowIndent,a+v/2,m,a+v/2,g.lineThickness),s=Math.max(s,m+x),a+=v},"drawNode"),h=i.__name((c,p=0)=>{l(n,c,e,p),c.children.forEach(u=>{h(u,p+1)});const{x:g,y:w,height:m}=c.BBox;if(c.children.length){const{y:u,height:v}=c.children[c.children.length-1].BBox;V(n,g+e.paddingX,w+m,g+e.paddingX,u+v/2+e.lineThickness/2,e.lineThickness)}},"processNode");h(t);const d=r.filter(c=>c.node.description);if(d.length>0){const p=Math.max(...r.map(g=>g.labelRightEdge))+K;for(const g of d){const m=g.nodeGroup.append("text").text(g.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",g.centerY).node().getBBox();s=Math.max(s,p+m.width+e.paddingX)}}for(const c of r)if((f=c.node.cssClass)!=null&&f.split(/\s+/).includes("highlight")){const p=c.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const g=s-c.node.BBox.x+8;p.attr("width",g),s=Math.max(s,c.node.BBox.x+g+2)}}return{totalHeight:a,totalWidth:s}},"drawTree"),ne=i.__name(async(n,t,e,o)=>{i.log.debug(`Rendering treeView diagram
4
4
  `+n);const a=o.db,s=a.getRoot(),r=a.getConfig(),l=i.selectSvgElement(t),h=l.append("g");h.attr("class","tree-view");const d=await Q(s,r),{totalHeight:f,totalWidth:c}=te(h,s,r,d);l.attr("viewBox",`-${r.lineThickness/2} 0 ${c} ${f}`),i.configureSvgSize(l,f,c,r.useMaxWidth)},"draw"),re={draw:ne},ie=re,oe={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},se=i.__name(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:o,iconColor:a,descriptionColor:s,highlightBg:r,highlightStroke:l}=i.cleanAndMerge(oe,n);return`
@@ -1,5 +1,5 @@
1
- import { p as R } from "./chunk-JWPE2WC7-CqoXHHTD.js";
2
- import { s as _, g as F, v as E, t as D, a as P, b as z, _ as c, L as G, A as B, H as w, F as C, I as W, l as b, N as H, d as V } from "./mermaid.core-BZ22HWSY.js";
1
+ import { p as R } from "./chunk-JWPE2WC7-B5QdRkL1.js";
2
+ import { s as _, g as F, v as E, t as D, a as P, b as z, _ as c, L as G, A as B, H as w, F as C, I as W, l as b, N as H, d as V } from "./mermaid.core-CcH8M8P-.js";
3
3
  import { p as j } from "./cynefin-OW5HDTMX-wW817aKN.js";
4
4
  var m = {
5
5
  showLegend: !0,