factory-factory 0.3.21 → 0.4.1

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 (1363) hide show
  1. package/README.md +61 -344
  2. package/dist/client/assets/{arc-DMA75yUX.js → arc-lK3Ig9GV.js} +1 -1
  3. package/dist/client/assets/{architectureDiagram-3BPJPVTR-DfVbmuXe.js → architectureDiagram-3BPJPVTR-CeUbfBqe.js} +1 -1
  4. package/dist/client/assets/{blockDiagram-GPEHLZMM-BBr1PMaO.js → blockDiagram-GPEHLZMM-DiVGPkq2.js} +1 -1
  5. package/dist/client/assets/{c4Diagram-AAUBKEIU-C6xSY9MY.js → c4Diagram-AAUBKEIU-CT8hJB-h.js} +1 -1
  6. package/dist/client/assets/channel-CvY1mvIl.js +1 -0
  7. package/dist/client/assets/chunk-2J33WTMH-B0h8q8fD.js +1 -0
  8. package/dist/client/assets/{chunk-4BX2VUAB-DohmszzB.js → chunk-4BX2VUAB-km6NpEMz.js} +1 -1
  9. package/dist/client/assets/{chunk-55IACEB6-BxtEguq8.js → chunk-55IACEB6-COUWt3oA.js} +1 -1
  10. package/dist/client/assets/{chunk-727SXJPM--7mPe6NT.js → chunk-727SXJPM-Bp-ts2at.js} +1 -1
  11. package/dist/client/assets/{chunk-AQP2D5EJ-CUtRyyX-.js → chunk-AQP2D5EJ-dyo9i4xa.js} +3 -3
  12. package/dist/client/assets/{chunk-FMBD7UC4-Zvl7moTS.js → chunk-FMBD7UC4-B4C3KvLe.js} +1 -1
  13. package/dist/client/assets/{chunk-ND2GUHAM-DHRE6LfZ.js → chunk-ND2GUHAM-Qhi4WqzZ.js} +1 -1
  14. package/dist/client/assets/{chunk-QZHKN3VN-DCUx43mp.js → chunk-QZHKN3VN-Ce3Q_vrs.js} +1 -1
  15. package/dist/client/assets/classDiagram-4FO5ZUOK-Db7ZXJ6w.js +1 -0
  16. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-Db7ZXJ6w.js +1 -0
  17. package/dist/client/assets/{cose-bilkent-S5V4N54A-CTS7yey1.js → cose-bilkent-S5V4N54A-D6QofwFq.js} +1 -1
  18. package/dist/client/assets/{dagre-BM42HDAG-CDvFWhCS.js → dagre-BM42HDAG-CDzpFdgD.js} +1 -1
  19. package/dist/client/assets/{diagram-2AECGRRQ-BP89d-WY.js → diagram-2AECGRRQ-dl1_7lyq.js} +2 -2
  20. package/dist/client/assets/{diagram-5GNKFQAL-BXDVw1Xi.js → diagram-5GNKFQAL-B0ynMwBY.js} +1 -1
  21. package/dist/client/assets/{diagram-KO2AKTUF-DBYI-mqR.js → diagram-KO2AKTUF-B9ABz-Wk.js} +1 -1
  22. package/dist/client/assets/{diagram-LMA3HP47-D359JaJw.js → diagram-LMA3HP47-DZxXcfiX.js} +1 -1
  23. package/dist/client/assets/{diagram-OG6HWLK6-BMr7mzB4.js → diagram-OG6HWLK6-BncGM9Gv.js} +1 -1
  24. package/dist/client/assets/{erDiagram-TEJ5UH35-CeCqd6tA.js → erDiagram-TEJ5UH35-B9hxScvO.js} +1 -1
  25. package/dist/client/assets/{flowDiagram-I6XJVG4X-ZUKSazw4.js → flowDiagram-I6XJVG4X-DgZ2jwJQ.js} +4 -4
  26. package/dist/client/assets/{ganttDiagram-6RSMTGT7-Cq-q9kPK.js → ganttDiagram-6RSMTGT7-BrnNMNRY.js} +1 -1
  27. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-zVissJIm.js → gitGraphDiagram-PVQCEYII-BJmed6oD.js} +3 -3
  28. package/dist/client/assets/index-Btlruz7h.css +1 -0
  29. package/dist/client/assets/index-DEKuJM5_.js +674 -0
  30. package/dist/client/assets/infoDiagram-5YYISTIA-CtLzR4ip.js +2 -0
  31. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-Cux5p5kO.js → ishikawaDiagram-YF4QCWOH-BLrvV5ke.js} +3 -3
  32. package/dist/client/assets/{journeyDiagram-JHISSGLW-1ke9LkJX.js → journeyDiagram-JHISSGLW-B2-TMwJI.js} +1 -1
  33. package/dist/client/assets/{kanban-definition-UN3LZRKU-DP9dkc_Z.js → kanban-definition-UN3LZRKU-B5mGKgYF.js} +1 -1
  34. package/dist/client/assets/{linear-CyyRtH0c.js → linear-ConE9euY.js} +1 -1
  35. package/dist/client/assets/{mindmap-definition-RKZ34NQL-BcU2pjK2.js → mindmap-definition-RKZ34NQL-B0BaMk8D.js} +3 -3
  36. package/dist/client/assets/{mobile-baseline-CSjGr1_M.js → mobile-baseline-DWCt7ZGJ.js} +2 -2
  37. package/dist/client/assets/{pieDiagram-4H26LBE5-Bl7PuiuI.js → pieDiagram-4H26LBE5-DgPu3GTs.js} +2 -2
  38. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-Dx0ckMzC.js → quadrantDiagram-W4KKPZXB-DDbeggF4.js} +3 -3
  39. package/dist/client/assets/{requirementDiagram-4Y6WPE33-CXkIn3ft.js → requirementDiagram-4Y6WPE33-Cc3ozz7U.js} +1 -1
  40. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-DIjHC-x5.js → sankeyDiagram-5OEKKPKP-DmYoq588.js} +1 -1
  41. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-BEdLD9KB.js → sequenceDiagram-3UESZ5HK-EVqdDzgf.js} +4 -4
  42. package/dist/client/assets/stateDiagram-AJRCARHV-BRd6IxSa.js +1 -0
  43. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-DR2vMoX5.js +1 -0
  44. package/dist/client/assets/{terminal-instance-W5XOlvlg.js → terminal-instance-CDKJdDaO.js} +8 -8
  45. package/dist/client/assets/{timeline-definition-PNZ67QCA-CkV6p1W8.js → timeline-definition-PNZ67QCA-CyxBqgqv.js} +1 -1
  46. package/dist/client/assets/{vennDiagram-CIIHVFJN-ubGCO9Lw.js → vennDiagram-CIIHVFJN-CLslQYVi.js} +1 -1
  47. package/dist/client/assets/{wardley-L42UT6IY-_NZpI_YF.js → wardley-L42UT6IY-DyEDLg3x.js} +1 -1
  48. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-DMXZwsFF.js → wardleyDiagram-YWT4CUSO-CjJBpd3P.js} +1 -1
  49. package/dist/client/assets/{xychartDiagram-2RQKCTM6-T9YSJ2sB.js → xychartDiagram-2RQKCTM6-DwzoT5Dl.js} +1 -1
  50. package/dist/client/index.html +2 -2
  51. package/dist/client/working.png +0 -0
  52. package/dist/prisma/generated/browser.d.ts +1 -0
  53. package/dist/prisma/generated/browser.d.ts.map +1 -1
  54. package/dist/prisma/generated/client.d.ts +1 -0
  55. package/dist/prisma/generated/client.d.ts.map +1 -1
  56. package/dist/prisma/generated/commonInputTypes.d.ts +90 -0
  57. package/dist/prisma/generated/commonInputTypes.d.ts.map +1 -1
  58. package/dist/prisma/generated/enums.d.ts +17 -0
  59. package/dist/prisma/generated/enums.d.ts.map +1 -1
  60. package/dist/prisma/generated/enums.js +15 -1
  61. package/dist/prisma/generated/enums.js.map +1 -1
  62. package/dist/prisma/generated/internal/class.d.ts +3 -0
  63. package/dist/prisma/generated/internal/class.d.ts.map +1 -1
  64. package/dist/prisma/generated/internal/class.js +4 -4
  65. package/dist/prisma/generated/internal/class.js.map +1 -1
  66. package/dist/prisma/generated/internal/prismaNamespace.d.ts +99 -1
  67. package/dist/prisma/generated/internal/prismaNamespace.d.ts.map +1 -1
  68. package/dist/prisma/generated/internal/prismaNamespace.js +20 -1
  69. package/dist/prisma/generated/internal/prismaNamespace.js.map +1 -1
  70. package/dist/prisma/generated/internal/prismaNamespaceBrowser.d.ts +20 -0
  71. package/dist/prisma/generated/internal/prismaNamespaceBrowser.d.ts.map +1 -1
  72. package/dist/prisma/generated/internal/prismaNamespaceBrowser.js +20 -1
  73. package/dist/prisma/generated/internal/prismaNamespaceBrowser.js.map +1 -1
  74. package/dist/prisma/generated/models/UserSettings.d.ts +32 -1
  75. package/dist/prisma/generated/models/UserSettings.d.ts.map +1 -1
  76. package/dist/prisma/generated/models/Workspace.d.ts +1631 -92
  77. package/dist/prisma/generated/models/Workspace.d.ts.map +1 -1
  78. package/dist/prisma/generated/models/WorkspaceNotification.d.ts +684 -0
  79. package/dist/prisma/generated/models/WorkspaceNotification.d.ts.map +1 -0
  80. package/dist/prisma/generated/models/WorkspaceNotification.js +2 -0
  81. package/dist/prisma/generated/models/WorkspaceNotification.js.map +1 -0
  82. package/dist/prisma/generated/models.d.ts +1 -0
  83. package/dist/prisma/generated/models.d.ts.map +1 -1
  84. package/dist/prompts/ratchet/dispatch.md +2 -0
  85. package/dist/scripts/check-no-direct-process-env.d.mts.map +1 -1
  86. package/dist/scripts/check-no-direct-process-env.mjs +1 -0
  87. package/dist/scripts/check-no-direct-process-env.mjs.map +1 -1
  88. package/dist/src/backend/app-context.d.ts +90 -26
  89. package/dist/src/backend/app-context.d.ts.map +1 -1
  90. package/dist/src/backend/app-context.js +145 -43
  91. package/dist/src/backend/app-context.js.map +1 -1
  92. package/dist/src/backend/app-context.test.d.ts +2 -0
  93. package/dist/src/backend/app-context.test.d.ts.map +1 -0
  94. package/dist/src/backend/app-context.test.js +51 -0
  95. package/dist/src/backend/app-context.test.js.map +1 -0
  96. package/dist/src/backend/clients/git.client.d.ts.map +1 -1
  97. package/dist/src/backend/clients/git.client.js +5 -0
  98. package/dist/src/backend/clients/git.client.js.map +1 -1
  99. package/dist/src/backend/clients/git.client.test.js +24 -0
  100. package/dist/src/backend/clients/git.client.test.js.map +1 -1
  101. package/dist/src/backend/fatal-error-handlers.d.ts +19 -0
  102. package/dist/src/backend/fatal-error-handlers.d.ts.map +1 -0
  103. package/dist/src/backend/fatal-error-handlers.js +37 -0
  104. package/dist/src/backend/fatal-error-handlers.js.map +1 -0
  105. package/dist/src/backend/fatal-error-handlers.test.d.ts +2 -0
  106. package/dist/src/backend/fatal-error-handlers.test.d.ts.map +1 -0
  107. package/dist/src/backend/fatal-error-handlers.test.js +95 -0
  108. package/dist/src/backend/fatal-error-handlers.test.js.map +1 -0
  109. package/dist/src/backend/index.js +7 -20
  110. package/dist/src/backend/index.js.map +1 -1
  111. package/dist/src/backend/interceptors/branch-rename.interceptor.d.ts.map +1 -1
  112. package/dist/src/backend/interceptors/branch-rename.interceptor.js +80 -6
  113. package/dist/src/backend/interceptors/branch-rename.interceptor.js.map +1 -1
  114. package/dist/src/backend/interceptors/branch-rename.interceptor.test.js +126 -21
  115. package/dist/src/backend/interceptors/branch-rename.interceptor.test.js.map +1 -1
  116. package/dist/src/backend/interceptors/conversation-rename.interceptor.d.ts.map +1 -1
  117. package/dist/src/backend/interceptors/conversation-rename.interceptor.js +39 -22
  118. package/dist/src/backend/interceptors/conversation-rename.interceptor.js.map +1 -1
  119. package/dist/src/backend/interceptors/conversation-rename.interceptor.test.js +79 -1
  120. package/dist/src/backend/interceptors/conversation-rename.interceptor.test.js.map +1 -1
  121. package/dist/src/backend/interceptors/pre-pr-rename.interceptor.d.ts.map +1 -1
  122. package/dist/src/backend/interceptors/pre-pr-rename.interceptor.js +4 -2
  123. package/dist/src/backend/interceptors/pre-pr-rename.interceptor.js.map +1 -1
  124. package/dist/src/backend/interceptors/pre-pr-rename.interceptor.test.js +36 -7
  125. package/dist/src/backend/interceptors/pre-pr-rename.interceptor.test.js.map +1 -1
  126. package/dist/src/backend/interceptors/pre-push-rename.interceptor.d.ts.map +1 -1
  127. package/dist/src/backend/interceptors/pre-push-rename.interceptor.js +50 -2
  128. package/dist/src/backend/interceptors/pre-push-rename.interceptor.js.map +1 -1
  129. package/dist/src/backend/interceptors/pre-push-rename.interceptor.test.js +126 -7
  130. package/dist/src/backend/interceptors/pre-push-rename.interceptor.test.js.map +1 -1
  131. package/dist/src/backend/lib/application-error.d.ts +6 -0
  132. package/dist/src/backend/lib/application-error.d.ts.map +1 -0
  133. package/dist/src/backend/lib/application-error.js +9 -0
  134. package/dist/src/backend/lib/application-error.js.map +1 -0
  135. package/dist/src/backend/lib/application-error.test.d.ts +2 -0
  136. package/dist/src/backend/lib/application-error.test.d.ts.map +1 -0
  137. package/dist/src/backend/lib/application-error.test.js +23 -0
  138. package/dist/src/backend/lib/application-error.test.js.map +1 -0
  139. package/dist/src/backend/lib/constants.d.ts +2 -0
  140. package/dist/src/backend/lib/constants.d.ts.map +1 -1
  141. package/dist/src/backend/lib/constants.js +2 -0
  142. package/dist/src/backend/lib/constants.js.map +1 -1
  143. package/dist/src/backend/lib/env.d.ts.map +1 -1
  144. package/dist/src/backend/lib/env.js +4 -3
  145. package/dist/src/backend/lib/env.js.map +1 -1
  146. package/dist/src/backend/lib/env.test.js +17 -1
  147. package/dist/src/backend/lib/env.test.js.map +1 -1
  148. package/dist/src/backend/lib/file-helpers.d.ts +7 -0
  149. package/dist/src/backend/lib/file-helpers.d.ts.map +1 -1
  150. package/dist/src/backend/lib/file-helpers.js +65 -15
  151. package/dist/src/backend/lib/file-helpers.js.map +1 -1
  152. package/dist/src/backend/lib/file-helpers.test.js +82 -2
  153. package/dist/src/backend/lib/file-helpers.test.js.map +1 -1
  154. package/dist/src/backend/lib/git-helpers.d.ts +1 -7
  155. package/dist/src/backend/lib/git-helpers.d.ts.map +1 -1
  156. package/dist/src/backend/lib/git-helpers.js +4 -33
  157. package/dist/src/backend/lib/git-helpers.js.map +1 -1
  158. package/dist/src/backend/lib/git-helpers.test.js +17 -10
  159. package/dist/src/backend/lib/git-helpers.test.js.map +1 -1
  160. package/dist/src/backend/lib/process-liveness.d.ts +2 -0
  161. package/dist/src/backend/lib/process-liveness.d.ts.map +1 -0
  162. package/dist/src/backend/lib/process-liveness.js +26 -0
  163. package/dist/src/backend/lib/process-liveness.js.map +1 -0
  164. package/dist/src/backend/lib/process-liveness.test.d.ts +2 -0
  165. package/dist/src/backend/lib/process-liveness.test.d.ts.map +1 -0
  166. package/dist/src/backend/lib/process-liveness.test.js +35 -0
  167. package/dist/src/backend/lib/process-liveness.test.js.map +1 -0
  168. package/dist/src/backend/lib/request-trust.d.ts +4 -0
  169. package/dist/src/backend/lib/request-trust.d.ts.map +1 -0
  170. package/dist/src/backend/lib/request-trust.js +116 -0
  171. package/dist/src/backend/lib/request-trust.js.map +1 -0
  172. package/dist/src/backend/lib/request-trust.test.d.ts +2 -0
  173. package/dist/src/backend/lib/request-trust.test.d.ts.map +1 -0
  174. package/dist/src/backend/lib/request-trust.test.js +64 -0
  175. package/dist/src/backend/lib/request-trust.test.js.map +1 -0
  176. package/dist/src/backend/lib/session-model.js +1 -1
  177. package/dist/src/backend/lib/session-model.js.map +1 -1
  178. package/dist/src/backend/lib/session-summaries.d.ts +4 -5
  179. package/dist/src/backend/lib/session-summaries.d.ts.map +1 -1
  180. package/dist/src/backend/lib/session-summaries.js.map +1 -1
  181. package/dist/src/backend/lib/shell.d.ts +13 -1
  182. package/dist/src/backend/lib/shell.d.ts.map +1 -1
  183. package/dist/src/backend/lib/shell.js +124 -13
  184. package/dist/src/backend/lib/shell.js.map +1 -1
  185. package/dist/src/backend/lib/shell.test.js +72 -0
  186. package/dist/src/backend/lib/shell.test.js.map +1 -1
  187. package/dist/src/backend/lib/topic-broadcaster.d.ts +18 -0
  188. package/dist/src/backend/lib/topic-broadcaster.d.ts.map +1 -0
  189. package/dist/src/backend/lib/topic-broadcaster.js +56 -0
  190. package/dist/src/backend/lib/topic-broadcaster.js.map +1 -0
  191. package/dist/src/backend/lib/topic-broadcaster.test.d.ts +2 -0
  192. package/dist/src/backend/lib/topic-broadcaster.test.d.ts.map +1 -0
  193. package/dist/src/backend/lib/topic-broadcaster.test.js +126 -0
  194. package/dist/src/backend/lib/topic-broadcaster.test.js.map +1 -0
  195. package/dist/src/backend/lib/websocket-send.d.ts +12 -0
  196. package/dist/src/backend/lib/websocket-send.d.ts.map +1 -0
  197. package/dist/src/backend/lib/websocket-send.js +46 -0
  198. package/dist/src/backend/lib/websocket-send.js.map +1 -0
  199. package/dist/src/backend/lib/websocket-send.test.d.ts +2 -0
  200. package/dist/src/backend/lib/websocket-send.test.d.ts.map +1 -0
  201. package/dist/src/backend/lib/websocket-send.test.js +103 -0
  202. package/dist/src/backend/lib/websocket-send.test.js.map +1 -0
  203. package/dist/src/backend/lib/workspace-derived-state.d.ts +9 -1
  204. package/dist/src/backend/lib/workspace-derived-state.d.ts.map +1 -1
  205. package/dist/src/backend/lib/workspace-derived-state.js +6 -1
  206. package/dist/src/backend/lib/workspace-derived-state.js.map +1 -1
  207. package/dist/src/backend/lib/workspace-derived-state.test.js +11 -3
  208. package/dist/src/backend/lib/workspace-derived-state.test.js.map +1 -1
  209. package/dist/src/backend/middleware/cors.middleware.d.ts.map +1 -1
  210. package/dist/src/backend/middleware/cors.middleware.js +3 -2
  211. package/dist/src/backend/middleware/cors.middleware.js.map +1 -1
  212. package/dist/src/backend/middleware/index.d.ts +1 -1
  213. package/dist/src/backend/middleware/index.d.ts.map +1 -1
  214. package/dist/src/backend/middleware/index.js +1 -1
  215. package/dist/src/backend/middleware/index.js.map +1 -1
  216. package/dist/src/backend/middleware/middleware.test.js +18 -1
  217. package/dist/src/backend/middleware/middleware.test.js.map +1 -1
  218. package/dist/src/backend/middleware/request-logger.middleware.d.ts +1 -2
  219. package/dist/src/backend/middleware/request-logger.middleware.d.ts.map +1 -1
  220. package/dist/src/backend/middleware/request-logger.middleware.js +0 -2
  221. package/dist/src/backend/middleware/request-logger.middleware.js.map +1 -1
  222. package/dist/src/backend/orchestration/data-backup.service.d.ts.map +1 -1
  223. package/dist/src/backend/orchestration/data-backup.service.js +3 -1
  224. package/dist/src/backend/orchestration/data-backup.service.js.map +1 -1
  225. package/dist/src/backend/orchestration/data-backup.service.test.js +32 -0
  226. package/dist/src/backend/orchestration/data-backup.service.test.js.map +1 -1
  227. package/dist/src/backend/orchestration/domain-bridges.orchestrator.d.ts +24 -11
  228. package/dist/src/backend/orchestration/domain-bridges.orchestrator.d.ts.map +1 -1
  229. package/dist/src/backend/orchestration/domain-bridges.orchestrator.js +99 -73
  230. package/dist/src/backend/orchestration/domain-bridges.orchestrator.js.map +1 -1
  231. package/dist/src/backend/orchestration/domain-bridges.orchestrator.test.js +264 -65
  232. package/dist/src/backend/orchestration/domain-bridges.orchestrator.test.js.map +1 -1
  233. package/dist/src/backend/orchestration/event-coalescer.integration.test.d.ts +2 -0
  234. package/dist/src/backend/orchestration/event-coalescer.integration.test.d.ts.map +1 -0
  235. package/dist/src/backend/orchestration/event-coalescer.integration.test.js +47 -0
  236. package/dist/src/backend/orchestration/event-coalescer.integration.test.js.map +1 -0
  237. package/dist/src/backend/orchestration/event-collector-lifecycle.integration.test.d.ts +2 -0
  238. package/dist/src/backend/orchestration/event-collector-lifecycle.integration.test.d.ts.map +1 -0
  239. package/dist/src/backend/orchestration/event-collector-lifecycle.integration.test.js +34 -0
  240. package/dist/src/backend/orchestration/event-collector-lifecycle.integration.test.js.map +1 -0
  241. package/dist/src/backend/orchestration/event-collector.orchestrator.d.ts +37 -10
  242. package/dist/src/backend/orchestration/event-collector.orchestrator.d.ts.map +1 -1
  243. package/dist/src/backend/orchestration/event-collector.orchestrator.js +317 -121
  244. package/dist/src/backend/orchestration/event-collector.orchestrator.js.map +1 -1
  245. package/dist/src/backend/orchestration/event-collector.orchestrator.test.js +503 -44
  246. package/dist/src/backend/orchestration/event-collector.orchestrator.test.js.map +1 -1
  247. package/dist/src/backend/orchestration/health.service.js +2 -2
  248. package/dist/src/backend/orchestration/health.service.js.map +1 -1
  249. package/dist/src/backend/orchestration/linear-config.helper.js +2 -2
  250. package/dist/src/backend/orchestration/linear-config.helper.js.map +1 -1
  251. package/dist/src/backend/orchestration/reconciliation.service.d.ts +39 -0
  252. package/dist/src/backend/orchestration/reconciliation.service.d.ts.map +1 -0
  253. package/dist/src/backend/{services/ratchet/service → orchestration}/reconciliation.service.js +19 -32
  254. package/dist/src/backend/orchestration/reconciliation.service.js.map +1 -0
  255. package/dist/src/backend/orchestration/reconciliation.service.test.d.ts.map +1 -0
  256. package/dist/src/backend/{services/ratchet/service → orchestration}/reconciliation.service.test.js +15 -47
  257. package/dist/src/backend/orchestration/reconciliation.service.test.js.map +1 -0
  258. package/dist/src/backend/orchestration/scheduler.service.d.ts +2 -1
  259. package/dist/src/backend/orchestration/scheduler.service.d.ts.map +1 -1
  260. package/dist/src/backend/orchestration/scheduler.service.js +107 -44
  261. package/dist/src/backend/orchestration/scheduler.service.js.map +1 -1
  262. package/dist/src/backend/orchestration/scheduler.service.test.js +266 -59
  263. package/dist/src/backend/orchestration/scheduler.service.test.js.map +1 -1
  264. package/dist/src/backend/orchestration/snapshot-reconciliation.orchestrator.d.ts +18 -11
  265. package/dist/src/backend/orchestration/snapshot-reconciliation.orchestrator.d.ts.map +1 -1
  266. package/dist/src/backend/orchestration/snapshot-reconciliation.orchestrator.js +59 -49
  267. package/dist/src/backend/orchestration/snapshot-reconciliation.orchestrator.js.map +1 -1
  268. package/dist/src/backend/orchestration/snapshot-reconciliation.orchestrator.test.js +156 -24
  269. package/dist/src/backend/orchestration/snapshot-reconciliation.orchestrator.test.js.map +1 -1
  270. package/dist/src/backend/orchestration/types.d.ts +2 -2
  271. package/dist/src/backend/orchestration/types.d.ts.map +1 -1
  272. package/dist/src/backend/orchestration/workspace-archive.orchestrator.d.ts +22 -9
  273. package/dist/src/backend/orchestration/workspace-archive.orchestrator.d.ts.map +1 -1
  274. package/dist/src/backend/orchestration/workspace-archive.orchestrator.js +38 -32
  275. package/dist/src/backend/orchestration/workspace-archive.orchestrator.js.map +1 -1
  276. package/dist/src/backend/orchestration/workspace-archive.orchestrator.test.js +52 -14
  277. package/dist/src/backend/orchestration/workspace-archive.orchestrator.test.js.map +1 -1
  278. package/dist/src/backend/orchestration/workspace-children.orchestrator.d.ts +22 -0
  279. package/dist/src/backend/orchestration/workspace-children.orchestrator.d.ts.map +1 -0
  280. package/dist/src/backend/orchestration/workspace-children.orchestrator.js +93 -0
  281. package/dist/src/backend/orchestration/workspace-children.orchestrator.js.map +1 -0
  282. package/dist/src/backend/orchestration/workspace-children.orchestrator.test.d.ts +2 -0
  283. package/dist/src/backend/orchestration/workspace-children.orchestrator.test.d.ts.map +1 -0
  284. package/dist/src/backend/orchestration/workspace-children.orchestrator.test.js +136 -0
  285. package/dist/src/backend/orchestration/workspace-children.orchestrator.test.js.map +1 -0
  286. package/dist/src/backend/orchestration/workspace-init-issue-prompts.js +3 -3
  287. package/dist/src/backend/orchestration/workspace-init-issue-prompts.js.map +1 -1
  288. package/dist/src/backend/orchestration/workspace-init-script-pipeline.d.ts +1 -1
  289. package/dist/src/backend/orchestration/workspace-init-script-pipeline.d.ts.map +1 -1
  290. package/dist/src/backend/orchestration/workspace-init-script-pipeline.js.map +1 -1
  291. package/dist/src/backend/orchestration/workspace-init.orchestrator.d.ts.map +1 -1
  292. package/dist/src/backend/orchestration/workspace-init.orchestrator.js +35 -21
  293. package/dist/src/backend/orchestration/workspace-init.orchestrator.js.map +1 -1
  294. package/dist/src/backend/orchestration/workspace-init.orchestrator.test.js +278 -102
  295. package/dist/src/backend/orchestration/workspace-init.orchestrator.test.js.map +1 -1
  296. package/dist/src/backend/orchestration/workspace-notification-delivery.orchestrator.d.ts +24 -0
  297. package/dist/src/backend/orchestration/workspace-notification-delivery.orchestrator.d.ts.map +1 -0
  298. package/dist/src/backend/orchestration/workspace-notification-delivery.orchestrator.js +66 -0
  299. package/dist/src/backend/orchestration/workspace-notification-delivery.orchestrator.js.map +1 -0
  300. package/dist/src/backend/orchestration/workspace-notification-delivery.orchestrator.test.d.ts +2 -0
  301. package/dist/src/backend/orchestration/workspace-notification-delivery.orchestrator.test.d.ts.map +1 -0
  302. package/dist/src/backend/orchestration/workspace-notification-delivery.orchestrator.test.js +235 -0
  303. package/dist/src/backend/orchestration/workspace-notification-delivery.orchestrator.test.js.map +1 -0
  304. package/dist/src/backend/prompts/branch-rename.d.ts.map +1 -1
  305. package/dist/src/backend/prompts/branch-rename.js +20 -13
  306. package/dist/src/backend/prompts/branch-rename.js.map +1 -1
  307. package/dist/src/backend/prompts/branch-rename.test.d.ts +2 -0
  308. package/dist/src/backend/prompts/branch-rename.test.d.ts.map +1 -0
  309. package/dist/src/backend/prompts/branch-rename.test.js +56 -0
  310. package/dist/src/backend/prompts/branch-rename.test.js.map +1 -0
  311. package/dist/src/backend/prompts/ratchet-dispatch.d.ts.map +1 -1
  312. package/dist/src/backend/prompts/ratchet-dispatch.js +28 -6
  313. package/dist/src/backend/prompts/ratchet-dispatch.js.map +1 -1
  314. package/dist/src/backend/prompts/ratchet-dispatch.test.js +55 -0
  315. package/dist/src/backend/prompts/ratchet-dispatch.test.js.map +1 -1
  316. package/dist/src/backend/routers/health.router.d.ts.map +1 -1
  317. package/dist/src/backend/routers/health.router.js +5 -5
  318. package/dist/src/backend/routers/health.router.js.map +1 -1
  319. package/dist/src/backend/routers/health.router.test.js +3 -5
  320. package/dist/src/backend/routers/health.router.test.js.map +1 -1
  321. package/dist/src/backend/routers/websocket/chat-connection-registry.d.ts +36 -0
  322. package/dist/src/backend/routers/websocket/chat-connection-registry.d.ts.map +1 -0
  323. package/dist/src/backend/routers/websocket/chat-connection-registry.js +153 -0
  324. package/dist/src/backend/routers/websocket/chat-connection-registry.js.map +1 -0
  325. package/dist/src/backend/routers/websocket/chat-connection-registry.test.d.ts +2 -0
  326. package/dist/src/backend/routers/websocket/chat-connection-registry.test.d.ts.map +1 -0
  327. package/dist/src/backend/routers/websocket/chat-connection-registry.test.js +281 -0
  328. package/dist/src/backend/routers/websocket/chat-connection-registry.test.js.map +1 -0
  329. package/dist/src/backend/routers/websocket/chat.handler.d.ts +2 -5
  330. package/dist/src/backend/routers/websocket/chat.handler.d.ts.map +1 -1
  331. package/dist/src/backend/routers/websocket/chat.handler.js +35 -45
  332. package/dist/src/backend/routers/websocket/chat.handler.js.map +1 -1
  333. package/dist/src/backend/routers/websocket/chat.handler.test.js +132 -44
  334. package/dist/src/backend/routers/websocket/chat.handler.test.js.map +1 -1
  335. package/dist/src/backend/routers/websocket/context-injection.test.js +450 -14
  336. package/dist/src/backend/routers/websocket/context-injection.test.js.map +1 -1
  337. package/dist/src/backend/routers/websocket/dev-logs.handler.d.ts +3 -6
  338. package/dist/src/backend/routers/websocket/dev-logs.handler.d.ts.map +1 -1
  339. package/dist/src/backend/routers/websocket/dev-logs.handler.js +25 -68
  340. package/dist/src/backend/routers/websocket/dev-logs.handler.js.map +1 -1
  341. package/dist/src/backend/routers/websocket/dev-logs.handler.test.js +75 -3
  342. package/dist/src/backend/routers/websocket/dev-logs.handler.test.js.map +1 -1
  343. package/dist/src/backend/routers/websocket/index.d.ts +2 -1
  344. package/dist/src/backend/routers/websocket/index.d.ts.map +1 -1
  345. package/dist/src/backend/routers/websocket/index.js +2 -1
  346. package/dist/src/backend/routers/websocket/index.js.map +1 -1
  347. package/dist/src/backend/routers/websocket/message-utils.d.ts +6 -0
  348. package/dist/src/backend/routers/websocket/message-utils.d.ts.map +1 -1
  349. package/dist/src/backend/routers/websocket/message-utils.js +28 -0
  350. package/dist/src/backend/routers/websocket/message-utils.js.map +1 -1
  351. package/dist/src/backend/routers/websocket/message-utils.test.d.ts +2 -0
  352. package/dist/src/backend/routers/websocket/message-utils.test.d.ts.map +1 -0
  353. package/dist/src/backend/routers/websocket/message-utils.test.js +54 -0
  354. package/dist/src/backend/routers/websocket/message-utils.test.js.map +1 -0
  355. package/dist/src/backend/routers/websocket/post-run-logs.handler.d.ts +3 -6
  356. package/dist/src/backend/routers/websocket/post-run-logs.handler.d.ts.map +1 -1
  357. package/dist/src/backend/routers/websocket/post-run-logs.handler.js +15 -57
  358. package/dist/src/backend/routers/websocket/post-run-logs.handler.js.map +1 -1
  359. package/dist/src/backend/routers/websocket/post-run-logs.handler.test.js +76 -12
  360. package/dist/src/backend/routers/websocket/post-run-logs.handler.test.js.map +1 -1
  361. package/dist/src/backend/routers/websocket/push-channel.handler.d.ts +12 -0
  362. package/dist/src/backend/routers/websocket/push-channel.handler.d.ts.map +1 -0
  363. package/dist/src/backend/routers/websocket/push-channel.handler.js +40 -0
  364. package/dist/src/backend/routers/websocket/push-channel.handler.js.map +1 -0
  365. package/dist/src/backend/routers/websocket/setup-terminal.handler.d.ts +1 -4
  366. package/dist/src/backend/routers/websocket/setup-terminal.handler.d.ts.map +1 -1
  367. package/dist/src/backend/routers/websocket/setup-terminal.handler.js +14 -46
  368. package/dist/src/backend/routers/websocket/setup-terminal.handler.js.map +1 -1
  369. package/dist/src/backend/routers/websocket/setup-terminal.handler.test.js +66 -6
  370. package/dist/src/backend/routers/websocket/setup-terminal.handler.test.js.map +1 -1
  371. package/dist/src/backend/routers/websocket/snapshots.handler.d.ts +10 -11
  372. package/dist/src/backend/routers/websocket/snapshots.handler.d.ts.map +1 -1
  373. package/dist/src/backend/routers/websocket/snapshots.handler.js +112 -70
  374. package/dist/src/backend/routers/websocket/snapshots.handler.js.map +1 -1
  375. package/dist/src/backend/routers/websocket/snapshots.handler.test.js +387 -80
  376. package/dist/src/backend/routers/websocket/snapshots.handler.test.js.map +1 -1
  377. package/dist/src/backend/routers/websocket/terminal.handler.d.ts +3 -6
  378. package/dist/src/backend/routers/websocket/terminal.handler.d.ts.map +1 -1
  379. package/dist/src/backend/routers/websocket/terminal.handler.js +130 -111
  380. package/dist/src/backend/routers/websocket/terminal.handler.js.map +1 -1
  381. package/dist/src/backend/routers/websocket/terminal.handler.test.js +291 -25
  382. package/dist/src/backend/routers/websocket/terminal.handler.test.js.map +1 -1
  383. package/dist/src/backend/routers/websocket/upgrade-utils.d.ts +33 -5
  384. package/dist/src/backend/routers/websocket/upgrade-utils.d.ts.map +1 -1
  385. package/dist/src/backend/routers/websocket/upgrade-utils.js +103 -8
  386. package/dist/src/backend/routers/websocket/upgrade-utils.js.map +1 -1
  387. package/dist/src/backend/routers/websocket/upgrade-utils.test.js +353 -3
  388. package/dist/src/backend/routers/websocket/upgrade-utils.test.js.map +1 -1
  389. package/dist/src/backend/routers/websocket/websocket.integration.test.js +54 -23
  390. package/dist/src/backend/routers/websocket/websocket.integration.test.js.map +1 -1
  391. package/dist/src/backend/schemas/websocket/setup-terminal-message.schema.d.ts +0 -2
  392. package/dist/src/backend/schemas/websocket/setup-terminal-message.schema.d.ts.map +1 -1
  393. package/dist/src/backend/schemas/websocket/setup-terminal-message.schema.js +0 -3
  394. package/dist/src/backend/schemas/websocket/setup-terminal-message.schema.js.map +1 -1
  395. package/dist/src/backend/schemas/websocket/terminal-message.schema.d.ts +0 -2
  396. package/dist/src/backend/schemas/websocket/terminal-message.schema.d.ts.map +1 -1
  397. package/dist/src/backend/schemas/websocket/terminal-message.schema.js +0 -1
  398. package/dist/src/backend/schemas/websocket/terminal-message.schema.js.map +1 -1
  399. package/dist/src/backend/server.d.ts +3 -2
  400. package/dist/src/backend/server.d.ts.map +1 -1
  401. package/dist/src/backend/server.js +195 -128
  402. package/dist/src/backend/server.js.map +1 -1
  403. package/dist/src/backend/server.upgrade.test.js +359 -126
  404. package/dist/src/backend/server.upgrade.test.js.map +1 -1
  405. package/dist/src/backend/services/auto-iteration/service/auto-iteration.service.d.ts +4 -0
  406. package/dist/src/backend/services/auto-iteration/service/auto-iteration.service.d.ts.map +1 -1
  407. package/dist/src/backend/services/auto-iteration/service/auto-iteration.service.js +78 -20
  408. package/dist/src/backend/services/auto-iteration/service/auto-iteration.service.js.map +1 -1
  409. package/dist/src/backend/services/auto-iteration/service/auto-iteration.service.test.js +166 -5
  410. package/dist/src/backend/services/auto-iteration/service/auto-iteration.service.test.js.map +1 -1
  411. package/dist/src/backend/services/auto-iteration/service/bridges.d.ts +1 -0
  412. package/dist/src/backend/services/auto-iteration/service/bridges.d.ts.map +1 -1
  413. package/dist/src/backend/services/auto-iteration/service/git-ops.d.ts.map +1 -1
  414. package/dist/src/backend/services/auto-iteration/service/git-ops.js +32 -11
  415. package/dist/src/backend/services/auto-iteration/service/git-ops.js.map +1 -1
  416. package/dist/src/backend/services/auto-iteration/service/git-ops.test.d.ts +2 -0
  417. package/dist/src/backend/services/auto-iteration/service/git-ops.test.d.ts.map +1 -0
  418. package/dist/src/backend/services/auto-iteration/service/git-ops.test.js +59 -0
  419. package/dist/src/backend/services/auto-iteration/service/git-ops.test.js.map +1 -0
  420. package/dist/src/backend/services/check-service-accessor-boundaries.test.d.ts +2 -0
  421. package/dist/src/backend/services/check-service-accessor-boundaries.test.d.ts.map +1 -0
  422. package/dist/src/backend/services/check-service-accessor-boundaries.test.js +386 -0
  423. package/dist/src/backend/services/check-service-accessor-boundaries.test.js.map +1 -0
  424. package/dist/src/backend/services/check-single-writer.test.js +82 -8
  425. package/dist/src/backend/services/check-single-writer.test.js.map +1 -1
  426. package/dist/src/backend/services/config.service.d.ts +8 -0
  427. package/dist/src/backend/services/config.service.d.ts.map +1 -1
  428. package/dist/src/backend/services/config.service.js +29 -5
  429. package/dist/src/backend/services/config.service.js.map +1 -1
  430. package/dist/src/backend/services/config.service.test.js +59 -0
  431. package/dist/src/backend/services/config.service.test.js.map +1 -1
  432. package/dist/src/backend/services/constants.d.ts +4 -1
  433. package/dist/src/backend/services/constants.d.ts.map +1 -1
  434. package/dist/src/backend/services/constants.js +4 -1
  435. package/dist/src/backend/services/constants.js.map +1 -1
  436. package/dist/src/backend/services/decision-log/index.d.ts +1 -1
  437. package/dist/src/backend/services/decision-log/index.d.ts.map +1 -1
  438. package/dist/src/backend/services/decision-log/index.js +1 -1
  439. package/dist/src/backend/services/decision-log/index.js.map +1 -1
  440. package/dist/src/backend/services/decision-log/service/decision-log-domain-exports.test.d.ts +2 -0
  441. package/dist/src/backend/services/decision-log/service/decision-log-domain-exports.test.d.ts.map +1 -0
  442. package/dist/src/backend/services/decision-log/service/decision-log-domain-exports.test.js +8 -0
  443. package/dist/src/backend/services/decision-log/service/decision-log-domain-exports.test.js.map +1 -0
  444. package/dist/src/backend/{orchestration/decision-log-query.service.d.ts → services/decision-log/service/decision-log.service.d.ts} +4 -4
  445. package/dist/src/backend/services/decision-log/service/decision-log.service.d.ts.map +1 -0
  446. package/dist/src/backend/{orchestration/decision-log-query.service.js → services/decision-log/service/decision-log.service.js} +4 -4
  447. package/dist/src/backend/services/decision-log/service/decision-log.service.js.map +1 -0
  448. package/dist/src/backend/services/decision-log/service/decision-log.service.test.d.ts +2 -0
  449. package/dist/src/backend/services/decision-log/service/decision-log.service.test.d.ts.map +1 -0
  450. package/dist/src/backend/services/decision-log/service/decision-log.service.test.js +45 -0
  451. package/dist/src/backend/services/decision-log/service/decision-log.service.test.js.map +1 -0
  452. package/dist/src/backend/services/decision-log/service/index.d.ts +2 -0
  453. package/dist/src/backend/services/decision-log/service/index.d.ts.map +1 -0
  454. package/dist/src/backend/services/decision-log/service/index.js +2 -0
  455. package/dist/src/backend/services/decision-log/service/index.js.map +1 -0
  456. package/dist/src/backend/services/env-schemas.d.ts +4 -0
  457. package/dist/src/backend/services/env-schemas.d.ts.map +1 -1
  458. package/dist/src/backend/services/env-schemas.js +4 -0
  459. package/dist/src/backend/services/env-schemas.js.map +1 -1
  460. package/dist/src/backend/services/github/service/bridges.d.ts +51 -0
  461. package/dist/src/backend/services/github/service/bridges.d.ts.map +1 -1
  462. package/dist/src/backend/services/github/service/github-cli/errors.d.ts.map +1 -1
  463. package/dist/src/backend/services/github/service/github-cli/errors.js +6 -1
  464. package/dist/src/backend/services/github/service/github-cli/errors.js.map +1 -1
  465. package/dist/src/backend/services/github/service/github-cli/schemas.d.ts +82 -0
  466. package/dist/src/backend/services/github/service/github-cli/schemas.d.ts.map +1 -1
  467. package/dist/src/backend/services/github/service/github-cli/schemas.js +63 -0
  468. package/dist/src/backend/services/github/service/github-cli/schemas.js.map +1 -1
  469. package/dist/src/backend/services/github/service/github-cli/types.d.ts +6 -0
  470. package/dist/src/backend/services/github/service/github-cli/types.d.ts.map +1 -1
  471. package/dist/src/backend/services/github/service/github-cli.service.d.ts +11 -9
  472. package/dist/src/backend/services/github/service/github-cli.service.d.ts.map +1 -1
  473. package/dist/src/backend/services/github/service/github-cli.service.js +282 -83
  474. package/dist/src/backend/services/github/service/github-cli.service.js.map +1 -1
  475. package/dist/src/backend/services/github/service/github-cli.service.test.js +461 -67
  476. package/dist/src/backend/services/github/service/github-cli.service.test.js.map +1 -1
  477. package/dist/src/backend/services/github/service/index.d.ts +3 -2
  478. package/dist/src/backend/services/github/service/index.d.ts.map +1 -1
  479. package/dist/src/backend/services/github/service/index.js +2 -1
  480. package/dist/src/backend/services/github/service/index.js.map +1 -1
  481. package/dist/src/backend/services/github/service/pr-fetch-registry.d.ts +14 -6
  482. package/dist/src/backend/services/github/service/pr-fetch-registry.d.ts.map +1 -1
  483. package/dist/src/backend/services/github/service/pr-fetch-registry.js +79 -11
  484. package/dist/src/backend/services/github/service/pr-fetch-registry.js.map +1 -1
  485. package/dist/src/backend/services/github/service/pr-fetch-registry.test.d.ts +2 -0
  486. package/dist/src/backend/services/github/service/pr-fetch-registry.test.d.ts.map +1 -0
  487. package/dist/src/backend/services/github/service/pr-fetch-registry.test.js +112 -0
  488. package/dist/src/backend/services/github/service/pr-fetch-registry.test.js.map +1 -0
  489. package/dist/src/backend/services/github/service/pr-snapshot.service.d.ts +19 -3
  490. package/dist/src/backend/services/github/service/pr-snapshot.service.d.ts.map +1 -1
  491. package/dist/src/backend/services/github/service/pr-snapshot.service.js +115 -16
  492. package/dist/src/backend/services/github/service/pr-snapshot.service.js.map +1 -1
  493. package/dist/src/backend/services/github/service/pr-snapshot.service.test.js +255 -9
  494. package/dist/src/backend/services/github/service/pr-snapshot.service.test.js.map +1 -1
  495. package/dist/src/backend/services/linear/service/linear-client.service.d.ts.map +1 -1
  496. package/dist/src/backend/services/linear/service/linear-client.service.js +33 -20
  497. package/dist/src/backend/services/linear/service/linear-client.service.js.map +1 -1
  498. package/dist/src/backend/services/linear/service/linear-client.service.test.js +76 -0
  499. package/dist/src/backend/services/linear/service/linear-client.service.test.js.map +1 -1
  500. package/dist/src/backend/services/periodic-task/index.d.ts +0 -1
  501. package/dist/src/backend/services/periodic-task/index.d.ts.map +1 -1
  502. package/dist/src/backend/services/periodic-task/index.js +0 -1
  503. package/dist/src/backend/services/periodic-task/index.js.map +1 -1
  504. package/dist/src/backend/services/periodic-task/resources/periodic-task.accessor.d.ts +13 -1
  505. package/dist/src/backend/services/periodic-task/resources/periodic-task.accessor.d.ts.map +1 -1
  506. package/dist/src/backend/services/periodic-task/resources/periodic-task.accessor.js +47 -13
  507. package/dist/src/backend/services/periodic-task/resources/periodic-task.accessor.js.map +1 -1
  508. package/dist/src/backend/services/periodic-task/resources/periodic-task.accessor.test.js +77 -0
  509. package/dist/src/backend/services/periodic-task/resources/periodic-task.accessor.test.js.map +1 -1
  510. package/dist/src/backend/services/periodic-task/service/periodic-task.service.d.ts +105 -0
  511. package/dist/src/backend/services/periodic-task/service/periodic-task.service.d.ts.map +1 -1
  512. package/dist/src/backend/services/periodic-task/service/periodic-task.service.js +100 -9
  513. package/dist/src/backend/services/periodic-task/service/periodic-task.service.js.map +1 -1
  514. package/dist/src/backend/services/periodic-task/service/periodic-task.service.test.js +227 -1
  515. package/dist/src/backend/services/periodic-task/service/periodic-task.service.test.js.map +1 -1
  516. package/dist/src/backend/services/ratchet/service/bridges.d.ts +51 -14
  517. package/dist/src/backend/services/ratchet/service/bridges.d.ts.map +1 -1
  518. package/dist/src/backend/services/ratchet/service/fixer-session.service.d.ts +7 -1
  519. package/dist/src/backend/services/ratchet/service/fixer-session.service.d.ts.map +1 -1
  520. package/dist/src/backend/services/ratchet/service/fixer-session.service.js +56 -10
  521. package/dist/src/backend/services/ratchet/service/fixer-session.service.js.map +1 -1
  522. package/dist/src/backend/services/ratchet/service/fixer-session.service.test.js +154 -27
  523. package/dist/src/backend/services/ratchet/service/fixer-session.service.test.js.map +1 -1
  524. package/dist/src/backend/services/ratchet/service/index.d.ts +2 -3
  525. package/dist/src/backend/services/ratchet/service/index.d.ts.map +1 -1
  526. package/dist/src/backend/services/ratchet/service/index.js +1 -2
  527. package/dist/src/backend/services/ratchet/service/index.js.map +1 -1
  528. package/dist/src/backend/services/ratchet/service/ratchet-active-session.helpers.d.ts +10 -12
  529. package/dist/src/backend/services/ratchet/service/ratchet-active-session.helpers.d.ts.map +1 -1
  530. package/dist/src/backend/services/ratchet/service/ratchet-active-session.helpers.js +57 -58
  531. package/dist/src/backend/services/ratchet/service/ratchet-active-session.helpers.js.map +1 -1
  532. package/dist/src/backend/services/ratchet/service/ratchet-decision-logging.helpers.d.ts +2 -5
  533. package/dist/src/backend/services/ratchet/service/ratchet-decision-logging.helpers.d.ts.map +1 -1
  534. package/dist/src/backend/services/ratchet/service/ratchet-decision-logging.helpers.js +7 -4
  535. package/dist/src/backend/services/ratchet/service/ratchet-decision-logging.helpers.js.map +1 -1
  536. package/dist/src/backend/services/ratchet/service/ratchet-domain-exports.test.js +1 -4
  537. package/dist/src/backend/services/ratchet/service/ratchet-domain-exports.test.js.map +1 -1
  538. package/dist/src/backend/services/ratchet/service/ratchet-fixer-dispatch.helpers.d.ts +6 -6
  539. package/dist/src/backend/services/ratchet/service/ratchet-fixer-dispatch.helpers.d.ts.map +1 -1
  540. package/dist/src/backend/services/ratchet/service/ratchet-fixer-dispatch.helpers.js +184 -24
  541. package/dist/src/backend/services/ratchet/service/ratchet-fixer-dispatch.helpers.js.map +1 -1
  542. package/dist/src/backend/services/ratchet/service/ratchet-pr-state.helpers.d.ts +18 -33
  543. package/dist/src/backend/services/ratchet/service/ratchet-pr-state.helpers.d.ts.map +1 -1
  544. package/dist/src/backend/services/ratchet/service/ratchet-pr-state.helpers.js +120 -54
  545. package/dist/src/backend/services/ratchet/service/ratchet-pr-state.helpers.js.map +1 -1
  546. package/dist/src/backend/services/ratchet/service/ratchet-pr-state.helpers.test.js +584 -21
  547. package/dist/src/backend/services/ratchet/service/ratchet-pr-state.helpers.test.js.map +1 -1
  548. package/dist/src/backend/services/ratchet/service/ratchet-provider-resolver.service.d.ts.map +1 -1
  549. package/dist/src/backend/services/ratchet/service/ratchet-provider-resolver.service.js +4 -4
  550. package/dist/src/backend/services/ratchet/service/ratchet-provider-resolver.service.js.map +1 -1
  551. package/dist/src/backend/services/ratchet/service/ratchet-provider-resolver.service.test.js +14 -14
  552. package/dist/src/backend/services/ratchet/service/ratchet-provider-resolver.service.test.js.map +1 -1
  553. package/dist/src/backend/services/ratchet/service/ratchet-state-machine.d.ts +11 -0
  554. package/dist/src/backend/services/ratchet/service/ratchet-state-machine.d.ts.map +1 -0
  555. package/dist/src/backend/services/ratchet/service/ratchet-state-machine.js +77 -0
  556. package/dist/src/backend/services/ratchet/service/ratchet-state-machine.js.map +1 -0
  557. package/dist/src/backend/services/ratchet/service/ratchet-state-machine.test.d.ts +2 -0
  558. package/dist/src/backend/services/ratchet/service/ratchet-state-machine.test.d.ts.map +1 -0
  559. package/dist/src/backend/services/ratchet/service/ratchet-state-machine.test.js +66 -0
  560. package/dist/src/backend/services/ratchet/service/ratchet-state-machine.test.js.map +1 -0
  561. package/dist/src/backend/services/ratchet/service/ratchet-workspace-check-coordinator.d.ts +2 -1
  562. package/dist/src/backend/services/ratchet/service/ratchet-workspace-check-coordinator.d.ts.map +1 -1
  563. package/dist/src/backend/services/ratchet/service/ratchet-workspace-check-coordinator.js +35 -9
  564. package/dist/src/backend/services/ratchet/service/ratchet-workspace-check-coordinator.js.map +1 -1
  565. package/dist/src/backend/services/ratchet/service/ratchet-workspace-check-coordinator.test.js +91 -0
  566. package/dist/src/backend/services/ratchet/service/ratchet-workspace-check-coordinator.test.js.map +1 -1
  567. package/dist/src/backend/services/ratchet/service/ratchet.service.d.ts +20 -57
  568. package/dist/src/backend/services/ratchet/service/ratchet.service.d.ts.map +1 -1
  569. package/dist/src/backend/services/ratchet/service/ratchet.service.js +289 -235
  570. package/dist/src/backend/services/ratchet/service/ratchet.service.js.map +1 -1
  571. package/dist/src/backend/services/ratchet/service/ratchet.service.test.js +1932 -482
  572. package/dist/src/backend/services/ratchet/service/ratchet.service.test.js.map +1 -1
  573. package/dist/src/backend/services/ratchet/service/ratchet.types.d.ts +22 -15
  574. package/dist/src/backend/services/ratchet/service/ratchet.types.d.ts.map +1 -1
  575. package/dist/src/backend/services/registry.d.ts +46 -3
  576. package/dist/src/backend/services/registry.d.ts.map +1 -1
  577. package/dist/src/backend/services/registry.js +45 -2
  578. package/dist/src/backend/services/registry.js.map +1 -1
  579. package/dist/src/backend/services/resources.integration.test.js +281 -97
  580. package/dist/src/backend/services/resources.integration.test.js.map +1 -1
  581. package/dist/src/backend/services/run-script/service/bridges.d.ts +4 -0
  582. package/dist/src/backend/services/run-script/service/bridges.d.ts.map +1 -1
  583. package/dist/src/backend/services/{factory-config.service.d.ts → run-script/service/factory-config.service.d.ts} +1 -1
  584. package/dist/src/backend/services/run-script/service/factory-config.service.d.ts.map +1 -0
  585. package/dist/src/backend/services/{factory-config.service.js → run-script/service/factory-config.service.js} +1 -1
  586. package/dist/src/backend/services/run-script/service/factory-config.service.js.map +1 -0
  587. package/dist/src/backend/services/run-script/service/factory-config.service.test.d.ts.map +1 -0
  588. package/dist/src/backend/services/{factory-config.service.test.js → run-script/service/factory-config.service.test.js} +1 -1
  589. package/dist/src/backend/services/run-script/service/factory-config.service.test.js.map +1 -0
  590. package/dist/src/backend/services/run-script/service/index.d.ts +2 -0
  591. package/dist/src/backend/services/run-script/service/index.d.ts.map +1 -1
  592. package/dist/src/backend/services/run-script/service/index.js +2 -0
  593. package/dist/src/backend/services/run-script/service/index.js.map +1 -1
  594. package/dist/src/backend/services/{port-allocation.service.d.ts → run-script/service/port-allocation.service.d.ts} +2 -1
  595. package/dist/src/backend/services/run-script/service/port-allocation.service.d.ts.map +1 -0
  596. package/dist/src/backend/services/{port-allocation.service.js → run-script/service/port-allocation.service.js} +12 -4
  597. package/dist/src/backend/services/run-script/service/port-allocation.service.js.map +1 -0
  598. package/dist/src/backend/services/run-script/service/port-allocation.service.test.d.ts +2 -0
  599. package/dist/src/backend/services/run-script/service/port-allocation.service.test.d.ts.map +1 -0
  600. package/dist/src/backend/services/run-script/service/port-allocation.service.test.js +43 -0
  601. package/dist/src/backend/services/run-script/service/port-allocation.service.test.js.map +1 -0
  602. package/dist/src/backend/services/{run-script-config-persistence.service.d.ts → run-script/service/run-script-config-persistence.service.d.ts} +10 -1
  603. package/dist/src/backend/services/run-script/service/run-script-config-persistence.service.d.ts.map +1 -0
  604. package/dist/src/backend/services/{run-script-config-persistence.service.js → run-script/service/run-script-config-persistence.service.js} +46 -2
  605. package/dist/src/backend/services/run-script/service/run-script-config-persistence.service.js.map +1 -0
  606. package/dist/src/backend/services/run-script/service/run-script-config-persistence.service.test.d.ts.map +1 -0
  607. package/dist/src/backend/services/{run-script-config-persistence.service.test.js → run-script/service/run-script-config-persistence.service.test.js} +47 -0
  608. package/dist/src/backend/services/run-script/service/run-script-config-persistence.service.test.js.map +1 -0
  609. package/dist/src/backend/services/run-script/service/run-script-domain-exports.test.js +11 -1
  610. package/dist/src/backend/services/run-script/service/run-script-domain-exports.test.js.map +1 -1
  611. package/dist/src/backend/services/run-script/service/run-script-process-utils.d.ts.map +1 -1
  612. package/dist/src/backend/services/run-script/service/run-script-process-utils.js +1 -1
  613. package/dist/src/backend/services/run-script/service/run-script-process-utils.js.map +1 -1
  614. package/dist/src/backend/services/run-script/service/run-script-proxy.service.d.ts.map +1 -0
  615. package/dist/src/backend/services/{run-script-proxy.service.js → run-script/service/run-script-proxy.service.js} +3 -3
  616. package/dist/src/backend/services/run-script/service/run-script-proxy.service.js.map +1 -0
  617. package/dist/src/backend/services/run-script/service/run-script-proxy.service.test.d.ts.map +1 -0
  618. package/dist/src/backend/services/{run-script-proxy.service.test.js → run-script/service/run-script-proxy.service.test.js} +3 -3
  619. package/dist/src/backend/services/run-script/service/run-script-proxy.service.test.js.map +1 -0
  620. package/dist/src/backend/services/run-script/service/run-script-state-machine.service.d.ts +9 -9
  621. package/dist/src/backend/services/run-script/service/run-script-state-machine.service.d.ts.map +1 -1
  622. package/dist/src/backend/services/run-script/service/run-script-state-machine.service.js +8 -8
  623. package/dist/src/backend/services/run-script/service/run-script-state-machine.service.js.map +1 -1
  624. package/dist/src/backend/services/run-script/service/run-script.service.d.ts +5 -0
  625. package/dist/src/backend/services/run-script/service/run-script.service.d.ts.map +1 -1
  626. package/dist/src/backend/services/run-script/service/run-script.service.js +144 -47
  627. package/dist/src/backend/services/run-script/service/run-script.service.js.map +1 -1
  628. package/dist/src/backend/services/run-script/service/run-script.service.test.js +281 -29
  629. package/dist/src/backend/services/run-script/service/run-script.service.test.js.map +1 -1
  630. package/dist/src/backend/services/run-script/service/startup-script.service.d.ts.map +1 -1
  631. package/dist/src/backend/services/run-script/service/startup-script.service.js +4 -7
  632. package/dist/src/backend/services/run-script/service/startup-script.service.js.map +1 -1
  633. package/dist/src/backend/services/run-script/service/startup-script.service.test.js +5 -1
  634. package/dist/src/backend/services/run-script/service/startup-script.service.test.js.map +1 -1
  635. package/dist/src/backend/services/service-registry-check.helpers.d.ts +6 -0
  636. package/dist/src/backend/services/service-registry-check.helpers.d.ts.map +1 -0
  637. package/dist/src/backend/services/service-registry-check.helpers.js +22 -0
  638. package/dist/src/backend/services/service-registry-check.helpers.js.map +1 -0
  639. package/dist/src/backend/services/service-registry-check.test.d.ts +2 -0
  640. package/dist/src/backend/services/service-registry-check.test.d.ts.map +1 -0
  641. package/dist/src/backend/services/service-registry-check.test.js +36 -0
  642. package/dist/src/backend/services/service-registry-check.test.js.map +1 -0
  643. package/dist/src/backend/services/session/index.d.ts +0 -2
  644. package/dist/src/backend/services/session/index.d.ts.map +1 -1
  645. package/dist/src/backend/services/session/index.js +0 -2
  646. package/dist/src/backend/services/session/index.js.map +1 -1
  647. package/dist/src/backend/services/session/resources/agent-session.accessor.d.ts +4 -3
  648. package/dist/src/backend/services/session/resources/agent-session.accessor.d.ts.map +1 -1
  649. package/dist/src/backend/services/session/resources/agent-session.accessor.js +6 -15
  650. package/dist/src/backend/services/session/resources/agent-session.accessor.js.map +1 -1
  651. package/dist/src/backend/services/session/resources/agent-session.accessor.test.js +30 -15
  652. package/dist/src/backend/services/session/resources/agent-session.accessor.test.js.map +1 -1
  653. package/dist/src/backend/services/session/service/acp/acp-runtime-manager.d.ts +13 -0
  654. package/dist/src/backend/services/session/service/acp/acp-runtime-manager.d.ts.map +1 -1
  655. package/dist/src/backend/services/session/service/acp/acp-runtime-manager.js +212 -27
  656. package/dist/src/backend/services/session/service/acp/acp-runtime-manager.js.map +1 -1
  657. package/dist/src/backend/services/session/service/acp/acp-runtime-manager.test.js +335 -40
  658. package/dist/src/backend/services/session/service/acp/acp-runtime-manager.test.js.map +1 -1
  659. package/dist/src/backend/services/session/service/acp/child-workspace-mcp-server.d.ts +11 -0
  660. package/dist/src/backend/services/session/service/acp/child-workspace-mcp-server.d.ts.map +1 -0
  661. package/dist/src/backend/services/session/service/acp/child-workspace-mcp-server.js +318 -0
  662. package/dist/src/backend/services/session/service/acp/child-workspace-mcp-server.js.map +1 -0
  663. package/dist/src/backend/services/session/service/acp/child-workspace-mcp-server.test.d.ts +2 -0
  664. package/dist/src/backend/services/session/service/acp/child-workspace-mcp-server.test.d.ts.map +1 -0
  665. package/dist/src/backend/services/session/service/acp/child-workspace-mcp-server.test.js +119 -0
  666. package/dist/src/backend/services/session/service/acp/child-workspace-mcp-server.test.js.map +1 -0
  667. package/dist/src/backend/services/session/service/acp/codex-app-server-adapter/codex-rpc-client.d.ts +18 -1
  668. package/dist/src/backend/services/session/service/acp/codex-app-server-adapter/codex-rpc-client.d.ts.map +1 -1
  669. package/dist/src/backend/services/session/service/acp/codex-app-server-adapter/codex-rpc-client.js +54 -6
  670. package/dist/src/backend/services/session/service/acp/codex-app-server-adapter/codex-rpc-client.js.map +1 -1
  671. package/dist/src/backend/services/session/service/acp/codex-app-server-adapter/codex-rpc-client.test.js +76 -1
  672. package/dist/src/backend/services/session/service/acp/codex-app-server-adapter/codex-rpc-client.test.js.map +1 -1
  673. package/dist/src/backend/services/session/service/acp/types.d.ts +7 -0
  674. package/dist/src/backend/services/session/service/acp/types.d.ts.map +1 -1
  675. package/dist/src/backend/services/session/service/bridges.d.ts +10 -5
  676. package/dist/src/backend/services/session/service/bridges.d.ts.map +1 -1
  677. package/dist/src/backend/services/session/service/chat/chat-event-forwarder.service.d.ts.map +1 -1
  678. package/dist/src/backend/services/session/service/chat/chat-event-forwarder.service.js +2 -14
  679. package/dist/src/backend/services/session/service/chat/chat-event-forwarder.service.js.map +1 -1
  680. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/load-session.handler.d.ts.map +1 -1
  681. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/load-session.handler.js +59 -76
  682. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/load-session.handler.js.map +1 -1
  683. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/load-session.handler.test.js +204 -1
  684. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/load-session.handler.test.js.map +1 -1
  685. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/queue-message.handler.d.ts.map +1 -1
  686. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/queue-message.handler.js +2 -11
  687. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/queue-message.handler.js.map +1 -1
  688. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/queue-message.handler.test.js +5 -18
  689. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/queue-message.handler.test.js.map +1 -1
  690. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/start.handler.d.ts.map +1 -1
  691. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/start.handler.js +9 -0
  692. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/start.handler.js.map +1 -1
  693. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/start.handler.test.js +34 -0
  694. package/dist/src/backend/services/session/service/chat/chat-message-handlers/handlers/start.handler.test.js.map +1 -1
  695. package/dist/src/backend/services/session/service/chat/chat-message-handlers.service.d.ts +11 -0
  696. package/dist/src/backend/services/session/service/chat/chat-message-handlers.service.d.ts.map +1 -1
  697. package/dist/src/backend/services/session/service/chat/chat-message-handlers.service.js +148 -26
  698. package/dist/src/backend/services/session/service/chat/chat-message-handlers.service.js.map +1 -1
  699. package/dist/src/backend/services/session/service/chat/chat-message-handlers.service.test.js +339 -1
  700. package/dist/src/backend/services/session/service/chat/chat-message-handlers.service.test.js.map +1 -1
  701. package/dist/src/backend/services/session/service/data/codex-session-history-loader.service.d.ts.map +1 -1
  702. package/dist/src/backend/services/session/service/data/codex-session-history-loader.service.js +200 -26
  703. package/dist/src/backend/services/session/service/data/codex-session-history-loader.service.js.map +1 -1
  704. package/dist/src/backend/services/session/service/data/codex-session-history-loader.service.test.js +352 -1
  705. package/dist/src/backend/services/session/service/data/codex-session-history-loader.service.test.js.map +1 -1
  706. package/dist/src/backend/services/session/service/data/session-data.service.d.ts +19 -160
  707. package/dist/src/backend/services/session/service/data/session-data.service.d.ts.map +1 -1
  708. package/dist/src/backend/services/session/service/data/session-data.service.js +68 -36
  709. package/dist/src/backend/services/session/service/data/session-data.service.js.map +1 -1
  710. package/dist/src/backend/services/session/service/data/session-data.service.test.d.ts +2 -0
  711. package/dist/src/backend/services/session/service/data/session-data.service.test.d.ts.map +1 -0
  712. package/dist/src/backend/services/session/service/data/session-data.service.test.js +103 -0
  713. package/dist/src/backend/services/session/service/data/session-data.service.test.js.map +1 -0
  714. package/dist/src/backend/services/session/service/data/session-history-loader.service.d.ts.map +1 -1
  715. package/dist/src/backend/services/session/service/data/session-history-loader.service.js +4 -1
  716. package/dist/src/backend/services/session/service/data/session-history-loader.service.js.map +1 -1
  717. package/dist/src/backend/services/session/service/data/session-history-loader.service.test.js +37 -0
  718. package/dist/src/backend/services/session/service/data/session-history-loader.service.test.js.map +1 -1
  719. package/dist/src/backend/services/session/service/data/session-provider-resolver.service.d.ts +9 -0
  720. package/dist/src/backend/services/session/service/data/session-provider-resolver.service.d.ts.map +1 -1
  721. package/dist/src/backend/services/session/service/data/session-provider-resolver.service.js +15 -5
  722. package/dist/src/backend/services/session/service/data/session-provider-resolver.service.js.map +1 -1
  723. package/dist/src/backend/services/session/service/data/session-provider-resolver.service.test.js +23 -10
  724. package/dist/src/backend/services/session/service/data/session-provider-resolver.service.test.js.map +1 -1
  725. package/dist/src/backend/services/session/service/index.d.ts +5 -4
  726. package/dist/src/backend/services/session/service/index.d.ts.map +1 -1
  727. package/dist/src/backend/services/session/service/index.js +3 -3
  728. package/dist/src/backend/services/session/service/index.js.map +1 -1
  729. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.d.ts +17 -4
  730. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.d.ts.map +1 -1
  731. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.js +89 -13
  732. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.js.map +1 -1
  733. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.slash-commands.test.d.ts +2 -0
  734. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.slash-commands.test.d.ts.map +1 -0
  735. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.slash-commands.test.js +159 -0
  736. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.slash-commands.test.js.map +1 -0
  737. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.text-streaming.test.d.ts +2 -0
  738. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.text-streaming.test.d.ts.map +1 -0
  739. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.text-streaming.test.js +230 -0
  740. package/dist/src/backend/services/session/service/lifecycle/acp-event-processor.text-streaming.test.js.map +1 -0
  741. package/dist/src/backend/services/session/service/lifecycle/session-pr-discovery.service.d.ts +2 -1
  742. package/dist/src/backend/services/session/service/lifecycle/session-pr-discovery.service.d.ts.map +1 -1
  743. package/dist/src/backend/services/session/service/lifecycle/session-pr-discovery.service.js +3 -28
  744. package/dist/src/backend/services/session/service/lifecycle/session-pr-discovery.service.js.map +1 -1
  745. package/dist/src/backend/services/session/service/lifecycle/session-pr-discovery.service.test.d.ts +2 -0
  746. package/dist/src/backend/services/session/service/lifecycle/session-pr-discovery.service.test.d.ts.map +1 -0
  747. package/dist/src/backend/services/session/service/lifecycle/session-pr-discovery.service.test.js +33 -0
  748. package/dist/src/backend/services/session/service/lifecycle/session-pr-discovery.service.test.js.map +1 -0
  749. package/dist/src/backend/services/session/service/lifecycle/session.config.service.d.ts.map +1 -1
  750. package/dist/src/backend/services/session/service/lifecycle/session.config.service.js +15 -4
  751. package/dist/src/backend/services/session/service/lifecycle/session.config.service.js.map +1 -1
  752. package/dist/src/backend/services/session/service/lifecycle/session.config.service.test.js +59 -6
  753. package/dist/src/backend/services/session/service/lifecycle/session.config.service.test.js.map +1 -1
  754. package/dist/src/backend/services/session/service/lifecycle/session.lifecycle.service.d.ts +23 -3
  755. package/dist/src/backend/services/session/service/lifecycle/session.lifecycle.service.d.ts.map +1 -1
  756. package/dist/src/backend/services/session/service/lifecycle/session.lifecycle.service.js +336 -40
  757. package/dist/src/backend/services/session/service/lifecycle/session.lifecycle.service.js.map +1 -1
  758. package/dist/src/backend/services/session/service/lifecycle/session.lifecycle.service.test.d.ts +2 -0
  759. package/dist/src/backend/services/session/service/lifecycle/session.lifecycle.service.test.d.ts.map +1 -0
  760. package/dist/src/backend/services/session/service/lifecycle/session.lifecycle.service.test.js +852 -0
  761. package/dist/src/backend/services/session/service/lifecycle/session.lifecycle.service.test.js.map +1 -0
  762. package/dist/src/backend/services/session/service/lifecycle/session.prompt-builder.d.ts +9 -0
  763. package/dist/src/backend/services/session/service/lifecycle/session.prompt-builder.d.ts.map +1 -1
  764. package/dist/src/backend/services/session/service/lifecycle/session.prompt-builder.js +21 -0
  765. package/dist/src/backend/services/session/service/lifecycle/session.prompt-builder.js.map +1 -1
  766. package/dist/src/backend/services/session/service/lifecycle/session.prompt-builder.test.js +32 -1
  767. package/dist/src/backend/services/session/service/lifecycle/session.prompt-builder.test.js.map +1 -1
  768. package/dist/src/backend/services/session/service/lifecycle/session.repository.d.ts +1 -1
  769. package/dist/src/backend/services/session/service/lifecycle/session.repository.d.ts.map +1 -1
  770. package/dist/src/backend/services/session/service/lifecycle/session.repository.js +3 -3
  771. package/dist/src/backend/services/session/service/lifecycle/session.repository.js.map +1 -1
  772. package/dist/src/backend/services/session/service/lifecycle/session.repository.test.js +1 -1
  773. package/dist/src/backend/services/session/service/lifecycle/session.repository.test.js.map +1 -1
  774. package/dist/src/backend/services/session/service/lifecycle/session.service.coverage.test.js +6 -0
  775. package/dist/src/backend/services/session/service/lifecycle/session.service.coverage.test.js.map +1 -1
  776. package/dist/src/backend/services/session/service/lifecycle/session.service.d.ts +12 -6
  777. package/dist/src/backend/services/session/service/lifecycle/session.service.d.ts.map +1 -1
  778. package/dist/src/backend/services/session/service/lifecycle/session.service.js +20 -5
  779. package/dist/src/backend/services/session/service/lifecycle/session.service.js.map +1 -1
  780. package/dist/src/backend/services/session/service/lifecycle/session.service.test.js +207 -20
  781. package/dist/src/backend/services/session/service/lifecycle/session.service.test.js.map +1 -1
  782. package/dist/src/backend/services/session/service/session-domain.service.d.ts +2 -0
  783. package/dist/src/backend/services/session/service/session-domain.service.d.ts.map +1 -1
  784. package/dist/src/backend/services/session/service/session-domain.service.js +28 -1
  785. package/dist/src/backend/services/session/service/session-domain.service.js.map +1 -1
  786. package/dist/src/backend/services/session/service/session-domain.service.test.js +37 -16
  787. package/dist/src/backend/services/session/service/session-domain.service.test.js.map +1 -1
  788. package/dist/src/backend/services/session/service/session-event-bus.d.ts +21 -0
  789. package/dist/src/backend/services/session/service/session-event-bus.d.ts.map +1 -0
  790. package/dist/src/backend/services/session/service/session-event-bus.js +28 -0
  791. package/dist/src/backend/services/session/service/session-event-bus.js.map +1 -0
  792. package/dist/src/backend/services/session/service/store/session-publisher.js +4 -4
  793. package/dist/src/backend/services/session/service/store/session-publisher.js.map +1 -1
  794. package/dist/src/backend/services/session/service/store/session-queue.test.js +2 -0
  795. package/dist/src/backend/services/session/service/store/session-queue.test.js.map +1 -1
  796. package/dist/src/backend/services/session/service/store/session-replay-builder.d.ts.map +1 -1
  797. package/dist/src/backend/services/session/service/store/session-replay-builder.js +26 -3
  798. package/dist/src/backend/services/session/service/store/session-replay-builder.js.map +1 -1
  799. package/dist/src/backend/services/session/service/store/session-replay-builder.test.js +136 -0
  800. package/dist/src/backend/services/session/service/store/session-replay-builder.test.js.map +1 -1
  801. package/dist/src/backend/services/session/service/store/session-runtime-machine.test.js +2 -0
  802. package/dist/src/backend/services/session/service/store/session-runtime-machine.test.js.map +1 -1
  803. package/dist/src/backend/services/session/service/store/session-store-registry.d.ts.map +1 -1
  804. package/dist/src/backend/services/session/service/store/session-store-registry.js +2 -0
  805. package/dist/src/backend/services/session/service/store/session-store-registry.js.map +1 -1
  806. package/dist/src/backend/services/session/service/store/session-store.types.d.ts +8 -0
  807. package/dist/src/backend/services/session/service/store/session-store.types.d.ts.map +1 -1
  808. package/dist/src/backend/services/session/service/store/session-transcript.d.ts +1 -0
  809. package/dist/src/backend/services/session/service/store/session-transcript.d.ts.map +1 -1
  810. package/dist/src/backend/services/session/service/store/session-transcript.js +83 -15
  811. package/dist/src/backend/services/session/service/store/session-transcript.js.map +1 -1
  812. package/dist/src/backend/services/session/service/store/session-transcript.test.js +149 -30
  813. package/dist/src/backend/services/session/service/store/session-transcript.test.js.map +1 -1
  814. package/dist/src/backend/services/session/service/store/slash-command-cache.service.d.ts.map +1 -1
  815. package/dist/src/backend/services/session/service/store/slash-command-cache.service.js +64 -23
  816. package/dist/src/backend/services/session/service/store/slash-command-cache.service.js.map +1 -1
  817. package/dist/src/backend/services/session/service/store/slash-command-cache.service.test.js +119 -7
  818. package/dist/src/backend/services/session/service/store/slash-command-cache.service.test.js.map +1 -1
  819. package/dist/src/backend/services/session/service/store/slash-command-disk-scanner.d.ts +7 -0
  820. package/dist/src/backend/services/session/service/store/slash-command-disk-scanner.d.ts.map +1 -0
  821. package/dist/src/backend/services/session/service/store/slash-command-disk-scanner.js +94 -0
  822. package/dist/src/backend/services/session/service/store/slash-command-disk-scanner.js.map +1 -0
  823. package/dist/src/backend/services/session/service/store/slash-command-disk-scanner.test.d.ts +2 -0
  824. package/dist/src/backend/services/session/service/store/slash-command-disk-scanner.test.d.ts.map +1 -0
  825. package/dist/src/backend/services/session/service/store/slash-command-disk-scanner.test.js +52 -0
  826. package/dist/src/backend/services/session/service/store/slash-command-disk-scanner.test.js.map +1 -0
  827. package/dist/src/backend/services/session/types.d.ts +25 -0
  828. package/dist/src/backend/services/session/types.d.ts.map +1 -0
  829. package/dist/src/backend/services/session/types.js +2 -0
  830. package/dist/src/backend/services/session/types.js.map +1 -0
  831. package/dist/src/backend/services/settings/index.d.ts +1 -3
  832. package/dist/src/backend/services/settings/index.d.ts.map +1 -1
  833. package/dist/src/backend/services/settings/index.js +1 -3
  834. package/dist/src/backend/services/settings/index.js.map +1 -1
  835. package/dist/src/backend/services/settings/resources/user-settings.accessor.d.ts +4 -1
  836. package/dist/src/backend/services/settings/resources/user-settings.accessor.d.ts.map +1 -1
  837. package/dist/src/backend/services/settings/resources/user-settings.accessor.js +55 -13
  838. package/dist/src/backend/services/settings/resources/user-settings.accessor.js.map +1 -1
  839. package/dist/src/backend/services/settings/service/health.service.d.ts +6 -0
  840. package/dist/src/backend/services/settings/service/health.service.d.ts.map +1 -0
  841. package/dist/src/backend/services/settings/service/health.service.js +8 -0
  842. package/dist/src/backend/services/settings/service/health.service.js.map +1 -0
  843. package/dist/src/backend/services/settings/service/health.service.test.d.ts +2 -0
  844. package/dist/src/backend/services/settings/service/health.service.test.d.ts.map +1 -0
  845. package/dist/src/backend/services/settings/service/health.service.test.js +16 -0
  846. package/dist/src/backend/services/settings/service/health.service.test.js.map +1 -0
  847. package/dist/src/backend/services/settings/service/index.d.ts +3 -0
  848. package/dist/src/backend/services/settings/service/index.d.ts.map +1 -0
  849. package/dist/src/backend/services/settings/service/index.js +3 -0
  850. package/dist/src/backend/services/settings/service/index.js.map +1 -0
  851. package/dist/src/backend/services/settings/service/settings-domain-exports.test.d.ts +2 -0
  852. package/dist/src/backend/services/settings/service/settings-domain-exports.test.d.ts.map +1 -0
  853. package/dist/src/backend/services/settings/service/settings-domain-exports.test.js +9 -0
  854. package/dist/src/backend/services/settings/service/settings-domain-exports.test.js.map +1 -0
  855. package/dist/src/backend/services/settings/service/user-settings.service.d.ts +27 -0
  856. package/dist/src/backend/services/settings/service/user-settings.service.d.ts.map +1 -0
  857. package/dist/src/backend/services/settings/service/user-settings.service.js +23 -0
  858. package/dist/src/backend/services/settings/service/user-settings.service.js.map +1 -0
  859. package/dist/src/backend/services/settings/service/user-settings.service.test.d.ts +2 -0
  860. package/dist/src/backend/services/settings/service/user-settings.service.test.d.ts.map +1 -0
  861. package/dist/src/backend/services/settings/service/user-settings.service.test.js +58 -0
  862. package/dist/src/backend/services/settings/service/user-settings.service.test.js.map +1 -0
  863. package/dist/src/backend/services/terminal/index.d.ts +0 -1
  864. package/dist/src/backend/services/terminal/index.d.ts.map +1 -1
  865. package/dist/src/backend/services/terminal/index.js +0 -1
  866. package/dist/src/backend/services/terminal/index.js.map +1 -1
  867. package/dist/src/backend/services/terminal/resources/terminal-session.accessor.d.ts +1 -1
  868. package/dist/src/backend/services/terminal/resources/terminal-session.accessor.d.ts.map +1 -1
  869. package/dist/src/backend/services/terminal/resources/terminal-session.accessor.js +2 -2
  870. package/dist/src/backend/services/terminal/resources/terminal-session.accessor.js.map +1 -1
  871. package/dist/src/backend/services/terminal/service/index.d.ts +2 -0
  872. package/dist/src/backend/services/terminal/service/index.d.ts.map +1 -1
  873. package/dist/src/backend/services/terminal/service/index.js +1 -0
  874. package/dist/src/backend/services/terminal/service/index.js.map +1 -1
  875. package/dist/src/backend/services/terminal/service/terminal-domain-exports.test.js +4 -1
  876. package/dist/src/backend/services/terminal/service/terminal-domain-exports.test.js.map +1 -1
  877. package/dist/src/backend/services/terminal/service/terminal-session.service.d.ts +95 -0
  878. package/dist/src/backend/services/terminal/service/terminal-session.service.d.ts.map +1 -0
  879. package/dist/src/backend/services/terminal/service/terminal-session.service.js +43 -0
  880. package/dist/src/backend/services/terminal/service/terminal-session.service.js.map +1 -0
  881. package/dist/src/backend/services/terminal/service/terminal-session.service.test.d.ts +2 -0
  882. package/dist/src/backend/services/terminal/service/terminal-session.service.test.d.ts.map +1 -0
  883. package/dist/src/backend/services/terminal/service/terminal-session.service.test.js +46 -0
  884. package/dist/src/backend/services/terminal/service/terminal-session.service.test.js.map +1 -0
  885. package/dist/src/backend/services/terminal/service/terminal.service.d.ts +2 -0
  886. package/dist/src/backend/services/terminal/service/terminal.service.d.ts.map +1 -1
  887. package/dist/src/backend/services/terminal/service/terminal.service.js +22 -4
  888. package/dist/src/backend/services/terminal/service/terminal.service.js.map +1 -1
  889. package/dist/src/backend/services/terminal/service/terminal.service.test.js +77 -1
  890. package/dist/src/backend/services/terminal/service/terminal.service.test.js.map +1 -1
  891. package/dist/src/backend/services/workspace/index.d.ts +0 -2
  892. package/dist/src/backend/services/workspace/index.d.ts.map +1 -1
  893. package/dist/src/backend/services/workspace/index.js +0 -2
  894. package/dist/src/backend/services/workspace/index.js.map +1 -1
  895. package/dist/src/backend/services/workspace/resources/project.accessor.d.ts +1 -1
  896. package/dist/src/backend/services/workspace/resources/project.accessor.d.ts.map +1 -1
  897. package/dist/src/backend/services/workspace/resources/project.accessor.js +26 -1
  898. package/dist/src/backend/services/workspace/resources/project.accessor.js.map +1 -1
  899. package/dist/src/backend/services/workspace/resources/workspace-notification.accessor.d.ts +19 -0
  900. package/dist/src/backend/services/workspace/resources/workspace-notification.accessor.d.ts.map +1 -0
  901. package/dist/src/backend/services/workspace/resources/workspace-notification.accessor.js +34 -0
  902. package/dist/src/backend/services/workspace/resources/workspace-notification.accessor.js.map +1 -0
  903. package/dist/src/backend/services/workspace/resources/workspace.accessor.d.ts +91 -5
  904. package/dist/src/backend/services/workspace/resources/workspace.accessor.d.ts.map +1 -1
  905. package/dist/src/backend/services/workspace/resources/workspace.accessor.js +328 -5
  906. package/dist/src/backend/services/workspace/resources/workspace.accessor.js.map +1 -1
  907. package/dist/src/backend/services/workspace/resources/workspace.accessor.test.js +601 -0
  908. package/dist/src/backend/services/workspace/resources/workspace.accessor.test.js.map +1 -1
  909. package/dist/src/backend/services/workspace/service/bridges.d.ts +1 -2
  910. package/dist/src/backend/services/workspace/service/bridges.d.ts.map +1 -1
  911. package/dist/src/backend/services/workspace/service/index.d.ts +12 -1
  912. package/dist/src/backend/services/workspace/service/index.d.ts.map +1 -1
  913. package/dist/src/backend/services/workspace/service/index.js +11 -1
  914. package/dist/src/backend/services/workspace/service/index.js.map +1 -1
  915. package/dist/src/backend/services/workspace/service/lifecycle/activity.service.d.ts +2 -2
  916. package/dist/src/backend/services/workspace/service/lifecycle/activity.service.d.ts.map +1 -1
  917. package/dist/src/backend/services/workspace/service/lifecycle/activity.service.js +20 -3
  918. package/dist/src/backend/services/workspace/service/lifecycle/activity.service.js.map +1 -1
  919. package/dist/src/backend/services/workspace/service/lifecycle/activity.service.test.js +30 -0
  920. package/dist/src/backend/services/workspace/service/lifecycle/activity.service.test.js.map +1 -1
  921. package/dist/src/backend/services/workspace/service/lifecycle/creation.service.d.ts +18 -0
  922. package/dist/src/backend/services/workspace/service/lifecycle/creation.service.d.ts.map +1 -1
  923. package/dist/src/backend/services/workspace/service/lifecycle/creation.service.js +57 -25
  924. package/dist/src/backend/services/workspace/service/lifecycle/creation.service.js.map +1 -1
  925. package/dist/src/backend/services/workspace/service/lifecycle/creation.service.test.js +50 -10
  926. package/dist/src/backend/services/workspace/service/lifecycle/creation.service.test.js.map +1 -1
  927. package/dist/src/backend/services/workspace/service/lifecycle/data.service.d.ts +183 -122
  928. package/dist/src/backend/services/workspace/service/lifecycle/data.service.d.ts.map +1 -1
  929. package/dist/src/backend/services/workspace/service/lifecycle/data.service.js +29 -8
  930. package/dist/src/backend/services/workspace/service/lifecycle/data.service.js.map +1 -1
  931. package/dist/src/backend/services/workspace/service/lifecycle/data.service.test.d.ts +2 -0
  932. package/dist/src/backend/services/workspace/service/lifecycle/data.service.test.d.ts.map +1 -0
  933. package/dist/src/backend/services/workspace/service/lifecycle/data.service.test.js +36 -0
  934. package/dist/src/backend/services/workspace/service/lifecycle/data.service.test.js.map +1 -0
  935. package/dist/src/backend/services/workspace/service/lifecycle/state-machine.service.d.ts +2 -0
  936. package/dist/src/backend/services/workspace/service/lifecycle/state-machine.service.d.ts.map +1 -1
  937. package/dist/src/backend/services/workspace/service/lifecycle/state-machine.service.js +49 -25
  938. package/dist/src/backend/services/workspace/service/lifecycle/state-machine.service.js.map +1 -1
  939. package/dist/src/backend/services/workspace/service/lifecycle/state-machine.service.test.js +127 -4
  940. package/dist/src/backend/services/workspace/service/lifecycle/state-machine.service.test.js.map +1 -1
  941. package/dist/src/backend/services/workspace/service/lifecycle/workspace-auto-iteration.service.d.ts +206 -0
  942. package/dist/src/backend/services/workspace/service/lifecycle/workspace-auto-iteration.service.d.ts.map +1 -0
  943. package/dist/src/backend/services/workspace/service/lifecycle/workspace-auto-iteration.service.js +26 -0
  944. package/dist/src/backend/services/workspace/service/lifecycle/workspace-auto-iteration.service.js.map +1 -0
  945. package/dist/src/backend/services/workspace/service/lifecycle/workspace-pr-snapshot.service.d.ts +76 -0
  946. package/dist/src/backend/services/workspace/service/lifecycle/workspace-pr-snapshot.service.d.ts.map +1 -0
  947. package/dist/src/backend/services/workspace/service/lifecycle/workspace-pr-snapshot.service.js +32 -0
  948. package/dist/src/backend/services/workspace/service/lifecycle/workspace-pr-snapshot.service.js.map +1 -0
  949. package/dist/src/backend/services/workspace/service/lifecycle/workspace-pr-snapshot.service.test.d.ts +2 -0
  950. package/dist/src/backend/services/workspace/service/lifecycle/workspace-pr-snapshot.service.test.d.ts.map +1 -0
  951. package/dist/src/backend/services/workspace/service/lifecycle/workspace-pr-snapshot.service.test.js +65 -0
  952. package/dist/src/backend/services/workspace/service/lifecycle/workspace-pr-snapshot.service.test.js.map +1 -0
  953. package/dist/src/backend/services/workspace/service/lifecycle/workspace-ratchet.service.d.ts +243 -0
  954. package/dist/src/backend/services/workspace/service/lifecycle/workspace-ratchet.service.d.ts.map +1 -0
  955. package/dist/src/backend/services/workspace/service/lifecycle/workspace-ratchet.service.js +42 -0
  956. package/dist/src/backend/services/workspace/service/lifecycle/workspace-ratchet.service.js.map +1 -0
  957. package/dist/src/backend/services/workspace/service/lifecycle/workspace-relationships.service.d.ts +186 -0
  958. package/dist/src/backend/services/workspace/service/lifecycle/workspace-relationships.service.d.ts.map +1 -0
  959. package/dist/src/backend/services/workspace/service/lifecycle/workspace-relationships.service.js +11 -0
  960. package/dist/src/backend/services/workspace/service/lifecycle/workspace-relationships.service.js.map +1 -0
  961. package/dist/src/backend/services/workspace/service/lifecycle/workspace-run-script.service.d.ts +161 -0
  962. package/dist/src/backend/services/workspace/service/lifecycle/workspace-run-script.service.d.ts.map +1 -0
  963. package/dist/src/backend/services/workspace/service/lifecycle/workspace-run-script.service.js +51 -0
  964. package/dist/src/backend/services/workspace/service/lifecycle/workspace-run-script.service.js.map +1 -0
  965. package/dist/src/backend/services/workspace/service/lifecycle/workspace-state-capabilities.test.d.ts +2 -0
  966. package/dist/src/backend/services/workspace/service/lifecycle/workspace-state-capabilities.test.d.ts.map +1 -0
  967. package/dist/src/backend/services/workspace/service/lifecycle/workspace-state-capabilities.test.js +96 -0
  968. package/dist/src/backend/services/workspace/service/lifecycle/workspace-state-capabilities.test.js.map +1 -0
  969. package/dist/src/backend/services/workspace/service/pr-discovery-schedule.d.ts +2 -0
  970. package/dist/src/backend/services/workspace/service/pr-discovery-schedule.d.ts.map +1 -0
  971. package/dist/src/backend/services/workspace/service/pr-discovery-schedule.js +11 -0
  972. package/dist/src/backend/services/workspace/service/pr-discovery-schedule.js.map +1 -0
  973. package/dist/src/backend/services/workspace/service/pr-discovery-schedule.test.d.ts +2 -0
  974. package/dist/src/backend/services/workspace/service/pr-discovery-schedule.test.d.ts.map +1 -0
  975. package/dist/src/backend/services/workspace/service/pr-discovery-schedule.test.js +24 -0
  976. package/dist/src/backend/services/workspace/service/pr-discovery-schedule.test.js.map +1 -0
  977. package/dist/src/backend/services/workspace/service/query/project-management.service.d.ts +33 -21
  978. package/dist/src/backend/services/workspace/service/query/project-management.service.d.ts.map +1 -1
  979. package/dist/src/backend/services/workspace/service/query/workspace-maintenance.service.d.ts +446 -0
  980. package/dist/src/backend/services/workspace/service/query/workspace-maintenance.service.d.ts.map +1 -0
  981. package/dist/src/backend/services/workspace/service/query/workspace-maintenance.service.js +23 -0
  982. package/dist/src/backend/services/workspace/service/query/workspace-maintenance.service.js.map +1 -0
  983. package/dist/src/backend/services/workspace/service/query/workspace-maintenance.service.test.d.ts +2 -0
  984. package/dist/src/backend/services/workspace/service/query/workspace-maintenance.service.test.d.ts.map +1 -0
  985. package/dist/src/backend/services/workspace/service/query/workspace-maintenance.service.test.js +36 -0
  986. package/dist/src/backend/services/workspace/service/query/workspace-maintenance.service.test.js.map +1 -0
  987. package/dist/src/backend/services/workspace/service/query/workspace-notification.service.d.ts +58 -0
  988. package/dist/src/backend/services/workspace/service/query/workspace-notification.service.d.ts.map +1 -0
  989. package/dist/src/backend/services/workspace/service/query/workspace-notification.service.js +24 -0
  990. package/dist/src/backend/services/workspace/service/query/workspace-notification.service.js.map +1 -0
  991. package/dist/src/backend/services/workspace/service/query/workspace-notification.service.test.d.ts +2 -0
  992. package/dist/src/backend/services/workspace/service/query/workspace-notification.service.test.d.ts.map +1 -0
  993. package/dist/src/backend/services/workspace/service/query/workspace-notification.service.test.js +28 -0
  994. package/dist/src/backend/services/workspace/service/query/workspace-notification.service.test.js.map +1 -0
  995. package/dist/src/backend/services/workspace/service/query/workspace-query.service.d.ts +58 -56
  996. package/dist/src/backend/services/workspace/service/query/workspace-query.service.d.ts.map +1 -1
  997. package/dist/src/backend/services/workspace/service/query/workspace-query.service.js +75 -101
  998. package/dist/src/backend/services/workspace/service/query/workspace-query.service.js.map +1 -1
  999. package/dist/src/backend/services/workspace/service/query/workspace-query.service.test.js +165 -59
  1000. package/dist/src/backend/services/workspace/service/query/workspace-query.service.test.js.map +1 -1
  1001. package/dist/src/backend/services/{workspace-snapshot-store.service.d.ts → workspace/service/snapshot/workspace-snapshot-store.service.d.ts} +26 -46
  1002. package/dist/src/backend/services/workspace/service/snapshot/workspace-snapshot-store.service.d.ts.map +1 -0
  1003. package/dist/src/backend/services/{workspace-snapshot-store.service.js → workspace/service/snapshot/workspace-snapshot-store.service.js} +153 -26
  1004. package/dist/src/backend/services/workspace/service/snapshot/workspace-snapshot-store.service.js.map +1 -0
  1005. package/dist/src/backend/services/workspace/service/snapshot/workspace-snapshot-store.service.test.d.ts.map +1 -0
  1006. package/dist/src/backend/services/{workspace-snapshot-store.service.test.js → workspace/service/snapshot/workspace-snapshot-store.service.test.js} +261 -18
  1007. package/dist/src/backend/services/workspace/service/snapshot/workspace-snapshot-store.service.test.js.map +1 -0
  1008. package/dist/src/backend/services/workspace/service/state/kanban-state.d.ts +18 -3
  1009. package/dist/src/backend/services/workspace/service/state/kanban-state.d.ts.map +1 -1
  1010. package/dist/src/backend/services/workspace/service/state/kanban-state.js +136 -16
  1011. package/dist/src/backend/services/workspace/service/state/kanban-state.js.map +1 -1
  1012. package/dist/src/backend/services/workspace/service/state/kanban-state.test.js +319 -63
  1013. package/dist/src/backend/services/workspace/service/state/kanban-state.test.js.map +1 -1
  1014. package/dist/src/backend/services/workspace/service/workspace-domain-exports.test.js +18 -1
  1015. package/dist/src/backend/services/workspace/service/workspace-domain-exports.test.js.map +1 -1
  1016. package/dist/src/backend/services/workspace/service/worktree/git-clone.service.d.ts.map +1 -0
  1017. package/dist/src/backend/services/{git-clone.service.js → workspace/service/worktree/git-clone.service.js} +22 -6
  1018. package/dist/src/backend/services/workspace/service/worktree/git-clone.service.js.map +1 -0
  1019. package/dist/src/backend/services/workspace/service/worktree/git-clone.service.test.d.ts.map +1 -0
  1020. package/dist/src/backend/services/{git-clone.service.test.js → workspace/service/worktree/git-clone.service.test.js} +82 -2
  1021. package/dist/src/backend/services/workspace/service/worktree/git-clone.service.test.js.map +1 -0
  1022. package/dist/src/backend/services/{git-ops.service.d.ts → workspace/service/worktree/git-ops.service.d.ts} +3 -4
  1023. package/dist/src/backend/services/workspace/service/worktree/git-ops.service.d.ts.map +1 -0
  1024. package/dist/src/backend/services/{git-ops.service.js → workspace/service/worktree/git-ops.service.js} +61 -34
  1025. package/dist/src/backend/services/workspace/service/worktree/git-ops.service.js.map +1 -0
  1026. package/dist/src/backend/services/workspace/service/worktree/git-ops.service.test.d.ts.map +1 -0
  1027. package/dist/src/backend/services/workspace/service/worktree/git-ops.service.test.js +227 -0
  1028. package/dist/src/backend/services/workspace/service/worktree/git-ops.service.test.js.map +1 -0
  1029. package/dist/src/backend/services/workspace/service/worktree/worktree-init.test.js +28 -20
  1030. package/dist/src/backend/services/workspace/service/worktree/worktree-init.test.js.map +1 -1
  1031. package/dist/src/backend/services/workspace/service/worktree/worktree-lifecycle.service.d.ts +1 -1
  1032. package/dist/src/backend/services/workspace/service/worktree/worktree-lifecycle.service.d.ts.map +1 -1
  1033. package/dist/src/backend/services/workspace/service/worktree/worktree-lifecycle.service.js +43 -6
  1034. package/dist/src/backend/services/workspace/service/worktree/worktree-lifecycle.service.js.map +1 -1
  1035. package/dist/src/backend/services/workspace/service/worktree/worktree-lifecycle.service.test.js +122 -7
  1036. package/dist/src/backend/services/workspace/service/worktree/worktree-lifecycle.service.test.js.map +1 -1
  1037. package/dist/src/backend/services/workspace/types.d.ts +32 -0
  1038. package/dist/src/backend/services/workspace/types.d.ts.map +1 -0
  1039. package/dist/src/backend/services/workspace/types.js +2 -0
  1040. package/dist/src/backend/services/workspace/types.js.map +1 -0
  1041. package/dist/src/backend/services/workspace-git-state.service.d.ts +99 -0
  1042. package/dist/src/backend/services/workspace-git-state.service.d.ts.map +1 -0
  1043. package/dist/src/backend/services/workspace-git-state.service.js +393 -0
  1044. package/dist/src/backend/services/workspace-git-state.service.js.map +1 -0
  1045. package/dist/src/backend/services/workspace-git-state.service.test.d.ts +2 -0
  1046. package/dist/src/backend/services/workspace-git-state.service.test.d.ts.map +1 -0
  1047. package/dist/src/backend/services/workspace-git-state.service.test.js +476 -0
  1048. package/dist/src/backend/services/workspace-git-state.service.test.js.map +1 -0
  1049. package/dist/src/backend/testing/typescript-import-test-utils.d.ts +11 -0
  1050. package/dist/src/backend/testing/typescript-import-test-utils.d.ts.map +1 -0
  1051. package/dist/src/backend/testing/typescript-import-test-utils.js +47 -0
  1052. package/dist/src/backend/testing/typescript-import-test-utils.js.map +1 -0
  1053. package/dist/src/backend/trpc/admin.router.test.js +18 -26
  1054. package/dist/src/backend/trpc/admin.router.test.js.map +1 -1
  1055. package/dist/src/backend/trpc/admin.trpc.d.ts +5 -3
  1056. package/dist/src/backend/trpc/admin.trpc.d.ts.map +1 -1
  1057. package/dist/src/backend/trpc/admin.trpc.js +11 -15
  1058. package/dist/src/backend/trpc/admin.trpc.js.map +1 -1
  1059. package/dist/src/backend/trpc/application-error-mapper.d.ts +4 -0
  1060. package/dist/src/backend/trpc/application-error-mapper.d.ts.map +1 -0
  1061. package/dist/src/backend/trpc/application-error-mapper.js +16 -0
  1062. package/dist/src/backend/trpc/application-error-mapper.js.map +1 -0
  1063. package/dist/src/backend/trpc/application-error-mapper.test.d.ts +2 -0
  1064. package/dist/src/backend/trpc/application-error-mapper.test.d.ts.map +1 -0
  1065. package/dist/src/backend/trpc/application-error-mapper.test.js +23 -0
  1066. package/dist/src/backend/trpc/application-error-mapper.test.js.map +1 -0
  1067. package/dist/src/backend/trpc/auto-iteration.trpc.d.ts +1 -1
  1068. package/dist/src/backend/trpc/auto-iteration.trpc.d.ts.map +1 -1
  1069. package/dist/src/backend/trpc/auto-iteration.trpc.js +20 -12
  1070. package/dist/src/backend/trpc/auto-iteration.trpc.js.map +1 -1
  1071. package/dist/src/backend/trpc/auto-iteration.trpc.test.js +10 -9
  1072. package/dist/src/backend/trpc/auto-iteration.trpc.test.js.map +1 -1
  1073. package/dist/src/backend/trpc/closed-sessions.router.test.js +3 -4
  1074. package/dist/src/backend/trpc/closed-sessions.router.test.js.map +1 -1
  1075. package/dist/src/backend/trpc/closed-sessions.trpc.d.ts +5 -5
  1076. package/dist/src/backend/trpc/closed-sessions.trpc.d.ts.map +1 -1
  1077. package/dist/src/backend/trpc/closed-sessions.trpc.js +8 -4
  1078. package/dist/src/backend/trpc/closed-sessions.trpc.js.map +1 -1
  1079. package/dist/src/backend/trpc/context-dependencies.test.d.ts +2 -0
  1080. package/dist/src/backend/trpc/context-dependencies.test.d.ts.map +1 -0
  1081. package/dist/src/backend/trpc/context-dependencies.test.js +134 -0
  1082. package/dist/src/backend/trpc/context-dependencies.test.js.map +1 -0
  1083. package/dist/src/backend/trpc/decision-log.router.test.js +11 -8
  1084. package/dist/src/backend/trpc/decision-log.router.test.js.map +1 -1
  1085. package/dist/src/backend/trpc/decision-log.trpc.d.ts +3 -3
  1086. package/dist/src/backend/trpc/decision-log.trpc.d.ts.map +1 -1
  1087. package/dist/src/backend/trpc/decision-log.trpc.js +6 -7
  1088. package/dist/src/backend/trpc/decision-log.trpc.js.map +1 -1
  1089. package/dist/src/backend/trpc/github.router.test.js +41 -6
  1090. package/dist/src/backend/trpc/github.router.test.js.map +1 -1
  1091. package/dist/src/backend/trpc/github.trpc.d.ts +6 -5
  1092. package/dist/src/backend/trpc/github.trpc.d.ts.map +1 -1
  1093. package/dist/src/backend/trpc/github.trpc.js +36 -8
  1094. package/dist/src/backend/trpc/github.trpc.js.map +1 -1
  1095. package/dist/src/backend/trpc/index.d.ts +509 -606
  1096. package/dist/src/backend/trpc/index.d.ts.map +1 -1
  1097. package/dist/src/backend/trpc/index.js +0 -1
  1098. package/dist/src/backend/trpc/index.js.map +1 -1
  1099. package/dist/src/backend/trpc/issue-filter.d.ts.map +1 -1
  1100. package/dist/src/backend/trpc/issue-filter.js.map +1 -1
  1101. package/dist/src/backend/trpc/linear.router.test.js +21 -21
  1102. package/dist/src/backend/trpc/linear.router.test.js.map +1 -1
  1103. package/dist/src/backend/trpc/linear.trpc.d.ts +4 -4
  1104. package/dist/src/backend/trpc/linear.trpc.d.ts.map +1 -1
  1105. package/dist/src/backend/trpc/linear.trpc.js +9 -10
  1106. package/dist/src/backend/trpc/linear.trpc.js.map +1 -1
  1107. package/dist/src/backend/trpc/periodic-task.trpc.d.ts +17 -17
  1108. package/dist/src/backend/trpc/periodic-task.trpc.d.ts.map +1 -1
  1109. package/dist/src/backend/trpc/periodic-task.trpc.js +17 -17
  1110. package/dist/src/backend/trpc/periodic-task.trpc.js.map +1 -1
  1111. package/dist/src/backend/trpc/project.router.test.js +135 -39
  1112. package/dist/src/backend/trpc/project.router.test.js.map +1 -1
  1113. package/dist/src/backend/trpc/project.trpc.d.ts +37 -25
  1114. package/dist/src/backend/trpc/project.trpc.d.ts.map +1 -1
  1115. package/dist/src/backend/trpc/project.trpc.js +55 -50
  1116. package/dist/src/backend/trpc/project.trpc.js.map +1 -1
  1117. package/dist/src/backend/trpc/session.router.test.js +49 -10
  1118. package/dist/src/backend/trpc/session.router.test.js.map +1 -1
  1119. package/dist/src/backend/trpc/session.trpc.d.ts +50 -392
  1120. package/dist/src/backend/trpc/session.trpc.d.ts.map +1 -1
  1121. package/dist/src/backend/trpc/session.trpc.js +48 -31
  1122. package/dist/src/backend/trpc/session.trpc.js.map +1 -1
  1123. package/dist/src/backend/trpc/trpc.d.ts +11 -4
  1124. package/dist/src/backend/trpc/trpc.d.ts.map +1 -1
  1125. package/dist/src/backend/trpc/trpc.js +50 -10
  1126. package/dist/src/backend/trpc/trpc.js.map +1 -1
  1127. package/dist/src/backend/trpc/trpc.test.d.ts +2 -0
  1128. package/dist/src/backend/trpc/trpc.test.d.ts.map +1 -0
  1129. package/dist/src/backend/trpc/trpc.test.js +76 -0
  1130. package/dist/src/backend/trpc/trpc.test.js.map +1 -0
  1131. package/dist/src/backend/trpc/user-settings.router.test.js +28 -14
  1132. package/dist/src/backend/trpc/user-settings.router.test.js.map +1 -1
  1133. package/dist/src/backend/trpc/user-settings.trpc.d.ts +6 -3
  1134. package/dist/src/backend/trpc/user-settings.trpc.d.ts.map +1 -1
  1135. package/dist/src/backend/trpc/user-settings.trpc.js +14 -14
  1136. package/dist/src/backend/trpc/user-settings.trpc.js.map +1 -1
  1137. package/dist/src/backend/trpc/workspace/children.router.test.d.ts +2 -0
  1138. package/dist/src/backend/trpc/workspace/children.router.test.d.ts.map +1 -0
  1139. package/dist/src/backend/trpc/workspace/children.router.test.js +257 -0
  1140. package/dist/src/backend/trpc/workspace/children.router.test.js.map +1 -0
  1141. package/dist/src/backend/trpc/workspace/children.trpc.d.ts +154 -0
  1142. package/dist/src/backend/trpc/workspace/children.trpc.d.ts.map +1 -0
  1143. package/dist/src/backend/trpc/workspace/children.trpc.js +163 -0
  1144. package/dist/src/backend/trpc/workspace/children.trpc.js.map +1 -0
  1145. package/dist/src/backend/trpc/workspace/composition.test.d.ts +2 -0
  1146. package/dist/src/backend/trpc/workspace/composition.test.d.ts.map +1 -0
  1147. package/dist/src/backend/trpc/workspace/composition.test.js +51 -0
  1148. package/dist/src/backend/trpc/workspace/composition.test.js.map +1 -0
  1149. package/dist/src/backend/trpc/workspace/files.router.test.js +6 -0
  1150. package/dist/src/backend/trpc/workspace/files.router.test.js.map +1 -1
  1151. package/dist/src/backend/trpc/workspace/files.trpc.d.ts.map +1 -1
  1152. package/dist/src/backend/trpc/workspace/files.trpc.js +19 -22
  1153. package/dist/src/backend/trpc/workspace/files.trpc.js.map +1 -1
  1154. package/dist/src/backend/trpc/workspace/git.router.test.js +137 -147
  1155. package/dist/src/backend/trpc/workspace/git.router.test.js.map +1 -1
  1156. package/dist/src/backend/trpc/workspace/git.trpc.d.ts +2 -2
  1157. package/dist/src/backend/trpc/workspace/git.trpc.d.ts.map +1 -1
  1158. package/dist/src/backend/trpc/workspace/git.trpc.js +53 -75
  1159. package/dist/src/backend/trpc/workspace/git.trpc.js.map +1 -1
  1160. package/dist/src/backend/trpc/workspace/ide.router.test.js +10 -9
  1161. package/dist/src/backend/trpc/workspace/ide.router.test.js.map +1 -1
  1162. package/dist/src/backend/trpc/workspace/ide.trpc.d.ts.map +1 -1
  1163. package/dist/src/backend/trpc/workspace/ide.trpc.js +4 -4
  1164. package/dist/src/backend/trpc/workspace/ide.trpc.js.map +1 -1
  1165. package/dist/src/backend/trpc/workspace/init.router.test.js +42 -43
  1166. package/dist/src/backend/trpc/workspace/init.router.test.js.map +1 -1
  1167. package/dist/src/backend/trpc/workspace/init.trpc.d.ts +25 -18
  1168. package/dist/src/backend/trpc/workspace/init.trpc.d.ts.map +1 -1
  1169. package/dist/src/backend/trpc/workspace/init.trpc.js +16 -13
  1170. package/dist/src/backend/trpc/workspace/init.trpc.js.map +1 -1
  1171. package/dist/src/backend/trpc/workspace/run-script.router.test.js +29 -11
  1172. package/dist/src/backend/trpc/workspace/run-script.router.test.js.map +1 -1
  1173. package/dist/src/backend/trpc/workspace/run-script.trpc.d.ts.map +1 -1
  1174. package/dist/src/backend/trpc/workspace/run-script.trpc.js +7 -8
  1175. package/dist/src/backend/trpc/workspace/run-script.trpc.js.map +1 -1
  1176. package/dist/src/backend/trpc/workspace/workspace-helpers.d.ts +49 -35
  1177. package/dist/src/backend/trpc/workspace/workspace-helpers.d.ts.map +1 -1
  1178. package/dist/src/backend/trpc/workspace/workspace-helpers.js +7 -8
  1179. package/dist/src/backend/trpc/workspace/workspace-helpers.js.map +1 -1
  1180. package/dist/src/backend/trpc/workspace/workspace-helpers.test.js +17 -15
  1181. package/dist/src/backend/trpc/workspace/workspace-helpers.test.js.map +1 -1
  1182. package/dist/src/backend/trpc/workspace.router.test.js +230 -80
  1183. package/dist/src/backend/trpc/workspace.router.test.js.map +1 -1
  1184. package/dist/src/backend/trpc/workspace.trpc.d.ts +1510 -162
  1185. package/dist/src/backend/trpc/workspace.trpc.d.ts.map +1 -1
  1186. package/dist/src/backend/trpc/workspace.trpc.js +64 -47
  1187. package/dist/src/backend/trpc/workspace.trpc.js.map +1 -1
  1188. package/dist/src/cli/database-path.d.ts.map +1 -1
  1189. package/dist/src/cli/database-path.js +4 -2
  1190. package/dist/src/cli/database-path.js.map +1 -1
  1191. package/dist/src/cli/database-path.test.js +10 -0
  1192. package/dist/src/cli/database-path.test.js.map +1 -1
  1193. package/dist/src/cli/serve-env.d.ts.map +1 -1
  1194. package/dist/src/cli/serve-env.js +5 -3
  1195. package/dist/src/cli/serve-env.js.map +1 -1
  1196. package/dist/src/cli/serve-env.test.js +30 -0
  1197. package/dist/src/cli/serve-env.test.js.map +1 -1
  1198. package/dist/src/shared/acp-protocol/protocol/constants.d.ts +1 -0
  1199. package/dist/src/shared/acp-protocol/protocol/constants.d.ts.map +1 -1
  1200. package/dist/src/shared/acp-protocol/protocol/constants.js +1 -0
  1201. package/dist/src/shared/acp-protocol/protocol/constants.js.map +1 -1
  1202. package/dist/src/shared/acp-protocol/protocol/index.d.ts +1 -0
  1203. package/dist/src/shared/acp-protocol/protocol/index.d.ts.map +1 -1
  1204. package/dist/src/shared/acp-protocol/protocol/index.js +1 -0
  1205. package/dist/src/shared/acp-protocol/protocol/index.js.map +1 -1
  1206. package/dist/src/shared/acp-protocol/protocol/messages.d.ts +8 -1
  1207. package/dist/src/shared/acp-protocol/protocol/messages.d.ts.map +1 -1
  1208. package/dist/src/shared/acp-protocol/protocol/messages.js +2 -0
  1209. package/dist/src/shared/acp-protocol/protocol/messages.js.map +1 -1
  1210. package/dist/src/shared/acp-protocol/protocol/renderer-window.d.ts +3 -0
  1211. package/dist/src/shared/acp-protocol/protocol/renderer-window.d.ts.map +1 -0
  1212. package/dist/src/shared/acp-protocol/protocol/renderer-window.js +37 -0
  1213. package/dist/src/shared/acp-protocol/protocol/renderer-window.js.map +1 -0
  1214. package/dist/src/shared/acp-protocol/protocol/websocket.d.ts +9 -0
  1215. package/dist/src/shared/acp-protocol/protocol/websocket.d.ts.map +1 -1
  1216. package/dist/src/shared/acp-protocol/protocol/websocket.js +1 -0
  1217. package/dist/src/shared/acp-protocol/protocol/websocket.js.map +1 -1
  1218. package/dist/src/shared/core/enums.d.ts +6 -0
  1219. package/dist/src/shared/core/enums.d.ts.map +1 -1
  1220. package/dist/src/shared/core/enums.js +5 -0
  1221. package/dist/src/shared/core/enums.js.map +1 -1
  1222. package/dist/src/shared/core/index.d.ts +2 -2
  1223. package/dist/src/shared/core/index.d.ts.map +1 -1
  1224. package/dist/src/shared/core/index.js +2 -2
  1225. package/dist/src/shared/core/index.js.map +1 -1
  1226. package/dist/src/shared/core/workspace-sidebar-status.d.ts +4 -2
  1227. package/dist/src/shared/core/workspace-sidebar-status.d.ts.map +1 -1
  1228. package/dist/src/shared/core/workspace-sidebar-status.js +11 -0
  1229. package/dist/src/shared/core/workspace-sidebar-status.js.map +1 -1
  1230. package/dist/src/shared/issue-start-prompt.d.ts.map +1 -1
  1231. package/dist/src/shared/issue-start-prompt.js +38 -3
  1232. package/dist/src/shared/issue-start-prompt.js.map +1 -1
  1233. package/dist/src/shared/proxy-utils.d.ts +2 -0
  1234. package/dist/src/shared/proxy-utils.d.ts.map +1 -1
  1235. package/dist/src/shared/proxy-utils.js +20 -2
  1236. package/dist/src/shared/proxy-utils.js.map +1 -1
  1237. package/dist/src/shared/schemas/export-data.schema.d.ts +10 -0
  1238. package/dist/src/shared/schemas/export-data.schema.d.ts.map +1 -1
  1239. package/dist/src/shared/schemas/export-data.schema.js +3 -1
  1240. package/dist/src/shared/schemas/export-data.schema.js.map +1 -1
  1241. package/dist/src/shared/session-runtime.d.ts +15 -3
  1242. package/dist/src/shared/session-runtime.d.ts.map +1 -1
  1243. package/dist/src/shared/session-runtime.js +33 -0
  1244. package/dist/src/shared/session-runtime.js.map +1 -1
  1245. package/dist/src/shared/workspace-flow-state.d.ts +4 -2
  1246. package/dist/src/shared/workspace-flow-state.d.ts.map +1 -1
  1247. package/dist/src/shared/workspace-flow-state.js +16 -1
  1248. package/dist/src/shared/workspace-flow-state.js.map +1 -1
  1249. package/dist/src/shared/workspace-notifications.d.ts +10 -0
  1250. package/dist/src/shared/workspace-notifications.d.ts.map +1 -0
  1251. package/dist/src/shared/workspace-notifications.js +11 -0
  1252. package/dist/src/shared/workspace-notifications.js.map +1 -0
  1253. package/dist/src/shared/workspace-snapshot.d.ts +1020 -0
  1254. package/dist/src/shared/workspace-snapshot.d.ts.map +1 -0
  1255. package/dist/src/shared/workspace-snapshot.js +113 -0
  1256. package/dist/src/shared/workspace-snapshot.js.map +1 -0
  1257. package/dist/src/shared/workspace-status-reason.d.ts +6 -3
  1258. package/dist/src/shared/workspace-status-reason.d.ts.map +1 -1
  1259. package/dist/src/shared/workspace-status-reason.js +35 -0
  1260. package/dist/src/shared/workspace-status-reason.js.map +1 -1
  1261. package/dist/src/test-utils/application-graph.d.ts +69 -0
  1262. package/dist/src/test-utils/application-graph.d.ts.map +1 -0
  1263. package/dist/src/test-utils/application-graph.js +353 -0
  1264. package/dist/src/test-utils/application-graph.js.map +1 -0
  1265. package/dist/tsconfig.backend.tsbuildinfo +1 -1
  1266. package/package.json +5 -8
  1267. package/prisma/migrations/20260622135020_add_child_workspaces/migration.sql +99 -0
  1268. package/prisma/migrations/20260622135100_add_child_workspaces/migration.sql +39 -0
  1269. package/prisma/migrations/20260622195338_add_notification_direction/migration.sql +22 -0
  1270. package/prisma/migrations/20260622220000_add_parent_workspace_id_index/migration.sql +2 -0
  1271. package/prisma/migrations/20260715201522_add_ratchet_dispatch_record/migration.sql +125 -0
  1272. package/prisma/migrations/20260717150000_add_pr_discovery_schedule/migration.sql +8 -0
  1273. package/prisma/migrations/20260717160000_add_ratchet_review_trigger_mode/migration.sql +2 -0
  1274. package/prisma/schema.prisma +55 -1
  1275. package/prompts/ratchet/dispatch.md +2 -0
  1276. package/dist/client/assets/channel-DTP0LAbj.js +0 -1
  1277. package/dist/client/assets/chunk-2J33WTMH-BfBptE9H.js +0 -1
  1278. package/dist/client/assets/classDiagram-4FO5ZUOK-Ctn2iFx-.js +0 -1
  1279. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-Ctn2iFx-.js +0 -1
  1280. package/dist/client/assets/index-QJUv8N-T.js +0 -662
  1281. package/dist/client/assets/index-z2dDRh55.css +0 -1
  1282. package/dist/client/assets/infoDiagram-5YYISTIA-EcbEZrdJ.js +0 -2
  1283. package/dist/client/assets/stateDiagram-AJRCARHV-JRGDQ0Z0.js +0 -1
  1284. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-YFRSfKcY.js +0 -1
  1285. package/dist/src/backend/clients/index.d.ts +0 -2
  1286. package/dist/src/backend/clients/index.d.ts.map +0 -1
  1287. package/dist/src/backend/clients/index.js +0 -2
  1288. package/dist/src/backend/clients/index.js.map +0 -1
  1289. package/dist/src/backend/orchestration/decision-log-query.service.d.ts.map +0 -1
  1290. package/dist/src/backend/orchestration/decision-log-query.service.js.map +0 -1
  1291. package/dist/src/backend/orchestration/decision-log-query.service.test.d.ts +0 -2
  1292. package/dist/src/backend/orchestration/decision-log-query.service.test.d.ts.map +0 -1
  1293. package/dist/src/backend/orchestration/decision-log-query.service.test.js +0 -44
  1294. package/dist/src/backend/orchestration/decision-log-query.service.test.js.map +0 -1
  1295. package/dist/src/backend/services/factory-config.service.d.ts.map +0 -1
  1296. package/dist/src/backend/services/factory-config.service.js.map +0 -1
  1297. package/dist/src/backend/services/factory-config.service.test.d.ts.map +0 -1
  1298. package/dist/src/backend/services/factory-config.service.test.js.map +0 -1
  1299. package/dist/src/backend/services/git-clone.service.d.ts.map +0 -1
  1300. package/dist/src/backend/services/git-clone.service.js.map +0 -1
  1301. package/dist/src/backend/services/git-clone.service.test.d.ts.map +0 -1
  1302. package/dist/src/backend/services/git-clone.service.test.js.map +0 -1
  1303. package/dist/src/backend/services/git-ops.service.d.ts.map +0 -1
  1304. package/dist/src/backend/services/git-ops.service.js.map +0 -1
  1305. package/dist/src/backend/services/git-ops.service.test.d.ts.map +0 -1
  1306. package/dist/src/backend/services/git-ops.service.test.js +0 -133
  1307. package/dist/src/backend/services/git-ops.service.test.js.map +0 -1
  1308. package/dist/src/backend/services/port-allocation.service.d.ts.map +0 -1
  1309. package/dist/src/backend/services/port-allocation.service.js.map +0 -1
  1310. package/dist/src/backend/services/ratchet/service/ratchet-review-poll.helpers.d.ts +0 -16
  1311. package/dist/src/backend/services/ratchet/service/ratchet-review-poll.helpers.d.ts.map +0 -1
  1312. package/dist/src/backend/services/ratchet/service/ratchet-review-poll.helpers.js +0 -52
  1313. package/dist/src/backend/services/ratchet/service/ratchet-review-poll.helpers.js.map +0 -1
  1314. package/dist/src/backend/services/ratchet/service/reconciliation.service.d.ts +0 -21
  1315. package/dist/src/backend/services/ratchet/service/reconciliation.service.d.ts.map +0 -1
  1316. package/dist/src/backend/services/ratchet/service/reconciliation.service.js.map +0 -1
  1317. package/dist/src/backend/services/ratchet/service/reconciliation.service.test.d.ts.map +0 -1
  1318. package/dist/src/backend/services/ratchet/service/reconciliation.service.test.js.map +0 -1
  1319. package/dist/src/backend/services/run-script-config-persistence.service.d.ts.map +0 -1
  1320. package/dist/src/backend/services/run-script-config-persistence.service.js.map +0 -1
  1321. package/dist/src/backend/services/run-script-config-persistence.service.test.d.ts.map +0 -1
  1322. package/dist/src/backend/services/run-script-config-persistence.service.test.js.map +0 -1
  1323. package/dist/src/backend/services/run-script-proxy.service.d.ts.map +0 -1
  1324. package/dist/src/backend/services/run-script-proxy.service.js.map +0 -1
  1325. package/dist/src/backend/services/run-script-proxy.service.test.d.ts.map +0 -1
  1326. package/dist/src/backend/services/run-script-proxy.service.test.js.map +0 -1
  1327. package/dist/src/backend/services/session/service/chat/chat-connection.service.d.ts +0 -19
  1328. package/dist/src/backend/services/session/service/chat/chat-connection.service.d.ts.map +0 -1
  1329. package/dist/src/backend/services/session/service/chat/chat-connection.service.js +0 -78
  1330. package/dist/src/backend/services/session/service/chat/chat-connection.service.js.map +0 -1
  1331. package/dist/src/backend/services/session/service/chat/chat-connection.service.test.d.ts +0 -2
  1332. package/dist/src/backend/services/session/service/chat/chat-connection.service.test.d.ts.map +0 -1
  1333. package/dist/src/backend/services/session/service/chat/chat-connection.service.test.js +0 -214
  1334. package/dist/src/backend/services/session/service/chat/chat-connection.service.test.js.map +0 -1
  1335. package/dist/src/backend/services/workspace/service/query/user-settings-query.service.d.ts +0 -24
  1336. package/dist/src/backend/services/workspace/service/query/user-settings-query.service.d.ts.map +0 -1
  1337. package/dist/src/backend/services/workspace/service/query/user-settings-query.service.js +0 -17
  1338. package/dist/src/backend/services/workspace/service/query/user-settings-query.service.js.map +0 -1
  1339. package/dist/src/backend/services/workspace-snapshot-store.service.d.ts.map +0 -1
  1340. package/dist/src/backend/services/workspace-snapshot-store.service.js.map +0 -1
  1341. package/dist/src/backend/services/workspace-snapshot-store.service.test.d.ts.map +0 -1
  1342. package/dist/src/backend/services/workspace-snapshot-store.service.test.js.map +0 -1
  1343. package/dist/src/backend/trpc/procedures/index.d.ts +0 -2
  1344. package/dist/src/backend/trpc/procedures/index.d.ts.map +0 -1
  1345. package/dist/src/backend/trpc/procedures/index.js +0 -2
  1346. package/dist/src/backend/trpc/procedures/index.js.map +0 -1
  1347. package/dist/src/backend/trpc/procedures/project-scoped.d.ts +0 -6
  1348. package/dist/src/backend/trpc/procedures/project-scoped.d.ts.map +0 -1
  1349. package/dist/src/backend/trpc/procedures/project-scoped.js +0 -18
  1350. package/dist/src/backend/trpc/procedures/project-scoped.js.map +0 -1
  1351. package/dist/src/backend/trpc/procedures/project-scoped.test.d.ts +0 -2
  1352. package/dist/src/backend/trpc/procedures/project-scoped.test.d.ts.map +0 -1
  1353. package/dist/src/backend/trpc/procedures/project-scoped.test.js +0 -17
  1354. package/dist/src/backend/trpc/procedures/project-scoped.test.js.map +0 -1
  1355. /package/dist/src/backend/{services/ratchet/service → orchestration}/reconciliation.service.test.d.ts +0 -0
  1356. /package/dist/src/backend/services/{factory-config.service.test.d.ts → run-script/service/factory-config.service.test.d.ts} +0 -0
  1357. /package/dist/src/backend/services/{run-script-config-persistence.service.test.d.ts → run-script/service/run-script-config-persistence.service.test.d.ts} +0 -0
  1358. /package/dist/src/backend/services/{run-script-proxy.service.d.ts → run-script/service/run-script-proxy.service.d.ts} +0 -0
  1359. /package/dist/src/backend/services/{run-script-proxy.service.test.d.ts → run-script/service/run-script-proxy.service.test.d.ts} +0 -0
  1360. /package/dist/src/backend/services/{workspace-snapshot-store.service.test.d.ts → workspace/service/snapshot/workspace-snapshot-store.service.test.d.ts} +0 -0
  1361. /package/dist/src/backend/services/{git-clone.service.d.ts → workspace/service/worktree/git-clone.service.d.ts} +0 -0
  1362. /package/dist/src/backend/services/{git-clone.service.test.d.ts → workspace/service/worktree/git-clone.service.test.d.ts} +0 -0
  1363. /package/dist/src/backend/services/{git-ops.service.test.d.ts → workspace/service/worktree/git-ops.service.test.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import{bp as Ze,_ as dt,a3 as ke,aj as qe,v as Se,q as Qe,p as Je,M as Ke,N as je,o as _e,s as tr,V as er,a0 as rr,Z as ir,a1 as ar,t as Ee,b7 as me,bq as pe,z as nr,u as or,T as sr,br as hr,bs as lr}from"./index-QJUv8N-T.js";import{p as fr}from"./chunk-4BX2VUAB-DohmszzB.js";import{p as cr}from"./wardley-L42UT6IY-_NZpI_YF.js";import{c as Fe}from"./cytoscape.esm-DkOyvmE4.js";var he={exports:{}},le={exports:{}},fe={exports:{}},gr=fe.exports,Me;function ur(){return Me||(Me=1,(function(I,O){(function(G,N){I.exports=N()})(gr,function(){return(function(A){var G={};function N(g){if(G[g])return G[g].exports;var h=G[g]={i:g,l:!1,exports:{}};return A[g].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=G,N.i=function(g){return g},N.d=function(g,h,a){N.o(g,h)||Object.defineProperty(g,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(g){var h=g&&g.__esModule?function(){return g.default}:function(){return g};return N.d(h,"a",h),h},N.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)},N.p="",N(N.s=28)})([(function(A,G,N){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,A.exports=g}),(function(A,G,N){var g=N(2),h=N(8),a=N(9);function e(f,r,d){g.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(g.prototype);for(var i in g)e[i]=g[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var d=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(d.getOwner()==r)return d;if(d.getOwner()==t)break;d=d.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=e}),(function(A,G,N){function g(h){this.vGraphObject=h}A.exports=g}),(function(A,G,N){var g=N(2),h=N(10),a=N(13),e=N(0),i=N(16),f=N(5);function r(t,s,o,c){o==null&&c==null&&(c=s),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(g.prototype);for(var d in g)r[d]=g[d];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},r.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},r.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},r.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.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)},r.prototype.scatter=function(){var t,s,o=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+i.nextDouble()*(c-o)+o;var l=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_Y+i.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=r}),(function(A,G,N){var g=N(0);function h(){}for(var a in g)h[a]=g[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,G,N){function g(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(h){this.x=h},g.prototype.setY=function(h){this.y=h},g.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=g}),(function(A,G,N){var g=N(2),h=N(10),a=N(0),e=N(7),i=N(3),f=N(1),r=N(13),d=N(12),t=N(11);function s(c,l,T){g.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(g.prototype);for(var o in g)s[o]=g[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;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 v=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(v.source=l,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),l.edges.push(v),T!=l&&T.edges.push(v),v)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,v=T.length,L=0;L<v;L++)u=T[L],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var P=this.nodes.indexOf(l);if(P==-1)throw"Node not in owner node list!";this.nodes.splice(P,1)}else if(c instanceof f){var u=c;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 C=u.source.edges.indexOf(u),F=u.target.edges.indexOf(u);if(!(C>-1&&F>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(C,1),u.target!=u.source&&u.target.edges.splice(F,1);var P=u.source.owner.getEdges().indexOf(u);if(P==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(P,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,u,v,L=this.getNodes(),P=L.length,C=0;C<P;C++){var F=L[C];T=F.getTop(),u=F.getLeft(),c>T&&(c=T),l>u&&(l=u)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=l-v,this.top=c-v,new d(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,u=h.MAX_VALUE,v=-h.MAX_VALUE,L,P,C,F,V,X=this.nodes,k=X.length,D=0;D<k;D++){var _=X[D];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),P=_.getRight(),C=_.getTop(),F=_.getBottom(),l>L&&(l=L),T<P&&(T=P),u>C&&(u=C),v<F&&(v=F)}var n=new r(l,u,T-l,v-u);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),X[0].getParent().paddingLeft!=null?V=X[0].getParent().paddingLeft:V=this.margin,this.left=n.x-V,this.right=n.x+n.width+V,this.top=n.y-V,this.bottom=n.y+n.height+V},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,u=h.MAX_VALUE,v=-h.MAX_VALUE,L,P,C,F,V=c.length,X=0;X<V;X++){var k=c[X];L=k.getLeft(),P=k.getRight(),C=k.getTop(),F=k.getBottom(),l>L&&(l=L),T<P&&(T=P),u>C&&(u=C),v<F&&(v=F)}var D=new r(l,u,T-l,v-u);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,u=0;u<T;u++){var v=l[u];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,u=this.nodes[0],v,L,P=u.withChildren();for(P.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){u=l.shift(),v=u.getEdges();for(var C=v.length,F=0;F<C;F++){var V=v[F];if(L=V.getOtherEndInGraph(u,this),L!=null&&!T.has(L)){var X=L.withChildren();X.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var k=0;T.forEach(function(D){D.owner==c&&k++}),k==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var g,h=N(1);function a(e){g=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,d){if(f==null&&r==null&&d==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{d=f,r=i,f=e;var t=r.getOwner(),s=d.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,d);if(f.isInterGraph=!0,f.source=r,f.target=d,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof g){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,d=f.length,t=0;t<d;t++)r=f[t],i.remove(r);var s=[];s=s.concat(i.getNodes());var o;d=s.length;for(var t=0;t<d;t++)o=s[t],i.remove(o);i==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(i);this.graphs.splice(c,1),i.parent=null}else if(e instanceof h){if(r=e,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var c=r.source.edges.indexOf(r);if(r.source.edges.splice(c,1),c=r.target.edges.indexOf(r),r.target.edges.splice(c,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var c=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],i=this.getGraphs(),f=i.length,r=0;r<f;r++)e=e.concat(i[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)e=e.concat(i[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,i){if(!(e!=null&&i!=null))throw"assert failed";if(e==i)return!0;var f=e.getOwner(),r;do{if(r=f.getParent(),r==null)break;if(r==i)return!0;if(f=r.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(r=f.getParent(),r==null)break;if(r==e)return!0;if(f=r.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,i,f,r,d,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(e=t[o],i=e.source,f=e.target,e.lca=null,e.sourceInLca=i,e.targetInLca=f,i==f){e.lca=i.getOwner();continue}for(r=i.getOwner();e.lca==null;){for(e.targetInLca=f,d=f.getOwner();e.lca==null;){if(d==r){e.lca=d;break}if(d==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=d.getParent(),d=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca==null&&(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,i){if(e==i)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var r=i.getOwner();do{if(r==null)break;if(r==f)return r;r=r.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(e,i){e==null&&i==null&&(e=this.rootGraph,i=1);for(var f,r=e.getNodes(),d=r.length,t=0;t<d;t++)f=r[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},a.prototype.includesInvalidEdge=function(){for(var e,i=[],f=this.edges.length,r=0;r<f;r++)e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target)&&i.push(e);for(var r=0;r<i.length;r++)this.remove(i[r]);return!1},A.exports=a}),(function(A,G,N){var g=N(12);function h(){}h.calcSeparationAmount=function(a,e,i,f){if(!a.intersects(e))throw"assert failed";var r=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,r),i[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),i[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var d=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(d=1);var t=d*i[0],s=i[1]/d;i[0]<s?s=i[0]:t=i[1],i[0]=-1*r[0]*(s/2+f),i[1]=-1*r[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(a,e,i){a.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,a.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},h.getIntersection2=function(a,e,i){var f=a.getCenterX(),r=a.getCenterY(),d=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return i[0]=f,i[1]=r,i[2]=d,i[3]=t,!0;var s=a.getX(),o=a.getY(),c=a.getRight(),l=a.getX(),T=a.getBottom(),u=a.getRight(),v=a.getWidthHalf(),L=a.getHeightHalf(),P=e.getX(),C=e.getY(),F=e.getRight(),V=e.getX(),X=e.getBottom(),k=e.getRight(),D=e.getWidthHalf(),_=e.getHeightHalf(),n=!1,m=!1;if(f===d){if(r>t)return i[0]=f,i[1]=o,i[2]=d,i[3]=X,!1;if(r<t)return i[0]=f,i[1]=T,i[2]=d,i[3]=C,!1}else if(r===t){if(f>d)return i[0]=s,i[1]=r,i[2]=F,i[3]=t,!1;if(f<d)return i[0]=c,i[1]=r,i[2]=P,i[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-r)/(d-f),R=void 0,w=void 0,S=void 0,W=void 0,x=void 0,Q=void 0;if(-p===y?f>d?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>d?(i[0]=s,i[1]=o,n=!0):(i[0]=u,i[1]=T,n=!0)),-E===y?d>f?(i[2]=V,i[3]=X,m=!0):(i[2]=F,i[3]=C,m=!0):E===y&&(d>f?(i[2]=P,i[3]=C,m=!0):(i[2]=k,i[3]=X,m=!0)),n&&m)return!1;if(f>d?r>t?(R=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(R=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):r>t?(R=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(R=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(R){case 1:W=o,S=f+-L/y,i[0]=S,i[1]=W;break;case 2:S=u,W=r+v*y,i[0]=S,i[1]=W;break;case 3:W=T,S=f+L/y,i[0]=S,i[1]=W;break;case 4:S=l,W=r+-v*y,i[0]=S,i[1]=W;break}if(!m)switch(w){case 1:Q=C,x=d+-_/y,i[2]=x,i[3]=Q;break;case 2:x=k,Q=t+D*y,i[2]=x,i[3]=Q;break;case 3:Q=X,x=d+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-D*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,d=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,u=void 0,v=void 0,L=void 0,P=void 0,C=void 0,F=void 0,V=void 0,X=void 0,k=void 0;return L=s-d,C=r-t,V=t*d-r*s,P=T-c,F=o-l,X=l*c-o*T,k=L*F-P*C,k===0?null:(u=(C*X-F*V)/k,v=(P*V-L*X)/k,new g(u,v))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i<a?r+=Math.PI:f<e&&(r+=this.TWO_PI)):f<e?r=this.ONE_AND_HALF_PI:r=this.HALF_PI,r},h.doIntersect=function(a,e,i,f){var r=a.x,d=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,u=(t-r)*(T-c)-(l-o)*(s-d);if(u===0)return!1;var v=((T-c)*(l-r)+(o-l)*(T-d))/u,L=((d-s)*(l-r)+(t-r)*(T-d))/u;return 0<v&&v<1&&0<L&&L<1},h.findCircleLineIntersections=function(a,e,i,f,r,d,t){var s=(i-a)*(i-a)+(f-e)*(f-e),o=2*((a-r)*(i-a)+(e-d)*(f-e)),c=(a-r)*(a-r)+(e-d)*(e-d)-t*t,l=o*o-4*s*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),u=(-o-Math.sqrt(o*o-4*s*c))/(2*s),v=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:v}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,G,N){function g(){}g.sign=function(h){return h>0?1:h<0?-1:0},g.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},g.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=g}),(function(A,G,N){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,A.exports=g}),(function(A,G,N){var g=(function(){function r(d,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}return function(d,t,s){return t&&r(d.prototype,t),s&&r(d,s),d}})();function h(r,d){if(!(r instanceof d))throw new TypeError("Cannot call a class as a function")}var a=function(d){return{value:d,next:null,prev:null}},e=function(d,t,s,o){return d!==null?d.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=d,t.next=s,o.length++,t},i=function(d,t){var s=d.prev,o=d.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,d.prev=d.next=null,t.length--,d},f=(function(){function r(d){var t=this;h(this,r),this.length=0,this.head=null,this.tail=null,d?.forEach(function(s){return t.push(s)})}return g(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return e(s.prev,a(t),s,this)}},{key:"insertAfter",value:function(t,s){return e(s,a(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return e(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return e(s,t,s.next,this)}},{key:"push",value:function(t){return e(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return e(null,a(t),this.head,this)}},{key:"remove",value:function(t){return i(t,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),r})();A.exports=f}),(function(A,G,N){function g(h,a,e){this.x=null,this.y=null,h==null&&a==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof a=="number"&&e==null?(this.x=h,this.y=a):h.constructor.name=="Point"&&a==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.getLocation=function(){return new g(this.x,this.y)},g.prototype.setLocation=function(h,a,e){h.constructor.name=="Point"&&a==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof a=="number"&&e==null&&(parseInt(h)==h&&parseInt(a)==a?this.move(h,a):(this.x=Math.floor(h+.5),this.y=Math.floor(a+.5)))},g.prototype.move=function(h,a){this.x=h,this.y=a},g.prototype.translate=function(h,a){this.x+=h,this.y+=a},g.prototype.equals=function(h){if(h.constructor.name=="Point"){var a=h;return this.x==a.x&&this.y==a.y}return this==h},g.prototype.toString=function(){return new g().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=g}),(function(A,G,N){function g(h,a,e,i){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&a!=null&&e!=null&&i!=null&&(this.x=h,this.y=a,this.width=e,this.height=i)}g.prototype.getX=function(){return this.x},g.prototype.setX=function(h){this.x=h},g.prototype.getY=function(){return this.y},g.prototype.setY=function(h){this.y=h},g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(h){this.width=h},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(h){this.height=h},g.prototype.getRight=function(){return this.x+this.width},g.prototype.getBottom=function(){return this.y+this.height},g.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},g.prototype.getCenterX=function(){return this.x+this.width/2},g.prototype.getMinX=function(){return this.getX()},g.prototype.getMaxX=function(){return this.getX()+this.width},g.prototype.getCenterY=function(){return this.y+this.height/2},g.prototype.getMinY=function(){return this.getY()},g.prototype.getMaxY=function(){return this.getY()+this.height},g.prototype.getWidthHalf=function(){return this.width/2},g.prototype.getHeightHalf=function(){return this.height/2},A.exports=g}),(function(A,G,N){var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function h(){}h.lastID=0,h.createID=function(a){return h.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=h.getString(),h.lastID++),a.uniqueID)},h.getString=function(a){return a==null&&(a=h.lastID),"Object#"+a},h.isPrimitive=function(a){var e=typeof a>"u"?"undefined":g(a);return a==null||e!="object"&&e!="function"},A.exports=h}),(function(A,G,N){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=N(0),a=N(7),e=N(3),i=N(1),f=N(6),r=N(5),d=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new a(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new e(this.graphManager,o)},s.prototype.newEdge=function(o){return new i(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof e){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var u=c.vGraphObject;u.update(c)}}else if(o instanceof i){var v=o;if(v.vGraphObject!=null){var L=v.vGraphObject;L.update(v)}}else if(o instanceof f){var P=o;if(P.vGraphObject!=null){var C=P.vGraphObject;C.update(P)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new r(0,0));else{var c=new d,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),u,v=0;v<T.length;v++)u=T[v],u.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),u=0;u<T.length;u++)c=T[u],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,u=0;u<l.length;u++)l[u].getChild()!=null&&(T=!1);if(!T)return o;var v=new Set,L=[],P=new Map,C=[];for(C=C.concat(l);C.length>0&&c;){for(L.push(C[0]);L.length>0&&c;){var F=L[0];L.splice(0,1),v.add(F);for(var V=F.getEdges(),u=0;u<V.length;u++){var X=V[u].getOtherEnd(F);if(P.get(F)!=X)if(!v.has(X))L.push(X),P.set(X,F);else{c=!1;break}}}if(!c)o=[];else{var k=[].concat(g(v));o.push(k);for(var u=0;u<k.length;u++){var D=k[u],_=C.indexOf(D);_>-1&&C.splice(_,1)}v=new Set,P=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u<o.bendpoints.length;u++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var L=this.newEdge(null);this.graphManager.add(L,l,v),c.add(v),l=v}var L=this.newEdge(null);return this.graphManager.add(L,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(g(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),u=0;u<T.length;u++){var v=T[u],L=new r(v.getCenterX(),v.getCenterY()),P=l.bendpoints.get(u);P.x=L.x,P.y=L.y,v.getOwner().remove(v)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var u=c;if(o<=50){var v=c/l;u-=(c-v)/50*(50-o)}else{var L=c*T;u+=(L-c)/50*(o-50)}return u}else{var P,C;return o<=50?(P=9*c/500,C=c/10):(P=9*c/50,C=-8*c),P*o+C}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,u=!1,v=null;(c.length==1||c.length==2)&&(u=!0,v=c[0]);for(var L=0;L<c.length;L++){var P=c[L],C=P.getNeighborsList().size;T.set(P,P.getNeighborsList().size),C==1&&l.push(P)}var F=[];for(F=F.concat(l);!u;){var V=[];V=V.concat(F),F=[];for(var L=0;L<c.length;L++){var P=c[L],X=c.indexOf(P);X>=0&&c.splice(X,1);var k=P.getNeighborsList();k.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&F.push(n),T.set(n,p)}})}l=l.concat(F),(c.length==1||c.length==2)&&(u=!0,v=c[0])}return v},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},A.exports=g}),(function(A,G,N){var g=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new g(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},A.exports=h}),(function(A,G,N){function g(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=N(15),a=N(4),e=N(0),i=N(8),f=N(9);function r(){h.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}r.prototype=Object.create(h.prototype);for(var d in h)r[d]=h[d];r.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,u,v=this.getGraphManager().getAllEdges(),L=0;L<v.length;L++)t=v[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),u=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+u-2*e.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},r.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},r.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,u=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;o<u.length;o++)l=u[o],this.calculateRepulsionForceOfANode(l,v,t,s),v.add(l);else for(o=0;o<u.length;o++)for(l=u[o],c=o+1;c<u.length;c++)T=u[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},r.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},r.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},r.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,u,v;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),u=T*(t.lengthX/l),v=T*(t.lengthY/l),o.springForceX+=u,o.springForceY+=v,c.springForceX-=u,c.springForceY-=v)},r.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),u,v,L,P,C,F,V;if(o.intersects(c)){i.calcSeparationAmount(o,c,l,a.DEFAULT_EDGE_LENGTH/2),F=2*l[0],V=2*l[1];var X=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=X*F,t.repulsionForceY-=X*V,s.repulsionForceX+=X*F,s.repulsionForceY+=X*V}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(u=c.getCenterX()-o.getCenterX(),v=c.getCenterY()-o.getCenterY()):(i.getIntersection(o,c,T),u=T[2]-T[0],v=T[3]-T[1]),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=f.sign(u)*a.MIN_REPULSION_DIST),Math.abs(v)<a.MIN_REPULSION_DIST&&(v=f.sign(v)*a.MIN_REPULSION_DIST),L=u*u+v*v,P=Math.sqrt(L),C=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,F=C*u/P,V=C*v/P,t.repulsionForceX-=F,t.repulsionForceY-=V,s.repulsionForceX+=F,s.repulsionForceY+=V},r.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,u,v,L;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,u=Math.abs(l)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(u>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},r.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},r.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},r.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},r.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,u=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),u=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var v=c;v<=l;v++)for(var L=T;L<=u;L++)this.grid[v][L].push(t),t.setGridCoordinates(c,l,T,u)},r.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,u=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(v<0||L<0||v>=u.length||L>=u[0].length)){for(var P=0;P<u[v][L].length;P++)if(T=u[v][L][P],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var C=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),F=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);C<=this.repulsionRange&&F<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(g(l))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},r.prototype.calcRepulsionRange=function(){return 0},A.exports=r}),(function(A,G,N){var g=N(1),h=N(4);function a(i,f,r){g.call(this,i,f,r),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(g.prototype);for(var e in g)a[e]=g[e];A.exports=a}),(function(A,G,N){var g=N(3),h=N(4);function a(i,f,r,d){g.call(this,i,f,r,d),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}a.prototype=Object.create(g.prototype);for(var e in g)a[e]=g[e];a.prototype.setGridCoordinates=function(i,f,r,d){this.startX=i,this.finishX=f,this.startY=r,this.finishY=d},A.exports=a}),(function(A,G,N){function g(h,a){this.width=0,this.height=0,h!==null&&a!==null&&(this.height=a,this.width=h)}g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(h){this.width=h},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(h){this.height=h},A.exports=g}),(function(A,G,N){var g=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(a,e){var i=g.createID(a);this.contains(i)||(this.map[i]=e,this.keys.push(a))},h.prototype.contains=function(a){return g.createID(a),this.map[a]!=null},h.prototype.get=function(a){var e=g.createID(a);return this.map[e]},h.prototype.keySet=function(){return this.keys},A.exports=h}),(function(A,G,N){var g=N(14);function h(){this.set={}}h.prototype.add=function(a){var e=g.createID(a);this.contains(e)||(this.set[e]=a)},h.prototype.remove=function(a){delete this.set[g.createID(a)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(a){return this.set[g.createID(a)]==a},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),i=e.length,f=0;f<i;f++)a.push(this.set[e[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(a){for(var e=a.length,i=0;i<e;i++){var f=a[i];this.add(f)}},A.exports=h}),(function(A,G,N){function g(){}g.multMat=function(h,a){for(var e=[],i=0;i<h.length;i++){e[i]=[];for(var f=0;f<a[0].length;f++){e[i][f]=0;for(var r=0;r<h[0].length;r++)e[i][f]+=h[i][r]*a[r][f]}}return e},g.transpose=function(h){for(var a=[],e=0;e<h[0].length;e++){a[e]=[];for(var i=0;i<h.length;i++)a[e][i]=h[i][e]}return a},g.multCons=function(h,a){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]*a;return e},g.minusOp=function(h,a){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]-a[i];return e},g.dotProduct=function(h,a){for(var e=0,i=0;i<h.length;i++)e+=h[i]*a[i];return e},g.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},g.normalize=function(h){for(var a=[],e=this.mag(h),i=0;i<h.length;i++)a[i]=h[i]/e;return a},g.multGamma=function(h){for(var a=[],e=0,i=0;i<h.length;i++)e+=h[i];e*=-1/h.length;for(var f=0;f<h.length;f++)a[f]=e+h[f];return a},g.multL=function(h,a,e){for(var i=[],f=[],r=[],d=0;d<a[0].length;d++){for(var t=0,s=0;s<a.length;s++)t+=-.5*a[s][d]*h[s];f[d]=t}for(var o=0;o<e.length;o++){for(var c=0,l=0;l<e.length;l++)c+=e[o][l]*f[l];r[o]=c}for(var T=0;T<a.length;T++){for(var u=0,v=0;v<a[0].length;v++)u+=a[T][v]*r[v];i[T]=u}return i},A.exports=g}),(function(A,G,N){var g=(function(){function i(f,r){for(var d=0;d<r.length;d++){var t=r[d];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,r,d){return r&&i(f.prototype,r),d&&i(f,d),f}})();function h(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var a=N(11),e=(function(){function i(f,r){h(this,i),(r!==null||r!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;f instanceof a?d=f.size():d=f.length,this._quicksort(f,0,d-1)}return g(i,[{key:"_quicksort",value:function(r,d,t){if(d<t){var s=this._partition(r,d,t);this._quicksort(r,d,s),this._quicksort(r,s+1,t)}}},{key:"_partition",value:function(r,d,t){for(var s=this._get(r,d),o=d,c=t;;){for(;this.compareFunction(s,this._get(r,c));)c--;for(;this.compareFunction(this._get(r,o),s);)o++;if(o<c)this._swap(r,o,c),o++,c--;else return c}}},{key:"_get",value:function(r,d){return r instanceof a?r.get_object_at(d):r[d]}},{key:"_set",value:function(r,d,t){r instanceof a?r.set_object_at(d,t):r[d]=t}},{key:"_swap",value:function(r,d,t){var s=this._get(r,d);this._set(r,d,this._get(r,t)),this._set(r,t,s)}},{key:"_defaultCompareFunction",value:function(r,d){return d>r}}]),i})();A.exports=e}),(function(A,G,N){function g(){}g.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.m,a]),this.V=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(r,d);t++){if(t<r){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=g.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<r,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var u=t;u<this.m;u++)h[u][c]+=l*h[u][t]}e[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<r))for(var v=t;v<this.m;v++)this.U[v][t]=h[v][t];if(t<d){e[t]=0;for(var L=t+1;L<this.n;L++)e[t]=g.hypot(e[t],e[L]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var P=t+1;P<this.n;P++)e[P]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var C=t+1;C<this.m;C++)i[C]=0;for(var F=t+1;F<this.n;F++)for(var V=t+1;V<this.m;V++)i[V]+=e[F]*h[V][F];for(var X=t+1;X<this.n;X++)for(var k=-e[X]/e[t+1],D=t+1;D<this.m;D++)h[D][X]+=k*i[D]}for(var _=t+1;_<this.n;_++)this.V[_][t]=e[_]}}var n=Math.min(this.n,this.m+1);r<this.n&&(this.s[r]=h[r][r]),this.m<n&&(this.s[n-1]=0),d+1<n&&(e[d]=h[d][n-1]),e[n-1]=0;{for(var m=r;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=r-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var R=0,w=E;w<this.m;w++)R+=this.U[w][E]*this.U[w][y];R=-R/this.U[E][E];for(var S=E;S<this.m;S++)this.U[S][y]+=R*this.U[S][E]}for(var W=E;W<this.m;W++)this.U[W][E]=-this.U[W][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][E]=0;this.U[E][E]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<d,e[z]!==0))for(var Y=z+1;Y<a;Y++){for(var rt=0,$=z+1;$<this.n;$++)rt+=this.V[$][z]*this.V[$][Y];rt=-rt/this.V[z+1][z];for(var M=z+1;M<this.n;M++)this.V[M][Y]+=rt*this.V[M][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var B=n-1,tt=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=J;gt--){var mt=g.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==J&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et<this.n;Et++)mt=At*this.V[Et][gt]+Ot*this.V[Et][n-1],this.V[Et][n-1]=-Ot*this.V[Et][gt]+At*this.V[Et][n-1],this.V[Et][gt]=mt}}break;case 2:{var Dt=e[J-1];e[J-1]=0;for(var Rt=J;Rt<n;Rt++){var Ht=g.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][J-1],this.U[Ft][J-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[J])),Math.abs(e[J])),Vt=this.s[n-1]/Yt,b=this.s[n-2]/Yt,U=e[n-2]/Yt,Z=this.s[J]/Yt,K=e[J]/Yt,q=((b+Vt)*(b-Vt)+U*U)/2,at=Vt*U*(Vt*U),ct=0;(function(Tt,Ct){return Tt||Ct})(q!==0,at!==0)&&(ct=Math.sqrt(q*q+at),q<0&&(ct=-ct),ct=at/(q+ct));for(var nt=(Z+Vt)*(Z-Vt)+ct,et=Z*K,j=J;j<n-1;j++){var ut=g.hypot(nt,et),wt=nt/ut,pt=et/ut;j!==J&&(e[j-1]=ut),nt=wt*this.s[j]+pt*e[j],e[j]=wt*e[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=wt*this.s[j+1];for(var xt=0;xt<this.n;xt++)ut=wt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+wt*this.V[xt][j+1],this.V[xt][j]=ut;if(ut=g.hypot(nt,et),wt=nt/ut,pt=et/ut,this.s[j]=ut,nt=wt*e[j]+pt*this.s[j+1],this.s[j+1]=-pt*e[j]+wt*this.s[j+1],et=pt*e[j+1],e[j+1]=wt*e[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)ut=wt*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+wt*this.U[lt][j+1],this.U[lt][j]=ut}e[n-2]=nt}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var ot=0;ot<=B;ot++)this.V[ot][J]=-this.V[ot][J]}for(;J<B&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][J+1],this.V[ft][J+1]=this.V[ft][J],this.V[ft][J]=Lt;if(J<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][J+1],this.U[st][J+1]=this.U[st][J],this.U[st][J]=Lt;J++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},g.hypot=function(h,a){var e=void 0;return Math.abs(h)>Math.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},A.exports=g}),(function(A,G,N){var g=(function(){function e(i,f){for(var r=0;r<f.length;r++){var d=f[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,f,r){return f&&e(i.prototype,f),r&&e(i,r),i}})();function h(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}var a=(function(){function e(i,f){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=d,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return g(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[d-1]===this.sequence2[t-1]?s=this.grid[d-1][t-1]+this.match_score:s=this.grid[d-1][t-1]+this.mismatch_penalty;var o=this.grid[d-1][t]+this.gap_penalty,c=this.grid[d][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[d][t]=l[T[0]],this.tracebackGrid[d][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var r=f[0],d=this.tracebackGrid[r.pos[0]][r.pos[1]];d[0]&&f.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),d[1]&&f.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),d[2]&&f.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,r){for(var d=[],t=-1;(t=f.indexOf(r,t+1))!==-1;)d.push(t);return d}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e})();A.exports=a}),(function(A,G,N){var g=function(){};g.FDLayout=N(18),g.FDLayoutConstants=N(4),g.FDLayoutEdge=N(19),g.FDLayoutNode=N(20),g.DimensionD=N(21),g.HashMap=N(22),g.HashSet=N(23),g.IGeometry=N(8),g.IMath=N(9),g.Integer=N(10),g.Point=N(12),g.PointD=N(5),g.RandomSeed=N(16),g.RectangleD=N(13),g.Transform=N(17),g.UniqueIDGeneretor=N(14),g.Quicksort=N(25),g.LinkedList=N(11),g.LGraphObject=N(2),g.LGraph=N(6),g.LEdge=N(1),g.LGraphManager=N(7),g.LNode=N(3),g.Layout=N(15),g.LayoutConstants=N(0),g.NeedlemanWunsch=N(27),g.Matrix=N(24),g.SVD=N(26),A.exports=g}),(function(A,G,N){function g(){this.listeners=[]}var h=g.prototype;h.addListener=function(a,e){this.listeners.push({event:a,callback:e})},h.removeListener=function(a,e){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];a===f.event&&f.callback(e)}},A.exports=g})])})})(fe)),fe.exports}var dr=le.exports,Oe;function vr(){return Oe||(Oe=1,(function(I,O){(function(G,N){I.exports=N(ur())})(dr,function(A){return(()=>{var G={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var d in f)r[d]=f[d];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),d=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,v=i(551).PointD,L=i(551).DimensionD,P=i(551).Layout,C=i(551).Integer,F=i(551).IGeometry,V=i(551).LGraph,X=i(551).Transform,k=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var _ in f)D[_]=f[_];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new d(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(R){return m.has(R)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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%l.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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},D.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=function M(H){for(var B=H.getChild().getNodes(),tt,ht=0,J=0;J<B.length;J++)tt=B[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(ht+=100):ht+=M(tt);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(B){n.fixedNodeSet.add(B.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var R=y(E);R>0&&(E.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var w=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){n.fixedNodesOnHorizontal.add(M),n.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){w.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){S.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(M){var H,B,tt;for(tt=M.length-1;tt>=2*M.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),B=M[tt],M[tt]=M[H],M[H]=B;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var H=w.has(M.left)?w.get(M.left):M.left,B=w.has(M.right)?w.get(M.right):M.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:M.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:M.gap})}else{var tt=S.has(M.top)?S.get(M.top):M.top,ht=S.has(M.bottom)?S.get(M.bottom):M.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:M.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:M.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var H=w.has(M.left)?w.get(M.left):M.left,B=w.has(M.right)?w.get(M.right):M.right;Q.has(H)?Q.get(H).push(B):Q.set(H,[B]),Q.has(B)?Q.get(B).push(H):Q.set(B,[H])}else{var tt=S.has(M.top)?S.get(M.top):M.top,ht=S.has(M.bottom)?S.get(M.bottom):M.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var Y=function(H,B){var tt=[],ht=[],J=new k,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var gt=it;for(J.push(gt),It.add(gt),tt[Nt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(J.push(At),It.add(At),tt[Nt].push(At))})}Nt++}}),{components:tt,isFixed:ht}},rt=Y(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=Y(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var M=n.idToNodeMap.get($.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var R=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,p=0;p<w.length;p++){for(var S=0,y=0;y<w[p].length;y++){if(this.fixedNodeSet.has(w[p][y])){S=0;break}S+=this.idToNodeMap.get(w[p][y]).displacementY}for(var W=S/w[p].length,y=0;y<w[p].length;y++)this.idToNodeMap.get(w[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var M=0;n.dummyToNodeForVerticalAlignment.has($)?M=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:M=n.idToNodeMap.get($).displacementX,n.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var B=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get($)-M;B<H.gap&&(M-=H.gap-B)}else{var B=n.nodeToTempPositionMapHorizontal.get($)-n.nodeToTempPositionMapHorizontal.get(H.left)+M;B<H.gap&&(M+=H.gap-B)}}),n.nodeToTempPositionMapHorizontal.set($,n.nodeToTempPositionMapHorizontal.get($)+M),n.dummyToNodeForVerticalAlignment.has($)?n.dummyToNodeForVerticalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementX=M}):n.idToNodeMap.get($).displacementX=M}}),this.nodesInRelativeVertical.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var M=0;n.dummyToNodeForHorizontalAlignment.has($)?M=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:M=n.idToNodeMap.get($).displacementY,n.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var B=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get($)-M;B<H.gap&&(M-=H.gap-B)}else{var B=n.nodeToTempPositionMapVertical.get($)-n.nodeToTempPositionMapVertical.get(H.top)+M;B<H.gap&&(M+=H.gap-B)}}),n.nodeToTempPositionMapVertical.set($,n.nodeToTempPositionMapVertical.get($)+M),n.dummyToNodeForHorizontalAlignment.has($)?n.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementY=M}):n.idToNodeMap.get($).displacementY=M}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var Y=this.dummyToNodeForVerticalAlignment.get(x[y]);Q+=Y.length*this.idToNodeMap.get(Y[0]).displacementX,z+=Y.length}else Q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(B){n.idToNodeMap.get(B).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var Y=this.dummyToNodeForHorizontalAlignment.get(x[y]);Q+=Y.length*this.idToNodeMap.get(Y[0]).displacementY,z+=Y.length}else Q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},D.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),R=E.getTarget();if(y==R)E.getBendpoints().push(new v),E.getBendpoints().push(new v),this.createDummyNodesForBendpoints(E),m.add(E);else{var w=[];if(w=w.concat(y.getEdgeListToNode(R)),w=w.concat(R.getEdgeListToNode(y)),!m.has(w[0])){if(w.length>1){var S;for(S=0;S<w.length;S++){var W=w[S];W.getBendpoints().push(new v),this.createDummyNodesForBendpoints(W)}}w.forEach(function(x){m.add(x)})}}}if(m.size==n.length)break}},D.prototype.positionNodesRadially=function(n){for(var m=new u(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,R=0,w=new v(0,0),S=0;S<n.length;S++){S%p==0&&(R=0,y=E,S!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),E=0);var W=n[S],x=P.findCenterOfTree(W);m.x=R,m.y=y,w=D.radialLayout(W,x,m),w.y>E&&(E=Math.floor(w.y)),R=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),R=new X;R.setDeviceOrgX(y.getMinX()),R.setDeviceOrgY(y.getMinY()),R.setWorldOrgX(p.x),R.setWorldOrgY(p.y);for(var w=0;w<n.length;w++){var S=n[w];S.transform(R)}var W=new v(y.getMaxX(),y.getMaxY());return R.inverseTransformPoint(W)},D.branchRadialLayout=function(n,m,p,E,y,R){var w=(E-p+1)/2;w<0&&(w+=180);var S=(w+p)%360,W=S*F.TWO_PI/360,x=y*Math.cos(W),Q=y*Math.sin(W);n.setCenter(x,Q);var z=[];z=z.concat(n.getEdges());var Y=z.length;m!=null&&Y--;for(var rt=0,$=z.length,M,H=n.getEdgesBetween(m);H.length>1;){var B=H[0];H.splice(0,1);var tt=z.indexOf(B);tt>=0&&z.splice(tt,1),$--,Y--}m!=null?M=(z.indexOf(H[0])+1)%$:M=0;for(var ht=Math.abs(E-p)/Y,J=M;rt!=Y;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+R,R),rt++}}},D.maxDiagonalInTree=function(n){for(var m=C.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var R=E[y],w=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(w.id==null||!this.getToBeTiled(w))&&p.push(R)}for(var y=0;y<p.length;y++){var R=p[y],S=R.getParent().id;typeof m[S]>"u"&&(m[S]=[]),m[S]=m[S].concat(R)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var Q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var Y=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$<m[W].length;$++){var M=m[W][$];rt.remove(M),Y.add(M)}}})},D.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},D.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,R=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(R+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>R?(E.rect.y-=(E.labelHeight-R)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-R)/2):E.labelPosVertical=="bottom"&&E.setHeight(R+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,R=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,R,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,R=E.paddingTop,w=E.labelMarginLeft,S=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,R,w,S)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var R=E[y];if(this.getNodeDegree(R)>0)return this.toBeTiled[m]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(n,m,p,E,y,R,w){m+=E+R,p+=y+w;for(var S=m,W=0;W<n.rows.length;W++){var x=n.rows[W];m=S;for(var Q=0,z=0;z<x.length;z++){var Y=x[z];Y.rect.x=m,Y.rect.y=p,m+=Y.rect.width+n.horizontalPadding,Y.rect.height>Q&&(Q=Y.rect.height)}p+=Q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var R=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(R+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>R?(y.rect.x-=(y.labelWidth-R)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-R)/2):y.labelPosHorizontal=="right"&&y.setWidth(R+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),R=this.getOrgRatio(E),w;return R<y?w=E:w=p,w},D.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(n,m){var p=o.TILING_PADDING_VERTICAL,E=o.TILING_PADDING_HORIZONTAL,y=n.length,R=0,w=0,S=0;n.forEach(function($){R+=$.getWidth(),w+=$.getHeight(),$.getWidth()>S&&(S=$.getWidth())});var W=R/y,x=w/y,Q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(Q))/(2*(W+E)),Y;m?(Y=Math.ceil(z),Y==z&&Y++):Y=Math.floor(z);var rt=Y*(W+E)-E;return S>rt&&(rt=S),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,R=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};R&&(w.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(M){return M.rect.width*M.rect.height},W=function(M,H){return S(H)-S(M)};n.sort(function($,M){var H=W;return w.idealRowWidth?(H=R,H($.id,M.id)):H($,M)});for(var x=0,Q=0,z=0;z<n.length;z++){var Y=n[z];x+=Y.getCenterX(),Q+=Y.getCenterY()}w.centerX=x/n.length,w.centerY=Q/n.length;for(var z=0;z<n.length;z++){var Y=n[z];if(w.rows.length==0)this.insertNodeToRow(w,Y,0,m);else if(this.canAddHorizontal(w,Y.rect.width,Y.rect.height)){var rt=w.rows.length-1;w.idealRowWidth||(rt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,Y,rt,m)}else this.insertNodeToRow(w,Y,w.rows.length,m);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var R=[];n.rows.push(R),n.rowWidth.push(y),n.rowHeight.push(0)}var w=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(w+=n.horizontalPadding),n.rowWidth[p]=w,n.width<w&&(n.width=w);var S=m.rect.height;p>0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var R=this.getShortestRowIndex(n);if(R<0)return!0;var w=n.rowWidth[R];if(w+n.horizontalPadding+m<=n.width)return!0;var S=0;n.rowHeight[R]<p&&R>0&&(S=p+n.verticalPadding-n.rowHeight[R]);var W;n.width-w>=m+n.horizontalPadding?W=(n.height+S)/(w+m+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.width<m?x=(n.height+S)/m:x=(n.height+S)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},D.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],R=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>R&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-R,n.rowWidth[p]=n.rowWidth[p]+R,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,S=0;S<E.length;S++)E[S].height>w&&(w=E[S].height);m>0&&(w+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=w,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[m]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var R=0;R<E.length;R++)if(p=E[R],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var w=p.getEdges()[0].getOtherEnd(p),S=new L(p.getCenterX()-w.getCenterX(),p.getCenterY()-w.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},D.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,R=p.finishX,w=p.startY,S=p.finishY,W=0,x=0,Q=0,z=0,Y=[W,Q,x,z];if(w>0)for(var rt=y;rt<=R;rt++)Y[0]+=this.grid[rt][w-1].length+this.grid[rt][w].length-1;if(R<this.grid.length-1)for(var rt=w;rt<=S;rt++)Y[1]+=this.grid[R+1][rt].length+this.grid[R][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=R;rt++)Y[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=w;rt<=S;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=C.MAX_VALUE,M,H,B=0;B<Y.length;B++)Y[B]<$?($=Y[B],M=1,H=B):Y[B]==$&&M++;if(M==3&&$==0)Y[0]==0&&Y[1]==0&&Y[2]==0?m=1:Y[0]==0&&Y[1]==0&&Y[3]==0?m=0:Y[0]==0&&Y[2]==0&&Y[3]==0?m=3:Y[1]==0&&Y[2]==0&&Y[3]==0&&(m=2);else if(M==2&&$==0){var tt=Math.floor(Math.random()*2);Y[0]==0&&Y[1]==0?tt==0?m=0:m=1:Y[0]==0&&Y[2]==0?tt==0?m=0:m=2:Y[0]==0&&Y[3]==0?tt==0?m=0:m=3:Y[1]==0&&Y[2]==0?tt==0?m=1:m=2:Y[1]==0&&Y[3]==0?tt==0?m=1:m=3:tt==0?m=2:m=3}else if(M==4&&$==0){var tt=Math.floor(Math.random()*4);m=tt}else m=H;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=D}),991:((a,e,i)=>{var f=i(551).FDLayoutNode,r=i(551).IMath;function d(s,o,c,l){f.call(this,s,o,c,l)}d.prototype=Object.create(f.prototype);for(var t in f)d[t]=f[t];d.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},d.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},d.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.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},d.prototype.setPred1=function(s){this.pred1=s},d.prototype.getPred1=function(){return pred1},d.prototype.getPred2=function(){return pred2},d.prototype.setNext=function(s){this.next=s},d.prototype.getNext=function(){return next},d.prototype.setProcessed=function(s){this.processed=s},d.prototype.isProcessed=function(){return processed},a.exports=d}),902:((a,e,i)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var r=i(806),d=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,u=new Map,v=[],L=[],P=c.getAllNodes(),C=0,F=0;F<P.length;F++){var V=P[F];V.getChild()==null&&(u.set(V.id,C++),v.push(V.getCenterX()),L.push(V.getCenterY()),T.set(V.id,V))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(b){!b.gap&&b.gap!=0&&(b.left?b.gap=r.DEFAULT_EDGE_LENGTH+T.get(b.left).getWidth()/2+T.get(b.right).getWidth()/2:b.gap=r.DEFAULT_EDGE_LENGTH+T.get(b.top).getHeight()/2+T.get(b.bottom).getHeight()/2)});var X=function(U,Z){return{x:U.x-Z.x,y:U.y-Z.y}},k=function(U){var Z=0,K=0;return U.forEach(function(q){Z+=v[u.get(q)],K+=L[u.get(q)]}),{x:Z/U.size,y:K/U.size}},D=function(U,Z,K,q,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt.add($t)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;U.forEach(function(lt,ot){nt.set(ot,0)}),U.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,ut=new d;nt.forEach(function(lt,ot){lt==0?(ut.push(ot),K||(Z=="horizontal"?et.set(ot,u.has(ot)?v[u.get(ot)]:q.get(ot)):et.set(ot,u.has(ot)?L[u.get(ot)]:q.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,u.has(st)?v[u.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,u.has(st)?L[u.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=u.has(st)?v[u.get(st)]:q.get(st):ft+=u.has(st)?L[u.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(Z=="horizontal"?st=u.has(ft.id)?v[u.get(ft.id)]:q.get(ft.id):st=u.has(ft.id)?L[u.get(ft.id)]:q.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&ut.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};ut.length!=0;)wt();if(K){var pt=new Set;U.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;K.has($t)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,Zt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=Zt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,$t=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,Zt=void 0;Z=="horizontal"?Zt=u.has(St)?v[u.get(St)]:q.get(St):Zt=u.has(St)?L[u.get(St)]:q.get(St);var Kt=et.get(St);Zt<Lt&&(Lt=Zt),Zt>st&&(st=Zt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var ce=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+ce)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?v[u.get(j.left)]-v[u.get(j.right)]>=0?Z++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ct<u.size;ct++)v[ct]=-1*v[ct],L[ct]=-1*L[ct];else if(Z>K)for(var nt=0;nt<u.size;nt++)v[nt]=-1*v[nt];else if(q>at)for(var et=0;et<u.size;et++)L[et]=-1*L[et]},n=function(U){var Z=[],K=new d,q=new Set,at=0;return U.forEach(function(ct,nt){if(!q.has(nt)){Z[at]=[];var et=nt;for(K.push(et),q.add(et),Z[at].push(et);K.length!=0;){et=K.shift();var j=U.get(et);j.forEach(function(ut){q.has(ut.id)||(K.push(ut.id),q.add(ut.id),Z[at].push(ut.id))})}at++}}),Z},m=function(U){var Z=new Map;return U.forEach(function(K,q){Z.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(U){var Z=new Map;return U.forEach(function(K,q){Z.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},E=[],y=[],R=!1,w=!1,S=new Set,W=new Map,x=new Map,Q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(b){S.add(b.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(b){b.left?(W.has(b.left)?W.get(b.left).push({id:b.right,gap:b.gap,direction:"horizontal"}):W.set(b.left,[{id:b.right,gap:b.gap,direction:"horizontal"}]),W.has(b.right)||W.set(b.right,[])):(W.has(b.top)?W.get(b.top).push({id:b.bottom,gap:b.gap,direction:"vertical"}):W.set(b.top,[{id:b.bottom,gap:b.gap,direction:"vertical"}]),W.has(b.bottom)||W.set(b.bottom,[]))}),x=m(W),Q=n(x)),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(b,U){E[U]=[b.position.x,b.position.y],y[U]=[v[u.get(b.nodeId)],L[u.get(b.nodeId)]]}),R=!0;else if(l.alignmentConstraint)(function(){var b=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[u.get(ut.values().next().value)]:wt=k(j).x,U[et].forEach(function(pt){E[b]=[wt,L[u.get(pt)]],y[b]=[v[u.get(pt)],L[u.get(pt)]],b++})},K=0;K<U.length;K++)Z(K);R=!0}if(l.alignmentConstraint.horizontal){for(var q=l.alignmentConstraint.horizontal,at=function(et){var j=new Set;q[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[u.get(ut.values().next().value)]:wt=k(j).y,q[et].forEach(function(pt){E[b]=[v[u.get(pt)],wt],y[b]=[v[u.get(pt)],L[u.get(pt)]],b++})},ct=0;ct<q.length;ct++)at(ct);R=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var z=0,Y=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,Y=rt);if(z<x.size/2)_(l.relativePlacementConstraint),R=!1,w=!1;else{var $=new Map,M=new Map,H=[];Q[Y].forEach(function(b){W.get(b).forEach(function(U){U.direction=="horizontal"?($.has(b)?$.get(b).push(U):$.set(b,[U]),$.has(U.id)||$.set(U.id,[]),H.push({left:b,right:U.id})):(M.has(b)?M.get(b).push(U):M.set(b,[U]),M.has(U.id)||M.set(U.id,[]),H.push({top:b,bottom:U.id}))})}),_(H),w=!1;var B=D($,"horizontal"),tt=D(M,"vertical");Q[Y].forEach(function(b,U){y[U]=[v[u.get(b)],L[u.get(b)]],E[U]=[],B.has(b)?E[U][0]=B.get(b):E[U][0]=v[u.get(b)],tt.has(b)?E[U][1]=tt.get(b):E[U][1]=L[u.get(b)]}),R=!0}}if(R){for(var ht=void 0,J=t.transpose(E),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var gt=0;gt<u.size;gt++){var mt=[v[gt],L[gt]],At=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];v[gt]=t.dotProduct(mt,At),L[gt]=t.dotProduct(mt,Ot)}w&&_(l.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(b,U){var Z={x:v[u.get(b.nodeId)],y:L[u.get(b.nodeId)]},K=b.position,q=X(K,Z);Et.x+=q.x,Et.y+=q.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,v.forEach(function(b,U){v[U]+=Et.x}),L.forEach(function(b,U){L[U]+=Et.y}),l.fixedNodeConstraint.forEach(function(b){v[u.get(b.nodeId)]=b.position.x,L[u.get(b.nodeId)]=b.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Dt[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=v[u.get(K.values().next().value)]:q=k(Z).x,Z.forEach(function(at){S.has(at)||(v[u.get(at)]=q)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(U){var Z=new Set;Ut[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=L[u.get(K.values().next().value)]:q=k(Z).y,Z.forEach(function(at){S.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var b=new Map,U=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,ct=new Set,nt=new Set;if(S.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),et[yt].forEach(function(Mt){b.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),S.has(Mt)&&ct.add("dummy"+yt)}),q.set("dummy"+yt,v[u.get(et[yt][0])])},ut=0;ut<et.length;ut++)j(ut);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){U.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),S.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,L[u.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var kt=void 0,Bt=void 0;Mt.direction=="horizontal"?(kt=b.get(yt)?b.get(yt):yt,b.get(Mt.id)?Bt={id:b.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:Bt=Mt,lt.has(kt)?lt.get(kt).push(Bt):lt.set(kt,[Bt]),lt.has(Bt.id)||lt.set(Bt.id,[])):(kt=U.get(yt)?U.get(yt):yt,U.get(Mt.id)?Bt={id:U.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:Bt=Mt,ot.has(kt)?ot.get(kt).push(Bt):ot.set(kt,[Bt]),ot.has(Bt.id)||ot.set(Bt.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt($t)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=m(lt),zt=m(ot),St=n(bt),Zt=n(zt),Kt=p(lt),ce=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),Zt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){ce.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=D(lt,"horizontal",ct,q,Qt),Jt=D(ot,"vertical",nt,at,jt),oe=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){v[u.get(Mt)]=_t.get(yt)}):v[u.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var ge=_t.keys()[Symbol.iterator](),Le;!(te=(Le=ge.next()).done);te=!0){var ue=Le.value;oe(ue)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw Ne}}var Be=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){L[u.get(Mt)]=Jt.get(yt)}):L[u.get(yt)]=Jt.get(yt)},de=!0,Ce=!1,Ae=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),we;!(de=(we=ve.next()).done);de=!0){var ue=we.value;Be(ue)}}catch(Gt){Ce=!0,Ae=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Ce)throw Ae}}})()}for(var Yt=0;Yt<P.length;Yt++){var Vt=P[Yt];Vt.getChild()==null&&Vt.setCenter(v[u.get(Vt.id)],L[u.get(Vt.id)])}},a.exports=o}),551:(a=>{a.exports=A})},N={};function g(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return G[a](i,i.exports,g),i.exports}var h=g(45);return h})()})})(le)),le.exports}var pr=he.exports,De;function yr(){return De||(De=1,(function(I,O){(function(G,N){I.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r<i;r++)f[r-1]=arguments[r];return f.forEach(function(d){Object.keys(d).forEach(function(t){return e[t]=d[t]})}),e}}),548:((a,e,i)=>{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,u=void 0;try{for(var v=s[Symbol.iterator](),L;!(l=(L=v.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(P){T=!0,u=P}finally{try{!l&&v.return&&v.return()}finally{if(T)throw u}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,d={};d.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var u=l.parent()[0];u!=null;){if(s[u.id()])return!1;u=u.parent()[0]}return!0});return c},d.connectComponents=function(t,s,o,c){var l=new r,T=new Set,u=[],v=void 0,L=void 0,P=void 0,C=!1,F=1,V=[],X=[],k=function(){var _=t.collection();X.push(_);var n=o[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(s)),u.push(n),m.forEach(function(y){l.push(y),T.add(y),_.merge(y)});for(var p=function(){n=l.shift();var R=t.collection();n.neighborhood().nodes().forEach(function(x){s.intersection(n.edgesWith(x)).length>0&&R.merge(x)});for(var w=0;w<R.length;w++){var S=R[w];if(v=o.intersection(S.union(S.ancestors())),v!=null&&!T.has(v[0])){var W=v.union(v.descendants());W.forEach(function(x){l.push(x),T.add(x),_.merge(x),o.has(x)&&u.push(x)})}}};l.length!=0;)p();if(_.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(R){_.has(R.source())&&_.has(R.target())&&_.merge(R)})}),u.length==o.length&&(C=!0),!C||C&&F>1){L=u[0],P=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length<P&&(P=y.connectedEdges().length,L=y)}),V.push(L.id());var E=t.collection();E.merge(u[0]),u.forEach(function(y){E.merge(y)}),u=[],o=o.difference(E),F++}};do k();while(!C);return c&&V.length>0&&c.set("dummy"+(c.size+1),V),X},d.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,L=!1,P=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),F;!(v=(F=C.next()).done);v=!0){var V=F.value,X=f(V,2),k=X[0],D=X[1],_=o.cy.getElementById(k);if(_){var n=_.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;m<c&&(c=m),p>l&&(l=p),E<T&&(T=E),y>u&&(u=y)}}}catch(x){L=!0,P=x}finally{try{!v&&C.return&&C.return()}finally{if(L)throw P}}var R=t.x-(l+c)/2,w=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(x){return x+R}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,Y=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),Y>l&&(l=Y),rt<T&&(T=rt),$>u&&(u=$)});var S=t.x-(l+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+W)})}}},d.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,P=void 0,C=void 0,F=void 0,V=t.descendants().not(":parent"),X=V.length,k=0;k<X;k++){var D=V[k];L=s[c.get(D.id())]-D.width()/2,P=s[c.get(D.id())]+D.width()/2,C=o[c.get(D.id())]-D.height()/2,F=o[c.get(D.id())]+D.height()/2,l>L&&(l=L),T<P&&(T=P),u>C&&(u=C),v<F&&(v=F)}var _={};return _.topLeftX=l,_.topLeftY=u,_.width=T-l,_.height=v-u,_},d.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},a.exports=d}),816:((a,e,i)=>{var f=i(548),r=i(140).CoSELayout,d=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(v,L){var P=v.cy,C=v.eles,F=C.nodes(),V=C.edges(),X=void 0,k=void 0,D=void 0,_={};v.randomize&&(X=L.nodeIndexes,k=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(P,C),E=function W(x,Q,z,Y){for(var rt=Q.length,$=0;$<rt;$++){var M=Q[$],H=null;M.intersection(p).length==0&&(H=M.children());var B=void 0,tt=M.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(Y.randomize)if(!M.isParent())B=x.add(new d(z.graphManager,new t(k[X.get(M.id())]-tt.w/2,D[X.get(M.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var ht=f.calcBoundingBox(M,k,D,X);M.intersection(p).length==0?B=x.add(new d(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):B=x.add(new d(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else B=x.add(new d(z.graphManager,new t(M.position("x")-tt.w/2,M.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else B=x.add(new d(this.graphManager));if(B.id=M.data("id"),B.nodeRepulsion=m(Y.nodeRepulsion,M),B.paddingLeft=parseInt(M.css("padding")),B.paddingTop=parseInt(M.css("padding")),B.paddingRight=parseInt(M.css("padding")),B.paddingBottom=parseInt(M.css("padding")),Y.nodeDimensionsIncludeLabels&&(B.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,B.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,B.labelPosVertical=M.css("text-valign"),B.labelPosHorizontal=M.css("text-halign")),_[M.data("id")]=B,isNaN(B.rect.x)&&(B.rect.x=0),isNaN(B.rect.y)&&(B.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),B),W(J,H,z,Y)}}},y=function(x,Q,z){for(var Y=0,rt=0,$=0;$<z.length;$++){var M=z[$],H=_[M.data("source")],B=_[M.data("target")];if(H&&B&&H!==B&&H.getEdgesBetween(B).length==0){var tt=Q.add(x.newEdge(),H,B);tt.id=M.id(),tt.idealLength=m(v.idealEdgeLength,M),tt.edgeElasticity=m(v.edgeElasticity,M),Y+=tt.idealLength,rt++}}v.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:n(v.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},R=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};v.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,l.TILE=v.tile,l.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),v.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),v.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new r,S=w.newGraphManager();return E(S.addRoot(),f.getTopMostNodes(F),w,v),y(w,S,V),R(w,v),w.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function v(L,P){for(var C=0;C<P.length;C++){var F=P[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(L,F.key,F)}}return function(L,P,C){return P&&v(L.prototype,P),C&&v(L,C),L}})();function r(v,L){if(!(v instanceof L))throw new TypeError("Cannot call a class as a function")}var d=i(658),t=i(548),s=i(657),o=s.spectralLayout,c=i(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),u=(function(){function v(L){r(this,v),this.options=d({},T,L)}return f(v,[{key:"run",value:function(){var P=this,C=this.options,F=C.cy,V=C.eles,X=[],k=[],D=void 0,_=[];C.fixedNodeConstraint&&(!Array.isArray(C.fixedNodeConstraint)||C.fixedNodeConstraint.length==0)&&(C.fixedNodeConstraint=void 0),C.alignmentConstraint&&(C.alignmentConstraint.vertical&&(!Array.isArray(C.alignmentConstraint.vertical)||C.alignmentConstraint.vertical.length==0)&&(C.alignmentConstraint.vertical=void 0),C.alignmentConstraint.horizontal&&(!Array.isArray(C.alignmentConstraint.horizontal)||C.alignmentConstraint.horizontal.length==0)&&(C.alignmentConstraint.horizontal=void 0)),C.relativePlacementConstraint&&(!Array.isArray(C.relativePlacementConstraint)||C.relativePlacementConstraint.length==0)&&(C.relativePlacementConstraint=void 0);var n=C.fixedNodeConstraint||C.alignmentConstraint||C.relativePlacementConstraint;n&&(C.tile=!1,C.packComponents=!1);var m=void 0,p=!1;if(F.layoutUtilities&&C.packComponents&&(m=F.layoutUtilities("get"),m||(m=F.layoutUtilities()),p=!0),V.nodes().length>0)if(p){var R=t.getTopMostNodes(C.eles.nodes());if(D=t.connectComponents(F,C.eles,R),D.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&D.forEach(function(vt){C.eles=vt,X.push(o(C))}),C.quality=="default"||C.quality=="proof"){var w=F.collection();if(C.tile){var S=new Map,W=[],x=[],Q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){w.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),w.length>1){var rt=w.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(w),X.push(z);for(var $=Y.length-1;$>=0;$--)D.splice(Y[$],1),X.splice(Y[$],1),_.splice(Y[$],1)}}D.forEach(function(vt,it){C.eles=vt,k.push(l(C,X[it])),t.relocateComponent(_[it],k[it],C)})}else D.forEach(function(vt,it){t.relocateComponent(_[it],X[it],C)});var M=new Set;if(D.length>1){var H=[],B=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(C.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not(B).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(C.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else k[it][Ot.id()]&&mt.nodes.push({x:k[it][Ot.id()].getLeft(),y:k[it][Ot.id()].getTop(),width:k[it][Ot.id()].getWidth(),height:k[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(C.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else k[it][Et.id()]&&k[it][Dt.id()]&&mt.edges.push({startX:k[it][Et.id()].getCenterX(),startY:k[it][Et.id()].getCenterY(),endX:k[it][Dt.id()].getCenterX(),endY:k[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),M.add(it))}});var tt=m.packComponents(H,C.randomize).shifts;if(C.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+tt[it].dx}),mt=vt.yCoords.map(function(At){return At+tt[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;M.forEach(function(vt){Object.keys(k[vt]).forEach(function(it){var gt=k[vt][it];gt.setCenter(gt.getCenterX()+tt[ht].dx,gt.getCenterY()+tt[ht].dy)}),ht++})}}}else{var E=C.eles.boundingBox();if(_.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),C.randomize){var y=o(C);X.push(y)}C.quality=="default"||C.quality=="proof"?(k.push(l(C,X[0])),t.relocateComponent(_[0],k[0],C)):t.relocateComponent(_[0],X[0],C)}var J=function(it,gt){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return k.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),C.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(F,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(P,C,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v})();a.exports=u}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,d=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),u=l.nodes(":parent"),v=new Map,L=new Map,P=new Map,C=[],F=[],V=[],X=[],k=[],D=[],_=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,R=o.samplingType,w=o.nodeSeparation,S=void 0,W=function(){for(var U=0,Z=0,K=!1;Z<S;){U=Math.floor(Math.random()*m),K=!1;for(var q=0;q<Z;q++)if(X[q]==U){K=!0;break}if(!K)X[Z]=U,Z++;else continue}},x=function(U,Z,K){for(var q=[],at=0,ct=0,nt=0,et=void 0,j=[],ut=0,wt=1,pt=0;pt<m;pt++)j[pt]=p;for(q[ct]=U,j[U]=0;ct>=at;){nt=q[at++];for(var xt=C[nt],lt=0;lt<xt.length;lt++)et=L.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,q[++ct]=et);D[nt][Z]=j[nt]*w}if(K){for(var ot=0;ot<m;ot++)D[ot][Z]<k[ot]&&(k[ot]=D[ot][Z]);for(var Lt=0;Lt<m;Lt++)k[Lt]>ut&&(ut=k[Lt],wt=Lt)}return wt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*m);for(var q=0;q<m;q++)k[q]=p;for(var at=0;at<S;at++)X[at]=Z,Z=x(Z,at,U)}else{W();for(var K=0;K<S;K++)x(X[K],K,U)}for(var ct=0;ct<m;ct++)for(var nt=0;nt<S;nt++)D[ct][nt]*=D[ct][nt];for(var et=0;et<S;et++)_[et]=[];for(var j=0;j<S;j++)for(var ut=0;ut<S;ut++)_[j][ut]=D[X[ut]][j]},z=function(){for(var U=d.svd(_),Z=U.S,K=U.U,q=U.V,at=Z[0]*Z[0]*Z[0],ct=[],nt=0;nt<S;nt++){ct[nt]=[];for(var et=0;et<S;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=Z[nt]/(Z[nt]*Z[nt]+at/(Z[nt]*Z[nt])))}n=r.multMat(r.multMat(q,ct),r.transpose(K))},Y=function(){for(var U=void 0,Z=void 0,K=[],q=[],at=[],ct=[],nt=0;nt<m;nt++)K[nt]=Math.random(),q[nt]=Math.random();K=r.normalize(K),q=r.normalize(q);for(var et=E,j=E,ut=void 0;;){for(var wt=0;wt<m;wt++)at[wt]=K[wt];if(K=r.multGamma(r.multL(r.multGamma(at),D,n)),U=r.dotProduct(at,K),K=r.normalize(K),et=r.dotProduct(at,K),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var pt=0;pt<m;pt++)at[pt]=K[pt];for(j=E;;){for(var xt=0;xt<m;xt++)ct[xt]=q[xt];if(ct=r.minusOp(ct,r.multCons(at,r.dotProduct(at,ct))),q=r.multGamma(r.multL(r.multGamma(ct),D,n)),Z=r.dotProduct(ct,q),q=r.normalize(q),et=r.dotProduct(ct,q),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var lt=0;lt<m;lt++)ct[lt]=q[lt];F=r.multCons(at,Math.sqrt(Math.abs(U))),V=r.multCons(ct,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),v),u.forEach(function(b){f.connectComponents(c,l,f.getTopMostNodes(b.descendants().intersection(l)),v)});for(var rt=0,$=0;$<T.length;$++)T[$].isParent()||L.set(T[$].id(),rt++);var M=!0,H=!1,B=void 0;try{for(var tt=v.keys()[Symbol.iterator](),ht;!(M=(ht=tt.next()).done);M=!0){var J=ht.value;L.set(J,rt++)}}catch(b){H=!0,B=b}finally{try{!M&&tt.return&&tt.return()}finally{if(H)throw B}}for(var It=0;It<L.size;It++)C[It]=[];u.forEach(function(b){for(var U=b.children().intersection(l);U.nodes(":childless").length==0;)U=U.nodes()[0].children().intersection(l);var Z=0,K=U.nodes(":childless")[0].connectedEdges().length;U.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),P.set(b.id(),U.nodes(":childless")[Z].id())}),T.forEach(function(b){var U=void 0;b.isParent()?U=L.get(P.get(b.id())):U=L.get(b.id()),b.neighborhood().nodes().forEach(function(Z){l.intersection(b.edgesWith(Z)).length>0&&(Z.isParent()?C[U].push(P.get(Z.id())):C[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;v.get(U).forEach(function(q){c.getElementById(q).isParent()?K=P.get(q):K=q,C[Z].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,gt=void 0;try{for(var mt=v.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(b){it=!0,gt=b}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=L.size;var Et=void 0;if(m>2){S=m<o.sampleSize?m:o.sampleSize;for(var Dt=0;Dt<m;Dt++)D[Dt]=[];for(var Rt=0;Rt<S;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(R),z(),Y(),Et={nodeIndexes:L,xCoords:F,yCoords:V}):(L.forEach(function(b,U){F.push(c.getElementById(U).position("x")),V.push(c.getElementById(U).position("y"))}),Et={nodeIndexes:L,xCoords:F,yCoords:V}),Et}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(F.push(Pt.x),V.push(Pt.y),m==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();F.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),V.push(Pt.y)}return Et={nodeIndexes:L,xCoords:F,yCoords:V},Et}};a.exports={spectralLayout:t}}),579:((a,e,i)=>{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=A})},N={};function g(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return G[a](i,i.exports,g),i.exports}var h=g(579);return h})()})})(he)),he.exports}var Er=yr();const mr=Ze(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:dt(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:dt(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:dt(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:dt(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:dt((I,O)=>I-O+2,"L"),R:dt((I,O)=>I-2,"R"),T:dt((I,O)=>I-O+2,"T"),B:dt((I,O)=>I-2,"B")},Tr=dt(function(I){return Wt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=dt(function(I){const O=I;return O==="L"||O==="R"||O==="T"||O==="B"},"isArchitectureDirection"),Wt=dt(function(I){const O=I;return O==="L"||O==="R"},"isArchitectureDirectionX"),qt=dt(function(I){const O=I;return O==="T"||O==="B"},"isArchitectureDirectionY"),Te=dt(function(I,O){const A=Wt(I)&&qt(O),G=qt(I)&&Wt(O);return A||G},"isArchitectureDirectionXY"),Nr=dt(function(I){const O=I[0],A=I[1],G=Wt(O)&&qt(A),N=qt(O)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=dt(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),ye=dt(function(I,O){const A=`${I}${O}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=dt(function([I,O],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[I+(G==="L"?-1:1),O+(N==="T"?1:-1)]:[I+(G==="L"?-1:1),O]:Wt(N)?[I+(N==="L"?1:-1),O+(G==="T"?1:-1)]:[I,O+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ar=dt(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=dt(function(I,O){return Te(I,O)?"bend":Wt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=dt(function(I){return I.type==="service"},"isArchitectureService"),Or=dt(function(I){return I.type==="junction"},"isArchitectureJunction"),be=dt(I=>I.data(),"edgeData"),ie=dt(I=>I.data(),"nodeData"),Dr=ar.architecture,ae,Pe=(ae=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}setDiagramId(O){this.diagramId=O}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:O,icon:A,in:G,title:N,iconText:g}){if(this.registeredIds[O]!==void 0)throw new Error(`The service id [${O}] is already in use by another ${this.registeredIds[O]}`);if(G!==void 0){if(O===G)throw new Error(`The service [${O}] cannot be placed within itself`);if(this.registeredIds[G]===void 0)throw new Error(`The service [${O}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[G]==="node")throw new Error(`The service [${O}]'s parent is not a group`)}this.registeredIds[O]="node",this.nodes[O]={id:O,type:"service",icon:A,iconText:g,title:N,edges:[],in:G}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:O,in:A}){if(this.registeredIds[O]!==void 0)throw new Error(`The junction id [${O}] is already in use by another ${this.registeredIds[O]}`);if(A!==void 0){if(O===A)throw new Error(`The junction [${O}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The junction [${O}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[A]==="node")throw new Error(`The junction [${O}]'s parent is not a group`)}this.registeredIds[O]="node",this.nodes[O]={id:O,type:"junction",edges:[],in:A}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(O){return this.nodes[O]??null}addGroup({id:O,icon:A,in:G,title:N}){if(this.registeredIds?.[O]!==void 0)throw new Error(`The group id [${O}] is already in use by another ${this.registeredIds[O]}`);if(G!==void 0){if(O===G)throw new Error(`The group [${O}] cannot be placed within itself`);if(this.registeredIds?.[G]===void 0)throw new Error(`The group [${O}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[G]==="node")throw new Error(`The group [${O}]'s parent is not a group`)}this.registeredIds[O]="group",this.groups[O]={id:O,icon:A,title:N,in:G}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:O,rhsId:A,lhsDir:G,rhsDir:N,lhsInto:g,rhsInto:h,lhsGroup:a,rhsGroup:e,title:i}){if(!Re(G))throw new Error(`Invalid direction given for left hand side of edge ${O}--${A}. Expected (L,R,T,B) got ${String(G)}`);if(!Re(N))throw new Error(`Invalid direction given for right hand side of edge ${O}--${A}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[O]===void 0&&this.groups[O]===void 0)throw new Error(`The left-hand id [${O}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[O].in,r=this.nodes[A].in;if(a&&f&&r&&f==r)throw new Error(`The left-hand id [${O}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&f&&r&&f==r)throw new Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:O,lhsDir:G,lhsInto:g,lhsGroup:a,rhsId:A,rhsDir:N,rhsInto:h,rhsGroup:e,title:i};this.edges.push(d),this.nodes[O]&&this.nodes[A]&&(this.nodes[O].edges.push(this.edges[this.edges.length-1]),this.nodes[A].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const O={},A=Object.entries(this.nodes).reduce((e,[i,f])=>(e[i]=f.edges.reduce((r,d)=>{const t=this.getNode(d.lhsId)?.in,s=this.getNode(d.rhsId)?.in;if(t&&s&&t!==s){const o=wr(d.lhsDir,d.rhsDir);o!=="bend"&&(O[t]??={},O[t][s]=o,O[s]??={},O[s][t]=o)}if(d.lhsId===i){const o=ye(d.lhsDir,d.rhsDir);o&&(r[o]=d.rhsId)}else{const o=ye(d.rhsDir,d.lhsDir);o&&(r[o]=d.lhsId)}return r},{}),e),{}),G=Object.keys(A)[0],N={[G]:1},g=Object.keys(A).reduce((e,i)=>i===G?e:{...e,[i]:1},{}),h=dt(e=>{const i={[e]:[0,0]},f=[e];for(;f.length>0;){const r=f.shift();if(r){N[r]=1,delete g[r];const d=A[r],[t,s]=i[r];Object.entries(d).forEach(([o,c])=>{N[c]||(i[c]=Cr([t,s],o),f.push(c))})}}return i},"BFS"),a=[h(G)];for(;Object.keys(g).length>0;)a.push(h(Object.keys(g)[0]));this.dataStructures={adjList:A,spatialMaps:a,groupAlignments:O}}return this.dataStructures}setElementForId(O,A){this.elements[O]=A}getElementById(O){return this.elements[O]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(O){return this.getConfig()[O]}},dt(ae,"ArchitectureDB"),ae),xr=dt((I,O)=>{fr(I,O),I.groups.map(A=>O.addGroup(A)),I.services.map(A=>O.addService({...A,type:"service"})),I.junctions.map(A=>O.addJunction({...A,type:"junction"})),I.edges.map(A=>O.addEdge(A))},"populateDb"),Ge={parser:{yy:void 0},parse:dt(async I=>{const O=await cr("architecture",I);Se.debug(O);const A=Ge.parser?.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(O,A)},"parse")},Ir=dt(I=>`
1
+ import{bp as Ze,_ as dt,a3 as ke,aj as qe,x as Se,u as Qe,q as Je,M as Ke,N as je,p as _e,s as tr,V as er,a0 as rr,Z as ir,a1 as ar,v as Ee,b7 as me,bq as pe,D as nr,w as or,T as sr,br as hr,bs as lr}from"./index-DEKuJM5_.js";import{p as fr}from"./chunk-4BX2VUAB-km6NpEMz.js";import{p as cr}from"./wardley-L42UT6IY-DyEDLg3x.js";import{c as Fe}from"./cytoscape.esm-DkOyvmE4.js";var he={exports:{}},le={exports:{}},fe={exports:{}},gr=fe.exports,Me;function ur(){return Me||(Me=1,(function(I,O){(function(G,N){I.exports=N()})(gr,function(){return(function(A){var G={};function N(g){if(G[g])return G[g].exports;var h=G[g]={i:g,l:!1,exports:{}};return A[g].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=G,N.i=function(g){return g},N.d=function(g,h,a){N.o(g,h)||Object.defineProperty(g,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(g){var h=g&&g.__esModule?function(){return g.default}:function(){return g};return N.d(h,"a",h),h},N.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)},N.p="",N(N.s=28)})([(function(A,G,N){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,A.exports=g}),(function(A,G,N){var g=N(2),h=N(8),a=N(9);function e(f,r,d){g.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(g.prototype);for(var i in g)e[i]=g[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var d=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(d.getOwner()==r)return d;if(d.getOwner()==t)break;d=d.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=e}),(function(A,G,N){function g(h){this.vGraphObject=h}A.exports=g}),(function(A,G,N){var g=N(2),h=N(10),a=N(13),e=N(0),i=N(16),f=N(5);function r(t,s,o,c){o==null&&c==null&&(c=s),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(g.prototype);for(var d in g)r[d]=g[d];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},r.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},r.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},r.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.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)},r.prototype.scatter=function(){var t,s,o=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+i.nextDouble()*(c-o)+o;var l=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_Y+i.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=r}),(function(A,G,N){var g=N(0);function h(){}for(var a in g)h[a]=g[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,G,N){function g(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(h){this.x=h},g.prototype.setY=function(h){this.y=h},g.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=g}),(function(A,G,N){var g=N(2),h=N(10),a=N(0),e=N(7),i=N(3),f=N(1),r=N(13),d=N(12),t=N(11);function s(c,l,T){g.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(g.prototype);for(var o in g)s[o]=g[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;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 v=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(v.source=l,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),l.edges.push(v),T!=l&&T.edges.push(v),v)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,v=T.length,L=0;L<v;L++)u=T[L],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var P=this.nodes.indexOf(l);if(P==-1)throw"Node not in owner node list!";this.nodes.splice(P,1)}else if(c instanceof f){var u=c;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 C=u.source.edges.indexOf(u),F=u.target.edges.indexOf(u);if(!(C>-1&&F>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(C,1),u.target!=u.source&&u.target.edges.splice(F,1);var P=u.source.owner.getEdges().indexOf(u);if(P==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(P,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,u,v,L=this.getNodes(),P=L.length,C=0;C<P;C++){var F=L[C];T=F.getTop(),u=F.getLeft(),c>T&&(c=T),l>u&&(l=u)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=l-v,this.top=c-v,new d(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,u=h.MAX_VALUE,v=-h.MAX_VALUE,L,P,C,F,V,X=this.nodes,k=X.length,D=0;D<k;D++){var _=X[D];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),P=_.getRight(),C=_.getTop(),F=_.getBottom(),l>L&&(l=L),T<P&&(T=P),u>C&&(u=C),v<F&&(v=F)}var n=new r(l,u,T-l,v-u);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),X[0].getParent().paddingLeft!=null?V=X[0].getParent().paddingLeft:V=this.margin,this.left=n.x-V,this.right=n.x+n.width+V,this.top=n.y-V,this.bottom=n.y+n.height+V},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,u=h.MAX_VALUE,v=-h.MAX_VALUE,L,P,C,F,V=c.length,X=0;X<V;X++){var k=c[X];L=k.getLeft(),P=k.getRight(),C=k.getTop(),F=k.getBottom(),l>L&&(l=L),T<P&&(T=P),u>C&&(u=C),v<F&&(v=F)}var D=new r(l,u,T-l,v-u);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,u=0;u<T;u++){var v=l[u];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,u=this.nodes[0],v,L,P=u.withChildren();for(P.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){u=l.shift(),v=u.getEdges();for(var C=v.length,F=0;F<C;F++){var V=v[F];if(L=V.getOtherEndInGraph(u,this),L!=null&&!T.has(L)){var X=L.withChildren();X.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var k=0;T.forEach(function(D){D.owner==c&&k++}),k==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var g,h=N(1);function a(e){g=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,d){if(f==null&&r==null&&d==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{d=f,r=i,f=e;var t=r.getOwner(),s=d.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,d);if(f.isInterGraph=!0,f.source=r,f.target=d,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof g){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,d=f.length,t=0;t<d;t++)r=f[t],i.remove(r);var s=[];s=s.concat(i.getNodes());var o;d=s.length;for(var t=0;t<d;t++)o=s[t],i.remove(o);i==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(i);this.graphs.splice(c,1),i.parent=null}else if(e instanceof h){if(r=e,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var c=r.source.edges.indexOf(r);if(r.source.edges.splice(c,1),c=r.target.edges.indexOf(r),r.target.edges.splice(c,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var c=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],i=this.getGraphs(),f=i.length,r=0;r<f;r++)e=e.concat(i[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)e=e.concat(i[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,i){if(!(e!=null&&i!=null))throw"assert failed";if(e==i)return!0;var f=e.getOwner(),r;do{if(r=f.getParent(),r==null)break;if(r==i)return!0;if(f=r.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(r=f.getParent(),r==null)break;if(r==e)return!0;if(f=r.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,i,f,r,d,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(e=t[o],i=e.source,f=e.target,e.lca=null,e.sourceInLca=i,e.targetInLca=f,i==f){e.lca=i.getOwner();continue}for(r=i.getOwner();e.lca==null;){for(e.targetInLca=f,d=f.getOwner();e.lca==null;){if(d==r){e.lca=d;break}if(d==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=d.getParent(),d=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca==null&&(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,i){if(e==i)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var r=i.getOwner();do{if(r==null)break;if(r==f)return r;r=r.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(e,i){e==null&&i==null&&(e=this.rootGraph,i=1);for(var f,r=e.getNodes(),d=r.length,t=0;t<d;t++)f=r[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},a.prototype.includesInvalidEdge=function(){for(var e,i=[],f=this.edges.length,r=0;r<f;r++)e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target)&&i.push(e);for(var r=0;r<i.length;r++)this.remove(i[r]);return!1},A.exports=a}),(function(A,G,N){var g=N(12);function h(){}h.calcSeparationAmount=function(a,e,i,f){if(!a.intersects(e))throw"assert failed";var r=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,r),i[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),i[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var d=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(d=1);var t=d*i[0],s=i[1]/d;i[0]<s?s=i[0]:t=i[1],i[0]=-1*r[0]*(s/2+f),i[1]=-1*r[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(a,e,i){a.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,a.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},h.getIntersection2=function(a,e,i){var f=a.getCenterX(),r=a.getCenterY(),d=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return i[0]=f,i[1]=r,i[2]=d,i[3]=t,!0;var s=a.getX(),o=a.getY(),c=a.getRight(),l=a.getX(),T=a.getBottom(),u=a.getRight(),v=a.getWidthHalf(),L=a.getHeightHalf(),P=e.getX(),C=e.getY(),F=e.getRight(),V=e.getX(),X=e.getBottom(),k=e.getRight(),D=e.getWidthHalf(),_=e.getHeightHalf(),n=!1,m=!1;if(f===d){if(r>t)return i[0]=f,i[1]=o,i[2]=d,i[3]=X,!1;if(r<t)return i[0]=f,i[1]=T,i[2]=d,i[3]=C,!1}else if(r===t){if(f>d)return i[0]=s,i[1]=r,i[2]=F,i[3]=t,!1;if(f<d)return i[0]=c,i[1]=r,i[2]=P,i[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-r)/(d-f),R=void 0,w=void 0,S=void 0,W=void 0,x=void 0,Q=void 0;if(-p===y?f>d?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>d?(i[0]=s,i[1]=o,n=!0):(i[0]=u,i[1]=T,n=!0)),-E===y?d>f?(i[2]=V,i[3]=X,m=!0):(i[2]=F,i[3]=C,m=!0):E===y&&(d>f?(i[2]=P,i[3]=C,m=!0):(i[2]=k,i[3]=X,m=!0)),n&&m)return!1;if(f>d?r>t?(R=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(R=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):r>t?(R=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(R=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(R){case 1:W=o,S=f+-L/y,i[0]=S,i[1]=W;break;case 2:S=u,W=r+v*y,i[0]=S,i[1]=W;break;case 3:W=T,S=f+L/y,i[0]=S,i[1]=W;break;case 4:S=l,W=r+-v*y,i[0]=S,i[1]=W;break}if(!m)switch(w){case 1:Q=C,x=d+-_/y,i[2]=x,i[3]=Q;break;case 2:x=k,Q=t+D*y,i[2]=x,i[3]=Q;break;case 3:Q=X,x=d+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-D*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,d=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,u=void 0,v=void 0,L=void 0,P=void 0,C=void 0,F=void 0,V=void 0,X=void 0,k=void 0;return L=s-d,C=r-t,V=t*d-r*s,P=T-c,F=o-l,X=l*c-o*T,k=L*F-P*C,k===0?null:(u=(C*X-F*V)/k,v=(P*V-L*X)/k,new g(u,v))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i<a?r+=Math.PI:f<e&&(r+=this.TWO_PI)):f<e?r=this.ONE_AND_HALF_PI:r=this.HALF_PI,r},h.doIntersect=function(a,e,i,f){var r=a.x,d=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,u=(t-r)*(T-c)-(l-o)*(s-d);if(u===0)return!1;var v=((T-c)*(l-r)+(o-l)*(T-d))/u,L=((d-s)*(l-r)+(t-r)*(T-d))/u;return 0<v&&v<1&&0<L&&L<1},h.findCircleLineIntersections=function(a,e,i,f,r,d,t){var s=(i-a)*(i-a)+(f-e)*(f-e),o=2*((a-r)*(i-a)+(e-d)*(f-e)),c=(a-r)*(a-r)+(e-d)*(e-d)-t*t,l=o*o-4*s*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),u=(-o-Math.sqrt(o*o-4*s*c))/(2*s),v=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:v}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,G,N){function g(){}g.sign=function(h){return h>0?1:h<0?-1:0},g.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},g.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=g}),(function(A,G,N){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,A.exports=g}),(function(A,G,N){var g=(function(){function r(d,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}return function(d,t,s){return t&&r(d.prototype,t),s&&r(d,s),d}})();function h(r,d){if(!(r instanceof d))throw new TypeError("Cannot call a class as a function")}var a=function(d){return{value:d,next:null,prev:null}},e=function(d,t,s,o){return d!==null?d.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=d,t.next=s,o.length++,t},i=function(d,t){var s=d.prev,o=d.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,d.prev=d.next=null,t.length--,d},f=(function(){function r(d){var t=this;h(this,r),this.length=0,this.head=null,this.tail=null,d?.forEach(function(s){return t.push(s)})}return g(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return e(s.prev,a(t),s,this)}},{key:"insertAfter",value:function(t,s){return e(s,a(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return e(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return e(s,t,s.next,this)}},{key:"push",value:function(t){return e(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return e(null,a(t),this.head,this)}},{key:"remove",value:function(t){return i(t,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),r})();A.exports=f}),(function(A,G,N){function g(h,a,e){this.x=null,this.y=null,h==null&&a==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof a=="number"&&e==null?(this.x=h,this.y=a):h.constructor.name=="Point"&&a==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.getLocation=function(){return new g(this.x,this.y)},g.prototype.setLocation=function(h,a,e){h.constructor.name=="Point"&&a==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof a=="number"&&e==null&&(parseInt(h)==h&&parseInt(a)==a?this.move(h,a):(this.x=Math.floor(h+.5),this.y=Math.floor(a+.5)))},g.prototype.move=function(h,a){this.x=h,this.y=a},g.prototype.translate=function(h,a){this.x+=h,this.y+=a},g.prototype.equals=function(h){if(h.constructor.name=="Point"){var a=h;return this.x==a.x&&this.y==a.y}return this==h},g.prototype.toString=function(){return new g().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=g}),(function(A,G,N){function g(h,a,e,i){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&a!=null&&e!=null&&i!=null&&(this.x=h,this.y=a,this.width=e,this.height=i)}g.prototype.getX=function(){return this.x},g.prototype.setX=function(h){this.x=h},g.prototype.getY=function(){return this.y},g.prototype.setY=function(h){this.y=h},g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(h){this.width=h},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(h){this.height=h},g.prototype.getRight=function(){return this.x+this.width},g.prototype.getBottom=function(){return this.y+this.height},g.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},g.prototype.getCenterX=function(){return this.x+this.width/2},g.prototype.getMinX=function(){return this.getX()},g.prototype.getMaxX=function(){return this.getX()+this.width},g.prototype.getCenterY=function(){return this.y+this.height/2},g.prototype.getMinY=function(){return this.getY()},g.prototype.getMaxY=function(){return this.getY()+this.height},g.prototype.getWidthHalf=function(){return this.width/2},g.prototype.getHeightHalf=function(){return this.height/2},A.exports=g}),(function(A,G,N){var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function h(){}h.lastID=0,h.createID=function(a){return h.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=h.getString(),h.lastID++),a.uniqueID)},h.getString=function(a){return a==null&&(a=h.lastID),"Object#"+a},h.isPrimitive=function(a){var e=typeof a>"u"?"undefined":g(a);return a==null||e!="object"&&e!="function"},A.exports=h}),(function(A,G,N){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=N(0),a=N(7),e=N(3),i=N(1),f=N(6),r=N(5),d=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new a(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new e(this.graphManager,o)},s.prototype.newEdge=function(o){return new i(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof e){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var u=c.vGraphObject;u.update(c)}}else if(o instanceof i){var v=o;if(v.vGraphObject!=null){var L=v.vGraphObject;L.update(v)}}else if(o instanceof f){var P=o;if(P.vGraphObject!=null){var C=P.vGraphObject;C.update(P)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new r(0,0));else{var c=new d,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),u,v=0;v<T.length;v++)u=T[v],u.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),u=0;u<T.length;u++)c=T[u],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,u=0;u<l.length;u++)l[u].getChild()!=null&&(T=!1);if(!T)return o;var v=new Set,L=[],P=new Map,C=[];for(C=C.concat(l);C.length>0&&c;){for(L.push(C[0]);L.length>0&&c;){var F=L[0];L.splice(0,1),v.add(F);for(var V=F.getEdges(),u=0;u<V.length;u++){var X=V[u].getOtherEnd(F);if(P.get(F)!=X)if(!v.has(X))L.push(X),P.set(X,F);else{c=!1;break}}}if(!c)o=[];else{var k=[].concat(g(v));o.push(k);for(var u=0;u<k.length;u++){var D=k[u],_=C.indexOf(D);_>-1&&C.splice(_,1)}v=new Set,P=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u<o.bendpoints.length;u++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var L=this.newEdge(null);this.graphManager.add(L,l,v),c.add(v),l=v}var L=this.newEdge(null);return this.graphManager.add(L,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(g(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),u=0;u<T.length;u++){var v=T[u],L=new r(v.getCenterX(),v.getCenterY()),P=l.bendpoints.get(u);P.x=L.x,P.y=L.y,v.getOwner().remove(v)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var u=c;if(o<=50){var v=c/l;u-=(c-v)/50*(50-o)}else{var L=c*T;u+=(L-c)/50*(o-50)}return u}else{var P,C;return o<=50?(P=9*c/500,C=c/10):(P=9*c/50,C=-8*c),P*o+C}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,u=!1,v=null;(c.length==1||c.length==2)&&(u=!0,v=c[0]);for(var L=0;L<c.length;L++){var P=c[L],C=P.getNeighborsList().size;T.set(P,P.getNeighborsList().size),C==1&&l.push(P)}var F=[];for(F=F.concat(l);!u;){var V=[];V=V.concat(F),F=[];for(var L=0;L<c.length;L++){var P=c[L],X=c.indexOf(P);X>=0&&c.splice(X,1);var k=P.getNeighborsList();k.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&F.push(n),T.set(n,p)}})}l=l.concat(F),(c.length==1||c.length==2)&&(u=!0,v=c[0])}return v},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},A.exports=g}),(function(A,G,N){var g=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new g(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},A.exports=h}),(function(A,G,N){function g(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=N(15),a=N(4),e=N(0),i=N(8),f=N(9);function r(){h.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}r.prototype=Object.create(h.prototype);for(var d in h)r[d]=h[d];r.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,u,v=this.getGraphManager().getAllEdges(),L=0;L<v.length;L++)t=v[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),u=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+u-2*e.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},r.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},r.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,u=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;o<u.length;o++)l=u[o],this.calculateRepulsionForceOfANode(l,v,t,s),v.add(l);else for(o=0;o<u.length;o++)for(l=u[o],c=o+1;c<u.length;c++)T=u[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},r.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},r.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},r.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,u,v;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),u=T*(t.lengthX/l),v=T*(t.lengthY/l),o.springForceX+=u,o.springForceY+=v,c.springForceX-=u,c.springForceY-=v)},r.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),u,v,L,P,C,F,V;if(o.intersects(c)){i.calcSeparationAmount(o,c,l,a.DEFAULT_EDGE_LENGTH/2),F=2*l[0],V=2*l[1];var X=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=X*F,t.repulsionForceY-=X*V,s.repulsionForceX+=X*F,s.repulsionForceY+=X*V}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(u=c.getCenterX()-o.getCenterX(),v=c.getCenterY()-o.getCenterY()):(i.getIntersection(o,c,T),u=T[2]-T[0],v=T[3]-T[1]),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=f.sign(u)*a.MIN_REPULSION_DIST),Math.abs(v)<a.MIN_REPULSION_DIST&&(v=f.sign(v)*a.MIN_REPULSION_DIST),L=u*u+v*v,P=Math.sqrt(L),C=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,F=C*u/P,V=C*v/P,t.repulsionForceX-=F,t.repulsionForceY-=V,s.repulsionForceX+=F,s.repulsionForceY+=V},r.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,u,v,L;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,u=Math.abs(l)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(u>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},r.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},r.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},r.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},r.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,u=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),u=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var v=c;v<=l;v++)for(var L=T;L<=u;L++)this.grid[v][L].push(t),t.setGridCoordinates(c,l,T,u)},r.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,u=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(v<0||L<0||v>=u.length||L>=u[0].length)){for(var P=0;P<u[v][L].length;P++)if(T=u[v][L][P],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var C=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),F=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);C<=this.repulsionRange&&F<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(g(l))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},r.prototype.calcRepulsionRange=function(){return 0},A.exports=r}),(function(A,G,N){var g=N(1),h=N(4);function a(i,f,r){g.call(this,i,f,r),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(g.prototype);for(var e in g)a[e]=g[e];A.exports=a}),(function(A,G,N){var g=N(3),h=N(4);function a(i,f,r,d){g.call(this,i,f,r,d),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}a.prototype=Object.create(g.prototype);for(var e in g)a[e]=g[e];a.prototype.setGridCoordinates=function(i,f,r,d){this.startX=i,this.finishX=f,this.startY=r,this.finishY=d},A.exports=a}),(function(A,G,N){function g(h,a){this.width=0,this.height=0,h!==null&&a!==null&&(this.height=a,this.width=h)}g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(h){this.width=h},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(h){this.height=h},A.exports=g}),(function(A,G,N){var g=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(a,e){var i=g.createID(a);this.contains(i)||(this.map[i]=e,this.keys.push(a))},h.prototype.contains=function(a){return g.createID(a),this.map[a]!=null},h.prototype.get=function(a){var e=g.createID(a);return this.map[e]},h.prototype.keySet=function(){return this.keys},A.exports=h}),(function(A,G,N){var g=N(14);function h(){this.set={}}h.prototype.add=function(a){var e=g.createID(a);this.contains(e)||(this.set[e]=a)},h.prototype.remove=function(a){delete this.set[g.createID(a)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(a){return this.set[g.createID(a)]==a},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),i=e.length,f=0;f<i;f++)a.push(this.set[e[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(a){for(var e=a.length,i=0;i<e;i++){var f=a[i];this.add(f)}},A.exports=h}),(function(A,G,N){function g(){}g.multMat=function(h,a){for(var e=[],i=0;i<h.length;i++){e[i]=[];for(var f=0;f<a[0].length;f++){e[i][f]=0;for(var r=0;r<h[0].length;r++)e[i][f]+=h[i][r]*a[r][f]}}return e},g.transpose=function(h){for(var a=[],e=0;e<h[0].length;e++){a[e]=[];for(var i=0;i<h.length;i++)a[e][i]=h[i][e]}return a},g.multCons=function(h,a){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]*a;return e},g.minusOp=function(h,a){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]-a[i];return e},g.dotProduct=function(h,a){for(var e=0,i=0;i<h.length;i++)e+=h[i]*a[i];return e},g.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},g.normalize=function(h){for(var a=[],e=this.mag(h),i=0;i<h.length;i++)a[i]=h[i]/e;return a},g.multGamma=function(h){for(var a=[],e=0,i=0;i<h.length;i++)e+=h[i];e*=-1/h.length;for(var f=0;f<h.length;f++)a[f]=e+h[f];return a},g.multL=function(h,a,e){for(var i=[],f=[],r=[],d=0;d<a[0].length;d++){for(var t=0,s=0;s<a.length;s++)t+=-.5*a[s][d]*h[s];f[d]=t}for(var o=0;o<e.length;o++){for(var c=0,l=0;l<e.length;l++)c+=e[o][l]*f[l];r[o]=c}for(var T=0;T<a.length;T++){for(var u=0,v=0;v<a[0].length;v++)u+=a[T][v]*r[v];i[T]=u}return i},A.exports=g}),(function(A,G,N){var g=(function(){function i(f,r){for(var d=0;d<r.length;d++){var t=r[d];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,r,d){return r&&i(f.prototype,r),d&&i(f,d),f}})();function h(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var a=N(11),e=(function(){function i(f,r){h(this,i),(r!==null||r!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;f instanceof a?d=f.size():d=f.length,this._quicksort(f,0,d-1)}return g(i,[{key:"_quicksort",value:function(r,d,t){if(d<t){var s=this._partition(r,d,t);this._quicksort(r,d,s),this._quicksort(r,s+1,t)}}},{key:"_partition",value:function(r,d,t){for(var s=this._get(r,d),o=d,c=t;;){for(;this.compareFunction(s,this._get(r,c));)c--;for(;this.compareFunction(this._get(r,o),s);)o++;if(o<c)this._swap(r,o,c),o++,c--;else return c}}},{key:"_get",value:function(r,d){return r instanceof a?r.get_object_at(d):r[d]}},{key:"_set",value:function(r,d,t){r instanceof a?r.set_object_at(d,t):r[d]=t}},{key:"_swap",value:function(r,d,t){var s=this._get(r,d);this._set(r,d,this._get(r,t)),this._set(r,t,s)}},{key:"_defaultCompareFunction",value:function(r,d){return d>r}}]),i})();A.exports=e}),(function(A,G,N){function g(){}g.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.m,a]),this.V=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(r,d);t++){if(t<r){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=g.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<r,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var u=t;u<this.m;u++)h[u][c]+=l*h[u][t]}e[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<r))for(var v=t;v<this.m;v++)this.U[v][t]=h[v][t];if(t<d){e[t]=0;for(var L=t+1;L<this.n;L++)e[t]=g.hypot(e[t],e[L]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var P=t+1;P<this.n;P++)e[P]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var C=t+1;C<this.m;C++)i[C]=0;for(var F=t+1;F<this.n;F++)for(var V=t+1;V<this.m;V++)i[V]+=e[F]*h[V][F];for(var X=t+1;X<this.n;X++)for(var k=-e[X]/e[t+1],D=t+1;D<this.m;D++)h[D][X]+=k*i[D]}for(var _=t+1;_<this.n;_++)this.V[_][t]=e[_]}}var n=Math.min(this.n,this.m+1);r<this.n&&(this.s[r]=h[r][r]),this.m<n&&(this.s[n-1]=0),d+1<n&&(e[d]=h[d][n-1]),e[n-1]=0;{for(var m=r;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=r-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var R=0,w=E;w<this.m;w++)R+=this.U[w][E]*this.U[w][y];R=-R/this.U[E][E];for(var S=E;S<this.m;S++)this.U[S][y]+=R*this.U[S][E]}for(var W=E;W<this.m;W++)this.U[W][E]=-this.U[W][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][E]=0;this.U[E][E]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<d,e[z]!==0))for(var Y=z+1;Y<a;Y++){for(var rt=0,$=z+1;$<this.n;$++)rt+=this.V[$][z]*this.V[$][Y];rt=-rt/this.V[z+1][z];for(var M=z+1;M<this.n;M++)this.V[M][Y]+=rt*this.V[M][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var B=n-1,tt=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=J;gt--){var mt=g.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==J&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et<this.n;Et++)mt=At*this.V[Et][gt]+Ot*this.V[Et][n-1],this.V[Et][n-1]=-Ot*this.V[Et][gt]+At*this.V[Et][n-1],this.V[Et][gt]=mt}}break;case 2:{var Dt=e[J-1];e[J-1]=0;for(var Rt=J;Rt<n;Rt++){var Ht=g.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][J-1],this.U[Ft][J-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[J])),Math.abs(e[J])),Vt=this.s[n-1]/Yt,b=this.s[n-2]/Yt,U=e[n-2]/Yt,Z=this.s[J]/Yt,K=e[J]/Yt,q=((b+Vt)*(b-Vt)+U*U)/2,at=Vt*U*(Vt*U),ct=0;(function(Tt,Ct){return Tt||Ct})(q!==0,at!==0)&&(ct=Math.sqrt(q*q+at),q<0&&(ct=-ct),ct=at/(q+ct));for(var nt=(Z+Vt)*(Z-Vt)+ct,et=Z*K,j=J;j<n-1;j++){var ut=g.hypot(nt,et),wt=nt/ut,pt=et/ut;j!==J&&(e[j-1]=ut),nt=wt*this.s[j]+pt*e[j],e[j]=wt*e[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=wt*this.s[j+1];for(var xt=0;xt<this.n;xt++)ut=wt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+wt*this.V[xt][j+1],this.V[xt][j]=ut;if(ut=g.hypot(nt,et),wt=nt/ut,pt=et/ut,this.s[j]=ut,nt=wt*e[j]+pt*this.s[j+1],this.s[j+1]=-pt*e[j]+wt*this.s[j+1],et=pt*e[j+1],e[j+1]=wt*e[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)ut=wt*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+wt*this.U[lt][j+1],this.U[lt][j]=ut}e[n-2]=nt}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var ot=0;ot<=B;ot++)this.V[ot][J]=-this.V[ot][J]}for(;J<B&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][J+1],this.V[ft][J+1]=this.V[ft][J],this.V[ft][J]=Lt;if(J<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][J+1],this.U[st][J+1]=this.U[st][J],this.U[st][J]=Lt;J++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},g.hypot=function(h,a){var e=void 0;return Math.abs(h)>Math.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},A.exports=g}),(function(A,G,N){var g=(function(){function e(i,f){for(var r=0;r<f.length;r++){var d=f[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,f,r){return f&&e(i.prototype,f),r&&e(i,r),i}})();function h(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}var a=(function(){function e(i,f){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=d,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return g(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[d-1]===this.sequence2[t-1]?s=this.grid[d-1][t-1]+this.match_score:s=this.grid[d-1][t-1]+this.mismatch_penalty;var o=this.grid[d-1][t]+this.gap_penalty,c=this.grid[d][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[d][t]=l[T[0]],this.tracebackGrid[d][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var r=f[0],d=this.tracebackGrid[r.pos[0]][r.pos[1]];d[0]&&f.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),d[1]&&f.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),d[2]&&f.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,r){for(var d=[],t=-1;(t=f.indexOf(r,t+1))!==-1;)d.push(t);return d}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e})();A.exports=a}),(function(A,G,N){var g=function(){};g.FDLayout=N(18),g.FDLayoutConstants=N(4),g.FDLayoutEdge=N(19),g.FDLayoutNode=N(20),g.DimensionD=N(21),g.HashMap=N(22),g.HashSet=N(23),g.IGeometry=N(8),g.IMath=N(9),g.Integer=N(10),g.Point=N(12),g.PointD=N(5),g.RandomSeed=N(16),g.RectangleD=N(13),g.Transform=N(17),g.UniqueIDGeneretor=N(14),g.Quicksort=N(25),g.LinkedList=N(11),g.LGraphObject=N(2),g.LGraph=N(6),g.LEdge=N(1),g.LGraphManager=N(7),g.LNode=N(3),g.Layout=N(15),g.LayoutConstants=N(0),g.NeedlemanWunsch=N(27),g.Matrix=N(24),g.SVD=N(26),A.exports=g}),(function(A,G,N){function g(){this.listeners=[]}var h=g.prototype;h.addListener=function(a,e){this.listeners.push({event:a,callback:e})},h.removeListener=function(a,e){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];a===f.event&&f.callback(e)}},A.exports=g})])})})(fe)),fe.exports}var dr=le.exports,Oe;function vr(){return Oe||(Oe=1,(function(I,O){(function(G,N){I.exports=N(ur())})(dr,function(A){return(()=>{var G={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var d in f)r[d]=f[d];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var d in f)r[d]=f[d];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),d=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,v=i(551).PointD,L=i(551).DimensionD,P=i(551).Layout,C=i(551).Integer,F=i(551).IGeometry,V=i(551).LGraph,X=i(551).Transform,k=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var _ in f)D[_]=f[_];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new d(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(R){return m.has(R)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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%l.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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},D.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=function M(H){for(var B=H.getChild().getNodes(),tt,ht=0,J=0;J<B.length;J++)tt=B[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(ht+=100):ht+=M(tt);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(B){n.fixedNodeSet.add(B.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var R=y(E);R>0&&(E.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var w=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){n.fixedNodesOnHorizontal.add(M),n.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){w.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){S.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(M){var H,B,tt;for(tt=M.length-1;tt>=2*M.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),B=M[tt],M[tt]=M[H],M[H]=B;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var H=w.has(M.left)?w.get(M.left):M.left,B=w.has(M.right)?w.get(M.right):M.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:M.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:M.gap})}else{var tt=S.has(M.top)?S.get(M.top):M.top,ht=S.has(M.bottom)?S.get(M.bottom):M.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:M.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:M.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var H=w.has(M.left)?w.get(M.left):M.left,B=w.has(M.right)?w.get(M.right):M.right;Q.has(H)?Q.get(H).push(B):Q.set(H,[B]),Q.has(B)?Q.get(B).push(H):Q.set(B,[H])}else{var tt=S.has(M.top)?S.get(M.top):M.top,ht=S.has(M.bottom)?S.get(M.bottom):M.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var Y=function(H,B){var tt=[],ht=[],J=new k,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var gt=it;for(J.push(gt),It.add(gt),tt[Nt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(J.push(At),It.add(At),tt[Nt].push(At))})}Nt++}}),{components:tt,isFixed:ht}},rt=Y(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=Y(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var M=n.idToNodeMap.get($.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var R=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,p=0;p<w.length;p++){for(var S=0,y=0;y<w[p].length;y++){if(this.fixedNodeSet.has(w[p][y])){S=0;break}S+=this.idToNodeMap.get(w[p][y]).displacementY}for(var W=S/w[p].length,y=0;y<w[p].length;y++)this.idToNodeMap.get(w[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var M=0;n.dummyToNodeForVerticalAlignment.has($)?M=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:M=n.idToNodeMap.get($).displacementX,n.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var B=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get($)-M;B<H.gap&&(M-=H.gap-B)}else{var B=n.nodeToTempPositionMapHorizontal.get($)-n.nodeToTempPositionMapHorizontal.get(H.left)+M;B<H.gap&&(M+=H.gap-B)}}),n.nodeToTempPositionMapHorizontal.set($,n.nodeToTempPositionMapHorizontal.get($)+M),n.dummyToNodeForVerticalAlignment.has($)?n.dummyToNodeForVerticalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementX=M}):n.idToNodeMap.get($).displacementX=M}}),this.nodesInRelativeVertical.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var M=0;n.dummyToNodeForHorizontalAlignment.has($)?M=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:M=n.idToNodeMap.get($).displacementY,n.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var B=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get($)-M;B<H.gap&&(M-=H.gap-B)}else{var B=n.nodeToTempPositionMapVertical.get($)-n.nodeToTempPositionMapVertical.get(H.top)+M;B<H.gap&&(M+=H.gap-B)}}),n.nodeToTempPositionMapVertical.set($,n.nodeToTempPositionMapVertical.get($)+M),n.dummyToNodeForHorizontalAlignment.has($)?n.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementY=M}):n.idToNodeMap.get($).displacementY=M}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var Y=this.dummyToNodeForVerticalAlignment.get(x[y]);Q+=Y.length*this.idToNodeMap.get(Y[0]).displacementX,z+=Y.length}else Q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(B){n.idToNodeMap.get(B).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var Y=this.dummyToNodeForHorizontalAlignment.get(x[y]);Q+=Y.length*this.idToNodeMap.get(Y[0]).displacementY,z+=Y.length}else Q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},D.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),R=E.getTarget();if(y==R)E.getBendpoints().push(new v),E.getBendpoints().push(new v),this.createDummyNodesForBendpoints(E),m.add(E);else{var w=[];if(w=w.concat(y.getEdgeListToNode(R)),w=w.concat(R.getEdgeListToNode(y)),!m.has(w[0])){if(w.length>1){var S;for(S=0;S<w.length;S++){var W=w[S];W.getBendpoints().push(new v),this.createDummyNodesForBendpoints(W)}}w.forEach(function(x){m.add(x)})}}}if(m.size==n.length)break}},D.prototype.positionNodesRadially=function(n){for(var m=new u(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,R=0,w=new v(0,0),S=0;S<n.length;S++){S%p==0&&(R=0,y=E,S!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),E=0);var W=n[S],x=P.findCenterOfTree(W);m.x=R,m.y=y,w=D.radialLayout(W,x,m),w.y>E&&(E=Math.floor(w.y)),R=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),R=new X;R.setDeviceOrgX(y.getMinX()),R.setDeviceOrgY(y.getMinY()),R.setWorldOrgX(p.x),R.setWorldOrgY(p.y);for(var w=0;w<n.length;w++){var S=n[w];S.transform(R)}var W=new v(y.getMaxX(),y.getMaxY());return R.inverseTransformPoint(W)},D.branchRadialLayout=function(n,m,p,E,y,R){var w=(E-p+1)/2;w<0&&(w+=180);var S=(w+p)%360,W=S*F.TWO_PI/360,x=y*Math.cos(W),Q=y*Math.sin(W);n.setCenter(x,Q);var z=[];z=z.concat(n.getEdges());var Y=z.length;m!=null&&Y--;for(var rt=0,$=z.length,M,H=n.getEdgesBetween(m);H.length>1;){var B=H[0];H.splice(0,1);var tt=z.indexOf(B);tt>=0&&z.splice(tt,1),$--,Y--}m!=null?M=(z.indexOf(H[0])+1)%$:M=0;for(var ht=Math.abs(E-p)/Y,J=M;rt!=Y;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+R,R),rt++}}},D.maxDiagonalInTree=function(n){for(var m=C.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var R=E[y],w=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(w.id==null||!this.getToBeTiled(w))&&p.push(R)}for(var y=0;y<p.length;y++){var R=p[y],S=R.getParent().id;typeof m[S]>"u"&&(m[S]=[]),m[S]=m[S].concat(R)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var Q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var Y=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$<m[W].length;$++){var M=m[W][$];rt.remove(M),Y.add(M)}}})},D.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},D.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,R=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(R+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>R?(E.rect.y-=(E.labelHeight-R)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-R)/2):E.labelPosVertical=="bottom"&&E.setHeight(R+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,R=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,R,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,R=E.paddingTop,w=E.labelMarginLeft,S=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,R,w,S)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var R=E[y];if(this.getNodeDegree(R)>0)return this.toBeTiled[m]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(n,m,p,E,y,R,w){m+=E+R,p+=y+w;for(var S=m,W=0;W<n.rows.length;W++){var x=n.rows[W];m=S;for(var Q=0,z=0;z<x.length;z++){var Y=x[z];Y.rect.x=m,Y.rect.y=p,m+=Y.rect.width+n.horizontalPadding,Y.rect.height>Q&&(Q=Y.rect.height)}p+=Q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var R=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(R+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>R?(y.rect.x-=(y.labelWidth-R)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-R)/2):y.labelPosHorizontal=="right"&&y.setWidth(R+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),R=this.getOrgRatio(E),w;return R<y?w=E:w=p,w},D.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(n,m){var p=o.TILING_PADDING_VERTICAL,E=o.TILING_PADDING_HORIZONTAL,y=n.length,R=0,w=0,S=0;n.forEach(function($){R+=$.getWidth(),w+=$.getHeight(),$.getWidth()>S&&(S=$.getWidth())});var W=R/y,x=w/y,Q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(Q))/(2*(W+E)),Y;m?(Y=Math.ceil(z),Y==z&&Y++):Y=Math.floor(z);var rt=Y*(W+E)-E;return S>rt&&(rt=S),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,R=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};R&&(w.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(M){return M.rect.width*M.rect.height},W=function(M,H){return S(H)-S(M)};n.sort(function($,M){var H=W;return w.idealRowWidth?(H=R,H($.id,M.id)):H($,M)});for(var x=0,Q=0,z=0;z<n.length;z++){var Y=n[z];x+=Y.getCenterX(),Q+=Y.getCenterY()}w.centerX=x/n.length,w.centerY=Q/n.length;for(var z=0;z<n.length;z++){var Y=n[z];if(w.rows.length==0)this.insertNodeToRow(w,Y,0,m);else if(this.canAddHorizontal(w,Y.rect.width,Y.rect.height)){var rt=w.rows.length-1;w.idealRowWidth||(rt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,Y,rt,m)}else this.insertNodeToRow(w,Y,w.rows.length,m);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var R=[];n.rows.push(R),n.rowWidth.push(y),n.rowHeight.push(0)}var w=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(w+=n.horizontalPadding),n.rowWidth[p]=w,n.width<w&&(n.width=w);var S=m.rect.height;p>0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var R=this.getShortestRowIndex(n);if(R<0)return!0;var w=n.rowWidth[R];if(w+n.horizontalPadding+m<=n.width)return!0;var S=0;n.rowHeight[R]<p&&R>0&&(S=p+n.verticalPadding-n.rowHeight[R]);var W;n.width-w>=m+n.horizontalPadding?W=(n.height+S)/(w+m+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.width<m?x=(n.height+S)/m:x=(n.height+S)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},D.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],R=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>R&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-R,n.rowWidth[p]=n.rowWidth[p]+R,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,S=0;S<E.length;S++)E[S].height>w&&(w=E[S].height);m>0&&(w+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=w,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[m]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var R=0;R<E.length;R++)if(p=E[R],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var w=p.getEdges()[0].getOtherEnd(p),S=new L(p.getCenterX()-w.getCenterX(),p.getCenterY()-w.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},D.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,R=p.finishX,w=p.startY,S=p.finishY,W=0,x=0,Q=0,z=0,Y=[W,Q,x,z];if(w>0)for(var rt=y;rt<=R;rt++)Y[0]+=this.grid[rt][w-1].length+this.grid[rt][w].length-1;if(R<this.grid.length-1)for(var rt=w;rt<=S;rt++)Y[1]+=this.grid[R+1][rt].length+this.grid[R][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=R;rt++)Y[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=w;rt<=S;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=C.MAX_VALUE,M,H,B=0;B<Y.length;B++)Y[B]<$?($=Y[B],M=1,H=B):Y[B]==$&&M++;if(M==3&&$==0)Y[0]==0&&Y[1]==0&&Y[2]==0?m=1:Y[0]==0&&Y[1]==0&&Y[3]==0?m=0:Y[0]==0&&Y[2]==0&&Y[3]==0?m=3:Y[1]==0&&Y[2]==0&&Y[3]==0&&(m=2);else if(M==2&&$==0){var tt=Math.floor(Math.random()*2);Y[0]==0&&Y[1]==0?tt==0?m=0:m=1:Y[0]==0&&Y[2]==0?tt==0?m=0:m=2:Y[0]==0&&Y[3]==0?tt==0?m=0:m=3:Y[1]==0&&Y[2]==0?tt==0?m=1:m=2:Y[1]==0&&Y[3]==0?tt==0?m=1:m=3:tt==0?m=2:m=3}else if(M==4&&$==0){var tt=Math.floor(Math.random()*4);m=tt}else m=H;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=D}),991:((a,e,i)=>{var f=i(551).FDLayoutNode,r=i(551).IMath;function d(s,o,c,l){f.call(this,s,o,c,l)}d.prototype=Object.create(f.prototype);for(var t in f)d[t]=f[t];d.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},d.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},d.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.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},d.prototype.setPred1=function(s){this.pred1=s},d.prototype.getPred1=function(){return pred1},d.prototype.getPred2=function(){return pred2},d.prototype.setNext=function(s){this.next=s},d.prototype.getNext=function(){return next},d.prototype.setProcessed=function(s){this.processed=s},d.prototype.isProcessed=function(){return processed},a.exports=d}),902:((a,e,i)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var r=i(806),d=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,u=new Map,v=[],L=[],P=c.getAllNodes(),C=0,F=0;F<P.length;F++){var V=P[F];V.getChild()==null&&(u.set(V.id,C++),v.push(V.getCenterX()),L.push(V.getCenterY()),T.set(V.id,V))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(b){!b.gap&&b.gap!=0&&(b.left?b.gap=r.DEFAULT_EDGE_LENGTH+T.get(b.left).getWidth()/2+T.get(b.right).getWidth()/2:b.gap=r.DEFAULT_EDGE_LENGTH+T.get(b.top).getHeight()/2+T.get(b.bottom).getHeight()/2)});var X=function(U,Z){return{x:U.x-Z.x,y:U.y-Z.y}},k=function(U){var Z=0,K=0;return U.forEach(function(q){Z+=v[u.get(q)],K+=L[u.get(q)]}),{x:Z/U.size,y:K/U.size}},D=function(U,Z,K,q,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt.add($t)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;U.forEach(function(lt,ot){nt.set(ot,0)}),U.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,ut=new d;nt.forEach(function(lt,ot){lt==0?(ut.push(ot),K||(Z=="horizontal"?et.set(ot,u.has(ot)?v[u.get(ot)]:q.get(ot)):et.set(ot,u.has(ot)?L[u.get(ot)]:q.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,u.has(st)?v[u.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,u.has(st)?L[u.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=u.has(st)?v[u.get(st)]:q.get(st):ft+=u.has(st)?L[u.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(Z=="horizontal"?st=u.has(ft.id)?v[u.get(ft.id)]:q.get(ft.id):st=u.has(ft.id)?L[u.get(ft.id)]:q.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&ut.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};ut.length!=0;)wt();if(K){var pt=new Set;U.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;K.has($t)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,Zt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=Zt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,$t=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,Zt=void 0;Z=="horizontal"?Zt=u.has(St)?v[u.get(St)]:q.get(St):Zt=u.has(St)?L[u.get(St)]:q.get(St);var Kt=et.get(St);Zt<Lt&&(Lt=Zt),Zt>st&&(st=Zt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var ce=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+ce)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?v[u.get(j.left)]-v[u.get(j.right)]>=0?Z++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ct<u.size;ct++)v[ct]=-1*v[ct],L[ct]=-1*L[ct];else if(Z>K)for(var nt=0;nt<u.size;nt++)v[nt]=-1*v[nt];else if(q>at)for(var et=0;et<u.size;et++)L[et]=-1*L[et]},n=function(U){var Z=[],K=new d,q=new Set,at=0;return U.forEach(function(ct,nt){if(!q.has(nt)){Z[at]=[];var et=nt;for(K.push(et),q.add(et),Z[at].push(et);K.length!=0;){et=K.shift();var j=U.get(et);j.forEach(function(ut){q.has(ut.id)||(K.push(ut.id),q.add(ut.id),Z[at].push(ut.id))})}at++}}),Z},m=function(U){var Z=new Map;return U.forEach(function(K,q){Z.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(U){var Z=new Map;return U.forEach(function(K,q){Z.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},E=[],y=[],R=!1,w=!1,S=new Set,W=new Map,x=new Map,Q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(b){S.add(b.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(b){b.left?(W.has(b.left)?W.get(b.left).push({id:b.right,gap:b.gap,direction:"horizontal"}):W.set(b.left,[{id:b.right,gap:b.gap,direction:"horizontal"}]),W.has(b.right)||W.set(b.right,[])):(W.has(b.top)?W.get(b.top).push({id:b.bottom,gap:b.gap,direction:"vertical"}):W.set(b.top,[{id:b.bottom,gap:b.gap,direction:"vertical"}]),W.has(b.bottom)||W.set(b.bottom,[]))}),x=m(W),Q=n(x)),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(b,U){E[U]=[b.position.x,b.position.y],y[U]=[v[u.get(b.nodeId)],L[u.get(b.nodeId)]]}),R=!0;else if(l.alignmentConstraint)(function(){var b=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[u.get(ut.values().next().value)]:wt=k(j).x,U[et].forEach(function(pt){E[b]=[wt,L[u.get(pt)]],y[b]=[v[u.get(pt)],L[u.get(pt)]],b++})},K=0;K<U.length;K++)Z(K);R=!0}if(l.alignmentConstraint.horizontal){for(var q=l.alignmentConstraint.horizontal,at=function(et){var j=new Set;q[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[u.get(ut.values().next().value)]:wt=k(j).y,q[et].forEach(function(pt){E[b]=[v[u.get(pt)],wt],y[b]=[v[u.get(pt)],L[u.get(pt)]],b++})},ct=0;ct<q.length;ct++)at(ct);R=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var z=0,Y=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,Y=rt);if(z<x.size/2)_(l.relativePlacementConstraint),R=!1,w=!1;else{var $=new Map,M=new Map,H=[];Q[Y].forEach(function(b){W.get(b).forEach(function(U){U.direction=="horizontal"?($.has(b)?$.get(b).push(U):$.set(b,[U]),$.has(U.id)||$.set(U.id,[]),H.push({left:b,right:U.id})):(M.has(b)?M.get(b).push(U):M.set(b,[U]),M.has(U.id)||M.set(U.id,[]),H.push({top:b,bottom:U.id}))})}),_(H),w=!1;var B=D($,"horizontal"),tt=D(M,"vertical");Q[Y].forEach(function(b,U){y[U]=[v[u.get(b)],L[u.get(b)]],E[U]=[],B.has(b)?E[U][0]=B.get(b):E[U][0]=v[u.get(b)],tt.has(b)?E[U][1]=tt.get(b):E[U][1]=L[u.get(b)]}),R=!0}}if(R){for(var ht=void 0,J=t.transpose(E),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var gt=0;gt<u.size;gt++){var mt=[v[gt],L[gt]],At=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];v[gt]=t.dotProduct(mt,At),L[gt]=t.dotProduct(mt,Ot)}w&&_(l.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(b,U){var Z={x:v[u.get(b.nodeId)],y:L[u.get(b.nodeId)]},K=b.position,q=X(K,Z);Et.x+=q.x,Et.y+=q.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,v.forEach(function(b,U){v[U]+=Et.x}),L.forEach(function(b,U){L[U]+=Et.y}),l.fixedNodeConstraint.forEach(function(b){v[u.get(b.nodeId)]=b.position.x,L[u.get(b.nodeId)]=b.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Dt[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=v[u.get(K.values().next().value)]:q=k(Z).x,Z.forEach(function(at){S.has(at)||(v[u.get(at)]=q)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(U){var Z=new Set;Ut[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=L[u.get(K.values().next().value)]:q=k(Z).y,Z.forEach(function(at){S.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var b=new Map,U=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,ct=new Set,nt=new Set;if(S.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),et[yt].forEach(function(Mt){b.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),S.has(Mt)&&ct.add("dummy"+yt)}),q.set("dummy"+yt,v[u.get(et[yt][0])])},ut=0;ut<et.length;ut++)j(ut);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){U.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),S.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,L[u.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var kt=void 0,Bt=void 0;Mt.direction=="horizontal"?(kt=b.get(yt)?b.get(yt):yt,b.get(Mt.id)?Bt={id:b.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:Bt=Mt,lt.has(kt)?lt.get(kt).push(Bt):lt.set(kt,[Bt]),lt.has(Bt.id)||lt.set(Bt.id,[])):(kt=U.get(yt)?U.get(yt):yt,U.get(Mt.id)?Bt={id:U.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:Bt=Mt,ot.has(kt)?ot.get(kt).push(Bt):ot.set(kt,[Bt]),ot.has(Bt.id)||ot.set(Bt.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt($t)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=m(lt),zt=m(ot),St=n(bt),Zt=n(zt),Kt=p(lt),ce=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),Zt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){ce.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=D(lt,"horizontal",ct,q,Qt),Jt=D(ot,"vertical",nt,at,jt),oe=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){v[u.get(Mt)]=_t.get(yt)}):v[u.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var ge=_t.keys()[Symbol.iterator](),Le;!(te=(Le=ge.next()).done);te=!0){var ue=Le.value;oe(ue)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw Ne}}var Be=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){L[u.get(Mt)]=Jt.get(yt)}):L[u.get(yt)]=Jt.get(yt)},de=!0,Ce=!1,Ae=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),we;!(de=(we=ve.next()).done);de=!0){var ue=we.value;Be(ue)}}catch(Gt){Ce=!0,Ae=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Ce)throw Ae}}})()}for(var Yt=0;Yt<P.length;Yt++){var Vt=P[Yt];Vt.getChild()==null&&Vt.setCenter(v[u.get(Vt.id)],L[u.get(Vt.id)])}},a.exports=o}),551:(a=>{a.exports=A})},N={};function g(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return G[a](i,i.exports,g),i.exports}var h=g(45);return h})()})})(le)),le.exports}var pr=he.exports,De;function yr(){return De||(De=1,(function(I,O){(function(G,N){I.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r<i;r++)f[r-1]=arguments[r];return f.forEach(function(d){Object.keys(d).forEach(function(t){return e[t]=d[t]})}),e}}),548:((a,e,i)=>{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,u=void 0;try{for(var v=s[Symbol.iterator](),L;!(l=(L=v.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(P){T=!0,u=P}finally{try{!l&&v.return&&v.return()}finally{if(T)throw u}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,d={};d.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var u=l.parent()[0];u!=null;){if(s[u.id()])return!1;u=u.parent()[0]}return!0});return c},d.connectComponents=function(t,s,o,c){var l=new r,T=new Set,u=[],v=void 0,L=void 0,P=void 0,C=!1,F=1,V=[],X=[],k=function(){var _=t.collection();X.push(_);var n=o[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(s)),u.push(n),m.forEach(function(y){l.push(y),T.add(y),_.merge(y)});for(var p=function(){n=l.shift();var R=t.collection();n.neighborhood().nodes().forEach(function(x){s.intersection(n.edgesWith(x)).length>0&&R.merge(x)});for(var w=0;w<R.length;w++){var S=R[w];if(v=o.intersection(S.union(S.ancestors())),v!=null&&!T.has(v[0])){var W=v.union(v.descendants());W.forEach(function(x){l.push(x),T.add(x),_.merge(x),o.has(x)&&u.push(x)})}}};l.length!=0;)p();if(_.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(R){_.has(R.source())&&_.has(R.target())&&_.merge(R)})}),u.length==o.length&&(C=!0),!C||C&&F>1){L=u[0],P=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length<P&&(P=y.connectedEdges().length,L=y)}),V.push(L.id());var E=t.collection();E.merge(u[0]),u.forEach(function(y){E.merge(y)}),u=[],o=o.difference(E),F++}};do k();while(!C);return c&&V.length>0&&c.set("dummy"+(c.size+1),V),X},d.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,L=!1,P=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),F;!(v=(F=C.next()).done);v=!0){var V=F.value,X=f(V,2),k=X[0],D=X[1],_=o.cy.getElementById(k);if(_){var n=_.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;m<c&&(c=m),p>l&&(l=p),E<T&&(T=E),y>u&&(u=y)}}}catch(x){L=!0,P=x}finally{try{!v&&C.return&&C.return()}finally{if(L)throw P}}var R=t.x-(l+c)/2,w=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(x){return x+R}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,Y=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),Y>l&&(l=Y),rt<T&&(T=rt),$>u&&(u=$)});var S=t.x-(l+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+W)})}}},d.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,P=void 0,C=void 0,F=void 0,V=t.descendants().not(":parent"),X=V.length,k=0;k<X;k++){var D=V[k];L=s[c.get(D.id())]-D.width()/2,P=s[c.get(D.id())]+D.width()/2,C=o[c.get(D.id())]-D.height()/2,F=o[c.get(D.id())]+D.height()/2,l>L&&(l=L),T<P&&(T=P),u>C&&(u=C),v<F&&(v=F)}var _={};return _.topLeftX=l,_.topLeftY=u,_.width=T-l,_.height=v-u,_},d.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},a.exports=d}),816:((a,e,i)=>{var f=i(548),r=i(140).CoSELayout,d=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(v,L){var P=v.cy,C=v.eles,F=C.nodes(),V=C.edges(),X=void 0,k=void 0,D=void 0,_={};v.randomize&&(X=L.nodeIndexes,k=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(P,C),E=function W(x,Q,z,Y){for(var rt=Q.length,$=0;$<rt;$++){var M=Q[$],H=null;M.intersection(p).length==0&&(H=M.children());var B=void 0,tt=M.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(Y.randomize)if(!M.isParent())B=x.add(new d(z.graphManager,new t(k[X.get(M.id())]-tt.w/2,D[X.get(M.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var ht=f.calcBoundingBox(M,k,D,X);M.intersection(p).length==0?B=x.add(new d(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):B=x.add(new d(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else B=x.add(new d(z.graphManager,new t(M.position("x")-tt.w/2,M.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else B=x.add(new d(this.graphManager));if(B.id=M.data("id"),B.nodeRepulsion=m(Y.nodeRepulsion,M),B.paddingLeft=parseInt(M.css("padding")),B.paddingTop=parseInt(M.css("padding")),B.paddingRight=parseInt(M.css("padding")),B.paddingBottom=parseInt(M.css("padding")),Y.nodeDimensionsIncludeLabels&&(B.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,B.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,B.labelPosVertical=M.css("text-valign"),B.labelPosHorizontal=M.css("text-halign")),_[M.data("id")]=B,isNaN(B.rect.x)&&(B.rect.x=0),isNaN(B.rect.y)&&(B.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),B),W(J,H,z,Y)}}},y=function(x,Q,z){for(var Y=0,rt=0,$=0;$<z.length;$++){var M=z[$],H=_[M.data("source")],B=_[M.data("target")];if(H&&B&&H!==B&&H.getEdgesBetween(B).length==0){var tt=Q.add(x.newEdge(),H,B);tt.id=M.id(),tt.idealLength=m(v.idealEdgeLength,M),tt.edgeElasticity=m(v.edgeElasticity,M),Y+=tt.idealLength,rt++}}v.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:n(v.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},R=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};v.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,l.TILE=v.tile,l.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),v.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),v.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new r,S=w.newGraphManager();return E(S.addRoot(),f.getTopMostNodes(F),w,v),y(w,S,V),R(w,v),w.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function v(L,P){for(var C=0;C<P.length;C++){var F=P[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(L,F.key,F)}}return function(L,P,C){return P&&v(L.prototype,P),C&&v(L,C),L}})();function r(v,L){if(!(v instanceof L))throw new TypeError("Cannot call a class as a function")}var d=i(658),t=i(548),s=i(657),o=s.spectralLayout,c=i(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),u=(function(){function v(L){r(this,v),this.options=d({},T,L)}return f(v,[{key:"run",value:function(){var P=this,C=this.options,F=C.cy,V=C.eles,X=[],k=[],D=void 0,_=[];C.fixedNodeConstraint&&(!Array.isArray(C.fixedNodeConstraint)||C.fixedNodeConstraint.length==0)&&(C.fixedNodeConstraint=void 0),C.alignmentConstraint&&(C.alignmentConstraint.vertical&&(!Array.isArray(C.alignmentConstraint.vertical)||C.alignmentConstraint.vertical.length==0)&&(C.alignmentConstraint.vertical=void 0),C.alignmentConstraint.horizontal&&(!Array.isArray(C.alignmentConstraint.horizontal)||C.alignmentConstraint.horizontal.length==0)&&(C.alignmentConstraint.horizontal=void 0)),C.relativePlacementConstraint&&(!Array.isArray(C.relativePlacementConstraint)||C.relativePlacementConstraint.length==0)&&(C.relativePlacementConstraint=void 0);var n=C.fixedNodeConstraint||C.alignmentConstraint||C.relativePlacementConstraint;n&&(C.tile=!1,C.packComponents=!1);var m=void 0,p=!1;if(F.layoutUtilities&&C.packComponents&&(m=F.layoutUtilities("get"),m||(m=F.layoutUtilities()),p=!0),V.nodes().length>0)if(p){var R=t.getTopMostNodes(C.eles.nodes());if(D=t.connectComponents(F,C.eles,R),D.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&D.forEach(function(vt){C.eles=vt,X.push(o(C))}),C.quality=="default"||C.quality=="proof"){var w=F.collection();if(C.tile){var S=new Map,W=[],x=[],Q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){w.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),w.length>1){var rt=w.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(w),X.push(z);for(var $=Y.length-1;$>=0;$--)D.splice(Y[$],1),X.splice(Y[$],1),_.splice(Y[$],1)}}D.forEach(function(vt,it){C.eles=vt,k.push(l(C,X[it])),t.relocateComponent(_[it],k[it],C)})}else D.forEach(function(vt,it){t.relocateComponent(_[it],X[it],C)});var M=new Set;if(D.length>1){var H=[],B=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(C.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not(B).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(C.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else k[it][Ot.id()]&&mt.nodes.push({x:k[it][Ot.id()].getLeft(),y:k[it][Ot.id()].getTop(),width:k[it][Ot.id()].getWidth(),height:k[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(C.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else k[it][Et.id()]&&k[it][Dt.id()]&&mt.edges.push({startX:k[it][Et.id()].getCenterX(),startY:k[it][Et.id()].getCenterY(),endX:k[it][Dt.id()].getCenterX(),endY:k[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),M.add(it))}});var tt=m.packComponents(H,C.randomize).shifts;if(C.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+tt[it].dx}),mt=vt.yCoords.map(function(At){return At+tt[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;M.forEach(function(vt){Object.keys(k[vt]).forEach(function(it){var gt=k[vt][it];gt.setCenter(gt.getCenterX()+tt[ht].dx,gt.getCenterY()+tt[ht].dy)}),ht++})}}}else{var E=C.eles.boundingBox();if(_.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),C.randomize){var y=o(C);X.push(y)}C.quality=="default"||C.quality=="proof"?(k.push(l(C,X[0])),t.relocateComponent(_[0],k[0],C)):t.relocateComponent(_[0],X[0],C)}var J=function(it,gt){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return k.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),C.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(F,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(P,C,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v})();a.exports=u}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,d=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),u=l.nodes(":parent"),v=new Map,L=new Map,P=new Map,C=[],F=[],V=[],X=[],k=[],D=[],_=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,R=o.samplingType,w=o.nodeSeparation,S=void 0,W=function(){for(var U=0,Z=0,K=!1;Z<S;){U=Math.floor(Math.random()*m),K=!1;for(var q=0;q<Z;q++)if(X[q]==U){K=!0;break}if(!K)X[Z]=U,Z++;else continue}},x=function(U,Z,K){for(var q=[],at=0,ct=0,nt=0,et=void 0,j=[],ut=0,wt=1,pt=0;pt<m;pt++)j[pt]=p;for(q[ct]=U,j[U]=0;ct>=at;){nt=q[at++];for(var xt=C[nt],lt=0;lt<xt.length;lt++)et=L.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,q[++ct]=et);D[nt][Z]=j[nt]*w}if(K){for(var ot=0;ot<m;ot++)D[ot][Z]<k[ot]&&(k[ot]=D[ot][Z]);for(var Lt=0;Lt<m;Lt++)k[Lt]>ut&&(ut=k[Lt],wt=Lt)}return wt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*m);for(var q=0;q<m;q++)k[q]=p;for(var at=0;at<S;at++)X[at]=Z,Z=x(Z,at,U)}else{W();for(var K=0;K<S;K++)x(X[K],K,U)}for(var ct=0;ct<m;ct++)for(var nt=0;nt<S;nt++)D[ct][nt]*=D[ct][nt];for(var et=0;et<S;et++)_[et]=[];for(var j=0;j<S;j++)for(var ut=0;ut<S;ut++)_[j][ut]=D[X[ut]][j]},z=function(){for(var U=d.svd(_),Z=U.S,K=U.U,q=U.V,at=Z[0]*Z[0]*Z[0],ct=[],nt=0;nt<S;nt++){ct[nt]=[];for(var et=0;et<S;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=Z[nt]/(Z[nt]*Z[nt]+at/(Z[nt]*Z[nt])))}n=r.multMat(r.multMat(q,ct),r.transpose(K))},Y=function(){for(var U=void 0,Z=void 0,K=[],q=[],at=[],ct=[],nt=0;nt<m;nt++)K[nt]=Math.random(),q[nt]=Math.random();K=r.normalize(K),q=r.normalize(q);for(var et=E,j=E,ut=void 0;;){for(var wt=0;wt<m;wt++)at[wt]=K[wt];if(K=r.multGamma(r.multL(r.multGamma(at),D,n)),U=r.dotProduct(at,K),K=r.normalize(K),et=r.dotProduct(at,K),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var pt=0;pt<m;pt++)at[pt]=K[pt];for(j=E;;){for(var xt=0;xt<m;xt++)ct[xt]=q[xt];if(ct=r.minusOp(ct,r.multCons(at,r.dotProduct(at,ct))),q=r.multGamma(r.multL(r.multGamma(ct),D,n)),Z=r.dotProduct(ct,q),q=r.normalize(q),et=r.dotProduct(ct,q),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var lt=0;lt<m;lt++)ct[lt]=q[lt];F=r.multCons(at,Math.sqrt(Math.abs(U))),V=r.multCons(ct,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),v),u.forEach(function(b){f.connectComponents(c,l,f.getTopMostNodes(b.descendants().intersection(l)),v)});for(var rt=0,$=0;$<T.length;$++)T[$].isParent()||L.set(T[$].id(),rt++);var M=!0,H=!1,B=void 0;try{for(var tt=v.keys()[Symbol.iterator](),ht;!(M=(ht=tt.next()).done);M=!0){var J=ht.value;L.set(J,rt++)}}catch(b){H=!0,B=b}finally{try{!M&&tt.return&&tt.return()}finally{if(H)throw B}}for(var It=0;It<L.size;It++)C[It]=[];u.forEach(function(b){for(var U=b.children().intersection(l);U.nodes(":childless").length==0;)U=U.nodes()[0].children().intersection(l);var Z=0,K=U.nodes(":childless")[0].connectedEdges().length;U.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),P.set(b.id(),U.nodes(":childless")[Z].id())}),T.forEach(function(b){var U=void 0;b.isParent()?U=L.get(P.get(b.id())):U=L.get(b.id()),b.neighborhood().nodes().forEach(function(Z){l.intersection(b.edgesWith(Z)).length>0&&(Z.isParent()?C[U].push(P.get(Z.id())):C[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;v.get(U).forEach(function(q){c.getElementById(q).isParent()?K=P.get(q):K=q,C[Z].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,gt=void 0;try{for(var mt=v.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(b){it=!0,gt=b}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=L.size;var Et=void 0;if(m>2){S=m<o.sampleSize?m:o.sampleSize;for(var Dt=0;Dt<m;Dt++)D[Dt]=[];for(var Rt=0;Rt<S;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(R),z(),Y(),Et={nodeIndexes:L,xCoords:F,yCoords:V}):(L.forEach(function(b,U){F.push(c.getElementById(U).position("x")),V.push(c.getElementById(U).position("y"))}),Et={nodeIndexes:L,xCoords:F,yCoords:V}),Et}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(F.push(Pt.x),V.push(Pt.y),m==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();F.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),V.push(Pt.y)}return Et={nodeIndexes:L,xCoords:F,yCoords:V},Et}};a.exports={spectralLayout:t}}),579:((a,e,i)=>{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=A})},N={};function g(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return G[a](i,i.exports,g),i.exports}var h=g(579);return h})()})})(he)),he.exports}var Er=yr();const mr=Ze(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:dt(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:dt(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:dt(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:dt(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:dt((I,O)=>I-O+2,"L"),R:dt((I,O)=>I-2,"R"),T:dt((I,O)=>I-O+2,"T"),B:dt((I,O)=>I-2,"B")},Tr=dt(function(I){return Wt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=dt(function(I){const O=I;return O==="L"||O==="R"||O==="T"||O==="B"},"isArchitectureDirection"),Wt=dt(function(I){const O=I;return O==="L"||O==="R"},"isArchitectureDirectionX"),qt=dt(function(I){const O=I;return O==="T"||O==="B"},"isArchitectureDirectionY"),Te=dt(function(I,O){const A=Wt(I)&&qt(O),G=qt(I)&&Wt(O);return A||G},"isArchitectureDirectionXY"),Nr=dt(function(I){const O=I[0],A=I[1],G=Wt(O)&&qt(A),N=qt(O)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=dt(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),ye=dt(function(I,O){const A=`${I}${O}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=dt(function([I,O],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[I+(G==="L"?-1:1),O+(N==="T"?1:-1)]:[I+(G==="L"?-1:1),O]:Wt(N)?[I+(N==="L"?1:-1),O+(G==="T"?1:-1)]:[I,O+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ar=dt(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=dt(function(I,O){return Te(I,O)?"bend":Wt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=dt(function(I){return I.type==="service"},"isArchitectureService"),Or=dt(function(I){return I.type==="junction"},"isArchitectureJunction"),be=dt(I=>I.data(),"edgeData"),ie=dt(I=>I.data(),"nodeData"),Dr=ar.architecture,ae,Pe=(ae=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}setDiagramId(O){this.diagramId=O}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:O,icon:A,in:G,title:N,iconText:g}){if(this.registeredIds[O]!==void 0)throw new Error(`The service id [${O}] is already in use by another ${this.registeredIds[O]}`);if(G!==void 0){if(O===G)throw new Error(`The service [${O}] cannot be placed within itself`);if(this.registeredIds[G]===void 0)throw new Error(`The service [${O}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[G]==="node")throw new Error(`The service [${O}]'s parent is not a group`)}this.registeredIds[O]="node",this.nodes[O]={id:O,type:"service",icon:A,iconText:g,title:N,edges:[],in:G}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:O,in:A}){if(this.registeredIds[O]!==void 0)throw new Error(`The junction id [${O}] is already in use by another ${this.registeredIds[O]}`);if(A!==void 0){if(O===A)throw new Error(`The junction [${O}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The junction [${O}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[A]==="node")throw new Error(`The junction [${O}]'s parent is not a group`)}this.registeredIds[O]="node",this.nodes[O]={id:O,type:"junction",edges:[],in:A}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(O){return this.nodes[O]??null}addGroup({id:O,icon:A,in:G,title:N}){if(this.registeredIds?.[O]!==void 0)throw new Error(`The group id [${O}] is already in use by another ${this.registeredIds[O]}`);if(G!==void 0){if(O===G)throw new Error(`The group [${O}] cannot be placed within itself`);if(this.registeredIds?.[G]===void 0)throw new Error(`The group [${O}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[G]==="node")throw new Error(`The group [${O}]'s parent is not a group`)}this.registeredIds[O]="group",this.groups[O]={id:O,icon:A,title:N,in:G}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:O,rhsId:A,lhsDir:G,rhsDir:N,lhsInto:g,rhsInto:h,lhsGroup:a,rhsGroup:e,title:i}){if(!Re(G))throw new Error(`Invalid direction given for left hand side of edge ${O}--${A}. Expected (L,R,T,B) got ${String(G)}`);if(!Re(N))throw new Error(`Invalid direction given for right hand side of edge ${O}--${A}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[O]===void 0&&this.groups[O]===void 0)throw new Error(`The left-hand id [${O}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[O].in,r=this.nodes[A].in;if(a&&f&&r&&f==r)throw new Error(`The left-hand id [${O}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&f&&r&&f==r)throw new Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:O,lhsDir:G,lhsInto:g,lhsGroup:a,rhsId:A,rhsDir:N,rhsInto:h,rhsGroup:e,title:i};this.edges.push(d),this.nodes[O]&&this.nodes[A]&&(this.nodes[O].edges.push(this.edges[this.edges.length-1]),this.nodes[A].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const O={},A=Object.entries(this.nodes).reduce((e,[i,f])=>(e[i]=f.edges.reduce((r,d)=>{const t=this.getNode(d.lhsId)?.in,s=this.getNode(d.rhsId)?.in;if(t&&s&&t!==s){const o=wr(d.lhsDir,d.rhsDir);o!=="bend"&&(O[t]??={},O[t][s]=o,O[s]??={},O[s][t]=o)}if(d.lhsId===i){const o=ye(d.lhsDir,d.rhsDir);o&&(r[o]=d.rhsId)}else{const o=ye(d.rhsDir,d.lhsDir);o&&(r[o]=d.lhsId)}return r},{}),e),{}),G=Object.keys(A)[0],N={[G]:1},g=Object.keys(A).reduce((e,i)=>i===G?e:{...e,[i]:1},{}),h=dt(e=>{const i={[e]:[0,0]},f=[e];for(;f.length>0;){const r=f.shift();if(r){N[r]=1,delete g[r];const d=A[r],[t,s]=i[r];Object.entries(d).forEach(([o,c])=>{N[c]||(i[c]=Cr([t,s],o),f.push(c))})}}return i},"BFS"),a=[h(G)];for(;Object.keys(g).length>0;)a.push(h(Object.keys(g)[0]));this.dataStructures={adjList:A,spatialMaps:a,groupAlignments:O}}return this.dataStructures}setElementForId(O,A){this.elements[O]=A}getElementById(O){return this.elements[O]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(O){return this.getConfig()[O]}},dt(ae,"ArchitectureDB"),ae),xr=dt((I,O)=>{fr(I,O),I.groups.map(A=>O.addGroup(A)),I.services.map(A=>O.addService({...A,type:"service"})),I.junctions.map(A=>O.addJunction({...A,type:"junction"})),I.edges.map(A=>O.addEdge(A))},"populateDb"),Ge={parser:{yy:void 0},parse:dt(async I=>{const O=await cr("architecture",I);Se.debug(O);const A=Ge.parser?.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(O,A)},"parse")},Ir=dt(I=>`
2
2
  .edge {
3
3
  stroke-width: ${I.archEdgeWidth};
4
4
  stroke: ${I.archEdgeColor};